|
|
@ -1,11 +1,10 @@ |
|
|
|
package com.gyf.csams |
|
|
|
package com.gyf.csams.module |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data class ApiResponse<T>(val code:Int=200,val message:String,val body:T?=null) |
|
|
|
data class ApiResponse<T>(val code:Int=200,val message:String,val body:T?=null) |
|
|
|
|
|
|
|
|
|
|
|
class Simple { |
|
|
|
class Simple { |
|
|
|
companion object { |
|
|
|
companion object { |
|
|
|
fun success(message: String):ApiResponse<Any>{ |
|
|
|
fun success(message: String): ApiResponse<Any> { |
|
|
|
return ApiResponse(code = 200, message = message, body = null) |
|
|
|
return ApiResponse(code = 200, message = message, body = null) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -16,6 +15,16 @@ class Simple { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 客户端类型 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
enum class ClientType{ |
|
|
|
|
|
|
|
//前台 |
|
|
|
|
|
|
|
Foreground, |
|
|
|
|
|
|
|
//后台 |
|
|
|
|
|
|
|
Background |
|
|
|
|
|
|
|
} |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 一般信息 |
|
|
|
* 一般信息 |
|
|
|
* |
|
|
|
* |
|
|
@ -41,17 +50,18 @@ enum class Duty(val desc:String, val level:Int){ |
|
|
|
* 个人信息 |
|
|
|
* 个人信息 |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
abstract class OwnInfoVo :PersonInfoVo(){ |
|
|
|
abstract class OwnInfoVo : PersonInfoVo(){ |
|
|
|
abstract val token:Token |
|
|
|
abstract val token: Token |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
data class ManagerInfoVo(val duty: Duty, |
|
|
|
data class ManagerInfoVo(val duty: Duty, |
|
|
|
override val name: String, |
|
|
|
override val name: String, |
|
|
|
override val headImg: String?, |
|
|
|
override val headImg: String?, |
|
|
|
override val desc: String |
|
|
|
override val desc: String |
|
|
|
):PersonInfoVo() |
|
|
|
): PersonInfoVo() |
|
|
|
|
|
|
|
|
|
|
|
data class UserInfoVo(override val name: String, override val headImg: String?, override val desc: String):PersonInfoVo() |
|
|
|
data class UserInfoVo(override val name: String, override val headImg: String?, override val desc: String): |
|
|
|
|
|
|
|
PersonInfoVo() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -84,7 +94,7 @@ data class UserRegVo(val studentId: String, val name: String) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
data class UserVo( |
|
|
|
data class UserVo( |
|
|
|
val studentId: String, |
|
|
|
val studentId: String, |
|
|
|
val manager:ManagerVo?=null, |
|
|
|
val manager: ManagerVo?=null, |
|
|
|
override val token: Token, |
|
|
|
override val token: Token, |
|
|
|
override val name: String, |
|
|
|
override val name: String, |
|
|
|
override val headImg: String?, |
|
|
|
override val headImg: String?, |
|
|
@ -97,77 +107,65 @@ data class UserVo( |
|
|
|
sealed class BaseLoginVo{ |
|
|
|
sealed class BaseLoginVo{ |
|
|
|
abstract val password: String |
|
|
|
abstract val password: String |
|
|
|
abstract val device: String |
|
|
|
abstract val device: String |
|
|
|
abstract val clientType:ClientType |
|
|
|
abstract val clientType: ClientType |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sealed class ClientBaseVo { |
|
|
|
sealed class ClientBaseVo { |
|
|
|
abstract val token:Token |
|
|
|
abstract val token: Token |
|
|
|
abstract val clientType:ClientType |
|
|
|
abstract val clientType: ClientType |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
data class UserLoginVo(val studentId: String, |
|
|
|
data class UserLoginVo(val studentId: String, |
|
|
|
override val password: String, override val device: String, |
|
|
|
override val password: String, override val device: String, |
|
|
|
override val clientType: ClientType=ClientType.Foreground |
|
|
|
override val clientType: ClientType = ClientType.Foreground |
|
|
|
):BaseLoginVo() |
|
|
|
): BaseLoginVo() |
|
|
|
|
|
|
|
|
|
|
|
data class UserResDto(val password:String) |
|
|
|
data class UserResDto(val password:String) |
|
|
|
|
|
|
|
|
|
|
|
data class ManagerLoginVo(val account:String, |
|
|
|
data class ManagerLoginVo(val account:String, |
|
|
|
override val password:String, override val device:String):BaseLoginVo() { |
|
|
|
override val password:String, override val device:String): BaseLoginVo() { |
|
|
|
override val clientType: ClientType=ClientType.Background |
|
|
|
override val clientType: ClientType = ClientType.Background |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
data class Token(val token:String, val createTime:Long, val id:Int) |
|
|
|
data class Token(val token:String, val createTime:Long, val id:Int) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data class LeaveMessageVo(val message: String, override val token:Token, |
|
|
|
data class LeaveMessageVo(val message: String, override val token: Token, |
|
|
|
override val clientType: ClientType=ClientType.Foreground):ClientBaseVo() |
|
|
|
override val clientType: ClientType = ClientType.Foreground |
|
|
|
|
|
|
|
): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
data class OnlyToken(override val token: Token, override val clientType: ClientType):ClientBaseVo() |
|
|
|
data class OnlyToken(override val token: Token, override val clientType: ClientType): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
data class LeaveMessageDto(val message: String,val user: UserInfoVo) |
|
|
|
data class LeaveMessageDto(val message: String,val user: UserInfoVo) |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 社团注册资料表单 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @property name |
|
|
|
|
|
|
|
* @property desc |
|
|
|
|
|
|
|
* @property fileId |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
data class AssociationRegVo(val id:Int?, val name: String, val desc: String, val fileId: Int, |
|
|
|
|
|
|
|
override val clientType: ClientType=ClientType.Foreground, |
|
|
|
|
|
|
|
override val token: Token |
|
|
|
|
|
|
|
):ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data class ImageFileDto(val filepath:String,val md5:String,val createTime: Long,val url:String) |
|
|
|
data class ImageFileDto(val filepath:String,val md5:String,val createTime: Long,val url:String) |
|
|
|
|
|
|
|
|
|
|
|
data class RegAssociationDto(val name:String,val desc:String,val logo:ImageFileDto) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data class InitManagerDto(val account: String, val originPassword: String, val duty: Duty) |
|
|
|
data class InitManagerDto(val account: String, val originPassword: String, val duty: Duty) |
|
|
|
|
|
|
|
|
|
|
|
data class PageDto(val currentPage:Long,val pageSize:Int=10) |
|
|
|
data class PageDto(val currentPage:Long,val pageSize:Int=10) |
|
|
|
|
|
|
|
|
|
|
|
data class NotificationDto(val receiverId:Int, val receiverClient:ClientType, override val token: Token, |
|
|
|
data class NotificationDto(val receiverId:Int, val receiverClient: ClientType, override val token: Token, |
|
|
|
val page:PageDto?, override val clientType: ClientType=receiverClient |
|
|
|
val page: PageDto?, override val clientType: ClientType =receiverClient |
|
|
|
):ClientBaseVo() |
|
|
|
): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
data class NotificationVo(val title:String,val content:String,val id:Int,val createTime: Long) |
|
|
|
data class NotificationVo(val title:String,val content:String,val id:Int,val createTime: Long) |
|
|
|
|
|
|
|
|
|
|
|
data class SearchAssociationVo(val name:String, val desc:String, |
|
|
|
data class SearchAssociationVo(val name:String, val desc:String, |
|
|
|
override val clientType: ClientType=ClientType.Foreground, override val token: Token |
|
|
|
override val clientType: ClientType = ClientType.Foreground, override val token: Token |
|
|
|
):ClientBaseVo() |
|
|
|
): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
data class ShowAssociationVo(val id: Int, |
|
|
|
data class ShowAssociationVo(val id: Int, |
|
|
|
override val token: Token, |
|
|
|
override val token: Token, |
|
|
|
override val clientType: ClientType=ClientType.Foreground):ClientBaseVo() |
|
|
|
override val clientType: ClientType = ClientType.Foreground |
|
|
|
|
|
|
|
): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
data class QueryAssociationMembers(val id:Int, |
|
|
|
data class QueryAssociationMembers(val id:Int, |
|
|
|
val name:String?=null, |
|
|
|
val name:String?=null, |
|
|
|
override val token: Token, |
|
|
|
override val token: Token, |
|
|
|
override val clientType: ClientType=ClientType.Foreground |
|
|
|
override val clientType: ClientType = ClientType.Foreground |
|
|
|
):ClientBaseVo() |
|
|
|
): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 社团级别 |
|
|
|
* 社团级别 |
|
|
@ -199,7 +197,7 @@ enum class AssociationFaculty(val desc: String, val range: IntRange) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
abstract class BaseAssociationVo{ |
|
|
|
abstract class BaseAssociationVo{ |
|
|
|
abstract val id: Int |
|
|
|
abstract val associationId: Int |
|
|
|
abstract val name: String |
|
|
|
abstract val name: String |
|
|
|
abstract val desc: String |
|
|
|
abstract val desc: String |
|
|
|
abstract val logo:String |
|
|
|
abstract val logo:String |
|
|
@ -212,13 +210,13 @@ abstract class BaseAssociationVo{ |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
class AssociationVo( |
|
|
|
class AssociationVo( |
|
|
|
override val id: Int, |
|
|
|
override val associationId: Int, |
|
|
|
override val name: String, |
|
|
|
override val name: String, |
|
|
|
override val desc: String, |
|
|
|
override val desc: String, |
|
|
|
override val logo: String, |
|
|
|
override val logo: String, |
|
|
|
override val faculty: AssociationFaculty, |
|
|
|
override val faculty: AssociationFaculty, |
|
|
|
override val level: AssociationLevel? |
|
|
|
override val level: AssociationLevel? |
|
|
|
) :BaseAssociationVo() |
|
|
|
) : BaseAssociationVo() |
|
|
|
|
|
|
|
|
|
|
|
//审核状态 |
|
|
|
//审核状态 |
|
|
|
enum class CheckStatus(val desc: String){ |
|
|
|
enum class CheckStatus(val desc: String){ |
|
|
@ -229,10 +227,6 @@ enum class CheckStatus(val desc: String){ |
|
|
|
Finish("审核完成") |
|
|
|
Finish("审核完成") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
data class AssociationMemberVo( |
|
|
|
|
|
|
|
val association:AssociationVo, |
|
|
|
|
|
|
|
val isHead:Boolean |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 活动照片 |
|
|
|
* 活动照片 |
|
|
@ -241,35 +235,51 @@ data class AssociationMemberVo( |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
data class AssociationActPhotoVo(val path:String) |
|
|
|
data class AssociationActPhotoVo(val path:String) |
|
|
|
|
|
|
|
|
|
|
|
data class AssociationMainVo(val associationVo: AssociationVo,val head: UserInfoVo, |
|
|
|
data class AssociationMainVo(val associationVo: AssociationVo, val head: UserInfoVo, |
|
|
|
val photos:List<AssociationActPhotoVo>?=null) |
|
|
|
val photos:List<AssociationActPhotoVo>?=null) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data class AuditCheckVo(val checkStatus: CheckStatus, val applyTime: Long, |
|
|
|
|
|
|
|
val firstCause:String, val lastCause:String?) |
|
|
|
|
|
|
|
|
|
|
|
//前台社团注册资料 |
|
|
|
//前台社团注册资料 |
|
|
|
data class AssociationCheckVo( |
|
|
|
data class AssociationCheckVo( |
|
|
|
override val id: Int, |
|
|
|
override val associationId: Int, |
|
|
|
override val name: String, |
|
|
|
override val name: String, |
|
|
|
override val desc: String, |
|
|
|
override val desc: String, |
|
|
|
override val logo: String, |
|
|
|
override val logo: String, |
|
|
|
override val faculty: AssociationFaculty, |
|
|
|
override val faculty: AssociationFaculty, |
|
|
|
override val level: AssociationLevel?, |
|
|
|
override val level: AssociationLevel?, |
|
|
|
val checkStatus:CheckStatus, |
|
|
|
val fileId:Int, |
|
|
|
val applyTime: Long, |
|
|
|
val auditCheckVo: AuditCheckVo |
|
|
|
val firstCause:String, |
|
|
|
): BaseAssociationVo() |
|
|
|
val lastCause:String?, |
|
|
|
|
|
|
|
val fileId:Int |
|
|
|
|
|
|
|
):BaseAssociationVo() |
|
|
|
/** |
|
|
|
|
|
|
|
* 社团注册资料表单 |
|
|
|
val facultyRange=IntRange(4,5) |
|
|
|
* |
|
|
|
fun User.faculty():AssociationFaculty{ |
|
|
|
* @property name |
|
|
|
val num=studentId.substring(facultyRange).toInt() |
|
|
|
* @property desc |
|
|
|
AssociationFaculty.values().forEach { |
|
|
|
* @property fileId |
|
|
|
if(num in it.range){ |
|
|
|
*/ |
|
|
|
return it |
|
|
|
data class AssociationRegVo(val associationId:Int?, |
|
|
|
} |
|
|
|
val name: String, |
|
|
|
} |
|
|
|
val desc: String, val fileId: Int, |
|
|
|
throw IllegalArgumentException("无法根据${facultyRange}对应的num[${num}]找到所属院系") |
|
|
|
override val clientType: ClientType = ClientType.Foreground, |
|
|
|
|
|
|
|
override val token: Token |
|
|
|
|
|
|
|
): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
abstract class AuditVo{ |
|
|
|
|
|
|
|
abstract val audit: AuditLoggingVo |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 社团注册审核记录 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
data class AuditAssociationVo(val name:String, val desc:String, |
|
|
|
|
|
|
|
val logo:String, override val audit: AuditLoggingVo |
|
|
|
|
|
|
|
): AuditVo() |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 通用审核记录 |
|
|
|
* 通用审核记录 |
|
|
@ -284,35 +294,67 @@ fun User.faculty():AssociationFaculty{ |
|
|
|
* @property auditTime |
|
|
|
* @property auditTime |
|
|
|
* @property nextAudit |
|
|
|
* @property nextAudit |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
data class AuditLoggingVo(val id:Int, val user:UserInfoVo, val applyTime: Long, val manager:ManagerInfoVo?, |
|
|
|
data class AuditLoggingVo(val id:Int, val user: UserInfoVo, val applyTime: Long, val manager: ManagerInfoVo?, |
|
|
|
val acceptTime:Long?, val cause:String?, val result:Boolean?, |
|
|
|
val acceptTime:Long?, val cause:String?, val result:Boolean?, |
|
|
|
val auditTime:Long?, val nextAudit:AuditLoggingVo?) |
|
|
|
val auditTime:Long?, val nextAudit: AuditLoggingVo?) |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 社团注册资料受理 |
|
|
|
* 资料受理 |
|
|
|
* |
|
|
|
* |
|
|
|
* @property regId |
|
|
|
* @property auditId |
|
|
|
* @property clientType |
|
|
|
* @property clientType |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
data class AcceptRegAssociation(val regId:Int, |
|
|
|
data class AcceptVo(val auditId:Int, |
|
|
|
val isFirstAccept:Boolean, |
|
|
|
override val clientType: ClientType = ClientType.Background, |
|
|
|
override val clientType: ClientType=ClientType.Background, |
|
|
|
|
|
|
|
override val token: Token |
|
|
|
override val token: Token |
|
|
|
):ClientBaseVo() |
|
|
|
): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 社团注册审核记录 |
|
|
|
*资料审核 |
|
|
|
* |
|
|
|
* |
|
|
|
|
|
|
|
* @property auditId |
|
|
|
|
|
|
|
* @property result |
|
|
|
|
|
|
|
* @property cause |
|
|
|
|
|
|
|
* @property clientType |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
data class DisposeRegInfoVo(val name:String,val desc:String,val logo:String,val log:AuditLoggingVo) |
|
|
|
data class CheckVo(val auditId:Int, val result:Boolean, val cause:String, |
|
|
|
|
|
|
|
override val clientType: ClientType = ClientType.Background, override val token: Token |
|
|
|
|
|
|
|
): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data class BaseActivityVo( |
|
|
|
|
|
|
|
val activityName:String, |
|
|
|
|
|
|
|
val activityTime: Long, |
|
|
|
|
|
|
|
val activityAddress:String, |
|
|
|
|
|
|
|
val activityDesc:String, |
|
|
|
|
|
|
|
val activitySize:Int |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 社团注册资料审核 |
|
|
|
* 前台活动申请书 |
|
|
|
* |
|
|
|
* |
|
|
|
* @property regId |
|
|
|
* @property activityId |
|
|
|
* @property result |
|
|
|
|
|
|
|
* @property cause |
|
|
|
|
|
|
|
* @property clientType |
|
|
|
* @property clientType |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
data class CheckRegVo(val regId:Int, val result:Boolean, val cause:String, |
|
|
|
data class ActivityApplyVo(val activityId:Int?, |
|
|
|
override val clientType: ClientType=ClientType.Background, override val token: Token |
|
|
|
val associationId: Int, |
|
|
|
):ClientBaseVo() |
|
|
|
val baseActivityVo: BaseActivityVo, |
|
|
|
|
|
|
|
override val token: Token, |
|
|
|
|
|
|
|
override val clientType: ClientType = ClientType.Foreground |
|
|
|
|
|
|
|
): ClientBaseVo() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 后台活动申请书 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @property auditId |
|
|
|
|
|
|
|
* @property activityName |
|
|
|
|
|
|
|
* @property activityTime |
|
|
|
|
|
|
|
* @property activityAddress |
|
|
|
|
|
|
|
* @property activityDesc |
|
|
|
|
|
|
|
* @property activitySize |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
data class AuditActVo(val auditId:Int, val activityName:String, val activityTime: Long, |
|
|
|
|
|
|
|
val activityAddress:String, |
|
|
|
|
|
|
|
val activityDesc:String, val activitySize:Int, |
|
|
|
|
|
|
|
override val audit: AuditLoggingVo |
|
|
|
|
|
|
|
): AuditVo() |