diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java b/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java index 105e2908..7a43de2e 100644 --- a/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java @@ -49,7 +49,9 @@ public class LogAspect { } - @Pointcut("execution(* com.ccsens.tall.web..*(..)) || execution(* com.ccsens.ht.api..*(..))") + @Pointcut("execution(* com.ccsens.tall.web..*(..)) || execution(* com.ccsens.ht.api..*(..))" + + " || execution(* com.ccsens.mt.api..*(..)) || execution(* com.ccsens.game.api..*(..))" + + " || execution(* com.ccsens.health.api..*(..)) || execution(* com.ccsens.pims.api..*(..))") public void logAdvice(){ } diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/MustLoginAspect.java b/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/MustLoginAspect.java index 24887d1c..1b155c8a 100644 --- a/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/MustLoginAspect.java +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/aspect/MustLoginAspect.java @@ -1,5 +1,6 @@ package com.ccsens.cloudutil.aspect; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.ccsens.cloudutil.annotation.MustLogin; @@ -52,7 +53,10 @@ public class MustLoginAspect { QueryDto dto = args == null || args.length < 1 ? null : (QueryDto) args[0]; //获取userId - JsonResponse response = tallFeignClient.getUserIdByToken(authHeader); + JsonResponse response = null; + if(StrUtil.isNotEmpty(authHeader)){ + response = tallFeignClient.getUserIdByToken(authHeader); + } log.info("{}获取userId:{}", authHeader, response); Signature signature = pjp.getSignature(); @@ -62,7 +66,7 @@ public class MustLoginAspect { if (mustLoginAnnotation == null) { log.info("不是必须登录,有token,则添加userId,没有则不添加"); - if (response.getCode().intValue() == CodeEnum.SUCCESS.getCode().intValue() && response.getData() != null) { + if (response != null && response.getCode().intValue() == CodeEnum.SUCCESS.getCode().intValue() && response.getData() != null) { JSONObject json = JSONObject.parseObject(JSON.toJSONString(response.getData())); Long userId = json.getLong("id"); if (dto != null) { @@ -73,7 +77,7 @@ public class MustLoginAspect { return result; } //必须登录,未登录直接返回未登录相关信息 - if (response.getCode().intValue() != CodeEnum.SUCCESS.getCode().intValue()) { + if (response == null || response.getCode().intValue() != CodeEnum.SUCCESS.getCode().intValue()) { return response; } if (response.getData() == null) { diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java new file mode 100644 index 00000000..7656dfc4 --- /dev/null +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/WpsDto.java @@ -0,0 +1,60 @@ +package com.ccsens.cloudutil.bean.tall.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.util.Map; + +@Data +public class WpsDto { + @Data + @ApiModel("业务和WPS") + public static class Business{ + @ApiModelProperty("业务ID") + private Long businessId; + @ApiModelProperty("wps文件ID") + private Long wpsFileId; + @ApiModelProperty("业务类型 0项目WBS 1交付物 2会议记录。后面是pims内的表:3产品依据表,4产品收入表,5成本表,6损益表,7现金流表") + private Byte businessType; + @ApiModelProperty("用户ID") + private Long userId; + @ApiModelProperty("文件名") + private String fileName; + @ApiModelProperty("文件路径,默认在WebConstant.UPLOAD_PATH_BASE下") + private String filePath; + @ApiModelProperty("文件大小") + private Long fileSize; + @ApiModelProperty("操作类型 值:WebConstant Wps USER_OPERATION... ") + private byte operation; + @ApiModelProperty("操作权限 WebConstant Wps PROJECT_PRIVILEGE...") + private byte privilege; + @ApiModelProperty("操作权限查询路径") + private String privilegeQueryUrl; + } + + @Data + @ApiModel("查找wps文件路径") + public static class VisitWpsUrl{ + @NotNull + @ApiModelProperty("业务ID") + private Long businessId; + @NotNull + @ApiModelProperty("业务类型") + private byte businessType; + @NotNull + @ApiModelProperty("userId") + private Long userId; + @ApiModelProperty("访问路径") + private Map params; + } + + @Data + @ApiModel("异步通知") + public static class Async{ + @ApiModelProperty("文件ID") + private Long fileId; + } + +} diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/WpsVo.java b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/WpsVo.java new file mode 100644 index 00000000..297387e8 --- /dev/null +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/WpsVo.java @@ -0,0 +1,15 @@ +package com.ccsens.cloudutil.bean.tall.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class WpsVo { + @Data + public static class BusinessFileIdAndPath{ + @ApiModelProperty("业务id") + private Long businessId; + @ApiModelProperty("文件路径") + private String filePath; + } +} diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java b/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java index 2617b86a..bfed3df8 100644 --- a/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java @@ -4,23 +4,20 @@ import com.ccsens.cloudutil.bean.QueryParam; import com.ccsens.cloudutil.bean.tall.dto.LogDto; import com.ccsens.cloudutil.bean.tall.dto.MemberRoleDto; import com.ccsens.cloudutil.bean.tall.dto.UserDto; -import com.ccsens.cloudutil.bean.tall.vo.MemberVo; -import com.ccsens.cloudutil.bean.tall.vo.PluginVo; -import com.ccsens.cloudutil.bean.tall.vo.TaskVo; -import com.ccsens.cloudutil.bean.tall.vo.UserVo; +import com.ccsens.cloudutil.bean.tall.dto.WpsDto; +import com.ccsens.cloudutil.bean.tall.vo.*; import com.ccsens.util.JsonResponse; -import feign.Param; import feign.hystrix.FallbackFactory; import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.configurationprocessor.json.JSONObject; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import java.util.List; -import java.util.Map; /** * @description: @@ -116,7 +113,7 @@ public interface TallFeignClient { * * @return */ - @GetMapping("/users/userInfo") + @GetMapping("/users/getUserInfo") JsonResponse getUserByUserId(@RequestParam(name = "userId") Long userId); @@ -156,6 +153,36 @@ public interface TallFeignClient { @GetMapping("/plugins/task") Long getTaskIdByTaskPluginId(@RequestParam(name = "taskPluginId") Long taskPluginId); + /** + * 保存WPS业务和文件记录 + */ + @RequestMapping("/wps/saveWps") + JsonResponse saveWpsFile(WpsDto.Business business); + + /** + * 保存WPS业务和文件记录 + */ + @RequestMapping("/wps/visitUrls") + List queryVisitUrls(WpsDto.VisitWpsUrl visitWpsUrl); + + /** + * 根据wpsId查询wps文件路径 + */ + @GetMapping("/wps/wpsId") + JsonResponse getPathByWpsId(@RequestParam(name = "wpsId")Long wpsId); + + /** + * 查找wps文件路径 + */ + @GetMapping("/v1/3rd/getFilePath") + String getWpsFilePath(@RequestParam(name = "businessId") Long businessId,@RequestParam(name = "businessType") byte businessType); + + /** + * 通过userId呵taskId查找用户信息 + */ + @GetMapping("/users/memberByTask") + JsonResponse getMemberInfoByUserIdAndTaskId(@RequestParam(name = "userId") Long userId,@RequestParam(name = "taskId") Long taskId); + } @Slf4j @@ -243,6 +270,31 @@ class TallFeignClientFallBack implements FallbackFactory { public Long getTaskIdByTaskPluginId(Long taskPluginId) { return null; } + + @Override + public JsonResponse saveWpsFile(WpsDto.Business business) { + return JsonResponse.newInstance().fail(); + } + + @Override + public List queryVisitUrls(WpsDto.VisitWpsUrl visitWpsUrl) { + return null; + } + + @Override + public JsonResponse getPathByWpsId(Long async) { + return JsonResponse.newInstance().fail(); + } + + @Override + public String getWpsFilePath(Long businessId, byte businessType) { + return null; + } + + @Override + public JsonResponse getMemberInfoByUserIdAndTaskId(Long userId, Long taskId) { + return JsonResponse.newInstance().fail(); + } }; } diff --git a/cloudutil/src/main/resources/application-util-prod.yml b/cloudutil/src/main/resources/application-util-prod.yml index 443213d8..189c4bef 100644 --- a/cloudutil/src/main/resources/application-util-prod.yml +++ b/cloudutil/src/main/resources/application-util-prod.yml @@ -20,8 +20,10 @@ eureka: service-url: # 指定eureka server通信地址,注意/eureka/小尾巴不能少 #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ -# defaultZone: http://admin:admin@140.143.228.3:7010/eureka/ - defaultZone: http://admin:admin@81.70.54.64:7010/eureka/ + +# defaultZone: http://admin:admin@81.70.54.64:7010/eureka/ + defaultZone: http://admin:admin@192.144.182.42:7010/eureka/ + instance: # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server prefer-ip-address: true diff --git a/cloudutil/src/main/resources/application-util-test.yml b/cloudutil/src/main/resources/application-util-test.yml index 6559c69e..5c829176 100644 --- a/cloudutil/src/main/resources/application-util-test.yml +++ b/cloudutil/src/main/resources/application-util-test.yml @@ -1,3 +1,65 @@ +#<<<<<<< HEAD +##服务端点暴露 +#management: +# endpoints: +# web: +# exposure: +# # 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' +# include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream +## # 不暴露哪些端点 +## exclude: env,beans,configprops +# endpoint: +# health: +# # 是否展示健康检查详情 +# show-details: always +# health: +# redis: +# enabled: false +##eureka注册 +#eureka: +# client: +# service-url: +# # 指定eureka server通信地址,注意/eureka/小尾巴不能少 +# #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ +## defaultZone: http://admin:admin@49.233.89.188:7010/eureka/ +# defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ +# instance: +# # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server +# prefer-ip-address: true +# metadata-map: +# management: +# context-path: ${server.servlet.context-path:}/actuator +# home-page-url-path: ${server.servlet.context-path:}/ +# status-page-url-path: ${server.servlet.context-path:}/actuator/info +# health-check-url-path: ${server.servlet.context-path:}/actuator/health +#feign: +# client: +# config: +# default: +# connectTime: 5000 +# readTimeout: 5000 +# # NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。 +# # BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。 +# # HEADERS:记录BASIC级别的基础上,记录请求和响应的header。 +# # FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据 +# loggerLevel: basic +# hystrix: +# enabled: true +## sleuth +#logging: +# level: +# root: info +# org.springframework.cloud.sleuth: DEBUG +#spring: +## zipkin: +## base-url: http://49.233.89.188:9411 +## sleuth: +## sampler: +## # 采样率,模式0.1,也就是10%,为了便于观察效果,改为1.0,也就是100%。生产环境建议保持默认。 +## probability: 1.0 +# cloud: +# inetutils: +#======= #服务端点暴露 management: endpoints: @@ -20,8 +82,8 @@ eureka: service-url: # 指定eureka server通信地址,注意/eureka/小尾巴不能少 #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ -# defaultZone: http://admin:admin@49.233.89.188:7010/eureka/ defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ +# defaultZone: http://admin:admin@test.tall.wiki:7010/eureka/ instance: # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server prefer-ip-address: true diff --git a/ct/src/main/java/com/ccsens/ct/config/SpringConfig.java b/ct/src/main/java/com/ccsens/ct/config/SpringConfig.java index bd24e547..b701c3e8 100644 --- a/ct/src/main/java/com/ccsens/ct/config/SpringConfig.java +++ b/ct/src/main/java/com/ccsens/ct/config/SpringConfig.java @@ -111,7 +111,7 @@ public class SpringConfig implements WebMvcConfigurer { .addResourceLocations("classpath:/META-INF/resources/webjars/"); registry.addResourceHandler("/uploads/**") - .addResourceLocations("file:///home/cloud/tall/uploads/"); + .addResourceLocations("file:///home/cloud/ct/uploads/"); //super.addResourceHandlers(registry); } diff --git a/ct/src/main/resources/application-test.yml b/ct/src/main/resources/application-test.yml index 57d9ab85..6e3a892d 100644 --- a/ct/src/main/resources/application-test.yml +++ b/ct/src/main/resources/application-test.yml @@ -8,7 +8,8 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: - host: api.ccsens.com +# host: api.ccsens.com + host: 127.0.0.1 password: 111111 port: 5672 username: admin @@ -28,4 +29,4 @@ swagger: enable: true eureka: instance: - ip-address: 49.233.89.188 \ No newline at end of file + ip-address: 192.168.0.99 \ No newline at end of file diff --git a/ct/src/main/resources/druid-test.yml b/ct/src/main/resources/druid-test.yml index caf023d1..b027a78c 100644 --- a/ct/src/main/resources/druid-test.yml +++ b/ct/src/main/resources/druid-test.yml @@ -15,7 +15,8 @@ spring: maxWait: 60000 minEvictableIdleTimeMillis: 300000 minIdle: 5 - password: +# password: + password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 poolPreparedStatements: true servletLogSlowSql: true servletLoginPassword: 111111 @@ -27,7 +28,11 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 +<<<<<<< HEAD +======= +# url: jdbc:mysql://127.0.0.1/ct?useUnicode=true&characterEncoding=UTF-8 +>>>>>>> pt url: jdbc:mysql://test.tall.wiki/ct?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL - env: CCSENS_GAME \ No newline at end of file + env: CCSENS_TALL \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/api/ClientController.java b/game/src/main/java/com/ccsens/game/api/ClientController.java index 784fff2d..766a2e57 100644 --- a/game/src/main/java/com/ccsens/game/api/ClientController.java +++ b/game/src/main/java/com/ccsens/game/api/ClientController.java @@ -2,13 +2,13 @@ package com.ccsens.game.api; import com.ccsens.cloudutil.annotation.MustLogin; import com.ccsens.game.bean.dto.ClientDto; -import com.ccsens.game.bean.dto.ScreenDto; import com.ccsens.game.bean.vo.ClientVo; import com.ccsens.game.bean.vo.ScreenVo; import com.ccsens.game.service.IClientService; import com.ccsens.game.service.IScreenService; import com.ccsens.util.JsonResponse; import com.ccsens.util.bean.dto.QueryDto; +import com.github.pagehelper.PageInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; @@ -30,13 +30,26 @@ public class ClientController { @Autowired private IScreenService screenService; + + @ApiOperation(value = "查看组内排行榜", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "groupMembers", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> groupMembers(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + log.info("查看组内排行榜:{}",params); + PageInfo rankingAll = clientService.groupMembers(params.getParam()); + log.info("查询组内排行榜结束"); + return JsonResponse.newInstance().ok(rankingAll); + } + @ApiOperation(value = "查看全部排行榜", notes = "") @ApiImplicitParams({ }) @RequestMapping(value = "members", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse startAgain(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + public JsonResponse members(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { log.info("查看全部排行榜:{}",params); ClientVo.RankingAll rankingAll = clientService.getRankingAll(params); + log.info("查询排行榜结束"); return JsonResponse.newInstance().ok(rankingAll); } @@ -46,8 +59,9 @@ public class ClientController { }) @RequestMapping(value = "joinGame", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse joinGame(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { - log.info("查看全部排行榜:{}",params); + log.info("参加游戏:{}",params); ClientVo.Join join = clientService.join(params.getParam(), params.getUserId()); + log.info("参加游戏结果:{}", join); return JsonResponse.newInstance().ok(join); } @@ -57,7 +71,6 @@ public class ClientController { @RequestMapping(value = "activityRule", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse> getGameActivityRule(@ApiParam @RequestParam Long recordId) throws Exception { log.info("获取游戏规则:{}",recordId); - List gameActivityRule = screenService.getGameActivityRule(screenService.getGameTypeId(recordId)); return JsonResponse.newInstance().ok(gameActivityRule); } @@ -89,6 +102,7 @@ public class ClientController { public JsonResponse> getGroupByRecordId(@ApiParam @RequestParam Long recordId) throws Exception { log.info("根据游戏id获取分组信息:{}",recordId); List groupList = screenService.getGroupByRecordId(recordId); + log.info("分组查询结束"); return JsonResponse.newInstance().ok(groupList); } @@ -97,8 +111,9 @@ public class ClientController { }) @RequestMapping(value = "task", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse getRecordByTaskId(@ApiParam @RequestParam Long taskId,String gameType) throws Exception { - log.info("根据游戏id获取分组信息:{}",taskId); + log.info("根据任务id获取游戏记录id:{}",taskId); ScreenVo.RecordInfo recordInfo = screenService.getRecordByTaskId(taskId,gameType); + log.info("游戏信息:{}", recordInfo); return JsonResponse.newInstance().ok(recordInfo); } } diff --git a/game/src/main/java/com/ccsens/game/api/ScreenController.java b/game/src/main/java/com/ccsens/game/api/ScreenController.java index ac0d4440..1b1523ae 100644 --- a/game/src/main/java/com/ccsens/game/api/ScreenController.java +++ b/game/src/main/java/com/ccsens/game/api/ScreenController.java @@ -7,23 +7,30 @@ import com.ccsens.game.bean.vo.ScreenVo; import com.ccsens.game.service.IScreenService; import com.ccsens.util.JsonResponse; import com.ccsens.util.bean.dto.QueryDto; -import io.swagger.annotations.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; +import javax.annotation.Resource; +import java.util.List; +/** + * 大屏相关接口 + * @author zy + */ @Slf4j @Api(tags = "大屏相关api" , description = "ScreenController") @RestController @RequestMapping("/screen") public class ScreenController { - @Autowired + @Resource private IScreenService screenService; @MustLogin @@ -76,4 +83,26 @@ public class ScreenController { return JsonResponse.newInstance().ok(url); } + @Login + @ApiOperation(value = "手机端再玩一次", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "startAgainByPhone", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse startAgainByPhone(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + log.info("手机端再玩一次:{}",params); + Long recordId = screenService.startAgainByPhone(params); + return JsonResponse.newInstance().ok(recordId); + } + + @Login + @ApiOperation(value = "自定义游戏时查询游戏配置信息excel", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/config", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getConfig(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + log.info("查询游戏配置信息excel:{}",params); + List url = screenService.getConfig(params); + return JsonResponse.newInstance().ok(url); + } + } diff --git a/game/src/main/java/com/ccsens/game/bean/dto/ClientDto.java b/game/src/main/java/com/ccsens/game/bean/dto/ClientDto.java index 359d82d4..cdbcb83b 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/ClientDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/ClientDto.java @@ -23,9 +23,9 @@ public class ClientDto { @NotNull(message = "请选择的时间") @ApiModelProperty("本地时间") private Long localTime; - @ApiModelProperty - @NotNull(message = "请选择项目") - private Long projectId; +// @ApiModelProperty("不再传参") +// @NotNull(message = "请选择项目") +// private Long projectId; @ApiModelProperty("分组id,不是分组游戏则为空") private Long groupId; } @@ -70,5 +70,16 @@ public class ClientDto { private int pageSize; } + @Data + @ApiModel("getRanking") + public static class GroupRanking{ + @ApiModelProperty("分组id") + private Long groupId; + @ApiModelProperty("页数") + private int pageNum; + @ApiModelProperty("每页多少条") + private int pageSize; + } + } diff --git a/game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java b/game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java index 74579bff..a5b391b9 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java @@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; @Data @@ -35,6 +36,14 @@ public class ScreenDto { private Long projectId; } + @Data + @ApiModel("手机端再玩一次") + public static class StartAgainByPhone{ + @NotEmpty + @ApiModelProperty("游戏类型") + private String gameType; + } + @Data @ApiModel public static class MemberRecordAndTime{ @@ -57,5 +66,16 @@ public class ScreenDto { private Byte startStatus; } + @Data + @ApiModel("查看配置文件") + public static class GetConfig{ + @NotNull + @ApiModelProperty("任务id") + private Long taskId; + @NotNull + @ApiModelProperty("要创建的小游戏的类型 例如: SQ:数钱 SP:赛跑 BH:拔河") + private String gameType; + } + } diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/AckMessageDto.java b/game/src/main/java/com/ccsens/game/bean/dto/message/AckMessageDto.java index a17ca984..c301eee5 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/AckMessageDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/AckMessageDto.java @@ -7,8 +7,7 @@ import lombok.Setter; @Data public class AckMessageDto extends BaseMessageDto { - @Setter - @Getter + @lombok.Data public static class Data { Long msgId; } diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/AuthMessageDto.java b/game/src/main/java/com/ccsens/game/bean/dto/message/AuthMessageDto.java index 8e68d42b..d691445c 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/AuthMessageDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/AuthMessageDto.java @@ -2,14 +2,12 @@ package com.ccsens.game.bean.dto.message; import com.ccsens.util.WebConstant; import lombok.Data; -import lombok.Getter; -import lombok.Setter; @Data public class AuthMessageDto extends BaseMessageDto { - @Setter - @Getter + @lombok.Data public static class Data{ + //游戏id private String id; private String userId; private String channelId; diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/AuthMessageWithAnswerDto.java b/game/src/main/java/com/ccsens/game/bean/dto/message/AuthMessageWithAnswerDto.java index 386d7827..e9c879b1 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/AuthMessageWithAnswerDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/AuthMessageWithAnswerDto.java @@ -7,8 +7,7 @@ import lombok.Setter; @Data public class AuthMessageWithAnswerDto extends BaseMessageDto{ - @Setter - @Getter + @lombok.Data public static class Data{ private Boolean success; private String phase; diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/BaseMessageDto.java b/game/src/main/java/com/ccsens/game/bean/dto/message/BaseMessageDto.java index c67ac7d7..52d0557c 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/BaseMessageDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/BaseMessageDto.java @@ -1,8 +1,13 @@ package com.ccsens.game.bean.dto.message; +import cn.hutool.core.collection.CollectionUtil; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.util.bean.message.common.InMessage; import lombok.Data; +import java.util.HashSet; import java.util.List; +import java.util.Set; @Data public class BaseMessageDto { @@ -32,4 +37,17 @@ public class BaseMessageDto { private MessageUser sender; private List receivers; // private Object data; + + public Set receiversTransTos() { + Set tos = new HashSet<>(); + if (CollectionUtil.isEmpty(receivers)) { + return tos; + } + receivers.forEach(receiver -> { + InMessage.To to = new InMessage.To(receiver.getUserId()); + tos.add(JSONObject.toJSONString(to)); + }); + + return tos; + } } diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/ChromeMessageDto.java b/game/src/main/java/com/ccsens/game/bean/dto/message/ChromeMessageDto.java index ae294814..1e5a2bc9 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/ChromeMessageDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/ChromeMessageDto.java @@ -10,8 +10,7 @@ import lombok.Setter; */ @Data public class ChromeMessageDto extends BaseMessageDto{ - @Setter - @Getter + @lombok.Data public static class Data{ private Long projectId; private Long recordId; diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageCountOut.java b/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageCountOut.java index e093c701..986ce9e4 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageCountOut.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageCountOut.java @@ -2,12 +2,9 @@ package com.ccsens.game.bean.dto.message; import com.ccsens.util.WebConstant; import lombok.Data; -import lombok.Getter; -import lombok.Setter; @Data public class GameMessageCountOut extends BaseMessageDto { - @Setter - @Getter + @lombok.Data public static class Data{ private int totalTimes; private int totalScore; diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageWithChangeStatusIn.java b/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageWithChangeStatusIn.java index ef6a4426..980f0663 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageWithChangeStatusIn.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageWithChangeStatusIn.java @@ -7,8 +7,7 @@ import lombok.Setter; @Data public class GameMessageWithChangeStatusIn extends BaseMessageDto{ - @Setter - @Getter + @lombok.Data public static class Data{ private String recordId; private int gameStatus; diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageWithGetUrlDto.java b/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageWithGetUrlDto.java index 6688cd46..78717b3e 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageWithGetUrlDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/GameMessageWithGetUrlDto.java @@ -7,8 +7,7 @@ import lombok.Setter; @Data public class GameMessageWithGetUrlDto extends BaseMessageDto { - @Setter - @Getter + @lombok.Data public static class Data{ private Long recordId; private String url; diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/HeartMessageDto.java b/game/src/main/java/com/ccsens/game/bean/dto/message/HeartMessageDto.java index bd19b18a..9e3a7e51 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/HeartMessageDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/HeartMessageDto.java @@ -7,8 +7,7 @@ import lombok.Setter; @Data public class HeartMessageDto extends BaseMessageDto{ - @Setter - @Getter + @lombok.Data public static class Data{ private int major; private int minor; diff --git a/game/src/main/java/com/ccsens/game/bean/dto/message/PPTCtlMessageDto.java b/game/src/main/java/com/ccsens/game/bean/dto/message/PPTCtlMessageDto.java index 3ba14032..cf5c8d31 100644 --- a/game/src/main/java/com/ccsens/game/bean/dto/message/PPTCtlMessageDto.java +++ b/game/src/main/java/com/ccsens/game/bean/dto/message/PPTCtlMessageDto.java @@ -2,16 +2,13 @@ package com.ccsens.game.bean.dto.message; import com.ccsens.util.WebConstant; import lombok.Data; -import lombok.Getter; -import lombok.Setter; /** * @author __zHangSan */ @Data public class PPTCtlMessageDto extends BaseMessageDto{ - @Setter - @Getter + @lombok.Data public static class Data{ /** * Supported Operation: up,down,begin,end diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameGroup.java b/game/src/main/java/com/ccsens/game/bean/po/GameGroup.java index 64b5aaf4..5a2af7b5 100644 --- a/game/src/main/java/com/ccsens/game/bean/po/GameGroup.java +++ b/game/src/main/java/com/ccsens/game/bean/po/GameGroup.java @@ -18,6 +18,8 @@ public class GameGroup implements Serializable { private Byte recStatus; + private String headPortraitUrl; + private static final long serialVersionUID = 1L; public Long getId() { @@ -76,6 +78,14 @@ public class GameGroup implements Serializable { this.recStatus = recStatus; } + public String getHeadPortraitUrl() { + return headPortraitUrl; + } + + public void setHeadPortraitUrl(String headPortraitUrl) { + this.headPortraitUrl = headPortraitUrl == null ? null : headPortraitUrl.trim(); + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -89,6 +99,7 @@ public class GameGroup implements Serializable { sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); + sb.append(", headPortraitUrl=").append(headPortraitUrl); sb.append("]"); return sb.toString(); } diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameGroupExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameGroupExample.java index 8af717a2..2df4e0f8 100644 --- a/game/src/main/java/com/ccsens/game/bean/po/GameGroupExample.java +++ b/game/src/main/java/com/ccsens/game/bean/po/GameGroupExample.java @@ -544,6 +544,76 @@ public class GameGroupExample { addCriterion("rec_status not between", value1, value2, "recStatus"); return (Criteria) this; } + + public Criteria andHeadPortraitUrlIsNull() { + addCriterion("head_portrait_url is null"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlIsNotNull() { + addCriterion("head_portrait_url is not null"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlEqualTo(String value) { + addCriterion("head_portrait_url =", value, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlNotEqualTo(String value) { + addCriterion("head_portrait_url <>", value, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlGreaterThan(String value) { + addCriterion("head_portrait_url >", value, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlGreaterThanOrEqualTo(String value) { + addCriterion("head_portrait_url >=", value, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlLessThan(String value) { + addCriterion("head_portrait_url <", value, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlLessThanOrEqualTo(String value) { + addCriterion("head_portrait_url <=", value, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlLike(String value) { + addCriterion("head_portrait_url like", value, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlNotLike(String value) { + addCriterion("head_portrait_url not like", value, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlIn(List values) { + addCriterion("head_portrait_url in", values, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlNotIn(List values) { + addCriterion("head_portrait_url not in", values, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlBetween(String value1, String value2) { + addCriterion("head_portrait_url between", value1, value2, "headPortraitUrl"); + return (Criteria) this; + } + + public Criteria andHeadPortraitUrlNotBetween(String value1, String value2) { + addCriterion("head_portrait_url not between", value1, value2, "headPortraitUrl"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameRecord.java b/game/src/main/java/com/ccsens/game/bean/po/GameRecord.java index 6c7029ce..2dce49ad 100644 --- a/game/src/main/java/com/ccsens/game/bean/po/GameRecord.java +++ b/game/src/main/java/com/ccsens/game/bean/po/GameRecord.java @@ -28,6 +28,14 @@ public class GameRecord implements Serializable { private Byte recStatus; + private Byte gameGroup; + + private Integer duration; + + private Integer memberLimit; + + private Byte rankRule; + private static final long serialVersionUID = 1L; public Long getId() { @@ -126,6 +134,38 @@ public class GameRecord implements Serializable { this.recStatus = recStatus; } + public Byte getGameGroup() { + return gameGroup; + } + + public void setGameGroup(Byte gameGroup) { + this.gameGroup = gameGroup; + } + + public Integer getDuration() { + return duration; + } + + public void setDuration(Integer duration) { + this.duration = duration; + } + + public Integer getMemberLimit() { + return memberLimit; + } + + public void setMemberLimit(Integer memberLimit) { + this.memberLimit = memberLimit; + } + + public Byte getRankRule() { + return rankRule; + } + + public void setRankRule(Byte rankRule) { + this.rankRule = rankRule; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -144,6 +184,10 @@ public class GameRecord implements Serializable { sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); + sb.append(", gameGroup=").append(gameGroup); + sb.append(", duration=").append(duration); + sb.append(", memberLimit=").append(memberLimit); + sb.append(", rankRule=").append(rankRule); sb.append("]"); return sb.toString(); } diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java index 59c7d207..45abf3b6 100644 --- a/game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java +++ b/game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java @@ -844,6 +844,246 @@ public class GameRecordExample { addCriterion("rec_status not between", value1, value2, "recStatus"); return (Criteria) this; } + + public Criteria andGameGroupIsNull() { + addCriterion("game_group is null"); + return (Criteria) this; + } + + public Criteria andGameGroupIsNotNull() { + addCriterion("game_group is not null"); + return (Criteria) this; + } + + public Criteria andGameGroupEqualTo(Byte value) { + addCriterion("game_group =", value, "gameGroup"); + return (Criteria) this; + } + + public Criteria andGameGroupNotEqualTo(Byte value) { + addCriterion("game_group <>", value, "gameGroup"); + return (Criteria) this; + } + + public Criteria andGameGroupGreaterThan(Byte value) { + addCriterion("game_group >", value, "gameGroup"); + return (Criteria) this; + } + + public Criteria andGameGroupGreaterThanOrEqualTo(Byte value) { + addCriterion("game_group >=", value, "gameGroup"); + return (Criteria) this; + } + + public Criteria andGameGroupLessThan(Byte value) { + addCriterion("game_group <", value, "gameGroup"); + return (Criteria) this; + } + + public Criteria andGameGroupLessThanOrEqualTo(Byte value) { + addCriterion("game_group <=", value, "gameGroup"); + return (Criteria) this; + } + + public Criteria andGameGroupIn(List values) { + addCriterion("game_group in", values, "gameGroup"); + return (Criteria) this; + } + + public Criteria andGameGroupNotIn(List values) { + addCriterion("game_group not in", values, "gameGroup"); + return (Criteria) this; + } + + public Criteria andGameGroupBetween(Byte value1, Byte value2) { + addCriterion("game_group between", value1, value2, "gameGroup"); + return (Criteria) this; + } + + public Criteria andGameGroupNotBetween(Byte value1, Byte value2) { + addCriterion("game_group not between", value1, value2, "gameGroup"); + return (Criteria) this; + } + + public Criteria andDurationIsNull() { + addCriterion("duration is null"); + return (Criteria) this; + } + + public Criteria andDurationIsNotNull() { + addCriterion("duration is not null"); + return (Criteria) this; + } + + public Criteria andDurationEqualTo(Integer value) { + addCriterion("duration =", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotEqualTo(Integer value) { + addCriterion("duration <>", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThan(Integer value) { + addCriterion("duration >", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("duration >=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThan(Integer value) { + addCriterion("duration <", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThanOrEqualTo(Integer value) { + addCriterion("duration <=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationIn(List values) { + addCriterion("duration in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotIn(List values) { + addCriterion("duration not in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationBetween(Integer value1, Integer value2) { + addCriterion("duration between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotBetween(Integer value1, Integer value2) { + addCriterion("duration not between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andMemberLimitIsNull() { + addCriterion("member_limit is null"); + return (Criteria) this; + } + + public Criteria andMemberLimitIsNotNull() { + addCriterion("member_limit is not null"); + return (Criteria) this; + } + + public Criteria andMemberLimitEqualTo(Integer value) { + addCriterion("member_limit =", value, "memberLimit"); + return (Criteria) this; + } + + public Criteria andMemberLimitNotEqualTo(Integer value) { + addCriterion("member_limit <>", value, "memberLimit"); + return (Criteria) this; + } + + public Criteria andMemberLimitGreaterThan(Integer value) { + addCriterion("member_limit >", value, "memberLimit"); + return (Criteria) this; + } + + public Criteria andMemberLimitGreaterThanOrEqualTo(Integer value) { + addCriterion("member_limit >=", value, "memberLimit"); + return (Criteria) this; + } + + public Criteria andMemberLimitLessThan(Integer value) { + addCriterion("member_limit <", value, "memberLimit"); + return (Criteria) this; + } + + public Criteria andMemberLimitLessThanOrEqualTo(Integer value) { + addCriterion("member_limit <=", value, "memberLimit"); + return (Criteria) this; + } + + public Criteria andMemberLimitIn(List values) { + addCriterion("member_limit in", values, "memberLimit"); + return (Criteria) this; + } + + public Criteria andMemberLimitNotIn(List values) { + addCriterion("member_limit not in", values, "memberLimit"); + return (Criteria) this; + } + + public Criteria andMemberLimitBetween(Integer value1, Integer value2) { + addCriterion("member_limit between", value1, value2, "memberLimit"); + return (Criteria) this; + } + + public Criteria andMemberLimitNotBetween(Integer value1, Integer value2) { + addCriterion("member_limit not between", value1, value2, "memberLimit"); + return (Criteria) this; + } + + public Criteria andRankRuleIsNull() { + addCriterion("rank_rule is null"); + return (Criteria) this; + } + + public Criteria andRankRuleIsNotNull() { + addCriterion("rank_rule is not null"); + return (Criteria) this; + } + + public Criteria andRankRuleEqualTo(Byte value) { + addCriterion("rank_rule =", value, "rankRule"); + return (Criteria) this; + } + + public Criteria andRankRuleNotEqualTo(Byte value) { + addCriterion("rank_rule <>", value, "rankRule"); + return (Criteria) this; + } + + public Criteria andRankRuleGreaterThan(Byte value) { + addCriterion("rank_rule >", value, "rankRule"); + return (Criteria) this; + } + + public Criteria andRankRuleGreaterThanOrEqualTo(Byte value) { + addCriterion("rank_rule >=", value, "rankRule"); + return (Criteria) this; + } + + public Criteria andRankRuleLessThan(Byte value) { + addCriterion("rank_rule <", value, "rankRule"); + return (Criteria) this; + } + + public Criteria andRankRuleLessThanOrEqualTo(Byte value) { + addCriterion("rank_rule <=", value, "rankRule"); + return (Criteria) this; + } + + public Criteria andRankRuleIn(List values) { + addCriterion("rank_rule in", values, "rankRule"); + return (Criteria) this; + } + + public Criteria andRankRuleNotIn(List values) { + addCriterion("rank_rule not in", values, "rankRule"); + return (Criteria) this; + } + + public Criteria andRankRuleBetween(Byte value1, Byte value2) { + addCriterion("rank_rule between", value1, value2, "rankRule"); + return (Criteria) this; + } + + public Criteria andRankRuleNotBetween(Byte value1, Byte value2) { + addCriterion("rank_rule not between", value1, value2, "rankRule"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/game/src/main/java/com/ccsens/game/bean/vo/ClientVo.java b/game/src/main/java/com/ccsens/game/bean/vo/ClientVo.java index 643183fd..996fae95 100644 --- a/game/src/main/java/com/ccsens/game/bean/vo/ClientVo.java +++ b/game/src/main/java/com/ccsens/game/bean/vo/ClientVo.java @@ -59,6 +59,10 @@ public class ClientVo { private Long startLocalTime; @ApiModelProperty("客户端结束时间") private Long endLocalTime; + @ApiModelProperty("玩家当前的分数") + private int score = 0; + @ApiModelProperty("玩家当前的次数") + private int times = 0; } @Data @ApiModel("ClientVoCompletedData") @@ -85,6 +89,23 @@ public class ClientVo { private Integer groupSort; } + @Data + @ApiModel("分组的信息") + public static class GroupVo{ + @ApiModelProperty("分组的id") + private Long groupId; + @ApiModelProperty("分组的名称") + private String groupName; + @ApiModelProperty("头像") + private String headPortraitUrl; + @ApiModelProperty("该组的总分/均分") + private int groupScore; + @ApiModelProperty("该组总次数") + private int groupTimes; + @ApiModelProperty("code") + private String code; + } + @Data @ApiModel("RankingAll") public static class RankingAll{ diff --git a/game/src/main/java/com/ccsens/game/bean/vo/ScreenVo.java b/game/src/main/java/com/ccsens/game/bean/vo/ScreenVo.java index 47425452..6d1d75f4 100644 --- a/game/src/main/java/com/ccsens/game/bean/vo/ScreenVo.java +++ b/game/src/main/java/com/ccsens/game/bean/vo/ScreenVo.java @@ -1,11 +1,9 @@ package com.ccsens.game.bean.vo; -import com.ccsens.game.bean.po.GameUserJoin; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import javax.validation.constraints.NotNull; import java.util.List; @Data @@ -13,7 +11,7 @@ public class ScreenVo { @Data @ApiModel public static class UrlVo{ - @ApiModelProperty("大屏的路径") + @ApiModelProperty("游戏的id") private Long id; @ApiModelProperty("大屏的路径") private String url; @@ -26,6 +24,8 @@ public class ScreenVo { public static class GameInfoVo{ @ApiModelProperty("二维码路径") private String QRCodeUrl; + @ApiModelProperty("游戏时长") + private int time; @ApiModelProperty("游戏状态 0未开始 1准备中 2进行中 3已结束") private Byte gameStatus; @ApiModelProperty("可玩总次数") @@ -33,9 +33,9 @@ public class ScreenVo { @ApiModelProperty("已用次数") private int usedCount ; @ApiModelProperty("总人数") - private int totalMembers ; + private int totalMembers; @ApiModelProperty("分组信息") - private List groups ; + private List groups; @ApiModelProperty("未开始") private PendingData pendingData; @@ -55,6 +55,8 @@ public class ScreenVo { private Long groupId ; @ApiModelProperty("分组名称") private String groupName ; + @ApiModelProperty("头像") + private String headPortraitUrl; @ApiModelProperty("该组参赛总人数") private int totalGroupMembers ; } @@ -92,8 +94,10 @@ public class ScreenVo { private int totalTimes; @ApiModelProperty("总分数") private int totalScore; - @ApiModelProperty("平均每人多少分") + @ApiModelProperty("平均每人多少次") private int averageTimes; + @ApiModelProperty("平均多少分") + private int averageScore; @ApiModelProperty("平均次数超过百分之多少人") private int over; @ApiModelProperty("总人数") @@ -156,14 +160,24 @@ public class ScreenVo { private Long groupId; @ApiModelProperty("分组的名称") private String groupName; + @ApiModelProperty("头像") + private String headPortraitUrl; + @ApiModelProperty("该组的总分/均分") + private Integer score; + @ApiModelProperty("该组的总次数/均次数") + private Integer times; @ApiModelProperty("该组的总分") - private int score; - @ApiModelProperty("该组总人数") - private int totalMembers; + private Integer totalScore; + @ApiModelProperty("该组的总次数") + private Integer totalTimes; @ApiModelProperty("该组总人数") + private Integer totalMembers; + @ApiModelProperty("code") private String code; } + + @Data @ApiModel public static class RecordInfo{ diff --git a/game/src/main/java/com/ccsens/game/config/SpringConfig.java b/game/src/main/java/com/ccsens/game/config/SpringConfig.java index b6dcd3b5..6a41894d 100644 --- a/game/src/main/java/com/ccsens/game/config/SpringConfig.java +++ b/game/src/main/java/com/ccsens/game/config/SpringConfig.java @@ -78,12 +78,12 @@ public class SpringConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { - registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS"); + registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") // .allowedMethods("*") // 允许提交请求的方法,*表示全部允许 -// .allowedOrigins("*") // #允许向该服务器提交请求的URI,*表示全部允许 -// .allowCredentials(true) // 允许cookies跨域 -// .allowedHeaders("*") // #允许访问的头信息,*表示全部 -// .maxAge(18000L); // 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了 + .allowedOrigins("*") // #允许向该服务器提交请求的URI,*表示全部允许 + .allowCredentials(true) // 允许cookies跨域 + .allowedHeaders("*") // #允许访问的头信息,*表示全部 + .maxAge(18000L); // 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了 } @@ -116,7 +116,7 @@ public class SpringConfig implements WebMvcConfigurer { .addResourceLocations("classpath:/META-INF/resources/webjars/"); registry.addResourceHandler("/uploads/**") - .addResourceLocations("file:///home/cloud/tall/uploads/"); + .addResourceLocations("file:///home/cloud/game/uploads/"); //super.addResourceHandlers(registry); } diff --git a/game/src/main/java/com/ccsens/game/mq/GameDto.java b/game/src/main/java/com/ccsens/game/mq/GameDto.java new file mode 100644 index 00000000..1bcabcaf --- /dev/null +++ b/game/src/main/java/com/ccsens/game/mq/GameDto.java @@ -0,0 +1,17 @@ +package com.ccsens.game.mq; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * @description: + * @author: whj + * @time: 2020/6/5 16:19 + */ +@ApiModel("游戏相关的参数") +public class GameDto { + @Data + public static class GameMsg{ + private Long recordId; + } +} diff --git a/game/src/main/java/com/ccsens/game/mq/GameScoreListener.java b/game/src/main/java/com/ccsens/game/mq/GameScoreListener.java new file mode 100644 index 00000000..ccb4a5fd --- /dev/null +++ b/game/src/main/java/com/ccsens/game/mq/GameScoreListener.java @@ -0,0 +1,106 @@ +package com.ccsens.game.mq; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.game.bean.dto.ClientDto; +import com.ccsens.game.bean.dto.message.GameMessageCountOut; +import com.ccsens.game.util.GameConstant; +import com.ccsens.util.RedisUtil; +import com.ccsens.util.bean.message.common.InMessage; +import com.ccsens.util.bean.message.common.MessageConstant; +import com.ccsens.util.bean.message.common.OutMessage; +import com.ccsens.util.bean.message.common.OutMessageSet; +import com.ccsens.util.config.RabbitMQConfig; +import lombok.extern.slf4j.Slf4j; +import org.springframework.amqp.core.AmqpTemplate; +import org.springframework.amqp.rabbit.annotation.RabbitHandler; +import org.springframework.amqp.rabbit.annotation.RabbitListener; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.ZSetOperations; +import org.springframework.stereotype.Component; + +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * @description: + * @author: whj + * @time: 2020/6/5 14:30 + */ +@Slf4j +@Component +@RabbitListener(queues = RabbitMQConfig.GAME_SCORE) +public class GameScoreListener { + + @Autowired + private RedisUtil redisUtil; + @Autowired + private AmqpTemplate rabbitTemplate; + + @RabbitHandler + public void process(String messageJson) throws IOException { + log.info("计算分数 {}",messageJson); + OutMessageSet outMessageSet = JSONObject.parseObject(messageJson, OutMessageSet.class); + Set messageSet = outMessageSet.getMessageSet(); + if (CollectionUtil.isEmpty(messageSet)) { + return; + } + messageSet.forEach(outMessage -> { + + InMessage.To to = JSONObject.parseObject(outMessage.getFrom(), InMessage.To.class); + Long userId = to.getId(); + GameDto.GameMsg gameMsg = JSONObject.parseObject(outMessage.getData(), GameDto.GameMsg.class); + Long recordId = gameMsg.getRecordId(); + log.info("统计分数:{},{}",userId, recordId); + GameMessageCountOut gameMessageCountOut = clientAddTimes(userId,recordId); + + // 发送给消息系统 + InMessage inMessage = new InMessage(); + Set tos = new HashSet<>(); + tos.add(JSONObject.toJSONString(new InMessage.To(userId))); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(tos); + inMessage.setData(JSONObject.toJSONString(gameMessageCountOut)); +// rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, inMessage); + rabbitTemplate.convertAndSend(RabbitMQConfig.GAME_SCORE, inMessage); + }); + + } + + public GameMessageCountOut clientAddTimes(Long userId, Long recordId) { + GameMessageCountOut gameMessageCountOut = new GameMessageCountOut(); + log.info("userId:{}", userId); + if (userId == null || recordId == null) { + return gameMessageCountOut; + } + + String gameUserKey = GameConstant.generateGameKey(recordId); + Set> typedTuples = redisUtil.zsRevGetWithScore(gameUserKey, 0, -1); + + if (CollectionUtil.isEmpty(typedTuples)) { + return gameMessageCountOut; + } + for(ZSetOperations.TypedTuple type : typedTuples) { + ClientDto.RedisUser user = JSON.parseObject((String)type.getValue(), ClientDto.RedisUser.class); + if (user.getUserId().longValue() == userId.longValue()) { + int score = type.getScore().intValue(); + String userStatus = GameConstant.generateGameStatusKey(recordId); + String gameStausObj = (String)redisUtil.get(userStatus); + if (StrUtil.isBlank(gameStausObj) || gameStausObj.equals(String.valueOf(GameConstant.GAME_COMPLETED))){ + gameMessageCountOut = new GameMessageCountOut(score/100, score); + return gameMessageCountOut; + } + score += 100; + redisUtil.zsSet(gameUserKey, JSON.toJSONString(user), score); + gameMessageCountOut.getData().setTotalScore(score); + gameMessageCountOut.getData().setTotalTimes(score/100); + return gameMessageCountOut; + } + } + + return gameMessageCountOut; + } +} diff --git a/game/src/main/java/com/ccsens/game/netty/ChannelManager.java b/game/src/main/java/com/ccsens/game/netty/ChannelManager.java index 0308e9d6..c1453616 100644 --- a/game/src/main/java/com/ccsens/game/netty/ChannelManager.java +++ b/game/src/main/java/com/ccsens/game/netty/ChannelManager.java @@ -386,7 +386,7 @@ public class ChannelManager { } public static String getRecordIdByChannel(Channel channel) { - System.out.println(rawChannels.containsKey(channel) ? rawChannels.get(channel).getRecordId() : null); + log.info(rawChannels.containsKey(channel) ? rawChannels.get(channel).getRecordId() : null); return rawChannels.containsKey(channel) ? rawChannels.get(channel).getRecordId() : null; } } diff --git a/game/src/main/java/com/ccsens/game/netty/wsserver/WebSocketDecoder.java b/game/src/main/java/com/ccsens/game/netty/wsserver/WebSocketDecoder.java index e343a2da..76c43f54 100644 --- a/game/src/main/java/com/ccsens/game/netty/wsserver/WebSocketDecoder.java +++ b/game/src/main/java/com/ccsens/game/netty/wsserver/WebSocketDecoder.java @@ -6,6 +6,7 @@ import com.ccsens.util.WebConstant; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToMessageDecoder; import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; +import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -15,6 +16,7 @@ import java.util.List; /** * @author wei */ +@Slf4j public class WebSocketDecoder extends MessageToMessageDecoder { private static Logger logger = LoggerFactory.getLogger(WebSocketDecoder.class); @@ -37,7 +39,7 @@ protected void decode(ChannelHandlerContext channelHandlerContext, TextWebSocket String text = msg.text(); BaseMessageDto baseMessage = JacksonUtil.jsonToBean(text,BaseMessageDto.class); WebConstant.Message_Type type = WebConstant.Message_Type.phaseOf(baseMessage.getType()); - System.out.println(text); + log.info(text); switch (type){ case Heart: { out.add(JacksonUtil.jsonToBean(text, HeartMessageDto.class)); diff --git a/game/src/main/java/com/ccsens/game/netty/wsserver/WebSocketHandler.java b/game/src/main/java/com/ccsens/game/netty/wsserver/WebSocketHandler.java index f11c04ec..83397e2b 100644 --- a/game/src/main/java/com/ccsens/game/netty/wsserver/WebSocketHandler.java +++ b/game/src/main/java/com/ccsens/game/netty/wsserver/WebSocketHandler.java @@ -4,8 +4,11 @@ package com.ccsens.game.netty.wsserver; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.ccsens.game.bean.dto.ClientDto; import com.ccsens.game.bean.dto.message.*; +import com.ccsens.game.bean.po.GameGroup; +import com.ccsens.game.bean.po.GameRecord; import com.ccsens.game.netty.ChannelManager; import com.ccsens.game.service.IClientService; import com.ccsens.game.service.IMessageService; @@ -91,7 +94,7 @@ public class WebSocketHandler extends SimpleChannelInboundHandler> typedTuples = redisUtil.zsRevGetWithScore(gameUserKey, 0, -1); @@ -163,14 +173,22 @@ public class WebSocketHandler extends SimpleChannelInboundHandler objectSet = redisUtil.zsGet(groupKey, 0, -1); + objectSet.forEach(o -> { + GameGroup gameGroup = JSONObject.parseObject((String) o, GameGroup.class); + if(gameGroup.getId().longValue() == user.getGroupId().longValue()){ + Double o1 = (Double)redisUtil.zsGetScore(groupKey, o); + redisUtil.zsSet(groupKey, o, o1 + 100,600); + } + }); gameMessageCountOut.getData().setTotalScore(score); gameMessageCountOut.getData().setTotalTimes(score/100); return gameMessageCountOut; diff --git a/game/src/main/java/com/ccsens/game/persist/dao/GameGroupDao.java b/game/src/main/java/com/ccsens/game/persist/dao/GameGroupDao.java index 5db0a980..24892185 100644 --- a/game/src/main/java/com/ccsens/game/persist/dao/GameGroupDao.java +++ b/game/src/main/java/com/ccsens/game/persist/dao/GameGroupDao.java @@ -1,9 +1,36 @@ package com.ccsens.game.persist.dao; import com.ccsens.game.bean.po.GameGroup; +import com.ccsens.game.bean.vo.ClientVo; +import com.ccsens.game.bean.vo.ScreenVo; import com.ccsens.game.persist.mapper.GameGroupMapper; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; +import java.util.List; + @Repository public interface GameGroupDao extends GameGroupMapper { + /** + * 查询分组信息 + * @param id 游戏ID + * @return 分组信息 + */ + List queryGroups(@Param("gameId") Long id); + + /** + * 查询各组分数,次数 + * @param groupId 分组ID + * @param gameId 游戏ID + * @param rankRule 排序规则 + * @return 分组分数,次数 + */ + List queryScores(@Param("groupId") long groupId, @Param("gameId") long gameId, @Param("rankRule") byte rankRule); + + /** + * 查询组内成员排名 + * @param groupId 组ID + * @return 成员信息 + */ + List groupMemberRank(@Param("groupId") Long groupId); } diff --git a/game/src/main/java/com/ccsens/game/service/ClientService.java b/game/src/main/java/com/ccsens/game/service/ClientService.java index 4a5e3056..8eab45d5 100644 --- a/game/src/main/java/com/ccsens/game/service/ClientService.java +++ b/game/src/main/java/com/ccsens/game/service/ClientService.java @@ -8,27 +8,33 @@ import com.alibaba.fastjson.JSON; import com.ccsens.cloudutil.bean.tall.vo.MemberVo; import com.ccsens.cloudutil.feign.TallFeignClient; import com.ccsens.game.bean.dto.ClientDto; -import com.ccsens.game.bean.dto.message.*; +import com.ccsens.game.bean.dto.message.GameMessageCountOut; import com.ccsens.game.bean.po.*; import com.ccsens.game.bean.vo.ClientVo; +import com.ccsens.game.bean.vo.ScreenVo; import com.ccsens.game.persist.dao.*; import com.ccsens.game.util.GameConstant; import com.ccsens.util.CodeEnum; import com.ccsens.util.JsonResponse; import com.ccsens.util.RedisUtil; +import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.util.exception.BaseException; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.ZSetOperations; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import com.ccsens.util.bean.dto.QueryDto; -import java.util.*; +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.concurrent.atomic.AtomicInteger; /** - * @description: + * @description: 游戏客户端接口 * @author: wuHuiJuan * @create: 2019/12/26 15:01 */ @@ -36,25 +42,25 @@ import java.util.*; @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ClientService implements IClientService { - @Autowired + @Resource private GameUserPayDao gameUserPayDao; - @Autowired + @Resource private GameTypeDao gameTypeDao; - @Autowired + @Resource private GameUserJoinDao gameUserJoinDao; - @Autowired + @Resource private GameUserJoinGroupDao gameUserJoinGroupDao; - @Autowired + @Resource private GameGroupDao gameGroupDao; - @Autowired + @Resource private GameUserJoinGroupDao userJoinGroupDao; - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private RedisUtil redisUtil; - @Autowired + @Resource private TallFeignClient tallFeignClient; - @Autowired + @Resource private IScreenService screenService; @@ -66,17 +72,27 @@ public class ClientService implements IClientService { log.info("{}时间差:{}", userId, timeMore); //获取游戏信息 GameRecord gameRecord = screenService.getGameRecord(join.getUrlId()); - //获取游戏的购买记录和类型 - GameUserPay gameUserPay = gameUserPayDao.selectByPrimaryKey(gameRecord.getUserPayId()); - GameType gameType = gameTypeDao.selectByPrimaryKey(gameUserPay.getGameTypeId()); - Boolean isGroup = gameType.getIsGroup() == 1; - - log.info("游戏信息:{}", gameRecord); if (gameRecord == null) { log.info("未找到游戏信息"); throw new BaseException(CodeEnum.PARAM_ERROR); } + boolean isGroup = gameRecord.getGameGroup() == GameConstant.GAME_GROUP; + + if (isGroup) { + if (ObjectUtil.isNull(join.getGroupId())) { + log.info("分组信息为空"); + throw new BaseException(CodeEnum.GROUP_NOT_CHOICE); + } + GameGroup gameGroup = gameGroupDao.selectByPrimaryKey(join.getGroupId()); + if(gameGroup == null || gameGroup.getRecordId().longValue() != join.getUrlId().longValue()){ + log.info("分组信息不正确,分组id:{},游戏id:{}",join.getGroupId(),join.getUrlId()); + throw new BaseException(CodeEnum.PARAM_ERROR); + } + } + //获取游戏的购买记录和类型 + // TODO 暂时没有购买相关的,先不查询 +// GameUserPay gameUserPay = gameUserPayDao.selectByPrimaryKey(gameRecord.getUserPayId()); //根据游戏ID和用户ID查询用户是否加入 GameUserJoinExample example = new GameUserJoinExample(); @@ -88,6 +104,7 @@ public class ClientService implements IClientService { return joinResult(gameUserJoins.get(0), gameRecord, isGroup, join.getGroupId()); } + //游戏已结束 if (gameRecord.getGameStatus().byteValue() == GameConstant.GAME_COMPLETED) { ClientVo.Join joinVo = initStatusAndCount(gameRecord); @@ -98,12 +115,26 @@ public class ClientService implements IClientService { completedData.setOver(0); if(isGroup){ - ClientVo.GroupScore groupScore = getGroupScore(join.getGroupId(),gameRecord.getId()); + ClientVo.GroupScore groupScore = getGroupScore(join.getGroupId(), gameRecord); +// getGroupScore(join.getGroupId(),gameRecord.getId()); completedData.setGroupScore(groupScore); } joinVo.setCompletedData(completedData); return joinVo; } + + // 判断是否达到组内上限 + if (isGroup) { + GameUserJoinGroupExample groupExample = new GameUserJoinGroupExample(); + groupExample.createCriteria().andGameGroupIdEqualTo(join.getGroupId()); + long count = gameUserJoinGroupDao.countByExample(groupExample); + log.info("组内人数:{},上限:{}", count, gameRecord.getMemberLimit()); + if (count >= gameRecord.getMemberLimit()) { + throw new BaseException(CodeEnum.GROUP_MEMBER_LIMIT); + } + } + + //准备中 boolean prepare = gameRecord.getGameStatus().byteValue() == GameConstant.GAME_PREPARATION; //进行中 @@ -119,11 +150,13 @@ public class ClientService implements IClientService { userJoin.setLocalStartTime(prepare || processing ? gameRecord.getStartTime() + timeMore : 0); userJoin.setLocalEndTime(prepare || processing ? gameRecord.getEndTime() + timeMore : 0); // 获取头像和用户名 - JsonResponse memberInfo = tallFeignClient.getMemberByUserId(userId, join.getProjectId()); - if (memberInfo.getData() == null) { - memberInfo = tallFeignClient.getUserByUserId(userId); - } - if (memberInfo.getCode().intValue() == CodeEnum.SUCCESS.getCode() && memberInfo.getData() != null) { +// JsonResponse memberInfo = tallFeignClient.getMemberInfoByUserIdAndTaskId(userId, gameRecord.getTaskId()); +// if (memberInfo.getData() == null) { +// memberInfo = tallFeignClient.getUserByUserId(userId); +// } + JsonResponse memberInfo = tallFeignClient.getUserByUserId(userId); + + if (memberInfo != null && memberInfo.getCode().intValue() == CodeEnum.SUCCESS.getCode().intValue() && memberInfo.getData() != null) { userJoin.setAvatarUrl(memberInfo.getData().getAvatarUrl()); userJoin.setNickname(memberInfo.getData().getNickname()); @@ -151,15 +184,16 @@ public class ClientService implements IClientService { gameUserJoinDao.insertSelective(userJoin); //如果是分组游戏,则添加用户与组的关联表 if (isGroup) { - if (ObjectUtil.isNull(join.getGroupId())) { - log.info("分组信息为空"); - throw new BaseException(CodeEnum.PARAM_ERROR); - } GameUserJoinGroup userJoinGroup = new GameUserJoinGroup(); userJoinGroup.setId(snowflake.nextId()); userJoinGroup.setUserJoinId(userJoin.getId()); userJoinGroup.setGameGroupId(join.getGroupId()); userJoinGroupDao.insertSelective(userJoinGroup); + // 缓存小组人数 + String key = join.getGroupId() + GameConstant.GAME_GROUP_NUM; + Object o = redisUtil.get(key); + + redisUtil.set(key, o == null ? 1 : (int)o + 1, GameConstant.REDIS_TIME_TWENTY); } // 3.更新redis(sort set key:分数 value:头像,姓名) if (prepare || processing) { @@ -216,6 +250,18 @@ public class ClientService implements IClientService { ClientVo.ProcessingData processingData = new ClientVo.ProcessingData(); processingData.setStartLocalTime(join.getLocalStartTime()); processingData.setEndLocalTime(join.getLocalEndTime()); + String gameUserKey = GameConstant.generateGameKey(gameRecord.getId()); + Set> typedTuples = redisUtil.zsGetWithScore(gameUserKey, 0, -1); + log.info("进行中加入查询redis内的分数信息:{}",typedTuples); + if(CollectionUtil.isNotEmpty(typedTuples)) { + typedTuples.forEach(type -> { + ClientDto.RedisUser user = JSON.parseObject((String)type.getValue(), ClientDto.RedisUser.class); + if(user.getUserId().longValue() == join.getUserId().longValue()){ + processingData.setScore(type.getScore().intValue()); + processingData.setTimes(type.getScore().intValue() / 100); + } + }); + } joinVo.setProcessingData(processingData); break; case GameConstant.GAME_COMPLETED: @@ -223,7 +269,7 @@ public class ClientService implements IClientService { ClientVo.CompletedData completedData = new ClientVo.CompletedData(); //如果是分组游戏,获取本组信息 if(isGroup){ - ClientVo.GroupScore groupScore = getGroupScore(groupId,gameRecord.getId()); + ClientVo.GroupScore groupScore = getGroupScore(groupId,gameRecord); completedData.setGroupScore(groupScore); } completedData.setTimes(join.getTimes()); @@ -247,6 +293,23 @@ public class ClientService implements IClientService { log.info("参加游戏:{}", joinVo); return joinVo; } + @Override + public ClientVo.GroupScore getGroupScore(long groupId,GameRecord record){ + log.info("查询成绩:{},{}", groupId, record); + ClientVo.GroupScore score = new ClientVo.GroupScore(); + List scores = gameGroupDao.queryScores(groupId, record.getId(), record.getRankRule()); + for (int i = 0; i < scores.size(); i++) { + ClientVo.GroupVo groupVo = scores.get(i); + if (groupVo.getGroupId() == groupId) { + score.setGroupSort(i); + score.setGroupScore(groupVo.getGroupScore()); + score.setGroupTimes(groupVo.getGroupTimes()); + return score; + } + } + log.info("{},{}没有找到组信息", groupId, record); + return score; + } /** * 获取本组的信息 @@ -257,6 +320,28 @@ public class ClientService implements IClientService { int otherGroupScore = 0; //查找所有队伍 + String groupKey = recordId + "_group"; + Set> typedTuples = redisUtil.zsRevGetWithScore(groupKey, 0, -1); + if(CollectionUtil.isNotEmpty(typedTuples)){ + List vos = new ArrayList<>(); + AtomicInteger index = new AtomicInteger(0); + typedTuples.forEach(type -> { + index.set(index.get() + 1); + GameGroup gameGroup = JSON.parseObject((String) type.getValue(), GameGroup.class); + if(gameGroup.getId().longValue() == groupId.longValue()){ + groupScore.setGroupScore(type.getScore().intValue()); + groupScore.setGroupTimes(type.getScore().intValue() / 100); + groupScore.setGroupSort(index.get()); + + } + }); + if(groupScore.getGroupSort() != null) { + return groupScore; + } + } + + + GameGroupExample gameGroupExample = new GameGroupExample(); gameGroupExample.createCriteria().andRecordIdEqualTo(recordId); List gameGroupList = gameGroupDao.selectByExample(gameGroupExample); @@ -312,8 +397,8 @@ public class ClientService implements IClientService { // 游戏状态 joinVo.setGameStatus(gameRecord.getGameStatus()); // 总人数 - long count = redisUtil.zsGetSize(GameConstant.generateGameKey(gameRecord.getId())); - if (count <= 0) { + Long count = redisUtil.zsGetSize(GameConstant.generateGameKey(gameRecord.getId())); + if (count == null || count <= 0) { GameUserJoinExample userJoinExample = new GameUserJoinExample(); userJoinExample.createCriteria().andRecordIdEqualTo(gameRecord.getId()); count = gameUserJoinDao.countByExample(userJoinExample); @@ -517,4 +602,13 @@ public class ClientService implements IClientService { List gameGroupList = gameGroupDao.selectByExample(gameGroupExample); return gameGroupList; } + + @Override + public PageInfo groupMembers(ClientDto.GroupRanking groupRanking) { + log.info("查询组内成员排序:{}", groupRanking); + PageHelper.startPage(groupRanking.getPageNum(), groupRanking.getPageSize()); + List infos = gameGroupDao.groupMemberRank(groupRanking.getGroupId()); + log.info("结果:{}", infos); + return new PageInfo<>(infos); + } } diff --git a/game/src/main/java/com/ccsens/game/service/IClientService.java b/game/src/main/java/com/ccsens/game/service/IClientService.java index a031e53f..35587afc 100644 --- a/game/src/main/java/com/ccsens/game/service/IClientService.java +++ b/game/src/main/java/com/ccsens/game/service/IClientService.java @@ -3,8 +3,10 @@ package com.ccsens.game.service; import com.ccsens.game.bean.dto.ClientDto; import com.ccsens.game.bean.dto.message.BaseMessageDto; import com.ccsens.game.bean.dto.message.GameMessageCountOut; +import com.ccsens.game.bean.po.GameRecord; import com.ccsens.game.bean.vo.ClientVo; import com.ccsens.util.bean.dto.QueryDto; +import com.github.pagehelper.PageInfo; /** * @description: @@ -30,9 +32,24 @@ public interface IClientService { /** * 查询本组游戏的分数信息 - * @param groupId - * @param recordId - * @return + * @param groupId 分组ID + * @param recordId 游戏ID + * @return 分组信息 */ ClientVo.GroupScore getGroupScore(Long groupId,Long recordId); + + /** + * 查询本组游戏的分数信息 + * @param groupId 分组ID + * @param record 游戏信息 + * @return 分组信息 + */ + ClientVo.GroupScore getGroupScore(long groupId, GameRecord record); + + /** + * 查询组内成员排行 + * @param groupRanking + * @return 排行 + */ + PageInfo groupMembers(ClientDto.GroupRanking groupRanking); } diff --git a/game/src/main/java/com/ccsens/game/service/IMessageService.java b/game/src/main/java/com/ccsens/game/service/IMessageService.java index 5d918847..9e8b9c74 100644 --- a/game/src/main/java/com/ccsens/game/service/IMessageService.java +++ b/game/src/main/java/com/ccsens/game/service/IMessageService.java @@ -1,14 +1,17 @@ package com.ccsens.game.service; -import com.ccsens.game.bean.dto.message.*; -import com.fasterxml.jackson.core.JsonProcessingException; +import com.ccsens.game.bean.dto.message.AckMessageDto; +import com.ccsens.game.bean.dto.message.AuthMessageDto; +import com.ccsens.game.bean.dto.message.ChromeMessageDto; +import com.ccsens.game.bean.dto.message.GameMessageWithChangeStatusOut; import io.netty.channel.ChannelHandlerContext; import java.util.List; +import java.util.Set; public interface IMessageService { //获取路径后给每个人发送游戏路径消息 - void sendGameMessageWithGetUrl(ChromeMessageDto message) throws Exception; + void sendGameMessageWithGetUrl(ChromeMessageDto messag, Set userIdSet) throws Exception; void doAckMessageWithAck(String userId, AckMessageDto message); diff --git a/game/src/main/java/com/ccsens/game/service/IScreenService.java b/game/src/main/java/com/ccsens/game/service/IScreenService.java index 812771aa..1fce6da0 100644 --- a/game/src/main/java/com/ccsens/game/service/IScreenService.java +++ b/game/src/main/java/com/ccsens/game/service/IScreenService.java @@ -15,6 +15,13 @@ public interface IScreenService { ScreenVo.GameStatusVo getGameStatusVo(QueryDto params); + /** + * 查找分组信息(排序) + * @param gameRecord 游戏记录 + * @return 返回排序后的每个组的信息 + */ + List getGroupScore2(GameRecord gameRecord); + String startAgain(QueryDto params) throws Exception; /** @@ -39,9 +46,26 @@ public interface IScreenService { Long getGameTypeId(Long recordId); + /** + * 根据游戏id获取分组信息 + * @param recordId 游戏id + * @return 返回分组信息 + */ List getGroupByRecordId(Long recordId); ScreenVo.RecordInfo getRecordByTaskId(Long taskId,String gameType); Map getGroupTotalScore(Long groupId); + + /** + * 查询游戏配置excel + * @param params + * @return + */ + List getConfig(QueryDto params)throws Exception; + + /** + * 手机端再玩一次 + */ + Long startAgainByPhone(QueryDto params); } diff --git a/game/src/main/java/com/ccsens/game/service/MessageService.java b/game/src/main/java/com/ccsens/game/service/MessageService.java index 38eb762f..86ec8d51 100644 --- a/game/src/main/java/com/ccsens/game/service/MessageService.java +++ b/game/src/main/java/com/ccsens/game/service/MessageService.java @@ -1,6 +1,7 @@ package com.ccsens.game.service; import cn.hutool.core.collection.CollectionUtil; +import com.alibaba.fastjson.JSONObject; import com.ccsens.cloudutil.feign.TallFeignClient; import com.ccsens.game.bean.dto.message.*; import com.ccsens.game.bean.po.GameUserJoin; @@ -9,15 +10,17 @@ import com.ccsens.game.netty.ChannelManager; import com.ccsens.game.persist.dao.GameUserJoinDao; import com.ccsens.util.JacksonUtil; import com.ccsens.util.WebConstant; +import com.ccsens.util.bean.message.common.InMessage; +import com.ccsens.util.bean.message.common.MessageConstant; import com.ccsens.util.config.RabbitMQConfig; import io.netty.channel.ChannelHandlerContext; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.AmqpTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import java.util.List; +import java.util.Set; import static com.ccsens.game.netty.ChannelManager.sendTo; @@ -32,10 +35,17 @@ public class MessageService implements IMessageService { private GameUserJoinDao gameUserJoinDao; @Override - public void sendGameMessageWithGetUrl(ChromeMessageDto message) throws Exception { - System.out.println(JacksonUtil.beanToJson(message)); - rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, - JacksonUtil.beanToJson(message)); + public void sendGameMessageWithGetUrl(ChromeMessageDto message, Set userIdSet) throws Exception { + log.info(JacksonUtil.beanToJson(message)); +// rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, +// JacksonUtil.beanToJson(message)); + + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(userIdSet); + inMessage.setData(JSONObject.toJSONString(message)); + log.info("新建或再玩一次发送消息:{}",inMessage); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, JSONObject.toJSONString(inMessage)); } @Override @@ -49,7 +59,7 @@ public class MessageService implements IMessageService { @Override public void doAuthMessageWithAuth(ChannelHandlerContext ctx, AuthMessageDto message) { - System.out.println(message); + log.info("{}",message); //ws连接认证 String userId = message.getData().getUserId(); if (userId == null) { diff --git a/game/src/main/java/com/ccsens/game/service/ScreenService.java b/game/src/main/java/com/ccsens/game/service/ScreenService.java index da0e579f..b407301c 100644 --- a/game/src/main/java/com/ccsens/game/service/ScreenService.java +++ b/game/src/main/java/com/ccsens/game/service/ScreenService.java @@ -1,10 +1,14 @@ package com.ccsens.game.service; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.cloudutil.bean.tall.dto.WpsDto; import com.ccsens.cloudutil.feign.TallFeignClient; import com.ccsens.game.bean.dto.ClientDto; import com.ccsens.game.bean.dto.ScreenDto; @@ -15,23 +19,26 @@ import com.ccsens.game.bean.vo.ScreenVo; import com.ccsens.game.persist.dao.*; import com.ccsens.game.util.GameConstant; import com.ccsens.game.util.SendMsg; -import com.ccsens.util.CodeEnum; -import com.ccsens.util.RedisUtil; -import com.ccsens.util.WebConstant; +import com.ccsens.util.*; import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.util.exception.BaseException; - +import com.ccsens.util.wx.WxXcxUtil; import com.fasterxml.jackson.core.JsonProcessingException; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.data.redis.core.ZSetOperations; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import java.io.File; +import javax.annotation.Resource; +import java.io.*; import java.util.*; -import java.util.concurrent.*; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; /** * @author zy @@ -40,124 +47,138 @@ import java.util.concurrent.*; @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ScreenService implements IScreenService { - @Autowired - private ClientService clientService; - @Autowired + @Resource private GameUserPayDao gameUserPayDao; - @Autowired + @Resource private GameTypeDao gameTypeDao; - @Autowired + @Resource private GameRecordDao gameRecordDao; - @Autowired + @Resource private GameGroupDao gameGroupDao; - @Autowired + @Resource private GameUserJoinGroupDao gameUserJoinGroupDao; - @Autowired + @Resource private GameActivityRuleDao activityRuleDao; - @Autowired + @Resource private GameActivityPrizeDao activityPrizeDao; - @Autowired + @Resource private GamePrizeInstructionsDao prizeInstructionsDao; - @Autowired + @Resource private GameUserJoinDao gameUserJoinDao; - @Autowired + @Resource private TallFeignClient tallFeignClient; - @Autowired + @Resource private IMessageService messageService; - - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private SendMsg sendMsg; - @Autowired + @Resource private RedisUtil redisUtil; /** - * 传入用户信息,返回游戏大屏路径 + * 创建游戏 * - * @return + * @return 返回游戏数据 */ @Override public ScreenVo.UrlVo getScreenUrl(QueryDto params) throws Exception { + log.info("开始创建游戏:{}",params); ScreenDto.MemberGame memberGame = params.getParam(); + Long userId = params.getUserId(); + //查找游戏 - GameType gameType = null; GameTypeExample gameTypeExample = new GameTypeExample(); gameTypeExample.createCriteria().andCodeEqualTo(memberGame.getGameType()); List gameTypeList = gameTypeDao.selectByExample(gameTypeExample); - if (CollectionUtil.isNotEmpty(gameTypeList)) { - gameType = gameTypeList.get(0); - } - if (ObjectUtil.isNull(gameType)) { + if (CollectionUtil.isEmpty(gameTypeList)) { throw new BaseException(CodeEnum.NOT_GAME_TYPE); } + GameType gameType = gameTypeList.get(0); + log.info("查找游戏类型:{}",gameType); //2、查找此用户购买的此游戏的信息,若没有则添加一条记录,默认已付款,结束时间为添加后的一个月,默认次数为10次 - GameUserPay gameUserPay = null; - GameUserPayExample gameUserPayExample = new GameUserPayExample(); - gameUserPayExample.createCriteria().andUserIdEqualTo(params.getUserId()).andGameTypeIdEqualTo(gameType.getId()); - List gameUserPayList = gameUserPayDao.selectByExample(gameUserPayExample); - if (CollectionUtil.isNotEmpty(gameUserPayList)) { - gameUserPay = gameUserPayList.get(0); - } else { - gameUserPay = new GameUserPay(); - gameUserPay.setId(snowflake.nextId()); - gameUserPay.setUserId(params.getUserId()); - gameUserPay.setGameTypeId(gameType.getId()); - gameUserPay.setTotalCount(10); - gameUserPay.setUsedCount(0); - gameUserPay.setCreatedTime(System.currentTimeMillis()); - gameUserPay.setDueTime(gameUserPay.getCreatedTime() + (3600 * 24 * 30)); - gameUserPayDao.insertSelective(gameUserPay); - } - //查询该任务下的游戏记录信息 + GameUserPay gameUserPay = getGameUserPay(userId, gameType); + //查询该任务下的游戏记录信息 如果还有其他未结束的游戏则返回提示信息 if (ObjectUtil.isNotNull(memberGame.getTaskId())) { - GameRecordExample recordExample = new GameRecordExample(); - recordExample.createCriteria().andTaskIdEqualTo(memberGame.getTaskId()); - recordExample.setOrderByClause("created_at DESC"); - List recordList = gameRecordDao.selectByExample(recordExample); - if (CollectionUtil.isNotEmpty(recordList)) { - GameRecord record = recordList.get(0); - if(record.getGameStatus() == GameConstant.GAME_PREPARATION || - record.getGameStatus() == GameConstant.GAME_PROCESSING){ - throw new BaseException(CodeEnum.GAME_NO_END); - } - if(record.getGameStatus() == GameConstant.GAME_PENDING){ - record.setGameStatus(GameConstant.GAME_COMPLETED); - gameRecordDao.updateByPrimaryKeySelective(record); - } - } + selectOldRecord(memberGame.getTaskId()); } + //验证购买时间是否到期 + if (gameUserPay.getDueTime() < System.currentTimeMillis()) { + throw new BaseException(CodeEnum.GAME_TIME_DUE); + } + //验证游戏次数 + if (gameUserPay.getUsedCount() >= gameUserPay.getTotalCount()) { + throw new BaseException(CodeEnum.GAME_NOT_TIMES); + } + //修改购买的游戏的使用次数 + gameUserPay.setUsedCount(gameUserPay.getUsedCount() + 1); + gameUserPayDao.updateByPrimaryKeySelective(gameUserPay); //3、根据用户购买的记录,添加一场新的游戏记录 GameRecord gameRecord = new GameRecord(); gameRecord.setId(snowflake.nextId()); gameRecord.setUserPayId(gameUserPay.getId()); gameRecord.setTaskId(memberGame.getTaskId()); + gameRecord.setGameGroup((byte) 0); //添加路径 - String gameUrl = WebConstant.TEST_URL_GAME_SQ; + String gameUrl = PropUtil.notGatewayUrl + WebConstant.TEST_URL_GAME_SQ; switch (gameType.getCode()){ case GameConstant.GAME_TYPE_SQ: break; - case GameConstant.GAME_TYPE_SP: gameUrl = WebConstant.TEST_URL_GAME_SP; break; - case GameConstant.GAME_TYPE_BH: gameUrl = WebConstant.TEST_URL_GAME_BH; break; + case GameConstant.GAME_TYPE_SP: gameUrl = PropUtil.notGatewayUrl + WebConstant.TEST_URL_GAME_SP; break; + case GameConstant.GAME_TYPE_BH: gameUrl = PropUtil.notGatewayUrl + WebConstant.TEST_URL_GAME_BH; break; default:break; } gameRecord.setUrl(gameUrl + gameType.getScreenUrl() + "?id=" + gameRecord.getId()); - gameRecord.setQrCodeUrl(gameUrl + gameRecord.getId() + File.separator + gameType.getClientUrl()); +// gameRecord.setQrCodeUrl(gameUrl + gameRecord.getId() + File.separator + gameType.getClientUrl()); + +// if("1".equalsIgnoreCase(PropUtil.openWx)){ + //生成二维码 + String fileName = "/gameQrCode/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".png"; + String path = WebConstant.UPLOAD_PATH_BASE + fileName; +// WxXcxUtil.getWxCode(WebConstant.QRCODE_GAME, "id=" + gameRecord.getId() + "&type=" + gameType.getCode(), null, path, gameType.getCode()); + WxXcxUtil.getWxCodeC(WebConstant.QRCODE_GAME+"?id=" + gameRecord.getId() + "&type=" + gameType.getCode(), path, gameType.getCode()); + + gameRecord.setQrCodeUrl(PropUtil.qrCode + fileName); + log.info("调用微信生成二维码"); + +// } else { +// log.info("测试环境,不调用生成二维码"); +// //给一个默认测试的 +// gameRecord.setQrCodeUrl(PropUtil.qrCode + "/gameQrCode/2020-08-19/1597822577181.png"); +// } + + //查找此任务下的游戏配置表 + byte businessType = 8; + if( GameConstant.GAME_TYPE_SP.equalsIgnoreCase(memberGame.getGameType())){ + businessType = 9; + }else if( GameConstant.GAME_TYPE_BH.equalsIgnoreCase(memberGame.getGameType())){ + businessType = 10; + } + String wpsFilePath = tallFeignClient.getWpsFilePath(memberGame.getTaskId(),businessType); + log.info("游戏配置表的路径:{}",wpsFilePath); + if(StrUtil.isNotEmpty(wpsFilePath)){ + //添加配置信息 + saveGameRecord(wpsFilePath,gameRecord); + } + //将游戏记录添加数据库 gameRecordDao.insertSelective(gameRecord); - //4、 判断是否有分组,如果是分组游戏,添加两条分组信息 - if (gameType.getIsGroup() == 1) { - GameGroup gameGroupRed = new GameGroup(); - gameGroupRed.setId(snowflake.nextId()); - gameGroupRed.setRecordId(gameRecord.getId()); - gameGroupRed.setName(memberGame.getFirstTeam()); - gameGroupRed.setCode(GameConstant.FIRST_GROUP); - gameGroupDao.insertSelective(gameGroupRed); - GameGroup gameGroupBlue = new GameGroup(); - gameGroupBlue.setId(snowflake.nextId()); - gameGroupBlue.setRecordId(gameRecord.getId()); - gameGroupBlue.setName(memberGame.getSecondTeam()); - gameGroupBlue.setCode(GameConstant.SECOND_GROUP); - gameGroupDao.insertSelective(gameGroupBlue); + log.info("添加游戏记录:{}",gameRecord); + //配置表不存在,而且游戏类型默认为分组游戏,默认添加两个分组 + if(StrUtil.isEmpty(wpsFilePath) && gameType.getIsGroup() == 1){ + if (gameType.getIsGroup() == 1) { + GameGroup gameGroupRed = new GameGroup(); + gameGroupRed.setId(snowflake.nextId()); + gameGroupRed.setRecordId(gameRecord.getId()); + gameGroupRed.setName(memberGame.getFirstTeam()); + gameGroupRed.setCode(GameConstant.FIRST_GROUP); + gameGroupDao.insertSelective(gameGroupRed); + GameGroup gameGroupBlue = new GameGroup(); + gameGroupBlue.setId(snowflake.nextId()); + gameGroupBlue.setRecordId(gameRecord.getId()); + gameGroupBlue.setName(memberGame.getSecondTeam()); + gameGroupBlue.setCode(GameConstant.SECOND_GROUP); + gameGroupDao.insertSelective(gameGroupBlue); + } } //5、查询该游戏的规则 @@ -172,38 +193,287 @@ public class ScreenService implements IScreenService { String url = gameRecord.getUrl() + "&projectId=" + memberGame.getProjectId(); //给所有人发送消息发送消息 ChromeMessageDto chromeMessageDto = new ChromeMessageDto(url, gameRecord.getId(), memberGame.getProjectId(),gameType.getCode()); - BaseMessageDto.MessageUser messageUser = null; + BaseMessageDto.MessageUser messageUser; List messageUserList = new ArrayList<>(); //获取项目下所有成员 + Set userIdSet = new HashSet<>(); List memberIdList = tallFeignClient.getMemberIdListByProject(memberGame.getProjectId()); if (CollectionUtil.isNotEmpty(memberIdList)) { for (Long memberId : memberIdList) { - messageUser = new BaseMessageDto.MessageUser(); - messageUser.setUserId(memberId); - messageUserList.add(messageUser); +// messageUser = new BaseMessageDto.MessageUser(); +// messageUser.setUserId(memberId); +// messageUserList.add(messageUser); + userIdSet.add(memberId.toString()); } } chromeMessageDto.setReceivers(messageUserList); +<<<<<<< HEAD log.info("给所有成员发送开始游戏的消息:{}",chromeMessageDto.toString()); messageService.sendGameMessageWithGetUrl(chromeMessageDto); +======= + messageService.sendGameMessageWithGetUrl(chromeMessageDto,userIdSet); + log.info("给所有成员发送消息:{}",chromeMessageDto); + log.info("返回游戏信息:{}",urlVo); +>>>>>>> pt return urlVo; } + /** + * 根据配置信息创建游戏 + * @param wpsFilePath 配置文件的路径 + * @param gameRecord 新建的游戏记录信息 + */ + private void saveGameRecord(String wpsFilePath,GameRecord gameRecord) throws Exception{ + InputStream is = new FileInputStream(new File(wpsFilePath)); + //读取excel + XSSFWorkbook wb = new XSSFWorkbook(is); + if(ObjectUtil.isNull(wb)){ throw new BaseException(CodeEnum.NOT_CONFIG_OR_ERR); } + //读取sheet + XSSFSheet sheet = wb.getSheet("游戏配置表"); + if(ObjectUtil.isNull(sheet)){ throw new BaseException(CodeEnum.NOT_CONFIG_OR_ERR); } + //比赛模式 + XSSFRow gamePatternRow = sheet.getRow(1); + log.info("游戏模式:{}",gamePatternRow); + if(ObjectUtil.isNotNull(gamePatternRow)){ + String gamePattern = ExcelUtil.getCellValue(gamePatternRow.getCell(1)); + if(gamePattern.equalsIgnoreCase(GameConstant.EXCEL_GAME_GROUP)){ + gameRecord.setGameGroup((byte) 1); + }else { + gameRecord.setGameGroup((byte) 0); + } + } + //比赛时长 + XSSFRow durationRow = sheet.getRow(2); + if(ObjectUtil.isNotNull(durationRow)){ + String durationStr = ExcelUtil.getCellValue(durationRow.getCell(1)); + if(StrUtil.isNotEmpty(durationStr)){ + boolean match = StringUtil.isMatch(durationStr, StringUtil.NUMBER_DOUBLE); + if(match){ + int duration = (int) (Double.parseDouble(durationStr) * 60); + gameRecord.setDuration(duration); + }else { + throw new BaseException(CodeEnum.NOT_CONFIG_OR_ERR); + } + } + + } + //人数上限 + XSSFRow memberLimitRow = sheet.getRow(3); + if(ObjectUtil.isNotNull(memberLimitRow)){ + int memberLimit = Integer.parseInt(ExcelUtil.getCellValue(memberLimitRow.getCell(1))); + gameRecord.setMemberLimit(memberLimit); + } + //排名计算方式 + XSSFRow rankRuleRow = sheet.getRow(4); + if(ObjectUtil.isNotNull(rankRuleRow)){ + String rankRule = ExcelUtil.getCellValue(rankRuleRow.getCell(1)); + if(rankRule.equalsIgnoreCase(GameConstant.GAME_RANK_AVE)) { + gameRecord.setRankRule((byte) 1); + } + } + //添加分组信息 + if(gameRecord.getGameGroup() == 1){ + for (int i = 8; i <= sheet.getLastRowNum(); i++){ + XSSFRow groupRow = sheet.getRow(i); + if(ObjectUtil.isNotNull(groupRow)){ + String groupName = ExcelUtil.getCellValue(groupRow.getCell(0)); + String groupUrl = ExcelUtil.getCellValue(groupRow.getCell(1)); + if(StrUtil.isNotEmpty(groupName)){ + GameGroup gameGroup = new GameGroup(); + gameGroup.setId(snowflake.nextId()); + gameGroup.setRecordId(gameRecord.getId()); + gameGroup.setName(groupName); +// gameGroup.setCode(GameConstant.FIRST_GROUP); + if(StrUtil.isNotEmpty(groupUrl)){ + gameGroup.setHeadPortraitUrl(groupUrl); + } + gameGroupDao.insertSelective(gameGroup); + log.info("添加了分组:{}",gameGroup); + } + } + } + } + } + + /** + * 查询该任务下的游戏记录信息 如果还有其他未结束的游戏则返回提示信息 + * @param taskId 任务id + */ + private void selectOldRecord(Long taskId) { + GameRecordExample recordExample = new GameRecordExample(); + recordExample.createCriteria().andTaskIdEqualTo(taskId); + recordExample.setOrderByClause("created_at DESC"); + List recordList = gameRecordDao.selectByExample(recordExample); + if (CollectionUtil.isNotEmpty(recordList)) { + GameRecord record1 = new GameRecord(); + GameRecord record = recordList.get(0); + if(record.getGameStatus() == GameConstant.GAME_PREPARATION || + record.getGameStatus() == GameConstant.GAME_PROCESSING){ + throw new BaseException(CodeEnum.GAME_NO_END); + } + if(record.getGameStatus() == GameConstant.GAME_PENDING){ + record1.setId(record.getId()); + record1.setGameStatus(GameConstant.GAME_COMPLETED); + gameRecordDao.updateByPrimaryKeySelective(record1); + } + } + } + + /** + * 查找此用户购买的此游戏的信息 + * @param userId userId + * @param gameType 游戏类型 + * @return 返回购买记录 + */ + private GameUserPay getGameUserPay(Long userId, GameType gameType) { + GameUserPay gameUserPay; + GameUserPayExample gameUserPayExample = new GameUserPayExample(); + gameUserPayExample.createCriteria().andUserIdEqualTo(userId).andGameTypeIdEqualTo(gameType.getId()); + List gameUserPayList = gameUserPayDao.selectByExample(gameUserPayExample); + if (CollectionUtil.isNotEmpty(gameUserPayList)) { + gameUserPay = gameUserPayList.get(0); + } else { + gameUserPay = new GameUserPay(); + gameUserPay.setId(snowflake.nextId()); + gameUserPay.setUserId(userId); + gameUserPay.setGameTypeId(gameType.getId()); + gameUserPay.setTotalCount(10); + gameUserPay.setUsedCount(0); + gameUserPay.setCreatedTime(System.currentTimeMillis()); +// gameUserPay.setDueTime(gameUserPay.getCreatedTime() + (3600 * 24 * 30)); + gameUserPay.setDueTime(gameUserPay.getCreatedTime() + (3600 * 24 * 7)); + gameUserPayDao.insertSelective(gameUserPay); + } + return gameUserPay; + } + +// @Override +// public ScreenVo.UrlVo getScreenUrl(QueryDto params) throws Exception { +// ScreenDto.MemberGame memberGame = params.getParam(); +// //查找游戏 +// GameType gameType = null; +// GameTypeExample gameTypeExample = new GameTypeExample(); +// gameTypeExample.createCriteria().andCodeEqualTo(memberGame.getGameType()); +// List gameTypeList = gameTypeDao.selectByExample(gameTypeExample); +// if (CollectionUtil.isNotEmpty(gameTypeList)) { +// gameType = gameTypeList.get(0); +// } +// if (ObjectUtil.isNull(gameType)) { +// throw new BaseException(CodeEnum.NOT_GAME_TYPE); +// } +// //2、查找此用户购买的此游戏的信息,若没有则添加一条记录,默认已付款,结束时间为添加后的一个月,默认次数为10次 +// GameUserPay gameUserPay = null; +// GameUserPayExample gameUserPayExample = new GameUserPayExample(); +// gameUserPayExample.createCriteria().andUserIdEqualTo(params.getUserId()).andGameTypeIdEqualTo(gameType.getId()); +// List gameUserPayList = gameUserPayDao.selectByExample(gameUserPayExample); +// if (CollectionUtil.isNotEmpty(gameUserPayList)) { +// gameUserPay = gameUserPayList.get(0); +// } else { +// gameUserPay = new GameUserPay(); +// gameUserPay.setId(snowflake.nextId()); +// gameUserPay.setUserId(params.getUserId()); +// gameUserPay.setGameTypeId(gameType.getId()); +// gameUserPay.setTotalCount(10); +// gameUserPay.setUsedCount(0); +// gameUserPay.setCreatedTime(System.currentTimeMillis()); +// gameUserPay.setDueTime(gameUserPay.getCreatedTime() + (3600 * 24 * 30)); +// gameUserPayDao.insertSelective(gameUserPay); +// } +// //查询该任务下的游戏记录信息 +// if (ObjectUtil.isNotNull(memberGame.getTaskId())) { +// GameRecordExample recordExample = new GameRecordExample(); +// recordExample.createCriteria().andTaskIdEqualTo(memberGame.getTaskId()); +// recordExample.setOrderByClause("created_at DESC"); +// List recordList = gameRecordDao.selectByExample(recordExample); +// if (CollectionUtil.isNotEmpty(recordList)) { +// GameRecord record = recordList.get(0); +// if(record.getGameStatus() == GameConstant.GAME_PREPARATION || +// record.getGameStatus() == GameConstant.GAME_PROCESSING){ +// throw new BaseException(CodeEnum.GAME_NO_END); +// } +// if(record.getGameStatus() == GameConstant.GAME_PENDING){ +// record.setGameStatus(GameConstant.GAME_COMPLETED); +// gameRecordDao.updateByPrimaryKeySelective(record); +// } +// } +// } +// +// //3、根据用户购买的记录,添加一场新的游戏记录 +// GameRecord gameRecord = new GameRecord(); +// gameRecord.setId(snowflake.nextId()); +// gameRecord.setUserPayId(gameUserPay.getId()); +// gameRecord.setTaskId(memberGame.getTaskId()); +// //添加路径 +// String gameUrl = WebConstant.TEST_URL_GAME_SQ; +// switch (gameType.getCode()){ +// case GameConstant.GAME_TYPE_SQ: break; +// case GameConstant.GAME_TYPE_SP: gameUrl = WebConstant.TEST_URL_GAME_SP; break; +// case GameConstant.GAME_TYPE_BH: gameUrl = WebConstant.TEST_URL_GAME_BH; break; +// default:break; +// } +// gameRecord.setUrl(gameUrl + gameType.getScreenUrl() + "?id=" + gameRecord.getId()); +// gameRecord.setQrCodeUrl(gameUrl + gameRecord.getId() + File.separator + gameType.getClientUrl()); +// gameRecordDao.insertSelective(gameRecord); +// //4、 判断是否有分组,如果是分组游戏,添加两条分组信息 +// if (gameType.getIsGroup() == 1) { +// GameGroup gameGroupRed = new GameGroup(); +// gameGroupRed.setId(snowflake.nextId()); +// gameGroupRed.setRecordId(gameRecord.getId()); +// gameGroupRed.setName(memberGame.getFirstTeam()); +// gameGroupRed.setCode(GameConstant.FIRST_GROUP); +// gameGroupDao.insertSelective(gameGroupRed); +// GameGroup gameGroupBlue = new GameGroup(); +// gameGroupBlue.setId(snowflake.nextId()); +// gameGroupBlue.setRecordId(gameRecord.getId()); +// gameGroupBlue.setName(memberGame.getSecondTeam()); +// gameGroupBlue.setCode(GameConstant.SECOND_GROUP); +// gameGroupDao.insertSelective(gameGroupBlue); +// } +// +// //5、查询该游戏的规则 +// List ruleList = getGameActivityRule(gameType.getId()); +// //6、返回 +// ScreenVo.UrlVo urlVo = new ScreenVo.UrlVo(); +// urlVo.setId(gameRecord.getId()); +// urlVo.setUrl(gameRecord.getUrl()); +// urlVo.setRuleList(ruleList); +// +// //路径(添加项目id) +// String url = gameRecord.getUrl() + "&projectId=" + memberGame.getProjectId(); +// //给所有人发送消息发送消息 +// ChromeMessageDto chromeMessageDto = new ChromeMessageDto(url, gameRecord.getId(), memberGame.getProjectId(),gameType.getCode()); +// BaseMessageDto.MessageUser messageUser = null; +// List messageUserList = new ArrayList<>(); +// //获取项目下所有成员 +// List memberIdList = tallFeignClient.getMemberIdListByProject(memberGame.getProjectId()); +// if (CollectionUtil.isNotEmpty(memberIdList)) { +// for (Long memberId : memberIdList) { +// messageUser = new BaseMessageDto.MessageUser(); +// messageUser.setUserId(memberId); +// messageUserList.add(messageUser); +// } +// } +// chromeMessageDto.setReceivers(messageUserList); +// messageService.sendGameMessageWithGetUrl(chromeMessageDto); +// +// return urlVo; +// } + /** * 获取游戏基本信息 - * - * @return + * @return 返回游戏基本信息 */ @Override public ScreenVo.GameInfoVo getGameInformation(QueryDto params) { + log.info("获取游戏基本信息:{}",params); //传入 ScreenDto.MemberRecord memberRecord = params.getParam(); //返回 ScreenVo.GameInfoVo gameInfoVo = new ScreenVo.GameInfoVo(); GameRecord gameRecord = getGameRecord(memberRecord.getMemberRecord()); - + log.info("查找游戏记录信息:{}",gameRecord); GameUserPay gameUserPay = gameUserPayDao.selectByPrimaryKey(gameRecord.getUserPayId()); if (ObjectUtil.isNull(gameUserPay)) { throw new BaseException(CodeEnum.NOT_GAME_TYPE); @@ -213,6 +483,7 @@ public class ScreenService implements IScreenService { gameInfoVo.setTotalCount(gameUserPay.getTotalCount()); gameInfoVo.setUsedCount(gameUserPay.getUsedCount()); gameInfoVo.setGameStatus(gameRecord.getGameStatus()); + gameInfoVo.setTime(gameRecord.getDuration()); //查询参加这个游戏的总用户 Long totalUsers = redisUtil.zsGetSize(GameConstant.generateGameKey(memberRecord.getMemberRecord())); if (totalUsers == null) { @@ -223,7 +494,7 @@ public class ScreenService implements IScreenService { //总人数 gameInfoVo.setTotalMembers(totalUsers == null ? 0 : totalUsers.intValue()); //获取分组的信息 - List groupVo = getGroupScore(gameRecord.getId()); + List groupVo = getGroupScore2(gameRecord); gameInfoVo.setGroups(groupVo); switch (gameInfoVo.getGameStatus()) { case 0: @@ -253,16 +524,14 @@ public class ScreenService implements IScreenService { } gameInfoVo.setPreparingData(preparingData); break; - case 2: - break; case 3: //查询游戏是否有分组 GameType gameType = gameTypeDao.selectByPrimaryKey(gameUserPay.getGameTypeId()); - ScreenVo.CompletedData completedData = null; - if (gameType.getIsGroup() == 0) { + ScreenVo.CompletedData completedData; + if (gameRecord.getGameGroup() == GameConstant.GAME_SINGLE) { completedData = getCompletedData(memberRecord.getMemberRecord()); } else { - completedData = getCompletedDataByWin(memberRecord.getMemberRecord()); + completedData = getCompletedDataByWin(gameRecord, gameInfoVo.getTotalMembers()); } gameInfoVo.setCompletedData(completedData); break; @@ -272,7 +541,6 @@ public class ScreenService implements IScreenService { return gameInfoVo; } - /** * 获取游戏状态 */ @@ -289,12 +557,12 @@ public class ScreenService implements IScreenService { gameStatusVo.setGameStatus(gameRecord.getGameStatus()); //获取分组的信息 - List groupVo = getGroupScore(gameRecord.getId()); + List groupVo = getGroupScore2(gameRecord); gameStatusVo.setGroups(groupVo); // 查询总人数 Long total = redisUtil.zsGetSize(GameConstant.generateGameKey(gameRecord.getId())); log.info("redis查询gameRecordID:{}总人数:{}", gameRecord.getId(), total); - if (total == null) { + if (total == null || total == 0) { GameUserJoinExample gameuserJoinExample = new GameUserJoinExample(); gameuserJoinExample.createCriteria().andRecordIdEqualTo(memberRecord.getMemberRecord()); total = gameUserJoinDao.countByExample(gameuserJoinExample); @@ -319,7 +587,7 @@ public class ScreenService implements IScreenService { break; case GameConstant.GAME_PROCESSING: //查询游戏是否有分组 - if (gameType.getIsGroup() == 0) { + if (gameRecord.getGameGroup() == GameConstant.GAME_SINGLE) { //普通游戏返回前十名的信息 ScreenVo.ProcessingData processingData = new ScreenVo.ProcessingData(); // 查询前十名(列表顺序即前十名顺序) @@ -328,16 +596,17 @@ public class ScreenService implements IScreenService { gameStatusVo.setProcessingData(processingData); } else { //分组游戏则返回每个分组的信息 - List groupVoList = getGroupScore(gameRecordId); +// List groupVoList = getGroupScore(gameRecord); + List groupVoList = groupVo; gameStatusVo.setProcessingData(groupVoList); } break; case GameConstant.GAME_COMPLETED: - ScreenVo.CompletedData completedData = null; - if (gameType.getIsGroup() == 0) { + ScreenVo.CompletedData completedData; + if (gameRecord.getGameGroup() == GameConstant.GAME_SINGLE) { completedData = getCompletedData(memberRecord.getMemberRecord()); } else { - completedData = getCompletedDataByWin(memberRecord.getMemberRecord()); + completedData = getCompletedDataByWin(gameRecord, gameStatusVo.getTotalMembers()); } gameStatusVo.setCompletedData(completedData); break; @@ -350,11 +619,67 @@ public class ScreenService implements IScreenService { /** * 进行中查询每个组的信息 */ - private List getGroupScore(Long gameRecordId) { + @Override + public List getGroupScore2(GameRecord gameRecord) { + String groupKey = gameRecord.getId() + "_group"; + Set> typedTuples = redisUtil.zsRevGetWithScore(groupKey, 0, -1); + if(CollectionUtil.isNotEmpty(typedTuples)){ + List vos = new ArrayList<>(); + typedTuples.forEach(type -> { + GameGroup gameGroup = JSON.parseObject((String)type.getValue(), GameGroup.class); + int score = type.getScore().intValue(); + ScreenVo.GroupVo groupVo = new ScreenVo.GroupVo(); + groupVo.setGroupId(gameGroup.getId()); + groupVo.setGroupName(gameGroup.getName()); + + Object o = redisUtil.get(gameGroup.getId() + GameConstant.GAME_GROUP_NUM); + if (ObjectUtil.isNull(o)) { + o = 0; + } + groupVo.setTotalMembers((int)o); + groupVo.setTotalScore(score); + groupVo.setTotalTimes(score / 100); + if(gameRecord.getRankRule() == GameConstant.RANK_RULE_AVA){ + groupVo.setScore((int)o == 0 ? 0 : score / (int)o); + groupVo.setTimes(groupVo.getScore() /100); + + }else { + groupVo.setScore(score); + groupVo.setTimes(score / 100); + } + log.info("分数{},人数{}",score,o); +// groupVo.setTotalMembers((int)redisUtil.get(gameGroup.getId() + GameConstant.GAME_GROUP_NUM)); + groupVo.setHeadPortraitUrl(gameGroup.getHeadPortraitUrl()); + vos.add(groupVo); + }); + if(gameRecord.getRankRule() == GameConstant.RANK_RULE_AVA){ +// CollectionUtil.sort(vos, Comparator.comparingInt(ScreenVo.GroupVo::getScore)); + CollectionUtil.sort(vos,(t1,t2)-> t2.getScore() - t1.getScore()); + } + return vos; + } + List vos = gameGroupDao.queryGroups(gameRecord.getId()); + vos.forEach(vo ->{ + vo.setTotalScore(vo.getScore()); + vo.setTotalTimes(vo.getScore() == null ? 0 : vo.getScore() / 100); + }); + if (CollectionUtil.isEmpty(vos) || gameRecord.getRankRule() == GameConstant.RANK_RULE_TOTAL) { + return vos; + } + vos.forEach(vo -> { + vo.setScore(vo.getTotalMembers() == 0 ? 0 : vo.getScore()/vo.getTotalMembers()); + }); + vos.sort((t1,t2)-> t2.getScore() - t1.getScore()); + return vos; + } + /** + * 进行中查询每个组的信息 + */ + private List getGroupScore(GameRecord gameRecord) { List groupVoList = new ArrayList<>(); //查询分组信息 GameGroupExample gameGroupExample = new GameGroupExample(); - gameGroupExample.createCriteria().andRecordIdEqualTo(gameRecordId); + gameGroupExample.createCriteria().andRecordIdEqualTo(gameRecord.getId()); List gameGroupList = gameGroupDao.selectByExample(gameGroupExample); if (CollectionUtil.isNotEmpty(gameGroupList)) { for (GameGroup gameGroup : gameGroupList) { @@ -366,8 +691,10 @@ public class ScreenService implements IScreenService { Map group = getGroupTotalScore(gameGroup.getId()); if (CollectionUtil.isNotEmpty(group)) { List userJoinList = (List) group.get("userJoinList"); - groupVo.setScore((Integer) group.get("totalScore")); - groupVo.setTotalMembers(userJoinList.size()); + int totalScore = (Integer) group.getOrDefault("totalScore", 0); + int members = userJoinList.size(); + groupVo.setScore(gameRecord.getRankRule() == GameConstant.RANK_RULE_AVA ? (members == 0 ? 0 : totalScore/members) : totalScore); + groupVo.setTotalMembers(members); } groupVoList.add(groupVo); } @@ -378,39 +705,114 @@ public class ScreenService implements IScreenService { /** * 结束时查询胜利组的信息(总分数,总次数,平均以及前十名) */ - private ScreenVo.CompletedData getCompletedDataByWin(Long gameRecordId) { + + + + private ScreenVo.CompletedData getCompletedDataByWin(GameRecord gameRecord, int totalMember) { + String groupKey = gameRecord.getId() + "_group"; + Set> typedTuples = redisUtil.zsRevGetWithScore(groupKey, 0, -1); + log.info("查询成绩redis:{}", typedTuples); ScreenVo.CompletedData completedData = new ScreenVo.CompletedData(); + + List list = new ArrayList<>(); + if (CollectionUtil.isNotEmpty(typedTuples)) { + + typedTuples.forEach(type -> { + completedData.setTotalScore(completedData.getTotalScore() + type.getScore().intValue()); + + +// ScreenVo.CompletedData completedData = new ScreenVo.CompletedData(); +//// GameGroup gameGroup = JSON.parseObject((String) type.getValue(), GameGroup.class); +//// int score = type.getScore().intValue(); +//// Object o = redisUtil.get(gameGroup.getId() + GameConstant.GAME_GROUP_NUM); +//// if (o==null) { +//// o = 0; +//// } +//// completedData.setTotalMember((int)o); +//// completedData.setTotalScore(score); +//// completedData.setAverageScore((int)o == 0 ? 0 : completedData.getTotalScore()/(int)o); +//// completedData.setTotalTimes(score/100); +//// completedData.setAverageTimes((int)o == 0 ? 0 : completedData.getTotalTimes()/(int)o); +//// completedData.setWinGroup(gameGroup.getName()); +//// GameUserJoinExample joinExample = new GameUserJoinExample(); +//// joinExample.createCriteria().andRecordIdEqualTo(gameRecord.getId()).andScoreGreaterThan(completedData.getAverageTimes()); +//// long l = gameUserJoinDao.countByExample(joinExample); +//// completedData.setOver(totalMember == 0 ? 0 : (int) (l * 100 / totalMember)); +//// list.add(completedData); + }); + + } else { + List groupVos = gameGroupDao.queryGroups(gameRecord.getId()); + log.info("查询分组:{}", groupVos); + if (CollectionUtil.isEmpty(groupVos)) { + return new ScreenVo.CompletedData(); + } + + groupVos.forEach(groupVo -> { + completedData.setTotalScore((groupVo.getScore() == null ? 0 : groupVo.getScore()) + completedData.getTotalScore()); +// groupVo.setScore(groupVo.getTotalMembers() == null || groupVo.getTotalMembers() == 0 ? 0 : groupVo.getScore()/groupVo.getTotalMembers()); +// ScreenVo.CompletedData completedData = new ScreenVo.CompletedData(); +// +// int members = groupVo.getTotalMembers() == null ? 0 : groupVo.getTotalMembers(); +// completedData.setTotalMember(members); +// completedData.setTotalScore(groupVo.getScore()); +// completedData.setAverageScore(members == 0 ? 0 : completedData.getTotalScore()/members); +// completedData.setTotalTimes(groupVo.getScore() == null ? 0 : groupVo.getScore()/100); +// completedData.setAverageTimes(members == 0 ? 0 : completedData.getTotalTimes()/members); +// completedData.setWinGroup(groupVo.getGroupName()); +// GameUserJoinExample joinExample = new GameUserJoinExample(); +// joinExample.createCriteria().andRecordIdEqualTo(gameRecord.getId()).andScoreGreaterThan(completedData.getAverageTimes()); +// long l = gameUserJoinDao.countByExample(joinExample); +// completedData.setOver(totalMember == 0 ? 0 : (int) (l * 100 /totalMember)); +// list.add(completedData); + }); + + } + completedData.setAverageScore(totalMember == 0 ? 0 : completedData.getTotalScore() / totalMember); + completedData.setTotalTimes(completedData.getTotalScore() / 100); + completedData.setAverageTimes(totalMember == 0 ? 0 : completedData.getTotalTimes() / totalMember); + + GameUserJoinExample joinExample = new GameUserJoinExample(); + joinExample.createCriteria().andRecordIdEqualTo(gameRecord.getId()).andScoreGreaterThan(completedData.getAverageScore()); + long l = gameUserJoinDao.countByExample(joinExample); + completedData.setOver(totalMember == 0 ? 0 : (int) (l * 100 / totalMember)); +// if (gameRecord.getRankRule() == GameConstant.RANK_RULE_AVA) { +// CollectionUtil.sort(list, (t1,t2)-> t2.getAverageScore() - t1.getAverageScore()); +// } + + //TODO 1、分别查询redis内每个队伍的总分, //2、查询获胜队伍的信息 //3、redis内没有则查询数据库 //查询分组信息 - GameGroupExample gameGroupExample = new GameGroupExample(); - gameGroupExample.createCriteria().andRecordIdEqualTo(gameRecordId); - List gameGroupList = gameGroupDao.selectByExample(gameGroupExample); - if (CollectionUtil.isNotEmpty(gameGroupList)) { - List userJoinList = null; - //分别查找两个队伍的总分 - Map group1 = getGroupTotalScore(gameGroupList.get(0).getId()); - Map group2 = getGroupTotalScore(gameGroupList.get(1).getId()); - if (CollectionUtil.isNotEmpty(group1) && CollectionUtil.isNotEmpty(group2)) { - int score1 = (int) group1.get("totalScore"); - int score2 = (int) group2.get("totalScore"); - if (score1 > score2) { - userJoinList = (List) group1.get("userJoinList"); - completedData.setTotalMember(userJoinList.size()); - completedData.setWinGroup(gameGroupList.get(0).getName()); - } else { - userJoinList = (List) group2.get("userJoinList"); - completedData.setTotalMember(userJoinList.size()); - completedData.setWinGroup(gameGroupList.get(1).getName()); - } - } - //5、获取获胜队伍的信息 - completedData = getCompletedData(userJoinList); - } +// GameGroupExample gameGroupExample = new GameGroupExample(); +// gameGroupExample.createCriteria().andRecordIdEqualTo(gameRecordId); +// List gameGroupList = gameGroupDao.selectByExample(gameGroupExample); +// if (CollectionUtil.isNotEmpty(gameGroupList)) { +// List userJoinList = null; +// //分别查找两个队伍的总分 +// Map group1 = getGroupTotalScore(gameGroupList.get(0).getId()); +// Map group2 = getGroupTotalScore(gameGroupList.get(1).getId()); +// if (CollectionUtil.isNotEmpty(group1) && CollectionUtil.isNotEmpty(group2)) { +// int score1 = (int) group1.get("totalScore"); +// int score2 = (int) group2.get("totalScore"); +// if (score1 > score2) { +// userJoinList = (List) group1.get("userJoinList"); +// completedData.setTotalMember(userJoinList.size()); +// completedData.setWinGroup(gameGroupList.get(0).getName()); +// } else { +// userJoinList = (List) group2.get("userJoinList"); +// completedData.setTotalMember(userJoinList.size()); +// completedData.setWinGroup(gameGroupList.get(1).getName()); +// } +// } +// //5、获取获胜队伍的信息 +// completedData = getCompletedData(userJoinList); +// } //前十名 - List top2 = getTopUsers(gameRecordId); +// ScreenVo.CompletedData completedData = list.get(0); + List top2 = getTopUsers(gameRecord.getId()); completedData.setMembers(top2); return completedData; } @@ -441,12 +843,10 @@ public class ScreenService implements IScreenService { return groupMap; } - /** * 查询总分数,总次数,平均以及前十名 * - * @param gameRecordId - * @return + * @param gameRecordId 游戏id */ private ScreenVo.CompletedData getCompletedData(long gameRecordId) { ScreenVo.CompletedData completedData = new ScreenVo.CompletedData(); @@ -489,9 +889,9 @@ public class ScreenService implements IScreenService { /** * 查询参加游戏的用户信息 * - * @param userId - * @param gameRecordId - * @return + * @param userId userID + * @param gameRecordId 游戏id + * @return 返回参加游戏的用户 */ private GameUserJoin getGameUserJoin(Long userId, Long gameRecordId) { GameUserJoinExample joinExample = new GameUserJoinExample(); @@ -507,13 +907,13 @@ public class ScreenService implements IScreenService { /** * 查询游戏信息 * - * @param gameRecordId - * @return + * @param gameRecordId 游戏记录id + * @return 返回游戏信息 */ @Override public GameRecord getGameRecord(long gameRecordId) { String gameRecordStr = (String) redisUtil.get(GameConstant.generateGameStatusKey(gameRecordId)); - GameRecord gameRecord = null; + GameRecord gameRecord; if (StrUtil.isBlank(gameRecordStr)) { gameRecord = gameRecordDao.selectByPrimaryKey(gameRecordId); if (ObjectUtil.isNull(gameRecord)) { @@ -528,8 +928,8 @@ public class ScreenService implements IScreenService { /** * 查询前十名 * - * @param gameRecordId - * @return + * @param gameRecordId 游戏记录id + * @return 返回前十名信息 */ private List getTopUsers(Long gameRecordId) { List tops; @@ -573,52 +973,95 @@ public class ScreenService implements IScreenService { if (ObjectUtil.isNull(gameType)) { throw new BaseException(CodeEnum.NOT_GAME_TYPE); } - + //验证购买时间是否到期 + if (gameUserPay.getDueTime() < System.currentTimeMillis()) { + throw new BaseException(CodeEnum.GAME_TIME_DUE); + } + //验证游戏可玩次数 if (gameUserPay.getUsedCount() >= gameUserPay.getTotalCount()) { throw new BaseException(CodeEnum.GAME_NOT_TIMES); } - GameRecord gameRecordNew = null; - if (gameRecord.getGameStatus() == 3) { - //添加一场新的游戏记录 - gameRecordNew = new GameRecord(); - gameRecordNew.setId(snowflake.nextId()); - gameRecordNew.setUserPayId(gameUserPay.getId()); - //添加路径 - String gameUrl = WebConstant.TEST_URL_GAME_SQ; - switch (gameType.getCode()){ - case GameConstant.GAME_TYPE_SQ: break; - case GameConstant.GAME_TYPE_SP: gameUrl = WebConstant.TEST_URL_GAME_SP ; break; - case GameConstant.GAME_TYPE_BH: gameUrl = WebConstant.TEST_URL_GAME_BH; break; - default:break; - } - gameRecordNew.setUrl(gameUrl + gameType.getScreenUrl() + "?id=" + gameRecordNew.getId()); - gameRecordNew.setQrCodeUrl(gameUrl+ gameRecordNew.getId() + File.separator + gameType.getClientUrl()); - gameRecordDao.insertSelective(gameRecordNew); - //修改购买的游戏的使用次数 - gameUserPay.setUsedCount(gameUserPay.getUsedCount() + 1); - gameUserPayDao.updateByPrimaryKeySelective(gameUserPay); - - //路径(添加项目id) - String url = gameRecord.getUrl() + "&projectId=" + memberRecord.getProjectId(); - //给所有人发送消息发送消息 - ChromeMessageDto chromeMessageDto = new ChromeMessageDto(url, gameRecord.getId(), memberRecord.getProjectId(),gameType.getCode()); - BaseMessageDto.MessageUser messageUser = null; - List messageUserList = new ArrayList<>(); - //获取项目下所有成员 - List memberIdList = tallFeignClient.getMemberIdListByProject(memberRecord.getProjectId()); - if (CollectionUtil.isNotEmpty(memberIdList)) { - for (Long memberId : memberIdList) { - messageUser = new BaseMessageDto.MessageUser(); - messageUser.setUserId(memberId); - messageUserList.add(messageUser); - } + //之前的游戏若是准备中或进行中,则返回提示 + if(gameRecord.getGameStatus() == GameConstant.GAME_PREPARATION || + gameRecord.getGameStatus() == GameConstant.GAME_PROCESSING){ + throw new BaseException(CodeEnum.GAME_NO_END); + } + //若是未开始,则将之前的游戏状态改成已结束 + if(gameRecord.getGameStatus() == GameConstant.GAME_PENDING){ + gameRecord.setGameStatus(GameConstant.GAME_COMPLETED); + gameRecordDao.updateByPrimaryKeySelective(gameRecord); + } + GameRecord gameRecordNew; + //添加一场新的游戏记录 + gameRecordNew = new GameRecord(); + BeanUtil.copyProperties(gameRecord,gameRecordNew); + gameRecordNew.setId(snowflake.nextId()); + gameRecordNew.setUserPayId(gameUserPay.getId()); + gameRecordNew.setGameStatus(GameConstant.GAME_PENDING); + //添加路径 + String gameUrl = PropUtil.notGatewayUrl + WebConstant.TEST_URL_GAME_SQ; + switch (gameType.getCode()){ + case GameConstant.GAME_TYPE_SQ: break; + case GameConstant.GAME_TYPE_SP: gameUrl = PropUtil.notGatewayUrl + WebConstant.TEST_URL_GAME_SP ; break; + case GameConstant.GAME_TYPE_BH: gameUrl = PropUtil.notGatewayUrl + WebConstant.TEST_URL_GAME_BH; break; + default:break; + } + gameRecordNew.setUrl(gameUrl + gameType.getScreenUrl() + "?id=" + gameRecordNew.getId()); +// gameRecordNew.setQrCodeUrl(gameUrl+ gameRecordNew.getId() + File.separator + gameType.getClientUrl()); + if("1".equalsIgnoreCase(PropUtil.openWx)){ + //生成二维码 + String fileName = "/gameQrCode/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".png"; + String path = WebConstant.UPLOAD_PATH_BASE + fileName; + WxXcxUtil.getWxCode(WebConstant.QRCODE_GAME + , "id=" + gameRecordNew.getId() + "&type=" + gameType.getCode(), null, path,gameType.getCode()); + gameRecordNew.setQrCodeUrl(PropUtil.qrCode + fileName); + log.info("调用微信生成二维码"); + } else { + log.info("测试环境,不调用生成二维码"); + //给一个默认测试的 + gameRecord.setQrCodeUrl(PropUtil.qrCode + "/gameQrCode/2020-08-19/1597822577181.png"); + } + gameRecordDao.insertSelective(gameRecordNew); + //修改购买的游戏的使用次数 + gameUserPay.setUsedCount(gameUserPay.getUsedCount() + 1); + gameUserPayDao.updateByPrimaryKeySelective(gameUserPay); + if(gameRecord.getGameGroup() == 1){ + //复制分组信息 + GameGroupExample gameGroupExample = new GameGroupExample(); + gameGroupExample.createCriteria().andRecordIdEqualTo(gameRecord.getId()); + List gameGroupList = gameGroupDao.selectByExample(gameGroupExample); + if(CollectionUtil.isNotEmpty(gameGroupList)){ + gameGroupList.forEach(gameGroup -> { + GameGroup gameGroupNew = new GameGroup(); + BeanUtil.copyProperties(gameGroup,gameGroupNew); + gameGroupNew.setId(snowflake.nextId()); + gameGroupNew.setRecordId(gameRecordNew.getId()); + gameGroupDao.insertSelective(gameGroupNew); + }); } - chromeMessageDto.setReceivers(messageUserList); - messageService.sendGameMessageWithGetUrl(chromeMessageDto); + } - } else { - throw new BaseException(CodeEnum.GAME_NO_END); + //路径(添加项目id) + String url = gameRecord.getUrl() + "&projectId=" + memberRecord.getProjectId(); + //给所有人发送消息发送消息 + ChromeMessageDto chromeMessageDto = new ChromeMessageDto(url, gameRecord.getId(), memberRecord.getProjectId(),gameType.getCode()); + BaseMessageDto.MessageUser messageUser; + List messageUserList = new ArrayList<>(); + //获取项目下所有成员 + Set userIdSet = new HashSet<>(); + List memberIdList = tallFeignClient.getMemberIdListByProject(memberRecord.getProjectId()); + if (CollectionUtil.isNotEmpty(memberIdList)) { + for (Long memberId : memberIdList) { +// messageUser = new BaseMessageDto.MessageUser(); +// messageUser.setUserId(memberId); +// messageUserList.add(messageUser); + userIdSet.add(memberId.toString()); + } } + chromeMessageDto.setReceivers(messageUserList); + log.info("再玩一次发送消息:{}",chromeMessageDto); + messageService.sendGameMessageWithGetUrl(chromeMessageDto,userIdSet); + return gameRecordNew.getUrl(); } @@ -716,8 +1159,8 @@ public class ScreenService implements IScreenService { /** * 开始游戏 * - * @param start - * @return + * @param start 游戏记录,开始时间 + * @return 返回本地开始和结束时间 */ @Override public ScreenVo.StartGame startGame(ScreenDto.Start start) { @@ -737,29 +1180,39 @@ public class ScreenService implements IScreenService { case GameConstant.GAME_PROCESSING: throw new BaseException(CodeEnum.GAME_PROCESSING); case GameConstant.GAME_COMPLETED: - if (start.getStartStatus() == null || start.getStartStatus().byteValue() != GameConstant.GAME_RESTART_STATUS) { +// if (start.getStartStatus() == null || start.getStartStatus().byteValue() != GameConstant.GAME_RESTART_STATUS) { throw new BaseException(CodeEnum.GAME_COMPLETED); - } +// } + default: } //更新状态和时间 gameRecord.setGameStatus(GameConstant.GAME_PREPARATION); gameRecord.setStartTime(current + GameConstant.COUNT_DOWN_TIME); - gameRecord.setEndTime(gameRecord.getStartTime() + GameConstant.GAME_TIME); + gameRecord.setEndTime(gameRecord.getStartTime() + gameRecord.getDuration()*1000); gameRecord.setTimeDifference((int) moreTime); gameRecordDao.updateByPrimaryKeySelective(gameRecord); //设置redis 游戏状态 准备中 redisUtil.set(GameConstant.generateGameStatusKey(gameRecord.getId()), JSON.toJSONString(gameRecord), GameConstant.REDIS_TIME); - //再玩一次 - if (start.getStartStatus() != null && start.getStartStatus().byteValue() == GameConstant.GAME_RESTART_STATUS) { - //再玩一次,设置参见的用户为无效用户 - GameUserJoin delUserJoin = new GameUserJoin(); - delUserJoin.setRecStatus(WebConstant.REC_STATUS.Deleted.value); - GameUserJoinExample example = new GameUserJoinExample(); - example.createCriteria().andRecordIdEqualTo(start.getMemberRecord()); - gameUserJoinDao.updateByExampleSelective(delUserJoin, example); - redisUtil.del(GameConstant.generateGameKey(start.getMemberRecord())); + String groupKey = gameRecord.getId() + "_group"; + GameGroupExample groupExample = new GameGroupExample(); + groupExample.createCriteria().andRecordIdEqualTo(gameRecord.getId()); + List gameGroupList = gameGroupDao.selectByExample(groupExample); + if(CollectionUtil.isNotEmpty(gameGroupList)){ + gameGroupList.forEach(gameGroup -> { + redisUtil.zsSet(groupKey, JSONObject.toJSONString(gameGroup),0,600); + }); } +// //再玩一次 +// if (start.getStartStatus() != null && start.getStartStatus().byteValue() == GameConstant.GAME_RESTART_STATUS) { +// //再玩一次,设置参加的用户为无效用户 +// GameUserJoin delUserJoin = new GameUserJoin(); +// delUserJoin.setRecStatus(WebConstant.REC_STATUS.Deleted.value); +// GameUserJoinExample example = new GameUserJoinExample(); +// example.createCriteria().andRecordIdEqualTo(start.getMemberRecord()); +// gameUserJoinDao.updateByExampleSelective(delUserJoin, example); +// redisUtil.del(GameConstant.generateGameKey(start.getMemberRecord())); +// } //延时通知 long startSend = gameRecord.getStartTime() - System.currentTimeMillis(); long endSend = gameRecord.getEndTime() - System.currentTimeMillis(); @@ -831,8 +1284,7 @@ public class ScreenService implements IScreenService { /** * 推送客户端状态 * - * @param gameRecord - * @param executor + * @param gameRecord 游戏记录 */ private void pushClient(GameRecord gameRecord, ScheduledExecutorService executor) { @@ -860,7 +1312,7 @@ public class ScreenService implements IScreenService { }); long endTime = gameRecord.getEndTime() - System.currentTimeMillis(); - System.out.println("游戏结束"); + log.info("游戏结束"); sendMsg.sendMsg(executor, endTime > 0 ? endTime : 0, () -> { try { //查询游戏用户,通知游戏结束 @@ -910,6 +1362,7 @@ public class ScreenService implements IScreenService { ScreenVo.Group group = new ScreenVo.Group(); group.setGroupId(gameGroup.getId()); group.setGroupName(gameGroup.getName()); + group.setHeadPortraitUrl(gameGroup.getHeadPortraitUrl()); groupList.add(group); } } @@ -922,7 +1375,7 @@ public class ScreenService implements IScreenService { GameRecordExample recordExample = new GameRecordExample(); recordExample.createCriteria().andTaskIdEqualTo(taskId); - recordExample.setOrderByClause("created_at DESC"); + recordExample.setOrderByClause("id DESC"); List gameRecordList = gameRecordDao.selectByExample(recordExample); if (CollectionUtil.isNotEmpty(gameRecordList)) { if (StrUtil.isNotEmpty(gameType)) { @@ -944,4 +1397,135 @@ public class ScreenService implements IScreenService { } return recordInfo; } + + @Override + public List getConfig(QueryDto params)throws Exception { + log.info("获取游戏的配置表:{}",params); + ScreenDto.GetConfig getConfig = params.getParam(); + //根据游戏类型获取文件类型 + byte businessType = 8; + if( GameConstant.GAME_TYPE_SP.equalsIgnoreCase(getConfig.getGameType())){ + businessType = 9; + }else if( GameConstant.GAME_TYPE_BH.equalsIgnoreCase(getConfig.getGameType())){ + businessType = 10; + } + //查询该任务是否已有创建的游戏配置 + List wpsPath; + WpsDto.VisitWpsUrl visitWpsUrl = new WpsDto.VisitWpsUrl(); + visitWpsUrl.setBusinessId(getConfig.getTaskId()); + visitWpsUrl.setBusinessType(businessType); + visitWpsUrl.setUserId(params.getUserId()); + wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl); + log.info("是否已有创建的游戏配置:{}",wpsPath); + //有配置直接返回 + if (CollectionUtil.isNotEmpty(wpsPath)) { + return wpsPath; + } + //没有则生成默认模板并返回, + //查找游戏 + GameTypeExample gameTypeExample = new GameTypeExample(); + gameTypeExample.createCriteria().andCodeEqualTo(getConfig.getGameType()); + List gameTypeList = gameTypeDao.selectByExample(gameTypeExample); + if (CollectionUtil.isEmpty(gameTypeList)) { + throw new BaseException(CodeEnum.NOT_GAME_TYPE); + } + GameType gameType = gameTypeList.get(0); + log.info("查找游戏类型信息:{}",gameType); + //生成excel写入的数据 + String templatePath = WebConstant.HOME_STATICREC + "GameConfig.xlsx"; + log.info("游戏配置模板的地址:{}",templatePath); + InputStream is = new FileInputStream(new File(templatePath)); + Workbook wb = new XSSFWorkbook(is); + //生成文件 + String name = gameType.getName() + "游戏配置表.xlsx"; + String fileName = "game/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = WebConstant.UPLOAD_PATH_BASE + File.separator + fileName; + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + tmpFile.getParentFile().mkdirs(); + } + OutputStream stream = new FileOutputStream(tmpFile); + wb.write(stream); + stream.close(); + is.close(); + log.info("新生成模板文件的路径:{}",path); + //关联wps + WpsDto.Business business = new WpsDto.Business(); + business.setBusinessId(getConfig.getTaskId()); + business.setBusinessType(businessType); + business.setUserId(params.getUserId()); + business.setFileName(name); + business.setFilePath(fileName); + business.setFileSize(tmpFile.length()); + business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); + business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_WRITE); + tallFeignClient.saveWpsFile(business); + wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl); + return wpsPath; + } + + + /** + * 手机端再玩一次 + * @param params 游戏类型 + * @return 返回游戏id + */ + @Override + public Long startAgainByPhone(QueryDto params) { + log.info("手机端再玩一次:{}",params); + ScreenDto.StartAgainByPhone startAgainByPhone = params.getParam(); + Long userId = params.getUserId(); + + //查找游戏 + GameTypeExample gameTypeExample = new GameTypeExample(); + gameTypeExample.createCriteria().andCodeEqualTo(startAgainByPhone.getGameType()); + List gameTypeList = gameTypeDao.selectByExample(gameTypeExample); + if (CollectionUtil.isEmpty(gameTypeList)) { + throw new BaseException(CodeEnum.NOT_GAME_TYPE); + } + GameType gameType = gameTypeList.get(0); + log.info("查找游戏类型:{}",gameType); + //2、查找此用户购买的此游戏的信息,若没有则添加一条记录,默认已付款,结束时间为添加后的一个月,默认次数为10次 + GameUserPay gameUserPay = getGameUserPay(userId, gameType); + + //3、根据用户购买的记录,添加一场新的游戏记录 + GameRecord gameRecord = new GameRecord(); + gameRecord.setId(snowflake.nextId()); + gameRecord.setUserPayId(gameUserPay.getId()); + gameRecord.setGameGroup((byte) 0); +// gameRecord.setGameStatus((byte) 1); + //添加路径 + String gameUrl = PropUtil.notGatewayUrl + WebConstant.TEST_URL_GAME_SQ; + switch (gameType.getCode()){ + case GameConstant.GAME_TYPE_SQ: break; + case GameConstant.GAME_TYPE_SP: gameUrl = PropUtil.notGatewayUrl + WebConstant.TEST_URL_GAME_SP; break; + case GameConstant.GAME_TYPE_BH: gameUrl = PropUtil.notGatewayUrl + WebConstant.TEST_URL_GAME_BH; break; + default:break; + } + gameRecord.setUrl(gameUrl + gameType.getScreenUrl() + "?id=" + gameRecord.getId()); + gameRecordDao.insertSelective(gameRecord); + + log.info("添加游戏记录:{}",gameRecord); + //配置表不存在,而且游戏类型默认为分组游戏,默认添加两个分组 + if (gameType.getIsGroup() == 1) { + GameGroup gameGroupRed = new GameGroup(); + gameGroupRed.setId(snowflake.nextId()); + gameGroupRed.setRecordId(gameRecord.getId()); + gameGroupRed.setName("红队"); + gameGroupRed.setCode(GameConstant.FIRST_GROUP); + gameGroupDao.insertSelective(gameGroupRed); + GameGroup gameGroupBlue = new GameGroup(); + gameGroupBlue.setId(snowflake.nextId()); + gameGroupBlue.setRecordId(gameRecord.getId()); + gameGroupBlue.setName("蓝队"); + gameGroupBlue.setCode(GameConstant.SECOND_GROUP); + gameGroupDao.insertSelective(gameGroupBlue); + } + ScreenDto.Start start = new ScreenDto.Start(); + start.setLocalTime(System.currentTimeMillis()); + start.setMemberRecord(gameRecord.getId()); + start.setStartStatus((byte) 1); + startGame(start); + return gameRecord.getId(); + } } diff --git a/game/src/main/java/com/ccsens/game/util/GameConstant.java b/game/src/main/java/com/ccsens/game/util/GameConstant.java index a82ac891..32fdea77 100644 --- a/game/src/main/java/com/ccsens/game/util/GameConstant.java +++ b/game/src/main/java/com/ccsens/game/util/GameConstant.java @@ -29,14 +29,35 @@ public class GameConstant { /**游戏key*/ public static final String GAME_SCORE_KEY = "_scores"; public static final String GAME_STATUS_KEY = "_status"; + /**游戏分组人数key 分组ID_group_num*/ + public static final String GAME_GROUP_NUM = "_group_num"; /**数据默认保存 10分钟*/ public static final long REDIS_TIME = 600 ; + /**缓存时间:20minute*/ + public static final long REDIS_TIME_TWENTY = 1200 ; /**倒计时:10s ms值*/ public static final long COUNT_DOWN_TIME = 10*1000; /**游戏时长:1分钟 ms值*/ public static final long GAME_TIME = 60*1000; /**再来一次*/ public static final byte GAME_RESTART_STATUS = 1; + /**个人*/ + public static final String EXCEL_GAME_INDIVIDUAL = "个人"; + /**团体*/ + public static final String EXCEL_GAME_GROUP = "团队"; + /**按人均分排名*/ + public static final String GAME_RANK_AVE = "按人均分排名"; + /**按总分排名*/ + public static final String GAME_RANK_TOTAL = "按总分排名"; + + /**排序规则:平均分*/ + public static final byte RANK_RULE_AVA = 1; + /**排序规则:总分*/ + public static final byte RANK_RULE_TOTAL = 0; + /**游戏:分组*/ + public static final byte GAME_GROUP = 1; + /**游戏:单人*/ + public static final byte GAME_SINGLE = 0; /** * 生成游戏key diff --git a/game/src/main/java/com/ccsens/game/util/SendMsg.java b/game/src/main/java/com/ccsens/game/util/SendMsg.java index 6d81df28..33e4922a 100644 --- a/game/src/main/java/com/ccsens/game/util/SendMsg.java +++ b/game/src/main/java/com/ccsens/game/util/SendMsg.java @@ -6,24 +6,23 @@ import com.alibaba.fastjson.JSON; import com.ccsens.game.bean.dto.ClientDto; import com.ccsens.game.bean.dto.message.ChangeStatusMessageDto; import com.ccsens.game.bean.dto.message.GameMessageWithChangeStatusOut; -import com.ccsens.game.bean.po.GameGroup; -import com.ccsens.game.bean.po.GameGroupExample; import com.ccsens.game.bean.po.GameRecord; import com.ccsens.game.bean.vo.ClientVo; -import com.ccsens.game.persist.dao.GameGroupDao; -import com.ccsens.game.persist.dao.GameUserJoinDao; -import com.ccsens.game.service.ClientService; +import com.ccsens.game.bean.vo.ScreenVo; +import com.ccsens.game.service.IClientService; +import com.ccsens.game.service.IScreenService; import com.ccsens.util.JacksonUtil; import com.ccsens.util.RedisUtil; +import com.ccsens.util.WebConstant; import com.ccsens.util.config.RabbitMQConfig; import com.fasterxml.jackson.core.JsonProcessingException; -import io.swagger.models.auth.In; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.AmqpTemplate; -import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.data.redis.core.ZSetOperations; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.HashSet; import java.util.List; @@ -39,11 +38,14 @@ import java.util.concurrent.TimeUnit; @Service @Slf4j public class SendMsg { - @Autowired - private ClientService clientService; - @Autowired + @Resource + private IClientService clientService; + @Lazy + @Resource + private IScreenService screenService; + @Resource private AmqpTemplate rabbitTemplate; - @Autowired + @Resource private RedisUtil redisUtil; public void sendStatus(GameRecord gameRecord, List userJoins, byte status) throws JsonProcessingException { @@ -53,14 +55,24 @@ public class SendMsg { if (CollectionUtil.isEmpty(userJoins)) { return; } + Set userIds = new HashSet<>(); userJoins.forEach(join -> { outs.add(getMsg(userJoins, gameRecord, join, status)); + +// InMessage inMessage = new InMessage(); +// +// userIds.add(String.valueOf(join.getUserId())); +// inMessage.setToDomain(MessageConstant.DomainType.User); +// inMessage.setTos(userIds); +// inMessage.setData(JSONObject.toJSONString(getMsg(userJoins, gameRecord, join, status))); +// rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, JSONObject.toJSONString(inMessage)); + }); if (CollectionUtil.isNotEmpty(outs)) { rabbitTemplate.convertAndSend(RabbitMQConfig.GAME_STATUS, JacksonUtil.beanToJson(outs)); log.info("发送成功:{}", JacksonUtil.beanToJson(outs)); - } + } public GameMessageWithChangeStatusOut getMsg(List userJoins, GameRecord gameRecord, ClientDto.RedisUser join, byte gameStatus) { @@ -70,6 +82,7 @@ public class SendMsg { data.setRecordId(gameRecord.getId()); data.setGameStatus(gameStatus); out.setUserId(join.getUserId()); + out.setType(WebConstant.Message_Type.ChangeStatus.phase); ChangeStatusMessageDto dtos = new ChangeStatusMessageDto(); switch (gameStatus) { case GameConstant.GAME_COMPLETED: @@ -77,7 +90,20 @@ public class SendMsg { ChangeStatusMessageDto.CompletedData completedData = new ChangeStatusMessageDto.CompletedData(); //如果是分组游戏,获取本组分数信息 if (ObjectUtil.isNotNull(join.getGroupId())) { - ClientVo.GroupScore groupScore = clientService.getGroupScore(join.getGroupId(),gameRecord.getId()); +// ClientVo.GroupScore groupScore = clientService.getGroupScore(join.getGroupId(),gameRecord.getId()); +// completedData.setGroupScore(groupScore); + ClientVo.GroupScore groupScore = new ClientVo.GroupScore(); + List groupVoList = screenService.getGroupScore2(gameRecord); + for (int i = 0; i < groupVoList.size(); i++) { + ScreenVo.GroupVo groupVo = groupVoList.get(i); + if(groupVo.getGroupId().longValue() == join.getGroupId().longValue()){ + groupScore = new ClientVo.GroupScore(); + groupScore.setGroupScore(groupVo.getTotalScore()); + groupScore.setGroupTimes(groupVo.getTotalTimes()); + groupScore.setGroupSort(i+1); + break; + } + } completedData.setGroupScore(groupScore); } completedData.setTimes(join.getTimes()); @@ -100,6 +126,7 @@ public class SendMsg { pendingData.setEndLocalTime(join.getLocalEndTime()); dtos.setPendingData(pendingData); break; + default: } data.setChangeStatusMessageDto(dtos); out.setData(data); @@ -109,9 +136,9 @@ public class SendMsg { /** * 定时任务 * - * @param executor - * @param delayTime - * @param runnable + * @param executor 执行者 + * @param delayTime 延时时间 + * @param runnable 线程 */ public void sendMsg(ScheduledExecutorService executor, long delayTime, Runnable runnable) { executor.schedule(new Thread(runnable), delayTime, TimeUnit.MILLISECONDS); diff --git a/game/src/main/resources/application-dev.yml b/game/src/main/resources/application-dev.yml index 996b5efa..acc4b645 100644 --- a/game/src/main/resources/application-dev.yml +++ b/game/src/main/resources/application-dev.yml @@ -27,3 +27,8 @@ spring: swagger: enable: true +gatewayUrl: https://test.tall.wiki/gateway/ +notGatewayUrl: https://test.tall.wiki/ +file: + qrCode: https://test.tall.wiki/gateway/tall/uploads/ + openWX: 0 diff --git a/game/src/main/resources/application-prod.yml b/game/src/main/resources/application-prod.yml new file mode 100644 index 00000000..207fad5e --- /dev/null +++ b/game/src/main/resources/application-prod.yml @@ -0,0 +1,37 @@ +server: + port: 7050 + servlet: + context-path: +spring: + application: + name: game + datasource: + type: com.alibaba.druid.pool.DruidDataSource + rabbitmq: + host: 127.0.0.1 + password: 111111 + port: 5672 + username: admin + redis: + database: 0 + host: 127.0.0.1 + jedis: + pool: + max-active: 200 + max-idle: 10 + max-wait: -1ms + min-idle: 0 + password: '' + port: 6379 + timeout: 1000ms +swagger: + enable: true +eureka: + instance: + ip-address: 192.144.182.42 + +gatewayUrl: https://www.tall.wiki/gateway/ +notGatewayUrl: https://www.tall.wiki/ +file: + qrCode: https://www.tall.wiki/gateway/tall/v1.0/uploads/ + openWX: 1 \ No newline at end of file diff --git a/game/src/main/resources/application-test.yml b/game/src/main/resources/application-test.yml index dc6a2aa8..93232b12 100644 --- a/game/src/main/resources/application-test.yml +++ b/game/src/main/resources/application-test.yml @@ -8,7 +8,11 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: +<<<<<<< HEAD host: 81.70.54.64 +======= + host: 127.0.0.1 +>>>>>>> pt password: 111111 port: 5672 username: admin @@ -28,4 +32,14 @@ swagger: enable: true eureka: instance: - ip-address: 192.168.0.99 \ No newline at end of file +<<<<<<< HEAD + ip-address: 192.168.0.99 +======= + ip-address: 192.168.0.99 + +gatewayUrl: https://test.tall.wiki/gateway/ +notGatewayUrl: https://test.tall.wiki/ +file: + qrCode: https://test.tall.wiki/gateway/tall/v1.0/uploads/ + openWX: 0 +>>>>>>> pt diff --git a/game/src/main/resources/application.yml b/game/src/main/resources/application.yml index 5889ff7f..d082c0ea 100644 --- a/game/src/main/resources/application.yml +++ b/game/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: test - include: common, util-test \ No newline at end of file + active: prod + include: common, util-prod \ No newline at end of file diff --git a/game/src/main/resources/archive/SQ.txt b/game/src/main/resources/archive/SQ.txt new file mode 100644 index 00000000..68d68b51 --- /dev/null +++ b/game/src/main/resources/archive/SQ.txt @@ -0,0 +1,94 @@ + tall game anyring SQ + + + +1.PT获取配置(有则取已存,无则取默认) +2.PT获取大屏路径 + 创建游戏购买记录,默认10次 + 添加游戏记录(根据配置,无配置,游戏类型默认是分组,则给默认分组) + 给项目下所有用户发送 大屏路径 游戏ID 项目ID 游戏类型 +3.开始游戏 + 游戏在准备中,进行中,已结合不能再开始 + 更新db游戏状态和开始、结束时间(配置游戏时长) + 更新redis游戏状态为准备中 10分钟 + 更新redis各分组分数(0分 10分钟) + 定时更新 + 进行中:修改redis和db的游戏状态,redis游戏信息 + 结束时:1.修改redis和db的游戏状态,redis游戏信息 + 2.将游戏下用户的分数更新到数据库 + 更新db用户的开始和结束时间 + 更新redis游戏下所有用户的分数(0分 10分钟) + 定时推送客户端 + 准备中0 根据redis查询用户信息,通知用户游戏倒计时 游戏开始时间和结束时间 + 进行中10 根据redis查询用户信息,通知用户游戏倒计时 游戏开始时间和结束时间 + 结束时70 根据redis查询用户信息,通知用户结束,分组分数,个人分数 + 个人分数:查询游戏下的所有用户,分装起分数信息,次数(分数/100),排名,超过% + 分组分数:查询redis所有分组分数,获取分数,次数,排名 + redis无数据,查数据库分组信息 +4.查询游戏基本信息 + 1.查询游戏基本信息(redis,db) + 2.用户总数(redis用户分数长度,db) + 3.分组 + redis:查询分组分数,依次查询组内总人数(redis),根据计分规则,修改分数和次数(总分,均分) + 若均分,则重新排序 + db:查询数据库分数总人数等信息 + 总分,返回 + 均分,重新计算,排序,返回(注:此处次数为计算均次数) + 4.根据状态,查询其他信息 + 未开始:规则等 + 准备中:开始时间 (大屏:游戏 用户:用户参加游戏的开始时间db) + 已结束:个人赛: + redis:查询所有人的分数,计算总分,总次数,平均次数,超过% + db:查询所有人的成绩,计算上述信息 + 前十名(redis/db) + 团体赛: + 查询所有团队分数(redis/db),计算总分,总次数,均分,均次数 + 查询均分超过%(db) + 查询前十名 +5.查询游戏状态 + 1.查询游戏基本信息(redis,db) + 2.用户总数(redis用户分数长度,db) + 3.分组(同查详情) + 3.根据状态,查询其他信息 + 准备中:开始时间 (大屏:游戏 用户:用户参加游戏的开始时间db) + 进行中:未分组,前十名(redis/db) + 分组,=分组 + 已结束:同详情 +6.加入游戏 + 1.游戏分组,分组ID为null或不正确,返回参数有误 + 2.用户已加入(db) + 返回分组信息 + 准备中、进行中:开始、结束时间 + 已结束: + 分组成绩(db) + 个人成绩,超过%,排名(db) + 3.游戏已结束: + 个人成绩为0 + 团队成绩(db) + 4.组内成员达到上限 返回达到上限 + 5.保存用户加入游戏(db) + 查询用户user信息 + 昵称为空取phone,中间四位脱敏 + 6.若分组,保存分组信息(db),更新redis改组人数 + 7.若游戏在进行中或准备中,更新redis用户分数 + 8.返回用户信息(同2) +7.根据游戏id获取分组信息 db +8.根据任务id获取游戏记录id db +9.组内排行榜 + 查库 +10.全员排行榜 + redis/db 所有人分数排名+总数 +11.授权:token,recordId +12.计分 + 1.获取授权时的userid,record, 为空,return + 2.游戏结束,return + 3.redis 用户分数(recordId+userid)为空,return + 4.更新redis用户分数(+100) + 5.redis 更新所属分组分数 + 6.分会总分数,总次数 + + + + + + \ No newline at end of file diff --git a/game/src/main/resources/archive/流程图.png b/game/src/main/resources/archive/流程图.png new file mode 100644 index 00000000..ceed9226 Binary files /dev/null and b/game/src/main/resources/archive/流程图.png differ diff --git a/game/src/main/resources/druid-test.yml b/game/src/main/resources/druid-test.yml index 7025ba18..1d5e981e 100644 --- a/game/src/main/resources/druid-test.yml +++ b/game/src/main/resources/druid-test.yml @@ -27,7 +27,10 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 +<<<<<<< HEAD # url: jdbc:mysql://test.tall.wiki/game?useUnicode=true&characterEncoding=UTF-8 +======= +>>>>>>> pt url: jdbc:mysql://49.233.89.188:3306/game?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL diff --git a/game/src/main/resources/mapper_dao/GameGroupDao.xml b/game/src/main/resources/mapper_dao/GameGroupDao.xml new file mode 100644 index 00000000..24fcd767 --- /dev/null +++ b/game/src/main/resources/mapper_dao/GameGroupDao.xml @@ -0,0 +1,59 @@ + + + + + + + + \ No newline at end of file diff --git a/game/src/main/resources/mapper_raw/GameGroupMapper.xml b/game/src/main/resources/mapper_raw/GameGroupMapper.xml index 38e6baa4..747e4a8c 100644 --- a/game/src/main/resources/mapper_raw/GameGroupMapper.xml +++ b/game/src/main/resources/mapper_raw/GameGroupMapper.xml @@ -9,6 +9,7 @@ + @@ -69,7 +70,7 @@ - id, record_id, code, name, created_at, updated_at, rec_status + id, record_id, code, name, created_at, updated_at, rec_status, head_portrait_url @@ -188,6 +195,9 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + head_portrait_url = #{record.headPortraitUrl,jdbcType=VARCHAR}, + @@ -201,7 +211,8 @@ name = #{record.name,jdbcType=VARCHAR}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + head_portrait_url = #{record.headPortraitUrl,jdbcType=VARCHAR} @@ -227,6 +238,9 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR}, + where id = #{id,jdbcType=BIGINT} @@ -237,7 +251,8 @@ name = #{name,jdbcType=VARCHAR}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/game/src/main/resources/mapper_raw/GameRecordMapper.xml b/game/src/main/resources/mapper_raw/GameRecordMapper.xml index 67ad2db8..5b433504 100644 --- a/game/src/main/resources/mapper_raw/GameRecordMapper.xml +++ b/game/src/main/resources/mapper_raw/GameRecordMapper.xml @@ -14,6 +14,10 @@ + + + + @@ -75,7 +79,8 @@ id, user_pay_id, task_id, url, QR_code_url, time_difference, start_time, end_time, - game_status, created_at, updated_at, rec_status + game_status, created_at, updated_at, rec_status, game_group, duration, member_limit, + rank_rule @@ -243,6 +274,18 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + game_group = #{record.gameGroup,jdbcType=TINYINT}, + + + duration = #{record.duration,jdbcType=INTEGER}, + + + member_limit = #{record.memberLimit,jdbcType=INTEGER}, + + + rank_rule = #{record.rankRule,jdbcType=TINYINT}, + @@ -261,7 +304,11 @@ game_status = #{record.gameStatus,jdbcType=TINYINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + game_group = #{record.gameGroup,jdbcType=TINYINT}, + duration = #{record.duration,jdbcType=INTEGER}, + member_limit = #{record.memberLimit,jdbcType=INTEGER}, + rank_rule = #{record.rankRule,jdbcType=TINYINT} @@ -302,6 +349,18 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + game_group = #{gameGroup,jdbcType=TINYINT}, + + + duration = #{duration,jdbcType=INTEGER}, + + + member_limit = #{memberLimit,jdbcType=INTEGER}, + + + rank_rule = #{rankRule,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -317,7 +376,11 @@ game_status = #{gameStatus,jdbcType=TINYINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + game_group = #{gameGroup,jdbcType=TINYINT}, + duration = #{duration,jdbcType=INTEGER}, + member_limit = #{memberLimit,jdbcType=INTEGER}, + rank_rule = #{rankRule,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/game/src/main/resources/mbg.xml b/game/src/main/resources/mbg.xml index bb23d3f1..409b4ca7 100644 --- a/game/src/main/resources/mbg.xml +++ b/game/src/main/resources/mbg.xml @@ -57,7 +57,7 @@ - +
diff --git a/health/src/main/java/com/ccsens/health/api/DebugController.java b/health/src/main/java/com/ccsens/health/api/DebugController.java index f4c8b5ec..620732f6 100644 --- a/health/src/main/java/com/ccsens/health/api/DebugController.java +++ b/health/src/main/java/com/ccsens/health/api/DebugController.java @@ -1,8 +1,6 @@ package com.ccsens.health.api; import com.ccsens.util.JsonResponse; -import com.ccsens.util.WebConstant; -import com.ccsens.util.wx.WxXcxUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; @@ -31,14 +29,14 @@ public class DebugController { }) @RequestMapping(value="qrcode",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) public JsonResponse qrcode(HttpServletRequest request) throws Exception { - WxXcxUtil.LineColor color = new WxXcxUtil.LineColor(); - color.r = "243"; - color.g = "139"; - color.b = "0"; - WxXcxUtil.getWxCode("pages/index/index" - ,"d=1218855229722857472",color,"/home/cloud/tall/uploads/qrCode/00112.png"); -// WxXcxUtil.getWxCodeTest("pages/index/index?t=eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1ODM4MDc3MzcsInN1YiI6IjEyMTg4NTUyMjk3MjI4NTc0NzIiLCJhdXRoSWQiOiIxMTc3MDQwNjY" -// ,"d=1217647686598135808",color,"/home/cloud/tall/uploads/qrCode/158357267174.png"); +// WxXcxUtil.LineColor color = new WxXcxUtil.LineColor(); +// color.r = "243"; +// color.g = "139"; +// color.b = "0"; +// WxXcxUtil.getWxCode("pages/index/index" +// ,"d=1218855229722857472",color,"/home/cloud/tall/uploads/qrCode/00112.png",null); +//// WxXcxUtil.getWxCodeTest("pages/index/index?t=eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1ODM4MDc3MzcsInN1YiI6IjEyMTg4NTUyMjk3MjI4NTc0NzIiLCJhdXRoSWQiOiIxMTc3MDQwNjY" +//// ,"d=1217647686598135808",color,"/home/cloud/tall/uploads/qrCode/158357267174.png"); return JsonResponse.newInstance().ok("完成"); } diff --git a/health/src/main/java/com/ccsens/health/api/WxTest.java b/health/src/main/java/com/ccsens/health/api/WxTest.java index 9fafe3f0..ff25bdd3 100644 --- a/health/src/main/java/com/ccsens/health/api/WxTest.java +++ b/health/src/main/java/com/ccsens/health/api/WxTest.java @@ -5,6 +5,7 @@ import cn.hutool.json.JSONUtil; import com.ccsens.util.JacksonUtil; import com.ccsens.util.enterprisewx.AesException; import com.ccsens.util.enterprisewx.WXBizMsgCrypt; +import lombok.extern.slf4j.Slf4j; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -14,7 +15,7 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import java.io.StringReader; import java.net.URLDecoder; - +@Slf4j public class WxTest { public static void main(String[] args) throws Exception { String sToken = "4CxIpRDBWHMiePP3x6muNe4hRj"; @@ -31,9 +32,9 @@ public class WxTest { String sVerifyNonce = "1"; String sEchoStr = wxcpt.VerifyURL(sVerifyMsgSig, sVerifyTimeStamp, sVerifyNonce, sVerifyEchoStr); - System.out.println("verifyurl echostr: " + sEchoStr); + log.info("verifyurl echostr: " + sEchoStr); String s = JacksonUtil.xmlToJson(sEchoStr); - System.out.println("s:"+s); + log.info("s:"+s); } diff --git a/health/src/main/java/com/ccsens/health/config/SpringConfig.java b/health/src/main/java/com/ccsens/health/config/SpringConfig.java index 59f4b660..a7a7a70f 100644 --- a/health/src/main/java/com/ccsens/health/config/SpringConfig.java +++ b/health/src/main/java/com/ccsens/health/config/SpringConfig.java @@ -111,7 +111,7 @@ public class SpringConfig implements WebMvcConfigurer { .addResourceLocations("classpath:/META-INF/resources/webjars/"); registry.addResourceHandler("/uploads/**") - .addResourceLocations("file:///home/cloud/tall/uploads/"); + .addResourceLocations("file:///home/cloud/health/uploads/"); //super.addResourceHandlers(registry); } diff --git a/health/src/main/java/com/ccsens/health/service/AsyncService.java b/health/src/main/java/com/ccsens/health/service/AsyncService.java index 8ca5b82b..3cba2c43 100644 --- a/health/src/main/java/com/ccsens/health/service/AsyncService.java +++ b/health/src/main/java/com/ccsens/health/service/AsyncService.java @@ -2,7 +2,6 @@ package com.ccsens.health.service; import cn.hutool.core.bean.BeanUtil; import com.alibaba.fastjson.JSONObject; -import com.ccsens.health.bean.po.HealthRecords; import com.ccsens.health.bean.vo.HealthVo; import com.ccsens.health.util.HealthConstant; import com.ccsens.util.PropUtil; @@ -10,7 +9,6 @@ import com.ccsens.util.RedisUtil; import com.ccsens.util.WebConstant; import com.ccsens.util.wx.WxXcxUtil; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.AsyncResult; import org.springframework.stereotype.Service; @@ -40,7 +38,7 @@ public class AsyncService implements IAsyncService { String fileName = "/qrCode/" + cn.hutool.core.date.DateUtil.today() + "/" + System.currentTimeMillis() + ".png"; String path = WebConstant.UPLOAD_PATH_BASE+fileName; WxXcxUtil.getWxCode(WebConstant.QRCODE_HEALTH - ,scene,color,path); + ,scene,color,path,"health"); String qrcodePath = PropUtil.qrCode + fileName; log.info("二维码路径:{}", qrcodePath); return new AsyncResult(qrcodePath); diff --git a/health/src/main/java/com/ccsens/health/service/ClockService.java b/health/src/main/java/com/ccsens/health/service/ClockService.java index f2dda75d..5ed10543 100644 --- a/health/src/main/java/com/ccsens/health/service/ClockService.java +++ b/health/src/main/java/com/ccsens/health/service/ClockService.java @@ -20,7 +20,6 @@ import com.ccsens.util.exception.BaseException; import com.ccsens.util.wx.WxXcxUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import com.netflix.discovery.provider.ISerializer; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -297,7 +296,7 @@ public class ClockService implements IClockService { String fileName = "/qrCode/" + cn.hutool.core.date.DateUtil.today() + "/" + System.currentTimeMillis() + ".png"; String path = WebConstant.UPLOAD_PATH_BASE + fileName; WxXcxUtil.getWxCode(WebConstant.QRCODE_SITE - , "d=" + siteQrcode.getId() + "&t=" + createQRCode.getType(), null, path); + , "d=" + siteQrcode.getId() + "&t=" + createQRCode.getType(), null, path,"health"); qrcodePath = PropUtil.qrCode + fileName; log.info("调用微信生成二维码"); } else { diff --git a/health/src/main/java/com/ccsens/health/service/WeiXinService.java b/health/src/main/java/com/ccsens/health/service/WeiXinService.java index 73f7b473..8d9be9da 100644 --- a/health/src/main/java/com/ccsens/health/service/WeiXinService.java +++ b/health/src/main/java/com/ccsens/health/service/WeiXinService.java @@ -273,10 +273,11 @@ public class WeiXinService implements IWeiXinService { * @param departments */ private void insertBatchDepartment(List departments) { - TransactionStatus status = TransactionUtil.getTransactionStatus(transactionManager); + int size = departments.size(); int once = 100; for (int i = 0; i < size; i+=once) { + TransactionStatus status = TransactionUtil.getTransactionStatus(transactionManager); int end = i+once > size ? size : i+once; try { departmentDao.insertBatch(departments.subList(i, end)); diff --git a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java b/ht/src/main/java/com/ccsens/ht/service/DoctorService.java index e05e5c02..7d672ca7 100644 --- a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java +++ b/ht/src/main/java/com/ccsens/ht/service/DoctorService.java @@ -19,14 +19,12 @@ import com.ccsens.util.exception.BaseException; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; import java.util.ArrayList; diff --git a/ht/src/main/resources/application-prod.yml b/ht/src/main/resources/application-prod.yml index 0c42c155..c2a54f79 100644 --- a/ht/src/main/resources/application-prod.yml +++ b/ht/src/main/resources/application-prod.yml @@ -21,7 +21,11 @@ spring: max-idle: 10 max-wait: -1ms min-idle: 0 +<<<<<<< HEAD password: '' +======= + password: 'areowqr!@43ef' +>>>>>>> pt port: 6379 timeout: 1000ms @@ -38,4 +42,8 @@ ht: name: 认知功能评测云平台系统 eureka: instance: - ip-address: 81.70.54.64 \ No newline at end of file +<<<<<<< HEAD + ip-address: 81.70.54.64 +======= + ip-address: 71.80.54.64 +>>>>>>> pt diff --git a/mt/src/main/java/com/ccsens/mt/api/CompeteController.java b/mt/src/main/java/com/ccsens/mt/api/CompeteController.java new file mode 100644 index 00000000..04586466 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/CompeteController.java @@ -0,0 +1,173 @@ +package com.ccsens.mt.api; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.mt.bean.dto.CompeteDto; +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.mt.service.ICompeteService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.io.IOException; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "线上体育竞技比赛", description = "") +@RestController +@RequestMapping("/compete") +public class CompeteController { + @Resource + private ICompeteService competeService; + + @MustLogin + @ApiOperation(value = "查看当前是第几届比赛", notes = "") + @RequestMapping(value = "/competeTime", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getCompeteTime(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看当前是第几届比赛:{}",params); + CompeteVo.CompeteTime competeTime = competeService.getCompeteTime(params); + return JsonResponse.newInstance().ok(competeTime); + } + + @MustLogin + @ApiOperation(value = "查看组别信息", notes = "") + @RequestMapping(value = "/group", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryCompeteGroup(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看组别信息:{}",params); + List competeGroups = competeService.queryCompeteGroup(params); + return JsonResponse.newInstance().ok(competeGroups); + } + + + @MustLogin + @ApiOperation(value = "根据项目查找组别信息 ", notes = "") + @RequestMapping(value = "/group/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryGroupByProject(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("扫码加入团队:{}",params); + List groupByProject = competeService.queryGroupByProject(params); + return JsonResponse.newInstance().ok(groupByProject); + } + + @MustLogin + @ApiOperation(value = "模糊查询参赛单位", notes = "") + @RequestMapping(value = "/company", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryCompeteCompany(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("模糊查询参赛单位:{}",params); + List competeCompanyList = competeService.queryCompeteCompany(params); + return JsonResponse.newInstance().ok(competeCompanyList); + } + + @MustLogin + @ApiOperation(value = "刷新redis内的参赛单位信息", notes = "") + @RequestMapping(value = "/sync/company", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse syncCompeteCompany(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("刷新redis内的参赛单位信息:{}",params); + competeService.syncCompeteCompany(params); + return JsonResponse.newInstance().ok(); + } + + + @MustLogin + @ApiOperation(value = "提交报名基本信息", notes = "") + @RequestMapping(value = "/save/player", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveCompetePlayerInfo(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("提交报名基本信息:{}",params); + CompeteVo.CompetePlayerInfo competePlayerInfo = competeService.saveCompetePlayerInfo(params); + return JsonResponse.newInstance().ok(competePlayerInfo); + } + + @MustLogin + @ApiOperation(value = "查看参赛项目信息", notes = "") + @RequestMapping(value = "/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryCompeteProject(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看参赛项目信息:{}",params); + List competeProjects = competeService.queryCompeteProject(params); + return JsonResponse.newInstance().ok(competeProjects); + } + +// @MustLogin +// @ApiOperation(value = "根据组别查看比赛项目 ", notes = "") +// @RequestMapping(value = "/project/group", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse> queryProjectByGroup(@ApiParam @Validated @RequestBody QueryDto params) { +// log.info("扫码加入团队:{}",params); +// List projectByGroup = competeService.queryProjectByGroup(params); +// return JsonResponse.newInstance().ok(projectByGroup); +// } + + @MustLogin + @ApiOperation(value = "提交选择的比赛项目", notes = "") + @RequestMapping(value = "/save/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveCompeteProject(@ApiParam @Validated @RequestBody QueryDto params) throws IOException { + log.info("提交选择的比赛项目:{}",params); + CompeteVo.CompetePlayerInfo competePlayerInfo = competeService.saveCompeteProject(params); + return JsonResponse.newInstance().ok(competePlayerInfo); + } + + @MustLogin + @ApiOperation(value = "查看本人所有参赛的项目", notes = "") + @RequestMapping(value = "/projectAll", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryCompeteProjectAllByUser(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看本人所有参赛的项目:{}",params); + CompeteVo.CompeteProjectAllByUser competeProjectAll = competeService.queryCompeteProjectAllByUser(params); + return JsonResponse.newInstance().ok(competeProjectAll); + } + + @MustLogin + @ApiOperation(value = "查看团队比赛的邀请二维码", notes = "") + @RequestMapping(value = "/qrCode", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getQrCodeByTeamId(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看团队比赛的邀请二维码:{}",params); + String qrCodeUrl = competeService.getQrCodeByTeamId(params); + return JsonResponse.newInstance().ok(qrCodeUrl); + } + + @MustLogin + @ApiOperation(value = "查看个人基本报名信息", notes = "") + @RequestMapping(value = "/playerInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getCompetePlayerInfo(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看个人基本报名信息:{}",params); + CompeteVo.GetPlayerInfo getPlayerInfo = competeService.getCompetePlayerInfo(params); + return JsonResponse.newInstance().ok(getPlayerInfo); + } + + + @MustLogin + @ApiOperation(value = "扫码加入团队", notes = "") + @RequestMapping(value = "/joinGroup", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse joinCompeteGroup(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("扫码加入团队:{}",params); + CompeteVo.CompeteTeamProject competeTeamProject = competeService.joinCompeteGroup(params); + return JsonResponse.newInstance().ok(competeTeamProject); + } + + @MustLogin + @ApiOperation(value = "提交报名信息和参加比赛", notes = "") + @RequestMapping(value = "/submit", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse submitProjectAndGroup(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("扫码加入团队:{}",params); + competeService.submitProjectAndGroup(params); + return JsonResponse.newInstance().ok(); + } + + +// @MustLogin +// @ApiOperation(value = "查询比赛项目上的参赛选手列表", notes = "") +// @RequestMapping(value = "/get/players", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse queryPlayerList(@ApiParam @Validated @RequestBody QueryDto params) { +// log.info("查询比赛项目上的参赛选手列表:{}",params); +// CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params); +// return JsonResponse.newInstance().ok(playerList); +// } + +} diff --git a/mt/src/main/java/com/ccsens/mt/api/CompeteScoreController.java b/mt/src/main/java/com/ccsens/mt/api/CompeteScoreController.java new file mode 100644 index 00000000..a855fda7 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/CompeteScoreController.java @@ -0,0 +1,51 @@ +package com.ccsens.mt.api; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.mt.bean.dto.CompeteDto; +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.mt.service.ICompeteService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "线上体育竞技比赛", description = "") +@RestController +@RequestMapping("/compete") +public class CompeteScoreController { + @Resource + private ICompeteService competeService; + + @MustLogin + @ApiOperation(value = "查询比赛项目上的参赛选手列表", notes = "") + @RequestMapping(value = "/get/playerList", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryPlayerList(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查询比赛项目上的参赛选手列表:{}",params); + CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params); + return JsonResponse.newInstance().ok(playerList); + } + +// @MustLogin +// @ApiOperation(value = "查看单个选手的信息和分数", notes = "") +// @RequestMapping(value = "/get/player", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse getPlayerInfo(@ApiParam @Validated @RequestBody QueryDto params) { +// log.info("查询比赛项目上的参赛选手列表:{}",params); +// CompeteVo.QueryPlayerList playerList = competeService.queryPlayerList(params); +// return JsonResponse.newInstance().ok(playerList); +// } + + +} diff --git a/mt/src/main/java/com/ccsens/mt/api/DebugController.java b/mt/src/main/java/com/ccsens/mt/api/DebugController.java index 2a5da862..54b5366b 100644 --- a/mt/src/main/java/com/ccsens/mt/api/DebugController.java +++ b/mt/src/main/java/com/ccsens/mt/api/DebugController.java @@ -1,28 +1,62 @@ package com.ccsens.mt.api; +import com.ccsens.mt.bean.dto.LevelDto; +import com.ccsens.mt.bean.po.LevelUser; +import com.ccsens.mt.service.ILevelUpService; import com.ccsens.util.JsonResponse; +import com.ccsens.util.RedisUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import org.springframework.data.redis.core.ZSetOperations; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; +import java.util.Objects; +import java.util.Set; @Api(tags = "DEBUG" , description = "DebugController | ") @RestController @RequestMapping("/debug") public class DebugController { + @Resource + private RedisUtil redisUtil; + @Resource + private ILevelUpService levelUpService; @ApiOperation(value = "/测试",notes = "") @ApiImplicitParams({ }) @RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) - public JsonResponse getSmsCode(HttpServletRequest request) throws Exception { - + public JsonResponse debug(HttpServletRequest request) throws Exception { return JsonResponse.newInstance().ok("测试"); } + @ApiOperation(value = "/测试自动晋级",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value="/levelUp",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) + public JsonResponse levelUpDebug(HttpServletRequest request) throws Exception { + //比赛结束 + //查询每个选手的分数存入redis(模拟分数存入) + String key = "compete_1_6"; + Set> typedTuples = redisUtil.zsRevGetWithScore(key, 0, -1); + typedTuples.forEach(type ->{ + LevelUser levelUser = (LevelUser) type.getValue(); + if(levelUser.getPlayerId() == 1305713484796923904L){ + redisUtil.zsSet(key, levelUser, 20); + } + if(levelUser.getPlayerId() == 1305772321621020672L){ + redisUtil.zsSet(key, levelUser, 22); + } + }); + //调用自动晋级接口 + LevelDto.AutoLevelUpDto autoLevelUpDto = new LevelDto.AutoLevelUpDto(1L,"6"); + levelUpService.autoLevelUp(autoLevelUpDto); + return JsonResponse.newInstance().ok("OK"); + } } diff --git a/mt/src/main/java/com/ccsens/mt/api/DepartmentController.java b/mt/src/main/java/com/ccsens/mt/api/DepartmentController.java new file mode 100644 index 00000000..31b16392 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/DepartmentController.java @@ -0,0 +1,77 @@ +package com.ccsens.mt.api; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.mt.bean.dto.CompeteDto; +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.mt.service.IDepartmentService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "线上体育竞技比赛(校内报名)", description = "") +@RestController +@RequestMapping("/department") +public class DepartmentController { + @Resource + private IDepartmentService departmentService; + + @MustLogin + @ApiOperation(value = "查看院系信息", notes = "") + @RequestMapping(value = "/company", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getCompany(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看院系信息:{}",params); + List competeCompanyList = departmentService.getCompany(params); + return JsonResponse.newInstance().ok(competeCompanyList); + } + + @MustLogin + @ApiOperation(value = "查看参赛项目信息", notes = "") + @RequestMapping(value = "/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryCompeteProject(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看参赛项目信息:{}",params); + List competeProjects = departmentService.queryCompeteProject(params); + return JsonResponse.newInstance().ok(competeProjects); + } + + @MustLogin + @ApiOperation(value = "院系提交报名信息", notes = "") + @RequestMapping(value = "/save/department", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveDepartment(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看参赛项目信息:{}",params); + CompeteVo.DepartmentInfo department = departmentService.saveDepartment(params); + return JsonResponse.newInstance().ok(department); + } + + @MustLogin + @ApiOperation(value = "查看院系报名信息", notes = "") + @RequestMapping(value = "/get/department", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getDepartment(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看参赛项目信息:{}",params); + CompeteVo.DepartmentInfo department = departmentService.getDepartment(params); + return JsonResponse.newInstance().ok(department); + } + + + @ApiOperation(value = "导出excel表格", notes = "") + @RequestMapping(value = "/export/excel", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse exportExcel(@ApiParam @Validated @RequestBody CompeteDto.CompeteType params) { + log.info("导出excel表格:{}",params); + String excelPath = departmentService.exportExcel(params); + return JsonResponse.newInstance().ok(excelPath); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/api/FileController.java b/mt/src/main/java/com/ccsens/mt/api/FileController.java new file mode 100644 index 00000000..6f711826 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/FileController.java @@ -0,0 +1,84 @@ +package com.ccsens.mt.api; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.cloudutil.feign.TallFeignClient; +import com.ccsens.mt.bean.po.CommonFile; +import com.ccsens.mt.bean.vo.FileVo; +import com.ccsens.mt.service.IFileService; +import com.ccsens.mt.util.Constant; +import com.ccsens.util.*; +import com.ccsens.util.exception.BaseException; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.Part; +import java.util.List; + +/** + * @description: + * @author: whj + * @time: 2020/7/17 11:36 + */ +@Slf4j +@Api(tags = "文件") +@RestController +@RequestMapping("/file") +public class FileController { + + @Resource + private IFileService fileService; + @Resource + private TallFeignClient tallFeignClient; + + + @ApiOperation(value = "上传文件") + @ApiImplicitParams({ + }) + @RequestMapping(value = "upload", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse upload(HttpServletRequest request, @RequestParam() List files) throws Exception { + log.info("文件上传:{}", files); + + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + JsonResponse tokenRes = tallFeignClient.getUserIdByToken(authHeader); + log.info("{}查询userId返回:{}", authHeader, tokenRes); + if (tokenRes.getCode().intValue() != CodeEnum.SUCCESS.getCode().intValue()) { + return tokenRes; + } + JSONObject json = JSON.parseObject(JSON.toJSONString(tokenRes.getData())); + Long userId = json.getLong("id"); + String dir = PropUtil.path + Constant.File.UPLOAD_URL; + List fileVos = fileService.saveFile(dir, files, userId); + List vos = FileVo.Upload.transFilePo(fileVos); + log.info("文件上传返回:{}", vos); + return JsonResponse.newInstance().ok(vos); + } + + @ApiOperation(value = "文件下载") + @GetMapping(value = "download/{id}") + public void download(HttpServletResponse response, @PathVariable("id")Long id) throws Exception { + log.info("文件下载:{}", id); + CommonFile file = fileService.getById(id); + log.info("文件信息;{}", file); + if (file == null) { + throw new BaseException(CodeEnum.FILE_NOT_FOUND); + } + UploadFileUtil_Servlet3.download(response, file.getLocation(), file.getFileName()); + log.info("文件下载结束"); + } + + @ApiOperation(value = "文件下载, 指定路径") + @GetMapping(value = "download/know") + public void downloadFile(HttpServletResponse response, String path ) throws Exception { + log.info("文件下载, 指定路径:{}", path); + UploadFileUtil_Servlet3.download(response, path, path.substring(path.lastIndexOf(java.io.File.separator) + 1)); + log.info("文件下载结束"); + } + +} diff --git a/mt/src/main/java/com/ccsens/mt/api/LevelController.java b/mt/src/main/java/com/ccsens/mt/api/LevelController.java new file mode 100644 index 00000000..b2dc4f36 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/LevelController.java @@ -0,0 +1,51 @@ +package com.ccsens.mt.api; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.mt.bean.dto.LevelDto; +import com.ccsens.mt.bean.vo.LevelVo; +import com.ccsens.mt.service.ILevelUpService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import com.github.pagehelper.PageInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "晋级系统", description = "") +@RestController +@RequestMapping("/level") +public class LevelController { + @Resource + private ILevelUpService levelUpService; + + + @MustLogin + @ApiOperation(value = "手动晋级", notes = "") + @RequestMapping(value = "/manual", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse manualLevelUpPlayer(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("手动晋级:{}",params); + levelUpService.manualLevelUpPlayer(params.getParam()); + return JsonResponse.newInstance().ok(); + } + + @MustLogin + @ApiOperation(value = "查找晋级选手信息", notes = "") + @RequestMapping(value = "/userInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryLevelUserInfo(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("手动晋级:{}",params); + PageInfo levelUserInfoList = levelUpService.queryLevelUserInfo(params.getParam()); + return JsonResponse.newInstance().ok(levelUserInfoList); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/api/ScoreController.java b/mt/src/main/java/com/ccsens/mt/api/ScoreController.java index 192c36d5..6c17309a 100644 --- a/mt/src/main/java/com/ccsens/mt/api/ScoreController.java +++ b/mt/src/main/java/com/ccsens/mt/api/ScoreController.java @@ -31,7 +31,6 @@ public class ScoreController { }) @RequestMapping(value = "/score", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse> getScoreLog(HttpServletRequest request, - @RequestParam Long roleId, @RequestParam(required = true) Long taskId) throws Exception { //获取userId Long userId = userService.getUserIdByToken(request); diff --git a/mt/src/main/java/com/ccsens/mt/api/TopicController.java b/mt/src/main/java/com/ccsens/mt/api/TopicController.java new file mode 100644 index 00000000..51bc4f99 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/TopicController.java @@ -0,0 +1,126 @@ +package com.ccsens.mt.api; + +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.vo.TopicVo; +import com.ccsens.mt.service.ITopicService; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.JsonResponse; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "答题API", description = "") +@RestController +@RequestMapping("/topic") +public class TopicController { + @Resource + private ITopicService topicService; + + @ApiOperation(value = "查询题目", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getTopicByLink(@RequestBody @ApiParam @Validated TopicDto.GetTopic getTopic) throws Exception { + log.info("查询题目:{}",getTopic.toString()); + TopicVo.TopicInfo topicInfo = topicService.getTopicByLink(getTopic); + return JsonResponse.newInstance().ok(topicInfo); + } + + @ApiOperation(value = "根据项目id查询分组信息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/group", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryGroupByProject(@RequestBody @ApiParam @Validated TopicDto.GetGroup getGroup) throws Exception { + log.info("根据项目id查询分组信息:{}",getGroup.toString()); + List groupInfoList = topicService.queryGroupByProject(getGroup); + return JsonResponse.newInstance().ok(groupInfoList); + } + + @ApiOperation(value = "主持人提交答案", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/saveAnswers", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveAnswers(@RequestBody @ApiParam @Validated TopicDto.SaveAnswers saveAnswers) throws Exception { + log.info("主持人提交答案:{}",saveAnswers.toString()); + topicService.saveAnswers(saveAnswers); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "查排名", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/ranking", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryRanking(@RequestBody @ApiParam @Validated TopicDto.GetRankingByProjectId ranking) throws Exception { + log.info("查排名:{}",ranking); + List queryRankings = topicService.queryRanking(ranking); + return JsonResponse.newInstance().ok(queryRankings); + } + + @ApiOperation(value = "晋级", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/promoted", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse promoted(@RequestBody @ApiParam @Validated List promoted) throws Exception { + log.info("查排名:{}",promoted); + CodeEnum codeEnum = topicService.promoted(promoted); + return JsonResponse.newInstance().ok(codeEnum); + } + + @ApiOperation(value = "选手抢答", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/responder/group", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse responderGroup(@RequestBody @ApiParam @Validated TopicDto.Group group) throws Exception { + log.info("选手抢答:{}",group.toString()); + topicService.responderGroup(group); + return JsonResponse.newInstance().ok(); + } + + + @ApiOperation(value = "主持人在大屏点击开始抢答(倒计时结束后)", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/responder/start", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse responderStart(@RequestBody @ApiParam @Validated TopicDto.Topic topic) throws Exception { + log.info("主持人在大屏点击开始抢答:{}",topic.toString()); + topicService.responderStart(topic); + return JsonResponse.newInstance().ok(); + } + + + + @ApiOperation(value = "查询抢答成功的组", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/responder/get", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getResponder(@RequestBody @ApiParam @Validated TopicDto.Topic topic) throws Exception { + log.info("查询抢答成功的组:{}",topic.toString()); + TopicVo.GroupInfo group = topicService.getResponder(topic); + + return JsonResponse.newInstance().ok(group); + } + + @ApiOperation(value = "查询所有绝地反击类型的题", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/all/type", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryTopicAllByLink(@RequestBody @ApiParam @Validated TopicDto.GetTopicAll getTopicAll) throws Exception { + log.info("查询抢答成功的组:{}",getTopicAll.toString()); + List topicByLinks = topicService.queryTopicAllByLink(getTopicAll); + return JsonResponse.newInstance().ok(topicByLinks); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/api/VideoController.java b/mt/src/main/java/com/ccsens/mt/api/VideoController.java new file mode 100644 index 00000000..20c34187 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/VideoController.java @@ -0,0 +1,56 @@ +package com.ccsens.mt.api; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.dto.VideoDto; +import com.ccsens.mt.bean.vo.VideoVo; +import com.ccsens.mt.service.IVideoService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "报表相关api") +@RestController +@RequestMapping("/video") +public class VideoController { + @Resource + private IVideoService videoService; + + @MustLogin + @ApiOperation(value = "查看选手上传的视频信息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/get", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getVideoByPlayerId(@RequestBody @ApiParam @Validated QueryDto params) { + log.info("查看选手上传的视频信息:{}",params.toString()); + List getVideoInfoList = videoService.getVideoByPlayerId(params); + return JsonResponse.newInstance().ok(getVideoInfoList); + } + + @MustLogin + @ApiOperation(value = "上传视频信息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/upload", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> uploadVideo(@RequestBody @ApiParam @Validated QueryDto params) { + log.info("查看选手上传的视频信息:{}",params.toString()); + List getVideoInfoList = videoService.uploadVideo(params); + return JsonResponse.newInstance().ok(getVideoInfoList); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/api/VoteController.java b/mt/src/main/java/com/ccsens/mt/api/VoteController.java new file mode 100644 index 00000000..05d20052 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/VoteController.java @@ -0,0 +1,66 @@ +package com.ccsens.mt.api; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.vo.VoteVo; +import com.ccsens.mt.service.IVoteService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "投票API", description = "") +@RestController +@RequestMapping("/vote") +public class VoteController { + @Resource + private IVoteService voteService; + + @MustLogin + @ApiOperation(value = "用户投票", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/start", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse startVote(@RequestBody @ApiParam @Validated QueryDto params) throws Exception { + log.info("开始投票:{}",params.toString()); + voteService.startVote(params); + return JsonResponse.newInstance().ok(); + } + + @MustLogin + @ApiOperation(value = "用户投票", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveVote(@RequestBody @ApiParam @Validated QueryDto> params) throws Exception { + log.info("用户投票:{}",params.toString()); + voteService.saveVote(params); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "查询投票结果", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/get", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryVote(@RequestBody @ApiParam @Validated QueryDto params) throws Exception { + log.info("查询投票结果:{}",params.toString()); + List groupInfoList = voteService.queryVote(params.getParam()); + return JsonResponse.newInstance().ok(groupInfoList); + } + +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java new file mode 100644 index 00000000..f6f4d191 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/CompeteDto.java @@ -0,0 +1,231 @@ +package com.ccsens.mt.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class CompeteDto { + @Data + @ApiModel + public static class CompeteType{ + @NotNull + @ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛") + private int type; + } + + @Data + @ApiModel + public static class CompeteTime{ + @NotNull + @ApiModelProperty("第几届信息的id") + private Long competeTimeId; + } + + @Data + @ApiModel("查询项目下的选手列表") + public static class CompeteProjectId{ + @NotNull + @ApiModelProperty("第几届信息的id") + private Long competeTimeId; + @NotNull + @ApiModelProperty("比赛项目id(二级的)") + private Long competeProjectId; + } + + + @Data + @ApiModel + public static class CompeteProjectPlayer{ + @NotNull + @ApiModelProperty("选手创建的团队id") + private Long projectPlayerId; + } + + @Data + @ApiModel("关键字模糊查询") + public static class CompeteTypeAndKey{ + @NotEmpty + @ApiModelProperty("关键字") + private String key; + @NotNull + @ApiModelProperty("比赛的类型,0跳绳比赛") + private int type; + } + + @Data + @ApiModel("提交报名基本信息") + public static class CompetePlayerInfo{ + @NotNull + @ApiModelProperty("第几届信息的id") + private Long competeTimeId; + @NotNull + @ApiModelProperty("比赛的类型,0跳绳比赛") + private int type; + @NotEmpty + @ApiModelProperty("姓名") + private String name; + @NotNull + @ApiModelProperty("性别 0女 1男") + private int gender; + @NotEmpty + @ApiModelProperty("手机号") + private String phone; + @NotEmpty + @ApiModelProperty("手机验证码") + private String smsCode; + @NotEmpty + @ApiModelProperty("身份证") + private String idCard; + @NotNull + @ApiModelProperty("参加的组别的id") + private Long groupId; + @ApiModelProperty("参赛单位的名字") + private String companyName; + @ApiModelProperty("身份证正面照文件的路径/户口本照片") + private String idCardFront; + @ApiModelProperty("身份证反面照文件的路径") + private String idCardBack; + @ApiModelProperty("声明文件的路径") + private String proveImg; + @ApiModelProperty("其他参赛人员(亲子组需要)") + private String family; + } + + @Data + @ApiModel("选择参赛项目") + public static class CompeteProject{ + @NotNull + @ApiModelProperty("比赛项目id(二级的)") + private Long competeProjectId; + @ApiModelProperty("是否通级 0否 1是") + private byte certificate; + @NotNull + @ApiModelProperty("第几届信息的id") + private Long competeTimeId; + } + + + @Data + @ApiModel("项目团队ID") + public static class CompeteGroup{ + @NotNull(message="请选择团队信息") + @ApiModelProperty("团队ID") + private Long id; + } + + @Data + @ApiModel("院系提交报名信息") + public static class DepartmentInfo{ + @NotNull(message="请选择院系信息") + @ApiModelProperty("院系id") + private Long id; + @NotNull + @ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛") + private int type; + @ApiModelProperty("填表人裁判等信息") + private List roleList; + @ApiModelProperty("每个比赛项目的参赛名单") + private List projectList; + } + @Data + @ApiModel("填表人裁判等信息") + public static class DepartmentRole{ + @NotEmpty + @ApiModelProperty("名字") + private String name; + @NotEmpty + @ApiModelProperty("手机号") + private String phone; + @NotNull + @ApiModelProperty("担任的角色 0领队 1裁判 2填表人") + private int role; + } + + @Data + @ApiModel("每个比赛项目的参赛名单") + public static class DepartmentProject{ + @NotNull + @ApiModelProperty("比赛项目id(二级的)") + private Long competeProjectId; + @NotEmpty + @ApiModelProperty("参赛人员名单,名字中间用逗号隔开") + private String names; + @ApiModelProperty("性别组 0女 1男 2混合") + private int genderGroup; + } + + @Data + @ApiModel("获取院系提交的报名信息") + public static class GetDepartmentInfo{ + @NotNull + @ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛") + private int type; + } + + @Data + @ApiModel + public static class QueryProjectByGroup{ + @NotNull + @ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛") + private int type; + @NotNull + @ApiModelProperty("组别id") + private Long groupId; + } + @Data + @ApiModel + public static class QueryGroupByProject{ + @NotNull + @ApiModelProperty("比赛的类型,0跳绳省赛 1跳绳校内比赛") + private int type; + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + } + + @Data + @ApiModel("提交报名基本信息") + public static class CompetePlayerAndProject{ + @NotNull + @ApiModelProperty("第几届信息的id") + private Long competeTimeId; + @NotNull + @ApiModelProperty("比赛的类型,0跳绳比赛") + private int type; + @NotEmpty + @ApiModelProperty("姓名") + private String name; + @NotEmpty + @ApiModelProperty("手机号") + private String phone; + @NotEmpty + @ApiModelProperty("手机验证码") + private String smsCode; + @NotEmpty + @ApiModelProperty("身份证") + private String idCard; +// @NotNull +// @ApiModelProperty("参加的组别的id") +// private Long groupId; + @ApiModelProperty("参加的比赛信息") + List projectAndGroups; + } + @Data + @ApiModel("项目id和组别id") + public static class ProjectAndGroup{ + @ApiModelProperty("比赛项目id(二级的)") + private Long projectId; + @ApiModelProperty("组别id") + private Long groupId; + @ApiModelProperty("其他参赛人员(亲子组需要)") + private String family; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/LevelDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/LevelDto.java new file mode 100644 index 00000000..b894eeed --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/LevelDto.java @@ -0,0 +1,111 @@ +package com.ccsens.mt.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class LevelDto { + + @Data + @ApiModel("添加选手信息") + public static class LevelUserDto{ + @ApiModelProperty("报名比赛的选手的id") + private Long playerId; + @ApiModelProperty("头像") + private String avatarUrl; + @ApiModelProperty("名称") + private String name; + @ApiModelProperty("团队id") + private Long teamId; + + public LevelUserDto() { + } + + public LevelUserDto(Long playerId, String avatarUrl, String name, Long teamId) { + this.playerId = playerId; + this.avatarUrl = avatarUrl; + this.name = name; + this.teamId = teamId; + } + } + + + @Data + @ApiModel("添加晋级表信息") + public static class LevelUpDto{ + @ApiModelProperty("大赛id") + private Long competeTimeId; + @ApiModelProperty("比赛code") + private String competeCode; + @ApiModelProperty("选手id") + private Long playerId; + @ApiModelProperty("分数") + private int score; + @ApiModelProperty("附加分数") + private int additionScore; + @ApiModelProperty("名次") + private int ranking; + + public LevelUpDto() { + } + + public LevelUpDto(Long competeTimeId, String competeCode, Long playerId) { + this.competeTimeId = competeTimeId; + this.competeCode = competeCode; + this.playerId = playerId; + } + } + + @Data + @ApiModel("自动晋级") + public static class AutoLevelUpDto{ + @ApiModelProperty("大赛id") + private Long competeTimeId; + @ApiModelProperty("比赛code") + private String competeCode; + + public AutoLevelUpDto() { + } + + public AutoLevelUpDto(Long competeTimeId, String competeCode) { + this.competeTimeId = competeTimeId; + this.competeCode = competeCode; + } + } + + + @Data + @ApiModel("手动晋级") + public static class ManualLevelUpDto{ + @ApiModelProperty("大赛id") + private Long competeTimeId; + @ApiModelProperty("比赛code") + private String competeCode; + @ApiModelProperty("手动晋级的选手信息") + private List manualLevelUpPlayers; + } + @Data + @ApiModel("手动晋级的选手信息") + public static class ManualLevelUpPlayer{ + @ApiModelProperty("选手id") + private Long playerId; + } + @Data + @ApiModel("查询晋级信息") + public static class QueryLevelUserInfo{ + @ApiModelProperty("大赛id") + private Long competeTimeId; + @ApiModelProperty("比赛code") + private String competeCode; + @ApiModelProperty("页码 -1表示不分页 默认-1") + private int page = -1; + @ApiModelProperty("每页数量 默认10") + private int pageSize = 10; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java index 038226d2..4bdcd814 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java @@ -3,16 +3,13 @@ package com.ccsens.mt.bean.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import lombok.Getter; -import lombok.Setter; import java.math.BigDecimal; import java.util.List; @Data public class ScoreDto { - @Getter - @Setter + @Data @ApiModel public static class Judge{ @ApiModelProperty("评委id") @@ -20,8 +17,7 @@ public class ScoreDto { @ApiModelProperty("公司项目Id") private Long playerId; } - @Getter - @Setter + @Data @ApiModel public static class SubmitScore{ @ApiModelProperty("评委id") @@ -31,8 +27,7 @@ public class ScoreDto { @ApiModelProperty("评分信息") private List data; } - @Getter - @Setter + @Data @ApiModel public static class SubmitScoreTable{ @ApiModelProperty("评委id") @@ -51,8 +46,7 @@ public class ScoreDto { private List scores; } - @Getter - @Setter + @Data @ApiModel public static class ScoreInfo1{ @ApiModelProperty("评分项Id") @@ -62,15 +56,13 @@ public class ScoreDto { } - @Getter - @Setter + @Data @ApiModel public class ScoreLogs{ @ApiModelProperty("评分项") private List scoreLogList; } - @Getter - @Setter + @Data @ApiModel public class ScoreLogVo { @ApiModelProperty("名字") @@ -81,8 +73,7 @@ public class ScoreDto { private BigDecimal minScore; } - @Getter - @Setter + @Data @ApiModel public static class SubmitOnlyOneScore{ @ApiModelProperty("角色id") diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/TopicDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/TopicDto.java new file mode 100644 index 00000000..56be77c9 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/TopicDto.java @@ -0,0 +1,126 @@ +package com.ccsens.mt.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class TopicDto { + + @Data + @ApiModel("查询题目") + public static class GetTopic{ + @NotNull + @ApiModelProperty("比赛环节 1志在必得 2以快制胜 3绝地反击 4你说我猜") + private int linkType = 1; + @NotNull + @ApiModelProperty("当前环节的题号") + private int topicNum; + @NotNull + @ApiModelProperty("项目ID") + private long projectId; + } + + @Data + @ApiModel("根据项目id查分组信息") + public static class GetGroup{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("比赛环节 1志在必得 2以快制胜 3绝地反击 4你说我猜") + private int linkType = 1; + @NotNull + @ApiModelProperty("参赛组的类型 0答题 1投票 默认为0") + private int type = 0; + } + + @Data + @ApiModel("主持人提交答案") + public static class SaveAnswers{ + @NotNull + @ApiModelProperty("题目id") + private Long topicId; + @ApiModelProperty("每组的答案") + private List answersGroupList; + } + @Data + @ApiModel("提交时每组的答案") + public static class SaveAnswersGroup{ + @NotNull + @ApiModelProperty("该组的id") + private Long groupId; + @ApiModelProperty("答案(当前项目为T/F 默认F)") + private String answers = "F"; + } + + @Data + @ApiModel("查找组排名信息") + public static class GetRankingByProjectId{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @NotNull + @ApiModelProperty("比赛环节 1志在必得 2以快制胜 3绝地反击 4你说我猜") + private int linkType; + } + + @Data + @ApiModel("晋级") + public static class Promoted{ + @ApiModelProperty("晋级 1志在必得 2以快制胜 3绝地反击 4你说我猜") + @Min(1) + @Max(4) + private Byte linkTypes; + @ApiModelProperty("分组ID") + private Long groupId; + } + + @Data + @ApiModel("题目id") + public static class Topic{ + @NotNull + @ApiModelProperty("题目id") + private Long topicId; + @NotNull + @ApiModelProperty("项目ID") + private Long projectId; + } + + @Data + @ApiModel("分组id") + public static class Group{ + @NotNull + @ApiModelProperty("分组id") + private Long groupId; + } + @Data + @ApiModel("项目id") + public static class Project{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + } + + @Data + @ApiModel("查询所有绝地反击的题") + public static class GetTopicAll{ + + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("比赛环节 1志在必得 2以快制胜 3绝地反击 4你说我猜 默认查询绝地反击") + private int linkType = 3; + @Max(50) + @Min(0) + @ApiModelProperty("查询几道题 可以不传 默认查询绝地反击的9道题") + private int nums = 9; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/VideoDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/VideoDto.java new file mode 100644 index 00000000..12c90dbc --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/VideoDto.java @@ -0,0 +1,42 @@ +package com.ccsens.mt.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +/** + * @author 逗 + */ +@Data +public class VideoDto { + @Data + @ApiModel("查看上传视频的信息") + public static class GetVideo{ + @ApiModelProperty("大赛id") + private Long competeTimeId; + @ApiModelProperty("比赛code") + private String competeCode; + @ApiModelProperty("查询的是单人还是团队 0个人 1团队") + private byte team = 0; + @ApiModelProperty("如果查询的是单人则是选手id。查询团队则传入团队id") + private Long playerId; + } + + @Data + @ApiModel("上传视频信息") + public static class UploadVideo{ + @ApiModelProperty("大赛id") + private Long competeTimeId; + @ApiModelProperty("比赛code") + private String competeCode; + @ApiModelProperty("上传的是单人还是团队 0个人 1团队") + private byte team = 0; + @ApiModelProperty("如果上传的是单人则是选手id。上传团队则传入团队id") + private Long playerId; + @ApiModelProperty("视频文件id") + private Long videoFileId; + @ApiModelProperty("视频文件浏览路径") + private String videoFileUrl; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/VoteDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/VoteDto.java new file mode 100644 index 00000000..4852ed8f --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/VoteDto.java @@ -0,0 +1,8 @@ +package com.ccsens.mt.bean.dto; + +import lombok.Data; + +@Data +public class VoteDto { + +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/message/BaseMessageDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/message/BaseMessageDto.java index 0365779a..080bfc15 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/dto/message/BaseMessageDto.java +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/message/BaseMessageDto.java @@ -1,8 +1,14 @@ package com.ccsens.mt.bean.dto.message; +import cn.hutool.core.collection.CollectionUtil; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.util.bean.message.common.InMessage; import lombok.Data; +import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; @Data public class BaseMessageDto { @@ -23,6 +29,8 @@ public class BaseMessageDto { this.nickname = nickname; this.avatarUrl = avatarUrl; } + + } private Long time; @@ -32,4 +40,17 @@ public class BaseMessageDto { private MessageUser sender; private List receivers; // private Object data; + + public Set receiversTransTos() { + Set tos = new HashSet<>(); + if (CollectionUtil.isEmpty(receivers)) { + return tos; + } + receivers.forEach(receiver -> { + InMessage.To to = new InMessage.To(receiver.getUserId()); + tos.add(JSONObject.toJSONString(to)); + }); + + return tos; + } } diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CommonFile.java b/mt/src/main/java/com/ccsens/mt/bean/po/CommonFile.java new file mode 100644 index 00000000..0a92ad83 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CommonFile.java @@ -0,0 +1,106 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CommonFile implements Serializable { + private Long id; + + private Long userId; + + private String fileName; + + private String location; + + private String visitLocation; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName == null ? null : fileName.trim(); + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location == null ? null : location.trim(); + } + + public String getVisitLocation() { + return visitLocation; + } + + public void setVisitLocation(String visitLocation) { + this.visitLocation = visitLocation == null ? null : visitLocation.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", fileName=").append(fileName); + sb.append(", location=").append(location); + sb.append(", visitLocation=").append(visitLocation); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CommonFileExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CommonFileExample.java new file mode 100644 index 00000000..94f7eec0 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CommonFileExample.java @@ -0,0 +1,711 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CommonFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CommonFileExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andFileNameIsNull() { + addCriterion("file_name is null"); + return (Criteria) this; + } + + public Criteria andFileNameIsNotNull() { + addCriterion("file_name is not null"); + return (Criteria) this; + } + + public Criteria andFileNameEqualTo(String value) { + addCriterion("file_name =", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotEqualTo(String value) { + addCriterion("file_name <>", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameGreaterThan(String value) { + addCriterion("file_name >", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameGreaterThanOrEqualTo(String value) { + addCriterion("file_name >=", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLessThan(String value) { + addCriterion("file_name <", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLessThanOrEqualTo(String value) { + addCriterion("file_name <=", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLike(String value) { + addCriterion("file_name like", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotLike(String value) { + addCriterion("file_name not like", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameIn(List values) { + addCriterion("file_name in", values, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotIn(List values) { + addCriterion("file_name not in", values, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameBetween(String value1, String value2) { + addCriterion("file_name between", value1, value2, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotBetween(String value1, String value2) { + addCriterion("file_name not between", value1, value2, "fileName"); + return (Criteria) this; + } + + public Criteria andLocationIsNull() { + addCriterion("location is null"); + return (Criteria) this; + } + + public Criteria andLocationIsNotNull() { + addCriterion("location is not null"); + return (Criteria) this; + } + + public Criteria andLocationEqualTo(String value) { + addCriterion("location =", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationNotEqualTo(String value) { + addCriterion("location <>", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationGreaterThan(String value) { + addCriterion("location >", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationGreaterThanOrEqualTo(String value) { + addCriterion("location >=", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationLessThan(String value) { + addCriterion("location <", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationLessThanOrEqualTo(String value) { + addCriterion("location <=", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationLike(String value) { + addCriterion("location like", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationNotLike(String value) { + addCriterion("location not like", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationIn(List values) { + addCriterion("location in", values, "location"); + return (Criteria) this; + } + + public Criteria andLocationNotIn(List values) { + addCriterion("location not in", values, "location"); + return (Criteria) this; + } + + public Criteria andLocationBetween(String value1, String value2) { + addCriterion("location between", value1, value2, "location"); + return (Criteria) this; + } + + public Criteria andLocationNotBetween(String value1, String value2) { + addCriterion("location not between", value1, value2, "location"); + return (Criteria) this; + } + + public Criteria andVisitLocationIsNull() { + addCriterion("visit_location is null"); + return (Criteria) this; + } + + public Criteria andVisitLocationIsNotNull() { + addCriterion("visit_location is not null"); + return (Criteria) this; + } + + public Criteria andVisitLocationEqualTo(String value) { + addCriterion("visit_location =", value, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationNotEqualTo(String value) { + addCriterion("visit_location <>", value, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationGreaterThan(String value) { + addCriterion("visit_location >", value, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationGreaterThanOrEqualTo(String value) { + addCriterion("visit_location >=", value, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationLessThan(String value) { + addCriterion("visit_location <", value, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationLessThanOrEqualTo(String value) { + addCriterion("visit_location <=", value, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationLike(String value) { + addCriterion("visit_location like", value, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationNotLike(String value) { + addCriterion("visit_location not like", value, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationIn(List values) { + addCriterion("visit_location in", values, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationNotIn(List values) { + addCriterion("visit_location not in", values, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationBetween(String value1, String value2) { + addCriterion("visit_location between", value1, value2, "visitLocation"); + return (Criteria) this; + } + + public Criteria andVisitLocationNotBetween(String value1, String value2) { + addCriterion("visit_location not between", value1, value2, "visitLocation"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompany.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompany.java new file mode 100644 index 00000000..3f4dea52 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompany.java @@ -0,0 +1,84 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteCompany implements Serializable { + private Long id; + + private String name; + + private Byte type; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", type=").append(type); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyExample.java new file mode 100644 index 00000000..24d4b91b --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyExample.java @@ -0,0 +1,571 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteCompanyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteCompanyExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRole.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRole.java new file mode 100644 index 00000000..f3392174 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRole.java @@ -0,0 +1,95 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteCompanyRole implements Serializable { + private Long id; + + private Long playerId; + + private Long competeCompanyId; + + private Byte type; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPlayerId() { + return playerId; + } + + public void setPlayerId(Long playerId) { + this.playerId = playerId; + } + + public Long getCompeteCompanyId() { + return competeCompanyId; + } + + public void setCompeteCompanyId(Long competeCompanyId) { + this.competeCompanyId = competeCompanyId; + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", playerId=").append(playerId); + sb.append(", competeCompanyId=").append(competeCompanyId); + sb.append(", type=").append(type); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRoleExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRoleExample.java new file mode 100644 index 00000000..6b40a8a9 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteCompanyRoleExample.java @@ -0,0 +1,621 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteCompanyRoleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteCompanyRoleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNull() { + addCriterion("player_id is null"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNotNull() { + addCriterion("player_id is not null"); + return (Criteria) this; + } + + public Criteria andPlayerIdEqualTo(Long value) { + addCriterion("player_id =", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotEqualTo(Long value) { + addCriterion("player_id <>", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThan(Long value) { + addCriterion("player_id >", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) { + addCriterion("player_id >=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThan(Long value) { + addCriterion("player_id <", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThanOrEqualTo(Long value) { + addCriterion("player_id <=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdIn(List values) { + addCriterion("player_id in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotIn(List values) { + addCriterion("player_id not in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdBetween(Long value1, Long value2) { + addCriterion("player_id between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotBetween(Long value1, Long value2) { + addCriterion("player_id not between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdIsNull() { + addCriterion("compete_company_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdIsNotNull() { + addCriterion("compete_company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdEqualTo(Long value) { + addCriterion("compete_company_id =", value, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdNotEqualTo(Long value) { + addCriterion("compete_company_id <>", value, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdGreaterThan(Long value) { + addCriterion("compete_company_id >", value, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_company_id >=", value, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdLessThan(Long value) { + addCriterion("compete_company_id <", value, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("compete_company_id <=", value, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdIn(List values) { + addCriterion("compete_company_id in", values, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdNotIn(List values) { + addCriterion("compete_company_id not in", values, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdBetween(Long value1, Long value2) { + addCriterion("compete_company_id between", value1, value2, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andCompeteCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("compete_company_id not between", value1, value2, "competeCompanyId"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroup.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroup.java new file mode 100644 index 00000000..ebf5a181 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroup.java @@ -0,0 +1,128 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteGroup implements Serializable { + private Long id; + + private String groupName; + + private String description; + + private Integer startAge; + + private Integer endAge; + + private Integer sequence; + + private Byte type; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getGroupName() { + return groupName; + } + + public void setGroupName(String groupName) { + this.groupName = groupName == null ? null : groupName.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Integer getStartAge() { + return startAge; + } + + public void setStartAge(Integer startAge) { + this.startAge = startAge; + } + + public Integer getEndAge() { + return endAge; + } + + public void setEndAge(Integer endAge) { + this.endAge = endAge; + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", groupName=").append(groupName); + sb.append(", description=").append(description); + sb.append(", startAge=").append(startAge); + sb.append(", endAge=").append(endAge); + sb.append(", sequence=").append(sequence); + sb.append(", type=").append(type); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroupExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroupExample.java new file mode 100644 index 00000000..57fe09bb --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteGroupExample.java @@ -0,0 +1,821 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteGroupExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteGroupExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andGroupNameIsNull() { + addCriterion("group_name is null"); + return (Criteria) this; + } + + public Criteria andGroupNameIsNotNull() { + addCriterion("group_name is not null"); + return (Criteria) this; + } + + public Criteria andGroupNameEqualTo(String value) { + addCriterion("group_name =", value, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameNotEqualTo(String value) { + addCriterion("group_name <>", value, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameGreaterThan(String value) { + addCriterion("group_name >", value, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameGreaterThanOrEqualTo(String value) { + addCriterion("group_name >=", value, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameLessThan(String value) { + addCriterion("group_name <", value, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameLessThanOrEqualTo(String value) { + addCriterion("group_name <=", value, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameLike(String value) { + addCriterion("group_name like", value, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameNotLike(String value) { + addCriterion("group_name not like", value, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameIn(List values) { + addCriterion("group_name in", values, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameNotIn(List values) { + addCriterion("group_name not in", values, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameBetween(String value1, String value2) { + addCriterion("group_name between", value1, value2, "groupName"); + return (Criteria) this; + } + + public Criteria andGroupNameNotBetween(String value1, String value2) { + addCriterion("group_name not between", value1, value2, "groupName"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andStartAgeIsNull() { + addCriterion("start_age is null"); + return (Criteria) this; + } + + public Criteria andStartAgeIsNotNull() { + addCriterion("start_age is not null"); + return (Criteria) this; + } + + public Criteria andStartAgeEqualTo(Integer value) { + addCriterion("start_age =", value, "startAge"); + return (Criteria) this; + } + + public Criteria andStartAgeNotEqualTo(Integer value) { + addCriterion("start_age <>", value, "startAge"); + return (Criteria) this; + } + + public Criteria andStartAgeGreaterThan(Integer value) { + addCriterion("start_age >", value, "startAge"); + return (Criteria) this; + } + + public Criteria andStartAgeGreaterThanOrEqualTo(Integer value) { + addCriterion("start_age >=", value, "startAge"); + return (Criteria) this; + } + + public Criteria andStartAgeLessThan(Integer value) { + addCriterion("start_age <", value, "startAge"); + return (Criteria) this; + } + + public Criteria andStartAgeLessThanOrEqualTo(Integer value) { + addCriterion("start_age <=", value, "startAge"); + return (Criteria) this; + } + + public Criteria andStartAgeIn(List values) { + addCriterion("start_age in", values, "startAge"); + return (Criteria) this; + } + + public Criteria andStartAgeNotIn(List values) { + addCriterion("start_age not in", values, "startAge"); + return (Criteria) this; + } + + public Criteria andStartAgeBetween(Integer value1, Integer value2) { + addCriterion("start_age between", value1, value2, "startAge"); + return (Criteria) this; + } + + public Criteria andStartAgeNotBetween(Integer value1, Integer value2) { + addCriterion("start_age not between", value1, value2, "startAge"); + return (Criteria) this; + } + + public Criteria andEndAgeIsNull() { + addCriterion("end_age is null"); + return (Criteria) this; + } + + public Criteria andEndAgeIsNotNull() { + addCriterion("end_age is not null"); + return (Criteria) this; + } + + public Criteria andEndAgeEqualTo(Integer value) { + addCriterion("end_age =", value, "endAge"); + return (Criteria) this; + } + + public Criteria andEndAgeNotEqualTo(Integer value) { + addCriterion("end_age <>", value, "endAge"); + return (Criteria) this; + } + + public Criteria andEndAgeGreaterThan(Integer value) { + addCriterion("end_age >", value, "endAge"); + return (Criteria) this; + } + + public Criteria andEndAgeGreaterThanOrEqualTo(Integer value) { + addCriterion("end_age >=", value, "endAge"); + return (Criteria) this; + } + + public Criteria andEndAgeLessThan(Integer value) { + addCriterion("end_age <", value, "endAge"); + return (Criteria) this; + } + + public Criteria andEndAgeLessThanOrEqualTo(Integer value) { + addCriterion("end_age <=", value, "endAge"); + return (Criteria) this; + } + + public Criteria andEndAgeIn(List values) { + addCriterion("end_age in", values, "endAge"); + return (Criteria) this; + } + + public Criteria andEndAgeNotIn(List values) { + addCriterion("end_age not in", values, "endAge"); + return (Criteria) this; + } + + public Criteria andEndAgeBetween(Integer value1, Integer value2) { + addCriterion("end_age between", value1, value2, "endAge"); + return (Criteria) this; + } + + public Criteria andEndAgeNotBetween(Integer value1, Integer value2) { + addCriterion("end_age not between", value1, value2, "endAge"); + return (Criteria) this; + } + + public Criteria andSequenceIsNull() { + addCriterion("sequence is null"); + return (Criteria) this; + } + + public Criteria andSequenceIsNotNull() { + addCriterion("sequence is not null"); + return (Criteria) this; + } + + public Criteria andSequenceEqualTo(Integer value) { + addCriterion("sequence =", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotEqualTo(Integer value) { + addCriterion("sequence <>", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThan(Integer value) { + addCriterion("sequence >", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThanOrEqualTo(Integer value) { + addCriterion("sequence >=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThan(Integer value) { + addCriterion("sequence <", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThanOrEqualTo(Integer value) { + addCriterion("sequence <=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceIn(List values) { + addCriterion("sequence in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotIn(List values) { + addCriterion("sequence not in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceBetween(Integer value1, Integer value2) { + addCriterion("sequence between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotBetween(Integer value1, Integer value2) { + addCriterion("sequence not between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayer.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayer.java new file mode 100644 index 00000000..502bc17b --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayer.java @@ -0,0 +1,194 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompetePlayer implements Serializable { + private Long id; + + private Long userId; + + private String name; + + private String idCard; + + private String phone; + + private Byte gender; + + private String idCardFront; + + private String idCardBack; + + private String proveImg; + + private Long competeGroupId; + + private Long companyId; + + private Byte authorization; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private Long competeTimeId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard == null ? null : idCard.trim(); + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone == null ? null : phone.trim(); + } + + public Byte getGender() { + return gender; + } + + public void setGender(Byte gender) { + this.gender = gender; + } + + public String getIdCardFront() { + return idCardFront; + } + + public void setIdCardFront(String idCardFront) { + this.idCardFront = idCardFront == null ? null : idCardFront.trim(); + } + + public String getIdCardBack() { + return idCardBack; + } + + public void setIdCardBack(String idCardBack) { + this.idCardBack = idCardBack == null ? null : idCardBack.trim(); + } + + public String getProveImg() { + return proveImg; + } + + public void setProveImg(String proveImg) { + this.proveImg = proveImg == null ? null : proveImg.trim(); + } + + public Long getCompeteGroupId() { + return competeGroupId; + } + + public void setCompeteGroupId(Long competeGroupId) { + this.competeGroupId = competeGroupId; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Byte getAuthorization() { + return authorization; + } + + public void setAuthorization(Byte authorization) { + this.authorization = authorization; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public Long getCompeteTimeId() { + return competeTimeId; + } + + public void setCompeteTimeId(Long competeTimeId) { + this.competeTimeId = competeTimeId; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", name=").append(name); + sb.append(", idCard=").append(idCard); + sb.append(", phone=").append(phone); + sb.append(", gender=").append(gender); + sb.append(", idCardFront=").append(idCardFront); + sb.append(", idCardBack=").append(idCardBack); + sb.append(", proveImg=").append(proveImg); + sb.append(", competeGroupId=").append(competeGroupId); + sb.append(", companyId=").append(companyId); + sb.append(", authorization=").append(authorization); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", competeTimeId=").append(competeTimeId); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerExample.java new file mode 100644 index 00000000..aeb381a1 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerExample.java @@ -0,0 +1,1221 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompetePlayerExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompetePlayerExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andIdCardIsNull() { + addCriterion("id_card is null"); + return (Criteria) this; + } + + public Criteria andIdCardIsNotNull() { + addCriterion("id_card is not null"); + return (Criteria) this; + } + + public Criteria andIdCardEqualTo(String value) { + addCriterion("id_card =", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotEqualTo(String value) { + addCriterion("id_card <>", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThan(String value) { + addCriterion("id_card >", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThanOrEqualTo(String value) { + addCriterion("id_card >=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThan(String value) { + addCriterion("id_card <", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThanOrEqualTo(String value) { + addCriterion("id_card <=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLike(String value) { + addCriterion("id_card like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotLike(String value) { + addCriterion("id_card not like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardIn(List values) { + addCriterion("id_card in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotIn(List values) { + addCriterion("id_card not in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardBetween(String value1, String value2) { + addCriterion("id_card between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotBetween(String value1, String value2) { + addCriterion("id_card not between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andGenderIsNull() { + addCriterion("gender is null"); + return (Criteria) this; + } + + public Criteria andGenderIsNotNull() { + addCriterion("gender is not null"); + return (Criteria) this; + } + + public Criteria andGenderEqualTo(Byte value) { + addCriterion("gender =", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotEqualTo(Byte value) { + addCriterion("gender <>", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThan(Byte value) { + addCriterion("gender >", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThanOrEqualTo(Byte value) { + addCriterion("gender >=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThan(Byte value) { + addCriterion("gender <", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThanOrEqualTo(Byte value) { + addCriterion("gender <=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderIn(List values) { + addCriterion("gender in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotIn(List values) { + addCriterion("gender not in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderBetween(Byte value1, Byte value2) { + addCriterion("gender between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotBetween(Byte value1, Byte value2) { + addCriterion("gender not between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andIdCardFrontIsNull() { + addCriterion("id_card_front is null"); + return (Criteria) this; + } + + public Criteria andIdCardFrontIsNotNull() { + addCriterion("id_card_front is not null"); + return (Criteria) this; + } + + public Criteria andIdCardFrontEqualTo(String value) { + addCriterion("id_card_front =", value, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontNotEqualTo(String value) { + addCriterion("id_card_front <>", value, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontGreaterThan(String value) { + addCriterion("id_card_front >", value, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontGreaterThanOrEqualTo(String value) { + addCriterion("id_card_front >=", value, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontLessThan(String value) { + addCriterion("id_card_front <", value, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontLessThanOrEqualTo(String value) { + addCriterion("id_card_front <=", value, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontLike(String value) { + addCriterion("id_card_front like", value, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontNotLike(String value) { + addCriterion("id_card_front not like", value, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontIn(List values) { + addCriterion("id_card_front in", values, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontNotIn(List values) { + addCriterion("id_card_front not in", values, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontBetween(String value1, String value2) { + addCriterion("id_card_front between", value1, value2, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardFrontNotBetween(String value1, String value2) { + addCriterion("id_card_front not between", value1, value2, "idCardFront"); + return (Criteria) this; + } + + public Criteria andIdCardBackIsNull() { + addCriterion("id_card_back is null"); + return (Criteria) this; + } + + public Criteria andIdCardBackIsNotNull() { + addCriterion("id_card_back is not null"); + return (Criteria) this; + } + + public Criteria andIdCardBackEqualTo(String value) { + addCriterion("id_card_back =", value, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackNotEqualTo(String value) { + addCriterion("id_card_back <>", value, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackGreaterThan(String value) { + addCriterion("id_card_back >", value, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackGreaterThanOrEqualTo(String value) { + addCriterion("id_card_back >=", value, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackLessThan(String value) { + addCriterion("id_card_back <", value, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackLessThanOrEqualTo(String value) { + addCriterion("id_card_back <=", value, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackLike(String value) { + addCriterion("id_card_back like", value, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackNotLike(String value) { + addCriterion("id_card_back not like", value, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackIn(List values) { + addCriterion("id_card_back in", values, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackNotIn(List values) { + addCriterion("id_card_back not in", values, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackBetween(String value1, String value2) { + addCriterion("id_card_back between", value1, value2, "idCardBack"); + return (Criteria) this; + } + + public Criteria andIdCardBackNotBetween(String value1, String value2) { + addCriterion("id_card_back not between", value1, value2, "idCardBack"); + return (Criteria) this; + } + + public Criteria andProveImgIsNull() { + addCriterion("prove_img is null"); + return (Criteria) this; + } + + public Criteria andProveImgIsNotNull() { + addCriterion("prove_img is not null"); + return (Criteria) this; + } + + public Criteria andProveImgEqualTo(String value) { + addCriterion("prove_img =", value, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgNotEqualTo(String value) { + addCriterion("prove_img <>", value, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgGreaterThan(String value) { + addCriterion("prove_img >", value, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgGreaterThanOrEqualTo(String value) { + addCriterion("prove_img >=", value, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgLessThan(String value) { + addCriterion("prove_img <", value, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgLessThanOrEqualTo(String value) { + addCriterion("prove_img <=", value, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgLike(String value) { + addCriterion("prove_img like", value, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgNotLike(String value) { + addCriterion("prove_img not like", value, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgIn(List values) { + addCriterion("prove_img in", values, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgNotIn(List values) { + addCriterion("prove_img not in", values, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgBetween(String value1, String value2) { + addCriterion("prove_img between", value1, value2, "proveImg"); + return (Criteria) this; + } + + public Criteria andProveImgNotBetween(String value1, String value2) { + addCriterion("prove_img not between", value1, value2, "proveImg"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdIsNull() { + addCriterion("compete_group_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdIsNotNull() { + addCriterion("compete_group_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdEqualTo(Long value) { + addCriterion("compete_group_id =", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdNotEqualTo(Long value) { + addCriterion("compete_group_id <>", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdGreaterThan(Long value) { + addCriterion("compete_group_id >", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_group_id >=", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdLessThan(Long value) { + addCriterion("compete_group_id <", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdLessThanOrEqualTo(Long value) { + addCriterion("compete_group_id <=", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdIn(List values) { + addCriterion("compete_group_id in", values, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdNotIn(List values) { + addCriterion("compete_group_id not in", values, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdBetween(Long value1, Long value2) { + addCriterion("compete_group_id between", value1, value2, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdNotBetween(Long value1, Long value2) { + addCriterion("compete_group_id not between", value1, value2, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andAuthorizationIsNull() { + addCriterion("authorization is null"); + return (Criteria) this; + } + + public Criteria andAuthorizationIsNotNull() { + addCriterion("authorization is not null"); + return (Criteria) this; + } + + public Criteria andAuthorizationEqualTo(Byte value) { + addCriterion("authorization =", value, "authorization"); + return (Criteria) this; + } + + public Criteria andAuthorizationNotEqualTo(Byte value) { + addCriterion("authorization <>", value, "authorization"); + return (Criteria) this; + } + + public Criteria andAuthorizationGreaterThan(Byte value) { + addCriterion("authorization >", value, "authorization"); + return (Criteria) this; + } + + public Criteria andAuthorizationGreaterThanOrEqualTo(Byte value) { + addCriterion("authorization >=", value, "authorization"); + return (Criteria) this; + } + + public Criteria andAuthorizationLessThan(Byte value) { + addCriterion("authorization <", value, "authorization"); + return (Criteria) this; + } + + public Criteria andAuthorizationLessThanOrEqualTo(Byte value) { + addCriterion("authorization <=", value, "authorization"); + return (Criteria) this; + } + + public Criteria andAuthorizationIn(List values) { + addCriterion("authorization in", values, "authorization"); + return (Criteria) this; + } + + public Criteria andAuthorizationNotIn(List values) { + addCriterion("authorization not in", values, "authorization"); + return (Criteria) this; + } + + public Criteria andAuthorizationBetween(Byte value1, Byte value2) { + addCriterion("authorization between", value1, value2, "authorization"); + return (Criteria) this; + } + + public Criteria andAuthorizationNotBetween(Byte value1, Byte value2) { + addCriterion("authorization not between", value1, value2, "authorization"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNull() { + addCriterion("compete_time_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNotNull() { + addCriterion("compete_time_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdEqualTo(Long value) { + addCriterion("compete_time_id =", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotEqualTo(Long value) { + addCriterion("compete_time_id <>", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThan(Long value) { + addCriterion("compete_time_id >", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_time_id >=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThan(Long value) { + addCriterion("compete_time_id <", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) { + addCriterion("compete_time_id <=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIn(List values) { + addCriterion("compete_time_id in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotIn(List values) { + addCriterion("compete_time_id not in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdBetween(Long value1, Long value2) { + addCriterion("compete_time_id between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) { + addCriterion("compete_time_id not between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamily.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamily.java new file mode 100644 index 00000000..9429ae08 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamily.java @@ -0,0 +1,95 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompetePlayerFamily implements Serializable { + private Long id; + + private Long playerId; + + private Long childrenId; + + private String description; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPlayerId() { + return playerId; + } + + public void setPlayerId(Long playerId) { + this.playerId = playerId; + } + + public Long getChildrenId() { + return childrenId; + } + + public void setChildrenId(Long childrenId) { + this.childrenId = childrenId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", playerId=").append(playerId); + sb.append(", childrenId=").append(childrenId); + sb.append(", description=").append(description); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamilyExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamilyExample.java new file mode 100644 index 00000000..5e1b56e6 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerFamilyExample.java @@ -0,0 +1,631 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompetePlayerFamilyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompetePlayerFamilyExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNull() { + addCriterion("player_id is null"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNotNull() { + addCriterion("player_id is not null"); + return (Criteria) this; + } + + public Criteria andPlayerIdEqualTo(Long value) { + addCriterion("player_id =", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotEqualTo(Long value) { + addCriterion("player_id <>", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThan(Long value) { + addCriterion("player_id >", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) { + addCriterion("player_id >=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThan(Long value) { + addCriterion("player_id <", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThanOrEqualTo(Long value) { + addCriterion("player_id <=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdIn(List values) { + addCriterion("player_id in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotIn(List values) { + addCriterion("player_id not in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdBetween(Long value1, Long value2) { + addCriterion("player_id between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotBetween(Long value1, Long value2) { + addCriterion("player_id not between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andChildrenIdIsNull() { + addCriterion("children_id is null"); + return (Criteria) this; + } + + public Criteria andChildrenIdIsNotNull() { + addCriterion("children_id is not null"); + return (Criteria) this; + } + + public Criteria andChildrenIdEqualTo(Long value) { + addCriterion("children_id =", value, "childrenId"); + return (Criteria) this; + } + + public Criteria andChildrenIdNotEqualTo(Long value) { + addCriterion("children_id <>", value, "childrenId"); + return (Criteria) this; + } + + public Criteria andChildrenIdGreaterThan(Long value) { + addCriterion("children_id >", value, "childrenId"); + return (Criteria) this; + } + + public Criteria andChildrenIdGreaterThanOrEqualTo(Long value) { + addCriterion("children_id >=", value, "childrenId"); + return (Criteria) this; + } + + public Criteria andChildrenIdLessThan(Long value) { + addCriterion("children_id <", value, "childrenId"); + return (Criteria) this; + } + + public Criteria andChildrenIdLessThanOrEqualTo(Long value) { + addCriterion("children_id <=", value, "childrenId"); + return (Criteria) this; + } + + public Criteria andChildrenIdIn(List values) { + addCriterion("children_id in", values, "childrenId"); + return (Criteria) this; + } + + public Criteria andChildrenIdNotIn(List values) { + addCriterion("children_id not in", values, "childrenId"); + return (Criteria) this; + } + + public Criteria andChildrenIdBetween(Long value1, Long value2) { + addCriterion("children_id between", value1, value2, "childrenId"); + return (Criteria) this; + } + + public Criteria andChildrenIdNotBetween(Long value1, Long value2) { + addCriterion("children_id not between", value1, value2, "childrenId"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProject.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProject.java new file mode 100644 index 00000000..bc7548fe --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProject.java @@ -0,0 +1,161 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteProject implements Serializable { + private Long id; + + private String name; + + private Long parentId; + + private Byte level; + + private Byte team; + + private Byte joinRule; + + private Byte certificate; + + private Integer memberMin; + + private Integer memberMax; + + private Byte type; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public Byte getLevel() { + return level; + } + + public void setLevel(Byte level) { + this.level = level; + } + + public Byte getTeam() { + return team; + } + + public void setTeam(Byte team) { + this.team = team; + } + + public Byte getJoinRule() { + return joinRule; + } + + public void setJoinRule(Byte joinRule) { + this.joinRule = joinRule; + } + + public Byte getCertificate() { + return certificate; + } + + public void setCertificate(Byte certificate) { + this.certificate = certificate; + } + + public Integer getMemberMin() { + return memberMin; + } + + public void setMemberMin(Integer memberMin) { + this.memberMin = memberMin; + } + + public Integer getMemberMax() { + return memberMax; + } + + public void setMemberMax(Integer memberMax) { + this.memberMax = memberMax; + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", parentId=").append(parentId); + sb.append(", level=").append(level); + sb.append(", team=").append(team); + sb.append(", joinRule=").append(joinRule); + sb.append(", certificate=").append(certificate); + sb.append(", memberMin=").append(memberMin); + sb.append(", memberMax=").append(memberMax); + sb.append(", type=").append(type); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectExample.java new file mode 100644 index 00000000..027aa78c --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectExample.java @@ -0,0 +1,991 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteProjectExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteProjectExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andLevelIsNull() { + addCriterion("level is null"); + return (Criteria) this; + } + + public Criteria andLevelIsNotNull() { + addCriterion("level is not null"); + return (Criteria) this; + } + + public Criteria andLevelEqualTo(Byte value) { + addCriterion("level =", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotEqualTo(Byte value) { + addCriterion("level <>", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThan(Byte value) { + addCriterion("level >", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThanOrEqualTo(Byte value) { + addCriterion("level >=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThan(Byte value) { + addCriterion("level <", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThanOrEqualTo(Byte value) { + addCriterion("level <=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelIn(List values) { + addCriterion("level in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotIn(List values) { + addCriterion("level not in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelBetween(Byte value1, Byte value2) { + addCriterion("level between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotBetween(Byte value1, Byte value2) { + addCriterion("level not between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(Byte value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(Byte value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(Byte value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(Byte value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(Byte value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(Byte value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(Byte value1, Byte value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(Byte value1, Byte value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andJoinRuleIsNull() { + addCriterion("join_rule is null"); + return (Criteria) this; + } + + public Criteria andJoinRuleIsNotNull() { + addCriterion("join_rule is not null"); + return (Criteria) this; + } + + public Criteria andJoinRuleEqualTo(Byte value) { + addCriterion("join_rule =", value, "joinRule"); + return (Criteria) this; + } + + public Criteria andJoinRuleNotEqualTo(Byte value) { + addCriterion("join_rule <>", value, "joinRule"); + return (Criteria) this; + } + + public Criteria andJoinRuleGreaterThan(Byte value) { + addCriterion("join_rule >", value, "joinRule"); + return (Criteria) this; + } + + public Criteria andJoinRuleGreaterThanOrEqualTo(Byte value) { + addCriterion("join_rule >=", value, "joinRule"); + return (Criteria) this; + } + + public Criteria andJoinRuleLessThan(Byte value) { + addCriterion("join_rule <", value, "joinRule"); + return (Criteria) this; + } + + public Criteria andJoinRuleLessThanOrEqualTo(Byte value) { + addCriterion("join_rule <=", value, "joinRule"); + return (Criteria) this; + } + + public Criteria andJoinRuleIn(List values) { + addCriterion("join_rule in", values, "joinRule"); + return (Criteria) this; + } + + public Criteria andJoinRuleNotIn(List values) { + addCriterion("join_rule not in", values, "joinRule"); + return (Criteria) this; + } + + public Criteria andJoinRuleBetween(Byte value1, Byte value2) { + addCriterion("join_rule between", value1, value2, "joinRule"); + return (Criteria) this; + } + + public Criteria andJoinRuleNotBetween(Byte value1, Byte value2) { + addCriterion("join_rule not between", value1, value2, "joinRule"); + return (Criteria) this; + } + + public Criteria andCertificateIsNull() { + addCriterion("certificate is null"); + return (Criteria) this; + } + + public Criteria andCertificateIsNotNull() { + addCriterion("certificate is not null"); + return (Criteria) this; + } + + public Criteria andCertificateEqualTo(Byte value) { + addCriterion("certificate =", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateNotEqualTo(Byte value) { + addCriterion("certificate <>", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateGreaterThan(Byte value) { + addCriterion("certificate >", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateGreaterThanOrEqualTo(Byte value) { + addCriterion("certificate >=", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateLessThan(Byte value) { + addCriterion("certificate <", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateLessThanOrEqualTo(Byte value) { + addCriterion("certificate <=", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateIn(List values) { + addCriterion("certificate in", values, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateNotIn(List values) { + addCriterion("certificate not in", values, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateBetween(Byte value1, Byte value2) { + addCriterion("certificate between", value1, value2, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateNotBetween(Byte value1, Byte value2) { + addCriterion("certificate not between", value1, value2, "certificate"); + return (Criteria) this; + } + + public Criteria andMemberMinIsNull() { + addCriterion("member_min is null"); + return (Criteria) this; + } + + public Criteria andMemberMinIsNotNull() { + addCriterion("member_min is not null"); + return (Criteria) this; + } + + public Criteria andMemberMinEqualTo(Integer value) { + addCriterion("member_min =", value, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMinNotEqualTo(Integer value) { + addCriterion("member_min <>", value, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMinGreaterThan(Integer value) { + addCriterion("member_min >", value, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMinGreaterThanOrEqualTo(Integer value) { + addCriterion("member_min >=", value, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMinLessThan(Integer value) { + addCriterion("member_min <", value, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMinLessThanOrEqualTo(Integer value) { + addCriterion("member_min <=", value, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMinIn(List values) { + addCriterion("member_min in", values, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMinNotIn(List values) { + addCriterion("member_min not in", values, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMinBetween(Integer value1, Integer value2) { + addCriterion("member_min between", value1, value2, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMinNotBetween(Integer value1, Integer value2) { + addCriterion("member_min not between", value1, value2, "memberMin"); + return (Criteria) this; + } + + public Criteria andMemberMaxIsNull() { + addCriterion("member_max is null"); + return (Criteria) this; + } + + public Criteria andMemberMaxIsNotNull() { + addCriterion("member_max is not null"); + return (Criteria) this; + } + + public Criteria andMemberMaxEqualTo(Integer value) { + addCriterion("member_max =", value, "memberMax"); + return (Criteria) this; + } + + public Criteria andMemberMaxNotEqualTo(Integer value) { + addCriterion("member_max <>", value, "memberMax"); + return (Criteria) this; + } + + public Criteria andMemberMaxGreaterThan(Integer value) { + addCriterion("member_max >", value, "memberMax"); + return (Criteria) this; + } + + public Criteria andMemberMaxGreaterThanOrEqualTo(Integer value) { + addCriterion("member_max >=", value, "memberMax"); + return (Criteria) this; + } + + public Criteria andMemberMaxLessThan(Integer value) { + addCriterion("member_max <", value, "memberMax"); + return (Criteria) this; + } + + public Criteria andMemberMaxLessThanOrEqualTo(Integer value) { + addCriterion("member_max <=", value, "memberMax"); + return (Criteria) this; + } + + public Criteria andMemberMaxIn(List values) { + addCriterion("member_max in", values, "memberMax"); + return (Criteria) this; + } + + public Criteria andMemberMaxNotIn(List values) { + addCriterion("member_max not in", values, "memberMax"); + return (Criteria) this; + } + + public Criteria andMemberMaxBetween(Integer value1, Integer value2) { + addCriterion("member_max between", value1, value2, "memberMax"); + return (Criteria) this; + } + + public Criteria andMemberMaxNotBetween(Integer value1, Integer value2) { + addCriterion("member_max not between", value1, value2, "memberMax"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroup.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroup.java new file mode 100644 index 00000000..d306cfbd --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroup.java @@ -0,0 +1,95 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteProjectGroup implements Serializable { + private Long id; + + private Long projectId; + + private Long groupId; + + private String description; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getGroupId() { + return groupId; + } + + public void setGroupId(Long groupId) { + this.groupId = groupId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", groupId=").append(groupId); + sb.append(", description=").append(description); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroupExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroupExample.java new file mode 100644 index 00000000..22e0f65b --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectGroupExample.java @@ -0,0 +1,631 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteProjectGroupExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteProjectGroupExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNull() { + addCriterion("group_id is null"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNotNull() { + addCriterion("group_id is not null"); + return (Criteria) this; + } + + public Criteria andGroupIdEqualTo(Long value) { + addCriterion("group_id =", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotEqualTo(Long value) { + addCriterion("group_id <>", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThan(Long value) { + addCriterion("group_id >", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("group_id >=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThan(Long value) { + addCriterion("group_id <", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThanOrEqualTo(Long value) { + addCriterion("group_id <=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdIn(List values) { + addCriterion("group_id in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotIn(List values) { + addCriterion("group_id not in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdBetween(Long value1, Long value2) { + addCriterion("group_id between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotBetween(Long value1, Long value2) { + addCriterion("group_id not between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayer.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayer.java new file mode 100644 index 00000000..d122968b --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayer.java @@ -0,0 +1,128 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteProjectPlayer implements Serializable { + private Long id; + + private Long playerId; + + private Long projectId; + + private Long competeTimeId; + + private Byte genderGroup; + + private Byte certificate; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private Long competeGroupId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPlayerId() { + return playerId; + } + + public void setPlayerId(Long playerId) { + this.playerId = playerId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getCompeteTimeId() { + return competeTimeId; + } + + public void setCompeteTimeId(Long competeTimeId) { + this.competeTimeId = competeTimeId; + } + + public Byte getGenderGroup() { + return genderGroup; + } + + public void setGenderGroup(Byte genderGroup) { + this.genderGroup = genderGroup; + } + + public Byte getCertificate() { + return certificate; + } + + public void setCertificate(Byte certificate) { + this.certificate = certificate; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public Long getCompeteGroupId() { + return competeGroupId; + } + + public void setCompeteGroupId(Long competeGroupId) { + this.competeGroupId = competeGroupId; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", playerId=").append(playerId); + sb.append(", projectId=").append(projectId); + sb.append(", competeTimeId=").append(competeTimeId); + sb.append(", genderGroup=").append(genderGroup); + sb.append(", certificate=").append(certificate); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", competeGroupId=").append(competeGroupId); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayerExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayerExample.java new file mode 100644 index 00000000..fb6e50c0 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayerExample.java @@ -0,0 +1,801 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteProjectPlayerExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteProjectPlayerExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNull() { + addCriterion("player_id is null"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNotNull() { + addCriterion("player_id is not null"); + return (Criteria) this; + } + + public Criteria andPlayerIdEqualTo(Long value) { + addCriterion("player_id =", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotEqualTo(Long value) { + addCriterion("player_id <>", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThan(Long value) { + addCriterion("player_id >", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) { + addCriterion("player_id >=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThan(Long value) { + addCriterion("player_id <", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThanOrEqualTo(Long value) { + addCriterion("player_id <=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdIn(List values) { + addCriterion("player_id in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotIn(List values) { + addCriterion("player_id not in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdBetween(Long value1, Long value2) { + addCriterion("player_id between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotBetween(Long value1, Long value2) { + addCriterion("player_id not between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNull() { + addCriterion("compete_time_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNotNull() { + addCriterion("compete_time_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdEqualTo(Long value) { + addCriterion("compete_time_id =", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotEqualTo(Long value) { + addCriterion("compete_time_id <>", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThan(Long value) { + addCriterion("compete_time_id >", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_time_id >=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThan(Long value) { + addCriterion("compete_time_id <", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) { + addCriterion("compete_time_id <=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIn(List values) { + addCriterion("compete_time_id in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotIn(List values) { + addCriterion("compete_time_id not in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdBetween(Long value1, Long value2) { + addCriterion("compete_time_id between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) { + addCriterion("compete_time_id not between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andGenderGroupIsNull() { + addCriterion("gender_group is null"); + return (Criteria) this; + } + + public Criteria andGenderGroupIsNotNull() { + addCriterion("gender_group is not null"); + return (Criteria) this; + } + + public Criteria andGenderGroupEqualTo(Byte value) { + addCriterion("gender_group =", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupNotEqualTo(Byte value) { + addCriterion("gender_group <>", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupGreaterThan(Byte value) { + addCriterion("gender_group >", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupGreaterThanOrEqualTo(Byte value) { + addCriterion("gender_group >=", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupLessThan(Byte value) { + addCriterion("gender_group <", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupLessThanOrEqualTo(Byte value) { + addCriterion("gender_group <=", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupIn(List values) { + addCriterion("gender_group in", values, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupNotIn(List values) { + addCriterion("gender_group not in", values, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupBetween(Byte value1, Byte value2) { + addCriterion("gender_group between", value1, value2, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupNotBetween(Byte value1, Byte value2) { + addCriterion("gender_group not between", value1, value2, "genderGroup"); + return (Criteria) this; + } + + public Criteria andCertificateIsNull() { + addCriterion("certificate is null"); + return (Criteria) this; + } + + public Criteria andCertificateIsNotNull() { + addCriterion("certificate is not null"); + return (Criteria) this; + } + + public Criteria andCertificateEqualTo(Byte value) { + addCriterion("certificate =", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateNotEqualTo(Byte value) { + addCriterion("certificate <>", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateGreaterThan(Byte value) { + addCriterion("certificate >", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateGreaterThanOrEqualTo(Byte value) { + addCriterion("certificate >=", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateLessThan(Byte value) { + addCriterion("certificate <", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateLessThanOrEqualTo(Byte value) { + addCriterion("certificate <=", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateIn(List values) { + addCriterion("certificate in", values, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateNotIn(List values) { + addCriterion("certificate not in", values, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateBetween(Byte value1, Byte value2) { + addCriterion("certificate between", value1, value2, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateNotBetween(Byte value1, Byte value2) { + addCriterion("certificate not between", value1, value2, "certificate"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdIsNull() { + addCriterion("compete_group_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdIsNotNull() { + addCriterion("compete_group_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdEqualTo(Long value) { + addCriterion("compete_group_id =", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdNotEqualTo(Long value) { + addCriterion("compete_group_id <>", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdGreaterThan(Long value) { + addCriterion("compete_group_id >", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_group_id >=", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdLessThan(Long value) { + addCriterion("compete_group_id <", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdLessThanOrEqualTo(Long value) { + addCriterion("compete_group_id <=", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdIn(List values) { + addCriterion("compete_group_id in", values, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdNotIn(List values) { + addCriterion("compete_group_id not in", values, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdBetween(Long value1, Long value2) { + addCriterion("compete_group_id between", value1, value2, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdNotBetween(Long value1, Long value2) { + addCriterion("compete_group_id not between", value1, value2, "competeGroupId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeam.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeam.java new file mode 100644 index 00000000..0d6a9e99 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeam.java @@ -0,0 +1,139 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteTeam implements Serializable { + private Long id; + + private Long creator; + + private Long projectId; + + private Long competeTimeId; + + private Byte genderGroup; + + private Byte certificate; + + private String qrCode; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private Long competeGroupId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCreator() { + return creator; + } + + public void setCreator(Long creator) { + this.creator = creator; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getCompeteTimeId() { + return competeTimeId; + } + + public void setCompeteTimeId(Long competeTimeId) { + this.competeTimeId = competeTimeId; + } + + public Byte getGenderGroup() { + return genderGroup; + } + + public void setGenderGroup(Byte genderGroup) { + this.genderGroup = genderGroup; + } + + public Byte getCertificate() { + return certificate; + } + + public void setCertificate(Byte certificate) { + this.certificate = certificate; + } + + public String getQrCode() { + return qrCode; + } + + public void setQrCode(String qrCode) { + this.qrCode = qrCode == null ? null : qrCode.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public Long getCompeteGroupId() { + return competeGroupId; + } + + public void setCompeteGroupId(Long competeGroupId) { + this.competeGroupId = competeGroupId; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", creator=").append(creator); + sb.append(", projectId=").append(projectId); + sb.append(", competeTimeId=").append(competeTimeId); + sb.append(", genderGroup=").append(genderGroup); + sb.append(", certificate=").append(certificate); + sb.append(", qrCode=").append(qrCode); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", competeGroupId=").append(competeGroupId); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamExample.java new file mode 100644 index 00000000..25a8ba85 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamExample.java @@ -0,0 +1,871 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteTeamExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteTeamExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreatorIsNull() { + addCriterion("creator is null"); + return (Criteria) this; + } + + public Criteria andCreatorIsNotNull() { + addCriterion("creator is not null"); + return (Criteria) this; + } + + public Criteria andCreatorEqualTo(Long value) { + addCriterion("creator =", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotEqualTo(Long value) { + addCriterion("creator <>", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThan(Long value) { + addCriterion("creator >", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThanOrEqualTo(Long value) { + addCriterion("creator >=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThan(Long value) { + addCriterion("creator <", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThanOrEqualTo(Long value) { + addCriterion("creator <=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorIn(List values) { + addCriterion("creator in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotIn(List values) { + addCriterion("creator not in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorBetween(Long value1, Long value2) { + addCriterion("creator between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotBetween(Long value1, Long value2) { + addCriterion("creator not between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNull() { + addCriterion("compete_time_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNotNull() { + addCriterion("compete_time_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdEqualTo(Long value) { + addCriterion("compete_time_id =", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotEqualTo(Long value) { + addCriterion("compete_time_id <>", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThan(Long value) { + addCriterion("compete_time_id >", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_time_id >=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThan(Long value) { + addCriterion("compete_time_id <", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) { + addCriterion("compete_time_id <=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIn(List values) { + addCriterion("compete_time_id in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotIn(List values) { + addCriterion("compete_time_id not in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdBetween(Long value1, Long value2) { + addCriterion("compete_time_id between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) { + addCriterion("compete_time_id not between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andGenderGroupIsNull() { + addCriterion("gender_group is null"); + return (Criteria) this; + } + + public Criteria andGenderGroupIsNotNull() { + addCriterion("gender_group is not null"); + return (Criteria) this; + } + + public Criteria andGenderGroupEqualTo(Byte value) { + addCriterion("gender_group =", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupNotEqualTo(Byte value) { + addCriterion("gender_group <>", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupGreaterThan(Byte value) { + addCriterion("gender_group >", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupGreaterThanOrEqualTo(Byte value) { + addCriterion("gender_group >=", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupLessThan(Byte value) { + addCriterion("gender_group <", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupLessThanOrEqualTo(Byte value) { + addCriterion("gender_group <=", value, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupIn(List values) { + addCriterion("gender_group in", values, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupNotIn(List values) { + addCriterion("gender_group not in", values, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupBetween(Byte value1, Byte value2) { + addCriterion("gender_group between", value1, value2, "genderGroup"); + return (Criteria) this; + } + + public Criteria andGenderGroupNotBetween(Byte value1, Byte value2) { + addCriterion("gender_group not between", value1, value2, "genderGroup"); + return (Criteria) this; + } + + public Criteria andCertificateIsNull() { + addCriterion("certificate is null"); + return (Criteria) this; + } + + public Criteria andCertificateIsNotNull() { + addCriterion("certificate is not null"); + return (Criteria) this; + } + + public Criteria andCertificateEqualTo(Byte value) { + addCriterion("certificate =", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateNotEqualTo(Byte value) { + addCriterion("certificate <>", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateGreaterThan(Byte value) { + addCriterion("certificate >", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateGreaterThanOrEqualTo(Byte value) { + addCriterion("certificate >=", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateLessThan(Byte value) { + addCriterion("certificate <", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateLessThanOrEqualTo(Byte value) { + addCriterion("certificate <=", value, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateIn(List values) { + addCriterion("certificate in", values, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateNotIn(List values) { + addCriterion("certificate not in", values, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateBetween(Byte value1, Byte value2) { + addCriterion("certificate between", value1, value2, "certificate"); + return (Criteria) this; + } + + public Criteria andCertificateNotBetween(Byte value1, Byte value2) { + addCriterion("certificate not between", value1, value2, "certificate"); + return (Criteria) this; + } + + public Criteria andQrCodeIsNull() { + addCriterion("qr_code is null"); + return (Criteria) this; + } + + public Criteria andQrCodeIsNotNull() { + addCriterion("qr_code is not null"); + return (Criteria) this; + } + + public Criteria andQrCodeEqualTo(String value) { + addCriterion("qr_code =", value, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeNotEqualTo(String value) { + addCriterion("qr_code <>", value, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeGreaterThan(String value) { + addCriterion("qr_code >", value, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeGreaterThanOrEqualTo(String value) { + addCriterion("qr_code >=", value, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeLessThan(String value) { + addCriterion("qr_code <", value, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeLessThanOrEqualTo(String value) { + addCriterion("qr_code <=", value, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeLike(String value) { + addCriterion("qr_code like", value, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeNotLike(String value) { + addCriterion("qr_code not like", value, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeIn(List values) { + addCriterion("qr_code in", values, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeNotIn(List values) { + addCriterion("qr_code not in", values, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeBetween(String value1, String value2) { + addCriterion("qr_code between", value1, value2, "qrCode"); + return (Criteria) this; + } + + public Criteria andQrCodeNotBetween(String value1, String value2) { + addCriterion("qr_code not between", value1, value2, "qrCode"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdIsNull() { + addCriterion("compete_group_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdIsNotNull() { + addCriterion("compete_group_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdEqualTo(Long value) { + addCriterion("compete_group_id =", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdNotEqualTo(Long value) { + addCriterion("compete_group_id <>", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdGreaterThan(Long value) { + addCriterion("compete_group_id >", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_group_id >=", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdLessThan(Long value) { + addCriterion("compete_group_id <", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdLessThanOrEqualTo(Long value) { + addCriterion("compete_group_id <=", value, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdIn(List values) { + addCriterion("compete_group_id in", values, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdNotIn(List values) { + addCriterion("compete_group_id not in", values, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdBetween(Long value1, Long value2) { + addCriterion("compete_group_id between", value1, value2, "competeGroupId"); + return (Criteria) this; + } + + public Criteria andCompeteGroupIdNotBetween(Long value1, Long value2) { + addCriterion("compete_group_id not between", value1, value2, "competeGroupId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamMember.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamMember.java new file mode 100644 index 00000000..ac487cc8 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamMember.java @@ -0,0 +1,95 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteTeamMember implements Serializable { + private Long id; + + private Long playerId; + + private Long competeTeamId; + + private Byte captain; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPlayerId() { + return playerId; + } + + public void setPlayerId(Long playerId) { + this.playerId = playerId; + } + + public Long getCompeteTeamId() { + return competeTeamId; + } + + public void setCompeteTeamId(Long competeTeamId) { + this.competeTeamId = competeTeamId; + } + + public Byte getCaptain() { + return captain; + } + + public void setCaptain(Byte captain) { + this.captain = captain; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", playerId=").append(playerId); + sb.append(", competeTeamId=").append(competeTeamId); + sb.append(", captain=").append(captain); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamMemberExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamMemberExample.java new file mode 100644 index 00000000..948f1698 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamMemberExample.java @@ -0,0 +1,621 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteTeamMemberExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteTeamMemberExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNull() { + addCriterion("player_id is null"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNotNull() { + addCriterion("player_id is not null"); + return (Criteria) this; + } + + public Criteria andPlayerIdEqualTo(Long value) { + addCriterion("player_id =", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotEqualTo(Long value) { + addCriterion("player_id <>", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThan(Long value) { + addCriterion("player_id >", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) { + addCriterion("player_id >=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThan(Long value) { + addCriterion("player_id <", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThanOrEqualTo(Long value) { + addCriterion("player_id <=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdIn(List values) { + addCriterion("player_id in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotIn(List values) { + addCriterion("player_id not in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdBetween(Long value1, Long value2) { + addCriterion("player_id between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotBetween(Long value1, Long value2) { + addCriterion("player_id not between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdIsNull() { + addCriterion("compete_team_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdIsNotNull() { + addCriterion("compete_team_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdEqualTo(Long value) { + addCriterion("compete_team_id =", value, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdNotEqualTo(Long value) { + addCriterion("compete_team_id <>", value, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdGreaterThan(Long value) { + addCriterion("compete_team_id >", value, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_team_id >=", value, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdLessThan(Long value) { + addCriterion("compete_team_id <", value, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdLessThanOrEqualTo(Long value) { + addCriterion("compete_team_id <=", value, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdIn(List values) { + addCriterion("compete_team_id in", values, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdNotIn(List values) { + addCriterion("compete_team_id not in", values, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdBetween(Long value1, Long value2) { + addCriterion("compete_team_id between", value1, value2, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCompeteTeamIdNotBetween(Long value1, Long value2) { + addCriterion("compete_team_id not between", value1, value2, "competeTeamId"); + return (Criteria) this; + } + + public Criteria andCaptainIsNull() { + addCriterion("captain is null"); + return (Criteria) this; + } + + public Criteria andCaptainIsNotNull() { + addCriterion("captain is not null"); + return (Criteria) this; + } + + public Criteria andCaptainEqualTo(Byte value) { + addCriterion("captain =", value, "captain"); + return (Criteria) this; + } + + public Criteria andCaptainNotEqualTo(Byte value) { + addCriterion("captain <>", value, "captain"); + return (Criteria) this; + } + + public Criteria andCaptainGreaterThan(Byte value) { + addCriterion("captain >", value, "captain"); + return (Criteria) this; + } + + public Criteria andCaptainGreaterThanOrEqualTo(Byte value) { + addCriterion("captain >=", value, "captain"); + return (Criteria) this; + } + + public Criteria andCaptainLessThan(Byte value) { + addCriterion("captain <", value, "captain"); + return (Criteria) this; + } + + public Criteria andCaptainLessThanOrEqualTo(Byte value) { + addCriterion("captain <=", value, "captain"); + return (Criteria) this; + } + + public Criteria andCaptainIn(List values) { + addCriterion("captain in", values, "captain"); + return (Criteria) this; + } + + public Criteria andCaptainNotIn(List values) { + addCriterion("captain not in", values, "captain"); + return (Criteria) this; + } + + public Criteria andCaptainBetween(Byte value1, Byte value2) { + addCriterion("captain between", value1, value2, "captain"); + return (Criteria) this; + } + + public Criteria andCaptainNotBetween(Byte value1, Byte value2) { + addCriterion("captain not between", value1, value2, "captain"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTime.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTime.java new file mode 100644 index 00000000..31cbbc2d --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTime.java @@ -0,0 +1,139 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteTime implements Serializable { + private Long id; + + private String name; + + private Byte type; + + private Long startTime; + + private Long endTime; + + private Long signUpStartTime; + + private Long signUpEndTime; + + private Byte competeStatus; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public Long getStartTime() { + return startTime; + } + + public void setStartTime(Long startTime) { + this.startTime = startTime; + } + + public Long getEndTime() { + return endTime; + } + + public void setEndTime(Long endTime) { + this.endTime = endTime; + } + + public Long getSignUpStartTime() { + return signUpStartTime; + } + + public void setSignUpStartTime(Long signUpStartTime) { + this.signUpStartTime = signUpStartTime; + } + + public Long getSignUpEndTime() { + return signUpEndTime; + } + + public void setSignUpEndTime(Long signUpEndTime) { + this.signUpEndTime = signUpEndTime; + } + + public Byte getCompeteStatus() { + return competeStatus; + } + + public void setCompeteStatus(Byte competeStatus) { + this.competeStatus = competeStatus; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", type=").append(type); + sb.append(", startTime=").append(startTime); + sb.append(", endTime=").append(endTime); + sb.append(", signUpStartTime=").append(signUpStartTime); + sb.append(", signUpEndTime=").append(signUpEndTime); + sb.append(", competeStatus=").append(competeStatus); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTimeExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTimeExample.java new file mode 100644 index 00000000..29a70f78 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteTimeExample.java @@ -0,0 +1,871 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteTimeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteTimeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Long value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Long value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Long value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Long value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Long value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Long value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Long value1, Long value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Long value1, Long value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(Long value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(Long value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(Long value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(Long value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(Long value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(Long value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(Long value1, Long value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(Long value1, Long value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeIsNull() { + addCriterion("sign_up_start_time is null"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeIsNotNull() { + addCriterion("sign_up_start_time is not null"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeEqualTo(Long value) { + addCriterion("sign_up_start_time =", value, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeNotEqualTo(Long value) { + addCriterion("sign_up_start_time <>", value, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeGreaterThan(Long value) { + addCriterion("sign_up_start_time >", value, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeGreaterThanOrEqualTo(Long value) { + addCriterion("sign_up_start_time >=", value, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeLessThan(Long value) { + addCriterion("sign_up_start_time <", value, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeLessThanOrEqualTo(Long value) { + addCriterion("sign_up_start_time <=", value, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeIn(List values) { + addCriterion("sign_up_start_time in", values, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeNotIn(List values) { + addCriterion("sign_up_start_time not in", values, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeBetween(Long value1, Long value2) { + addCriterion("sign_up_start_time between", value1, value2, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpStartTimeNotBetween(Long value1, Long value2) { + addCriterion("sign_up_start_time not between", value1, value2, "signUpStartTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeIsNull() { + addCriterion("sign_up_end_time is null"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeIsNotNull() { + addCriterion("sign_up_end_time is not null"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeEqualTo(Long value) { + addCriterion("sign_up_end_time =", value, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeNotEqualTo(Long value) { + addCriterion("sign_up_end_time <>", value, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeGreaterThan(Long value) { + addCriterion("sign_up_end_time >", value, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeGreaterThanOrEqualTo(Long value) { + addCriterion("sign_up_end_time >=", value, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeLessThan(Long value) { + addCriterion("sign_up_end_time <", value, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeLessThanOrEqualTo(Long value) { + addCriterion("sign_up_end_time <=", value, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeIn(List values) { + addCriterion("sign_up_end_time in", values, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeNotIn(List values) { + addCriterion("sign_up_end_time not in", values, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeBetween(Long value1, Long value2) { + addCriterion("sign_up_end_time between", value1, value2, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andSignUpEndTimeNotBetween(Long value1, Long value2) { + addCriterion("sign_up_end_time not between", value1, value2, "signUpEndTime"); + return (Criteria) this; + } + + public Criteria andCompeteStatusIsNull() { + addCriterion("compete_status is null"); + return (Criteria) this; + } + + public Criteria andCompeteStatusIsNotNull() { + addCriterion("compete_status is not null"); + return (Criteria) this; + } + + public Criteria andCompeteStatusEqualTo(Byte value) { + addCriterion("compete_status =", value, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCompeteStatusNotEqualTo(Byte value) { + addCriterion("compete_status <>", value, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCompeteStatusGreaterThan(Byte value) { + addCriterion("compete_status >", value, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCompeteStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("compete_status >=", value, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCompeteStatusLessThan(Byte value) { + addCriterion("compete_status <", value, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCompeteStatusLessThanOrEqualTo(Byte value) { + addCriterion("compete_status <=", value, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCompeteStatusIn(List values) { + addCriterion("compete_status in", values, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCompeteStatusNotIn(List values) { + addCriterion("compete_status not in", values, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCompeteStatusBetween(Byte value1, Byte value2) { + addCriterion("compete_status between", value1, value2, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCompeteStatusNotBetween(Byte value1, Byte value2) { + addCriterion("compete_status not between", value1, value2, "competeStatus"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideo.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideo.java new file mode 100644 index 00000000..3996360b --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideo.java @@ -0,0 +1,150 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CompeteVideo implements Serializable { + private Long id; + + private Long competeTimeId; + + private String competeCode; + + private Byte team; + + private Long playerId; + + private Long fileId; + + private String videoUrl; + + private Long time; + + private Long uploadUserId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompeteTimeId() { + return competeTimeId; + } + + public void setCompeteTimeId(Long competeTimeId) { + this.competeTimeId = competeTimeId; + } + + public String getCompeteCode() { + return competeCode; + } + + public void setCompeteCode(String competeCode) { + this.competeCode = competeCode == null ? null : competeCode.trim(); + } + + public Byte getTeam() { + return team; + } + + public void setTeam(Byte team) { + this.team = team; + } + + public Long getPlayerId() { + return playerId; + } + + public void setPlayerId(Long playerId) { + this.playerId = playerId; + } + + public Long getFileId() { + return fileId; + } + + public void setFileId(Long fileId) { + this.fileId = fileId; + } + + public String getVideoUrl() { + return videoUrl; + } + + public void setVideoUrl(String videoUrl) { + this.videoUrl = videoUrl == null ? null : videoUrl.trim(); + } + + public Long getTime() { + return time; + } + + public void setTime(Long time) { + this.time = time; + } + + public Long getUploadUserId() { + return uploadUserId; + } + + public void setUploadUserId(Long uploadUserId) { + this.uploadUserId = uploadUserId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", competeTimeId=").append(competeTimeId); + sb.append(", competeCode=").append(competeCode); + sb.append(", team=").append(team); + sb.append(", playerId=").append(playerId); + sb.append(", fileId=").append(fileId); + sb.append(", videoUrl=").append(videoUrl); + sb.append(", time=").append(time); + sb.append(", uploadUserId=").append(uploadUserId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideoExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideoExample.java new file mode 100644 index 00000000..71b1ac9a --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteVideoExample.java @@ -0,0 +1,941 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompeteVideoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompeteVideoExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNull() { + addCriterion("compete_time_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNotNull() { + addCriterion("compete_time_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdEqualTo(Long value) { + addCriterion("compete_time_id =", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotEqualTo(Long value) { + addCriterion("compete_time_id <>", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThan(Long value) { + addCriterion("compete_time_id >", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_time_id >=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThan(Long value) { + addCriterion("compete_time_id <", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) { + addCriterion("compete_time_id <=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIn(List values) { + addCriterion("compete_time_id in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotIn(List values) { + addCriterion("compete_time_id not in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdBetween(Long value1, Long value2) { + addCriterion("compete_time_id between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) { + addCriterion("compete_time_id not between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteCodeIsNull() { + addCriterion("compete_code is null"); + return (Criteria) this; + } + + public Criteria andCompeteCodeIsNotNull() { + addCriterion("compete_code is not null"); + return (Criteria) this; + } + + public Criteria andCompeteCodeEqualTo(String value) { + addCriterion("compete_code =", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNotEqualTo(String value) { + addCriterion("compete_code <>", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeGreaterThan(String value) { + addCriterion("compete_code >", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeGreaterThanOrEqualTo(String value) { + addCriterion("compete_code >=", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLessThan(String value) { + addCriterion("compete_code <", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLessThanOrEqualTo(String value) { + addCriterion("compete_code <=", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLike(String value) { + addCriterion("compete_code like", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNotLike(String value) { + addCriterion("compete_code not like", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeIn(List values) { + addCriterion("compete_code in", values, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNotIn(List values) { + addCriterion("compete_code not in", values, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeBetween(String value1, String value2) { + addCriterion("compete_code between", value1, value2, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNotBetween(String value1, String value2) { + addCriterion("compete_code not between", value1, value2, "competeCode"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(Byte value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(Byte value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(Byte value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(Byte value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(Byte value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(Byte value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(Byte value1, Byte value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(Byte value1, Byte value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNull() { + addCriterion("player_id is null"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNotNull() { + addCriterion("player_id is not null"); + return (Criteria) this; + } + + public Criteria andPlayerIdEqualTo(Long value) { + addCriterion("player_id =", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotEqualTo(Long value) { + addCriterion("player_id <>", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThan(Long value) { + addCriterion("player_id >", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) { + addCriterion("player_id >=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThan(Long value) { + addCriterion("player_id <", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThanOrEqualTo(Long value) { + addCriterion("player_id <=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdIn(List values) { + addCriterion("player_id in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotIn(List values) { + addCriterion("player_id not in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdBetween(Long value1, Long value2) { + addCriterion("player_id between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotBetween(Long value1, Long value2) { + addCriterion("player_id not between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andFileIdIsNull() { + addCriterion("file_id is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("file_id is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(Long value) { + addCriterion("file_id =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(Long value) { + addCriterion("file_id <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(Long value) { + addCriterion("file_id >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(Long value) { + addCriterion("file_id >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(Long value) { + addCriterion("file_id <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(Long value) { + addCriterion("file_id <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("file_id in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("file_id not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(Long value1, Long value2) { + addCriterion("file_id between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(Long value1, Long value2) { + addCriterion("file_id not between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andVideoUrlIsNull() { + addCriterion("video_url is null"); + return (Criteria) this; + } + + public Criteria andVideoUrlIsNotNull() { + addCriterion("video_url is not null"); + return (Criteria) this; + } + + public Criteria andVideoUrlEqualTo(String value) { + addCriterion("video_url =", value, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlNotEqualTo(String value) { + addCriterion("video_url <>", value, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlGreaterThan(String value) { + addCriterion("video_url >", value, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlGreaterThanOrEqualTo(String value) { + addCriterion("video_url >=", value, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlLessThan(String value) { + addCriterion("video_url <", value, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlLessThanOrEqualTo(String value) { + addCriterion("video_url <=", value, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlLike(String value) { + addCriterion("video_url like", value, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlNotLike(String value) { + addCriterion("video_url not like", value, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlIn(List values) { + addCriterion("video_url in", values, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlNotIn(List values) { + addCriterion("video_url not in", values, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlBetween(String value1, String value2) { + addCriterion("video_url between", value1, value2, "videoUrl"); + return (Criteria) this; + } + + public Criteria andVideoUrlNotBetween(String value1, String value2) { + addCriterion("video_url not between", value1, value2, "videoUrl"); + return (Criteria) this; + } + + public Criteria andTimeIsNull() { + addCriterion("time is null"); + return (Criteria) this; + } + + public Criteria andTimeIsNotNull() { + addCriterion("time is not null"); + return (Criteria) this; + } + + public Criteria andTimeEqualTo(Long value) { + addCriterion("time =", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotEqualTo(Long value) { + addCriterion("time <>", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThan(Long value) { + addCriterion("time >", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThanOrEqualTo(Long value) { + addCriterion("time >=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThan(Long value) { + addCriterion("time <", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThanOrEqualTo(Long value) { + addCriterion("time <=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeIn(List values) { + addCriterion("time in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotIn(List values) { + addCriterion("time not in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeBetween(Long value1, Long value2) { + addCriterion("time between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotBetween(Long value1, Long value2) { + addCriterion("time not between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andUploadUserIdIsNull() { + addCriterion("upload_user_id is null"); + return (Criteria) this; + } + + public Criteria andUploadUserIdIsNotNull() { + addCriterion("upload_user_id is not null"); + return (Criteria) this; + } + + public Criteria andUploadUserIdEqualTo(Long value) { + addCriterion("upload_user_id =", value, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andUploadUserIdNotEqualTo(Long value) { + addCriterion("upload_user_id <>", value, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andUploadUserIdGreaterThan(Long value) { + addCriterion("upload_user_id >", value, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andUploadUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("upload_user_id >=", value, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andUploadUserIdLessThan(Long value) { + addCriterion("upload_user_id <", value, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andUploadUserIdLessThanOrEqualTo(Long value) { + addCriterion("upload_user_id <=", value, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andUploadUserIdIn(List values) { + addCriterion("upload_user_id in", values, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andUploadUserIdNotIn(List values) { + addCriterion("upload_user_id not in", values, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andUploadUserIdBetween(Long value1, Long value2) { + addCriterion("upload_user_id between", value1, value2, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andUploadUserIdNotBetween(Long value1, Long value2) { + addCriterion("upload_user_id not between", value1, value2, "uploadUserId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/LevelRule.java b/mt/src/main/java/com/ccsens/mt/bean/po/LevelRule.java new file mode 100644 index 00000000..4e90e935 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/LevelRule.java @@ -0,0 +1,139 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class LevelRule implements Serializable { + private Long id; + + private Long competeTimeId; + + private String competeCodeNow; + + private String competeCodeLevelUp; + + private Byte rule; + + private Integer levelCondition; + + private Byte autoLevel; + + private Byte competeOrder; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompeteTimeId() { + return competeTimeId; + } + + public void setCompeteTimeId(Long competeTimeId) { + this.competeTimeId = competeTimeId; + } + + public String getCompeteCodeNow() { + return competeCodeNow; + } + + public void setCompeteCodeNow(String competeCodeNow) { + this.competeCodeNow = competeCodeNow == null ? null : competeCodeNow.trim(); + } + + public String getCompeteCodeLevelUp() { + return competeCodeLevelUp; + } + + public void setCompeteCodeLevelUp(String competeCodeLevelUp) { + this.competeCodeLevelUp = competeCodeLevelUp == null ? null : competeCodeLevelUp.trim(); + } + + public Byte getRule() { + return rule; + } + + public void setRule(Byte rule) { + this.rule = rule; + } + + public Integer getLevelCondition() { + return levelCondition; + } + + public void setLevelCondition(Integer levelCondition) { + this.levelCondition = levelCondition; + } + + public Byte getAutoLevel() { + return autoLevel; + } + + public void setAutoLevel(Byte autoLevel) { + this.autoLevel = autoLevel; + } + + public Byte getCompeteOrder() { + return competeOrder; + } + + public void setCompeteOrder(Byte competeOrder) { + this.competeOrder = competeOrder; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", competeTimeId=").append(competeTimeId); + sb.append(", competeCodeNow=").append(competeCodeNow); + sb.append(", competeCodeLevelUp=").append(competeCodeLevelUp); + sb.append(", rule=").append(rule); + sb.append(", levelCondition=").append(levelCondition); + sb.append(", autoLevel=").append(autoLevel); + sb.append(", competeOrder=").append(competeOrder); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/LevelRuleExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/LevelRuleExample.java new file mode 100644 index 00000000..4f629c41 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/LevelRuleExample.java @@ -0,0 +1,881 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class LevelRuleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LevelRuleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNull() { + addCriterion("compete_time_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNotNull() { + addCriterion("compete_time_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdEqualTo(Long value) { + addCriterion("compete_time_id =", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotEqualTo(Long value) { + addCriterion("compete_time_id <>", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThan(Long value) { + addCriterion("compete_time_id >", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_time_id >=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThan(Long value) { + addCriterion("compete_time_id <", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) { + addCriterion("compete_time_id <=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIn(List values) { + addCriterion("compete_time_id in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotIn(List values) { + addCriterion("compete_time_id not in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdBetween(Long value1, Long value2) { + addCriterion("compete_time_id between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) { + addCriterion("compete_time_id not between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowIsNull() { + addCriterion("compete_code_now is null"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowIsNotNull() { + addCriterion("compete_code_now is not null"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowEqualTo(String value) { + addCriterion("compete_code_now =", value, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowNotEqualTo(String value) { + addCriterion("compete_code_now <>", value, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowGreaterThan(String value) { + addCriterion("compete_code_now >", value, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowGreaterThanOrEqualTo(String value) { + addCriterion("compete_code_now >=", value, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowLessThan(String value) { + addCriterion("compete_code_now <", value, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowLessThanOrEqualTo(String value) { + addCriterion("compete_code_now <=", value, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowLike(String value) { + addCriterion("compete_code_now like", value, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowNotLike(String value) { + addCriterion("compete_code_now not like", value, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowIn(List values) { + addCriterion("compete_code_now in", values, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowNotIn(List values) { + addCriterion("compete_code_now not in", values, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowBetween(String value1, String value2) { + addCriterion("compete_code_now between", value1, value2, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNowNotBetween(String value1, String value2) { + addCriterion("compete_code_now not between", value1, value2, "competeCodeNow"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpIsNull() { + addCriterion("compete_code_level_up is null"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpIsNotNull() { + addCriterion("compete_code_level_up is not null"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpEqualTo(String value) { + addCriterion("compete_code_level_up =", value, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpNotEqualTo(String value) { + addCriterion("compete_code_level_up <>", value, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpGreaterThan(String value) { + addCriterion("compete_code_level_up >", value, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpGreaterThanOrEqualTo(String value) { + addCriterion("compete_code_level_up >=", value, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpLessThan(String value) { + addCriterion("compete_code_level_up <", value, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpLessThanOrEqualTo(String value) { + addCriterion("compete_code_level_up <=", value, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpLike(String value) { + addCriterion("compete_code_level_up like", value, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpNotLike(String value) { + addCriterion("compete_code_level_up not like", value, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpIn(List values) { + addCriterion("compete_code_level_up in", values, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpNotIn(List values) { + addCriterion("compete_code_level_up not in", values, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpBetween(String value1, String value2) { + addCriterion("compete_code_level_up between", value1, value2, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLevelUpNotBetween(String value1, String value2) { + addCriterion("compete_code_level_up not between", value1, value2, "competeCodeLevelUp"); + return (Criteria) this; + } + + public Criteria andRuleIsNull() { + addCriterion("rule is null"); + return (Criteria) this; + } + + public Criteria andRuleIsNotNull() { + addCriterion("rule is not null"); + return (Criteria) this; + } + + public Criteria andRuleEqualTo(Byte value) { + addCriterion("rule =", value, "rule"); + return (Criteria) this; + } + + public Criteria andRuleNotEqualTo(Byte value) { + addCriterion("rule <>", value, "rule"); + return (Criteria) this; + } + + public Criteria andRuleGreaterThan(Byte value) { + addCriterion("rule >", value, "rule"); + return (Criteria) this; + } + + public Criteria andRuleGreaterThanOrEqualTo(Byte value) { + addCriterion("rule >=", value, "rule"); + return (Criteria) this; + } + + public Criteria andRuleLessThan(Byte value) { + addCriterion("rule <", value, "rule"); + return (Criteria) this; + } + + public Criteria andRuleLessThanOrEqualTo(Byte value) { + addCriterion("rule <=", value, "rule"); + return (Criteria) this; + } + + public Criteria andRuleIn(List values) { + addCriterion("rule in", values, "rule"); + return (Criteria) this; + } + + public Criteria andRuleNotIn(List values) { + addCriterion("rule not in", values, "rule"); + return (Criteria) this; + } + + public Criteria andRuleBetween(Byte value1, Byte value2) { + addCriterion("rule between", value1, value2, "rule"); + return (Criteria) this; + } + + public Criteria andRuleNotBetween(Byte value1, Byte value2) { + addCriterion("rule not between", value1, value2, "rule"); + return (Criteria) this; + } + + public Criteria andLevelConditionIsNull() { + addCriterion("level_condition is null"); + return (Criteria) this; + } + + public Criteria andLevelConditionIsNotNull() { + addCriterion("level_condition is not null"); + return (Criteria) this; + } + + public Criteria andLevelConditionEqualTo(Integer value) { + addCriterion("level_condition =", value, "levelCondition"); + return (Criteria) this; + } + + public Criteria andLevelConditionNotEqualTo(Integer value) { + addCriterion("level_condition <>", value, "levelCondition"); + return (Criteria) this; + } + + public Criteria andLevelConditionGreaterThan(Integer value) { + addCriterion("level_condition >", value, "levelCondition"); + return (Criteria) this; + } + + public Criteria andLevelConditionGreaterThanOrEqualTo(Integer value) { + addCriterion("level_condition >=", value, "levelCondition"); + return (Criteria) this; + } + + public Criteria andLevelConditionLessThan(Integer value) { + addCriterion("level_condition <", value, "levelCondition"); + return (Criteria) this; + } + + public Criteria andLevelConditionLessThanOrEqualTo(Integer value) { + addCriterion("level_condition <=", value, "levelCondition"); + return (Criteria) this; + } + + public Criteria andLevelConditionIn(List values) { + addCriterion("level_condition in", values, "levelCondition"); + return (Criteria) this; + } + + public Criteria andLevelConditionNotIn(List values) { + addCriterion("level_condition not in", values, "levelCondition"); + return (Criteria) this; + } + + public Criteria andLevelConditionBetween(Integer value1, Integer value2) { + addCriterion("level_condition between", value1, value2, "levelCondition"); + return (Criteria) this; + } + + public Criteria andLevelConditionNotBetween(Integer value1, Integer value2) { + addCriterion("level_condition not between", value1, value2, "levelCondition"); + return (Criteria) this; + } + + public Criteria andAutoLevelIsNull() { + addCriterion("auto_level is null"); + return (Criteria) this; + } + + public Criteria andAutoLevelIsNotNull() { + addCriterion("auto_level is not null"); + return (Criteria) this; + } + + public Criteria andAutoLevelEqualTo(Byte value) { + addCriterion("auto_level =", value, "autoLevel"); + return (Criteria) this; + } + + public Criteria andAutoLevelNotEqualTo(Byte value) { + addCriterion("auto_level <>", value, "autoLevel"); + return (Criteria) this; + } + + public Criteria andAutoLevelGreaterThan(Byte value) { + addCriterion("auto_level >", value, "autoLevel"); + return (Criteria) this; + } + + public Criteria andAutoLevelGreaterThanOrEqualTo(Byte value) { + addCriterion("auto_level >=", value, "autoLevel"); + return (Criteria) this; + } + + public Criteria andAutoLevelLessThan(Byte value) { + addCriterion("auto_level <", value, "autoLevel"); + return (Criteria) this; + } + + public Criteria andAutoLevelLessThanOrEqualTo(Byte value) { + addCriterion("auto_level <=", value, "autoLevel"); + return (Criteria) this; + } + + public Criteria andAutoLevelIn(List values) { + addCriterion("auto_level in", values, "autoLevel"); + return (Criteria) this; + } + + public Criteria andAutoLevelNotIn(List values) { + addCriterion("auto_level not in", values, "autoLevel"); + return (Criteria) this; + } + + public Criteria andAutoLevelBetween(Byte value1, Byte value2) { + addCriterion("auto_level between", value1, value2, "autoLevel"); + return (Criteria) this; + } + + public Criteria andAutoLevelNotBetween(Byte value1, Byte value2) { + addCriterion("auto_level not between", value1, value2, "autoLevel"); + return (Criteria) this; + } + + public Criteria andCompeteOrderIsNull() { + addCriterion("compete_order is null"); + return (Criteria) this; + } + + public Criteria andCompeteOrderIsNotNull() { + addCriterion("compete_order is not null"); + return (Criteria) this; + } + + public Criteria andCompeteOrderEqualTo(Byte value) { + addCriterion("compete_order =", value, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCompeteOrderNotEqualTo(Byte value) { + addCriterion("compete_order <>", value, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCompeteOrderGreaterThan(Byte value) { + addCriterion("compete_order >", value, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCompeteOrderGreaterThanOrEqualTo(Byte value) { + addCriterion("compete_order >=", value, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCompeteOrderLessThan(Byte value) { + addCriterion("compete_order <", value, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCompeteOrderLessThanOrEqualTo(Byte value) { + addCriterion("compete_order <=", value, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCompeteOrderIn(List values) { + addCriterion("compete_order in", values, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCompeteOrderNotIn(List values) { + addCriterion("compete_order not in", values, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCompeteOrderBetween(Byte value1, Byte value2) { + addCriterion("compete_order between", value1, value2, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCompeteOrderNotBetween(Byte value1, Byte value2) { + addCriterion("compete_order not between", value1, value2, "competeOrder"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/LevelUp.java b/mt/src/main/java/com/ccsens/mt/bean/po/LevelUp.java new file mode 100644 index 00000000..58cbc8c6 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/LevelUp.java @@ -0,0 +1,139 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class LevelUp implements Serializable { + private Long id; + + private Long competeTimeId; + + private String competeCode; + + private Long levelUserId; + + private Integer score; + + private Integer additionScore; + + private Integer ranking; + + private Byte levelUpType; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompeteTimeId() { + return competeTimeId; + } + + public void setCompeteTimeId(Long competeTimeId) { + this.competeTimeId = competeTimeId; + } + + public String getCompeteCode() { + return competeCode; + } + + public void setCompeteCode(String competeCode) { + this.competeCode = competeCode == null ? null : competeCode.trim(); + } + + public Long getLevelUserId() { + return levelUserId; + } + + public void setLevelUserId(Long levelUserId) { + this.levelUserId = levelUserId; + } + + public Integer getScore() { + return score; + } + + public void setScore(Integer score) { + this.score = score; + } + + public Integer getAdditionScore() { + return additionScore; + } + + public void setAdditionScore(Integer additionScore) { + this.additionScore = additionScore; + } + + public Integer getRanking() { + return ranking; + } + + public void setRanking(Integer ranking) { + this.ranking = ranking; + } + + public Byte getLevelUpType() { + return levelUpType; + } + + public void setLevelUpType(Byte levelUpType) { + this.levelUpType = levelUpType; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", competeTimeId=").append(competeTimeId); + sb.append(", competeCode=").append(competeCode); + sb.append(", levelUserId=").append(levelUserId); + sb.append(", score=").append(score); + sb.append(", additionScore=").append(additionScore); + sb.append(", ranking=").append(ranking); + sb.append(", levelUpType=").append(levelUpType); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/LevelUpExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/LevelUpExample.java new file mode 100644 index 00000000..cc653bfe --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/LevelUpExample.java @@ -0,0 +1,871 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class LevelUpExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LevelUpExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNull() { + addCriterion("compete_time_id is null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIsNotNull() { + addCriterion("compete_time_id is not null"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdEqualTo(Long value) { + addCriterion("compete_time_id =", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotEqualTo(Long value) { + addCriterion("compete_time_id <>", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThan(Long value) { + addCriterion("compete_time_id >", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) { + addCriterion("compete_time_id >=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThan(Long value) { + addCriterion("compete_time_id <", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) { + addCriterion("compete_time_id <=", value, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdIn(List values) { + addCriterion("compete_time_id in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotIn(List values) { + addCriterion("compete_time_id not in", values, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdBetween(Long value1, Long value2) { + addCriterion("compete_time_id between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) { + addCriterion("compete_time_id not between", value1, value2, "competeTimeId"); + return (Criteria) this; + } + + public Criteria andCompeteCodeIsNull() { + addCriterion("compete_code is null"); + return (Criteria) this; + } + + public Criteria andCompeteCodeIsNotNull() { + addCriterion("compete_code is not null"); + return (Criteria) this; + } + + public Criteria andCompeteCodeEqualTo(String value) { + addCriterion("compete_code =", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNotEqualTo(String value) { + addCriterion("compete_code <>", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeGreaterThan(String value) { + addCriterion("compete_code >", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeGreaterThanOrEqualTo(String value) { + addCriterion("compete_code >=", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLessThan(String value) { + addCriterion("compete_code <", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLessThanOrEqualTo(String value) { + addCriterion("compete_code <=", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeLike(String value) { + addCriterion("compete_code like", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNotLike(String value) { + addCriterion("compete_code not like", value, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeIn(List values) { + addCriterion("compete_code in", values, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNotIn(List values) { + addCriterion("compete_code not in", values, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeBetween(String value1, String value2) { + addCriterion("compete_code between", value1, value2, "competeCode"); + return (Criteria) this; + } + + public Criteria andCompeteCodeNotBetween(String value1, String value2) { + addCriterion("compete_code not between", value1, value2, "competeCode"); + return (Criteria) this; + } + + public Criteria andLevelUserIdIsNull() { + addCriterion("level_user_id is null"); + return (Criteria) this; + } + + public Criteria andLevelUserIdIsNotNull() { + addCriterion("level_user_id is not null"); + return (Criteria) this; + } + + public Criteria andLevelUserIdEqualTo(Long value) { + addCriterion("level_user_id =", value, "levelUserId"); + return (Criteria) this; + } + + public Criteria andLevelUserIdNotEqualTo(Long value) { + addCriterion("level_user_id <>", value, "levelUserId"); + return (Criteria) this; + } + + public Criteria andLevelUserIdGreaterThan(Long value) { + addCriterion("level_user_id >", value, "levelUserId"); + return (Criteria) this; + } + + public Criteria andLevelUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("level_user_id >=", value, "levelUserId"); + return (Criteria) this; + } + + public Criteria andLevelUserIdLessThan(Long value) { + addCriterion("level_user_id <", value, "levelUserId"); + return (Criteria) this; + } + + public Criteria andLevelUserIdLessThanOrEqualTo(Long value) { + addCriterion("level_user_id <=", value, "levelUserId"); + return (Criteria) this; + } + + public Criteria andLevelUserIdIn(List values) { + addCriterion("level_user_id in", values, "levelUserId"); + return (Criteria) this; + } + + public Criteria andLevelUserIdNotIn(List values) { + addCriterion("level_user_id not in", values, "levelUserId"); + return (Criteria) this; + } + + public Criteria andLevelUserIdBetween(Long value1, Long value2) { + addCriterion("level_user_id between", value1, value2, "levelUserId"); + return (Criteria) this; + } + + public Criteria andLevelUserIdNotBetween(Long value1, Long value2) { + addCriterion("level_user_id not between", value1, value2, "levelUserId"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Integer value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Integer value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Integer value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Integer value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Integer value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Integer value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Integer value1, Integer value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Integer value1, Integer value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andAdditionScoreIsNull() { + addCriterion("addition_score is null"); + return (Criteria) this; + } + + public Criteria andAdditionScoreIsNotNull() { + addCriterion("addition_score is not null"); + return (Criteria) this; + } + + public Criteria andAdditionScoreEqualTo(Integer value) { + addCriterion("addition_score =", value, "additionScore"); + return (Criteria) this; + } + + public Criteria andAdditionScoreNotEqualTo(Integer value) { + addCriterion("addition_score <>", value, "additionScore"); + return (Criteria) this; + } + + public Criteria andAdditionScoreGreaterThan(Integer value) { + addCriterion("addition_score >", value, "additionScore"); + return (Criteria) this; + } + + public Criteria andAdditionScoreGreaterThanOrEqualTo(Integer value) { + addCriterion("addition_score >=", value, "additionScore"); + return (Criteria) this; + } + + public Criteria andAdditionScoreLessThan(Integer value) { + addCriterion("addition_score <", value, "additionScore"); + return (Criteria) this; + } + + public Criteria andAdditionScoreLessThanOrEqualTo(Integer value) { + addCriterion("addition_score <=", value, "additionScore"); + return (Criteria) this; + } + + public Criteria andAdditionScoreIn(List values) { + addCriterion("addition_score in", values, "additionScore"); + return (Criteria) this; + } + + public Criteria andAdditionScoreNotIn(List values) { + addCriterion("addition_score not in", values, "additionScore"); + return (Criteria) this; + } + + public Criteria andAdditionScoreBetween(Integer value1, Integer value2) { + addCriterion("addition_score between", value1, value2, "additionScore"); + return (Criteria) this; + } + + public Criteria andAdditionScoreNotBetween(Integer value1, Integer value2) { + addCriterion("addition_score not between", value1, value2, "additionScore"); + return (Criteria) this; + } + + public Criteria andRankingIsNull() { + addCriterion("ranking is null"); + return (Criteria) this; + } + + public Criteria andRankingIsNotNull() { + addCriterion("ranking is not null"); + return (Criteria) this; + } + + public Criteria andRankingEqualTo(Integer value) { + addCriterion("ranking =", value, "ranking"); + return (Criteria) this; + } + + public Criteria andRankingNotEqualTo(Integer value) { + addCriterion("ranking <>", value, "ranking"); + return (Criteria) this; + } + + public Criteria andRankingGreaterThan(Integer value) { + addCriterion("ranking >", value, "ranking"); + return (Criteria) this; + } + + public Criteria andRankingGreaterThanOrEqualTo(Integer value) { + addCriterion("ranking >=", value, "ranking"); + return (Criteria) this; + } + + public Criteria andRankingLessThan(Integer value) { + addCriterion("ranking <", value, "ranking"); + return (Criteria) this; + } + + public Criteria andRankingLessThanOrEqualTo(Integer value) { + addCriterion("ranking <=", value, "ranking"); + return (Criteria) this; + } + + public Criteria andRankingIn(List values) { + addCriterion("ranking in", values, "ranking"); + return (Criteria) this; + } + + public Criteria andRankingNotIn(List values) { + addCriterion("ranking not in", values, "ranking"); + return (Criteria) this; + } + + public Criteria andRankingBetween(Integer value1, Integer value2) { + addCriterion("ranking between", value1, value2, "ranking"); + return (Criteria) this; + } + + public Criteria andRankingNotBetween(Integer value1, Integer value2) { + addCriterion("ranking not between", value1, value2, "ranking"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeIsNull() { + addCriterion("level_up_type is null"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeIsNotNull() { + addCriterion("level_up_type is not null"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeEqualTo(Byte value) { + addCriterion("level_up_type =", value, "levelUpType"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeNotEqualTo(Byte value) { + addCriterion("level_up_type <>", value, "levelUpType"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeGreaterThan(Byte value) { + addCriterion("level_up_type >", value, "levelUpType"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("level_up_type >=", value, "levelUpType"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeLessThan(Byte value) { + addCriterion("level_up_type <", value, "levelUpType"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeLessThanOrEqualTo(Byte value) { + addCriterion("level_up_type <=", value, "levelUpType"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeIn(List values) { + addCriterion("level_up_type in", values, "levelUpType"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeNotIn(List values) { + addCriterion("level_up_type not in", values, "levelUpType"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeBetween(Byte value1, Byte value2) { + addCriterion("level_up_type between", value1, value2, "levelUpType"); + return (Criteria) this; + } + + public Criteria andLevelUpTypeNotBetween(Byte value1, Byte value2) { + addCriterion("level_up_type not between", value1, value2, "levelUpType"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/LevelUser.java b/mt/src/main/java/com/ccsens/mt/bean/po/LevelUser.java new file mode 100644 index 00000000..c09e467f --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/LevelUser.java @@ -0,0 +1,106 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class LevelUser implements Serializable { + private Long id; + + private Long playerId; + + private String avatarUrl; + + private String name; + + private Long teamId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPlayerId() { + return playerId; + } + + public void setPlayerId(Long playerId) { + this.playerId = playerId; + } + + public String getAvatarUrl() { + return avatarUrl; + } + + public void setAvatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl == null ? null : avatarUrl.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Long getTeamId() { + return teamId; + } + + public void setTeamId(Long teamId) { + this.teamId = teamId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", playerId=").append(playerId); + sb.append(", avatarUrl=").append(avatarUrl); + sb.append(", name=").append(name); + sb.append(", teamId=").append(teamId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/LevelUserExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/LevelUserExample.java new file mode 100644 index 00000000..8fa18271 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/LevelUserExample.java @@ -0,0 +1,701 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class LevelUserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LevelUserExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNull() { + addCriterion("player_id is null"); + return (Criteria) this; + } + + public Criteria andPlayerIdIsNotNull() { + addCriterion("player_id is not null"); + return (Criteria) this; + } + + public Criteria andPlayerIdEqualTo(Long value) { + addCriterion("player_id =", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotEqualTo(Long value) { + addCriterion("player_id <>", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThan(Long value) { + addCriterion("player_id >", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) { + addCriterion("player_id >=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThan(Long value) { + addCriterion("player_id <", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdLessThanOrEqualTo(Long value) { + addCriterion("player_id <=", value, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdIn(List values) { + addCriterion("player_id in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotIn(List values) { + addCriterion("player_id not in", values, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdBetween(Long value1, Long value2) { + addCriterion("player_id between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andPlayerIdNotBetween(Long value1, Long value2) { + addCriterion("player_id not between", value1, value2, "playerId"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIsNull() { + addCriterion("avatar_url is null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIsNotNull() { + addCriterion("avatar_url is not null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlEqualTo(String value) { + addCriterion("avatar_url =", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotEqualTo(String value) { + addCriterion("avatar_url <>", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThan(String value) { + addCriterion("avatar_url >", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThanOrEqualTo(String value) { + addCriterion("avatar_url >=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThan(String value) { + addCriterion("avatar_url <", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThanOrEqualTo(String value) { + addCriterion("avatar_url <=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLike(String value) { + addCriterion("avatar_url like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotLike(String value) { + addCriterion("avatar_url not like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIn(List values) { + addCriterion("avatar_url in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotIn(List values) { + addCriterion("avatar_url not in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlBetween(String value1, String value2) { + addCriterion("avatar_url between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotBetween(String value1, String value2) { + addCriterion("avatar_url not between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(Long value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(Long value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(Long value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(Long value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(Long value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(Long value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(Long value1, Long value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(Long value1, Long value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtGroup.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtGroup.java new file mode 100644 index 00000000..47825350 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtGroup.java @@ -0,0 +1,117 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MtGroup implements Serializable { + private Long id; + + private Long projectId; + + private String name; + + private Byte advanceStatus; + + private Integer score; + + private Byte type; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Byte getAdvanceStatus() { + return advanceStatus; + } + + public void setAdvanceStatus(Byte advanceStatus) { + this.advanceStatus = advanceStatus; + } + + public Integer getScore() { + return score; + } + + public void setScore(Integer score) { + this.score = score; + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", name=").append(name); + sb.append(", advanceStatus=").append(advanceStatus); + sb.append(", score=").append(score); + sb.append(", type=").append(type); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtGroupExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtGroupExample.java new file mode 100644 index 00000000..2c2f8b83 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtGroupExample.java @@ -0,0 +1,751 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtGroupExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtGroupExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusIsNull() { + addCriterion("advance_status is null"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusIsNotNull() { + addCriterion("advance_status is not null"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusEqualTo(Byte value) { + addCriterion("advance_status =", value, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusNotEqualTo(Byte value) { + addCriterion("advance_status <>", value, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusGreaterThan(Byte value) { + addCriterion("advance_status >", value, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("advance_status >=", value, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusLessThan(Byte value) { + addCriterion("advance_status <", value, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusLessThanOrEqualTo(Byte value) { + addCriterion("advance_status <=", value, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusIn(List values) { + addCriterion("advance_status in", values, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusNotIn(List values) { + addCriterion("advance_status not in", values, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusBetween(Byte value1, Byte value2) { + addCriterion("advance_status between", value1, value2, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andAdvanceStatusNotBetween(Byte value1, Byte value2) { + addCriterion("advance_status not between", value1, value2, "advanceStatus"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Integer value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Integer value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Integer value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Integer value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Integer value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Integer value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Integer value1, Integer value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Integer value1, Integer value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtGroupTopic.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtGroupTopic.java new file mode 100644 index 00000000..52beab56 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtGroupTopic.java @@ -0,0 +1,106 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MtGroupTopic implements Serializable { + private Long id; + + private Long topicId; + + private Long groupId; + + private String answers; + + private Integer score; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getTopicId() { + return topicId; + } + + public void setTopicId(Long topicId) { + this.topicId = topicId; + } + + public Long getGroupId() { + return groupId; + } + + public void setGroupId(Long groupId) { + this.groupId = groupId; + } + + public String getAnswers() { + return answers; + } + + public void setAnswers(String answers) { + this.answers = answers == null ? null : answers.trim(); + } + + public Integer getScore() { + return score; + } + + public void setScore(Integer score) { + this.score = score; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", topicId=").append(topicId); + sb.append(", groupId=").append(groupId); + sb.append(", answers=").append(answers); + sb.append(", score=").append(score); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtGroupTopicExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtGroupTopicExample.java new file mode 100644 index 00000000..6276b22f --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtGroupTopicExample.java @@ -0,0 +1,691 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtGroupTopicExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtGroupTopicExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTopicIdIsNull() { + addCriterion("topic_id is null"); + return (Criteria) this; + } + + public Criteria andTopicIdIsNotNull() { + addCriterion("topic_id is not null"); + return (Criteria) this; + } + + public Criteria andTopicIdEqualTo(Long value) { + addCriterion("topic_id =", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdNotEqualTo(Long value) { + addCriterion("topic_id <>", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdGreaterThan(Long value) { + addCriterion("topic_id >", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdGreaterThanOrEqualTo(Long value) { + addCriterion("topic_id >=", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdLessThan(Long value) { + addCriterion("topic_id <", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdLessThanOrEqualTo(Long value) { + addCriterion("topic_id <=", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdIn(List values) { + addCriterion("topic_id in", values, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdNotIn(List values) { + addCriterion("topic_id not in", values, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdBetween(Long value1, Long value2) { + addCriterion("topic_id between", value1, value2, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdNotBetween(Long value1, Long value2) { + addCriterion("topic_id not between", value1, value2, "topicId"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNull() { + addCriterion("group_id is null"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNotNull() { + addCriterion("group_id is not null"); + return (Criteria) this; + } + + public Criteria andGroupIdEqualTo(Long value) { + addCriterion("group_id =", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotEqualTo(Long value) { + addCriterion("group_id <>", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThan(Long value) { + addCriterion("group_id >", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("group_id >=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThan(Long value) { + addCriterion("group_id <", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThanOrEqualTo(Long value) { + addCriterion("group_id <=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdIn(List values) { + addCriterion("group_id in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotIn(List values) { + addCriterion("group_id not in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdBetween(Long value1, Long value2) { + addCriterion("group_id between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotBetween(Long value1, Long value2) { + addCriterion("group_id not between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andAnswersIsNull() { + addCriterion("answers is null"); + return (Criteria) this; + } + + public Criteria andAnswersIsNotNull() { + addCriterion("answers is not null"); + return (Criteria) this; + } + + public Criteria andAnswersEqualTo(String value) { + addCriterion("answers =", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersNotEqualTo(String value) { + addCriterion("answers <>", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersGreaterThan(String value) { + addCriterion("answers >", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersGreaterThanOrEqualTo(String value) { + addCriterion("answers >=", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersLessThan(String value) { + addCriterion("answers <", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersLessThanOrEqualTo(String value) { + addCriterion("answers <=", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersLike(String value) { + addCriterion("answers like", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersNotLike(String value) { + addCriterion("answers not like", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersIn(List values) { + addCriterion("answers in", values, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersNotIn(List values) { + addCriterion("answers not in", values, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersBetween(String value1, String value2) { + addCriterion("answers between", value1, value2, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersNotBetween(String value1, String value2) { + addCriterion("answers not between", value1, value2, "answers"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Integer value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Integer value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Integer value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Integer value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Integer value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Integer value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Integer value1, Integer value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Integer value1, Integer value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtResponder.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtResponder.java new file mode 100644 index 00000000..d14abdee --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtResponder.java @@ -0,0 +1,95 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MtResponder implements Serializable { + private Long id; + + private Long topicId; + + private Long groupId; + + private Long responderTime; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getTopicId() { + return topicId; + } + + public void setTopicId(Long topicId) { + this.topicId = topicId; + } + + public Long getGroupId() { + return groupId; + } + + public void setGroupId(Long groupId) { + this.groupId = groupId; + } + + public Long getResponderTime() { + return responderTime; + } + + public void setResponderTime(Long responderTime) { + this.responderTime = responderTime; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", topicId=").append(topicId); + sb.append(", groupId=").append(groupId); + sb.append(", responderTime=").append(responderTime); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtResponderExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtResponderExample.java new file mode 100644 index 00000000..2e1ebf91 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtResponderExample.java @@ -0,0 +1,621 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtResponderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtResponderExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTopicIdIsNull() { + addCriterion("topic_id is null"); + return (Criteria) this; + } + + public Criteria andTopicIdIsNotNull() { + addCriterion("topic_id is not null"); + return (Criteria) this; + } + + public Criteria andTopicIdEqualTo(Long value) { + addCriterion("topic_id =", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdNotEqualTo(Long value) { + addCriterion("topic_id <>", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdGreaterThan(Long value) { + addCriterion("topic_id >", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdGreaterThanOrEqualTo(Long value) { + addCriterion("topic_id >=", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdLessThan(Long value) { + addCriterion("topic_id <", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdLessThanOrEqualTo(Long value) { + addCriterion("topic_id <=", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdIn(List values) { + addCriterion("topic_id in", values, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdNotIn(List values) { + addCriterion("topic_id not in", values, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdBetween(Long value1, Long value2) { + addCriterion("topic_id between", value1, value2, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdNotBetween(Long value1, Long value2) { + addCriterion("topic_id not between", value1, value2, "topicId"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNull() { + addCriterion("group_id is null"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNotNull() { + addCriterion("group_id is not null"); + return (Criteria) this; + } + + public Criteria andGroupIdEqualTo(Long value) { + addCriterion("group_id =", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotEqualTo(Long value) { + addCriterion("group_id <>", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThan(Long value) { + addCriterion("group_id >", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("group_id >=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThan(Long value) { + addCriterion("group_id <", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThanOrEqualTo(Long value) { + addCriterion("group_id <=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdIn(List values) { + addCriterion("group_id in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotIn(List values) { + addCriterion("group_id not in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdBetween(Long value1, Long value2) { + addCriterion("group_id between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotBetween(Long value1, Long value2) { + addCriterion("group_id not between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andResponderTimeIsNull() { + addCriterion("responder_time is null"); + return (Criteria) this; + } + + public Criteria andResponderTimeIsNotNull() { + addCriterion("responder_time is not null"); + return (Criteria) this; + } + + public Criteria andResponderTimeEqualTo(Long value) { + addCriterion("responder_time =", value, "responderTime"); + return (Criteria) this; + } + + public Criteria andResponderTimeNotEqualTo(Long value) { + addCriterion("responder_time <>", value, "responderTime"); + return (Criteria) this; + } + + public Criteria andResponderTimeGreaterThan(Long value) { + addCriterion("responder_time >", value, "responderTime"); + return (Criteria) this; + } + + public Criteria andResponderTimeGreaterThanOrEqualTo(Long value) { + addCriterion("responder_time >=", value, "responderTime"); + return (Criteria) this; + } + + public Criteria andResponderTimeLessThan(Long value) { + addCriterion("responder_time <", value, "responderTime"); + return (Criteria) this; + } + + public Criteria andResponderTimeLessThanOrEqualTo(Long value) { + addCriterion("responder_time <=", value, "responderTime"); + return (Criteria) this; + } + + public Criteria andResponderTimeIn(List values) { + addCriterion("responder_time in", values, "responderTime"); + return (Criteria) this; + } + + public Criteria andResponderTimeNotIn(List values) { + addCriterion("responder_time not in", values, "responderTime"); + return (Criteria) this; + } + + public Criteria andResponderTimeBetween(Long value1, Long value2) { + addCriterion("responder_time between", value1, value2, "responderTime"); + return (Criteria) this; + } + + public Criteria andResponderTimeNotBetween(Long value1, Long value2) { + addCriterion("responder_time not between", value1, value2, "responderTime"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtTopic.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtTopic.java new file mode 100644 index 00000000..77fcee53 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtTopic.java @@ -0,0 +1,139 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MtTopic implements Serializable { + private Long id; + + private String description; + + private Byte linkType; + + private Byte topicType; + + private Byte scoreRule; + + private Integer score; + + private Integer sequence; + + private String answers; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Byte getLinkType() { + return linkType; + } + + public void setLinkType(Byte linkType) { + this.linkType = linkType; + } + + public Byte getTopicType() { + return topicType; + } + + public void setTopicType(Byte topicType) { + this.topicType = topicType; + } + + public Byte getScoreRule() { + return scoreRule; + } + + public void setScoreRule(Byte scoreRule) { + this.scoreRule = scoreRule; + } + + public Integer getScore() { + return score; + } + + public void setScore(Integer score) { + this.score = score; + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + public String getAnswers() { + return answers; + } + + public void setAnswers(String answers) { + this.answers = answers == null ? null : answers.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", description=").append(description); + sb.append(", linkType=").append(linkType); + sb.append(", topicType=").append(topicType); + sb.append(", scoreRule=").append(scoreRule); + sb.append(", score=").append(score); + sb.append(", sequence=").append(sequence); + sb.append(", answers=").append(answers); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtTopicExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtTopicExample.java new file mode 100644 index 00000000..2bc948c2 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtTopicExample.java @@ -0,0 +1,881 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtTopicExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtTopicExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andLinkTypeIsNull() { + addCriterion("link_type is null"); + return (Criteria) this; + } + + public Criteria andLinkTypeIsNotNull() { + addCriterion("link_type is not null"); + return (Criteria) this; + } + + public Criteria andLinkTypeEqualTo(Byte value) { + addCriterion("link_type =", value, "linkType"); + return (Criteria) this; + } + + public Criteria andLinkTypeNotEqualTo(Byte value) { + addCriterion("link_type <>", value, "linkType"); + return (Criteria) this; + } + + public Criteria andLinkTypeGreaterThan(Byte value) { + addCriterion("link_type >", value, "linkType"); + return (Criteria) this; + } + + public Criteria andLinkTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("link_type >=", value, "linkType"); + return (Criteria) this; + } + + public Criteria andLinkTypeLessThan(Byte value) { + addCriterion("link_type <", value, "linkType"); + return (Criteria) this; + } + + public Criteria andLinkTypeLessThanOrEqualTo(Byte value) { + addCriterion("link_type <=", value, "linkType"); + return (Criteria) this; + } + + public Criteria andLinkTypeIn(List values) { + addCriterion("link_type in", values, "linkType"); + return (Criteria) this; + } + + public Criteria andLinkTypeNotIn(List values) { + addCriterion("link_type not in", values, "linkType"); + return (Criteria) this; + } + + public Criteria andLinkTypeBetween(Byte value1, Byte value2) { + addCriterion("link_type between", value1, value2, "linkType"); + return (Criteria) this; + } + + public Criteria andLinkTypeNotBetween(Byte value1, Byte value2) { + addCriterion("link_type not between", value1, value2, "linkType"); + return (Criteria) this; + } + + public Criteria andTopicTypeIsNull() { + addCriterion("topic_type is null"); + return (Criteria) this; + } + + public Criteria andTopicTypeIsNotNull() { + addCriterion("topic_type is not null"); + return (Criteria) this; + } + + public Criteria andTopicTypeEqualTo(Byte value) { + addCriterion("topic_type =", value, "topicType"); + return (Criteria) this; + } + + public Criteria andTopicTypeNotEqualTo(Byte value) { + addCriterion("topic_type <>", value, "topicType"); + return (Criteria) this; + } + + public Criteria andTopicTypeGreaterThan(Byte value) { + addCriterion("topic_type >", value, "topicType"); + return (Criteria) this; + } + + public Criteria andTopicTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("topic_type >=", value, "topicType"); + return (Criteria) this; + } + + public Criteria andTopicTypeLessThan(Byte value) { + addCriterion("topic_type <", value, "topicType"); + return (Criteria) this; + } + + public Criteria andTopicTypeLessThanOrEqualTo(Byte value) { + addCriterion("topic_type <=", value, "topicType"); + return (Criteria) this; + } + + public Criteria andTopicTypeIn(List values) { + addCriterion("topic_type in", values, "topicType"); + return (Criteria) this; + } + + public Criteria andTopicTypeNotIn(List values) { + addCriterion("topic_type not in", values, "topicType"); + return (Criteria) this; + } + + public Criteria andTopicTypeBetween(Byte value1, Byte value2) { + addCriterion("topic_type between", value1, value2, "topicType"); + return (Criteria) this; + } + + public Criteria andTopicTypeNotBetween(Byte value1, Byte value2) { + addCriterion("topic_type not between", value1, value2, "topicType"); + return (Criteria) this; + } + + public Criteria andScoreRuleIsNull() { + addCriterion("score_rule is null"); + return (Criteria) this; + } + + public Criteria andScoreRuleIsNotNull() { + addCriterion("score_rule is not null"); + return (Criteria) this; + } + + public Criteria andScoreRuleEqualTo(Byte value) { + addCriterion("score_rule =", value, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreRuleNotEqualTo(Byte value) { + addCriterion("score_rule <>", value, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreRuleGreaterThan(Byte value) { + addCriterion("score_rule >", value, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreRuleGreaterThanOrEqualTo(Byte value) { + addCriterion("score_rule >=", value, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreRuleLessThan(Byte value) { + addCriterion("score_rule <", value, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreRuleLessThanOrEqualTo(Byte value) { + addCriterion("score_rule <=", value, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreRuleIn(List values) { + addCriterion("score_rule in", values, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreRuleNotIn(List values) { + addCriterion("score_rule not in", values, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreRuleBetween(Byte value1, Byte value2) { + addCriterion("score_rule between", value1, value2, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreRuleNotBetween(Byte value1, Byte value2) { + addCriterion("score_rule not between", value1, value2, "scoreRule"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Integer value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Integer value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Integer value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Integer value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Integer value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Integer value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Integer value1, Integer value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Integer value1, Integer value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andSequenceIsNull() { + addCriterion("sequence is null"); + return (Criteria) this; + } + + public Criteria andSequenceIsNotNull() { + addCriterion("sequence is not null"); + return (Criteria) this; + } + + public Criteria andSequenceEqualTo(Integer value) { + addCriterion("sequence =", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotEqualTo(Integer value) { + addCriterion("sequence <>", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThan(Integer value) { + addCriterion("sequence >", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThanOrEqualTo(Integer value) { + addCriterion("sequence >=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThan(Integer value) { + addCriterion("sequence <", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThanOrEqualTo(Integer value) { + addCriterion("sequence <=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceIn(List values) { + addCriterion("sequence in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotIn(List values) { + addCriterion("sequence not in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceBetween(Integer value1, Integer value2) { + addCriterion("sequence between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotBetween(Integer value1, Integer value2) { + addCriterion("sequence not between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andAnswersIsNull() { + addCriterion("answers is null"); + return (Criteria) this; + } + + public Criteria andAnswersIsNotNull() { + addCriterion("answers is not null"); + return (Criteria) this; + } + + public Criteria andAnswersEqualTo(String value) { + addCriterion("answers =", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersNotEqualTo(String value) { + addCriterion("answers <>", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersGreaterThan(String value) { + addCriterion("answers >", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersGreaterThanOrEqualTo(String value) { + addCriterion("answers >=", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersLessThan(String value) { + addCriterion("answers <", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersLessThanOrEqualTo(String value) { + addCriterion("answers <=", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersLike(String value) { + addCriterion("answers like", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersNotLike(String value) { + addCriterion("answers not like", value, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersIn(List values) { + addCriterion("answers in", values, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersNotIn(List values) { + addCriterion("answers not in", values, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersBetween(String value1, String value2) { + addCriterion("answers between", value1, value2, "answers"); + return (Criteria) this; + } + + public Criteria andAnswersNotBetween(String value1, String value2) { + addCriterion("answers not between", value1, value2, "answers"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtTopicOption.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtTopicOption.java new file mode 100644 index 00000000..7705f2b9 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtTopicOption.java @@ -0,0 +1,106 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MtTopicOption implements Serializable { + private Long id; + + private Long topicId; + + private String contant; + + private Integer sequence; + + private String option; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getTopicId() { + return topicId; + } + + public void setTopicId(Long topicId) { + this.topicId = topicId; + } + + public String getContant() { + return contant; + } + + public void setContant(String contant) { + this.contant = contant == null ? null : contant.trim(); + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + public String getOption() { + return option; + } + + public void setOption(String option) { + this.option = option == null ? null : option.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", topicId=").append(topicId); + sb.append(", contant=").append(contant); + sb.append(", sequence=").append(sequence); + sb.append(", option=").append(option); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtTopicOptionExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtTopicOptionExample.java new file mode 100644 index 00000000..3bbec7d8 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtTopicOptionExample.java @@ -0,0 +1,701 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtTopicOptionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtTopicOptionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTopicIdIsNull() { + addCriterion("topic_id is null"); + return (Criteria) this; + } + + public Criteria andTopicIdIsNotNull() { + addCriterion("topic_id is not null"); + return (Criteria) this; + } + + public Criteria andTopicIdEqualTo(Long value) { + addCriterion("topic_id =", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdNotEqualTo(Long value) { + addCriterion("topic_id <>", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdGreaterThan(Long value) { + addCriterion("topic_id >", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdGreaterThanOrEqualTo(Long value) { + addCriterion("topic_id >=", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdLessThan(Long value) { + addCriterion("topic_id <", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdLessThanOrEqualTo(Long value) { + addCriterion("topic_id <=", value, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdIn(List values) { + addCriterion("topic_id in", values, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdNotIn(List values) { + addCriterion("topic_id not in", values, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdBetween(Long value1, Long value2) { + addCriterion("topic_id between", value1, value2, "topicId"); + return (Criteria) this; + } + + public Criteria andTopicIdNotBetween(Long value1, Long value2) { + addCriterion("topic_id not between", value1, value2, "topicId"); + return (Criteria) this; + } + + public Criteria andContantIsNull() { + addCriterion("contant is null"); + return (Criteria) this; + } + + public Criteria andContantIsNotNull() { + addCriterion("contant is not null"); + return (Criteria) this; + } + + public Criteria andContantEqualTo(String value) { + addCriterion("contant =", value, "contant"); + return (Criteria) this; + } + + public Criteria andContantNotEqualTo(String value) { + addCriterion("contant <>", value, "contant"); + return (Criteria) this; + } + + public Criteria andContantGreaterThan(String value) { + addCriterion("contant >", value, "contant"); + return (Criteria) this; + } + + public Criteria andContantGreaterThanOrEqualTo(String value) { + addCriterion("contant >=", value, "contant"); + return (Criteria) this; + } + + public Criteria andContantLessThan(String value) { + addCriterion("contant <", value, "contant"); + return (Criteria) this; + } + + public Criteria andContantLessThanOrEqualTo(String value) { + addCriterion("contant <=", value, "contant"); + return (Criteria) this; + } + + public Criteria andContantLike(String value) { + addCriterion("contant like", value, "contant"); + return (Criteria) this; + } + + public Criteria andContantNotLike(String value) { + addCriterion("contant not like", value, "contant"); + return (Criteria) this; + } + + public Criteria andContantIn(List values) { + addCriterion("contant in", values, "contant"); + return (Criteria) this; + } + + public Criteria andContantNotIn(List values) { + addCriterion("contant not in", values, "contant"); + return (Criteria) this; + } + + public Criteria andContantBetween(String value1, String value2) { + addCriterion("contant between", value1, value2, "contant"); + return (Criteria) this; + } + + public Criteria andContantNotBetween(String value1, String value2) { + addCriterion("contant not between", value1, value2, "contant"); + return (Criteria) this; + } + + public Criteria andSequenceIsNull() { + addCriterion("sequence is null"); + return (Criteria) this; + } + + public Criteria andSequenceIsNotNull() { + addCriterion("sequence is not null"); + return (Criteria) this; + } + + public Criteria andSequenceEqualTo(Integer value) { + addCriterion("sequence =", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotEqualTo(Integer value) { + addCriterion("sequence <>", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThan(Integer value) { + addCriterion("sequence >", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThanOrEqualTo(Integer value) { + addCriterion("sequence >=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThan(Integer value) { + addCriterion("sequence <", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThanOrEqualTo(Integer value) { + addCriterion("sequence <=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceIn(List values) { + addCriterion("sequence in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotIn(List values) { + addCriterion("sequence not in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceBetween(Integer value1, Integer value2) { + addCriterion("sequence between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotBetween(Integer value1, Integer value2) { + addCriterion("sequence not between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andOptionIsNull() { + addCriterion("option is null"); + return (Criteria) this; + } + + public Criteria andOptionIsNotNull() { + addCriterion("option is not null"); + return (Criteria) this; + } + + public Criteria andOptionEqualTo(String value) { + addCriterion("option =", value, "option"); + return (Criteria) this; + } + + public Criteria andOptionNotEqualTo(String value) { + addCriterion("option <>", value, "option"); + return (Criteria) this; + } + + public Criteria andOptionGreaterThan(String value) { + addCriterion("option >", value, "option"); + return (Criteria) this; + } + + public Criteria andOptionGreaterThanOrEqualTo(String value) { + addCriterion("option >=", value, "option"); + return (Criteria) this; + } + + public Criteria andOptionLessThan(String value) { + addCriterion("option <", value, "option"); + return (Criteria) this; + } + + public Criteria andOptionLessThanOrEqualTo(String value) { + addCriterion("option <=", value, "option"); + return (Criteria) this; + } + + public Criteria andOptionLike(String value) { + addCriterion("option like", value, "option"); + return (Criteria) this; + } + + public Criteria andOptionNotLike(String value) { + addCriterion("option not like", value, "option"); + return (Criteria) this; + } + + public Criteria andOptionIn(List values) { + addCriterion("option in", values, "option"); + return (Criteria) this; + } + + public Criteria andOptionNotIn(List values) { + addCriterion("option not in", values, "option"); + return (Criteria) this; + } + + public Criteria andOptionBetween(String value1, String value2) { + addCriterion("option between", value1, value2, "option"); + return (Criteria) this; + } + + public Criteria andOptionNotBetween(String value1, String value2) { + addCriterion("option not between", value1, value2, "option"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtVote.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtVote.java new file mode 100644 index 00000000..d587e5ef --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtVote.java @@ -0,0 +1,84 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MtVote implements Serializable { + private Long id; + + private Long userId; + + private Long groupId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getGroupId() { + return groupId; + } + + public void setGroupId(Long groupId) { + this.groupId = groupId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", groupId=").append(groupId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtVoteExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtVoteExample.java new file mode 100644 index 00000000..ed160d7b --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtVoteExample.java @@ -0,0 +1,561 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtVoteExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtVoteExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNull() { + addCriterion("group_id is null"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNotNull() { + addCriterion("group_id is not null"); + return (Criteria) this; + } + + public Criteria andGroupIdEqualTo(Long value) { + addCriterion("group_id =", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotEqualTo(Long value) { + addCriterion("group_id <>", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThan(Long value) { + addCriterion("group_id >", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("group_id >=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThan(Long value) { + addCriterion("group_id <", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThanOrEqualTo(Long value) { + addCriterion("group_id <=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdIn(List values) { + addCriterion("group_id in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotIn(List values) { + addCriterion("group_id not in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdBetween(Long value1, Long value2) { + addCriterion("group_id between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotBetween(Long value1, Long value2) { + addCriterion("group_id not between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java new file mode 100644 index 00000000..bb2f7ab1 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java @@ -0,0 +1,355 @@ +package com.ccsens.mt.bean.vo; + +import com.ccsens.mt.bean.po.CompetePlayer; +import com.ccsens.mt.bean.po.CompeteTeam; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class CompeteVo { + @Data + @ApiModel("查找第几届") + public static class CompeteTime{ + @ApiModelProperty("id") + private Long id; + @ApiModelProperty("名字") + private String name; + @ApiModelProperty("类型") + private byte type; + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("报名开始时间") + private Long signUpStartTime; + @ApiModelProperty("报名结束时间") + private Long signUpEndTime; + @ApiModelProperty("进行的阶段,0报名阶段 1比赛进行阶段,2评审阶段,3结束") + private byte competeStatus; + } + @Data + @ApiModel("查找组别") + public static class CompeteGroup { + @ApiModelProperty("组别的id") + private Long groupId; + @ApiModelProperty("组别的名字") + private String groupName; + @ApiModelProperty("描述") + private String groupDescription; + } + + @Data + @ApiModel("模糊查询参赛单位") + public static class CompeteCompany { + @ApiModelProperty("单位id") + private Long groupId; + @ApiModelProperty("单位的名字") + private String groupName; + } + + @Data + @ApiModel("返回当前选手所有报名信息") + public static class CompetePlayerInfo { + @ApiModelProperty("id") + private Long playerId; + @ApiModelProperty("姓名") + private String name; + @ApiModelProperty("性别 0女 1男") + private int gender; + @ApiModelProperty("手机号") + private String phone; +// @ApiModelProperty("手机验证码") +// private String smsCode; + @ApiModelProperty("身份证") + private String idCard; + @ApiModelProperty("参加的组别的id") + private Long groupId; + @ApiModelProperty("参加的组别的名字") + private String groupName; + @ApiModelProperty("参赛单位的名字") + private String companyName; + @ApiModelProperty("身份证正面照文件的路径/户口本照片") + private String idCardFront; + @ApiModelProperty("身份证反面照文件的路径") + private String idCardBack; + @ApiModelProperty("声明文件的路径") + private String proveImg; + @ApiModelProperty("参加的单人比赛信息") + private List competeTiwnProjects; + @ApiModelProperty("参加的团队比赛信息") + private List competeTeamProjects; + + public CompetePlayerInfo(CompetePlayer player, com.ccsens.mt.bean.po.CompeteGroup group , com.ccsens.mt.bean.po.CompeteCompany company ,CompeteProjectAllByUser competeProjectAll) { + this.playerId = player.getId(); + this.name = player.getName(); + this.gender = player.getGender(); + this.phone = player.getPhone(); + this.idCard = player.getIdCard(); + this.groupId = group.getId(); + this.groupName = group.getGroupName(); + this.companyName = company.getName(); + this.idCardBack = player.getIdCardBack(); + this.idCardFront = player.getIdCardFront(); + this.proveImg = player.getProveImg(); + this.competeTiwnProjects = competeProjectAll.getCompeteTiwnProjects(); + this.competeTeamProjects = competeProjectAll.getCompeteTeamProjects(); + } + } + + @Data + @ApiModel("单人比赛信息") + public static class CompeteTiwnProject { + @ApiModelProperty("选手与单人项目关联信息的id") + private Long competeProjectId; + @ApiModelProperty("比赛的类型,0跳绳比赛") + private byte type; + @ApiModelProperty("一级项目名字") + private String parentProjectName; + @ApiModelProperty("二级项目的名字") + private String secondProjectName; + @ApiModelProperty("是否通级 0否 1是") + private byte certificate; + } + + @Data + @ApiModel("团队比赛信息") + public static class CompeteTeamProject { + @ApiModelProperty("团队id") + private Long teamId; + @ApiModelProperty("比赛的类型,0跳绳比赛") + private byte type; + @ApiModelProperty("一级项目名字") + private String parentProjectName; + @ApiModelProperty("二级项目的名字") + private String secondProjectName; + @ApiModelProperty("是否通级 0否 1是") + private byte certificate; + @ApiModelProperty("当前用户是否是创建者 0否 1是") + private byte creator; + @ApiModelProperty("最少人数") + private int memberMin; + @ApiModelProperty("最多人数") + private int memberMax; + @ApiModelProperty("当前人数") + private int memberNums; + @ApiModelProperty("二维码信息") + private String qrCode; + @ApiModelProperty("团队内的成员") + private List members; + + + public CompeteTeamProject() { + } + + public CompeteTeamProject(CompeteTeam team, byte isCreator, com.ccsens.mt.bean.po.CompeteProject project, String parentProjectName, List members) { + this.teamId = team.getId(); + this.type = project.getType(); + this.parentProjectName = parentProjectName; + this.secondProjectName = project.getName(); + this.certificate = team.getCertificate(); + this.creator = isCreator; + this.memberMin = project.getMemberMin(); + this.memberMax = project.getMemberMax(); + this.memberNums = members.size(); + this.members = members; + } + + + } + + @Data + @ApiModel("团队内的成员") + public static class CompeteTeamProjectMember { + @ApiModelProperty("参加的成员的id") + private Long memberId; + @ApiModelProperty("参加的成员的名字") + private String memberName; + @ApiModelProperty("是否是队长 0否 1是") + private byte captain; + } + + + @Data + @ApiModel("查找比赛项目信息") + public static class CompeteProject { + @ApiModelProperty("一级项目id") + private Long parentProjectId; + @ApiModelProperty("一级项目名字") + private String parentProjectName; + @ApiModelProperty("比赛的类型,0跳绳比赛") + private byte type; + @ApiModelProperty("二级项目信息") + private List secondProjects; + } + @Data + @ApiModel("查找二级比赛项目信息") + public static class CompeteSecondProject { + @ApiModelProperty("项目id") + private Long id; + @ApiModelProperty("名字") + private String name; + @ApiModelProperty("是否是团队项目 0否 1是") + private byte team; + @ApiModelProperty("参加限制,0同单位同组别,1同单位不限组别") + private byte joinRule; + @ApiModelProperty("是否支持通级 0否 1是") + private byte certificate; + @ApiModelProperty("最少人数") + private int memberMin; + @ApiModelProperty("最多人数") + private int memberMax; + } + + @Data + @ApiModel("查看本人所有参赛的项目") + public static class CompeteProjectAllByUser { + @ApiModelProperty("参加的单人比赛信息") + private List competeTiwnProjects; + @ApiModelProperty("参加的团队比赛信息") + private List competeTeamProjects; + } + + @Data + @ApiModel("当前选手的基本报名信息") + public static class GetPlayerInfo { + @ApiModelProperty("id") + private Long playerId; + @ApiModelProperty("姓名") + private String name; + @ApiModelProperty("性别 0女 1男") + private int gender; + @ApiModelProperty("手机号") + private String phone; + @ApiModelProperty("身份证") + private String idCard; + @ApiModelProperty("参加的组别的id") + private Long groupId; + @ApiModelProperty("参加的组别的名字") + private String groupName; + @ApiModelProperty("参赛单位的名字") + private String companyName; + @ApiModelProperty("身份证正面照文件的路径/户口本照片") + private String idCardFront; + @ApiModelProperty("身份证反面照文件的路径") + private String idCardBack; + @ApiModelProperty("声明文件的路径") + private String proveImg; + } + + + @Data + @ApiModel("院系报名信息表") + public static class DepartmentInfo { + @ApiModelProperty("院系id") + private Long id; + @ApiModelProperty("院系名") + private String name; + @ApiModelProperty("返回的填表人裁判等信息") + private List departmentRoles; + @ApiModelProperty("返回每个比赛项目的参赛名单") + private List departmentProjects; + } + @Data + @ApiModel("返回的填表人裁判等信息") + public static class DepartmentRole{ + @ApiModelProperty("人员的id") + private String id; + @ApiModelProperty("名字") + private String name; + @ApiModelProperty("手机号") + private String phone; + @ApiModelProperty("担任的角色 0领队 1裁判 2填表人") + private int role; + } + @Data + @ApiModel("查找比赛项目报名信息") + public static class DepartmentProject { + @ApiModelProperty("一级项目id") + private Long parentProjectId; + @ApiModelProperty("一级项目名字") + private String parentProjectName; + @ApiModelProperty("比赛的类型,0跳绳比赛") + private byte type; + @ApiModelProperty("二级项目报名人员信息") + private List secondProjects; + } + @Data + @ApiModel("返回每个比赛项目的参赛名单") + public static class DepartmentSecondProject{ + @ApiModelProperty("比赛项目id(二级的)") + private Long competeProjectId; + @ApiModelProperty("比赛项目名字") + private String competeProjectName; + @ApiModelProperty("是否是团队项目 0否 1是") + private byte team; + @ApiModelProperty("男子参赛名单") + private String manName; + @ApiModelProperty("女子参赛名单") + private String womanName; + @ApiModelProperty("混合名单") + private String mixedName; + } + + @Data + @ApiModel("查询项目下的选手列表") + public static class QueryPlayerList{ + @ApiModelProperty("个人信息") + private List playerList; + @ApiModelProperty("团队信息") + private List teamList; + } + + @Data + @ApiModel("比赛项目下的个人信息") + public static class PlayerInfoByProject{ + @ApiModelProperty("id") + private Long playerId; + @ApiModelProperty("姓名") + private String name; + @ApiModelProperty("性别 0女 1男") + private int gender; + @ApiModelProperty("手机号") + private String phone; + @ApiModelProperty("参加的组别的id") + private Long groupId; + @ApiModelProperty("参加的组别的名字") + private String groupName; + @ApiModelProperty("参赛单位的名字") + private String companyName; + @ApiModelProperty("是否通级 0否 1是") + private byte certificate; + @ApiModelProperty("录播视频信息") + private List videoInfoList; + @ApiModelProperty("分数") + private BigDecimal score; + } + @Data + @ApiModel("比赛项目下团队信息") + public static class TeamInfoByProject{ + @ApiModelProperty("团队表Id") + private Long teamId; + @ApiModelProperty("创建者id") + private Long creatorId; + @ApiModelProperty("创建者姓名") + private String creatorName; + @ApiModelProperty("是否通级 0否 1是") + private byte certificate; + @ApiModelProperty("当前人数") + private int memberNums; + @ApiModelProperty("团队内的成员") + private List members; + @ApiModelProperty("录播视频信息") + private List videoInfoList; + @ApiModelProperty("分数") + private BigDecimal score; + } + + +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/FileVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/FileVo.java new file mode 100644 index 00000000..d04843de --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/FileVo.java @@ -0,0 +1,44 @@ +package com.ccsens.mt.bean.vo; + +import com.ccsens.mt.bean.po.CommonFile; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: 文件 + * @author: whj + * @time: 2020/7/17 11:39 + */ +public class FileVo { + @ApiModel("文件上传") + @Data + public static class Upload{ + @ApiModelProperty("id") + private Long id; + @ApiModelProperty("文件名") + private String name; + @ApiModelProperty("访问路径") + private String visitUrl; + + /** + * 参数转化 + * @param files 文件对象 + * @return 文件访问 + */ + public static List transFilePo(List files) { + List vos = new ArrayList<>(); + files.forEach(file->{ + Upload vo = new Upload(); + vo.setId(file.getId()); + vo.setName(file.getFileName()); + vo.setVisitUrl(file.getVisitLocation()); + vos.add(vo); + }); + return vos; + } + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/LevelVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/LevelVo.java new file mode 100644 index 00000000..d7ed27ff --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/LevelVo.java @@ -0,0 +1,23 @@ +package com.ccsens.mt.bean.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author 逗 + */ +public class LevelVo { + @Data + @ApiModel("返回查询到的晋级选手信息") + public static class QueryLevelUserInfo{ + @ApiModelProperty("选手id") + private Long levelUserId; + @ApiModelProperty("头像") + private String avatarUrl; + @ApiModelProperty("名称") + private String name; + @ApiModelProperty("团队id") + private Long teamId; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/TopicVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/TopicVo.java new file mode 100644 index 00000000..c53e10f6 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/TopicVo.java @@ -0,0 +1,100 @@ +package com.ccsens.mt.bean.vo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class TopicVo { + + @Data + @ApiModel("查询到的题目信息") + public static class TopicInfo{ + @ApiModelProperty("题目id") + private Long topicId; + @ApiModelProperty("题目详情") + private String description; + @ApiModelProperty("选项,填空题为空") + private List options; + @ApiModelProperty("正确答案") + private String answersTrue; + @ApiModelProperty("题号") + private int sequence; + @ApiModelProperty("题目类型") + private int topicType; + @ApiModelProperty("当前环节一共多少题") + private int totalNum; + @ApiModelProperty("有无上一个:0:无 1:有") + private Byte prev; + @ApiModelProperty("有无下一个:0:无 1:有") + private Byte next; + @ApiModelProperty("答案") + private List answers; + } + + @Data + @ApiModel("最小和最大题号") + public static class TopicSequence{ + @ApiModelProperty("最小题号") + private Integer min ; + @ApiModelProperty("最大题号") + private Integer max ; + } + @Data + @ApiModel("答题记录") + public static class Answer{ + @ApiModelProperty("分组ID") + private Long groupId; + @ApiModelProperty("分组的名字") + private String groupName; + @ApiModelProperty("答案") + private String answer; + } + + @Data + @ApiModel("查询到的分组信息") + public static class GroupInfo{ + @ApiModelProperty("分组的id") + private Long groupId; + @ApiModelProperty("分组的名字") + private String groupName; + } + + @Data + @ApiModel("查询到的排名信息") + public static class QueryRanking{ + @ApiModelProperty("分组的id") + private Long groupId; + @ApiModelProperty("分组的名字") + private String groupName; + @ApiModelProperty("分数") + private int score; + @ApiModelProperty("是否分数重复需要附加题 0不需要 1需要") + private int extraTopic; + } + + @Data + @ApiModel("查询到的所有绝地反击的题") + @JsonIgnoreProperties(value = { "handler" }) + public static class TopicByLink{ + @ApiModelProperty("题目id") + private Long topicId; + @ApiModelProperty("题目分数") + private int topicScore; + @ApiModelProperty("题目详情") + private String description; + @ApiModelProperty("选项,填空题为空") + private List options; + @ApiModelProperty("正确答案") + private String answersTrue; + @ApiModelProperty("是否有人答过这道题 0没有 1有") + private int hasAnswers; + } + +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/VideoVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/VideoVo.java new file mode 100644 index 00000000..2458dbb0 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/VideoVo.java @@ -0,0 +1,26 @@ +package com.ccsens.mt.bean.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author 逗 + */ +@Data +public class VideoVo { + @Data + @ApiModel("查看选手上传的视频的信息") + public static class GetVideoInfo{ + @ApiModelProperty("选手上传视频记录id") + private Long videoId; + @ApiModelProperty("文件id") + private Long fileId; + @ApiModelProperty("视频地址") + private String videoUrl; + @ApiModelProperty("上传时间") + private Long uploadTime; + } + + +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/VoteVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/VoteVo.java new file mode 100644 index 00000000..dd5d9357 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/VoteVo.java @@ -0,0 +1,20 @@ +package com.ccsens.mt.bean.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class VoteVo { + @Data + @ApiModel("查询投票结果") + public static class GroupInfo{ + @ApiModelProperty("分组的id") + private Long groupId; + @ApiModelProperty("分组的名字") + private String groupName; + @ApiModelProperty("得票数") + private int voteNums; + } + +} diff --git a/mt/src/main/java/com/ccsens/mt/config/SpringConfig.java b/mt/src/main/java/com/ccsens/mt/config/SpringConfig.java index c477f308..a98c3a3f 100644 --- a/mt/src/main/java/com/ccsens/mt/config/SpringConfig.java +++ b/mt/src/main/java/com/ccsens/mt/config/SpringConfig.java @@ -111,7 +111,7 @@ public class SpringConfig implements WebMvcConfigurer { .addResourceLocations("classpath:/META-INF/resources/webjars/"); registry.addResourceHandler("/uploads/**") - .addResourceLocations("file:///home/cloud/tall/uploads/"); + .addResourceLocations("file:///home/cloud/mt/uploads/"); //super.addResourceHandlers(registry); } diff --git a/mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java b/mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java index 09a10b09..de50f842 100644 --- a/mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java +++ b/mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java @@ -3,7 +3,10 @@ package com.ccsens.mt.intercept; import cn.hutool.core.collection.CollectionUtil; import com.ccsens.util.WebConstant; import org.apache.ibatis.executor.Executor; -import org.apache.ibatis.mapping.*; +import org.apache.ibatis.mapping.BoundSql; +import org.apache.ibatis.mapping.MappedStatement; +import org.apache.ibatis.mapping.ResultMap; +import org.apache.ibatis.mapping.SqlSource; import org.apache.ibatis.plugin.*; import org.apache.ibatis.reflection.DefaultReflectorFactory; import org.apache.ibatis.reflection.MetaObject; @@ -12,8 +15,10 @@ import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory; import org.apache.ibatis.session.ResultHandler; import org.apache.ibatis.session.RowBounds; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; +import java.util.Map; import java.util.Properties; /** @@ -34,43 +39,21 @@ public class MybatisInterceptor implements Interceptor { String selectByExample = "selectByExample"; + String countByExample = "countByExample"; + String countByExample2 = "selectByExample_COUNT"; String selectByPrimaryKey = "selectByPrimaryKey"; Object[] args = invocation.getArgs(); MappedStatement statement = (MappedStatement) args[0]; - if (statement.getId().endsWith(selectByExample)) { + if (statement.getId().endsWith(selectByExample) + || statement.getId().endsWith(countByExample) + || statement.getId().endsWith(countByExample2)) { //XXXExample Object example = args[1]; - Method method = example.getClass().getMethod("getOredCriteria", null); - //获取到条件数组,第一个是Criteria - List list = (List)method.invoke(example); - if (CollectionUtil.isEmpty(list)) { - Class clazz = ((ResultMap)statement.getResultMaps().get(0)).getType(); - String exampleName = clazz.getName() + "Example"; - Object paramExample = Class.forName(exampleName).newInstance(); - Method createCriteria = paramExample.getClass().getMethod("createCriteria"); - Object criteria = createCriteria.invoke(paramExample); - Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); - andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); - list.add(criteria); - } else { - Object criteria = list.get(0); - Method getCriteria = criteria.getClass().getMethod("getCriteria"); - List params = (List)getCriteria.invoke(criteria); - boolean hasDel = false; - for(Object param: params) { - Method getCondition = param.getClass().getMethod("getCondition"); - Object condition = getCondition.invoke(param); - if ("iis_del =".equals(condition)) { - hasDel = true; - } - } - if (!hasDel) { - Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); - andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); - } - } + addCondition(statement, example); + + } else if (statement.getId().endsWith(selectByPrimaryKey)) { @@ -85,6 +68,45 @@ public class MybatisInterceptor implements Interceptor { return invocation.proceed(); } + private void addCondition(MappedStatement statement, Object example) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException { + if (example instanceof Map) { + example = ((Map) example).get("_ORIGINAL_PARAMETER_OBJECT"); + } + + + Method method = example.getClass().getMethod("getOredCriteria", null); + //获取到条件数组,第一个是Criteria + List list = (List) method.invoke(example); + if (CollectionUtil.isEmpty(list)) { + Class clazz = ((ResultMap) statement.getResultMaps().get(0)).getType(); + String exampleName = clazz.getName() + "Example"; + Object paramExample = Class.forName(exampleName).newInstance(); + Method createCriteria = paramExample.getClass().getMethod("createCriteria"); + Object criteria = createCriteria.invoke(paramExample); + Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); + andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); + list.add(criteria); + } else { + Object criteria = list.get(0); + Method getCriteria = criteria.getClass().getMethod("getCriteria"); + List params = (List) getCriteria.invoke(criteria); + boolean hasDel = false; + for (Object param : params) { + Method getCondition = param.getClass().getMethod("getCondition"); + Object condition = getCondition.invoke(param); + if ("rec_status =".equals(condition)) { + hasDel = true; + } + } + if (!hasDel) { + Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); + andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); + } + + } + + } + @Override public Object plugin(Object target) { return Plugin.wrap(target, this); @@ -121,24 +143,7 @@ public class MybatisInterceptor implements Interceptor { return builder.build(); } - private String getOperateType(Invocation invocation) { - final Object[] args = invocation.getArgs(); - MappedStatement ms = (MappedStatement) args[0]; - SqlCommandType commondType = ms.getSqlCommandType(); - if (commondType.compareTo(SqlCommandType.SELECT) == 0) { - return "select"; - } - if (commondType.compareTo(SqlCommandType.INSERT) == 0) { - return "insert"; - } - if (commondType.compareTo(SqlCommandType.UPDATE) == 0) { - return "update"; - } - if (commondType.compareTo(SqlCommandType.DELETE) == 0) { - return "delete"; - } - return null; - } + // 定义一个内部辅助类,作用是包装sq class BoundSqlSqlSource implements SqlSource { private BoundSql boundSql; diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java new file mode 100644 index 00000000..06d3bf79 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/CompetePlayerDao.java @@ -0,0 +1,48 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.mt.persist.mapper.CompetePlayerMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 参赛选手信息 + */ +public interface CompetePlayerDao extends CompetePlayerMapper { + /** + * 查询选手的基本信息 + * @param userId 用户ID + * @return 选手信息 + */ + CompeteVo.GetPlayerInfo getInfo(@Param("userId") Long userId,@Param("competeTimeId")Long competeTimeId); + + /** + * 查询院系信息和裁判领队填表人的信息 + * @param id 院系id + * @return 返回 + */ + CompeteVo.DepartmentInfo getDepartment(@Param("id") Long id); + + /** + * 查询项目信息 + * @param type + * @return + */ + List getDepartmentProject(@Param("type")int type); + + /** + * 获取单人项目参赛人员名单(用逗号分隔) + * @param competeProjectId 项目id + * @return 返回名字 + */ + String getMemberNamesByProjectId(@Param("companyId")Long companyId,@Param("competeProjectId")Long competeProjectId,@Param("genderGroup")int genderGroup); + /** + * 获取团队项目参赛人员名单(用逗号分隔) + * @param competeProjectId 项目id + * @return 返回名字 + */ + String getTeamMemberNamesByProjectId(@Param("companyId")Long companyId,@Param("competeProjectId")Long competeProjectId,@Param("genderGroup")int genderGroup); + + Long getCompanyIdByUser(@Param("userId")Long userId); +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTeamDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTeamDao.java new file mode 100644 index 00000000..4351f731 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTeamDao.java @@ -0,0 +1,83 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.mt.persist.mapper.CompeteTeamMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @description: + * @author: whj + * @time: 2020/9/3 10:40 + */ +public interface CompeteTeamDao extends CompeteTeamMapper { + + /** + * 统计用户参加项目下分组的数量 + * @param projectId 项目ID + * @param playerId 选手ID + * @param competeTimeId 比赛ID + * @return + */ + long countJoinTeam(@Param("projectId") Long projectId, @Param("playerId") Long playerId, @Param("competeTimeId") Long competeTimeId); + + /** + * 统计用户参加这一届下所有不限组别的队伍数 + * @param playerId 选手ID + * @param competeTimeId 比赛ID + * @return + */ + long countJoinProject(@Param("playerId")Long playerId, @Param("competeTimeId")Long competeTimeId); + + /** + * 根据团队ID查询成员信息 + * @param teamId 团队ID + * @return 成员信息 + */ + List queryMembers(@Param("teamId") Long teamId); + + /** + * 根据团队ID返回团队二维码 + * @param teamId 团队ID + * @return 二维码路径 + */ + String getQrCodeByTeamId(@Param("teamId") Long teamId); + + /** + * 查询用户本届比赛所有的单人项目 + * @param userId 用户ID + * @param competeTimeId 比赛ID + * @return 单人赛项目 + */ + List queryTiwn(@Param("userId") Long userId, @Param("competeTimeId") Long competeTimeId); + + /** + * 查询用户本届比赛所有的团体赛项目 + * @param userId 用户ID + * @param competeTimeId 比赛ID + * @return 团队项目(没有队员信息和队员总数) + */ + List queryTeam(@Param("userId") Long userId, @Param("competeTimeId") Long competeTimeId); + + /** + * 统计用户参加了多少个单人赛 + * @param playerId 选手ID + * @param competeTimeId 比赛ID + * @return + */ + long countTiwnTeam(@Param("playerId") Long playerId, @Param("competeTimeId") Long competeTimeId); + + /** + * 通过比赛项目id查找项目下的团队信息 + * @param competeProjectId + * @return + */ + List getTeamByProjectId(@Param("competeProjectId")Long competeProjectId,@Param("competeTimeId")Long competeTimeId); + /** + * 通过比赛项目id查找项目下的选手id + * @param competeProjectId + * @return + */ + List getPlayerByProjectId(@Param("competeProjectId")Long competeProjectId, @Param("competeTimeId")Long competeTimeId); +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTimeDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTimeDao.java new file mode 100644 index 00000000..53c51615 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteTimeDao.java @@ -0,0 +1,52 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.mt.persist.mapper.CompeteTimeMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @author 逗 + */ +@Repository +public interface CompeteTimeDao extends CompeteTimeMapper { + /** + * 通过类型查找第几届和时间 + * @param type 类型 + * @param time 当前时间 + * @return 返回当前这一届的信息 + */ + CompeteVo.CompeteTime getCompeteTimeByType(@Param("type") int type, @Param("time") long time); + + /** + * 根据类型查看所有的组别 + * @param type 类型 + * @return 返回类型下的所有组别 + */ + List queryCompeteGroupByType(@Param("type") int type); + + /** + * 根据类型查找所有参赛单位 + * @param type 类型 + * @return 所有参赛单位 + */ + List queryCompeteCompanyByType(@Param("type") int type); + + /** + * 查看参赛项目信息 + * @param type 类型 + * @return 参赛项目信息 + */ + List queryCompeteProjectByType(@Param("type") int type); + + + /** + * 通过项目查看组别信息 + * @param type 比赛类型 + * @param projectId 项目id + * @return 返回组别信息 + */ + List queryGroupByProject(@Param("type") int type, @Param("projectId") Long projectId); +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/GroupDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/GroupDao.java new file mode 100644 index 00000000..17cdb136 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/GroupDao.java @@ -0,0 +1,18 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.vo.TopicVo; +import com.ccsens.mt.persist.mapper.MtGroupMapper; + +/** + * 答题项目 + * @author whj + */ +public interface GroupDao extends MtGroupMapper { + /** + * 查询抢答成功的组信息 + * @param topic 抢答条件 + * @return 组 + */ + TopicVo.GroupInfo getResponder(TopicDto.Topic topic); +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/GroupTopicDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/GroupTopicDao.java new file mode 100644 index 00000000..34674620 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/GroupTopicDao.java @@ -0,0 +1,11 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.persist.mapper.MtGroupTopicMapper; +import org.springframework.stereotype.Repository; + +/** + * @author 逗 + */ +@Repository +public interface GroupTopicDao extends MtGroupTopicMapper { +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/LevelUpDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/LevelUpDao.java new file mode 100644 index 00000000..2c416b27 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/LevelUpDao.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.bean.vo.LevelVo; +import com.ccsens.mt.persist.mapper.LevelUpMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @author 逗 + */ +@Repository +public interface LevelUpDao extends LevelUpMapper{ + /** + * 通过levelUserId和比赛code查看晋级信息 + * @param levelUserId levelUserId + * @param competeCode 比赛code + * @return 返回晋级信息id + */ + Long getByLevelUserIdAndCode(@Param("levelUserId") Long levelUserId, @Param("competeCode")String competeCode); + + /** + * 查找项目的晋级人员信息 + * @param competeCode 比赛code + * @param competeTimeId competeTimeId + * @return 返回晋级的人员信息 + */ + List queryLevelUserInfo(@Param("competeCode") String competeCode, @Param("competeTimeId") Long competeTimeId); +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/TopicDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/TopicDao.java new file mode 100644 index 00000000..e683be37 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/TopicDao.java @@ -0,0 +1,75 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.vo.TopicVo; +import com.ccsens.mt.persist.mapper.MtTopicMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @author 逗 + */ +@Repository +public interface TopicDao extends MtTopicMapper { + /** + * 查询题目 + * @param linkType 答题环节类型 + * @param topicNum 第几道题 + * @return 返回题目信息 + */ + TopicVo.TopicInfo getTopicByLink(@Param("linkType") int linkType, @Param("topicNum")int topicNum); + + /** + * 查询分组的信息 + * @param projectId 项目id + * @param linkType 答题环节 + * @param type 参赛组的类型 + * @return + */ + List queryGroupByProject(@Param("projectId")Long projectId, @Param("linkType")int linkType, @Param("type")int type); + /** + * 查询答案 + * @param projectId + * @param topicId + * @return + */ + List queryAnswer(@Param("projectId") Long projectId, @Param("topicId")Long topicId); + + /** + * 查询所有绝地反击类型的题 + * @param getTopicAll 请求类型 + * @return 试题信息 + */ + List queryTopicAllByLink(TopicDto.GetTopicAll getTopicAll); + + /** + * 根据试题ID查询选项 + * @param topicId 试题ID + * @return 选项 + */ + List queryOption(@Param("topicId") Long topicId); + + /** + * 查询当前阶段的排名 + * @param projectId 项目id + * @param linkType 阶段类型 + * @return 返回排名(按分数从大到小排列) + */ + List queryRanking(@Param("projectId")Long projectId, @Param("linkType")int linkType); + /** + * 查询该类型下最小最大题号 + * @param linkType 类型 + * @return 最小 最大 + */ + TopicVo.TopicSequence getMinAndMax(@Param("linkType") int linkType); + + /** + * 查询有几组抢答成功 + * @param projectId 项目ID + * @param topicId 试题ID + * @return 抢答数 + */ + long countVote(@Param("projectId") Long projectId, @Param("topicId") long topicId); +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/VoteDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/VoteDao.java new file mode 100644 index 00000000..f4bd23e4 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/VoteDao.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.vo.VoteVo; +import com.ccsens.mt.persist.mapper.MtVoteMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @description: 投票 + * @author: whj + * @time: 2020/8/13 18:52 + */ +public interface VoteDao extends MtVoteMapper { + /** + * 查看投票结果 + * @param params + * @return + */ + List queryVote(TopicDto.Project params); + + /** + * 判断是否已经在当前项目中投票 + * @param userId + * @param projectId + * @return + */ + long countUserVoteNums(@Param("userId") Long userId, @Param("projectId") Long projectId); +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CommonFileMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CommonFileMapper.java new file mode 100644 index 00000000..4f30a7ca --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CommonFileMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CommonFile; +import com.ccsens.mt.bean.po.CommonFileExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CommonFileMapper { + long countByExample(CommonFileExample example); + + int deleteByExample(CommonFileExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CommonFile record); + + int insertSelective(CommonFile record); + + List selectByExample(CommonFileExample example); + + CommonFile selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CommonFile record, @Param("example") CommonFileExample example); + + int updateByExample(@Param("record") CommonFile record, @Param("example") CommonFileExample example); + + int updateByPrimaryKeySelective(CommonFile record); + + int updateByPrimaryKey(CommonFile record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCompanyMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCompanyMapper.java new file mode 100644 index 00000000..08e677eb --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCompanyMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteCompany; +import com.ccsens.mt.bean.po.CompeteCompanyExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteCompanyMapper { + long countByExample(CompeteCompanyExample example); + + int deleteByExample(CompeteCompanyExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteCompany record); + + int insertSelective(CompeteCompany record); + + List selectByExample(CompeteCompanyExample example); + + CompeteCompany selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteCompany record, @Param("example") CompeteCompanyExample example); + + int updateByExample(@Param("record") CompeteCompany record, @Param("example") CompeteCompanyExample example); + + int updateByPrimaryKeySelective(CompeteCompany record); + + int updateByPrimaryKey(CompeteCompany record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCompanyRoleMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCompanyRoleMapper.java new file mode 100644 index 00000000..6df59e25 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteCompanyRoleMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteCompanyRole; +import com.ccsens.mt.bean.po.CompeteCompanyRoleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteCompanyRoleMapper { + long countByExample(CompeteCompanyRoleExample example); + + int deleteByExample(CompeteCompanyRoleExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteCompanyRole record); + + int insertSelective(CompeteCompanyRole record); + + List selectByExample(CompeteCompanyRoleExample example); + + CompeteCompanyRole selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteCompanyRole record, @Param("example") CompeteCompanyRoleExample example); + + int updateByExample(@Param("record") CompeteCompanyRole record, @Param("example") CompeteCompanyRoleExample example); + + int updateByPrimaryKeySelective(CompeteCompanyRole record); + + int updateByPrimaryKey(CompeteCompanyRole record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteGroupMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteGroupMapper.java new file mode 100644 index 00000000..8c83b243 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteGroupMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteGroup; +import com.ccsens.mt.bean.po.CompeteGroupExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteGroupMapper { + long countByExample(CompeteGroupExample example); + + int deleteByExample(CompeteGroupExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteGroup record); + + int insertSelective(CompeteGroup record); + + List selectByExample(CompeteGroupExample example); + + CompeteGroup selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteGroup record, @Param("example") CompeteGroupExample example); + + int updateByExample(@Param("record") CompeteGroup record, @Param("example") CompeteGroupExample example); + + int updateByPrimaryKeySelective(CompeteGroup record); + + int updateByPrimaryKey(CompeteGroup record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompetePlayerFamilyMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompetePlayerFamilyMapper.java new file mode 100644 index 00000000..e9363a35 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompetePlayerFamilyMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompetePlayerFamily; +import com.ccsens.mt.bean.po.CompetePlayerFamilyExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompetePlayerFamilyMapper { + long countByExample(CompetePlayerFamilyExample example); + + int deleteByExample(CompetePlayerFamilyExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompetePlayerFamily record); + + int insertSelective(CompetePlayerFamily record); + + List selectByExample(CompetePlayerFamilyExample example); + + CompetePlayerFamily selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompetePlayerFamily record, @Param("example") CompetePlayerFamilyExample example); + + int updateByExample(@Param("record") CompetePlayerFamily record, @Param("example") CompetePlayerFamilyExample example); + + int updateByPrimaryKeySelective(CompetePlayerFamily record); + + int updateByPrimaryKey(CompetePlayerFamily record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompetePlayerMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompetePlayerMapper.java new file mode 100644 index 00000000..2288f9cb --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompetePlayerMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompetePlayer; +import com.ccsens.mt.bean.po.CompetePlayerExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompetePlayerMapper { + long countByExample(CompetePlayerExample example); + + int deleteByExample(CompetePlayerExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompetePlayer record); + + int insertSelective(CompetePlayer record); + + List selectByExample(CompetePlayerExample example); + + CompetePlayer selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompetePlayer record, @Param("example") CompetePlayerExample example); + + int updateByExample(@Param("record") CompetePlayer record, @Param("example") CompetePlayerExample example); + + int updateByPrimaryKeySelective(CompetePlayer record); + + int updateByPrimaryKey(CompetePlayer record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectGroupMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectGroupMapper.java new file mode 100644 index 00000000..a03b398c --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectGroupMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteProjectGroup; +import com.ccsens.mt.bean.po.CompeteProjectGroupExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteProjectGroupMapper { + long countByExample(CompeteProjectGroupExample example); + + int deleteByExample(CompeteProjectGroupExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteProjectGroup record); + + int insertSelective(CompeteProjectGroup record); + + List selectByExample(CompeteProjectGroupExample example); + + CompeteProjectGroup selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteProjectGroup record, @Param("example") CompeteProjectGroupExample example); + + int updateByExample(@Param("record") CompeteProjectGroup record, @Param("example") CompeteProjectGroupExample example); + + int updateByPrimaryKeySelective(CompeteProjectGroup record); + + int updateByPrimaryKey(CompeteProjectGroup record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectMapper.java new file mode 100644 index 00000000..47e4d6e6 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteProject; +import com.ccsens.mt.bean.po.CompeteProjectExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteProjectMapper { + long countByExample(CompeteProjectExample example); + + int deleteByExample(CompeteProjectExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteProject record); + + int insertSelective(CompeteProject record); + + List selectByExample(CompeteProjectExample example); + + CompeteProject selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteProject record, @Param("example") CompeteProjectExample example); + + int updateByExample(@Param("record") CompeteProject record, @Param("example") CompeteProjectExample example); + + int updateByPrimaryKeySelective(CompeteProject record); + + int updateByPrimaryKey(CompeteProject record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectPlayerMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectPlayerMapper.java new file mode 100644 index 00000000..800dc073 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteProjectPlayerMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteProjectPlayer; +import com.ccsens.mt.bean.po.CompeteProjectPlayerExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteProjectPlayerMapper { + long countByExample(CompeteProjectPlayerExample example); + + int deleteByExample(CompeteProjectPlayerExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteProjectPlayer record); + + int insertSelective(CompeteProjectPlayer record); + + List selectByExample(CompeteProjectPlayerExample example); + + CompeteProjectPlayer selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteProjectPlayer record, @Param("example") CompeteProjectPlayerExample example); + + int updateByExample(@Param("record") CompeteProjectPlayer record, @Param("example") CompeteProjectPlayerExample example); + + int updateByPrimaryKeySelective(CompeteProjectPlayer record); + + int updateByPrimaryKey(CompeteProjectPlayer record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteTeamMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteTeamMapper.java new file mode 100644 index 00000000..148277a6 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteTeamMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteTeam; +import com.ccsens.mt.bean.po.CompeteTeamExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteTeamMapper { + long countByExample(CompeteTeamExample example); + + int deleteByExample(CompeteTeamExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteTeam record); + + int insertSelective(CompeteTeam record); + + List selectByExample(CompeteTeamExample example); + + CompeteTeam selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteTeam record, @Param("example") CompeteTeamExample example); + + int updateByExample(@Param("record") CompeteTeam record, @Param("example") CompeteTeamExample example); + + int updateByPrimaryKeySelective(CompeteTeam record); + + int updateByPrimaryKey(CompeteTeam record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteTeamMemberMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteTeamMemberMapper.java new file mode 100644 index 00000000..fa912a1a --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteTeamMemberMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteTeamMember; +import com.ccsens.mt.bean.po.CompeteTeamMemberExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteTeamMemberMapper { + long countByExample(CompeteTeamMemberExample example); + + int deleteByExample(CompeteTeamMemberExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteTeamMember record); + + int insertSelective(CompeteTeamMember record); + + List selectByExample(CompeteTeamMemberExample example); + + CompeteTeamMember selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteTeamMember record, @Param("example") CompeteTeamMemberExample example); + + int updateByExample(@Param("record") CompeteTeamMember record, @Param("example") CompeteTeamMemberExample example); + + int updateByPrimaryKeySelective(CompeteTeamMember record); + + int updateByPrimaryKey(CompeteTeamMember record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteTimeMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteTimeMapper.java new file mode 100644 index 00000000..6b8e1c51 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteTimeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteTime; +import com.ccsens.mt.bean.po.CompeteTimeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteTimeMapper { + long countByExample(CompeteTimeExample example); + + int deleteByExample(CompeteTimeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteTime record); + + int insertSelective(CompeteTime record); + + List selectByExample(CompeteTimeExample example); + + CompeteTime selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteTime record, @Param("example") CompeteTimeExample example); + + int updateByExample(@Param("record") CompeteTime record, @Param("example") CompeteTimeExample example); + + int updateByPrimaryKeySelective(CompeteTime record); + + int updateByPrimaryKey(CompeteTime record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteVideoMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteVideoMapper.java new file mode 100644 index 00000000..c76461e3 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/CompeteVideoMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.CompeteVideo; +import com.ccsens.mt.bean.po.CompeteVideoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompeteVideoMapper { + long countByExample(CompeteVideoExample example); + + int deleteByExample(CompeteVideoExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompeteVideo record); + + int insertSelective(CompeteVideo record); + + List selectByExample(CompeteVideoExample example); + + CompeteVideo selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompeteVideo record, @Param("example") CompeteVideoExample example); + + int updateByExample(@Param("record") CompeteVideo record, @Param("example") CompeteVideoExample example); + + int updateByPrimaryKeySelective(CompeteVideo record); + + int updateByPrimaryKey(CompeteVideo record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/LevelRuleMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/LevelRuleMapper.java new file mode 100644 index 00000000..4fcc2580 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/LevelRuleMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.LevelRule; +import com.ccsens.mt.bean.po.LevelRuleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LevelRuleMapper { + long countByExample(LevelRuleExample example); + + int deleteByExample(LevelRuleExample example); + + int deleteByPrimaryKey(Long id); + + int insert(LevelRule record); + + int insertSelective(LevelRule record); + + List selectByExample(LevelRuleExample example); + + LevelRule selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") LevelRule record, @Param("example") LevelRuleExample example); + + int updateByExample(@Param("record") LevelRule record, @Param("example") LevelRuleExample example); + + int updateByPrimaryKeySelective(LevelRule record); + + int updateByPrimaryKey(LevelRule record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUpMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUpMapper.java new file mode 100644 index 00000000..76ed0393 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUpMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.LevelUp; +import com.ccsens.mt.bean.po.LevelUpExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LevelUpMapper { + long countByExample(LevelUpExample example); + + int deleteByExample(LevelUpExample example); + + int deleteByPrimaryKey(Long id); + + int insert(LevelUp record); + + int insertSelective(LevelUp record); + + List selectByExample(LevelUpExample example); + + LevelUp selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") LevelUp record, @Param("example") LevelUpExample example); + + int updateByExample(@Param("record") LevelUp record, @Param("example") LevelUpExample example); + + int updateByPrimaryKeySelective(LevelUp record); + + int updateByPrimaryKey(LevelUp record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUserMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUserMapper.java new file mode 100644 index 00000000..d80b85b3 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUserMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.LevelUser; +import com.ccsens.mt.bean.po.LevelUserExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LevelUserMapper { + long countByExample(LevelUserExample example); + + int deleteByExample(LevelUserExample example); + + int deleteByPrimaryKey(Long id); + + int insert(LevelUser record); + + int insertSelective(LevelUser record); + + List selectByExample(LevelUserExample example); + + LevelUser selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") LevelUser record, @Param("example") LevelUserExample example); + + int updateByExample(@Param("record") LevelUser record, @Param("example") LevelUserExample example); + + int updateByPrimaryKeySelective(LevelUser record); + + int updateByPrimaryKey(LevelUser record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtGroupMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtGroupMapper.java new file mode 100644 index 00000000..9c431602 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtGroupMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtGroup; +import com.ccsens.mt.bean.po.MtGroupExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtGroupMapper { + long countByExample(MtGroupExample example); + + int deleteByExample(MtGroupExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtGroup record); + + int insertSelective(MtGroup record); + + List selectByExample(MtGroupExample example); + + MtGroup selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtGroup record, @Param("example") MtGroupExample example); + + int updateByExample(@Param("record") MtGroup record, @Param("example") MtGroupExample example); + + int updateByPrimaryKeySelective(MtGroup record); + + int updateByPrimaryKey(MtGroup record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtGroupTopicMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtGroupTopicMapper.java new file mode 100644 index 00000000..e1c704f4 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtGroupTopicMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtGroupTopic; +import com.ccsens.mt.bean.po.MtGroupTopicExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtGroupTopicMapper { + long countByExample(MtGroupTopicExample example); + + int deleteByExample(MtGroupTopicExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtGroupTopic record); + + int insertSelective(MtGroupTopic record); + + List selectByExample(MtGroupTopicExample example); + + MtGroupTopic selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtGroupTopic record, @Param("example") MtGroupTopicExample example); + + int updateByExample(@Param("record") MtGroupTopic record, @Param("example") MtGroupTopicExample example); + + int updateByPrimaryKeySelective(MtGroupTopic record); + + int updateByPrimaryKey(MtGroupTopic record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtResponderMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtResponderMapper.java new file mode 100644 index 00000000..9d9d53ee --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtResponderMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtResponder; +import com.ccsens.mt.bean.po.MtResponderExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtResponderMapper { + long countByExample(MtResponderExample example); + + int deleteByExample(MtResponderExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtResponder record); + + int insertSelective(MtResponder record); + + List selectByExample(MtResponderExample example); + + MtResponder selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtResponder record, @Param("example") MtResponderExample example); + + int updateByExample(@Param("record") MtResponder record, @Param("example") MtResponderExample example); + + int updateByPrimaryKeySelective(MtResponder record); + + int updateByPrimaryKey(MtResponder record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtTopicMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtTopicMapper.java new file mode 100644 index 00000000..cf6d3779 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtTopicMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtTopic; +import com.ccsens.mt.bean.po.MtTopicExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtTopicMapper { + long countByExample(MtTopicExample example); + + int deleteByExample(MtTopicExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtTopic record); + + int insertSelective(MtTopic record); + + List selectByExample(MtTopicExample example); + + MtTopic selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtTopic record, @Param("example") MtTopicExample example); + + int updateByExample(@Param("record") MtTopic record, @Param("example") MtTopicExample example); + + int updateByPrimaryKeySelective(MtTopic record); + + int updateByPrimaryKey(MtTopic record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtTopicOptionMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtTopicOptionMapper.java new file mode 100644 index 00000000..8bf81b80 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtTopicOptionMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtTopicOption; +import com.ccsens.mt.bean.po.MtTopicOptionExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtTopicOptionMapper { + long countByExample(MtTopicOptionExample example); + + int deleteByExample(MtTopicOptionExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtTopicOption record); + + int insertSelective(MtTopicOption record); + + List selectByExample(MtTopicOptionExample example); + + MtTopicOption selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtTopicOption record, @Param("example") MtTopicOptionExample example); + + int updateByExample(@Param("record") MtTopicOption record, @Param("example") MtTopicOptionExample example); + + int updateByPrimaryKeySelective(MtTopicOption record); + + int updateByPrimaryKey(MtTopicOption record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtVoteMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtVoteMapper.java new file mode 100644 index 00000000..41879c5a --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtVoteMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtVote; +import com.ccsens.mt.bean.po.MtVoteExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtVoteMapper { + long countByExample(MtVoteExample example); + + int deleteByExample(MtVoteExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtVote record); + + int insertSelective(MtVote record); + + List selectByExample(MtVoteExample example); + + MtVote selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtVote record, @Param("example") MtVoteExample example); + + int updateByExample(@Param("record") MtVote record, @Param("example") MtVoteExample example); + + int updateByPrimaryKeySelective(MtVote record); + + int updateByPrimaryKey(MtVote record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/service/CompeteService.java b/mt/src/main/java/com/ccsens/mt/service/CompeteService.java new file mode 100644 index 00000000..3b71aeec --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/CompeteService.java @@ -0,0 +1,588 @@ +package com.ccsens.mt.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.mt.bean.dto.CompeteDto; +import com.ccsens.mt.bean.dto.LevelDto; +import com.ccsens.mt.bean.po.*; +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.mt.persist.dao.CompetePlayerDao; +import com.ccsens.mt.persist.dao.CompeteTeamDao; +import com.ccsens.mt.persist.dao.CompeteTimeDao; +import com.ccsens.mt.persist.mapper.*; +import com.ccsens.mt.util.Constant; +import com.ccsens.util.*; +import com.ccsens.util.bean.dto.QueryDto; +import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class CompeteService implements ICompeteService{ + @Resource + private CompeteTimeDao competeTimeDao; + @Resource + private RedisUtil redisUtil; + @Resource + private CompeteCompanyMapper competeCompanyMapper; + @Resource + private Snowflake snowflake; + @Resource + private CompeteTeamDao competeTeamDao; + @Resource + private CompetePlayerDao competePlayerDao; + @Resource + private CompeteTeamMemberMapper competeTeamMemberMapper; + @Resource + private CompeteProjectMapper competeProjectMapper; + @Resource + private CompeteProjectPlayerMapper competeProjectPlayerMapper; + @Resource + private CompeteGroupMapper competeGroupMapper; + @Resource + private ILevelUpService levelUpService; + @Resource + private CompetePlayerFamilyMapper competePlayerFamilyMapper; + @Resource + private CompeteProjectGroupMapper competeProjectGroupMapper; + + + /** + * 查看第几届 + */ + @Override + public CompeteVo.CompeteTime getCompeteTime(QueryDto params) { + CompeteDto.CompeteType competeType = params.getParam(); + return competeTimeDao.getCompeteTimeByType(competeType.getType(),System.currentTimeMillis()); + } + + /** + * 查看组别 + */ + @Override + public List queryCompeteGroup(QueryDto params) { + CompeteDto.CompeteType competeType = params.getParam(); + return competeTimeDao.queryCompeteGroupByType(competeType.getType()); + } + + @Override + public List queryGroupByProject(QueryDto params) { + CompeteDto.QueryGroupByProject competeType = params.getParam(); + List competeGroups = competeTimeDao.queryGroupByProject(competeType.getType(),competeType.getProjectId()); +// +// +// CompeteDto.QueryGroupByProject competeType = params.getParam(); +// List competeGroups = competeTimeDao.queryCompeteGroupByType(competeType.getType()); +// competeGroups.forEach(competeGroup -> { +// CompeteProjectGroupExample competeProjectGroupExample = new CompeteProjectGroupExample(); +// competeProjectGroupExample.createCriteria().andGroupIdEqualTo(competeGroup.getGroupId()).andProjectIdEqualTo(competeType.getProjectId()); +// if(competeProjectGroupMapper.countByExample(competeProjectGroupExample) == 0){ +// competeGroups.remove(competeGroup); +// } +// }); + return competeGroups; + } + + /** + * 模糊查询参赛单位 + */ + @Override + public List queryCompeteCompany(QueryDto params) { + CompeteDto.CompeteTypeAndKey competeTypeAndKey = params.getParam(); + String key = competeTypeAndKey.getType() + Constant.Redis.COMPETE_COMPANY; + Object list = redisUtil.lGet(key,0,-1); + List competeCompanyList = (List) list; + List companyList = new ArrayList<>(); + + competeCompanyList.forEach(competeCompany -> { + if(competeCompany.getGroupName().contains(competeTypeAndKey.getKey())){ + companyList.add(competeCompany); + } + }); + return companyList; + } + + /** + * 刷新redis内的参赛单位信息 + */ + @Override + public void syncCompeteCompany(QueryDto params) { + CompeteDto.CompeteType competeType = params.getParam(); + String key = competeType.getType() + Constant.Redis.COMPETE_COMPANY; + //删除之前的数据 + redisUtil.del(key); + //根据type查找数据库内所有参赛单位 + List competeCompanyList = competeTimeDao.queryCompeteCompanyByType(competeType.getType()); + if(CollectionUtil.isNotEmpty(competeCompanyList)){ + competeCompanyList.forEach(competeCompany -> redisUtil.lSet(key,competeCompany,Constant.Redis.COMPETE_COMPANY_TIME)); + } + } + + /** + * 提交报名基本信息 + */ + @Override + public CompeteVo.CompetePlayerInfo saveCompetePlayerInfo(QueryDto params) { + CompeteDto.CompetePlayerInfo competePlayerInfo = params.getParam(); + Long userId = params.getUserId(); + + //检查验证码是否正确 + if (!redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(competePlayerInfo.getPhone()))) { + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); + } + if (!competePlayerInfo.getSmsCode().equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(competePlayerInfo.getPhone())).toString())) { + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); + } + //检查此用户是否已经报名 + CompetePlayerExample playerExample = new CompetePlayerExample(); + playerExample.createCriteria().andUserIdEqualTo(userId); + if(competePlayerDao.countByExample(playerExample) != 0){ + throw new BaseException(CodeEnum.PLAYER_INFO_ALREADY); + } + //检查组别是否存在 + CompeteGroup group = competeGroupMapper.selectByPrimaryKey(competePlayerInfo.getGroupId()); + if(ObjectUtil.isNull(group)){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } + //检查参赛单位是否存在,不存在则添加 + CompeteCompany company = new CompeteCompany(); + if(StrUtil.isNotEmpty(competePlayerInfo.getCompanyName())) { + CompeteCompanyExample competeCompanyExample = new CompeteCompanyExample(); + competeCompanyExample.createCriteria().andNameEqualTo(competePlayerInfo.getCompanyName()); + List companyList = competeCompanyMapper.selectByExample(competeCompanyExample); + if (CollectionUtil.isEmpty(companyList)) { + company.setId(snowflake.nextId()); + company.setType((byte) competePlayerInfo.getType()); + company.setName(competePlayerInfo.getCompanyName()); + competeCompanyMapper.insertSelective(company); + //更新缓存 + String key = competePlayerInfo.getType() + Constant.Redis.COMPETE_COMPANY; + CompeteVo.CompeteCompany competeCompany = new CompeteVo.CompeteCompany(); + competeCompany.setGroupId(company.getId()); + competeCompany.setGroupName(company.getName()); + redisUtil.lSet(key, competeCompany, Constant.Redis.COMPETE_COMPANY_TIME); + } else { + company = companyList.get(0); + } + } + //添加基本信息 + CompetePlayer player = new CompetePlayer(); + BeanUtil.copyProperties(competePlayerInfo,player); + player.setId(snowflake.nextId()); + player.setUserId(userId); + player.setCompeteTimeId(competePlayerInfo.getCompeteTimeId()); + player.setCompeteGroupId(competePlayerInfo.getGroupId()); + if(ObjectUtil.isNotNull(company)) { + player.setCompanyId(company.getId()); + } + competePlayerDao.insertSelective(player); + //添加亲子组其他参赛人员信息 + if(StrUtil.isNotEmpty(competePlayerInfo.getFamily())){ + String names = StringUtil.replaceComma(competePlayerInfo.getFamily()); + String[] familyNames = names.split(","); + if (ObjectUtil.isNotNull(familyNames)) { + for (String familyName : familyNames) { + CompetePlayer family = new CompetePlayer(); + family.setId(snowflake.nextId()); + family.setName(familyName); + family.setCompeteGroupId(competePlayerInfo.getGroupId()); + competePlayerDao.insertSelective(family); + //添加选手和其他参赛选手的关联信息 + CompetePlayerFamily competePlayerFamily = new CompetePlayerFamily(); + competePlayerFamily.setId(snowflake.nextId()); + competePlayerFamily.setPlayerId(player.getId()); + competePlayerFamily.setChildrenId(family.getId()); + competePlayerFamilyMapper.insertSelective(competePlayerFamily); + } + } + } + + + // TODO + LevelDto.LevelUserDto levelUserDto = new LevelDto.LevelUserDto(player.getId(),null,player.getName(),null); + log.info("将选手信息储存在晋级系统中:{}",levelUserDto); + levelUpService.saveLevelUser(levelUserDto); + + return new CompeteVo.CompetePlayerInfo(player, group, company,getCompeteProjectAll(params.getUserId(), params.getParam().getCompeteTimeId())); + } + + /** + * 查看参赛项目信息 + */ + @Override + public List queryCompeteProject(QueryDto params) { + CompeteDto.CompeteType competeType = params.getParam(); + return competeTimeDao.queryCompeteProjectByType(competeType.getType()); + } + + /** + * 根据组别查看比赛项目信息 + */ + @Override + public List queryProjectByGroup(QueryDto params) { + CompeteDto.QueryProjectByGroup competeType = params.getParam(); + List competeSecondProjects = new ArrayList<>(); + CompeteProjectExample projectExample = new CompeteProjectExample(); + projectExample.createCriteria().andTypeEqualTo((byte) competeType.getType()).andLevelEqualTo((byte) 2); + List competeProjectList = competeProjectMapper.selectByExample(projectExample); + if(CollectionUtil.isNotEmpty(competeProjectList)){ + competeProjectList.forEach(competeProject -> { + CompeteProjectGroupExample projectGroupExample = new CompeteProjectGroupExample(); + projectGroupExample.createCriteria().andProjectIdEqualTo(competeProject.getId()) + .andGroupIdEqualTo(competeType.getGroupId()); + if(competeProjectGroupMapper.countByExample(projectGroupExample) != 0){ + competeProjectList.remove(competeProject); + }else { + CompeteVo.CompeteSecondProject secondProject = new CompeteVo.CompeteSecondProject(); + BeanUtil.copyProperties(competeProject,secondProject); + competeSecondProjects.add(secondProject); + } + }); + } + return competeSecondProjects; + } + + /** + * 提交选择的比赛项目 + */ + @Override + public CompeteVo.CompetePlayerInfo saveCompeteProject(QueryDto params) throws IOException { + + CompeteProject project = competeProjectMapper.selectByPrimaryKey(params.getParam().getCompeteProjectId()); + log.info("项目信息:{}", project); + if (project == null) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + CompetePlayer player = getPlayer(params.getUserId()); + + + if (project.getTeam() == Constant.Compete.TEAM_NO) { + // 个人赛 + long joinedNum = competeTeamDao.countTiwnTeam(player.getId(), params.getParam().getCompeteTimeId()); + log.info("个人赛参赛数量:{}", joinedNum); +// if (joinedNum >= Constant.Compete.TIWN_MAX_NUM) { +// throw new BaseException(CodeEnum.JOINED_MORE); +// } + CompeteProjectPlayer projectPlayer = new CompeteProjectPlayer(); + projectPlayer.setId(snowflake.nextId()); + projectPlayer.setPlayerId(player.getId()); + projectPlayer.setProjectId(project.getId()); + projectPlayer.setCompeteTimeId(params.getParam().getCompeteTimeId()); + projectPlayer.setGenderGroup(player.getGender()); + projectPlayer.setCertificate(params.getParam().getCertificate()); + competeProjectPlayerMapper.insertSelective(projectPlayer); + + } else { + // 团体赛 + pageJoinedTeam(project, player, params.getParam().getCompeteTimeId(), null ,false); + // 创建团队 + CompeteTeam team = new CompeteTeam(); + team.setId(snowflake.nextId()); + team.setCreator(player.getId()); + team.setProjectId(project.getId()); + team.setCompeteTimeId(params.getParam().getCompeteTimeId()); + team.setCertificate(params.getParam().getCertificate()); + team.setGenderGroup(player.getGender()); + String url = PropUtil.signUpUrl + "home?teamId=" + team.getId(); + String qrCode = WebConstant.Wx.getAuthedUrl(url,WebConstant.WxGzhAuthType.SNSAPI_USERINFO + , (String) redisUtil.get(WebConstant.Wx.ACCOUNT_WX_APPID)); + String qrCodeVisit = QrCodeUtil.urlToQRCode(qrCode, PropUtil.path); + team.setQrCode(qrCodeVisit); + competeTeamDao.insertSelective(team); + // 加入团队 + CompeteTeamMember teamMember = new CompeteTeamMember(); + teamMember.setId(snowflake.nextId()); + teamMember.setPlayerId(player.getId()); + teamMember.setCompeteTeamId(team.getId()); + teamMember.setCaptain(Constant.Compete.TEAM_LEADER_YES); + competeTeamMemberMapper.insertSelective(teamMember); + + } + + CompeteGroup group = competeGroupMapper.selectByPrimaryKey(player.getCompeteGroupId()); + CompeteCompany company = competeCompanyMapper.selectByPrimaryKey(player.getCompanyId()); + CompeteVo.CompetePlayerInfo info = new CompeteVo.CompetePlayerInfo(player, group, company,getCompeteProjectAll(params.getUserId(), params.getParam().getCompeteTimeId())); + + LevelDto.LevelUpDto levelUpDto = new LevelDto.LevelUpDto(params.getParam().getCompeteTimeId(),params.getParam().getCompeteProjectId().toString(),player.getId()); + log.info("添加晋级表信息,{}",levelUpDto); + levelUpService.joinCompete(levelUpDto); + + log.info("{}参加返回:{}", params.getUserId(), info); + return info; + } + + private CompetePlayer getPlayer(Long userId) { + CompetePlayerExample playerExample = new CompetePlayerExample(); + playerExample.createCriteria().andUserIdEqualTo(userId); + List players = competePlayerDao.selectByExample(playerExample); + if (CollectionUtil.isEmpty(players)) { + throw new BaseException(CodeEnum.BASE_INFO_LACK); + } + return players.get(0); + } + + /** + * 查看本人所有参赛的项目 + */ + @Override + public CompeteVo.CompeteProjectAllByUser queryCompeteProjectAllByUser(QueryDto params) { + log.info("查看本人所有参赛的项目:{}", params); + return getCompeteProjectAll(params.getUserId(), params.getParam().getCompeteTimeId()); + } + + private CompeteVo.CompeteProjectAllByUser getCompeteProjectAll(Long userId, Long competeTimeId){ + List competeTiwnProjects = competeTeamDao.queryTiwn(userId, competeTimeId); + List competeTeamProjects = competeTeamDao.queryTeam(userId, competeTimeId); + //封装队员信息和总队员数 + competeTeamProjects.forEach(team -> { + team.setQrCode(PropUtil.imgDomain + team.getQrCode()); + List members = competeTeamDao.queryMembers(team.getTeamId()); + team.setMembers(members); + team.setMemberNums(members.size()); + }); + + CompeteVo.CompeteProjectAllByUser compete = new CompeteVo.CompeteProjectAllByUser(); + compete.setCompeteTiwnProjects(competeTiwnProjects); + compete.setCompeteTeamProjects(competeTeamProjects); + return compete; + } + + /** + * 查看团队比赛的邀请二维码 + */ + @Override + public String getQrCodeByTeamId(QueryDto params) { + return PropUtil.imgDomain + competeTeamDao.getQrCodeByTeamId(params.getParam().getProjectPlayerId()); + } + + /** + * 查看个人基本报名信息 + */ + @Override + public CompeteVo.GetPlayerInfo getCompetePlayerInfo(QueryDto params) { + return competePlayerDao.getInfo(params.getUserId(),params.getParam().getCompeteTimeId()); + } + + /** + * 扫码加入团队 + */ + @Override + public CompeteVo.CompeteTeamProject joinCompeteGroup(QueryDto params) { + + log.info("扫码加入团队:{}", params); + CompetePlayer player = getPlayer(params.getUserId()); + + CompeteTeam team = competeTeamDao.selectByPrimaryKey(params.getParam().getId()); + log.info("团队信息:{}", team); + if (team == null) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + // 查找队长信息 + CompetePlayer creator = competePlayerDao.selectByPrimaryKey(team.getCreator()); + // 项目信息 + CompeteProject project = competeProjectMapper.selectByPrimaryKey(team.getProjectId()); + // 判断是否已加入其他团队 + pageJoinedTeam(project, player, team.getCompeteTimeId(), creator, true); + // 判断团队人数 + CompeteTeamMemberExample teamMemberExample = new CompeteTeamMemberExample(); + teamMemberExample.createCriteria().andCompeteTeamIdEqualTo(team.getId()); + long memberNum = competeTeamMemberMapper.countByExample(teamMemberExample); + log.info("已加入团队人数:{}", memberNum); + if (project.getMemberMax() != null && memberNum >= project.getMemberMax()) { + log.info("团队人数:{}已达到最大人数:{}", memberNum, project.getMemberMax()); + throw new BaseException(CodeEnum.TEAM_MEMBER_MORE); + } + // 加入团队 + CompeteTeamMember teamMember = new CompeteTeamMember(); + teamMember.setId(snowflake.nextId()); + teamMember.setPlayerId(player.getId()); + teamMember.setCompeteTeamId(team.getId()); + competeTeamMemberMapper.insertSelective(teamMember); + if (team.getGenderGroup() != Constant.Compete.GENDER_GROUP_MIX && team.getGenderGroup().byteValue() != player.getGender().byteValue()) { + log.info("选手性别{}和团队性别组{}不一致,修改为混合", player.getGender(), team.getGenderGroup()); + CompeteTeam updateTeam = new CompeteTeam(); + updateTeam.setId(team.getId()); + updateTeam.setGenderGroup(Constant.Compete.GENDER_GROUP_MIX); + competeTeamDao.updateByPrimaryKeySelective(updateTeam); + } + + // 查询分组信息 + List members = competeTeamDao.queryMembers(team.getId()); + CompeteProject parent = null; + if (project.getParentId() != null && project.getParentId() != 0L) { + parent = competeProjectMapper.selectByPrimaryKey(project.getParentId()); + } + + CompeteVo.CompeteTeamProject teamProject = new CompeteVo.CompeteTeamProject(team, Constant.Compete.TEAM_LEADER_NO, project, parent == null ? "" : parent.getName(), members); + return teamProject; + } + + /** + * 判断是否已加入其他团队 + * @param project 项目信息 + * @param competeTimeId 比赛ID + * @param player 选手信息 + * @param creator 队长信息 + */ + private void pageJoinedTeam(CompeteProject project, CompetePlayer player, Long competeTimeId, CompetePlayer creator, boolean pageLeader) { + long joinedTeam = 0; + if (project.getJoinRule() == Constant.Compete.PROJECT_JOIN_RULE_GROUP_LIMIT) { + // 同单位同组别 + // 1.与队长同单位且同组别 + if (pageLeader) { + if (!player.getCompanyId().equals(creator.getCompanyId())) { + log.info("单位不一样:{},{}",player.getCompanyId(), creator.getCompanyId()); + throw new BaseException(CodeEnum.TEAM_COMPANY_NOT_SAME); + } + if (player.getCompeteGroupId().longValue() != creator.getCompeteGroupId().longValue()) { + log.info("组别不一样:{},{}",player.getCompanyId(), creator.getCompanyId()); + throw new BaseException(CodeEnum.TEAM_GROUP_NOT_SAME); + } + } + + //2.只能参加项目下的一个团队 + joinedTeam = competeTeamDao.countJoinTeam(project.getId(), player.getId(), competeTimeId); + log.info("{}参加{}比赛的{}同组别项目数:{}", player.getId(), competeTimeId, project.getId(), joinedTeam); + + } else if (project.getJoinRule() == Constant.Compete.PROJECT_JOIN_RULE_GROUP_NOT_LIMIT) { + // 同单位不限组别 + // 1.用户与队长同单位 + if (pageLeader) { + if (!player.getCompanyId().equals(creator.getCompanyId())) { + log.info("单位不一样:{},{}", player.getCompanyId(), creator.getCompanyId()); + throw new BaseException(CodeEnum.TEAM_COMPANY_NOT_SAME); + } + } + // 2.只能加入一个项目的一个团队 + joinedTeam = competeTeamDao.countJoinProject(player.getId(), competeTimeId); + log.info("{}参加{}比赛的不限组别项目数:{}", player.getId(), competeTimeId, joinedTeam); + } + if (joinedTeam > 0) { + throw new BaseException(CodeEnum.JOINED_SAME); + } + } + + @Override + public CompeteVo.QueryPlayerList queryPlayerList(QueryDto params) { + CompeteDto.CompeteProjectId competeTimeAndType = params.getParam(); + CompeteVo.QueryPlayerList queryPlayerList = new CompeteVo.QueryPlayerList(); + //查找项目信息 + CompeteProject competeProject = competeProjectMapper.selectByPrimaryKey(competeTimeAndType.getCompeteProjectId()); + if(ObjectUtil.isNull(competeProject)){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } + if(competeProject.getTeam() == 0){ + List playerInfoByProjectList = + competeTeamDao.getPlayerByProjectId(competeTimeAndType.getCompeteProjectId(),competeTimeAndType.getCompeteTimeId()); + queryPlayerList.setPlayerList(playerInfoByProjectList); + }else { + List teamInfoByProjectList = + competeTeamDao.getTeamByProjectId(competeTimeAndType.getCompeteProjectId(),competeTimeAndType.getCompeteTimeId()); + queryPlayerList.setTeamList(teamInfoByProjectList); + } + return queryPlayerList; + } + + @Override + public void submitProjectAndGroup(QueryDto params) { + Long userId = params.getUserId(); + CompeteDto.CompetePlayerAndProject playerAndProject = params.getParam(); + //检查验证码是否正确 + if (!redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(playerAndProject.getPhone()))) { + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); + } + if (!playerAndProject.getSmsCode().equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(playerAndProject.getPhone())).toString())) { + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); + } + //查找此用户是否注册过此身份信息 + CompetePlayer player; + CompetePlayerExample playerExample = new CompetePlayerExample(); + playerExample.createCriteria().andUserIdEqualTo(userId).andIdCardEqualTo(playerAndProject.getIdCard()); + List playerList = competePlayerDao.selectByExample(playerExample); + if(CollectionUtil.isNotEmpty(playerList)){ + //有则直接使用 + player = playerList.get(0); + }else { + //没有则添加 + player = new CompetePlayer(); + BeanUtil.copyProperties(playerAndProject,player); + player.setId(snowflake.nextId()); + player.setUserId(userId); + player.setCompeteTimeId(playerAndProject.getCompeteTimeId()); + competePlayerDao.insertSelective(player); + } + + //读取项目信息 + if(CollectionUtil.isNotEmpty(playerAndProject.getProjectAndGroups())){ + playerAndProject.getProjectAndGroups().forEach(projectAndGroup -> { + CompeteProject project = competeProjectMapper.selectByPrimaryKey(projectAndGroup.getProjectId()); + log.info("项目信息:{}", project); + if (project == null) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + //单人项目直接添加信息和分组 + if (project.getTeam() == Constant.Compete.TEAM_NO) { + // 个人赛 + CompeteProjectPlayer projectPlayer = new CompeteProjectPlayer(); + projectPlayer.setId(snowflake.nextId()); + projectPlayer.setPlayerId(player.getId()); + projectPlayer.setProjectId(project.getId()); + projectPlayer.setCompeteTimeId(playerAndProject.getCompeteTimeId()); + projectPlayer.setCompeteGroupId(projectAndGroup.getGroupId()); + competeProjectPlayerMapper.insertSelective(projectPlayer); + }else { + //团队项目创建团队 + CompeteTeam team = new CompeteTeam(); + team.setId(snowflake.nextId()); + team.setCreator(player.getId()); + team.setProjectId(project.getId()); + team.setCompeteTimeId(playerAndProject.getCompeteTimeId()); + team.setCompeteGroupId(projectAndGroup.getGroupId()); + competeTeamDao.insertSelective(team); + //将当前选手加入团队 + CompeteTeamMember teamMember = new CompeteTeamMember(); + teamMember.setId(snowflake.nextId()); + teamMember.setPlayerId(player.getId()); + teamMember.setCompeteTeamId(team.getId()); + teamMember.setCaptain(Constant.Compete.TEAM_LEADER_YES); + competeTeamMemberMapper.insertSelective(teamMember); + //读取其他参赛人员的姓名,并添加为选手 + if(StrUtil.isNotEmpty(projectAndGroup.getFamily())){ + String names = StringUtil.replaceComma(projectAndGroup.getFamily()); + String[] familyNames = names.split(","); + if(ObjectUtil.isNotNull(familyNames)){ + for (String familyName : familyNames) { + CompetePlayer familyPlayer = new CompetePlayer(); + familyPlayer.setId(snowflake.nextId()); + familyPlayer.setName(familyName); + competePlayerDao.insertSelective(familyPlayer); + //将其他参赛人员添加至此团队 + CompeteTeamMember member = new CompeteTeamMember(); + member.setId(snowflake.nextId()); + member.setPlayerId(familyPlayer.getId()); + member.setCompeteTeamId(team.getId()); + member.setCaptain(Constant.Compete.TEAM_LEADER_NO); + competeTeamMemberMapper.insertSelective(member); + } + } + } + } + }); + } + } +} diff --git a/mt/src/main/java/com/ccsens/mt/service/DepartmentService.java b/mt/src/main/java/com/ccsens/mt/service/DepartmentService.java new file mode 100644 index 00000000..22d150bc --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/DepartmentService.java @@ -0,0 +1,449 @@ +package com.ccsens.mt.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.mt.bean.dto.CompeteDto; +import com.ccsens.mt.bean.po.*; +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.mt.persist.dao.CompetePlayerDao; +import com.ccsens.mt.persist.dao.CompeteTeamDao; +import com.ccsens.mt.persist.dao.CompeteTimeDao; +import com.ccsens.mt.persist.mapper.*; +import com.ccsens.util.*; +import com.ccsens.util.bean.dto.QueryDto; +import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class DepartmentService implements IDepartmentService{ + @Resource + private CompeteCompanyMapper competeCompanyMapper; + @Resource + private CompeteTimeDao competeTimeDao; + @Resource + private Snowflake snowflake; + @Resource + private CompetePlayerDao competePlayerDao; + @Resource + private CompeteCompanyRoleMapper competeCompanyRoleMapper; + @Resource + private CompeteProjectMapper competeProjectMapper; + @Resource + private CompeteProjectPlayerMapper competeProjectPlayerMapper; + @Resource + private CompeteTeamDao competeTeamDao; + @Resource + private CompeteTeamMemberMapper competeTeamMemberMapper; + + /** + * 查看院系信息 + */ + @Override + public List getCompany(QueryDto params) { + CompeteDto.CompeteType competeType = params.getParam(); + + List competeCompanyList = new ArrayList<>(); + //根据类型查找所有单位(院系)信息 + CompeteCompanyExample competeCompanyExample = new CompeteCompanyExample(); + competeCompanyExample.createCriteria().andTypeEqualTo((byte) competeType.getType()); + List companyList = competeCompanyMapper.selectByExample(competeCompanyExample); + if(CollectionUtil.isNotEmpty(companyList)){ + companyList.forEach(company -> { + CompeteVo.CompeteCompany competeCompany = new CompeteVo.CompeteCompany(); + competeCompany.setGroupId(company.getId()); + competeCompany.setGroupName(company.getName()); + competeCompanyList.add(competeCompany); + }); + } + return competeCompanyList; + } + + /** + * 查看比赛项目 + */ + @Override + public List queryCompeteProject(QueryDto params) { + CompeteDto.CompeteType competeType = params.getParam(); + return competeTimeDao.queryCompeteProjectByType(competeType.getType()); + } + + @Override + public CompeteVo.DepartmentInfo saveDepartment(QueryDto params) { + CompeteDto.DepartmentInfo departmentInfo = params.getParam(); + Long userId = params.getUserId(); + //查看该院系的报名信息 + Long companyId = competePlayerDao.getCompanyIdByUser(params.getUserId()); + log.info("查看该用户的院系:{}",companyId); + if(ObjectUtil.isNotNull(companyId)){ + throw new BaseException(CodeEnum.PLAYER_INFO_ALREADY); + } + CompeteCompanyRoleExample companyRoleExample = new CompeteCompanyRoleExample(); + companyRoleExample.createCriteria().andCompeteCompanyIdEqualTo(departmentInfo.getId()).andTypeEqualTo((byte)2); + if(competeCompanyRoleMapper.countByExample(companyRoleExample) == 0) { + //检查报名时间是否符合 + CompeteVo.CompeteTime competeTime = competeTimeDao.getCompeteTimeByType(departmentInfo.getType(),System.currentTimeMillis()); + log.info("检查报名时间是否符合:{}",competeTime); + if(ObjectUtil.isNotNull(competeTime)){ + if(competeTime.getSignUpStartTime() > System.currentTimeMillis()){ + throw new BaseException(CodeEnum.SIGN_UP_TIME_NOT_START); + } + if(competeTime.getSignUpEndTime() < System.currentTimeMillis()){ + throw new BaseException(CodeEnum.SIGN_UP_TIME_FINISHED); + } + } + + + //添加裁判领队等信息 + if (CollectionUtil.isNotEmpty(departmentInfo.getRoleList())) { + log.info("添加裁判领队等信息:{}",departmentInfo.getRoleList()); + departmentInfo.getRoleList().forEach(departmentRole -> { + //添加player信息 + CompetePlayer competePlayer = new CompetePlayer(); + competePlayer.setId(snowflake.nextId()); + competePlayer.setName(departmentRole.getName()); + competePlayer.setPhone(departmentRole.getPhone()); + competePlayer.setCompanyId(departmentInfo.getId()); + if (departmentRole.getRole() == 2) { + competePlayer.setUserId(userId); + } + competePlayerDao.insertSelective(competePlayer); + //添加院系内担任的角色信息 + CompeteCompanyRole competeCompanyRole = new CompeteCompanyRole(); + competeCompanyRole.setId(snowflake.nextId()); + competeCompanyRole.setType((byte) departmentRole.getRole()); + competeCompanyRole.setCompeteCompanyId(departmentInfo.getId()); + competeCompanyRole.setPlayerId(competePlayer.getId()); + competeCompanyRoleMapper.insertSelective(competeCompanyRole); + }); + } + //添加比赛报名信息 + if (CollectionUtil.isNotEmpty(departmentInfo.getProjectList())) { + log.info("添加比赛报名信息:{}",departmentInfo.getProjectList()); + departmentInfo.getProjectList().forEach(departmentProject -> { + CompeteProject competeProject = competeProjectMapper.selectByPrimaryKey(departmentProject.getCompeteProjectId()); + if (ObjectUtil.isNotNull(competeProject)) { + if (competeProject.getTeam() == 0) { + //不是团队比赛 + log.info("不是团队比赛:{}",competeProject); + String names = StringUtil.replaceComma(departmentProject.getNames()); + String[] playerNames = names.split(","); +// String[] playerNames = names.split("、"); + if (ObjectUtil.isNotNull(playerNames)) { + for (String playerName : playerNames) { + //直接添加选手 + CompetePlayer competePlayer = new CompetePlayer(); + competePlayer.setId(snowflake.nextId()); + competePlayer.setName(playerName); + competePlayer.setCompanyId(departmentInfo.getId()); + competePlayerDao.insertSelective(competePlayer); + //添加选手比赛关联信息 + CompeteProjectPlayer competeProjectPlayer = new CompeteProjectPlayer(); + competeProjectPlayer.setId(snowflake.nextId()); + competeProjectPlayer.setProjectId(departmentProject.getCompeteProjectId()); + competeProjectPlayer.setPlayerId(competePlayer.getId()); + competeProjectPlayer.setGenderGroup((byte) departmentProject.getGenderGroup()); + competeProjectPlayerMapper.insertSelective(competeProjectPlayer); + } + } + } else if (competeProject.getTeam() == 1) { + //创建一个团队 + log.info("创建一个团队:{}",competeProject); + CompeteTeam competeTeam = new CompeteTeam(); + competeTeam.setId(snowflake.nextId()); + competeTeam.setProjectId(departmentProject.getCompeteProjectId()); + competeTeam.setGenderGroup((byte) departmentProject.getGenderGroup()); + competeTeamDao.insertSelective(competeTeam); + + String names = StringUtil.replaceComma(departmentProject.getNames()); + String[] playerNames = names.split(","); + if(playerNames.length > competeProject.getMemberMax()){ + throw new BaseException(CodeEnum.TEAM_MEMBER_ERROR); + } + if (ObjectUtil.isNotNull(playerNames)) { + for (String playerName : playerNames) { + //直接添加选手 + CompetePlayer competePlayer = new CompetePlayer(); + competePlayer.setId(snowflake.nextId()); + competePlayer.setName(playerName); + competePlayer.setCompanyId(departmentInfo.getId()); + competePlayerDao.insertSelective(competePlayer); + //将选手加进团队 + CompeteTeamMember competeTeamMember = new CompeteTeamMember(); + competeTeamMember.setId(snowflake.nextId()); + competeTeamMember.setPlayerId(competePlayer.getId()); + competeTeamMember.setCompeteTeamId(competeTeam.getId()); + competeTeamMemberMapper.insertSelective(competeTeamMember); + } + } + } + } + }); + } + } + + return getDepartmentInfo(departmentInfo.getId(),departmentInfo.getType()); + } + + @Override + public CompeteVo.DepartmentInfo getDepartment(QueryDto params) { + CompeteDto.GetDepartmentInfo getDepartmentInfo = params.getParam(); + + //查询该用户的院系,默认用户只提交了一个院系的信息,只取一条数据 + Long companyId = competePlayerDao.getCompanyIdByUser(params.getUserId()); + //查询院系信息和裁判领队填表人的信息 + return getDepartmentInfo(companyId,getDepartmentInfo.getType()); + } + + + private CompeteVo.DepartmentInfo getDepartmentInfo(Long companyId,int competeType) { + CompeteVo.DepartmentInfo departmentInfo = competePlayerDao.getDepartment(companyId); + if(ObjectUtil.isNotNull(departmentInfo)) { + //查找每个项目的参赛人员 + List departmentProject = competePlayerDao.getDepartmentProject(competeType); + if (CollectionUtil.isNotEmpty(departmentProject)) { + departmentProject.forEach(project -> { + if (CollectionUtil.isNotEmpty(project.getSecondProjects())) { + project.getSecondProjects().forEach(secondProject -> { + if (secondProject.getTeam() == 0) { + //不是团队比赛 + secondProject.setManName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 1)); + secondProject.setWomanName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 0)); + secondProject.setMixedName(competePlayerDao.getMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 2)); + } else { + secondProject.setManName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 1)); + secondProject.setWomanName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 0)); + secondProject.setMixedName(competePlayerDao.getTeamMemberNamesByProjectId(companyId,secondProject.getCompeteProjectId(), 2)); + } + }); + } + }); + } + departmentInfo.setDepartmentProjects(departmentProject); + } + return departmentInfo; + } + + /** + * 导出报名信息表 + */ + @Override + public String exportExcel(CompeteDto.CompeteType competeType) { +// CompeteDto.CompeteType competeType = params.getParam(); + Workbook wb = new XSSFWorkbook(); + String path = null; + //查找所有院系信息 + CompeteCompanyExample companyExample = new CompeteCompanyExample(); + companyExample.createCriteria().andTypeEqualTo((byte) competeType.getType()); + List companyList = competeCompanyMapper.selectByExample(companyExample); + log.info("查询所有院系:{}",companyList); + if(CollectionUtil.isNotEmpty(companyList)){ + for(CompeteCompany company : companyList) { + CompeteVo.DepartmentInfo departmentInfo = getDepartmentInfo(company.getId(), competeType.getType()); + log.info("查询院系的报名详细信息:{}", departmentInfo); + if (ObjectUtil.isNotNull(departmentInfo)) { + //生成写入的数据 + List> list = generatePoiUtilCell(departmentInfo); + //写入excel + try { + path = writeExcel(wb, departmentInfo.getName(), list); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + } + return path; + } + + private List> generatePoiUtilCell(CompeteVo.DepartmentInfo departmentInfo) { + List> list = new ArrayList<>(); + //标题 + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell(departmentInfo.getName(),3,1)); + list.add(title); + //表头 + List header = new ArrayList<>(); + header.add(new PoiUtil.PoiUtilCell("比赛项目")); + header.add(new PoiUtil.PoiUtilCell("分组")); + header.add(new PoiUtil.PoiUtilCell("参赛人员")); + list.add(header); + if(CollectionUtil.isNotEmpty(departmentInfo.getDepartmentProjects())){ + departmentInfo.getDepartmentProjects().forEach(departmentProject -> { + if(CollectionUtil.isNotEmpty(departmentProject.getSecondProjects())){ + for (int i = 0; i < departmentProject.getSecondProjects().size(); i++) { + int secondRows = 0; + CompeteVo.DepartmentSecondProject secondProject = departmentProject.getSecondProjects().get(i); + List project = new ArrayList<>(); + + project.add(new PoiUtil.PoiUtilCell(departmentProject.getParentProjectName()+":"+secondProject.getCompeteProjectName())); + list.add(project); + if(secondProject.getTeam() == 0){ + if(ObjectUtil.isNotNull(secondProject.getManName())) { + secondRows++; + project.add(new PoiUtil.PoiUtilCell("男子组")); + project.add(new PoiUtil.PoiUtilCell(secondProject.getManName())); + if(ObjectUtil.isNotNull(secondProject.getWomanName())) { + secondRows++; + List group = new ArrayList<>(); + group.add(new PoiUtil.PoiUtilCell()); + group.add(new PoiUtil.PoiUtilCell("女子组")); + group.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName())); + list.add(group); + } + if(ObjectUtil.isNotNull(secondProject.getMixedName())) { + secondRows++; + List group = new ArrayList<>(); + group.add(new PoiUtil.PoiUtilCell()); + group.add(new PoiUtil.PoiUtilCell("男女混合组")); + group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); + list.add(group); + } + }else if(ObjectUtil.isNotNull(secondProject.getWomanName())){ + secondRows++; + project.add(new PoiUtil.PoiUtilCell("女子组")); + project.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName())); + if(ObjectUtil.isNotNull(secondProject.getMixedName())) { + secondRows++; + List group = new ArrayList<>(); + group.add(new PoiUtil.PoiUtilCell()); + group.add(new PoiUtil.PoiUtilCell("男女混合组")); + group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); + list.add(group); + } + }else if(ObjectUtil.isNotNull(secondProject.getMixedName())){ + secondRows++; + project.add(new PoiUtil.PoiUtilCell("男女混合组")); + project.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); + } + }else { + secondRows++; + project.add(new PoiUtil.PoiUtilCell()); + String playerNames = secondProject.getManName() == null ? "" : secondProject.getManName(); + if(StrUtil.isNotEmpty(playerNames) && StrUtil.isNotEmpty(secondProject.getWomanName())){ + playerNames += "、" + secondProject.getWomanName(); + }else { + playerNames += secondProject.getWomanName() == null ? "" : secondProject.getWomanName(); + } + if(StrUtil.isNotEmpty(playerNames) && StrUtil.isNotEmpty(secondProject.getMixedName())){ + playerNames += "、" + secondProject.getMixedName(); + }else { + playerNames += secondProject.getMixedName() == null ? "" : secondProject.getMixedName(); + } + project.add(new PoiUtil.PoiUtilCell(playerNames)); + } + + +// if(ObjectUtil.isNotNull(secondProject.getManName())) { +// secondRows++; +// project.add(new PoiUtil.PoiUtilCell("男子组")); +// project.add(new PoiUtil.PoiUtilCell(secondProject.getManName())); +// if(ObjectUtil.isNotNull(secondProject.getWomanName())) { +// secondRows++; +// List group = new ArrayList<>(); +// group.add(new PoiUtil.PoiUtilCell()); +// group.add(new PoiUtil.PoiUtilCell("女子组")); +// group.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName())); +// list.add(group); +// } +// if(ObjectUtil.isNotNull(secondProject.getMixedName())) { +// secondRows++; +// List group = new ArrayList<>(); +// group.add(new PoiUtil.PoiUtilCell()); +// group.add(new PoiUtil.PoiUtilCell("男女混合组")); +// group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); +// list.add(group); +// } +// }else if(ObjectUtil.isNotNull(secondProject.getWomanName())){ +// secondRows++; +// project.add(new PoiUtil.PoiUtilCell("女子组")); +// project.add(new PoiUtil.PoiUtilCell(secondProject.getWomanName())); +// if(ObjectUtil.isNotNull(secondProject.getMixedName())) { +// secondRows++; +// List group = new ArrayList<>(); +// group.add(new PoiUtil.PoiUtilCell()); +// group.add(new PoiUtil.PoiUtilCell("男女混合组")); +// group.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); +// list.add(group); +// } +// }else if(ObjectUtil.isNotNull(secondProject.getMixedName())){ +// secondRows++; +// project.add(new PoiUtil.PoiUtilCell("男女混合组")); +// project.add(new PoiUtil.PoiUtilCell(secondProject.getMixedName())); +// } + + PoiUtil.PoiUtilCell poiUtilCell = project.get(0); + poiUtilCell.setRowspan(secondRows); + } + } + }); + } + List blank = new ArrayList<>(); + blank.add(new PoiUtil.PoiUtilCell("",3,1)); + list.add(blank); + //领队裁判等信息 + if(CollectionUtil.isNotEmpty(departmentInfo.getDepartmentRoles())){ + List role1 = new ArrayList<>(); + List role2 = new ArrayList<>(); + List role3 = new ArrayList<>(); + departmentInfo.getDepartmentRoles().forEach(departmentRole -> { + if(departmentRole.getRole() == 0){ + role1.add(new PoiUtil.PoiUtilCell("领队",1,1,666,28)); + role1.add(new PoiUtil.PoiUtilCell("姓名:" + departmentRole.getName())); + role1.add(new PoiUtil.PoiUtilCell("手机号:" + departmentRole.getPhone(),1,1,666,42)); + } + if(departmentRole.getRole() == 1){ + role2.add(new PoiUtil.PoiUtilCell("裁判",1,1,666,28)); + role2.add(new PoiUtil.PoiUtilCell("姓名:" + departmentRole.getName())); + role2.add(new PoiUtil.PoiUtilCell("手机号:" + departmentRole.getPhone(),1,1,666,42)); + } + if(departmentRole.getRole() == 2){ + role3.add(new PoiUtil.PoiUtilCell("填表人",1,1,666,28)); + role3.add(new PoiUtil.PoiUtilCell("姓名:" + departmentRole.getName())); + role3.add(new PoiUtil.PoiUtilCell("手机号:" + departmentRole.getPhone(),1,1,666,42)); + } + }); + list.add(role1); + list.add(role2); + list.add(role3); + } + + + return list; + } + + private String writeExcel(Workbook wb,String sheetName, List> list) throws Exception { + PoiUtil.exportWB(sheetName, list, wb); + //生成文件 + String fileName = "department/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = PropUtil.path + File.separator + fileName; + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + boolean mkdirs = tmpFile.getParentFile().mkdirs(); + } + OutputStream stream = new FileOutputStream(tmpFile); + wb.write(stream); + stream.close(); + + return PropUtil.imgDomain + fileName; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/service/FileService.java b/mt/src/main/java/com/ccsens/mt/service/FileService.java new file mode 100644 index 00000000..aaa34977 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/FileService.java @@ -0,0 +1,69 @@ +package com.ccsens.mt.service; + +import cn.hutool.core.lang.Snowflake; +import com.ccsens.mt.bean.po.CommonFile; +import com.ccsens.mt.persist.mapper.CommonFileMapper; +import com.ccsens.mt.util.Constant; +import com.ccsens.util.NotSupportedFileTypeException; +import com.ccsens.util.PropUtil; +import com.ccsens.util.UploadFileUtil_Servlet3; +import com.ccsens.util.WebConstant; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import javax.servlet.http.Part; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * @description: 文件操作 + * @author: whj + * @time: 2020/7/17 14:25 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class FileService implements IFileService { + + @Resource + private CommonFileMapper commonFileMapper; + @Resource + private Snowflake snowflake; + + + @Override + public List saveFile(String dir, List files, Long userId) throws IOException, NotSupportedFileTypeException { + List fileList = new ArrayList<>(); + String allowedExt = WebConstant.IMG_TYPE + "," + WebConstant.Wps.FILE_TYPE_ALL; + for (Part file: files) { + log.info("文件名:{}", file.getSubmittedFileName()); + String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExt, dir); + CommonFile fileDo = new CommonFile(); + String name = file.getSubmittedFileName(); + fileDo.setId(snowflake.nextId()); + fileDo.setFileName(name); + fileDo.setLocation(dir + java.io.File.separator + path); + fileDo.setUserId(userId); + if (WebConstant.IMG_TYPE.contains(name.substring(name.lastIndexOf(".") + 1))) { + fileDo.setVisitLocation(PropUtil.imgDomain + Constant.File.UPLOAD_URL + File.separator + path); + } else { + fileDo.setVisitLocation(PropUtil.domain + "file/download/"+fileDo.getId()); + } + commonFileMapper.insertSelective(fileDo); + log.info("保存文件:{}", fileDo); + fileList.add(fileDo); + } + return fileList; + } + + + @Override + public CommonFile getById(Long id) { + return commonFileMapper.selectByPrimaryKey(id); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/service/ICompeteService.java b/mt/src/main/java/com/ccsens/mt/service/ICompeteService.java new file mode 100644 index 00000000..39e0d137 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/ICompeteService.java @@ -0,0 +1,117 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.CompeteDto; +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.util.bean.dto.QueryDto; + +import java.io.IOException; +import java.util.List; + +/** + * @author 逗 + */ +public interface ICompeteService { + /** + * 通过类型和当前时间,查找第几届信息 + * @param params + * @return + */ + CompeteVo.CompeteTime getCompeteTime(QueryDto params); + + /** + * 查看组别 + * @param params + * @return + */ + List queryCompeteGroup(QueryDto params); + + /** + * 模糊查询参赛单位 + * @param params + * @return + */ + List queryCompeteCompany(QueryDto params); + + /** + * 刷新redis内的参赛单位信息 + * @param params + */ + void syncCompeteCompany(QueryDto params); + + /** + * 提交报名基本信息 + * @param params + * @return + */ + CompeteVo.CompetePlayerInfo saveCompetePlayerInfo(QueryDto params); + + /** + * 根据类型查看所有的比赛项目 + * @param params + * @return + */ + List queryCompeteProject(QueryDto params); + + /** + * 提交选择的比赛项目 + * @param params + * @return + */ + CompeteVo.CompetePlayerInfo saveCompeteProject(QueryDto params) throws IOException; + + /** + * 查看本人所有参赛的项目 + * @param params + * @return + */ + CompeteVo.CompeteProjectAllByUser queryCompeteProjectAllByUser(QueryDto params); + + /** + * 查找团队的邀请二维码 + * @param params + * @return + */ + String getQrCodeByTeamId(QueryDto params); + + /** + * 获取个人报名基本信息 + * @param params + * @return + */ + CompeteVo.GetPlayerInfo getCompetePlayerInfo(QueryDto params); + + /** + * 扫码加入团队 + * @param params + * @return + */ + CompeteVo.CompeteTeamProject joinCompeteGroup(QueryDto params); + + /** + * 查询比赛项目下的参赛人员列表 + * @param params 大赛id和比赛项目id + * @return 返回参赛人员或团队的列表 + */ + CompeteVo.QueryPlayerList queryPlayerList(QueryDto params); + + /** + * 根据组别查找比赛项目信息 + * @param params 类型和组别 + * @return 返回比赛项目(没有一级项目,直接二级) + */ + List queryProjectByGroup(QueryDto params); + + /** + * 根据项目查询组别信息 + * @param params 项目信息 + * @return 返回组别信息 + */ + List queryGroupByProject(QueryDto params); + + /** + * 同时提交基本信息和参赛项目 + * @param params + * @return + */ + void submitProjectAndGroup(QueryDto params); +} diff --git a/mt/src/main/java/com/ccsens/mt/service/IDepartmentService.java b/mt/src/main/java/com/ccsens/mt/service/IDepartmentService.java new file mode 100644 index 00000000..f7f03151 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/IDepartmentService.java @@ -0,0 +1,48 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.CompeteDto; +import com.ccsens.mt.bean.vo.CompeteVo; +import com.ccsens.util.bean.dto.QueryDto; + +import java.util.List; + +/** + * @author 逗 + */ +public interface IDepartmentService { + + /** + * 查询院系信息 + * @param params 比赛类型 + * @return 返回院系信息 + */ + List getCompany(QueryDto params); + + /** + * 查看参赛项目 + * @param params 比赛类型 + * @return 返回比赛项目 + */ + List queryCompeteProject(QueryDto params); + + /** + * 提交院系报名信息 + * @param params 院系报名信息 + * @return 返回报名信息 + */ + CompeteVo.DepartmentInfo saveDepartment(QueryDto params); + + /** + * 获取院系报名的信息 + * @param params 院系id和比赛类型id + * @return 返回报名信息 + */ + CompeteVo.DepartmentInfo getDepartment(QueryDto params); + + /** + * 导出报名信息表 + * @param params + * @return + */ + String exportExcel(CompeteDto.CompeteType params); +} diff --git a/mt/src/main/java/com/ccsens/mt/service/IFileService.java b/mt/src/main/java/com/ccsens/mt/service/IFileService.java new file mode 100644 index 00000000..c2a33153 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/IFileService.java @@ -0,0 +1,32 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.po.CommonFile; +import com.ccsens.util.NotSupportedFileTypeException; + +import javax.servlet.http.Part; +import java.io.IOException; +import java.util.List; + +/** + * 文件操作 + * @author whj + */ +public interface IFileService { + /*** + * 批量上传文件 + * @param dir 上级目录 + * @param files 文件 + * @param userId 用户id + * @return 文件信息 + * @throws IOException 文件存储异常 + * @throws NotSupportedFileTypeException 文件存储异常 + */ + List saveFile(String dir, List files, Long userId) throws IOException, NotSupportedFileTypeException; + + /** + * 根据ID查询数据 + * @param id id + * @return 文件 + */ + CommonFile getById(Long id); +} diff --git a/mt/src/main/java/com/ccsens/mt/service/ILevelUpService.java b/mt/src/main/java/com/ccsens/mt/service/ILevelUpService.java new file mode 100644 index 00000000..b6ee16fc --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/ILevelUpService.java @@ -0,0 +1,43 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.LevelDto; +import com.ccsens.mt.bean.vo.LevelVo; +import com.ccsens.util.bean.dto.QueryDto; +import com.github.pagehelper.PageInfo; + +/** + * @author 逗 + */ +public interface ILevelUpService { + + /** + * 添加选手信息 + * @param levelUserDto 选手信息 + */ + void saveLevelUser(LevelDto.LevelUserDto levelUserDto); + + /** + * 参加比赛时添加晋级表信息 + * @param levelUpDto 选手和比赛信息 + */ + void joinCompete(LevelDto.LevelUpDto levelUpDto); + + /** + * 自动晋级 + * @param autoLevelUpDto 大赛id和比赛code + */ + void autoLevelUp(LevelDto.AutoLevelUpDto autoLevelUpDto); + + /** + * 手动晋级 + * @param params 比赛信息和晋级的选手信息 + */ + void manualLevelUpPlayer(LevelDto.ManualLevelUpDto params); + + /** + * 查询比赛内晋级的选手信息 + * @param params 比赛id和分页信息 + * @return 返回查到的比赛下所有晋级的选手的信息 + */ + PageInfo queryLevelUserInfo(LevelDto.QueryLevelUserInfo params); +} diff --git a/mt/src/main/java/com/ccsens/mt/service/ITopicService.java b/mt/src/main/java/com/ccsens/mt/service/ITopicService.java new file mode 100644 index 00000000..87782cbd --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/ITopicService.java @@ -0,0 +1,72 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.vo.TopicVo; +import com.ccsens.util.CodeEnum; + +import java.util.List; + +/** + * @author zy + */ +public interface ITopicService { + /** + * 通过比赛环节查询题目 + * @param getTopic + * @return + */ + TopicVo.TopicInfo getTopicByLink(TopicDto.GetTopic getTopic); + + /** + * 通过项目查询分组的信息 + * @param getGroup + * @return + */ + List queryGroupByProject(TopicDto.GetGroup getGroup); + + /** + * 主持人提交每组的答题结果 + * @param saveAnswers + */ + void saveAnswers(TopicDto.SaveAnswers saveAnswers); + + /** + * 根据项目id查排名 + * @param ranking + * @return + */ + List queryRanking(TopicDto.GetRankingByProjectId ranking); + + /** + * 大屏点击开始抢答(倒计时结束后) + * @param topic 题目id + */ + void responderStart(TopicDto.Topic topic); + + /** + * 选手点击抢答 + * @param group 分组的id + */ + void responderGroup(TopicDto.Group group); + + /** + * 查询抢答成功的组 + * @param topic 题目id + * @return 返回成功的组的信息 + */ + TopicVo.GroupInfo getResponder(TopicDto.Topic topic); + + /** + * 根据类型和数量查询试题 + * @param getTopicAll 类型 + * @return 试题 + */ + List queryTopicAllByLink(TopicDto.GetTopicAll getTopicAll); + + /** + * 晋级 + * @param promoted 晋级组信息 + * @return 结果 + */ + CodeEnum promoted(List promoted); +} diff --git a/mt/src/main/java/com/ccsens/mt/service/IVideoService.java b/mt/src/main/java/com/ccsens/mt/service/IVideoService.java new file mode 100644 index 00000000..dfd61d38 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/IVideoService.java @@ -0,0 +1,26 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.VideoDto; +import com.ccsens.mt.bean.vo.VideoVo; +import com.ccsens.util.bean.dto.QueryDto; + +import java.util.List; + +/** + * @author 逗 + */ +public interface IVideoService { + /** + * 查看某个用户上传的比赛视频信息 + * @param params 比赛id和选手id + * @return 返回上传到视频文件信息 + */ + List getVideoByPlayerId(QueryDto params); + + /** + * 选手或团队上传视频 + * @param params 选手id或团队id + * @return 返回上传的文件信息 + */ + List uploadVideo(QueryDto params); +} diff --git a/mt/src/main/java/com/ccsens/mt/service/IVoteService.java b/mt/src/main/java/com/ccsens/mt/service/IVoteService.java new file mode 100644 index 00000000..1766ab1e --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/IVoteService.java @@ -0,0 +1,28 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.vo.VoteVo; +import com.ccsens.util.bean.dto.QueryDto; + +import java.util.List; + +public interface IVoteService { + /** + * 投票 + * @param params + */ + void saveVote(QueryDto> params); + + /** + * 查看投票结果 + * @param project + * @return + */ + List queryVote(TopicDto.Project project); + + /** + * 开始投票 + * @param params + */ + void startVote(QueryDto params); +} diff --git a/mt/src/main/java/com/ccsens/mt/service/LevelUpService.java b/mt/src/main/java/com/ccsens/mt/service/LevelUpService.java new file mode 100644 index 00000000..b204f3a5 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/LevelUpService.java @@ -0,0 +1,254 @@ +package com.ccsens.mt.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.mt.bean.dto.LevelDto; +import com.ccsens.mt.bean.po.*; +import com.ccsens.mt.bean.vo.LevelVo; +import com.ccsens.mt.persist.dao.LevelUpDao; +import com.ccsens.mt.persist.mapper.LevelRuleMapper; +import com.ccsens.mt.persist.mapper.LevelUserMapper; +import com.ccsens.mt.util.Constant; +import com.ccsens.util.RedisUtil; +import com.ccsens.util.bean.dto.QueryDto; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; +import org.springframework.data.redis.core.ZSetOperations; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class LevelUpService implements ILevelUpService{ + @Resource + private Snowflake snowflake; + @Resource + private LevelUserMapper levelUserMapper; + @Resource + private LevelUpDao levelUpDao; + @Resource + private LevelRuleMapper levelRuleMapper; + @Resource + private RedisUtil redisUtil; + + /** + * 选手报名时将信息存入选手表 + * @param levelUserDto 选手信息 + */ + @Override + public void saveLevelUser(LevelDto.LevelUserDto levelUserDto) { + log.info("将参加比赛的选手信息存入数据库:{}",levelUserDto); + LevelUser levelUser = new LevelUser(); + BeanUtil.copyProperties(levelUserDto,levelUser); + levelUser.setId(snowflake.nextId()); + levelUserMapper.insertSelective(levelUser); + } + + /** + * 参加比赛时存入将选手和比赛的关联信息存入晋级表,同时存入redis + * @param levelUpDto 选手和比赛信息 + */ + @Override + public void joinCompete(LevelDto.LevelUpDto levelUpDto) { + log.info("参加比赛时储存晋级表:{}",levelUpDto); + //根据playerId查找的选手表id + LevelUser levelUser = null; + LevelUserExample levelUserExample = new LevelUserExample(); + levelUserExample.createCriteria().andPlayerIdEqualTo(levelUpDto.getPlayerId()); + List levelUserList = levelUserMapper.selectByExample(levelUserExample); + if (CollectionUtil.isNotEmpty(levelUserList)){ + log.info("查找到的用户的选手信息:{}",levelUserList); + levelUser = levelUserList.get(0); + } + if(ObjectUtil.isNotNull(levelUser)) { + //添加晋级表 + LevelUpExample levelUpExample = new LevelUpExample(); + levelUpExample.createCriteria().andLevelUserIdEqualTo(levelUser.getId()).andCompeteCodeEqualTo(levelUpDto.getCompeteCode()); + if (levelUpDao.countByExample(levelUpExample) == 0) { + LevelUp levelUp = new LevelUp(); + BeanUtil.copyProperties(levelUpDto, levelUp); + levelUp.setId(snowflake.nextId()); + levelUp.setLevelUserId(levelUser.getId()); + levelUpDao.insertSelective(levelUp); + //存入redis + String key = Constant.Redis.COMPETE_LEVEL + levelUpDto.getCompeteTimeId() + "_" + levelUpDto.getCompeteCode(); + redisUtil.zsSet(key, levelUser, 0, 3600 * 24 * 300); + } + } + } + + /** + * 自动晋级 + * @param autoLevelUpDto 大赛id和比赛code + */ + @Override + public void autoLevelUp(LevelDto.AutoLevelUpDto autoLevelUpDto) { + //查找晋级规则, + LevelRule levelRule = new LevelRule(); + LevelRuleExample levelRuleExample = new LevelRuleExample(); + levelRuleExample.createCriteria().andCompeteCodeNowEqualTo(autoLevelUpDto.getCompeteCode()) + .andCompeteTimeIdEqualTo(autoLevelUpDto.getCompeteTimeId()); + List ruleList = levelRuleMapper.selectByExample(levelRuleExample); + if(CollectionUtil.isNotEmpty(ruleList)){ + levelRule = ruleList.get(0); + } + log.info("查找到的比赛晋级规则:{}",levelRule); + //查找redis内的数据 + String key = Constant.Redis.COMPETE_LEVEL + autoLevelUpDto.getCompeteTimeId() + "_" + autoLevelUpDto.getCompeteCode(); + Set> typedTuples = redisUtil.zsRevGetWithScore(key, 0, -1); + AtomicInteger index = new AtomicInteger(); + LevelRule finalLevelRule = levelRule; + switch (levelRule.getRule()){ + case Constant.LevelUp.RULE_RANK_NO_REPEAT : + log.info("根据排名(不重复)晋级"); + index.set(0); + typedTuples.forEach(type ->{ + index.set(index.get() + 1); + // 更新数据库分数 + LevelUser levelUser = (LevelUser) type.getValue(); + updateLevelUpScore(autoLevelUpDto.getCompeteCode(), index.get(), Objects.requireNonNull(type.getScore()).intValue(), levelUser.getId()); + //如果是符合晋级条件,添加新的晋级信息 + if(index.get() <= finalLevelRule.getLevelCondition()){ + insertLevelUp(autoLevelUpDto.getCompeteTimeId(), finalLevelRule.getCompeteCodeLevelUp(), levelUser, (byte) 0); + } + }); + break; + case Constant.LevelUp.RULE_RANK_REPEAT : + log.info("根据排名(可以重复)晋级"); + index.set(0); + AtomicInteger score = new AtomicInteger(0); + typedTuples.forEach(type ->{ + index.set(index.get() + 1); + // 更新数据库分数 + LevelUser levelUser = (LevelUser) type.getValue(); + updateLevelUpScore(autoLevelUpDto.getCompeteCode(), index.get(), Objects.requireNonNull(type.getScore()).intValue(), levelUser.getId()); + //如果是符合晋级条件,添加新的晋级信息 + if(index.get() <= finalLevelRule.getLevelCondition() || score.get() == Objects.requireNonNull(type.getScore()).intValue()){ + insertLevelUp(autoLevelUpDto.getCompeteTimeId(), finalLevelRule.getCompeteCodeLevelUp(), levelUser, (byte) 0); + } + score.set(Objects.requireNonNull(type.getScore()).intValue()); + }); + break; + case Constant.LevelUp.RULE_SCORE : + log.info("根据分数晋级"); + index.set(0); + typedTuples.forEach(type ->{ + index.set(index.get() + 1); + // 更新数据库分数 + LevelUser levelUser = (LevelUser) type.getValue(); + updateLevelUpScore(autoLevelUpDto.getCompeteCode(), index.get(), Objects.requireNonNull(type.getScore()).intValue(), levelUser.getId()); + //如果是符合晋级条件,添加新的晋级信息 + if(Objects.requireNonNull(type.getScore()).intValue() >= finalLevelRule.getLevelCondition()){ + insertLevelUp(autoLevelUpDto.getCompeteTimeId(), finalLevelRule.getCompeteCodeLevelUp(), levelUser, (byte) 0); + } + }); + break; + case Constant.LevelUp.RULE_APPOINT : + case Constant.LevelUp.RULE_TEAM_RANK : + case Constant.LevelUp.RULE_NO : + default: + break; + } + //将旧的数据从redis中删除 + redisUtil.del(key); + } + + /** + * 将晋级信息添加进数据库,存入redis + */ + private void insertLevelUp(Long competeTimeId, String competeCode, LevelUser levelUser,byte levelUpType) { + LevelUp levelUp = new LevelUp(); + levelUp.setId(snowflake.nextId()); + levelUp.setLevelUserId(levelUser.getId()); + levelUp.setCompeteCode(competeCode); + levelUp.setCompeteTimeId(competeTimeId); + levelUp.setScore(0); + levelUp.setRanking(0); + levelUp.setLevelUpType(levelUpType); + levelUpDao.insertSelective(levelUp); + //存入redis + String keyNew = Constant.Redis.COMPETE_LEVEL + competeTimeId + "_" + competeCode; + redisUtil.zsSet(keyNew, levelUser, 0,3600 * 24 * 300); + } + + /** + * 查找晋级信息,更新晋级信息里的分数和排名 + * @param competeCode 比赛code + * @param index 排名 + * @param score 分数 + * @param levelUserId levelUserId + */ + private void updateLevelUpScore(String competeCode, int index, int score, Long levelUserId) { + Long levelUpId = levelUpDao.getByLevelUserIdAndCode(levelUserId, competeCode); + LevelUp levelUpOld = new LevelUp(); + levelUpOld.setId(levelUpId); + levelUpOld.setScore(score); + levelUpOld.setRanking(index); + levelUpDao.updateByPrimaryKeySelective(levelUpOld); + } + + /** + * 手动晋级 + * @param manualLevelUp 比赛信息和晋级的选手信息 + */ + @Override + public void manualLevelUpPlayer(LevelDto.ManualLevelUpDto manualLevelUp) { + //查找晋级规则, + LevelRule levelRule = new LevelRule(); + LevelRuleExample levelRuleExample = new LevelRuleExample(); + levelRuleExample.createCriteria().andCompeteCodeNowEqualTo(manualLevelUp.getCompeteCode()) + .andCompeteTimeIdEqualTo(manualLevelUp.getCompeteTimeId()); + List ruleList = levelRuleMapper.selectByExample(levelRuleExample); + if(CollectionUtil.isNotEmpty(ruleList)){ + levelRule = ruleList.get(0); + } + //查找redis内的数据 + String key = Constant.Redis.COMPETE_LEVEL + manualLevelUp.getCompeteTimeId() + "_" + manualLevelUp.getCompeteCode(); + Set> typedTuples = redisUtil.zsRevGetWithScore(key, 0, -1); + AtomicInteger index = new AtomicInteger(0); + LevelRule finalLevelRule = levelRule; + typedTuples.forEach(type ->{ + index.set(index.get() + 1); + // 更新数据库分数 + LevelUser levelUser = (LevelUser) type.getValue(); + updateLevelUpScore(manualLevelUp.getCompeteCode(), index.get(), Objects.requireNonNull(type.getScore()).intValue(), levelUser.getId()); + //如果是符合晋级条件,添加新的晋级信息 + if(CollectionUtil.isNotEmpty(manualLevelUp.getManualLevelUpPlayers())){ + manualLevelUp.getManualLevelUpPlayers().forEach(player -> { + if(player.getPlayerId().equals(levelUser.getPlayerId())){ + insertLevelUp(manualLevelUp.getCompeteTimeId(), finalLevelRule.getCompeteCodeLevelUp(), levelUser, (byte) 1); + } + }); + } + }); + } + + /** + * 查询比赛内晋级的选手信息 + * @param levelUserInfo 比赛id和分页信息 + * @return 返回查到的比赛下所有晋级的选手的信息 + */ + @Override + public PageInfo queryLevelUserInfo(LevelDto.QueryLevelUserInfo levelUserInfo) { + if(levelUserInfo.getPage() != -1){ + PageHelper.startPage(levelUserInfo.getPage(), levelUserInfo.getPageSize()); + } + List vos = levelUpDao.queryLevelUserInfo(levelUserInfo.getCompeteCode(),levelUserInfo.getCompeteTimeId()); + + return new PageInfo<>(vos); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/service/MessageServicer.java b/mt/src/main/java/com/ccsens/mt/service/MessageServicer.java index 942a7e98..e10b94b5 100644 --- a/mt/src/main/java/com/ccsens/mt/service/MessageServicer.java +++ b/mt/src/main/java/com/ccsens/mt/service/MessageServicer.java @@ -1,22 +1,35 @@ package com.ccsens.mt.service; +import com.alibaba.fastjson.JSONObject; import com.ccsens.mt.bean.dto.message.SyncMessageWithShowDto; import com.ccsens.util.JacksonUtil; +import com.ccsens.util.bean.message.common.InMessage; +import com.ccsens.util.bean.message.common.MessageConstant; import com.ccsens.util.config.RabbitMQConfig; +import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.AmqpTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +@Slf4j @Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class MessageServicer implements IMessageService{ @Autowired private AmqpTemplate rabbitTemplate; @Override public void sendSyncMessageWithShow(SyncMessageWithShowDto message) throws Exception { - System.out.println(JacksonUtil.beanToJson(message)); - rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, - JacksonUtil.beanToJson(message)); + log.info(JacksonUtil.beanToJson(message)); +// rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, +// JacksonUtil.beanToJson(message)); + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(message.receiversTransTos()); + inMessage.setData(JSONObject.toJSONString(message)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, inMessage); } } diff --git a/mt/src/main/java/com/ccsens/mt/service/ScoreService.java b/mt/src/main/java/com/ccsens/mt/service/ScoreService.java index ede50273..343c8220 100644 --- a/mt/src/main/java/com/ccsens/mt/service/ScoreService.java +++ b/mt/src/main/java/com/ccsens/mt/service/ScoreService.java @@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.crypto.SecureUtil; import com.ccsens.cloudutil.bean.tall.vo.MemberVo; @@ -22,7 +23,6 @@ import com.ccsens.util.ExcelUtil; import com.ccsens.util.JsonResponse; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; -import lombok.Data; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; @@ -30,34 +30,40 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.ResourceLoader; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.io.*; import java.math.BigDecimal; import java.util.*; import static java.math.BigDecimal.ROUND_HALF_UP; +/** + * @author 逗 + */ @Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ScoreService implements IScoreService { - @Autowired + @Resource private TallFeignClient tallFeignClient; - @Autowired + @Resource private MtScoreDao scoreDao; - @Autowired + @Resource private MtScoreLogDao scoreLogDao; - @Autowired + @Resource private MtJudgeDao judgeDao; - @Autowired + @Resource private IMessageService messageService; - @Autowired + @Resource private Snowflake snowflake; /** * 获取评分项 - * - * @param userId - * @param playerId - * @return + * @param userId 用户id + * @param playerId 被评分的任务或人 + * @return 返回评分信息 */ @Override public List getScoreLog(Long userId, Long playerId) { @@ -82,7 +88,7 @@ public class ScoreService implements IScoreService { scoreLogExample.createCriteria().andProjectIdEqualTo(taskInfo.getProjectId()); List scoreLogList = scoreLogDao.selectByExample(scoreLogExample); if (CollectionUtil.isNotEmpty(scoreLogList)) { - ScoreVo.ScoreInfo scoreInfo = null; + ScoreVo.ScoreInfo scoreInfo; for (MtScoreLog mtScoreLog : scoreLogList) { scoreInfo = new ScoreVo.ScoreInfo(); scoreInfo.setId(mtScoreLog.getId()); @@ -109,8 +115,8 @@ public class ScoreService implements IScoreService { /** * 提交评分 * - * @param userId - * @param submitScore + * @param userId 用户id + * @param submitScore 提交的评分信息 */ @Override public void submitScore(Long userId, ScoreDto.SubmitScore submitScore) { @@ -168,8 +174,8 @@ public class ScoreService implements IScoreService { /** * 提交单项评分 * - * @param userId - * @param submitOnlyOneScore + * @param userId 用户id + * @param submitOnlyOneScore 提交的单项评分信息 */ @Override public void submitOnlyOneScore(Long userId, ScoreDto.SubmitOnlyOneScore submitOnlyOneScore) { @@ -213,16 +219,16 @@ public class ScoreService implements IScoreService { /** * 查看评分 * - * @param userId - * @param roleId - * @param playerId - * @return + * @param userId 用户id + * @param roleId 角色id + * @param playerId 查看的任务或人 + * @return 返回评分信息 */ @Override public ScoreVo.AdminScore adminScore(Long userId, Long roleId, Long playerId) { ScoreVo.AdminScore adminScore = new ScoreVo.AdminScore(); List judgeScoreList = new ArrayList<>(); - ScoreVo._adminScoreList judgeScore = new ScoreVo._adminScoreList(); + ScoreVo._adminScoreList judgeScore; // Score scoreMax = scoreDao.maxScore(playerId);//最高分 // Score scoreMin = scoreDao.minScore(playerId);//最低分 TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(playerId); @@ -288,7 +294,7 @@ public class ScoreService implements IScoreService { } //查找每个任务的分数 List rankingScoreList = new ArrayList<>(); - ScoreVo.RankingScore rankingScore = null; + ScoreVo.RankingScore rankingScore; if (CollectionUtil.isNotEmpty(taskIdList)) { for (Long taskId : taskIdList) { rankingScore = new ScoreVo.RankingScore(); @@ -337,7 +343,7 @@ public class ScoreService implements IScoreService { */ private List findJudgeScore(Long projectId, Long taskId) { List judgeScoreList = new ArrayList<>(); - ScoreVo.JudgeScore judgeScore = null; + ScoreVo.JudgeScore judgeScore; //查找项目下所有评委 MtJudgeExample judgeExample = new MtJudgeExample(); judgeExample.createCriteria().andProjectIdEqualTo(projectId); @@ -365,7 +371,7 @@ public class ScoreService implements IScoreService { public void showScore(Long projectId, Long taskId) throws Exception { SyncMessageWithShowDto scoreShow = new SyncMessageWithShowDto(); SyncMessageWithShowDto.Data data = new SyncMessageWithShowDto.Data(); - SyncMessageWithShowDto.Data.Judge judge = null; + SyncMessageWithShowDto.Data.Judge judge; List judgeList = new ArrayList<>(); //项目 @@ -459,14 +465,12 @@ public class ScoreService implements IScoreService { /** * 导出签字表 * - * @param projectId - * @param taskId - * @return + * @param projectId 项目id + * @param taskId 任务id + * @return 返回签字表路径 */ @Override public String exportExcel(Long projectId, Long taskId) throws Exception { - //返回excel地址 - String excelPath = ""; //获取模板 ResourceLoader resourceLoader = new DefaultResourceLoader(); InputStream is = resourceLoader.getResource("classpath:template/judgeTemplate.xlsx").getInputStream(); @@ -501,19 +505,17 @@ public class ScoreService implements IScoreService { excel.write(stream); //关闭流 stream.close(); - String rePath = WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + path + ".xlsx"; - return rePath; + return WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + path + ".xlsx"; } /** * 写入excel * - * @param taskInfo - * @param judge - * @throws Exception + * @param taskInfo 任务和项目信息 + * @param judge 评委信息 */ - public void writeExcel(TaskVo.TaskInfoWithFeign taskInfo, MtJudge judge, XSSFSheet judgeSheet) throws Exception { - XSSFCell industry = judgeSheet.getRow(5).getCell(3); + public void writeExcel(TaskVo.TaskInfoWithFeign taskInfo, MtJudge judge, XSSFSheet judgeSheet){ +// XSSFCell industry = judgeSheet.getRow(5).getCell(3); //项目名 XSSFCell projectName = judgeSheet.getRow(5).getCell(5); projectName.setCellValue(taskInfo.getProjectName()); @@ -544,9 +546,8 @@ public class ScoreService implements IScoreService { /** * 导出排名表 - * @param projectId - * @return - * @throws Exception + * @param projectId 项目id + * @return 返回排名表信息 */ @Override public String rankingExcel(Long projectId) throws Exception { @@ -569,7 +570,7 @@ public class ScoreService implements IScoreService { } } //保存地址 - String filePath = SecureUtil.simpleUUID(); + String filePath = IdUtil.simpleUUID(); String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE; String extraPath = DateUtil.format(new Date(), "yyyyMMdd"); String ePath = dir + File.separator + extraPath + File.separator + filePath + ".xlsx"; @@ -590,8 +591,8 @@ public class ScoreService implements IScoreService { /** * 获取总评分表 - * @param projectId - * @return + * @param projectId 项目id + * @return 返回路径 */ @Override public String rankingAllExcel(Long projectId) throws Exception{ @@ -641,7 +642,7 @@ public class ScoreService implements IScoreService { } //保存地址 - String filePath = SecureUtil.simpleUUID(); + String filePath = IdUtil.simpleUUID(); String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE; String extraPath = DateUtil.format(new Date(), "yyyyMMdd"); String ePath = dir + File.separator + extraPath + File.separator + filePath + ".xlsx"; @@ -656,8 +657,7 @@ public class ScoreService implements IScoreService { excel.write(stream); //关闭流 stream.close(); - String path = WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + filePath + ".xlsx"; - return path; + return WebConstant.TEST_URL_BASE_MT + WebConstant.UPLOAD_PATH_BASE_MT_JUDGE + File.separator + extraPath + File.separator + filePath + ".xlsx"; } /*=====================================================*/ diff --git a/mt/src/main/java/com/ccsens/mt/service/SigninService.java b/mt/src/main/java/com/ccsens/mt/service/SigninService.java index 14343c9d..0c126c7e 100644 --- a/mt/src/main/java/com/ccsens/mt/service/SigninService.java +++ b/mt/src/main/java/com/ccsens/mt/service/SigninService.java @@ -15,11 +15,14 @@ import com.ccsens.util.CodeEnum; import com.ccsens.util.exception.BaseException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; @Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class SigninService implements ISigninService{ @Autowired private MtSigninDao mtSigninDao; diff --git a/mt/src/main/java/com/ccsens/mt/service/TopicService.java b/mt/src/main/java/com/ccsens/mt/service/TopicService.java new file mode 100644 index 00000000..64728022 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/TopicService.java @@ -0,0 +1,256 @@ +package com.ccsens.mt.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.po.*; +import com.ccsens.mt.bean.po.MtGroup; +import com.ccsens.mt.bean.vo.TopicVo; +import com.ccsens.mt.persist.dao.GroupDao; +import com.ccsens.mt.persist.dao.GroupTopicDao; +import com.ccsens.mt.persist.dao.TopicDao; +import com.ccsens.mt.persist.mapper.MtResponderMapper; +import com.ccsens.mt.persist.mapper.MtGroupMapper; +import com.ccsens.mt.util.Constant; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.RedisUtil; +import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; + +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) +public class TopicService implements ITopicService{ + + @Resource + private TopicDao topicDao; + @Resource + private RedisUtil redisUtil; + @Resource + private GroupDao groupDao; + @Resource + private Snowflake snowflake; + @Resource + private GroupTopicDao groupTopicDao; + @Resource + private MtResponderMapper mtResponderMapper; + @Resource + private MtGroupMapper mtGroupMapper; + + @Override + public TopicVo.TopicInfo getTopicByLink(TopicDto.GetTopic getTopic) { + log.info("查询题目:{}",getTopic.toString()); + TopicVo.TopicInfo topicInfo = topicDao.getTopicByLink(getTopic.getLinkType(), getTopic.getTopicNum()); + if (topicInfo == null) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + // 查询做题答案 + List answers = topicDao.queryAnswer(getTopic.getProjectId(), topicInfo.getTopicId()); + // 查询是否有最小最大序号 + TopicVo.TopicSequence sequence = topicDao.getMinAndMax(getTopic.getLinkType()); + //总题数 + topicInfo.setTotalNum(sequence.getMax()); + topicInfo.setAnswers(answers); + topicInfo.setPrev(topicInfo.getSequence() == sequence.getMin() ? (byte)0 : 1); + topicInfo.setNext(topicInfo.getSequence() == sequence.getMax() ? (byte)0 : 1); + if(topicInfo.getTopicType() == 2){ + topicInfo.setAnswersTrue("T".equalsIgnoreCase(topicInfo.getAnswersTrue()) ? "正确" : "错误"); + } + return topicInfo; + } + + @Override + public List queryGroupByProject(TopicDto.GetGroup getGroup) { + log.info("查询分组:{}",getGroup.toString()); + List groupInfoList = topicDao.queryGroupByProject(getGroup.getProjectId(),getGroup.getLinkType(),getGroup.getType()); +// redisUtil.set() + return topicDao.queryGroupByProject(getGroup.getProjectId(),getGroup.getLinkType(),getGroup.getType()); + } + + @Override + public void saveAnswers(TopicDto.SaveAnswers saveAnswers) { + log.info("主持人提交分数:{}",saveAnswers.toString()); + //查询题目 + MtTopic topic = topicDao.selectByPrimaryKey(saveAnswers.getTopicId()); + if(ObjectUtil.isNull(topic)){ + throw new BaseException(CodeEnum.NOT_TOPIC); + } + //循环遍历提交的分组 + if(CollectionUtil.isNotEmpty(saveAnswers.getAnswersGroupList())){ + saveAnswers.getAnswersGroupList().forEach(saveAnswersGroup ->{ + MtGroup group = groupDao.selectByPrimaryKey(saveAnswersGroup.getGroupId()); + if(ObjectUtil.isNull(group)){ + throw new BaseException(CodeEnum.NOT_GROUP); + } + //查找该组这道题之前的提交记录,有则删除重新添加 + int groupTopicScore = 0; + MtGroupTopicExample groupTopicExample = new MtGroupTopicExample(); + groupTopicExample.createCriteria().andTopicIdEqualTo(saveAnswers.getTopicId()) + .andGroupIdEqualTo(saveAnswersGroup.getGroupId()); + List mtGroupTopicList = groupTopicDao.selectByExample(groupTopicExample); + if(CollectionUtil.isNotEmpty(mtGroupTopicList)){ + for(MtGroupTopic groupTopic:mtGroupTopicList){ + groupTopicScore += groupTopic.getScore(); + groupTopic.setRecStatus((byte) 2); + groupTopicDao.updateByPrimaryKeySelective(groupTopic); + } + } + //添加分组答题的信息 + MtGroupTopic groupTopic = new MtGroupTopic(); + groupTopic.setId(snowflake.nextId()); + groupTopic.setTopicId(saveAnswers.getTopicId()); + groupTopic.setGroupId(saveAnswersGroup.getGroupId()); + groupTopic.setAnswers(saveAnswersGroup.getAnswers()); + int score = 0; + if("T".equalsIgnoreCase(saveAnswersGroup.getAnswers())){ + score = topic.getScore(); + }else { + if(topic.getScoreRule() == 1){ + score = -topic.getScore(); + } + } + groupTopic.setScore(score); + groupTopicDao.insertSelective(groupTopic); + //修改分组的分数 + + group.setScore(group.getScore() + score - groupTopicScore); + groupDao.updateByPrimaryKeySelective(group); + }); + } + } + + @Override + public List queryRanking(TopicDto.GetRankingByProjectId ranking) { + log.info("查看排名:{}", ranking.toString()); + List queryRankingList = topicDao.queryRanking(ranking.getProjectId(),ranking.getLinkType()); + if(CollectionUtil.isNotEmpty(queryRankingList)){ + if(ranking.getLinkType() == 1){ + for(int i = 4; i < queryRankingList.size() - 1;i++){ + if(queryRankingList.get(i).getScore() > queryRankingList.get(i + 1).getScore()){ + break; + } + queryRankingList.get(i).setExtraTopic(1); + queryRankingList.get(i + 1).setExtraTopic(1); + } + for(int i = 4; i > 0; i--){ + if(queryRankingList.get(i).getScore() < queryRankingList.get(i - 1).getScore()){ + break; + } + queryRankingList.get(i).setExtraTopic(1); + queryRankingList.get(i - 1).setExtraTopic(1); + } + + } + if(ranking.getLinkType() == 2){ + for(int i = 2; i < queryRankingList.size() - 1;i++){ + if(queryRankingList.get(i).getScore() > queryRankingList.get(i + 1).getScore()){ + break; + } + queryRankingList.get(i).setExtraTopic(1); + queryRankingList.get(i + 1).setExtraTopic(1); + } + for(int i = 2; i > 0; i--){ + if(queryRankingList.get(i).getScore() < queryRankingList.get(i - 1).getScore()){ + break; + } + queryRankingList.get(i).setExtraTopic(1); + queryRankingList.get(i - 1).setExtraTopic(1); + } + + } + } + return queryRankingList; + } + + @Override + public void responderStart(TopicDto.Topic topic) { + redisUtil.set(topic.getProjectId()+ Constant.Redis.START_QUESTION,topic.getTopicId(), Constant.Redis.TIME_OUT); + } + + @Override + public void responderGroup(TopicDto.Group group) { + //锁 + synchronized (this){ + log.info("抢答:{}", group); + //查询分组的信息 + MtGroup mtGroup = mtGroupMapper.selectByPrimaryKey(group.getGroupId()); + if(ObjectUtil.isNull(mtGroup)){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } + //在redis中查找当前项目下开始抢答的题 + Object o = redisUtil.get(mtGroup.getProjectId()+ Constant.Redis.START_QUESTION); + log.info("题目缓存:{}", o); + if (o == null) { + return; + } + //在redis中查找之前有没有人抢答 + Object a = redisUtil.get(mtGroup.getProjectId() + Constant.Redis.RESPONDER + o); + if (a != null) { + return; + } + //储存数据库 + long l = topicDao.countVote(mtGroup.getProjectId(), (int) o); + log.info("数据库抢答数:{}", l); + if (l > 0) { + return; + } + + //将自己抢答的信息存进redis + redisUtil.set(mtGroup.getProjectId() + Constant.Redis.RESPONDER + o,group.getGroupId(),Constant.Redis.TIME_OUT); + + MtResponder mtResponder = new MtResponder(); + mtResponder.setId(snowflake.nextId()); + mtResponder.setGroupId(group.getGroupId()); + mtResponder.setTopicId((long)(int)o); + mtResponder.setResponderTime(System.currentTimeMillis()); + mtResponderMapper.insertSelective(mtResponder); + } + } + + @Override + public TopicVo.GroupInfo getResponder(TopicDto.Topic topic) { + log.info("查询抢答成功的组请求:{}", topic); + Object o = redisUtil.get(topic.getProjectId() + Constant.Redis.RESPONDER + topic.getTopicId()); + log.info("缓存:{}", o); + if (o!=null) { + MtGroup mtGroup = mtGroupMapper.selectByPrimaryKey((long)(int)o); + if (mtGroup == null) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + TopicVo.GroupInfo info = new TopicVo.GroupInfo(); + info.setGroupId(mtGroup.getId()); + info.setGroupName(mtGroup.getName()); + return info; + } + TopicVo.GroupInfo info = groupDao.getResponder(topic); + log.info("查询抢答成功的组:{}", info); + return info; + } + + @Override + public List queryTopicAllByLink(TopicDto.GetTopicAll getTopicAll) { + log.info("查询所有绝地反击类型的题请求参数:{}", getTopicAll); + List list = topicDao.queryTopicAllByLink(getTopicAll); + log.info("所有绝地反击题:{}", list); + return list; + } + + @Override + public CodeEnum promoted(List promotes) { + + promotes.forEach(promoted -> { + MtGroup mtGroup = new MtGroup(); + mtGroup.setId(promoted.getGroupId()); + mtGroup.setAdvanceStatus(promoted.getLinkTypes()); + mtGroupMapper.updateByPrimaryKeySelective(mtGroup); + }); + return CodeEnum.SUCCESS; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/service/UserService.java b/mt/src/main/java/com/ccsens/mt/service/UserService.java index 28ba0c3a..524ad55b 100644 --- a/mt/src/main/java/com/ccsens/mt/service/UserService.java +++ b/mt/src/main/java/com/ccsens/mt/service/UserService.java @@ -10,11 +10,14 @@ import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; @Slf4j @Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class UserService implements IUserService{ @Autowired private TallFeignClient tallFeignClient; diff --git a/mt/src/main/java/com/ccsens/mt/service/VideoService.java b/mt/src/main/java/com/ccsens/mt/service/VideoService.java new file mode 100644 index 00000000..a7629550 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/VideoService.java @@ -0,0 +1,95 @@ +package com.ccsens.mt.service; + + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import com.ccsens.mt.bean.dto.VideoDto; +import com.ccsens.mt.bean.po.CompeteVideo; +import com.ccsens.mt.bean.po.CompeteVideoExample; +import com.ccsens.mt.bean.vo.VideoVo; +import com.ccsens.mt.persist.mapper.CompeteVideoMapper; +import com.ccsens.util.bean.dto.QueryDto; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class VideoService implements IVideoService{ + @Resource + private Snowflake snowflake; + @Resource + private CompeteVideoMapper competeVideoMapper; + + /** + * 查看某个用户上传的比赛视频信息 + * @param params 比赛id和选手id + * @return 返回上传到视频文件信息 + */ + @Override + public List getVideoByPlayerId(QueryDto params) { + VideoDto.GetVideo getVideo = params.getParam(); + List getVideoInfoList = new ArrayList<>(); + CompeteVideoExample videoExample = new CompeteVideoExample(); + videoExample.createCriteria().andCompeteCodeEqualTo(getVideo.getCompeteCode()).andCompeteTimeIdEqualTo(getVideo.getCompeteTimeId()) + .andPlayerIdEqualTo(getVideo.getPlayerId()); + List competeVideoList = competeVideoMapper.selectByExample(videoExample); + if(CollectionUtil.isNotEmpty(competeVideoList)){ + competeVideoList.forEach(competeVideo -> { + VideoVo.GetVideoInfo getVideoInfo = new VideoVo.GetVideoInfo(); + getVideoInfo.setFileId(competeVideo.getFileId()); + getVideoInfo.setVideoId(competeVideo.getId()); + getVideoInfo.setUploadTime(competeVideo.getTime()); + getVideoInfoList.add(getVideoInfo); + }); + } + return getVideoInfoList; + } + + /** + * 选手上传比赛视频信息 + * @param params 选手id或团队id + * @return + */ + @Override + public List uploadVideo(QueryDto params) { + VideoDto.UploadVideo uploadVideo = params.getParam(); + //将视频信息储存数据库 + CompeteVideo competeVideo = new CompeteVideo(); + competeVideo.setId(snowflake.nextId()); + competeVideo.setCompeteCode(uploadVideo.getCompeteCode()); + competeVideo.setCompeteTimeId(uploadVideo.getCompeteTimeId()); + competeVideo.setTeam(uploadVideo.getTeam()); + competeVideo.setPlayerId(uploadVideo.getPlayerId()); + competeVideo.setFileId(uploadVideo.getVideoFileId()); + competeVideo.setVideoUrl(uploadVideo.getVideoFileUrl()); + competeVideo.setUploadUserId(params.getUserId()); + competeVideo.setTime(System.currentTimeMillis()); + competeVideoMapper.insertSelective(competeVideo); + //返回 + List getVideoInfoList = new ArrayList<>(); + CompeteVideoExample videoExample = new CompeteVideoExample(); + videoExample.createCriteria().andCompeteCodeEqualTo(uploadVideo.getCompeteCode()).andCompeteTimeIdEqualTo(uploadVideo.getCompeteTimeId()) + .andPlayerIdEqualTo(uploadVideo.getPlayerId()); + List competeVideoList = competeVideoMapper.selectByExample(videoExample); + if(CollectionUtil.isNotEmpty(competeVideoList)){ + competeVideoList.forEach(video -> { + VideoVo.GetVideoInfo getVideoInfo = new VideoVo.GetVideoInfo(); + getVideoInfo.setFileId(video.getFileId()); + getVideoInfo.setVideoId(video.getId()); + getVideoInfo.setUploadTime(video.getTime()); + getVideoInfoList.add(getVideoInfo); + }); + } + return getVideoInfoList; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/service/VoteService.java b/mt/src/main/java/com/ccsens/mt/service/VoteService.java new file mode 100644 index 00000000..9eb1c4a6 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/VoteService.java @@ -0,0 +1,113 @@ +package com.ccsens.mt.service; + +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.mt.bean.dto.TopicDto; +import com.ccsens.mt.bean.po.MtGroup; +import com.ccsens.mt.bean.po.MtVote; +import com.ccsens.mt.bean.vo.VoteVo; +import com.ccsens.mt.persist.dao.VoteDao; +import com.ccsens.mt.persist.mapper.MtGroupMapper; +import com.ccsens.mt.util.Constant; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.RedisUtil; +import com.ccsens.util.bean.dto.QueryDto; +import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.concurrent.BasicThreadFactory; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class VoteService implements IVoteService{ + + @Resource + private VoteDao voteDao; + @Resource + private MtGroupMapper mtGroupMapper; + @Resource + private Snowflake snowflake; + @Resource + private RedisUtil redisUtil; + + @Override + public void startVote(QueryDto params) { + TopicDto.Project project = params.getParam(); + if(ObjectUtil.isNull(project)){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } + redisUtil.set(project.getProjectId()+ Constant.Redis.START_VOTE,1, Constant.Redis.VOTE_TIME); + + ScheduledExecutorService executorService = new ScheduledThreadPoolExecutor(Constant.Redis.VOTE_START, + new BasicThreadFactory.Builder().namingPattern("example-schedule-pool-%d").daemon(true).build()); + executorService.schedule(new Thread(new Runnable() { + @Override + public void run() { + redisUtil.set(project.getProjectId()+ Constant.Redis.START_VOTE,Constant.Redis.VOTE_COMPLETED, Constant.Redis.VOTE_TIME); + } + }), Constant.Redis.VOTE_TIME_OUT, TimeUnit.MILLISECONDS); + } + + @Override + public void saveVote(QueryDto> params) { + Long projectId = null; + List groups = params.getParam(); + + //获取项目ID,并校验参数 + if (groups == null || groups.size() != Constant.VOTE_TOTAL) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + for (TopicDto.Group group: groups) { + if (group == null || group.getGroupId() == null) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + MtGroup mtGroup = mtGroupMapper.selectByPrimaryKey(group.getGroupId()); + if (mtGroup == null) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + if (projectId == null) { + projectId = mtGroup.getProjectId(); + } else { + if (projectId.longValue() != mtGroup.getProjectId().longValue()) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + } + } + // 检查投票时间是否有效 + Object o = redisUtil.get(projectId + Constant.Redis.START_VOTE); + if(ObjectUtil.isNull(o)){ + throw new BaseException(CodeEnum.VOTE_NOT_START); + }else if((int)o == Constant.Redis.VOTE_COMPLETED){ + throw new BaseException(CodeEnum.VOTE_COMPLETED); + } + // 判断是否在当前项目中已投 + long count = voteDao.countUserVoteNums(params.getUserId(), projectId); + log.info("{}-{}投票数:{}", params.getUserId(), projectId, count); + if (count > 0) { + throw new BaseException(CodeEnum.VOTED); + } + groups.forEach(group -> { + MtVote mtVote = new MtVote(); + mtVote.setId(snowflake.nextId()); + mtVote.setGroupId(group.getGroupId()); + mtVote.setUserId(params.getUserId()); + voteDao.insertSelective(mtVote); + }); + } + + @Override + public List queryVote(TopicDto.Project params) { + + + return voteDao.queryVote(params); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/util/Constant.java b/mt/src/main/java/com/ccsens/mt/util/Constant.java new file mode 100644 index 00000000..394481f1 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/util/Constant.java @@ -0,0 +1,66 @@ +package com.ccsens.mt.util; + +/** + * @description: + * @author: whj + * @time: 2020/8/13 17:14 + */ +public class Constant { + public static class Redis{ + // 项目正在进行中的题目 项目ID_start_question + public final static String START_QUESTION = "_start_question"; + // 抢答有效期10分钟 + public final static long TIME_OUT = 10 * 60; + // 抢答成功的队伍 项目ID_responder_题目ID + public final static String RESPONDER = "_responder_"; + // 开始投票 + public final static String START_VOTE = "_start_vote"; + // 投票有效期3分钟 + public final static long VOTE_TIME_OUT = 3 * 60 * 1000; + // 投票存在时间一天 + public final static long VOTE_TIME = 24 * 60 * 60; + //投票未开始 + public final static int VOTE_COMPLETED = 2; + //投票已结束 + public final static int VOTE_START = 1; + // 远程比赛参赛单位 + public final static String COMPETE_COMPANY = "_compete_company"; + // 远程比赛参赛单位存在时间10天 + public final static long COMPETE_COMPANY_TIME = 10 * 24 * 60 * 60; + // 远程比赛参赛单位 + public final static String COMPETE_LEVEL = "compete_"; + } + + public static final int VOTE_TOTAL = 2; + + public final static class Compete{ + public final static byte PROJECT_JOIN_RULE_GROUP_LIMIT = 0; + public final static byte PROJECT_JOIN_RULE_GROUP_NOT_LIMIT = 1; + public final static byte GENDER_GROUP_WOMAN = 0; + public final static byte GENDER_GROUP_MAN = 1; + public final static byte GENDER_GROUP_MIX = 2; + public final static byte TEAM_LEADER_YES = 1; + public final static byte TEAM_LEADER_NO = 0; + public final static byte TEAM_NO = 0; + public final static byte TEAM_YES = 1; + public final static int TIWN_MAX_NUM = 3; + } + + public static class File{ + public static final String UPLOAD_URL = "upload"; + } + public final static class LevelUp{ + //不晋级 + public final static byte RULE_NO = 0; + //根据名次晋级(不重复) + public final static byte RULE_RANK_NO_REPEAT = 1; + //根据名次晋级(可以重复) + public final static byte RULE_RANK_REPEAT = 2; + //根据分数晋级 + public final static byte RULE_SCORE = 3; + //指定晋级人员 + public final static byte RULE_APPOINT = 4; + //团体赛按名次 + public final static byte RULE_TEAM_RANK = 5; + } +} diff --git a/mt/src/main/resources/application-dev.yml b/mt/src/main/resources/application-dev.yml index 096c3432..3121478b 100644 --- a/mt/src/main/resources/application-dev.yml +++ b/mt/src/main/resources/application-dev.yml @@ -8,7 +8,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: - host: api.ccsens.com + host: 81.70.54.64 password: 111111 port: 5672 username: admin @@ -26,4 +26,8 @@ spring: timeout: 1000ms swagger: enable: true - +file: + path: /home/cloud/mt/uploads/ + signUpUrl: https://test.tall.wiki/compete/ + domain: https://test.tall.wiki/gateway/mt/ + imgDomain: https://test.tall.wiki/gateway/mt/uploads/ diff --git a/mt/src/main/resources/application-prod.yml b/mt/src/main/resources/application-prod.yml new file mode 100644 index 00000000..a262e849 --- /dev/null +++ b/mt/src/main/resources/application-prod.yml @@ -0,0 +1,39 @@ +server: + port: 7060 + servlet: + context-path: +spring: + application: + name: mt + datasource: + type: com.alibaba.druid.pool.DruidDataSource + rabbitmq: + host: 127.0.0.1 + password: 111111 + port: 5672 + username: admin + redis: + database: 0 + host: 127.0.0.1 + jedis: + pool: + max-active: 200 + max-idle: 10 + max-wait: -1ms + min-idle: 0 + password: '' + port: 6379 + timeout: 1000ms +swagger: + enable: true +eureka: + instance: + ip-address: 192.144.182.42 + +gatewayUrl: https://www.tall.wiki/gateway/ +notGatewayUrl: https://www.tall.wiki/ +file: + path: /home/cloud/mt/uploads/ + signUpUrl: https://www.tall.wiki/compete/ + domain: https://www.tall.wiki/gateway/mt/ + imgDomain: https://www.tall.wiki/gateway/mt/uploads/ \ No newline at end of file diff --git a/mt/src/main/resources/application-test.yml b/mt/src/main/resources/application-test.yml index f2448086..5130b7a9 100644 --- a/mt/src/main/resources/application-test.yml +++ b/mt/src/main/resources/application-test.yml @@ -8,7 +8,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: - host: api.ccsens.com + host: 127.0.0.1 password: 111111 port: 5672 username: admin @@ -28,4 +28,9 @@ swagger: enable: true eureka: instance: - ip-address: 49.233.89.188 \ No newline at end of file + ip-address: 192.168.0.99 +file: + path: /home/cloud/mt/uploads/ + signUpUrl: https://test.tall.wiki/compete/ + domain: https://test.tall.wiki/gateway/mt/ + imgDomain: https://test.tall.wiki/gateway/mt/uploads/ diff --git a/mt/src/main/resources/application.yml b/mt/src/main/resources/application.yml index 5889ff7f..d082c0ea 100644 --- a/mt/src/main/resources/application.yml +++ b/mt/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: test - include: common, util-test \ No newline at end of file + active: prod + include: common, util-prod \ No newline at end of file diff --git a/mt/src/main/resources/druid-test.yml b/mt/src/main/resources/druid-test.yml index 56cd9c56..246a2cb8 100644 --- a/mt/src/main/resources/druid-test.yml +++ b/mt/src/main/resources/druid-test.yml @@ -15,7 +15,7 @@ spring: maxWait: 60000 minEvictableIdleTimeMillis: 300000 minIdle: 5 - password: + password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 poolPreparedStatements: true servletLogSlowSql: true servletLoginPassword: 111111 @@ -27,7 +27,7 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://127.0.0.1/mt?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://test.tall.wiki/mt?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL - env: CCSENS_GAME \ No newline at end of file + env: CCSENS_TALL \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml b/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml new file mode 100644 index 00000000..67511fee --- /dev/null +++ b/mt/src/main/resources/mapper_dao/CompetePlayerDao.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/CompeteTeamDao.xml b/mt/src/main/resources/mapper_dao/CompeteTeamDao.xml new file mode 100644 index 00000000..b920154e --- /dev/null +++ b/mt/src/main/resources/mapper_dao/CompeteTeamDao.xml @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/CompeteTimeDao.xml b/mt/src/main/resources/mapper_dao/CompeteTimeDao.xml new file mode 100644 index 00000000..53ed4b2e --- /dev/null +++ b/mt/src/main/resources/mapper_dao/CompeteTimeDao.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/GroupDao.xml b/mt/src/main/resources/mapper_dao/GroupDao.xml new file mode 100644 index 00000000..9bc3814e --- /dev/null +++ b/mt/src/main/resources/mapper_dao/GroupDao.xml @@ -0,0 +1,24 @@ + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/LevelUpDao.xml b/mt/src/main/resources/mapper_dao/LevelUpDao.xml new file mode 100644 index 00000000..c7b82fd3 --- /dev/null +++ b/mt/src/main/resources/mapper_dao/LevelUpDao.xml @@ -0,0 +1,30 @@ + + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/TopicDao.xml b/mt/src/main/resources/mapper_dao/TopicDao.xml new file mode 100644 index 00000000..bd23891c --- /dev/null +++ b/mt/src/main/resources/mapper_dao/TopicDao.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_dao/VoteDao.xml b/mt/src/main/resources/mapper_dao/VoteDao.xml new file mode 100644 index 00000000..90278094 --- /dev/null +++ b/mt/src/main/resources/mapper_dao/VoteDao.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CommonFileMapper.xml b/mt/src/main/resources/mapper_raw/CommonFileMapper.xml new file mode 100644 index 00000000..eb2e9080 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CommonFileMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, file_name, location, visit_location, created_at, updated_at, rec_status + + + + + delete from t_common_file + where id = #{id,jdbcType=BIGINT} + + + delete from t_common_file + + + + + + insert into t_common_file (id, user_id, file_name, + location, visit_location, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{fileName,jdbcType=VARCHAR}, + #{location,jdbcType=VARCHAR}, #{visitLocation,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_common_file + + + id, + + + user_id, + + + file_name, + + + location, + + + visit_location, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{fileName,jdbcType=VARCHAR}, + + + #{location,jdbcType=VARCHAR}, + + + #{visitLocation,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_common_file + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + file_name = #{record.fileName,jdbcType=VARCHAR}, + + + location = #{record.location,jdbcType=VARCHAR}, + + + visit_location = #{record.visitLocation,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_common_file + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + file_name = #{record.fileName,jdbcType=VARCHAR}, + location = #{record.location,jdbcType=VARCHAR}, + visit_location = #{record.visitLocation,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_common_file + + + user_id = #{userId,jdbcType=BIGINT}, + + + file_name = #{fileName,jdbcType=VARCHAR}, + + + location = #{location,jdbcType=VARCHAR}, + + + visit_location = #{visitLocation,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_common_file + set user_id = #{userId,jdbcType=BIGINT}, + file_name = #{fileName,jdbcType=VARCHAR}, + location = #{location,jdbcType=VARCHAR}, + visit_location = #{visitLocation,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteCompanyMapper.xml b/mt/src/main/resources/mapper_raw/CompeteCompanyMapper.xml new file mode 100644 index 00000000..3dfa84ff --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteCompanyMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, type, created_at, updated_at, rec_status + + + + + delete from t_compete_company + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_company + + + + + + insert into t_compete_company (id, name, type, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_compete_company + + + id, + + + name, + + + type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{type,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_company + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + type = #{record.type,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_company + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_company + + + name = #{name,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_company + set name = #{name,jdbcType=VARCHAR}, + type = #{type,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteCompanyRoleMapper.xml b/mt/src/main/resources/mapper_raw/CompeteCompanyRoleMapper.xml new file mode 100644 index 00000000..4a354c5d --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteCompanyRoleMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, player_id, compete_company_id, type, created_at, updated_at, rec_status + + + + + delete from t_compete_company_role + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_company_role + + + + + + insert into t_compete_company_role (id, player_id, compete_company_id, + type, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{competeCompanyId,jdbcType=BIGINT}, + #{type,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_company_role + + + id, + + + player_id, + + + compete_company_id, + + + type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{playerId,jdbcType=BIGINT}, + + + #{competeCompanyId,jdbcType=BIGINT}, + + + #{type,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_company_role + + + id = #{record.id,jdbcType=BIGINT}, + + + player_id = #{record.playerId,jdbcType=BIGINT}, + + + compete_company_id = #{record.competeCompanyId,jdbcType=BIGINT}, + + + type = #{record.type,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_company_role + set id = #{record.id,jdbcType=BIGINT}, + player_id = #{record.playerId,jdbcType=BIGINT}, + compete_company_id = #{record.competeCompanyId,jdbcType=BIGINT}, + type = #{record.type,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_company_role + + + player_id = #{playerId,jdbcType=BIGINT}, + + + compete_company_id = #{competeCompanyId,jdbcType=BIGINT}, + + + type = #{type,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_company_role + set player_id = #{playerId,jdbcType=BIGINT}, + compete_company_id = #{competeCompanyId,jdbcType=BIGINT}, + type = #{type,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteGroupMapper.xml b/mt/src/main/resources/mapper_raw/CompeteGroupMapper.xml new file mode 100644 index 00000000..b2e907c5 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteGroupMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, group_name, description, start_age, end_age, sequence, type, created_at, updated_at, + rec_status + + + + + delete from t_compete_group + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_group + + + + + + insert into t_compete_group (id, group_name, description, + start_age, end_age, sequence, + type, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{groupName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{startAge,jdbcType=INTEGER}, #{endAge,jdbcType=INTEGER}, #{sequence,jdbcType=INTEGER}, + #{type,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_group + + + id, + + + group_name, + + + description, + + + start_age, + + + end_age, + + + sequence, + + + type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{groupName,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{startAge,jdbcType=INTEGER}, + + + #{endAge,jdbcType=INTEGER}, + + + #{sequence,jdbcType=INTEGER}, + + + #{type,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_group + + + id = #{record.id,jdbcType=BIGINT}, + + + group_name = #{record.groupName,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + start_age = #{record.startAge,jdbcType=INTEGER}, + + + end_age = #{record.endAge,jdbcType=INTEGER}, + + + sequence = #{record.sequence,jdbcType=INTEGER}, + + + type = #{record.type,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_group + set id = #{record.id,jdbcType=BIGINT}, + group_name = #{record.groupName,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + start_age = #{record.startAge,jdbcType=INTEGER}, + end_age = #{record.endAge,jdbcType=INTEGER}, + sequence = #{record.sequence,jdbcType=INTEGER}, + type = #{record.type,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_group + + + group_name = #{groupName,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + start_age = #{startAge,jdbcType=INTEGER}, + + + end_age = #{endAge,jdbcType=INTEGER}, + + + sequence = #{sequence,jdbcType=INTEGER}, + + + type = #{type,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_group + set group_name = #{groupName,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + start_age = #{startAge,jdbcType=INTEGER}, + end_age = #{endAge,jdbcType=INTEGER}, + sequence = #{sequence,jdbcType=INTEGER}, + type = #{type,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompetePlayerFamilyMapper.xml b/mt/src/main/resources/mapper_raw/CompetePlayerFamilyMapper.xml new file mode 100644 index 00000000..1e18a9e6 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompetePlayerFamilyMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, player_id, children_id, description, created_at, updated_at, rec_status + + + + + delete from t_compete_player_family + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_player_family + + + + + + insert into t_compete_player_family (id, player_id, children_id, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{childrenId,jdbcType=BIGINT}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_player_family + + + id, + + + player_id, + + + children_id, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{playerId,jdbcType=BIGINT}, + + + #{childrenId,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_player_family + + + id = #{record.id,jdbcType=BIGINT}, + + + player_id = #{record.playerId,jdbcType=BIGINT}, + + + children_id = #{record.childrenId,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_player_family + set id = #{record.id,jdbcType=BIGINT}, + player_id = #{record.playerId,jdbcType=BIGINT}, + children_id = #{record.childrenId,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_player_family + + + player_id = #{playerId,jdbcType=BIGINT}, + + + children_id = #{childrenId,jdbcType=BIGINT}, + + + description = #{description,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_player_family + set player_id = #{playerId,jdbcType=BIGINT}, + children_id = #{childrenId,jdbcType=BIGINT}, + description = #{description,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompetePlayerMapper.xml b/mt/src/main/resources/mapper_raw/CompetePlayerMapper.xml new file mode 100644 index 00000000..fcf5a501 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompetePlayerMapper.xml @@ -0,0 +1,386 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, name, id_card, phone, gender, id_card_front, id_card_back, prove_img, + compete_group_id, company_id, authorization, created_at, updated_at, rec_status, + compete_time_id + + + + + delete from t_compete_player + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_player + + + + + + insert into t_compete_player (id, user_id, name, + id_card, phone, gender, + id_card_front, id_card_back, prove_img, + compete_group_id, company_id, authorization, + created_at, updated_at, rec_status, + compete_time_id) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, + #{idCard,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, + #{idCardFront,jdbcType=VARCHAR}, #{idCardBack,jdbcType=VARCHAR}, #{proveImg,jdbcType=VARCHAR}, + #{competeGroupId,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{authorization,jdbcType=TINYINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, + #{competeTimeId,jdbcType=BIGINT}) + + + insert into t_compete_player + + + id, + + + user_id, + + + name, + + + id_card, + + + phone, + + + gender, + + + id_card_front, + + + id_card_back, + + + prove_img, + + + compete_group_id, + + + company_id, + + + authorization, + + + created_at, + + + updated_at, + + + rec_status, + + + compete_time_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{idCard,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{gender,jdbcType=TINYINT}, + + + #{idCardFront,jdbcType=VARCHAR}, + + + #{idCardBack,jdbcType=VARCHAR}, + + + #{proveImg,jdbcType=VARCHAR}, + + + #{competeGroupId,jdbcType=BIGINT}, + + + #{companyId,jdbcType=BIGINT}, + + + #{authorization,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{competeTimeId,jdbcType=BIGINT}, + + + + + + update t_compete_player + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + id_card = #{record.idCard,jdbcType=VARCHAR}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + gender = #{record.gender,jdbcType=TINYINT}, + + + id_card_front = #{record.idCardFront,jdbcType=VARCHAR}, + + + id_card_back = #{record.idCardBack,jdbcType=VARCHAR}, + + + prove_img = #{record.proveImg,jdbcType=VARCHAR}, + + + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + authorization = #{record.authorization,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + + + + + + + + update t_compete_player + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + id_card = #{record.idCard,jdbcType=VARCHAR}, + phone = #{record.phone,jdbcType=VARCHAR}, + gender = #{record.gender,jdbcType=TINYINT}, + id_card_front = #{record.idCardFront,jdbcType=VARCHAR}, + id_card_back = #{record.idCardBack,jdbcType=VARCHAR}, + prove_img = #{record.proveImg,jdbcType=VARCHAR}, + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + authorization = #{record.authorization,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT} + + + + + + update t_compete_player + + + user_id = #{userId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + id_card = #{idCard,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + gender = #{gender,jdbcType=TINYINT}, + + + id_card_front = #{idCardFront,jdbcType=VARCHAR}, + + + id_card_back = #{idCardBack,jdbcType=VARCHAR}, + + + prove_img = #{proveImg,jdbcType=VARCHAR}, + + + compete_group_id = #{competeGroupId,jdbcType=BIGINT}, + + + company_id = #{companyId,jdbcType=BIGINT}, + + + authorization = #{authorization,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_player + set user_id = #{userId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + id_card = #{idCard,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + gender = #{gender,jdbcType=TINYINT}, + id_card_front = #{idCardFront,jdbcType=VARCHAR}, + id_card_back = #{idCardBack,jdbcType=VARCHAR}, + prove_img = #{proveImg,jdbcType=VARCHAR}, + compete_group_id = #{competeGroupId,jdbcType=BIGINT}, + company_id = #{companyId,jdbcType=BIGINT}, + authorization = #{authorization,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + compete_time_id = #{competeTimeId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteProjectGroupMapper.xml b/mt/src/main/resources/mapper_raw/CompeteProjectGroupMapper.xml new file mode 100644 index 00000000..2f6aa71d --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteProjectGroupMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, group_id, description, created_at, updated_at, rec_status + + + + + delete from t_compete_project_group + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_project_group + + + + + + insert into t_compete_project_group (id, project_id, group_id, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{groupId,jdbcType=BIGINT}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_project_group + + + id, + + + project_id, + + + group_id, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{groupId,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_project_group + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + group_id = #{record.groupId,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_project_group + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + group_id = #{record.groupId,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_project_group + + + project_id = #{projectId,jdbcType=BIGINT}, + + + group_id = #{groupId,jdbcType=BIGINT}, + + + description = #{description,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_project_group + set project_id = #{projectId,jdbcType=BIGINT}, + group_id = #{groupId,jdbcType=BIGINT}, + description = #{description,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteProjectMapper.xml b/mt/src/main/resources/mapper_raw/CompeteProjectMapper.xml new file mode 100644 index 00000000..8fdb82da --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteProjectMapper.xml @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, parent_id, level, team, join_rule, certificate, member_min, member_max, + type, created_at, updated_at, rec_status + + + + + delete from t_compete_project + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_project + + + + + + insert into t_compete_project (id, name, parent_id, + level, team, join_rule, + certificate, member_min, member_max, + type, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{parentId,jdbcType=BIGINT}, + #{level,jdbcType=TINYINT}, #{team,jdbcType=TINYINT}, #{joinRule,jdbcType=TINYINT}, + #{certificate,jdbcType=TINYINT}, #{memberMin,jdbcType=INTEGER}, #{memberMax,jdbcType=INTEGER}, + #{type,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_project + + + id, + + + name, + + + parent_id, + + + level, + + + team, + + + join_rule, + + + certificate, + + + member_min, + + + member_max, + + + type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=BIGINT}, + + + #{level,jdbcType=TINYINT}, + + + #{team,jdbcType=TINYINT}, + + + #{joinRule,jdbcType=TINYINT}, + + + #{certificate,jdbcType=TINYINT}, + + + #{memberMin,jdbcType=INTEGER}, + + + #{memberMax,jdbcType=INTEGER}, + + + #{type,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_project + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + level = #{record.level,jdbcType=TINYINT}, + + + team = #{record.team,jdbcType=TINYINT}, + + + join_rule = #{record.joinRule,jdbcType=TINYINT}, + + + certificate = #{record.certificate,jdbcType=TINYINT}, + + + member_min = #{record.memberMin,jdbcType=INTEGER}, + + + member_max = #{record.memberMax,jdbcType=INTEGER}, + + + type = #{record.type,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_project + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + level = #{record.level,jdbcType=TINYINT}, + team = #{record.team,jdbcType=TINYINT}, + join_rule = #{record.joinRule,jdbcType=TINYINT}, + certificate = #{record.certificate,jdbcType=TINYINT}, + member_min = #{record.memberMin,jdbcType=INTEGER}, + member_max = #{record.memberMax,jdbcType=INTEGER}, + type = #{record.type,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_project + + + name = #{name,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=BIGINT}, + + + level = #{level,jdbcType=TINYINT}, + + + team = #{team,jdbcType=TINYINT}, + + + join_rule = #{joinRule,jdbcType=TINYINT}, + + + certificate = #{certificate,jdbcType=TINYINT}, + + + member_min = #{memberMin,jdbcType=INTEGER}, + + + member_max = #{memberMax,jdbcType=INTEGER}, + + + type = #{type,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_project + set name = #{name,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=BIGINT}, + level = #{level,jdbcType=TINYINT}, + team = #{team,jdbcType=TINYINT}, + join_rule = #{joinRule,jdbcType=TINYINT}, + certificate = #{certificate,jdbcType=TINYINT}, + member_min = #{memberMin,jdbcType=INTEGER}, + member_max = #{memberMax,jdbcType=INTEGER}, + type = #{type,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteProjectPlayerMapper.xml b/mt/src/main/resources/mapper_raw/CompeteProjectPlayerMapper.xml new file mode 100644 index 00000000..d26c89b2 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteProjectPlayerMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, player_id, project_id, compete_time_id, gender_group, certificate, created_at, + updated_at, rec_status, compete_group_id + + + + + delete from t_compete_project_player + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_project_player + + + + + + insert into t_compete_project_player (id, player_id, project_id, + compete_time_id, gender_group, certificate, + created_at, updated_at, rec_status, + compete_group_id) + values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{competeTimeId,jdbcType=BIGINT}, #{genderGroup,jdbcType=TINYINT}, #{certificate,jdbcType=TINYINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, + #{competeGroupId,jdbcType=BIGINT}) + + + insert into t_compete_project_player + + + id, + + + player_id, + + + project_id, + + + compete_time_id, + + + gender_group, + + + certificate, + + + created_at, + + + updated_at, + + + rec_status, + + + compete_group_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{playerId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{competeTimeId,jdbcType=BIGINT}, + + + #{genderGroup,jdbcType=TINYINT}, + + + #{certificate,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{competeGroupId,jdbcType=BIGINT}, + + + + + + update t_compete_project_player + + + id = #{record.id,jdbcType=BIGINT}, + + + player_id = #{record.playerId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + + + gender_group = #{record.genderGroup,jdbcType=TINYINT}, + + + certificate = #{record.certificate,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, + + + + + + + + update t_compete_project_player + set id = #{record.id,jdbcType=BIGINT}, + player_id = #{record.playerId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + gender_group = #{record.genderGroup,jdbcType=TINYINT}, + certificate = #{record.certificate,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT} + + + + + + update t_compete_project_player + + + player_id = #{playerId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + + + gender_group = #{genderGroup,jdbcType=TINYINT}, + + + certificate = #{certificate,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + compete_group_id = #{competeGroupId,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_project_player + set player_id = #{playerId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + gender_group = #{genderGroup,jdbcType=TINYINT}, + certificate = #{certificate,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + compete_group_id = #{competeGroupId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteTeamMapper.xml b/mt/src/main/resources/mapper_raw/CompeteTeamMapper.xml new file mode 100644 index 00000000..056b0b81 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteTeamMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, creator, project_id, compete_time_id, gender_group, certificate, qr_code, created_at, + updated_at, rec_status, compete_group_id + + + + + delete from t_compete_team + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_team + + + + + + insert into t_compete_team (id, creator, project_id, + compete_time_id, gender_group, certificate, + qr_code, created_at, updated_at, + rec_status, compete_group_id) + values (#{id,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{competeTimeId,jdbcType=BIGINT}, #{genderGroup,jdbcType=TINYINT}, #{certificate,jdbcType=TINYINT}, + #{qrCode,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}, #{competeGroupId,jdbcType=BIGINT}) + + + insert into t_compete_team + + + id, + + + creator, + + + project_id, + + + compete_time_id, + + + gender_group, + + + certificate, + + + qr_code, + + + created_at, + + + updated_at, + + + rec_status, + + + compete_group_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{creator,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{competeTimeId,jdbcType=BIGINT}, + + + #{genderGroup,jdbcType=TINYINT}, + + + #{certificate,jdbcType=TINYINT}, + + + #{qrCode,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{competeGroupId,jdbcType=BIGINT}, + + + + + + update t_compete_team + + + id = #{record.id,jdbcType=BIGINT}, + + + creator = #{record.creator,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + + + gender_group = #{record.genderGroup,jdbcType=TINYINT}, + + + certificate = #{record.certificate,jdbcType=TINYINT}, + + + qr_code = #{record.qrCode,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, + + + + + + + + update t_compete_team + set id = #{record.id,jdbcType=BIGINT}, + creator = #{record.creator,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + gender_group = #{record.genderGroup,jdbcType=TINYINT}, + certificate = #{record.certificate,jdbcType=TINYINT}, + qr_code = #{record.qrCode,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + compete_group_id = #{record.competeGroupId,jdbcType=BIGINT} + + + + + + update t_compete_team + + + creator = #{creator,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + + + gender_group = #{genderGroup,jdbcType=TINYINT}, + + + certificate = #{certificate,jdbcType=TINYINT}, + + + qr_code = #{qrCode,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + compete_group_id = #{competeGroupId,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_team + set creator = #{creator,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + gender_group = #{genderGroup,jdbcType=TINYINT}, + certificate = #{certificate,jdbcType=TINYINT}, + qr_code = #{qrCode,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + compete_group_id = #{competeGroupId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteTeamMemberMapper.xml b/mt/src/main/resources/mapper_raw/CompeteTeamMemberMapper.xml new file mode 100644 index 00000000..8e217ac1 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteTeamMemberMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, player_id, compete_team_id, captain, created_at, updated_at, rec_status + + + + + delete from t_compete_team_member + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_team_member + + + + + + insert into t_compete_team_member (id, player_id, compete_team_id, + captain, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{competeTeamId,jdbcType=BIGINT}, + #{captain,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_team_member + + + id, + + + player_id, + + + compete_team_id, + + + captain, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{playerId,jdbcType=BIGINT}, + + + #{competeTeamId,jdbcType=BIGINT}, + + + #{captain,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_team_member + + + id = #{record.id,jdbcType=BIGINT}, + + + player_id = #{record.playerId,jdbcType=BIGINT}, + + + compete_team_id = #{record.competeTeamId,jdbcType=BIGINT}, + + + captain = #{record.captain,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_team_member + set id = #{record.id,jdbcType=BIGINT}, + player_id = #{record.playerId,jdbcType=BIGINT}, + compete_team_id = #{record.competeTeamId,jdbcType=BIGINT}, + captain = #{record.captain,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_team_member + + + player_id = #{playerId,jdbcType=BIGINT}, + + + compete_team_id = #{competeTeamId,jdbcType=BIGINT}, + + + captain = #{captain,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_team_member + set player_id = #{playerId,jdbcType=BIGINT}, + compete_team_id = #{competeTeamId,jdbcType=BIGINT}, + captain = #{captain,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteTimeMapper.xml b/mt/src/main/resources/mapper_raw/CompeteTimeMapper.xml new file mode 100644 index 00000000..0fac5ae5 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteTimeMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, type, start_time, end_time, sign_up_start_time, sign_up_end_time, compete_status, + created_at, updated_at, rec_status + + + + + delete from t_compete_time + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_time + + + + + + insert into t_compete_time (id, name, type, + start_time, end_time, sign_up_start_time, + sign_up_end_time, compete_status, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, + #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{signUpStartTime,jdbcType=BIGINT}, + #{signUpEndTime,jdbcType=BIGINT}, #{competeStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_compete_time + + + id, + + + name, + + + type, + + + start_time, + + + end_time, + + + sign_up_start_time, + + + sign_up_end_time, + + + compete_status, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{type,jdbcType=TINYINT}, + + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + #{signUpStartTime,jdbcType=BIGINT}, + + + #{signUpEndTime,jdbcType=BIGINT}, + + + #{competeStatus,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_time + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + type = #{record.type,jdbcType=TINYINT}, + + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + sign_up_start_time = #{record.signUpStartTime,jdbcType=BIGINT}, + + + sign_up_end_time = #{record.signUpEndTime,jdbcType=BIGINT}, + + + compete_status = #{record.competeStatus,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_time + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=TINYINT}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, + sign_up_start_time = #{record.signUpStartTime,jdbcType=BIGINT}, + sign_up_end_time = #{record.signUpEndTime,jdbcType=BIGINT}, + compete_status = #{record.competeStatus,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_time + + + name = #{name,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=TINYINT}, + + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + sign_up_start_time = #{signUpStartTime,jdbcType=BIGINT}, + + + sign_up_end_time = #{signUpEndTime,jdbcType=BIGINT}, + + + compete_status = #{competeStatus,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_time + set name = #{name,jdbcType=VARCHAR}, + type = #{type,jdbcType=TINYINT}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, + sign_up_start_time = #{signUpStartTime,jdbcType=BIGINT}, + sign_up_end_time = #{signUpEndTime,jdbcType=BIGINT}, + compete_status = #{competeStatus,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/CompeteVideoMapper.xml b/mt/src/main/resources/mapper_raw/CompeteVideoMapper.xml new file mode 100644 index 00000000..541d081e --- /dev/null +++ b/mt/src/main/resources/mapper_raw/CompeteVideoMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, compete_time_id, compete_code, team, player_id, file_id, video_url, time, upload_user_id, + created_at, updated_at, rec_status + + + + + delete from t_compete_video + where id = #{id,jdbcType=BIGINT} + + + delete from t_compete_video + + + + + + insert into t_compete_video (id, compete_time_id, compete_code, + team, player_id, file_id, + video_url, time, upload_user_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT}, #{competeCode,jdbcType=VARCHAR}, + #{team,jdbcType=TINYINT}, #{playerId,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT}, + #{videoUrl,jdbcType=VARCHAR}, #{time,jdbcType=BIGINT}, #{uploadUserId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_compete_video + + + id, + + + compete_time_id, + + + compete_code, + + + team, + + + player_id, + + + file_id, + + + video_url, + + + time, + + + upload_user_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{competeTimeId,jdbcType=BIGINT}, + + + #{competeCode,jdbcType=VARCHAR}, + + + #{team,jdbcType=TINYINT}, + + + #{playerId,jdbcType=BIGINT}, + + + #{fileId,jdbcType=BIGINT}, + + + #{videoUrl,jdbcType=VARCHAR}, + + + #{time,jdbcType=BIGINT}, + + + #{uploadUserId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_compete_video + + + id = #{record.id,jdbcType=BIGINT}, + + + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + + + compete_code = #{record.competeCode,jdbcType=VARCHAR}, + + + team = #{record.team,jdbcType=TINYINT}, + + + player_id = #{record.playerId,jdbcType=BIGINT}, + + + file_id = #{record.fileId,jdbcType=BIGINT}, + + + video_url = #{record.videoUrl,jdbcType=VARCHAR}, + + + time = #{record.time,jdbcType=BIGINT}, + + + upload_user_id = #{record.uploadUserId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_compete_video + set id = #{record.id,jdbcType=BIGINT}, + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + compete_code = #{record.competeCode,jdbcType=VARCHAR}, + team = #{record.team,jdbcType=TINYINT}, + player_id = #{record.playerId,jdbcType=BIGINT}, + file_id = #{record.fileId,jdbcType=BIGINT}, + video_url = #{record.videoUrl,jdbcType=VARCHAR}, + time = #{record.time,jdbcType=BIGINT}, + upload_user_id = #{record.uploadUserId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_compete_video + + + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + + + compete_code = #{competeCode,jdbcType=VARCHAR}, + + + team = #{team,jdbcType=TINYINT}, + + + player_id = #{playerId,jdbcType=BIGINT}, + + + file_id = #{fileId,jdbcType=BIGINT}, + + + video_url = #{videoUrl,jdbcType=VARCHAR}, + + + time = #{time,jdbcType=BIGINT}, + + + upload_user_id = #{uploadUserId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_compete_video + set compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + compete_code = #{competeCode,jdbcType=VARCHAR}, + team = #{team,jdbcType=TINYINT}, + player_id = #{playerId,jdbcType=BIGINT}, + file_id = #{fileId,jdbcType=BIGINT}, + video_url = #{videoUrl,jdbcType=VARCHAR}, + time = #{time,jdbcType=BIGINT}, + upload_user_id = #{uploadUserId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/LevelRuleMapper.xml b/mt/src/main/resources/mapper_raw/LevelRuleMapper.xml new file mode 100644 index 00000000..9bdb92cd --- /dev/null +++ b/mt/src/main/resources/mapper_raw/LevelRuleMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, compete_time_id, compete_code_now, compete_code_level_up, rule, level_condition, + auto_level, compete_order, created_at, updated_at, rec_status + + + + + delete from t_level_rule + where id = #{id,jdbcType=BIGINT} + + + delete from t_level_rule + + + + + + insert into t_level_rule (id, compete_time_id, compete_code_now, + compete_code_level_up, rule, level_condition, + auto_level, compete_order, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT}, #{competeCodeNow,jdbcType=VARCHAR}, + #{competeCodeLevelUp,jdbcType=VARCHAR}, #{rule,jdbcType=TINYINT}, #{levelCondition,jdbcType=INTEGER}, + #{autoLevel,jdbcType=TINYINT}, #{competeOrder,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_level_rule + + + id, + + + compete_time_id, + + + compete_code_now, + + + compete_code_level_up, + + + rule, + + + level_condition, + + + auto_level, + + + compete_order, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{competeTimeId,jdbcType=BIGINT}, + + + #{competeCodeNow,jdbcType=VARCHAR}, + + + #{competeCodeLevelUp,jdbcType=VARCHAR}, + + + #{rule,jdbcType=TINYINT}, + + + #{levelCondition,jdbcType=INTEGER}, + + + #{autoLevel,jdbcType=TINYINT}, + + + #{competeOrder,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_level_rule + + + id = #{record.id,jdbcType=BIGINT}, + + + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + + + compete_code_now = #{record.competeCodeNow,jdbcType=VARCHAR}, + + + compete_code_level_up = #{record.competeCodeLevelUp,jdbcType=VARCHAR}, + + + rule = #{record.rule,jdbcType=TINYINT}, + + + level_condition = #{record.levelCondition,jdbcType=INTEGER}, + + + auto_level = #{record.autoLevel,jdbcType=TINYINT}, + + + compete_order = #{record.competeOrder,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_level_rule + set id = #{record.id,jdbcType=BIGINT}, + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + compete_code_now = #{record.competeCodeNow,jdbcType=VARCHAR}, + compete_code_level_up = #{record.competeCodeLevelUp,jdbcType=VARCHAR}, + rule = #{record.rule,jdbcType=TINYINT}, + level_condition = #{record.levelCondition,jdbcType=INTEGER}, + auto_level = #{record.autoLevel,jdbcType=TINYINT}, + compete_order = #{record.competeOrder,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_level_rule + + + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + + + compete_code_now = #{competeCodeNow,jdbcType=VARCHAR}, + + + compete_code_level_up = #{competeCodeLevelUp,jdbcType=VARCHAR}, + + + rule = #{rule,jdbcType=TINYINT}, + + + level_condition = #{levelCondition,jdbcType=INTEGER}, + + + auto_level = #{autoLevel,jdbcType=TINYINT}, + + + compete_order = #{competeOrder,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_level_rule + set compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + compete_code_now = #{competeCodeNow,jdbcType=VARCHAR}, + compete_code_level_up = #{competeCodeLevelUp,jdbcType=VARCHAR}, + rule = #{rule,jdbcType=TINYINT}, + level_condition = #{levelCondition,jdbcType=INTEGER}, + auto_level = #{autoLevel,jdbcType=TINYINT}, + compete_order = #{competeOrder,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/LevelUpMapper.xml b/mt/src/main/resources/mapper_raw/LevelUpMapper.xml new file mode 100644 index 00000000..86c97dd8 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/LevelUpMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, compete_time_id, compete_code, level_user_id, score, addition_score, ranking, + level_up_type, created_at, updated_at, rec_status + + + + + delete from t_level_up + where id = #{id,jdbcType=BIGINT} + + + delete from t_level_up + + + + + + insert into t_level_up (id, compete_time_id, compete_code, + level_user_id, score, addition_score, + ranking, level_up_type, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT}, #{competeCode,jdbcType=VARCHAR}, + #{levelUserId,jdbcType=BIGINT}, #{score,jdbcType=INTEGER}, #{additionScore,jdbcType=INTEGER}, + #{ranking,jdbcType=INTEGER}, #{levelUpType,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_level_up + + + id, + + + compete_time_id, + + + compete_code, + + + level_user_id, + + + score, + + + addition_score, + + + ranking, + + + level_up_type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{competeTimeId,jdbcType=BIGINT}, + + + #{competeCode,jdbcType=VARCHAR}, + + + #{levelUserId,jdbcType=BIGINT}, + + + #{score,jdbcType=INTEGER}, + + + #{additionScore,jdbcType=INTEGER}, + + + #{ranking,jdbcType=INTEGER}, + + + #{levelUpType,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_level_up + + + id = #{record.id,jdbcType=BIGINT}, + + + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + + + compete_code = #{record.competeCode,jdbcType=VARCHAR}, + + + level_user_id = #{record.levelUserId,jdbcType=BIGINT}, + + + score = #{record.score,jdbcType=INTEGER}, + + + addition_score = #{record.additionScore,jdbcType=INTEGER}, + + + ranking = #{record.ranking,jdbcType=INTEGER}, + + + level_up_type = #{record.levelUpType,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_level_up + set id = #{record.id,jdbcType=BIGINT}, + compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, + compete_code = #{record.competeCode,jdbcType=VARCHAR}, + level_user_id = #{record.levelUserId,jdbcType=BIGINT}, + score = #{record.score,jdbcType=INTEGER}, + addition_score = #{record.additionScore,jdbcType=INTEGER}, + ranking = #{record.ranking,jdbcType=INTEGER}, + level_up_type = #{record.levelUpType,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_level_up + + + compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + + + compete_code = #{competeCode,jdbcType=VARCHAR}, + + + level_user_id = #{levelUserId,jdbcType=BIGINT}, + + + score = #{score,jdbcType=INTEGER}, + + + addition_score = #{additionScore,jdbcType=INTEGER}, + + + ranking = #{ranking,jdbcType=INTEGER}, + + + level_up_type = #{levelUpType,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_level_up + set compete_time_id = #{competeTimeId,jdbcType=BIGINT}, + compete_code = #{competeCode,jdbcType=VARCHAR}, + level_user_id = #{levelUserId,jdbcType=BIGINT}, + score = #{score,jdbcType=INTEGER}, + addition_score = #{additionScore,jdbcType=INTEGER}, + ranking = #{ranking,jdbcType=INTEGER}, + level_up_type = #{levelUpType,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/LevelUserMapper.xml b/mt/src/main/resources/mapper_raw/LevelUserMapper.xml new file mode 100644 index 00000000..ffb091a8 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/LevelUserMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, player_id, avatar_url, name, team_id, created_at, updated_at, rec_status + + + + + delete from t_level_user + where id = #{id,jdbcType=BIGINT} + + + delete from t_level_user + + + + + + insert into t_level_user (id, player_id, avatar_url, + name, team_id, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{avatarUrl,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, #{teamId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_level_user + + + id, + + + player_id, + + + avatar_url, + + + name, + + + team_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{playerId,jdbcType=BIGINT}, + + + #{avatarUrl,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{teamId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_level_user + + + id = #{record.id,jdbcType=BIGINT}, + + + player_id = #{record.playerId,jdbcType=BIGINT}, + + + avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + team_id = #{record.teamId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_level_user + set id = #{record.id,jdbcType=BIGINT}, + player_id = #{record.playerId,jdbcType=BIGINT}, + avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + team_id = #{record.teamId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_level_user + + + player_id = #{playerId,jdbcType=BIGINT}, + + + avatar_url = #{avatarUrl,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + team_id = #{teamId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_level_user + set player_id = #{playerId,jdbcType=BIGINT}, + avatar_url = #{avatarUrl,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + team_id = #{teamId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/MtGroupMapper.xml b/mt/src/main/resources/mapper_raw/MtGroupMapper.xml new file mode 100644 index 00000000..bd18a485 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtGroupMapper.xml @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, name, advance_status, score, type, created_at, updated_at, rec_status + + + + + delete from t_mt_group + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_group + + + + + + insert into t_mt_group (id, project_id, name, + advance_status, score, type, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, + #{advanceStatus,jdbcType=TINYINT}, #{score,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_mt_group + + + id, + + + project_id, + + + name, + + + advance_status, + + + score, + + + type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{advanceStatus,jdbcType=TINYINT}, + + + #{score,jdbcType=INTEGER}, + + + #{type,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_group + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + advance_status = #{record.advanceStatus,jdbcType=TINYINT}, + + + score = #{record.score,jdbcType=INTEGER}, + + + type = #{record.type,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_mt_group + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + advance_status = #{record.advanceStatus,jdbcType=TINYINT}, + score = #{record.score,jdbcType=INTEGER}, + type = #{record.type,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_mt_group + + + project_id = #{projectId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + advance_status = #{advanceStatus,jdbcType=TINYINT}, + + + score = #{score,jdbcType=INTEGER}, + + + type = #{type,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_mt_group + set project_id = #{projectId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + advance_status = #{advanceStatus,jdbcType=TINYINT}, + score = #{score,jdbcType=INTEGER}, + type = #{type,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/MtGroupTopicMapper.xml b/mt/src/main/resources/mapper_raw/MtGroupTopicMapper.xml new file mode 100644 index 00000000..e1aea201 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtGroupTopicMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, topic_id, group_id, answers, score, created_at, updated_at, rec_status + + + + + delete from t_mt_group_topic + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_group_topic + + + + + + insert into t_mt_group_topic (id, topic_id, group_id, + answers, score, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{topicId,jdbcType=BIGINT}, #{groupId,jdbcType=BIGINT}, + #{answers,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_mt_group_topic + + + id, + + + topic_id, + + + group_id, + + + answers, + + + score, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{topicId,jdbcType=BIGINT}, + + + #{groupId,jdbcType=BIGINT}, + + + #{answers,jdbcType=VARCHAR}, + + + #{score,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_group_topic + + + id = #{record.id,jdbcType=BIGINT}, + + + topic_id = #{record.topicId,jdbcType=BIGINT}, + + + group_id = #{record.groupId,jdbcType=BIGINT}, + + + answers = #{record.answers,jdbcType=VARCHAR}, + + + score = #{record.score,jdbcType=INTEGER}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_mt_group_topic + set id = #{record.id,jdbcType=BIGINT}, + topic_id = #{record.topicId,jdbcType=BIGINT}, + group_id = #{record.groupId,jdbcType=BIGINT}, + answers = #{record.answers,jdbcType=VARCHAR}, + score = #{record.score,jdbcType=INTEGER}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_mt_group_topic + + + topic_id = #{topicId,jdbcType=BIGINT}, + + + group_id = #{groupId,jdbcType=BIGINT}, + + + answers = #{answers,jdbcType=VARCHAR}, + + + score = #{score,jdbcType=INTEGER}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_mt_group_topic + set topic_id = #{topicId,jdbcType=BIGINT}, + group_id = #{groupId,jdbcType=BIGINT}, + answers = #{answers,jdbcType=VARCHAR}, + score = #{score,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/MtResponderMapper.xml b/mt/src/main/resources/mapper_raw/MtResponderMapper.xml new file mode 100644 index 00000000..70b74d13 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtResponderMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, topic_id, group_id, responder_time, created_at, updated_at, rec_status + + + + + delete from t_mt_responder + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_responder + + + + + + insert into t_mt_responder (id, topic_id, group_id, + responder_time, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{topicId,jdbcType=BIGINT}, #{groupId,jdbcType=BIGINT}, + #{responderTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_mt_responder + + + id, + + + topic_id, + + + group_id, + + + responder_time, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{topicId,jdbcType=BIGINT}, + + + #{groupId,jdbcType=BIGINT}, + + + #{responderTime,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_responder + + + id = #{record.id,jdbcType=BIGINT}, + + + topic_id = #{record.topicId,jdbcType=BIGINT}, + + + group_id = #{record.groupId,jdbcType=BIGINT}, + + + responder_time = #{record.responderTime,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_mt_responder + set id = #{record.id,jdbcType=BIGINT}, + topic_id = #{record.topicId,jdbcType=BIGINT}, + group_id = #{record.groupId,jdbcType=BIGINT}, + responder_time = #{record.responderTime,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_mt_responder + + + topic_id = #{topicId,jdbcType=BIGINT}, + + + group_id = #{groupId,jdbcType=BIGINT}, + + + responder_time = #{responderTime,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_mt_responder + set topic_id = #{topicId,jdbcType=BIGINT}, + group_id = #{groupId,jdbcType=BIGINT}, + responder_time = #{responderTime,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/MtTopicMapper.xml b/mt/src/main/resources/mapper_raw/MtTopicMapper.xml new file mode 100644 index 00000000..52cd7a04 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtTopicMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, description, link_type, topic_type, score_rule, score, sequence, answers, created_at, + updated_at, rec_status + + + + + delete from t_mt_topic + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_topic + + + + + + insert into t_mt_topic (id, description, link_type, + topic_type, score_rule, score, + sequence, answers, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{description,jdbcType=VARCHAR}, #{linkType,jdbcType=TINYINT}, + #{topicType,jdbcType=TINYINT}, #{scoreRule,jdbcType=TINYINT}, #{score,jdbcType=INTEGER}, + #{sequence,jdbcType=INTEGER}, #{answers,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_mt_topic + + + id, + + + description, + + + link_type, + + + topic_type, + + + score_rule, + + + score, + + + sequence, + + + answers, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{linkType,jdbcType=TINYINT}, + + + #{topicType,jdbcType=TINYINT}, + + + #{scoreRule,jdbcType=TINYINT}, + + + #{score,jdbcType=INTEGER}, + + + #{sequence,jdbcType=INTEGER}, + + + #{answers,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_topic + + + id = #{record.id,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + link_type = #{record.linkType,jdbcType=TINYINT}, + + + topic_type = #{record.topicType,jdbcType=TINYINT}, + + + score_rule = #{record.scoreRule,jdbcType=TINYINT}, + + + score = #{record.score,jdbcType=INTEGER}, + + + sequence = #{record.sequence,jdbcType=INTEGER}, + + + answers = #{record.answers,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_mt_topic + set id = #{record.id,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + link_type = #{record.linkType,jdbcType=TINYINT}, + topic_type = #{record.topicType,jdbcType=TINYINT}, + score_rule = #{record.scoreRule,jdbcType=TINYINT}, + score = #{record.score,jdbcType=INTEGER}, + sequence = #{record.sequence,jdbcType=INTEGER}, + answers = #{record.answers,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_mt_topic + + + description = #{description,jdbcType=VARCHAR}, + + + link_type = #{linkType,jdbcType=TINYINT}, + + + topic_type = #{topicType,jdbcType=TINYINT}, + + + score_rule = #{scoreRule,jdbcType=TINYINT}, + + + score = #{score,jdbcType=INTEGER}, + + + sequence = #{sequence,jdbcType=INTEGER}, + + + answers = #{answers,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_mt_topic + set description = #{description,jdbcType=VARCHAR}, + link_type = #{linkType,jdbcType=TINYINT}, + topic_type = #{topicType,jdbcType=TINYINT}, + score_rule = #{scoreRule,jdbcType=TINYINT}, + score = #{score,jdbcType=INTEGER}, + sequence = #{sequence,jdbcType=INTEGER}, + answers = #{answers,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/MtTopicOptionMapper.xml b/mt/src/main/resources/mapper_raw/MtTopicOptionMapper.xml new file mode 100644 index 00000000..1c9c1e43 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtTopicOptionMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, topic_id, contant, sequence, option, created_at, updated_at, rec_status + + + + + delete from t_mt_topic_option + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_topic_option + + + + + + insert into t_mt_topic_option (id, topic_id, contant, + sequence, option, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{topicId,jdbcType=BIGINT}, #{contant,jdbcType=VARCHAR}, + #{sequence,jdbcType=INTEGER}, #{option,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_mt_topic_option + + + id, + + + topic_id, + + + contant, + + + sequence, + + + option, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{topicId,jdbcType=BIGINT}, + + + #{contant,jdbcType=VARCHAR}, + + + #{sequence,jdbcType=INTEGER}, + + + #{option,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_topic_option + + + id = #{record.id,jdbcType=BIGINT}, + + + topic_id = #{record.topicId,jdbcType=BIGINT}, + + + contant = #{record.contant,jdbcType=VARCHAR}, + + + sequence = #{record.sequence,jdbcType=INTEGER}, + + + option = #{record.option,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_mt_topic_option + set id = #{record.id,jdbcType=BIGINT}, + topic_id = #{record.topicId,jdbcType=BIGINT}, + contant = #{record.contant,jdbcType=VARCHAR}, + sequence = #{record.sequence,jdbcType=INTEGER}, + option = #{record.option,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_mt_topic_option + + + topic_id = #{topicId,jdbcType=BIGINT}, + + + contant = #{contant,jdbcType=VARCHAR}, + + + sequence = #{sequence,jdbcType=INTEGER}, + + + option = #{option,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_mt_topic_option + set topic_id = #{topicId,jdbcType=BIGINT}, + contant = #{contant,jdbcType=VARCHAR}, + sequence = #{sequence,jdbcType=INTEGER}, + option = #{option,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/MtVoteMapper.xml b/mt/src/main/resources/mapper_raw/MtVoteMapper.xml new file mode 100644 index 00000000..881d29e5 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtVoteMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, group_id, created_at, updated_at, rec_status + + + + + delete from t_mt_vote + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_vote + + + + + + insert into t_mt_vote (id, user_id, group_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{groupId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_mt_vote + + + id, + + + user_id, + + + group_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{groupId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_vote + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + group_id = #{record.groupId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_mt_vote + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + group_id = #{record.groupId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_mt_vote + + + user_id = #{userId,jdbcType=BIGINT}, + + + group_id = #{groupId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_mt_vote + set user_id = #{userId,jdbcType=BIGINT}, + group_id = #{groupId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/mt/src/main/resources/sql/mt-20200815.sql b/mt/src/main/resources/sql/mt-20200815.sql new file mode 100644 index 00000000..f2011284 --- /dev/null +++ b/mt/src/main/resources/sql/mt-20200815.sql @@ -0,0 +1,949 @@ +/* + Navicat Premium Data Transfer + + Source Server : www.tall.wiki + Source Server Type : MariaDB + Source Server Version : 100323 + Source Host : 81.70.54.64:3306 + Source Schema : mt + + Target Server Type : MariaDB + Target Server Version : 100323 + File Encoding : 65001 + + Date: 25/08/2020 18:49:46 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for t_mt_group +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_group`; +CREATE TABLE `t_mt_group` ( + `id` bigint(20) NOT NULL, + `project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id', + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名字', + `advance_status` tinyint(2) UNSIGNED NULL DEFAULT 1 COMMENT '进阶状态 默认是1 进阶后改为下一阶状态', + `score` int(11) NULL DEFAULT 0 COMMENT '分数/票数', + `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '0答题组 1被投票组', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `project_index`(`project_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分组表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_group +-- ---------------------------- +INSERT INTO `t_mt_group` VALUES (1, 1293788636923432960, '1组', 4, 315, 0, '2020-08-13 17:54:15', '2020-08-16 10:34:57', 0); +INSERT INTO `t_mt_group` VALUES (2, 1293788636923432960, '2组', 1, 130, 0, '2020-08-13 17:54:15', '2020-08-15 22:37:26', 0); +INSERT INTO `t_mt_group` VALUES (3, 1293788636923432960, '3组', 1, 120, 0, '2020-08-13 17:54:15', '2020-08-15 22:37:26', 0); +INSERT INTO `t_mt_group` VALUES (4, 1293788636923432960, '4组', 2, 150, 0, '2020-08-13 17:54:15', '2020-08-16 10:12:23', 0); +INSERT INTO `t_mt_group` VALUES (5, 1293788636923432960, '5组', 1, 110, 0, '2020-08-13 17:54:15', '2020-08-15 22:37:27', 0); +INSERT INTO `t_mt_group` VALUES (6, 1293788636923432960, '6组', 1, 120, 0, '2020-08-13 17:54:15', '2020-08-15 22:37:31', 0); +INSERT INTO `t_mt_group` VALUES (7, 1293788636923432960, '7组', 2, 160, 0, '2020-08-13 17:54:15', '2020-08-16 10:12:23', 0); +INSERT INTO `t_mt_group` VALUES (8, 1293788636923432960, '8组', 4, 170, 0, '2020-08-13 17:54:15', '2020-08-16 10:34:57', 0); +INSERT INTO `t_mt_group` VALUES (9, 1293788636923432960, '9组', 1, 140, 0, '2020-08-13 17:54:15', '2020-08-15 22:37:31', 0); +INSERT INTO `t_mt_group` VALUES (10, 1293788636923432960, '10组', 4, 235, 0, '2020-08-13 17:54:15', '2020-08-16 10:34:57', 0); +INSERT INTO `t_mt_group` VALUES (11, 123, '1组', 1, 0, 1, '2020-08-14 08:45:06', '2020-08-14 08:45:06', 0); +INSERT INTO `t_mt_group` VALUES (12, 123, '2组', 1, 0, 1, '2020-08-14 08:45:06', '2020-08-14 08:45:06', 0); +INSERT INTO `t_mt_group` VALUES (13, 123, '3组', 1, 0, 1, '2020-08-14 08:45:06', '2020-08-14 08:45:06', 0); +INSERT INTO `t_mt_group` VALUES (14, 123, '4组', 1, 0, 1, '2020-08-14 08:45:06', '2020-08-14 08:45:06', 0); +INSERT INTO `t_mt_group` VALUES (15, 123, '5组', 1, 0, 1, '2020-08-14 08:45:06', '2020-08-14 08:45:06', 0); +INSERT INTO `t_mt_group` VALUES (16, 123, '6组', 1, 0, 1, '2020-08-14 08:45:06', '2020-08-14 08:45:06', 0); +INSERT INTO `t_mt_group` VALUES (17, 123, '7组', 1, 0, 1, '2020-08-14 08:45:06', '2020-08-14 08:45:06', 0); +INSERT INTO `t_mt_group` VALUES (18, 123, '8组', 1, 0, 1, '2020-08-14 08:45:06', '2020-08-14 08:45:06', 0); +INSERT INTO `t_mt_group` VALUES (19, 123, '9组', 1, 0, 1, '2020-08-14 08:45:06', '2020-08-14 08:45:06', 0); + +-- ---------------------------- +-- Table structure for t_mt_group_topic +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_group_topic`; +CREATE TABLE `t_mt_group_topic` ( + `id` bigint(20) NOT NULL, + `topic_id` bigint(20) NULL DEFAULT 0 COMMENT '题目id', + `group_id` bigint(20) NULL DEFAULT 0 COMMENT '分组id', + `answers` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '答题者的答案', + `score` int(11) NULL DEFAULT 0 COMMENT '本题得分', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `topic_index`(`topic_id`) USING BTREE, + INDEX `group_index`(`group_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '答题记录表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_group_topic +-- ---------------------------- +INSERT INTO `t_mt_group_topic` VALUES (1294814452255952896, 10001, 1, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814452264341504, 10001, 2, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814452272730112, 10001, 3, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814452276924416, 10001, 4, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814452285313024, 10001, 5, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814452289507328, 10001, 6, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814452297895936, 10001, 10, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814452302090240, 10001, 9, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814452310478848, 10001, 8, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814452318867456, 10001, 7, 't', 10, '2020-08-16 09:53:16', '2020-08-16 09:53:16', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618811764736, 10002, 1, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618815959040, 10002, 7, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618824347648, 10002, 2, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618832736256, 10002, 8, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618836930560, 10002, 3, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618845319168, 10002, 9, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618853707776, 10002, 4, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618857902080, 10002, 10, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618866290688, 10002, 5, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814618870484992, 10002, 6, 't', 10, '2020-08-16 09:53:56', '2020-08-16 09:53:56', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814832951955456, 10003, 1, 't', 10, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814832960344064, 10003, 7, 't', 10, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814832968732672, 10003, 2, 't', 10, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814832972926976, 10003, 8, 't', 10, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814832981315584, 10003, 3, 't', 10, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814832985509888, 10003, 9, 't', 10, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814832993898496, 10003, 4, 't', 10, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814832998092800, 10003, 10, 't', 10, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814833002287104, 10003, 5, 't', 10, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294814833010675712, 10003, 6, 'f', 0, '2020-08-16 09:54:47', '2020-08-16 09:54:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004167639040, 10004, 1, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004176027648, 10004, 7, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004180221952, 10004, 2, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004188610560, 10004, 8, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004192804864, 10004, 3, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004196999168, 10004, 9, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004205387776, 10004, 4, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004209582080, 10004, 10, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004217970688, 10004, 5, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815004226359296, 10004, 6, 't', 10, '2020-08-16 09:55:28', '2020-08-16 09:55:28', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179447603200, 10005, 1, 't', 10, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179451797504, 10005, 2, 'f', 0, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179460186112, 10005, 3, 'f', 0, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179464380416, 10005, 4, 't', 10, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179472769024, 10005, 5, 't', 10, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179476963328, 10005, 6, 't', 10, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179485351936, 10005, 7, 't', 10, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179489546240, 10005, 8, 't', 10, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179497934848, 10005, 9, 't', 10, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815179506323456, 10005, 10, 't', 10, '2020-08-16 09:56:09', '2020-08-16 09:56:09', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387086622720, 10006, 1, 't', 10, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387090817024, 10006, 2, 't', 10, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387099205632, 10006, 3, 't', 10, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387107594240, 10006, 4, 't', 10, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387111788544, 10006, 5, 'f', 0, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387120177152, 10006, 6, 'f', 0, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387124371456, 10006, 7, 't', 10, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387132760064, 10006, 8, 't', 10, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387141148672, 10006, 9, 't', 10, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815387149537280, 10006, 10, 't', 10, '2020-08-16 09:56:59', '2020-08-16 09:56:59', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594822111232, 10007, 1, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594826305536, 10007, 2, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594834694144, 10007, 3, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594838888448, 10007, 4, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594843082752, 10007, 5, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594851471360, 10007, 6, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594855665664, 10007, 7, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594859859968, 10007, 8, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594868248576, 10007, 9, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815594872442880, 10007, 10, 't', 10, '2020-08-16 09:57:48', '2020-08-16 09:57:48', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820047847424, 10008, 1, 't', 10, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820056236032, 10008, 2, 't', 10, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820068818944, 10008, 3, 't', 10, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820077207552, 10008, 4, 'f', 0, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820081401856, 10008, 5, 't', 10, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820089790464, 10008, 6, 't', 10, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820098179072, 10008, 7, 't', 10, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820106567680, 10008, 8, 't', 10, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820110761984, 10008, 9, 't', 10, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294815820119150592, 10008, 10, 't', 10, '2020-08-16 09:58:42', '2020-08-16 09:58:42', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024553721856, 10009, 1, 't', 10, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024566304768, 10009, 2, 'f', 0, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024570499072, 10009, 3, 't', 10, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024578887680, 10009, 4, 't', 10, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024583081984, 10009, 5, 't', 10, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024591470592, 10009, 6, 't', 10, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024599859200, 10009, 7, 't', 10, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024608247808, 10009, 8, 't', 10, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024616636416, 10009, 9, 't', 10, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816024620830720, 10009, 10, 't', 10, '2020-08-16 09:59:31', '2020-08-16 09:59:31', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363080192000, 10010, 1, 't', 10, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363088580608, 10010, 2, 't', 10, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363092774912, 10010, 3, 'f', 0, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363101163520, 10010, 4, 't', 10, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363105357824, 10010, 5, 'f', 0, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363109552128, 10010, 6, 'f', 0, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363117940736, 10010, 7, 't', 10, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363122135040, 10010, 8, 't', 10, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363126329344, 10010, 9, 'f', 0, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816363134717952, 10010, 10, 't', 10, '2020-08-16 10:00:52', '2020-08-16 10:00:52', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816745953038336, 10011, 1, 't', 10, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816745957232640, 10011, 2, 't', 10, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816745965621248, 10011, 3, 't', 10, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816745974009856, 10011, 4, 't', 10, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816745978204160, 10011, 5, 'f', 0, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816745986592768, 10011, 6, 't', 10, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816745990787072, 10011, 7, 't', 10, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816745994981376, 10011, 8, 't', 10, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816746003369984, 10011, 9, 't', 10, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816746007564288, 10011, 10, 't', 10, '2020-08-16 10:02:23', '2020-08-16 10:02:23', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991319822336, 10012, 1, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991328210944, 10012, 2, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991332405248, 10012, 3, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991340793856, 10012, 4, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991349182464, 10012, 5, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991353376768, 10012, 6, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991357571072, 10012, 7, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991365959680, 10012, 8, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991370153984, 10012, 9, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294816991374348288, 10012, 10, 't', 10, '2020-08-16 10:03:21', '2020-08-16 10:03:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158173429760, 10013, 1, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158177624064, 10013, 2, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158186012672, 10013, 3, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158190206976, 10013, 4, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158198595584, 10013, 5, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158202789888, 10013, 6, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158206984192, 10013, 7, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158215372800, 10013, 8, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158219567104, 10013, 9, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817158223761408, 10013, 10, 't', 10, '2020-08-16 10:04:01', '2020-08-16 10:04:01', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342529867776, 10014, 1, 't', 10, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342538256384, 10014, 2, 't', 10, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342550839296, 10014, 3, 't', 10, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342559227904, 10014, 4, 't', 10, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342567616512, 10014, 5, 'f', 0, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342571810816, 10014, 6, 't', 10, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342576005120, 10014, 7, 't', 10, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342584393728, 10014, 8, 't', 10, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342592782336, 10014, 9, 't', 10, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817342596976640, 10014, 10, 't', 10, '2020-08-16 10:04:45', '2020-08-16 10:04:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592220979200, 10015, 1, 't', 10, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592229367808, 10015, 2, 't', 10, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592237756416, 10015, 3, 'f', 0, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592241950720, 10015, 4, 't', 10, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592250339328, 10015, 5, 't', 10, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592254533632, 10015, 6, 't', 10, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592262922240, 10015, 7, 't', 10, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592267116544, 10015, 8, 't', 10, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592275505152, 10015, 9, 't', 10, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294817592279699456, 10015, 10, 't', 10, '2020-08-16 10:05:45', '2020-08-16 10:05:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294820579475591168, 10016, 4, 'f', -10, '2020-08-16 10:17:37', '2020-08-16 10:17:37', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294820795968786432, 10017, 7, 't', 10, '2020-08-16 10:18:29', '2020-08-16 10:18:29', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294820939179102208, 10018, 10, 't', 10, '2020-08-16 10:19:03', '2020-08-16 10:19:03', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294821015498657792, 10019, 4, 't', 10, '2020-08-16 10:19:21', '2020-08-16 10:19:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294821122113671168, 10020, 10, 't', 10, '2020-08-16 10:19:46', '2020-08-16 10:19:46', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294821301650853888, 10021, 8, 't', 10, '2020-08-16 10:20:29', '2020-08-16 10:20:29', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294821453610487808, 10022, 8, 't', 10, '2020-08-16 10:21:05', '2020-08-16 10:21:05', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294821695982538752, 10023, 1, 't', 10, '2020-08-16 10:22:03', '2020-08-16 10:22:03', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294821869832245248, 10024, 10, 't', 10, '2020-08-16 10:22:45', '2020-08-16 10:22:45', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294821987830599680, 10025, 1, 't', 10, '2020-08-16 10:23:13', '2020-08-16 10:23:13', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294822258543562752, 10026, 1, 't', 10, '2020-08-16 10:24:17', '2020-08-16 10:24:17', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294822423564259328, 10027, 4, 't', 10, '2020-08-16 10:24:57', '2020-08-16 10:24:57', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294822552627187712, 10028, 1, 't', 10, '2020-08-16 10:25:27', '2020-08-16 10:25:27', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294822636173529088, 10029, 1, 't', 10, '2020-08-16 10:25:47', '2020-08-16 10:25:47', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294822794785329152, 10030, 4, 'f', -10, '2020-08-16 10:26:25', '2020-08-16 10:26:25', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294822931033100288, 10031, 8, 't', 10, '2020-08-16 10:26:58', '2020-08-16 10:26:58', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294823121286729728, 10032, 1, 't', 10, '2020-08-16 10:27:43', '2020-08-16 10:27:43', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294823221115359232, 10033, 4, 't', 10, '2020-08-16 10:28:07', '2020-08-16 10:28:07', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294823317328498688, 10034, 10, 't', 10, '2020-08-16 10:28:30', '2020-08-16 10:28:30', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294823420546125824, 10035, 1, 't', 10, '2020-08-16 10:28:54', '2020-08-16 10:28:54', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294823989440548864, 10044, 1, 't', 50, '2020-08-16 10:31:10', '2020-08-16 10:31:10', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294824290641907712, 10040, 10, 't', 30, '2020-08-16 10:32:22', '2020-08-16 10:32:22', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294824613729144832, 10043, 8, 'f', -50, '2020-08-16 10:33:39', '2020-08-16 10:33:39', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825005556830208, 10045, 1, 't', 5, '2020-08-16 10:35:12', '2020-08-16 10:35:12', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825054378528768, 10046, 1, 't', 5, '2020-08-16 10:35:24', '2020-08-16 10:35:24', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825104836005888, 10047, 1, 't', 5, '2020-08-16 10:35:36', '2020-08-16 10:35:36', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825147244613632, 10048, 1, 't', 5, '2020-08-16 10:35:46', '2020-08-16 10:35:46', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825185828016128, 10049, 1, 't', 5, '2020-08-16 10:35:55', '2020-08-16 10:35:55', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825213388787712, 10050, 1, 't', 5, '2020-08-16 10:36:02', '2020-08-16 10:36:02', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825293537742848, 10051, 1, 'f', 0, '2020-08-16 10:36:21', '2020-08-16 10:36:21', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825330594418688, 10052, 1, 't', 5, '2020-08-16 10:36:30', '2020-08-16 10:36:30', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825374403923968, 10053, 1, 't', 5, '2020-08-16 10:36:40', '2020-08-16 10:36:40', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825501264842752, 10054, 1, 't', 5, '2020-08-16 10:37:10', '2020-08-16 10:37:10', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825758824468480, 10055, 10, 't', 5, '2020-08-16 10:38:12', '2020-08-16 10:38:12', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825802881437696, 10056, 10, 'f', 0, '2020-08-16 10:38:22', '2020-08-16 10:38:22', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825848863592448, 10057, 10, 't', 5, '2020-08-16 10:38:33', '2020-08-16 10:38:33', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825930488942592, 10058, 10, 't', 5, '2020-08-16 10:38:53', '2020-08-16 10:38:53', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825961753284608, 10059, 10, 'f', 0, '2020-08-16 10:39:00', '2020-08-16 10:39:00', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294825993294450688, 10060, 10, 't', 5, '2020-08-16 10:39:08', '2020-08-16 10:39:08', 2); +INSERT INTO `t_mt_group_topic` VALUES (1294826030980272128, 10061, 10, 'f', 0, '2020-08-16 10:39:17', '2020-08-16 10:39:17', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294826270168846336, 10060, 10, 'f', 0, '2020-08-16 10:40:14', '2020-08-16 10:40:14', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294826506010365952, 10065, 8, 't', 5, '2020-08-16 10:41:10', '2020-08-16 10:41:10', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294826568794902528, 10066, 8, 't', 5, '2020-08-16 10:41:25', '2020-08-16 10:41:25', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294826758012538880, 10067, 8, 't', 5, '2020-08-16 10:42:10', '2020-08-16 10:42:10', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294826792842039296, 10068, 8, 'f', 0, '2020-08-16 10:42:18', '2020-08-16 10:42:18', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294826828820779008, 10069, 8, 't', 5, '2020-08-16 10:42:27', '2020-08-16 10:42:27', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294826888803520512, 10070, 8, 't', 5, '2020-08-16 10:42:41', '2020-08-16 10:42:41', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294827090302078976, 10071, 8, 't', 5, '2020-08-16 10:43:29', '2020-08-16 10:43:29', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294827124414353408, 10072, 8, 't', 5, '2020-08-16 10:43:37', '2020-08-16 10:43:37', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294827347031232512, 10073, 8, 'f', 0, '2020-08-16 10:44:30', '2020-08-16 10:44:30', 0); +INSERT INTO `t_mt_group_topic` VALUES (1294827532780179456, 10074, 8, 't', 5, '2020-08-16 10:45:15', '2020-08-16 10:45:15', 0); + +-- ---------------------------- +-- Table structure for t_mt_judge +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_judge`; +CREATE TABLE `t_mt_judge` ( + `id` bigint(20) NOT NULL, + `project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id', + `user_id` bigint(20) NULL DEFAULT 0, + `nickname` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '昵称', + `avatar_url` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像', + `phone` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_project_index`(`project_id`) USING BTREE, + INDEX `member_user_index`(`user_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '评委表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_judge +-- ---------------------------- +INSERT INTO `t_mt_judge` VALUES (1209768915253727232, 1209768911474659328, 1175954520199532544, '张野', '', '15335153627', '2019-12-26 11:30:16', '2019-12-26 11:30:16', 0); +INSERT INTO `t_mt_judge` VALUES (1210089888599379968, 1210089888431607808, 1183636291472986112, '武慧娟', '', '15536346119', '2019-12-26 15:05:03', '2019-12-26 15:05:03', 0); +INSERT INTO `t_mt_judge` VALUES (1210398276763914240, 1210398276352872448, 1182476410426626048, '卫泽照', '', '18135100170', '2019-12-27 18:01:10', '2019-12-27 18:01:10', 0); +INSERT INTO `t_mt_judge` VALUES (1210398276793274368, 1210398276352872448, 1175954520199532544, '张野', '', '15335153627', '2019-12-28 12:53:15', '2019-12-28 12:53:15', 0); +INSERT INTO `t_mt_judge` VALUES (1210398276810051584, 1210398276352872448, 1177394149704470528, '冯骏', '', '18603454788', '2019-12-27 18:05:28', '2019-12-27 18:05:28', 0); +INSERT INTO `t_mt_judge` VALUES (1210398276826828800, 1210398276352872448, 1177042727041372160, '宋瑞芳', '', '15235360226', '2019-12-27 17:56:04', '2019-12-27 17:56:04', 0); +INSERT INTO `t_mt_judge` VALUES (1210398276839411712, 1210398276352872448, 1182476056934879232, '孙方圆', '', '17600172132', '2019-12-27 18:02:05', '2019-12-27 18:02:05', 0); +INSERT INTO `t_mt_judge` VALUES (1210398276851994624, 1210398276352872448, 1182476167328960512, '李楠', '', '18403559853', '2019-12-27 18:03:21', '2019-12-27 18:03:21', 0); +INSERT INTO `t_mt_judge` VALUES (1210398276914909184, 1210398276352872448, 1182474793929281536, '李亚男', '', '13210151397', '2019-12-27 18:02:45', '2019-12-27 18:02:45', 0); +INSERT INTO `t_mt_judge` VALUES (1210820354705068032, 1210820354650542080, 1189465926597218304, '周勇', '', '18135110606', '2019-12-28 20:03:20', '2019-12-28 20:03:20', 0); +INSERT INTO `t_mt_judge` VALUES (1210820354717650944, 1210820354650542080, 1210772356725870592, '赵思奇', '', '13652426512', '2019-12-28 20:00:36', '2019-12-28 20:00:36', 0); +INSERT INTO `t_mt_judge` VALUES (1210820354726039552, 1210820354650542080, 1210776011319414784, '肖可佳', '', '13652426513', '2019-12-28 20:03:36', '2019-12-28 20:03:36', 0); +INSERT INTO `t_mt_judge` VALUES (1210820354738622464, 1210820354650542080, 1210776265880113152, '白璐', '', '13652426514', '2019-12-28 20:03:59', '2019-12-28 20:03:59', 0); +INSERT INTO `t_mt_judge` VALUES (1210820354755399680, 1210820354650542080, 1183636291472986112, '武慧娟', '', '15536346119', '2020-01-06 11:33:11', '2020-01-06 11:33:11', 0); +INSERT INTO `t_mt_judge` VALUES (1210820354767982592, 1210820354650542080, 1175954520199532544, '张野', '', '15335153627', '2019-12-30 10:53:55', '2019-12-30 10:53:55', 0); +INSERT INTO `t_mt_judge` VALUES (1210820354818314240, 1210820354650542080, 1210776522655404032, '嘉宾二', '', '15222222222', '2019-12-28 20:03:26', '2019-12-28 20:03:26', 0); +INSERT INTO `t_mt_judge` VALUES (1210820623304101889, 1210820623236993024, 1210772356725870592, '赵思奇', '', '13652426512', '2019-12-28 16:57:24', '2019-12-28 16:57:24', 0); +INSERT INTO `t_mt_judge` VALUES (1210820623346044928, 1210820623236993024, 1183636291472986112, '武慧娟', '', '15536346119', '2019-12-28 16:46:35', '2019-12-28 16:46:35', 0); +INSERT INTO `t_mt_judge` VALUES (1210820623375405056, 1210820623236993024, 1177042727041372160, '宋瑞芳', '', '15235360226', '2019-12-28 16:55:11', '2019-12-28 16:55:11', 0); +INSERT INTO `t_mt_judge` VALUES (1210820623413153792, 1210820623236993024, 1182476167328960512, '李楠', '', '18403559853', '2019-12-28 16:56:27', '2019-12-28 16:56:27', 0); +INSERT INTO `t_mt_judge` VALUES (1210820623425736704, 1210820623236993024, 1182474793929281536, '李亚男', '', '13210151397', '2019-12-28 16:58:19', '2019-12-28 16:58:19', 0); +INSERT INTO `t_mt_judge` VALUES (1230706260308004864, 1230706259913740288, 1217647686598135808, '张野', '', '15335153627', '2020-02-22 11:43:35', '2020-02-22 11:43:35', 0); +INSERT INTO `t_mt_judge` VALUES (1232564528718417920, 1232564528571617280, 1217647686598135808, '张野', '', '15335153627', '2020-02-27 17:33:25', '2020-02-27 17:33:25', 0); +INSERT INTO `t_mt_judge` VALUES (1232564528731000832, 1232564528571617280, 1217651354919636992, '冯骏', '', '18603454788', '2020-02-26 16:33:02', '2020-02-26 16:33:02', 0); + +-- ---------------------------- +-- Table structure for t_mt_responder +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_responder`; +CREATE TABLE `t_mt_responder` ( + `id` bigint(20) NOT NULL, + `topic_id` bigint(20) NULL DEFAULT 0 COMMENT '题目id', + `group_id` bigint(20) NULL DEFAULT 0 COMMENT '分组id', + `responder_time` bigint(20) NULL DEFAULT 0 COMMENT '抢答的时间', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `topic_index`(`topic_id`) USING BTREE, + INDEX `group_index`(`group_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '抢答信息表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_responder +-- ---------------------------- +INSERT INTO `t_mt_responder` VALUES (1294820524089806848, 10016, 4, 1597544244202, '2020-08-16 10:17:24', '2020-08-16 10:17:24', 0); +INSERT INTO `t_mt_responder` VALUES (1294820752633237504, 10017, 7, 1597544298691, '2020-08-16 10:18:18', '2020-08-16 10:18:18', 0); +INSERT INTO `t_mt_responder` VALUES (1294820892743962624, 10018, 10, 1597544332096, '2020-08-16 10:18:52', '2020-08-16 10:18:52', 0); +INSERT INTO `t_mt_responder` VALUES (1294820970984509440, 10019, 4, 1597544350750, '2020-08-16 10:19:10', '2020-08-16 10:19:10', 0); +INSERT INTO `t_mt_responder` VALUES (1294821079893807104, 10020, 10, 1597544376716, '2020-08-16 10:19:36', '2020-08-16 10:19:36', 0); +INSERT INTO `t_mt_responder` VALUES (1294821258562768896, 10021, 8, 1597544419314, '2020-08-16 10:20:19', '2020-08-16 10:20:19', 0); +INSERT INTO `t_mt_responder` VALUES (1294821416717389824, 10022, 8, 1597544457021, '2020-08-16 10:20:57', '2020-08-16 10:20:57', 0); +INSERT INTO `t_mt_responder` VALUES (1294821654005944320, 10023, 1, 1597544513595, '2020-08-16 10:21:53', '2020-08-16 10:21:53', 0); +INSERT INTO `t_mt_responder` VALUES (1294821822218506240, 10024, 10, 1597544553700, '2020-08-16 10:22:33', '2020-08-16 10:22:33', 0); +INSERT INTO `t_mt_responder` VALUES (1294821942272069632, 10025, 1, 1597544582323, '2020-08-16 10:23:02', '2020-08-16 10:23:02', 0); +INSERT INTO `t_mt_responder` VALUES (1294822214184603648, 10026, 1, 1597544647152, '2020-08-16 10:24:07', '2020-08-16 10:24:07', 0); +INSERT INTO `t_mt_responder` VALUES (1294822381159845888, 10027, 4, 1597544686962, '2020-08-16 10:24:46', '2020-08-16 10:24:46', 0); +INSERT INTO `t_mt_responder` VALUES (1294822512651276288, 10028, 1, 1597544718312, '2020-08-16 10:25:18', '2020-08-16 10:25:18', 0); +INSERT INTO `t_mt_responder` VALUES (1294822596461858816, 10029, 1, 1597544738294, '2020-08-16 10:25:38', '2020-08-16 10:25:38', 0); +INSERT INTO `t_mt_responder` VALUES (1294822752494161920, 10030, 4, 1597544775495, '2020-08-16 10:26:15', '2020-08-16 10:26:15', 0); +INSERT INTO `t_mt_responder` VALUES (1294822888947453952, 10031, 8, 1597544808028, '2020-08-16 10:26:48', '2020-08-16 10:26:48', 0); +INSERT INTO `t_mt_responder` VALUES (1294823052365926400, 10032, 1, 1597544846990, '2020-08-16 10:27:26', '2020-08-16 10:27:26', 0); +INSERT INTO `t_mt_responder` VALUES (1294823190064926720, 10033, 4, 1597544879820, '2020-08-16 10:27:59', '2020-08-16 10:27:59', 0); +INSERT INTO `t_mt_responder` VALUES (1294823271744802816, 10034, 10, 1597544899294, '2020-08-16 10:28:19', '2020-08-16 10:28:19', 0); +INSERT INTO `t_mt_responder` VALUES (1294823389369864192, 10035, 1, 1597544927338, '2020-08-16 10:28:47', '2020-08-16 10:28:47', 0); + +-- ---------------------------- +-- Table structure for t_mt_score +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_score`; +CREATE TABLE `t_mt_score` ( + `id` bigint(32) NOT NULL, + `judge_user_id` bigint(32) NULL DEFAULT 0 COMMENT '评委的userId', + `score_log_id` bigint(32) NULL DEFAULT 0 COMMENT '评分项id', + `project_id` bigint(32) NULL DEFAULT 0 COMMENT '项目id', + `task_id` bigint(32) NULL DEFAULT 0 COMMENT '被评分的任务id', + `task_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '任务名', + `score` decimal(32, 2) NULL DEFAULT 0.00 COMMENT '分数', + `is_score` int(10) NULL DEFAULT 1 COMMENT '是否被评分 0否 1是', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `judge_user_index`(`judge_user_id`) USING BTREE, + INDEX `score_log_index`(`score_log_id`) USING BTREE, + INDEX `task_index`(`task_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_score +-- ---------------------------- +INSERT INTO `t_mt_score` VALUES (1210094153497710592, 1210089888599379968, 1, 0, 1210072221251407872, '卫泽照年终总结', 9.53, 0, '2019-12-26 15:05:03', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210094755929788416, 1210089888599379968, 1, 0, 1209768922358878208, '武慧娟年终总结', 7.45, 0, '2019-12-26 15:07:26', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210111645012070400, 1210089888599379968, 1, 0, 1210089889094307840, '卫泽照年终总结', 9.34, 0, '2019-12-26 16:14:33', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210499581335441408, 1210398276826828800, 2, 0, 1210398277221093376, '卫泽照年终总结', 9.42, 0, '2019-12-27 17:56:04', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210499607545647104, 1210398276826828800, 2, 0, 1210398277258842112, '武慧娟年终总结', 9.70, 0, '2019-12-27 17:56:11', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210499634083008512, 1210398276826828800, 2, 0, 1210398277279813632, '张野年终总结', 10.00, 0, '2019-12-27 17:56:17', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210500865237061632, 1210398276763914240, 2, 0, 1210398277221093376, '卫泽照年终总结', 10.00, 0, '2019-12-27 18:01:10', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210500932253650944, 1210398276763914240, 2, 0, 1210398277258842112, '武慧娟年终总结', 10.00, 0, '2019-12-27 18:01:26', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210500958933618688, 1210398276763914240, 2, 0, 1210398277279813632, '张野年终总结', 10.00, 0, '2019-12-27 18:01:33', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210501092832579584, 1210398276839411712, 2, 0, 1210398277221093376, '卫泽照年终总结', 10.00, 0, '2019-12-27 18:02:05', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210501129042006016, 1210398276839411712, 2, 0, 1210398277258842112, '武慧娟年终总结', 7.66, 0, '2019-12-27 18:02:13', '2020-02-27 17:19:16', 0); +INSERT INTO `t_mt_score` VALUES (1210501155105411072, 1210398276839411712, 2, 0, 1210398277279813632, '张野年终总结', 10.00, 0, '2019-12-27 18:02:20', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210501264136343552, 1210398276914909184, 2, 0, 1210398277221093376, '卫泽照年终总结', 10.00, 0, '2019-12-27 18:02:46', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210501297808216064, 1210398276914909184, 2, 0, 1210398277258842112, '武慧娟年终总结', 9.16, 0, '2019-12-27 18:02:54', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210501321204043776, 1210398276914909184, 2, 0, 1210398277279813632, '张野年终总结', 6.84, 0, '2019-12-27 18:02:59', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210501411893284864, 1210398276851994624, 2, 0, 1210398277221093376, '卫泽照年终总结', 8.83, 0, '2019-12-27 18:03:21', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210501435343638528, 1210398276851994624, 2, 0, 1210398277258842112, '武慧娟年终总结', 10.00, 0, '2019-12-27 18:03:26', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210501464485662720, 1210398276851994624, 2, 0, 1210398277279813632, '张野年终总结', 10.00, 0, '2019-12-27 18:03:33', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210501944108519424, 1210398276810051584, 2, 0, 1210398277221093376, '卫泽照年终总结', 5.21, 0, '2019-12-27 18:05:28', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210501965461721088, 1210398276810051584, 2, 0, 1210398277258842112, '武慧娟年终总结', 4.71, 0, '2019-12-27 18:05:33', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210501987695726592, 1210398276810051584, 2, 0, 1210398277279813632, '张野年终总结', 7.92, 0, '2019-12-27 18:05:38', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210765348123578368, 1210398276839411712, 2, 0, 1210398277304979456, '冯骏年终总结', 8.88, 0, '2019-12-28 11:32:09', '2020-02-27 17:19:17', 0); +INSERT INTO `t_mt_score` VALUES (1210765377806667776, 1210398276839411712, 2, 0, 1210398277321756672, '宋瑞芳年终总结', 10.00, 0, '2019-12-28 11:32:15', '2020-02-27 17:19:18', 0); +INSERT INTO `t_mt_score` VALUES (1210765417405091840, 1210398276839411712, 2, 0, 1210398277359505408, '李楠年终总结', 9.42, 0, '2019-12-28 11:32:25', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210765481066237952, 1210398276839411712, 2, 0, 1210398277342728192, '孙方圆年终总结', 8.24, 0, '2019-12-28 11:32:40', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766030650085376, 1210398276826828800, 2, 0, 1210398277304979456, '冯骏年终总结', 9.76, 0, '2019-12-28 11:34:51', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766063030112256, 1210398276826828800, 2, 0, 1210398277321756672, '宋瑞芳年终总结', 9.00, 0, '2019-12-28 11:34:59', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766089051574272, 1210398276826828800, 2, 0, 1210398277342728192, '孙方圆年终总结', 9.65, 0, '2019-12-28 11:35:05', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766118600445952, 1210398276826828800, 2, 0, 1210398277359505408, '李楠年终总结', 9.34, 0, '2019-12-28 11:35:12', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766144936480768, 1210398276826828800, 2, 0, 1210398277376282624, '李亚男年终总结', 9.56, 0, '2019-12-28 11:35:18', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766275299643392, 1210398276851994624, 2, 0, 1210398277304979456, '冯骏年终总结', 8.38, 0, '2019-12-28 11:35:49', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766345487126528, 1210398276851994624, 2, 0, 1210398277321756672, '宋瑞芳年终总结', 9.01, 0, '2019-12-28 11:36:06', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766369675677696, 1210398276851994624, 2, 0, 1210398277342728192, '孙方圆年终总结', 9.23, 0, '2019-12-28 11:36:12', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766404882665472, 1210398276851994624, 2, 0, 1210398277359505408, '李楠年终总结', 9.23, 0, '2019-12-28 11:36:20', '2020-02-27 17:19:34', 0); +INSERT INTO `t_mt_score` VALUES (1210766430245621760, 1210398276851994624, 2, 0, 1210398277376282624, '李亚男年终总结', 9.30, 0, '2019-12-28 11:36:26', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210766581668384768, 1210398276914909184, 2, 0, 1210398277321756672, '宋瑞芳年终总结', 8.42, 0, '2019-12-28 11:37:02', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210766612563628032, 1210398276914909184, 2, 0, 1210398277304979456, '冯骏年终总结', 9.33, 0, '2019-12-28 11:37:10', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210766641751789568, 1210398276914909184, 2, 0, 1210398277342728192, '孙方圆年终总结', 8.96, 0, '2019-12-28 11:37:17', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210766667488038912, 1210398276914909184, 2, 0, 1210398277359505408, '李楠年终总结', 8.75, 0, '2019-12-28 11:37:23', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210766693295591424, 1210398276914909184, 2, 0, 1210398277376282624, '李亚男年终总结', 8.42, 0, '2019-12-28 11:37:29', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210767247686111232, 1210398276810051584, 2, 0, 1210398277304979456, '冯骏年终总结', 9.10, 0, '2019-12-28 11:39:41', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210767273929871360, 1210398276810051584, 2, 0, 1210398277321756672, '宋瑞芳年终总结', 8.66, 0, '2019-12-28 11:39:47', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210767305496203264, 1210398276810051584, 2, 0, 1210398277342728192, '孙方圆年终总结', 8.86, 0, '2019-12-28 11:39:55', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210767405068980224, 1210398276810051584, 2, 0, 1210398277359505408, '李楠年终总结', 8.24, 0, '2019-12-28 11:40:19', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210767436253630464, 1210398276810051584, 2, 0, 1210398277376282624, '李亚男年终总结', 9.43, 0, '2019-12-28 11:40:26', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210767696443084800, 1210398276763914240, 2, 0, 1210398277304979456, '冯骏年终总结', 9.17, 0, '2019-12-28 11:41:28', '2020-02-27 17:19:35', 0); +INSERT INTO `t_mt_score` VALUES (1210767815263522816, 1210398276763914240, 2, 0, 1210398277321756672, '宋瑞芳年终总结', 9.27, 0, '2019-12-28 11:41:56', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210767842002210816, 1210398276763914240, 2, 0, 1210398277342728192, '孙方圆年终总结', 9.04, 0, '2019-12-28 11:42:03', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210767867268698112, 1210398276763914240, 2, 0, 1210398277359505408, '李楠年终总结', 8.94, 0, '2019-12-28 11:42:09', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210767893218856960, 1210398276763914240, 2, 0, 1210398277376282624, '李亚男年终总结', 8.46, 0, '2019-12-28 11:42:15', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210768179656265728, 1210398276839411712, 2, 0, 1210398277376282624, '李亚男年终总结', 8.25, 0, '2019-12-28 11:43:23', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210785761339772928, 1210398276793274368, 2, 0, 1210398277221093376, '卫泽照年终总结', 10.00, 0, '2019-12-28 12:53:15', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210786057793179648, 1210398276793274368, 2, 0, 1210398277279813632, '张野年终总结', 9.44, 0, '2019-12-28 12:54:26', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210786110368780288, 1210398276793274368, 2, 0, 1210398277258842112, '武慧娟年终总结', 10.00, 0, '2019-12-28 12:54:38', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210786154580938752, 1210398276793274368, 2, 0, 1210398277304979456, '冯骏年终总结', 9.86, 0, '2019-12-28 12:54:49', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210786175409852416, 1210398276793274368, 2, 0, 1210398277321756672, '宋瑞芳年终总结', 10.00, 0, '2019-12-28 12:54:54', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210786196226183168, 1210398276793274368, 2, 0, 1210398277342728192, '孙方圆年终总结', 10.00, 0, '2019-12-28 12:54:59', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210786215662587904, 1210398276793274368, 2, 0, 1210398277359505408, '李楠年终总结', 10.00, 0, '2019-12-28 12:55:03', '2020-02-27 17:19:36', 0); +INSERT INTO `t_mt_score` VALUES (1210786243416297472, 1210398276793274368, 2, 0, 1210398277376282624, '李亚男年终总结', 9.14, 0, '2019-12-28 12:55:10', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210844481654493184, 1210820623346044928, 4, 0, 1210820623669006336, '李楠年终总结', 10.00, 0, '2019-12-28 16:46:35', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210844507034226688, 1210820623346044928, 4, 0, 1210820623681589248, '卫泽照年终总结', 10.00, 0, '2019-12-28 16:46:41', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210844529742188544, 1210820623346044928, 4, 0, 1210820623765475328, '冯骏年终总结', 7.23, 0, '2019-12-28 16:46:46', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210844555658792960, 1210820623346044928, 4, 0, 1210820623778058240, '武慧娟年终总结', 8.48, 0, '2019-12-28 16:46:53', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210844596473565184, 1210820623346044928, 4, 0, 1210820623786446848, '张野年终总结', 8.62, 0, '2019-12-28 16:47:02', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210844619504488448, 1210820623346044928, 4, 0, 1210820623803224064, '宋瑞芳年终总结', 8.73, 0, '2019-12-28 16:47:08', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210844645098131456, 1210820623346044928, 4, 0, 1210820623811612672, '孙方圆年终总结', 9.19, 0, '2019-12-28 16:47:14', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210844674735083520, 1210820623346044928, 4, 0, 1210820623820001280, '李亚男年终总结', 8.37, 0, '2019-12-28 16:47:21', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210846647647604736, 1210820623375405056, 4, 0, 1210820623669006336, '李楠年终总结', 7.27, 0, '2019-12-28 16:55:11', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210846673249636352, 1210820623375405056, 4, 0, 1210820623681589248, '卫泽照年终总结', 10.00, 0, '2019-12-28 16:55:18', '2020-02-27 17:19:37', 0); +INSERT INTO `t_mt_score` VALUES (1210846759119622144, 1210820623375405056, 4, 0, 1210820623765475328, '冯骏年终总结', 9.50, 0, '2019-12-28 16:55:38', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210846787158544384, 1210820623375405056, 4, 0, 1210820623778058240, '武慧娟年终总结', 10.00, 0, '2019-12-28 16:55:45', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210846810386599936, 1210820623375405056, 4, 0, 1210820623786446848, '张野年终总结', 9.15, 0, '2019-12-28 16:55:50', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210846835229462528, 1210820623375405056, 4, 0, 1210820623803224064, '宋瑞芳年终总结', 8.72, 0, '2019-12-28 16:55:56', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210846870201569280, 1210820623375405056, 4, 0, 1210820623811612672, '孙方圆年终总结', 9.48, 0, '2019-12-28 16:56:04', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210846900446695424, 1210820623375405056, 4, 0, 1210820623820001280, '李亚男年终总结', 9.02, 0, '2019-12-28 16:56:12', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210846963499667456, 1210820623413153792, 4, 0, 1210820623669006336, '李楠年终总结', 10.00, 0, '2019-12-28 16:56:27', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210847012409446400, 1210820623413153792, 4, 0, 1210820623681589248, '卫泽照年终总结', 10.00, 0, '2019-12-28 16:56:38', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210847070278258688, 1210820623413153792, 4, 0, 1210820623765475328, '冯骏年终总结', 10.00, 0, '2019-12-28 16:56:52', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210847103660724224, 1210820623413153792, 4, 0, 1210820623778058240, '武慧娟年终总结', 9.66, 0, '2019-12-28 16:57:00', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210847135113809920, 1210820623413153792, 4, 0, 1210820623786446848, '张野年终总结', 10.00, 0, '2019-12-28 16:57:08', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210847164159365120, 1210820623413153792, 4, 0, 1210820623803224064, '宋瑞芳年终总结', 10.00, 0, '2019-12-28 16:57:15', '2020-02-27 17:19:38', 0); +INSERT INTO `t_mt_score` VALUES (1210847194563874816, 1210820623413153792, 4, 0, 1210820623811612672, '孙方圆年终总结', 10.00, 0, '2019-12-28 16:57:22', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847205225795584, 1210820623304101889, 4, 0, 1210820623669006336, '李楠年终总结', 8.84, 0, '2019-12-28 16:57:24', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847234250379264, 1210820623304101889, 4, 0, 1210820623681589248, '卫泽照年终总结', 8.55, 0, '2019-12-28 16:57:31', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847264520671232, 1210820623304101889, 4, 0, 1210820623765475328, '冯骏年终总结', 10.00, 0, '2019-12-28 16:57:38', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847269188931584, 1210820623413153792, 4, 0, 1210820623820001280, '李亚男年终总结', 10.00, 0, '2019-12-28 16:57:40', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847292979023872, 1210820623304101889, 4, 0, 1210820623778058240, '武慧娟年终总结', 10.00, 0, '2019-12-28 16:57:45', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847356933771264, 1210820623304101889, 4, 0, 1210820623786446848, '张野年终总结', 10.00, 0, '2019-12-28 16:58:01', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847377888514048, 1210820623304101889, 4, 0, 1210820623803224064, '宋瑞芳年终总结', 9.71, 0, '2019-12-28 16:58:06', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847411916902400, 1210820623304101889, 4, 0, 1210820623811612672, '孙方圆年终总结', 9.67, 0, '2019-12-28 16:58:14', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847435472113664, 1210820623304101889, 4, 0, 1210820623820001280, '李亚男年终总结', 9.51, 0, '2019-12-28 16:58:19', '2020-02-27 17:19:39', 0); +INSERT INTO `t_mt_score` VALUES (1210847435933487104, 1210820623425736704, 4, 0, 1210820623669006336, '李楠年终总结', 10.00, 0, '2019-12-28 16:58:19', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210847460361113600, 1210820623425736704, 4, 0, 1210820623681589248, '卫泽照年终总结', 10.00, 0, '2019-12-28 16:58:25', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210847508952125440, 1210820623425736704, 4, 0, 1210820623765475328, '冯骏年终总结', 10.00, 0, '2019-12-28 16:58:37', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210847533732073472, 1210820623425736704, 4, 0, 1210820623778058240, '武慧娟年终总结', 10.00, 0, '2019-12-28 16:58:43', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210847596017487872, 1210820623425736704, 4, 0, 1210820623786446848, '张野年终总结', 10.00, 0, '2019-12-28 16:58:58', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210847634890297344, 1210820623425736704, 4, 0, 1210820623803224064, '宋瑞芳年终总结', 10.00, 0, '2019-12-28 16:59:07', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210847656981696512, 1210820623425736704, 4, 0, 1210820623811612672, '孙方圆年终总结', 10.00, 0, '2019-12-28 16:59:12', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210847678917906432, 1210820623425736704, 4, 0, 1210820623820001280, '李亚男年终总结', 10.00, 0, '2019-12-28 16:59:17', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210893307668992000, 1210820354717650944, 3, 0, 1210820355099332608, '李楠年终总结', 8.91, 0, '2019-12-28 20:00:36', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210893993668382720, 1210820354705068032, 3, 0, 1210820355099332608, '李楠年终总结', 9.13, 0, '2019-12-28 20:03:20', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210894020721643520, 1210820354818314240, 3, 0, 1210820355099332608, '李楠年终总结', 8.00, 0, '2019-12-28 20:03:26', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210894064552120320, 1210820354726039552, 3, 0, 1210820355099332608, '李楠年终总结', 9.00, 0, '2019-12-28 20:03:36', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210894157695029248, 1210820354738622464, 3, 0, 1210820355099332608, '李楠年终总结', 9.88, 0, '2019-12-28 20:03:59', '2020-02-27 17:19:40', 0); +INSERT INTO `t_mt_score` VALUES (1210894590450733056, 1210820354877034496, 3, 0, 1210820355099332608, '李楠年终总结', 9.04, 0, '2019-12-28 20:05:42', '2020-02-27 17:19:41', 0); +INSERT INTO `t_mt_score` VALUES (1210895432474038272, 1210820354717650944, 3, 0, 1210820355128692736, '卫泽照年终总结', 9.00, 0, '2019-12-28 20:09:03', '2020-02-27 17:19:41', 0); +INSERT INTO `t_mt_score` VALUES (1210895498655961088, 1210820354726039552, 3, 0, 1210820355128692736, '卫泽照年终总结', 9.10, 0, '2019-12-28 20:09:18', '2020-02-27 17:19:41', 0); +INSERT INTO `t_mt_score` VALUES (1210895563432792064, 1210820354705068032, 3, 0, 1210820355128692736, '卫泽照年终总结', 9.86, 0, '2019-12-28 20:09:34', '2020-02-27 17:19:41', 0); +INSERT INTO `t_mt_score` VALUES (1210895568000389120, 1210820354818314240, 3, 0, 1210820355128692736, '卫泽照年终总结', 10.00, 0, '2019-12-28 20:09:35', '2020-02-27 17:19:41', 0); +INSERT INTO `t_mt_score` VALUES (1210895642520588288, 1210820354877034496, 3, 0, 1210820355128692736, '卫泽照年终总结', 9.90, 0, '2019-12-28 20:09:53', '2020-02-27 17:19:41', 0); +INSERT INTO `t_mt_score` VALUES (1210895895676194816, 1210820354738622464, 3, 0, 1210820355128692736, '卫泽照年终总结', 9.64, 0, '2019-12-28 20:10:53', '2020-02-27 17:19:41', 0); +INSERT INTO `t_mt_score` VALUES (1210896408157229056, 1210820354717650944, 3, 0, 1210820355141275648, '冯骏年终总结', 9.09, 0, '2019-12-28 20:12:55', '2020-02-27 17:19:41', 2); +INSERT INTO `t_mt_score` VALUES (1210896638269329408, 1210820354818314240, 3, 0, 1210820355141275648, '冯骏年终总结', 9.84, 0, '2019-12-28 20:13:50', '2020-02-27 17:19:41', 2); +INSERT INTO `t_mt_score` VALUES (1210896652777426944, 1210820354705068032, 3, 0, 1210820355141275648, '冯骏年终总结', 9.51, 0, '2019-12-28 20:13:54', '2020-02-27 17:19:41', 2); +INSERT INTO `t_mt_score` VALUES (1210896669307179008, 1210820354738622464, 3, 0, 1210820355141275648, '冯骏年终总结', 9.58, 0, '2019-12-28 20:13:58', '2020-02-27 17:19:41', 2); +INSERT INTO `t_mt_score` VALUES (1210896728778215424, 1210820354726039552, 3, 0, 1210820355141275648, '冯骏年终总结', 9.05, 0, '2019-12-28 20:14:12', '2020-02-27 17:19:41', 2); +INSERT INTO `t_mt_score` VALUES (1210896997914120192, 1210820354818314240, 3, 0, 1210820355153858560, '武慧娟年终总结', 10.00, 0, '2019-12-28 20:15:16', '2020-02-27 17:19:42', 0); +INSERT INTO `t_mt_score` VALUES (1210897005124128768, 1210820354726039552, 3, 0, 1210820355153858560, '武慧娟年终总结', 9.10, 0, '2019-12-28 20:15:18', '2020-02-27 17:19:42', 0); +INSERT INTO `t_mt_score` VALUES (1210897011285561344, 1210820354717650944, 3, 0, 1210820355153858560, '武慧娟年终总结', 9.03, 0, '2019-12-28 20:15:19', '2020-02-27 17:19:42', 0); +INSERT INTO `t_mt_score` VALUES (1210897012900368384, 1210820354705068032, 3, 0, 1210820355153858560, '武慧娟年终总结', 9.05, 0, '2019-12-28 20:15:19', '2020-02-27 17:19:42', 0); +INSERT INTO `t_mt_score` VALUES (1210897077836582912, 1210820354738622464, 3, 0, 1210820355153858560, '武慧娟年终总结', 9.64, 0, '2019-12-28 20:15:35', '2020-02-27 17:19:42', 0); +INSERT INTO `t_mt_score` VALUES (1210900279701147648, 1210820354717650944, 3, 0, 1210820355166441472, '张野年终总结', 9.12, 0, '2019-12-28 20:28:18', '2020-02-27 17:19:42', 2); +INSERT INTO `t_mt_score` VALUES (1210900398697746432, 1210820354726039552, 3, 0, 1210820355166441472, '张野年终总结', 9.00, 0, '2019-12-28 20:28:47', '2020-02-27 17:19:42', 2); +INSERT INTO `t_mt_score` VALUES (1210900415307190272, 1210820354705068032, 3, 0, 1210820355166441472, '张野年终总结', 9.86, 0, '2019-12-28 20:28:51', '2020-02-27 17:19:42', 2); +INSERT INTO `t_mt_score` VALUES (1210900430947749888, 1210820354818314240, 3, 0, 1210820355166441472, '张野年终总结', 10.00, 0, '2019-12-28 20:28:54', '2020-02-27 17:19:42', 2); +INSERT INTO `t_mt_score` VALUES (1210900472764960768, 1210820354738622464, 3, 0, 1210820355166441472, '张野年终总结', 9.50, 0, '2019-12-28 20:29:04', '2020-02-27 17:19:42', 2); +INSERT INTO `t_mt_score` VALUES (1210900696585605120, 1210820354726039552, 3, 0, 1210820355199995904, '宋瑞芳年终总结', 9.01, 0, '2019-12-28 20:29:58', '2020-02-27 17:19:42', 2); +INSERT INTO `t_mt_score` VALUES (1210900711366332416, 1210820354705068032, 3, 0, 1210820355199995904, '宋瑞芳年终总结', 9.62, 0, '2019-12-28 20:30:01', '2020-02-27 17:19:42', 2); +INSERT INTO `t_mt_score` VALUES (1210900719536836608, 1210820354818314240, 3, 0, 1210820355199995904, '宋瑞芳年终总结', 10.00, 0, '2019-12-28 20:30:03', '2020-02-27 17:19:43', 2); +INSERT INTO `t_mt_score` VALUES (1210900720589606912, 1210820354717650944, 3, 0, 1210820355199995904, '宋瑞芳年终总结', 8.97, 0, '2019-12-28 20:30:03', '2020-02-27 17:19:43', 2); +INSERT INTO `t_mt_score` VALUES (1210900760506798080, 1210820354738622464, 3, 0, 1210820355199995904, '宋瑞芳年终总结', 9.55, 0, '2019-12-28 20:30:13', '2020-02-27 17:19:43', 2); +INSERT INTO `t_mt_score` VALUES (1210901432371384320, 1210820354717650944, 3, 0, 1210820355212578816, '孙方圆年终总结', 9.70, 0, '2019-12-28 20:32:53', '2020-02-27 17:19:43', 2); +INSERT INTO `t_mt_score` VALUES (1210901549539266560, 1210820354726039552, 3, 0, 1210820355212578816, '孙方圆年终总结', 9.17, 0, '2019-12-28 20:33:21', '2020-02-27 17:19:43', 2); +INSERT INTO `t_mt_score` VALUES (1210901941786382336, 1210820354705068032, 3, 0, 1210820355212578816, '孙方圆年终总结', 10.00, 0, '2019-12-28 20:34:55', '2020-02-27 17:19:43', 2); +INSERT INTO `t_mt_score` VALUES (1210901964548870144, 1210820354818314240, 3, 0, 1210820355212578816, '孙方圆年终总结', 10.00, 0, '2019-12-28 20:35:00', '2020-02-27 17:19:43', 2); +INSERT INTO `t_mt_score` VALUES (1210901970907435008, 1210820354738622464, 3, 0, 1210820355212578816, '孙方圆年终总结', 9.76, 0, '2019-12-28 20:35:02', '2020-02-27 17:19:43', 2); +INSERT INTO `t_mt_score` VALUES (1210902280417710080, 1210820354726039552, 3, 0, 1210820355225161728, '李亚男年终总结', 9.07, 0, '2019-12-28 20:36:15', '2020-02-27 17:19:43', 0); +INSERT INTO `t_mt_score` VALUES (1210902404762046464, 1210820354717650944, 3, 0, 1210820355225161728, '李亚男年终总结', 9.21, 0, '2019-12-28 20:36:45', '2020-02-27 17:19:43', 0); +INSERT INTO `t_mt_score` VALUES (1210902680881467392, 1210820354705068032, 3, 0, 1210820355225161728, '李亚男年终总结', 9.90, 0, '2019-12-28 20:37:51', '2020-02-27 17:19:44', 0); +INSERT INTO `t_mt_score` VALUES (1210902696123568128, 1210820354818314240, 3, 0, 1210820355225161728, '李亚男年终总结', 10.00, 0, '2019-12-28 20:37:54', '2020-02-27 17:19:44', 0); +INSERT INTO `t_mt_score` VALUES (1210902697524465664, 1210820354738622464, 3, 0, 1210820355225161728, '李亚男年终总结', 9.61, 0, '2019-12-28 20:37:55', '2020-02-27 17:19:44', 0); +INSERT INTO `t_mt_score` VALUES (1211480507448168448, 1210820354767982592, 3, 0, 1210820355141275648, '冯骏年终总结', 10.00, 0, '2019-12-30 10:53:55', '2020-02-27 17:19:44', 2); +INSERT INTO `t_mt_score` VALUES (1212551736657580032, 1210820354767982592, 3, 0, 1210820355099332608, '李楠年终总结', 9.98, 0, '2020-01-02 09:50:36', '2020-02-27 17:19:44', 2); +INSERT INTO `t_mt_score` VALUES (1214027104694439936, 1210820354755399680, 3, 0, 1210820355166441472, '张野年终总结', 9.10, 0, '2020-01-06 11:33:11', '2020-02-27 17:19:44', 2); +INSERT INTO `t_mt_score` VALUES (1231071359602397184, 1230706260308004864, 0, 0, 1230706261213974528, '张野年终总结', 18.88, 0, '2020-02-22 12:21:09', '2020-02-27 17:19:44', 0); +INSERT INTO `t_mt_score` VALUES (1232584344611196928, 1232564528731000832, 0, 0, 1232564529225928705, '李楠年终总结', 7.80, 0, '2020-02-26 16:33:02', '2020-02-27 17:32:01', 2); +INSERT INTO `t_mt_score` VALUES (1232585046339227648, 1232564528731000832, 0, 0, 1232564529255288832, '卫泽照年终总结', 0.08, 0, '2020-02-26 16:35:50', '2020-02-27 17:32:01', 0); +INSERT INTO `t_mt_score` VALUES (1232585331241521152, 1232564528731000832, 0, 0, 1232564529263677440, '冯骏年终总结', 0.03, 0, '2020-02-26 16:36:57', '2020-02-27 17:32:01', 0); +INSERT INTO `t_mt_score` VALUES (1232585637023059968, 1232564528731000832, 0, 0, 1232564529272066048, '武慧娟年终总结', 0.06, 0, '2020-02-26 16:38:10', '2020-02-27 17:32:01', 0); +INSERT INTO `t_mt_score` VALUES (1232586060983308288, 1232564528731000832, 0, 0, 1232564529293037568, '张野年终总结', 0.10, 0, '2020-02-26 16:39:51', '2020-02-27 17:32:01', 0); +INSERT INTO `t_mt_score` VALUES (1232587421674246144, 1232564528731000832, 0, 0, 1232564529297231872, '宋瑞芳年终总结', 0.05, 0, '2020-02-26 16:45:16', '2020-02-27 17:32:01', 0); +INSERT INTO `t_mt_score` VALUES (1232587871815340032, 1232564528731000832, 0, 0, 1232564529301426176, '孙方圆年终总结', 0.06, 0, '2020-02-26 16:47:03', '2020-02-27 17:32:01', 0); +INSERT INTO `t_mt_score` VALUES (1232588918944305152, 1232564528731000832, 0, 0, 1232564529305620480, '李亚男年终总结', 0.06, 0, '2020-02-26 16:51:13', '2020-02-27 17:32:01', 0); +INSERT INTO `t_mt_score` VALUES (1232945484230955008, 1232564528731000832, 0, 1232564528571617280, 1232564529225928705, '李楠年终总结', 99.09, 0, '2020-02-27 16:28:05', '2020-02-27 17:27:05', 2); +INSERT INTO `t_mt_score` VALUES (1232948193839419392, 1232564528731000832, 0, 1232564528571617280, 1232564529225928705, '李楠年终总结', 9.99, 0, '2020-02-27 16:38:51', '2020-02-27 17:27:05', 2); +INSERT INTO `t_mt_score` VALUES (1232949051348094976, 1232564528731000832, 0, 1232564528571617280, 1232564529225928705, '李楠年终总结', 0.11, 0, '2020-02-27 16:42:15', '2020-02-27 17:27:05', 2); +INSERT INTO `t_mt_score` VALUES (1232949235540955136, 1232564528731000832, 0, 1232564528571617280, 1232564529225928705, '李楠年终总结', 0.10, 0, '2020-02-27 16:42:59', '2020-02-27 17:27:05', 0); +INSERT INTO `t_mt_score` VALUES (1232961928855425024, 1232564528718417920, 0, 1232564528571617280, 1232564529293037568, '张野年终总结', 18.88, 0, '2020-02-27 17:33:25', '2020-02-27 17:33:25', 0); + +-- ---------------------------- +-- Table structure for t_mt_score_log +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_score_log`; +CREATE TABLE `t_mt_score_log` ( + `id` bigint(20) NOT NULL, + `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '姓名', + `max_score` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '分数最大值', + `min_score` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '分数最小值', + `project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id', + `sequence` int(11) NULL DEFAULT 0 COMMENT '序号', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `project_index`(`project_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '评分项' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_score_log +-- ---------------------------- +INSERT INTO `t_mt_score_log` VALUES (1, '总分', 10.00, 0.00, 1210089888431607808, 1, '2019-12-25 14:55:32', '2019-12-26 14:52:53', 0); +INSERT INTO `t_mt_score_log` VALUES (2, '总分', 10.00, 0.00, 1210398276352872448, 1, '2019-12-27 11:14:41', '2019-12-27 11:14:41', 0); +INSERT INTO `t_mt_score_log` VALUES (3, '总分', 10.00, 0.00, 1210820354650542080, 1, '2019-12-28 12:51:38', '2019-12-28 15:14:09', 0); +INSERT INTO `t_mt_score_log` VALUES (4, '总分', 10.00, 0.00, 1210820623236993024, 0, '2019-12-28 15:14:39', '2019-12-28 15:14:39', 0); + +-- ---------------------------- +-- Table structure for t_mt_signin +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_signin`; +CREATE TABLE `t_mt_signin` ( + `id` bigint(20) NOT NULL, + `user_id` bigint(20) NULL DEFAULT 0 COMMENT '对应的用户id', + `task_id` bigint(20) NULL DEFAULT 0 COMMENT '任务id', + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '姓名', + `phone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号', + `company` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公司', + `signin_time` bigint(20) NULL DEFAULT 0 COMMENT '签到时间', + `sequence` int(11) NULL DEFAULT 0 COMMENT '序号', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '签到表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_signin +-- ---------------------------- +INSERT INTO `t_mt_signin` VALUES (1209682868238946304, 1175954520199532544, 12, 'zy', '123123', '', 1577245845266, 1, '2019-12-25 11:50:47', '2019-12-25 11:50:47', 0); +INSERT INTO `t_mt_signin` VALUES (1209683090163765248, 1175954520199532544, 12, 'zy', '123123', '', 1577245898177, 2, '2019-12-25 11:51:39', '2019-12-25 11:51:39', 0); +INSERT INTO `t_mt_signin` VALUES (1209683102234972160, 1175954520199532544, 12, 'zy', '123123', '', 1577245901055, 3, '2019-12-25 11:51:42', '2019-12-25 11:51:42', 0); +INSERT INTO `t_mt_signin` VALUES (1209683107561738240, 1175954520199532544, 12, 'zy', '123123', '', 1577245902325, 4, '2019-12-25 11:51:44', '2019-12-25 11:51:44', 0); +INSERT INTO `t_mt_signin` VALUES (1209683111454052352, 1175954520199532544, 12, 'zy', '123123', '', 1577245903253, 5, '2019-12-25 11:51:45', '2019-12-25 11:51:45', 0); +INSERT INTO `t_mt_signin` VALUES (1209683114583003136, 1175954520199532544, 12, 'zy', '123123', '', 1577245903999, 6, '2019-12-25 11:51:45', '2019-12-25 11:51:45', 0); +INSERT INTO `t_mt_signin` VALUES (1209683117586124800, 1175954520199532544, 12, 'zy', '123123', '', 1577245904715, 7, '2019-12-25 11:51:46', '2019-12-25 11:51:46', 0); +INSERT INTO `t_mt_signin` VALUES (1209683120291450880, 1175954520199532544, 12, 'zy', '123123', '', 1577245905360, 8, '2019-12-25 11:51:47', '2019-12-25 11:51:47', 0); +INSERT INTO `t_mt_signin` VALUES (1209683123202297856, 1175954520199532544, 12, 'zy', '123123', '', 1577245906054, 9, '2019-12-25 11:51:47', '2019-12-25 11:51:47', 0); +INSERT INTO `t_mt_signin` VALUES (1209690404849586176, 1175954520199532544, 112, 'zy', '123123', '', 1577247642134, 1, '2019-12-25 12:20:42', '2019-12-25 12:20:42', 0); +INSERT INTO `t_mt_signin` VALUES (1209715655352389632, 1177394149704470528, 1207585170669047808, 'wally', '18603454788', '', 1577253662323, 1, '2019-12-25 14:01:02', '2019-12-25 14:01:02', 0); +INSERT INTO `t_mt_signin` VALUES (1209742128188624896, 1177394149704470528, 1209731714100891648, 'wally', '18603454788', '', 1577259973939, 1, '2019-12-25 15:46:14', '2019-12-25 15:46:14', 0); +INSERT INTO `t_mt_signin` VALUES (1209752737756090368, 1177394149704470528, 1209741019982204928, 'wally', '18603454788', '', 1577262503457, 1, '2019-12-25 16:28:23', '2019-12-25 16:28:23', 0); +INSERT INTO `t_mt_signin` VALUES (1210057711471955968, 1177394149704470528, 1209768924015628288, 'wally', '18603454788', '', 1577335214857, 1, '2019-12-26 12:40:14', '2019-12-26 12:40:14', 0); +INSERT INTO `t_mt_signin` VALUES (1210504184353394688, 1177042727041372160, 1210398277426614272, '宋瑞芳', '15235360226', '', 1577441662287, 1, '2019-12-27 18:14:22', '2019-12-27 18:14:22', 0); +INSERT INTO `t_mt_signin` VALUES (1210514900145803264, 1183636291472986112, 1210398277426614272, '武慧娟', '15235262532', '', 1577444217131, 2, '2019-12-27 18:56:57', '2019-12-27 18:56:57', 0); +INSERT INTO `t_mt_signin` VALUES (1210524519224184832, 1182474793929281536, 1210398277426614272, '李亚男', '15235265656', '', 1577446510498, 3, '2019-12-27 19:35:10', '2019-12-27 19:35:10', 0); +INSERT INTO `t_mt_signin` VALUES (1210841263000129536, 1183636291472986112, 1210820624071659521, '武慧娟', '15235256325', '', 1577522028099, 1, '2019-12-28 16:33:48', '2019-12-28 16:33:48', 0); +INSERT INTO `t_mt_signin` VALUES (1210885039634649088, 1177394149704470528, 1210820355288076289, '冯骏', '18603454788', '', 1577532465262, 1, '2019-12-28 19:27:45', '2019-12-28 19:27:45', 0); +INSERT INTO `t_mt_signin` VALUES (1210885118370123776, 1177042727041372160, 1210820355288076289, '宋瑞芳', '15235360226', '', 1577532484034, 2, '2019-12-28 19:28:04', '2019-12-28 19:28:04', 0); +INSERT INTO `t_mt_signin` VALUES (1210885351355322368, 1182474793929281536, 1210820355288076289, '李亚男', '13210151397', '', 1577532539582, 3, '2019-12-28 19:28:59', '2019-12-28 19:28:59', 0); +INSERT INTO `t_mt_signin` VALUES (1210885482406350848, 1210776265880113152, 1210820355288076289, '白璐', '18536665706', '', 1577532570827, 4, '2019-12-28 19:29:30', '2019-12-28 19:29:30', 0); +INSERT INTO `t_mt_signin` VALUES (1210885662966943744, 1183636291472986112, 1210820355288076289, '武慧娟', '15536346119', '', 1577532613876, 5, '2019-12-28 19:30:13', '2019-12-28 19:30:13', 0); +INSERT INTO `t_mt_signin` VALUES (1210885765165355008, 1182476056934879232, 1210820355288076289, '孙方圆', '17600172132', '', 1577532638242, 6, '2019-12-28 19:30:38', '2019-12-28 19:30:38', 0); +INSERT INTO `t_mt_signin` VALUES (1210885921256378368, 1175954520199532544, 1210820355288076289, '张野', '15335153627', '', 1577532675457, 7, '2019-12-28 19:31:15', '2019-12-28 19:31:15', 0); +INSERT INTO `t_mt_signin` VALUES (1210886961028534272, 1210776876419780608, 1210820355288076289, '王晓婷', '15343433639', '', 1577532923358, 8, '2019-12-28 19:35:23', '2019-12-28 19:35:23', 0); +INSERT INTO `t_mt_signin` VALUES (1210887056054685696, 1210777370903056384, 1210820355288076289, '陈芃睿', '18903402266', '', 1577532946014, 9, '2019-12-28 19:35:46', '2019-12-28 19:35:46', 0); +INSERT INTO `t_mt_signin` VALUES (1210887790074662912, 1182476167328960512, 1210820355288076289, '李楠', '18403559853', '', 1577533121018, 10, '2019-12-28 19:38:41', '2019-12-28 19:38:41', 0); +INSERT INTO `t_mt_signin` VALUES (1210887854918602752, 1210776419597160448, 1210820355288076289, 'Chen pangrui', '18634402266', '', 1577533136478, 11, '2019-12-28 19:38:56', '2019-12-28 19:38:56', 0); +INSERT INTO `t_mt_signin` VALUES (1210889288980500480, 1210776598626832384, 1210820355288076289, '王娟云', '18135100160', '', 1577533478385, 12, '2019-12-28 19:44:38', '2019-12-28 19:44:38', 0); +INSERT INTO `t_mt_signin` VALUES (1210889853139554304, 1189465926597218304, 1210820355288076289, '周勇', '18135110606', '', 1577533612891, 13, '2019-12-28 19:46:52', '2019-12-28 19:46:52', 0); +INSERT INTO `t_mt_signin` VALUES (1210890185496203264, 1210776522655404032, 1210820355288076289, 'liuyong', '13911516568', '', 1577533692131, 14, '2019-12-28 19:48:12', '2019-12-28 19:48:12', 0); +INSERT INTO `t_mt_signin` VALUES (1210890528976146432, 1210772356725870592, 1210820355288076289, '赵思奇', '13810628635', '', 1577533774023, 15, '2019-12-28 19:49:34', '2019-12-28 19:49:34', 0); +INSERT INTO `t_mt_signin` VALUES (1210890555316375552, 1210776011319414784, 1210820355288076289, '肖可佳', '13683501709', '', 1577533780303, 16, '2019-12-28 19:49:40', '2019-12-28 19:49:40', 0); +INSERT INTO `t_mt_signin` VALUES (1210891368088604672, 1182476410426626048, 1210820355288076289, '卫泽照', '18135100170', '', 1577533974084, 17, '2019-12-28 19:52:54', '2019-12-28 19:52:54', 0); + +-- ---------------------------- +-- Table structure for t_mt_signin_basic +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_signin_basic`; +CREATE TABLE `t_mt_signin_basic` ( + `id` bigint(20) NOT NULL, + `user_id` bigint(20) NULL DEFAULT 0 COMMENT '对应的用户id', + `task_plugin_id` bigint(20) NULL DEFAULT 0 COMMENT '任务插件id', + `task_id` bigint(20) NULL DEFAULT 0 COMMENT '任务id', + `signin_time` bigint(20) NULL DEFAULT 0 COMMENT '签到时间', + `sequence` int(11) NULL DEFAULT 0 COMMENT '序号', + `is_sign` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否已签到 0未签到 1已签到', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `user_index`(`user_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '签到基本信息表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_signin_basic +-- ---------------------------- +INSERT INTO `t_mt_signin_basic` VALUES (1231070106696683520, 1217647686598135808, 1230706262635843584, 1230706261037813760, 1582344960270, 1, 1, '2020-02-22 12:16:00', '2020-02-24 09:31:31', 0); +INSERT INTO `t_mt_signin_basic` VALUES (1231102153360281600, 1217651354919636992, 1230706262635843584, 1230706261037813760, 1582352600790, 2, 1, '2020-02-22 14:23:20', '2020-02-24 09:31:35', 0); +INSERT INTO `t_mt_signin_basic` VALUES (1232564822109982720, 1217651354919636992, 1232564536075227136, 1232564529024602112, 1582701328195, 1, 1, '2020-02-26 15:15:28', '2020-02-26 15:32:54', 0); +INSERT INTO `t_mt_signin_basic` VALUES (1232569962258894848, 1217647686598135808, 1232564536075227136, 1232564529024602112, 1582702553702, 2, 1, '2020-02-26 15:35:53', '2020-02-26 15:35:53', 0); + +-- ---------------------------- +-- Table structure for t_mt_signin_other +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_signin_other`; +CREATE TABLE `t_mt_signin_other` ( + `id` bigint(20) NOT NULL, + `signin_basic_id` bigint(20) NULL DEFAULT 0 COMMENT '签到基本信息的id', + `s_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字段', + `s_value` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '值', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `signin_basic_index`(`signin_basic_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '其他签到信息表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_signin_other +-- ---------------------------- +INSERT INTO `t_mt_signin_other` VALUES (1231070107225165824, 1231070106696683520, 'name', '张野', '2020-02-22 12:16:00', '2020-02-22 12:16:00', 0); +INSERT INTO `t_mt_signin_other` VALUES (1231070107447463936, 1231070106696683520, 'phone', '15335153627', '2020-02-22 12:16:00', '2020-02-22 12:16:00', 0); +INSERT INTO `t_mt_signin_other` VALUES (1231102153569996800, 1231102153360281600, 'name', '冯骏', '2020-02-22 14:23:20', '2020-02-22 14:23:20', 0); +INSERT INTO `t_mt_signin_other` VALUES (1231102153779712000, 1231102153360281600, 'phone', '18603454788', '2020-02-22 14:23:20', '2020-02-22 14:23:20', 0); +INSERT INTO `t_mt_signin_other` VALUES (1232564823984836608, 1232564822109982720, 'name', '冯骏', '2020-02-26 15:15:28', '2020-02-26 15:15:28', 0); +INSERT INTO `t_mt_signin_other` VALUES (1232564824211329024, 1232564822109982720, 'phone', '18603454788', '2020-02-26 15:15:28', '2020-02-26 15:15:28', 0); +INSERT INTO `t_mt_signin_other` VALUES (1232569962481192960, 1232569962258894848, 'name', '张野', '2020-02-26 15:35:53', '2020-02-26 15:35:53', 0); +INSERT INTO `t_mt_signin_other` VALUES (1232569962695102464, 1232569962258894848, 'phone', '15335153627', '2020-02-26 15:35:53', '2020-02-26 15:35:53', 0); + +-- ---------------------------- +-- Table structure for t_mt_topic +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_topic`; +CREATE TABLE `t_mt_topic` ( + `id` bigint(20) NOT NULL, + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '题目详情', + `link_type` tinyint(2) UNSIGNED NULL DEFAULT 1 COMMENT '环节类型 1志在必得 2以快制胜 3绝地反击 4你说我猜', + `topic_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '题目类型 0选择题单选 1多选题 2判断题 3填空题', + `score_rule` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '计分规则 0正常加分 1答错减分', + `score` int(11) NULL DEFAULT 0 COMMENT '分数', + `sequence` int(11) NULL DEFAULT 0 COMMENT '顺序', + `answers` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '答案', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题目表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_topic +-- ---------------------------- +INSERT INTO `t_mt_topic` VALUES (10001, '(多选题)以下哪种情况,公司不报销体检费用', 1, 1, 0, 10, 1, 'B,C,D', '2020-08-14 10:56:36', '2020-08-14 17:26:28', 0); +INSERT INTO `t_mt_topic` VALUES (10002, '(填空题)体检结果的有效期为( )个月。', 1, 3, 0, 10, 2, '6', '2020-08-14 10:57:52', '2020-08-14 17:25:48', 0); +INSERT INTO `t_mt_topic` VALUES (10003, '(填空题)投保人既往长险累积年交保费超过本人年收入的( )%时,此单会进入人工核保。', 1, 3, 0, 10, 3, '20', '2020-08-14 10:57:52', '2020-08-15 21:48:21', 0); +INSERT INTO `t_mt_topic` VALUES (10004, '(判断题)我公司可以接受客户自行提供的晚于投保日期的体检报告。', 1, 2, 0, 10, 4, 'F', '2020-08-14 10:57:52', '2020-08-14 17:25:21', 0); +INSERT INTO `t_mt_topic` VALUES (10005, '(单选题)早产儿是指孕周不超过( )的胎儿', 1, 0, 0, 10, 5, 'C', '2020-08-14 10:57:52', '2020-08-14 17:23:51', 0); +INSERT INTO `t_mt_topic` VALUES (10006, '(填空题)满期金和各种年金给付作业的申请资格人为( )。', 1, 3, 0, 10, 6, '被保险人', '2020-08-14 10:57:52', '2020-08-14 17:25:48', 0); +INSERT INTO `t_mt_topic` VALUES (10007, '(单选题)保单中不允许更换的是( )', 1, 0, 0, 10, 7, 'B', '2020-08-14 10:57:52', '2020-08-14 17:24:00', 0); +INSERT INTO `t_mt_topic` VALUES (10008, '(单选题)某金鼎富贵两全保险,投保人身故后,其继承人委托其中一子女申请保单退保,系统中应录入申请类型为( )', 1, 0, 0, 10, 8, 'A', '2020-08-14 10:57:52', '2020-08-14 17:24:05', 0); +INSERT INTO `t_mt_topic` VALUES (10009, '(填空题)当客户提供原账户申请退保业务时,线上保全支持退费金额( )万元及以下的业务。', 1, 3, 0, 10, 9, '50', '2020-08-14 10:57:52', '2020-08-14 17:25:48', 0); +INSERT INTO `t_mt_topic` VALUES (10010, '(填空题)人保E通操作“个险新增附加险”要求主险为( )。', 1, 3, 0, 10, 10, '无忧人生重大疾病保险或无忧一生重大疾病保险', '2020-08-14 10:57:52', '2020-08-14 17:25:48', 0); +INSERT INTO `t_mt_topic` VALUES (10011, '(单选题)理赔人员根据保险金申请人提供的索赔资料,结合投保单、健康告知、财务告知、体检资料、保单变更情况和既往赔付情况,对赔案进行审核,作出理赔结论并确定赔付金额,我们把这一过程称为( )。', 1, 0, 0, 10, 11, 'D ', '2020-08-14 10:57:52', '2020-08-14 17:24:19', 0); +INSERT INTO `t_mt_topic` VALUES (10012, '(单选题)被保险人在保险合同成立或者合同效力恢复之日起( )内自杀,但被保险人自杀时为无民事行为能力人的除外。', 1, 0, 0, 10, 12, 'B', '2020-08-14 10:57:52', '2020-08-14 17:24:22', 0); +INSERT INTO `t_mt_topic` VALUES (10013, '(判断题)暂时丧失全部或部分劳动能力、身体器官机能,不被认为是残疾。', 1, 2, 0, 10, 13, 'T', '2020-08-14 10:57:53', '2020-08-14 17:25:21', 0); +INSERT INTO `t_mt_topic` VALUES (10014, '(填空题)VIP星级客户,定级保费达到( )万元及以上的投保人或其名下有效保单的被保险人可享受重疾绿通服务。', 1, 3, 0, 10, 14, '2', '2020-08-14 10:57:53', '2020-08-14 17:25:48', 0); +INSERT INTO `t_mt_topic` VALUES (10015, '(多选题)以下哪种情况属于客户信息不真实( )', 1, 1, 0, 10, 15, 'A,B,C,D', '2020-08-14 10:57:53', '2020-08-14 17:25:04', 0); +INSERT INTO `t_mt_topic` VALUES (10016, '(多选题)人身险风险保额是以下哪些风险保额的合计:', 2, 1, 1, 10, 1, 'A,C', '2020-08-14 12:42:56', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10017, '(多选题)核保的意义是什么:', 2, 1, 1, 10, 2, 'A,B,C,D', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10018, '(填空题)巨大儿是指体重超过( )kg的胎儿。', 2, 3, 1, 10, 3, '4', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10019, '(判断题)我公司不接受现已在国外的人员投保。', 2, 2, 1, 10, 4, 'T', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10020, '(多选题)变更投保人时,须由( )在申请书上亲笔签字。', 2, 1, 1, 10, 5, 'A,B,C', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10021, '(多选题)团单退保应被文件包括( )', 2, 1, 1, 10, 6, 'A,B,C,D', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10022, '(判断题)某客户于2019年10月份购买我公司《人保寿险无忧人生2019重大疾病保险》保险金额30万元,缴费期间为20年,现客户申请将缴费期间变更为19年,客户需补交一部分保费。', 2, 2, 1, 10, 7, 'T', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10023, '(单选题)韩某作为投保人给子女投保无忧人生保险,由于未按时缴费导致保单进入停效状态,现韩某爱人想要变更投保人后由其进行继续缴费,下列说法正确的是( )。', 2, 0, 1, 10, 8, 'B', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10024, '(多选题)下列有关人身保险合同中受益人的描述,正确的为( )', 2, 1, 1, 10, 9, 'A,D', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10025, '(判断题)停效状态的保单可通过微信或者APP在线申请“保单联系资料变更”。', 2, 2, 1, 10, 10, 'T', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10026, '(单选题)怀孕7个月(28周)以上孕妇的投保要求,以下哪个是正确的:', 2, 0, 1, 10, 11, 'C', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10027, '(多选题)以下哪些情况需提交再保临分:', 2, 1, 1, 10, 12, 'A,B,C,D', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10028, '(多选题)核保结论的类型包括以下哪些:', 2, 1, 1, 10, 13, 'A,B,C,D', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10029, '(填空题)未成年人的免体检限额最高为( )万元。', 2, 3, 1, 10, 14, '70', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10030, '(单选题)下列哪一项不属于心理障碍( )。', 2, 0, 1, 10, 15, 'D', '2020-08-14 12:42:57', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10031, '(单选题)重大疾病的理赔申请人一般是( )。', 2, 0, 1, 10, 16, 'D', '2020-08-14 12:42:58', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10032, '(单选题)某人投保人身意外伤害保险一份,保险金额为100万元,在保险期间内发生意外伤害致残,之后,经有关部门鉴定,被保险人的伤残程度为10%,则保险人给付的保险金额是( )', 2, 0, 1, 10, 17, 'A', '2020-08-14 12:42:58', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10033, '(填空题)《保险法》第十六条规定,合同解除权,自保险人知道解除事由之日起,超过( )日不行使而消灭。', 2, 3, 1, 10, 18, '30', '2020-08-14 12:42:58', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10034, '(单选题)我公司VIP星级客户分为( )个等级。', 2, 0, 1, 10, 19, 'D', '2020-08-14 12:42:58', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10035, '(填空题)VIP客户享有增值服务权益有效期为( )年,申请服务权益以客户申请服务时的当前级别为准。', 2, 3, 1, 10, 20, '一', '2020-08-14 12:42:58', '2020-08-14 17:30:35', 0); +INSERT INTO `t_mt_topic` VALUES (10036, '(填空题)人保的企业愿景是( )', 3, 3, 1, 20, 1, '做人民信赖的卓越品牌', '2020-08-14 12:44:06', '2020-08-14 17:25:48', 0); +INSERT INTO `t_mt_topic` VALUES (10037, '(单选题)办理减额交清后,投保人以后继续享有的权益为( )', 3, 0, 1, 20, 2, 'D', '2020-08-14 12:44:06', '2020-08-14 17:24:41', 0); +INSERT INTO `t_mt_topic` VALUES (10038, '(多选题)脑中风后遗症的人,可能完全丧失自主生活能力,无法独立完成六项基本日常生活活动中的三项或三项以上。下列属于六项基本日常生活活动的有( )。', 3, 1, 1, 20, 3, 'A,B,C,D,E', '2020-08-14 12:44:06', '2020-08-14 17:25:04', 0); +INSERT INTO `t_mt_topic` VALUES (10039, '(多选题)哪些职业人员投保时,需要进一步提供财务问卷,核实收入来源:', 3, 1, 1, 30, 4, 'A,B,C,D', '2020-08-14 12:46:39', '2020-08-14 17:25:04', 0); +INSERT INTO `t_mt_topic` VALUES (10040, '(单选题)下列关于先天性疾病与遗传疾病说法不正确的是( )。', 3, 0, 1, 30, 5, 'C', '2020-08-14 12:46:56', '2020-08-14 17:24:44', 0); +INSERT INTO `t_mt_topic` VALUES (10041, '(多选题)以下属于《中国人民人寿保险股份有限公司山西省分公司保险销售从业人员诚信品质综合评价管理办法》中一般失信行为的是( )', 3, 1, 1, 30, 6, 'A,B,C,D', '2020-08-14 12:46:56', '2020-08-14 17:25:04', 0); +INSERT INTO `t_mt_topic` VALUES (10042, '(多选题)对于烧伤深度,目前临床上普遍采用三度四分法,即根据烧伤的深度分为( )。', 3, 1, 1, 50, 7, 'A,B,C,E', '2020-08-14 12:46:56', '2020-08-14 17:25:04', 0); +INSERT INTO `t_mt_topic` VALUES (10043, '(填空题)巴总在年度工作会上提出的四强的经营理念分别是( )、( )、( )、( )。', 3, 3, 1, 50, 8, '强队伍,强管理,强合规,强服务', '2020-08-14 12:46:56', '2020-08-14 17:25:48', 0); +INSERT INTO `t_mt_topic` VALUES (10044, '(填空题)集团一体化柜面要达到“三个统一”,“三个统一”分别是( )、( )、( )。', 3, 3, 1, 50, 9, '统一形象,统一服务,统一标识', '2020-08-14 12:46:56', '2020-08-14 17:25:48', 0); +INSERT INTO `t_mt_topic` VALUES (10045, '保单利益', 4, 4, 0, 5, 1, '', '2020-08-14 17:43:55', '2020-08-14 17:43:55', 0); +INSERT INTO `t_mt_topic` VALUES (10046, '盲人摸象', 4, 4, 0, 5, 2, '', '2020-08-14 17:43:55', '2020-08-14 17:43:55', 0); +INSERT INTO `t_mt_topic` VALUES (10047, '党员', 4, 4, 0, 5, 3, '', '2020-08-14 17:43:55', '2020-08-14 17:43:55', 0); +INSERT INTO `t_mt_topic` VALUES (10048, '瑜伽', 4, 4, 0, 5, 4, '', '2020-08-14 17:43:55', '2020-08-14 17:43:55', 0); +INSERT INTO `t_mt_topic` VALUES (10049, '酸辣粉', 4, 4, 0, 5, 5, '', '2020-08-14 17:43:55', '2020-08-14 17:43:55', 0); +INSERT INTO `t_mt_topic` VALUES (10050, '身份证', 4, 4, 0, 5, 6, '', '2020-08-14 17:43:55', '2020-08-14 17:43:55', 0); +INSERT INTO `t_mt_topic` VALUES (10051, '朝三暮四', 4, 4, 0, 5, 7, '', '2020-08-14 17:43:55', '2020-08-14 17:43:55', 0); +INSERT INTO `t_mt_topic` VALUES (10052, '开门红', 4, 4, 0, 5, 8, '', '2020-08-14 17:43:55', '2020-08-14 17:43:55', 0); +INSERT INTO `t_mt_topic` VALUES (10053, '客户服务', 4, 4, 0, 5, 9, '', '2020-08-14 17:43:55', '2020-08-14 18:35:02', 0); +INSERT INTO `t_mt_topic` VALUES (10054, '从严治党', 4, 4, 0, 5, 10, '', '2020-08-14 17:43:55', '2020-08-14 18:35:05', 0); +INSERT INTO `t_mt_topic` VALUES (10055, '现金价值', 4, 4, 0, 5, 11, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10056, '抱头鼠窜', 4, 4, 0, 5, 12, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10057, '群众', 4, 4, 0, 5, 13, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10058, '羽毛球', 4, 4, 0, 5, 14, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10059, '麻婆豆腐', 4, 4, 0, 5, 15, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10060, '受益人', 4, 4, 0, 5, 16, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10061, '拔刀相助', 4, 4, 0, 5, 17, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10062, '科技赋能', 4, 4, 0, 5, 18, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10063, '增值服务', 4, 4, 0, 5, 19, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10064, '亿元保费投诉量', 4, 4, 0, 5, 20, '', '2020-08-14 18:31:51', '2020-08-15 13:55:55', 0); +INSERT INTO `t_mt_topic` VALUES (10065, '保险合同', 4, 4, 0, 5, 21, '', '2020-08-14 18:31:51', '2020-08-15 13:56:25', 0); +INSERT INTO `t_mt_topic` VALUES (10066, '守株待兔', 4, 4, 0, 5, 22, '', '2020-08-14 18:31:51', '2020-08-15 13:56:25', 0); +INSERT INTO `t_mt_topic` VALUES (10067, '薪水', 4, 4, 0, 5, 23, '', '2020-08-14 18:31:51', '2020-08-15 13:56:25', 0); +INSERT INTO `t_mt_topic` VALUES (10068, '合同终止', 4, 4, 0, 5, 24, '', '2020-08-14 18:31:51', '2020-08-15 13:56:25', 0); +INSERT INTO `t_mt_topic` VALUES (10069, '榴莲', 4, 4, 0, 5, 25, '', '2020-08-14 18:31:51', '2020-08-15 13:56:25', 0); +INSERT INTO `t_mt_topic` VALUES (10070, '合规', 4, 4, 0, 5, 26, '', '2020-08-14 18:31:51', '2020-08-15 13:56:25', 0); +INSERT INTO `t_mt_topic` VALUES (10071, '过桥米线', 4, 4, 0, 5, 27, '', '2020-08-14 18:31:51', '2020-08-15 13:56:25', 0); +INSERT INTO `t_mt_topic` VALUES (10072, '狼吞虎咽', 4, 4, 0, 5, 28, '', '2020-08-14 18:31:51', '2020-08-15 13:56:25', 0); +INSERT INTO `t_mt_topic` VALUES (10073, '磐石计划', 4, 4, 0, 5, 29, '', '2020-08-14 18:31:52', '2020-08-15 13:56:25', 0); +INSERT INTO `t_mt_topic` VALUES (10074, '理赔出险支付时效', 4, 4, 0, 5, 30, '', '2020-08-14 18:31:52', '2020-08-15 13:56:25', 0); + +-- ---------------------------- +-- Table structure for t_mt_topic_option +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_topic_option`; +CREATE TABLE `t_mt_topic_option` ( + `id` bigint(20) NOT NULL, + `topic_id` bigint(20) NULL DEFAULT 0 COMMENT '题目id', + `contant` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '选项内容', + `sequence` int(11) NULL DEFAULT 0 COMMENT '顺序', + `option` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '选项', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `topic_index`(`topic_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题目选项表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_topic_option +-- ---------------------------- +INSERT INTO `t_mt_topic_option` VALUES (100011, 10001, '保单承保并过犹豫期后', 1, 'A', '2020-08-14 10:56:36', '2020-08-14 10:56:36', 0); +INSERT INTO `t_mt_topic_option` VALUES (100012, 10001, '客户自行增加体检项目', 2, 'B', '2020-08-14 10:56:36', '2020-08-14 10:56:36', 0); +INSERT INTO `t_mt_topic_option` VALUES (100013, 10001, '由我公司下发体检,体检完毕后延期的保单', 3, 'C', '2020-08-14 10:56:36', '2020-08-14 10:56:36', 0); +INSERT INTO `t_mt_topic_option` VALUES (100014, 10001, '申请复效达标体检完成后,继续标体承保的', 4, 'D', '2020-08-14 10:56:36', '2020-08-14 10:56:36', 0); +INSERT INTO `t_mt_topic_option` VALUES (100051, 10005, '28周', 1, 'A', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100052, 10005, '36周', 2, 'B', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100053, 10005, '37周', 3, 'C', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100054, 10005, '40周', 4, 'D', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100071, 10007, '投保人', 1, 'A', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100072, 10007, '被保险人', 2, 'B', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100073, 10007, '受益人', 3, 'C', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100074, 10007, '保全申请人', 4, 'D', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100081, 10008, '继承人', 1, 'A', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100082, 10008, '投保人', 2, 'B', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100083, 10008, '受益人', 3, 'C', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100084, 10008, '受托人', 4, 'D', '2020-08-14 10:57:52', '2020-08-16 08:47:03', 0); +INSERT INTO `t_mt_topic_option` VALUES (100111, 10011, '理赔报案', 1, 'A', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100112, 10011, '理赔受理', 2, 'B', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100113, 10011, '理赔调查', 3, 'C', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100114, 10011, '理赔审核', 4, 'D', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100121, 10012, '1年', 1, 'A', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100122, 10012, '2年', 2, 'B', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100123, 10012, '3年', 3, 'C', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100124, 10012, '5年', 4, 'D', '2020-08-14 10:57:52', '2020-08-14 10:57:52', 0); +INSERT INTO `t_mt_topic_option` VALUES (100151, 10015, '投保时,被保险人用自己配偶的联系电话', 1, 'A', '2020-08-14 10:57:53', '2020-08-14 10:57:53', 0); +INSERT INTO `t_mt_topic_option` VALUES (100152, 10015, '非自保件用销售人员的联系电话', 2, 'B', '2020-08-14 10:57:53', '2020-08-14 10:57:53', 0); +INSERT INTO `t_mt_topic_option` VALUES (100153, 10015, '客户办理保全时留存的联系电话与核心系统不一致,客户可以不进行变更', 3, 'C', '2020-08-14 10:57:53', '2020-08-14 10:57:53', 0); +INSERT INTO `t_mt_topic_option` VALUES (100154, 10015, '投、被保人申请理赔案件时留存的联系电话与核心系统不一致,客户可以不进行变更', 4, 'D', '2020-08-14 10:57:53', '2020-08-14 10:57:53', 0); +INSERT INTO `t_mt_topic_option` VALUES (100161, 10016, '寿险风险保额', 1, 'A', '2020-08-14 12:42:56', '2020-08-14 12:42:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100162, 10016, '重疾险风险保额', 2, 'B', '2020-08-14 12:42:56', '2020-08-14 12:42:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100163, 10016, '意外险风险保额', 3, 'C', '2020-08-14 12:42:56', '2020-08-14 12:42:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100164, 10016, '医疗险风险保额', 4, 'D', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100171, 10017, '公平对待保单持有人', 1, 'A', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100172, 10017, '保持竞争力', 2, 'B', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100173, 10017, '防止逆选择', 3, 'C', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100174, 10017, '尽可能扩大承保人群范围', 4, 'D', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100201, 10020, '原投保人', 1, 'A', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100202, 10020, '被保险人', 2, 'B', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100203, 10020, '新投保人', 3, 'C', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100204, 10020, '受益人', 4, 'D', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100211, 10021, '保险合同', 1, 'A', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100212, 10021, '团体保险合同解除申请书', 2, 'B', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100213, 10021, '投保人身份证明文件及经办人身份证件', 3, 'C', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100214, 10021, '被保险人知悉合同解除的有效证明', 4, 'D', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100231, 10023, '需要原投保人申请复效后再办理投保人变更 ', 1, 'A', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100232, 10023, '无需复效可以直接申请投保人变更', 2, 'B', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100233, 10023, '变更投保人时无需被保险人签名同意', 3, 'C', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100234, 10023, '变更投保人时只需新投保人亲自来柜面申请', 4, 'D', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100241, 10024, '受益人可以为一人或者数人', 1, 'A', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100242, 10024, '受益人只能由投保人单独指定', 2, 'B', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100243, 10024, '投保人可以单独变更受益人,而不须经被保险人同意', 3, 'C', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100244, 10024, '受益人先于被保险人死亡的且无其他受益人的,保险金作为被保险人的遗产由其继承人继承', 4, 'D', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100261, 10026, '需要提供相关的产检报告、围产保健手册', 1, 'A', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100262, 10026, '延期到产后2个月才能考虑投保', 2, 'B', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100263, 10026, '延期到产后1个月才能考虑投保', 3, 'C', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100264, 10026, '按照正常保单处理', 4, 'D', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100271, 10027, '未成年人累计重疾保额> 120万', 1, 'A', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100272, 10027, '未成年人投保 18 周岁之前身故返还保费的产品时,累计人身险风险保额> 300 万元。', 2, 'B', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100273, 10027, '成年人累计重疾保额> 150万', 3, 'C', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100274, 10027, '成年人累计人身险风险保额大于>500万元。', 4, 'D', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100281, 10028, '标体通过', 1, 'A', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100282, 10028, '加费承保', 2, 'B', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100283, 10028, '责任免除', 3, 'C', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100284, 10028, '延期或拒保', 4, 'D', '2020-08-14 12:42:57', '2020-08-14 12:42:57', 0); +INSERT INTO `t_mt_topic_option` VALUES (100301, 10030, '强迫症', 1, 'A', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100302, 10030, '焦虑症', 2, 'B', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100303, 10030, '神经衰弱', 3, 'C', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100304, 10030, '精神分裂症', 4, 'D', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100311, 10031, '投保人', 1, 'A', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100312, 10031, '指定受益人', 2, 'B', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100313, 10031, '法定受益人', 3, 'C', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100314, 10031, '被保险人本人', 4, 'D', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100321, 10032, '10万元', 1, 'A', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100322, 10032, '20万元', 2, 'B', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100323, 10032, '90万元', 3, 'C', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100324, 10032, '100万元', 4, 'D', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100341, 10034, '3', 1, 'A', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100342, 10034, '5', 2, 'B', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100343, 10034, '6', 3, 'C', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100344, 10034, '7', 4, 'D', '2020-08-14 12:42:58', '2020-08-14 12:42:58', 0); +INSERT INTO `t_mt_topic_option` VALUES (100371, 10037, '保额变更', 1, 'A', '2020-08-14 12:44:06', '2020-08-14 12:44:06', 0); +INSERT INTO `t_mt_topic_option` VALUES (100372, 10037, '分红', 2, 'B', '2020-08-14 12:44:06', '2020-08-14 12:44:06', 0); +INSERT INTO `t_mt_topic_option` VALUES (100373, 10037, '借款', 3, 'C', '2020-08-14 12:44:06', '2020-08-14 12:44:06', 0); +INSERT INTO `t_mt_topic_option` VALUES (100374, 10037, '挂失补发', 4, 'D', '2020-08-14 12:44:06', '2020-08-14 12:44:06', 0); +INSERT INTO `t_mt_topic_option` VALUES (100381, 10038, '自己能够穿衣及脱衣', 1, 'A', '2020-08-14 12:44:06', '2020-08-14 12:44:06', 0); +INSERT INTO `t_mt_topic_option` VALUES (100382, 10038, '自己从一个房间到另一个房间', 2, 'B', '2020-08-14 12:44:06', '2020-08-14 12:44:06', 0); +INSERT INTO `t_mt_topic_option` VALUES (100383, 10038, '自己上下床或上下轮椅', 3, 'C', '2020-08-14 12:44:07', '2020-08-14 12:44:07', 0); +INSERT INTO `t_mt_topic_option` VALUES (100384, 10038, '自己控制进行大小便', 4, 'D', '2020-08-14 12:44:07', '2020-08-14 12:44:07', 0); +INSERT INTO `t_mt_topic_option` VALUES (100385, 10038, '自己从已准备好的碗或碟中取食物放入口中', 5, 'E', '2020-08-14 12:44:07', '2020-08-14 12:44:07', 0); +INSERT INTO `t_mt_topic_option` VALUES (100391, 10039, '下岗人员', 1, 'A', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100392, 10039, '无业人员', 2, 'B', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100393, 10039, '待业人员', 3, 'C', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100394, 10039, '自营投资业者', 4, 'D', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100401, 10040, '先天性疾病是指出生时已经出现的疾病,它可能是遗传病引起,也可能是因为妊娠早期某些理化和生物因素所致', 1, 'A', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100402, 10040, '遗传性疾病是指因一种或多种遗传基因缺陷导致的疾病,有的在出生时表现出来,也有的随着生长发育表现出来', 2, 'B', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100403, 10040, '先天性疾病与遗传性疾病均涉及环境因素和遗传因素', 3, 'C', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100404, 10040, '存在某些疾病,它们既是先天性又是遗传性疾病', 4, 'D', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100411, 10041, '未按监管和公司规定开展落实保险销售行为可回溯管理工作,或违反相关管理要求。', 1, 'A', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100412, 10041, '诱导、唆使投保人为购买新的保险产品终止保险合同,损害投保人、被保险人或者受益人合法权益;', 2, 'B', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100413, 10041, '营销扰民,在客户明确拒绝投保后干扰客户;', 3, 'C', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100414, 10041, '因不当销售行为或服务行为,引发客户向公司内部投诉;', 4, 'D', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100421, 10042, 'Ⅰ度', 1, 'A', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100422, 10042, '浅Ⅱ度', 2, 'B', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100423, 10042, '深Ⅱ度', 3, 'C', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100424, 10042, '浅Ⅲ度', 4, 'D', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); +INSERT INTO `t_mt_topic_option` VALUES (100425, 10042, 'Ⅲ度', 5, 'E', '2020-08-14 12:46:56', '2020-08-14 12:46:56', 0); + +-- ---------------------------- +-- Table structure for t_mt_vote +-- ---------------------------- +DROP TABLE IF EXISTS `t_mt_vote`; +CREATE TABLE `t_mt_vote` ( + `id` bigint(20) NOT NULL, + `user_id` bigint(20) NULL DEFAULT 0 COMMENT '用户id', + `group_id` bigint(20) NULL DEFAULT 0 COMMENT '分组id', + `created_at` timestamp(0) NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), + `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `user_index`(`user_id`) USING BTREE, + INDEX `group_index`(`group_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '投票表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of t_mt_vote +-- ---------------------------- +INSERT INTO `t_mt_vote` VALUES (1294558962590552064, 1217651354919636992, 13, '2020-08-15 16:58:03', '2020-08-15 17:03:12', 2); +INSERT INTO `t_mt_vote` VALUES (1294558962594746368, 1217651354919636992, 14, '2020-08-15 16:58:03', '2020-08-15 17:03:12', 2); +INSERT INTO `t_mt_vote` VALUES (1294559005955461120, 1217647686598135808, 15, '2020-08-15 16:58:13', '2020-08-15 17:03:12', 2); +INSERT INTO `t_mt_vote` VALUES (1294559005959655424, 1217647686598135808, 16, '2020-08-15 16:58:13', '2020-08-15 17:03:12', 2); +INSERT INTO `t_mt_vote` VALUES (1294559205847601152, 1218855229722857472, 15, '2020-08-15 16:59:01', '2020-08-15 17:03:12', 2); +INSERT INTO `t_mt_vote` VALUES (1294559205855989760, 1218855229722857472, 14, '2020-08-15 16:59:01', '2020-08-15 17:03:12', 2); +INSERT INTO `t_mt_vote` VALUES (1294559223228796928, 1218025249493356544, 15, '2020-08-15 16:59:05', '2020-08-15 17:03:12', 2); +INSERT INTO `t_mt_vote` VALUES (1294559223232991232, 1218025249493356544, 16, '2020-08-15 16:59:05', '2020-08-15 17:03:12', 2); +INSERT INTO `t_mt_vote` VALUES (1294559542243364864, 1218762175573790720, 12, '2020-08-15 17:00:21', '2020-08-15 17:03:12', 2); +INSERT INTO `t_mt_vote` VALUES (1294559542243364865, 1218762175573790720, 15, '2020-08-15 17:00:21', '2020-08-15 17:03:12', 2); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/pims/pom.xml b/pims/pom.xml new file mode 100644 index 00000000..8e3314f4 --- /dev/null +++ b/pims/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + + ccsenscloud + com.ccsens + 1.0-SNAPSHOT + + + pims + + + 1.8 + + + + + + + cloudutil + com.ccsens + 1.0-SNAPSHOT + + + + util + com.ccsens + 1.0-SNAPSHOT + + + + + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.7 + + ${basedir}/src/main/resources/mbg.xml + true + + + + mysql + mysql-connector-java + 5.1.34 + + + + + org.springframework.boot + spring-boot-maven-plugin + + com.ccsens.pims.PimsApplication + + + + + + repackage + + + + + + + + + diff --git a/pims/src/main/java/com/ccsens/pims/PimsApplication.java b/pims/src/main/java/com/ccsens/pims/PimsApplication.java new file mode 100644 index 00000000..d8c7afc4 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/PimsApplication.java @@ -0,0 +1,28 @@ +package com.ccsens.pims; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.ServletComponentScan; +import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableAsync; + + +/** + * @author 逗 + */ +@MapperScan(basePackages = {"com.ccsens.pims.persist.*"}) +@ServletComponentScan +@EnableAsync +//开启断路器功能 +@EnableCircuitBreaker +@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign") +@SpringBootApplication(scanBasePackages = "com.ccsens") +public class PimsApplication { + + public static void main(String[] args) { + SpringApplication.run(PimsApplication.class, args); + } + +} diff --git a/pims/src/main/java/com/ccsens/pims/api/DebugController.java b/pims/src/main/java/com/ccsens/pims/api/DebugController.java new file mode 100644 index 00000000..9705260e --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/api/DebugController.java @@ -0,0 +1,33 @@ +package com.ccsens.pims.api; + + +import com.ccsens.pims.bean.dto.CompanyDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +@Slf4j +@Api(tags = "DEBUG" , description = "DebugController | ") +@RestController +@RequestMapping("/debug") +public class DebugController { + + @ApiOperation(value = "/测试",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value="",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) + public String getSmsCode(HttpServletRequest request, @Validated @RequestBody CompanyDto.Async async) throws Exception { + log.info("pims测试:{}",async.toString()); + return "pims测试"; + } + + + +} diff --git a/pims/src/main/java/com/ccsens/pims/api/ProductController.java b/pims/src/main/java/com/ccsens/pims/api/ProductController.java new file mode 100644 index 00000000..91155008 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/api/ProductController.java @@ -0,0 +1,96 @@ +package com.ccsens.pims.api; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.pims.bean.dto.CompanyDto; +import com.ccsens.pims.bean.vo.CompanyVo; +import com.ccsens.pims.bean.vo.ProductVo; +import com.ccsens.pims.service.IProductService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "产品相关api") +@RestController +@RequestMapping("/chart") +public class ProductController { + @Resource + private IProductService productService; + + @MustLogin + @ApiOperation(value = "查看产品价格依据信息", notes = "") + @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryProductInfo(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看产品价格使用依据表:{}",params); + List productTypeList = productService.queryProductInfo(params); + return JsonResponse.newInstance().ok(productTypeList); + } + + @MustLogin + @ApiOperation(value = "查看单个产品销售收入", notes = "") + @RequestMapping(value = "/product", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getProductIncome(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看单个产品销售收入:{}",params); + List productIncomeList = productService.getProductIncome(params); + return JsonResponse.newInstance().ok(productIncomeList); + } + + @MustLogin + @ApiOperation(value = "查看所有产品销售收入", notes = "") + @RequestMapping(value = "/product/all", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryProductIncome(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("查看所有产品销售收入:{}",params); + List productIncomeList = productService.queryProductIncome(params); + return JsonResponse.newInstance().ok(productIncomeList); + } + + @MustLogin + @ApiOperation(value = "产品总收入占比图", notes = "") + @RequestMapping(value = "/income/proportion", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryProductIncomeProportion(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("产品总收入占比图:{}",params); + List productIncomeProportions = productService.queryProductIncomeProportion(params); + return JsonResponse.newInstance().ok(productIncomeProportions); + } + + @MustLogin + @ApiOperation(value = "总成本费用估算表", notes = "") + @RequestMapping(value = "/cost", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getTotalCost(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("总成本费用估算表:{}",params); + List monthCosts = productService.getTotalCost(params); + return JsonResponse.newInstance().ok(monthCosts); + } + + @MustLogin + @ApiOperation(value = "损益表", notes = "") + @RequestMapping(value = "/income", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getIncome(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("损益表:{}",params); + List incomeList = productService.queryIncome(params); + return JsonResponse.newInstance().ok(incomeList); + } + + @MustLogin + @ApiOperation(value = "现金流表", notes = "") + @RequestMapping(value = "/money", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getMonth(@ApiParam @Validated @RequestBody QueryDto params) { + log.info("现金流表:{}",params); + List moneyFlowTypes = productService.getMonthFlow(params); + return JsonResponse.newInstance().ok(moneyFlowTypes); + } +} diff --git a/pims/src/main/java/com/ccsens/pims/api/ReadController.java b/pims/src/main/java/com/ccsens/pims/api/ReadController.java new file mode 100644 index 00000000..51a17e99 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/api/ReadController.java @@ -0,0 +1,70 @@ +package com.ccsens.pims.api; + +import com.ccsens.pims.bean.dto.CompanyDto; +import com.ccsens.pims.service.IRealExcelService; +import com.ccsens.util.JsonResponse; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "报表相关api") +@RestController +@RequestMapping("/read") +public class ReadController { + + @Resource + private IRealExcelService realExcelService; + + + @ApiOperation(value = "读取产品价格依据表", notes = "") + @RequestMapping(value = "/product", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse realProduct(@Validated @RequestBody CompanyDto.Async async) throws Exception { + log.info("读取产品价格依据表:{}",async.toString()); + realExcelService.realProduct(async); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "读取产值及附加估算表", notes = "") + @RequestMapping(value = "/production", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse realProduction(@Validated @RequestBody CompanyDto.Async async) throws Exception { + log.info("读取产值及附加估算表:{}",async.toString()); + realExcelService.realProduction(async); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "读取总成本费用估算表", notes = "") + @RequestMapping(value = "/cost", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse realCost(@Validated @RequestBody CompanyDto.Async async) throws Exception { + log.info("读取总成本费用估算表:{}",async.toString()); + realExcelService.realCost(async); + return JsonResponse.newInstance().ok(); + } + + + @ApiOperation(value = "读取损益表表", notes = "") + @RequestMapping(value = "/income", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse realIncome(@Validated @RequestBody CompanyDto.Async async) throws Exception { + log.info("读取损益表表:{}",async.toString()); + realExcelService.realIncome(async); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "读取现金流表", notes = "") + @RequestMapping(value = "/money", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse realMoney(@Validated @RequestBody CompanyDto.Async async) throws Exception { + log.info("读取现金流表:{}",async.toString()); + realExcelService.realMoney(async); + return JsonResponse.newInstance().ok(); + } +} diff --git a/pims/src/main/java/com/ccsens/pims/api/ReportController.java b/pims/src/main/java/com/ccsens/pims/api/ReportController.java new file mode 100644 index 00000000..dc065cde --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/api/ReportController.java @@ -0,0 +1,76 @@ +package com.ccsens.pims.api; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.pims.bean.dto.CompanyDto; +import com.ccsens.pims.service.IReportService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "报表相关api") +@RestController +@RequestMapping("/report") +public class ReportController { + @Resource + private IReportService reportService; + + @MustLogin + @ApiOperation(value = "查看产品价格使用依据表", notes = "") + @RequestMapping(value = "/product", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getProduct(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + log.info("查看产品价格使用依据表:{}",params); + List wpsFilePath = reportService.getProduct(params); + return JsonResponse.newInstance().ok(wpsFilePath); + } + + @MustLogin + @ApiOperation(value = "查看产值及附加估算表", notes = "") + @RequestMapping(value = "/production", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getProduction(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + log.info("查看产值及附加估算表:{}",params); + List wpsFilePath = reportService.getProduction(params); + return JsonResponse.newInstance().ok(wpsFilePath); + } + + @MustLogin + @ApiOperation(value = "查看总成本费用估算表", notes = "") + @RequestMapping(value = "/cost", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getCost(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + log.info("查看总成本费用估算表:{}",params); + List wpsFilePath = reportService.getCost(params); + return JsonResponse.newInstance().ok(wpsFilePath); + } + + @MustLogin + @ApiOperation(value = "查看损益表表", notes = "") + @RequestMapping(value = "/income", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getIncome(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + log.info("查看损益表表:{}",params); + List wpsFilePath = reportService.getIncome(params); + return JsonResponse.newInstance().ok(wpsFilePath); + } + + @MustLogin + @ApiOperation(value = "查看现金流表", notes = "") + @RequestMapping(value = "/money", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getMoney(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + log.info("查看现金流表:{}",params); + List wpsFilePath = reportService.getMoney(params); + return JsonResponse.newInstance().ok(wpsFilePath); + } +} diff --git a/pims/src/main/java/com/ccsens/pims/bean/dto/CompanyDto.java b/pims/src/main/java/com/ccsens/pims/bean/dto/CompanyDto.java new file mode 100644 index 00000000..16a0a48e --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/dto/CompanyDto.java @@ -0,0 +1,60 @@ +package com.ccsens.pims.bean.dto; + +import cn.hutool.core.date.DateUtil; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; +import java.util.Date; + +/** + * @author 逗 + */ +@Data +public class CompanyDto { + + @Data + @ApiModel("项目id") + public static class Project{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("年份 默认当前年份") + private int year = DateUtil.year(new Date()); + @Min(1) + @Max(12) + @ApiModelProperty("开始月 默认1月") + private int startMonth = 1; + @Min(1) + @Max(12) + @ApiModelProperty("结束月 默认12月") + private int endMonth = 12; + } + + @Data + @ApiModel("产品id") + public static class Product{ + @NotNull + @ApiModelProperty("产品id") + private Long productId; + } + + @Data + @ApiModel("读取的excel文件的路径") + public static class FilePath{ + @NotNull + @ApiModelProperty("文件路径") + private String path; + } + + @Data + @ApiModel + public static class Async{ + @NotNull + @ApiModelProperty("文件ID") + private Long fileId; + } +} diff --git a/pims/src/main/java/com/ccsens/pims/bean/dto/ProductDto.java b/pims/src/main/java/com/ccsens/pims/bean/dto/ProductDto.java new file mode 100644 index 00000000..4edaa77b --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/dto/ProductDto.java @@ -0,0 +1,4 @@ +package com.ccsens.pims.bean.dto; + +public class ProductDto { +} diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/Company.java b/pims/src/main/java/com/ccsens/pims/bean/po/Company.java new file mode 100644 index 00000000..40ab9b13 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/Company.java @@ -0,0 +1,95 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class Company implements Serializable { + private Long id; + + private Long projectId; + + private String name; + + private Long balance; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Long getBalance() { + return balance; + } + + public void setBalance(Long balance) { + this.balance = balance; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", name=").append(name); + sb.append(", balance=").append(balance); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CompanyExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/CompanyExample.java new file mode 100644 index 00000000..47fe79d7 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/CompanyExample.java @@ -0,0 +1,631 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CompanyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CompanyExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andBalanceIsNull() { + addCriterion("balance is null"); + return (Criteria) this; + } + + public Criteria andBalanceIsNotNull() { + addCriterion("balance is not null"); + return (Criteria) this; + } + + public Criteria andBalanceEqualTo(Long value) { + addCriterion("balance =", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceNotEqualTo(Long value) { + addCriterion("balance <>", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceGreaterThan(Long value) { + addCriterion("balance >", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceGreaterThanOrEqualTo(Long value) { + addCriterion("balance >=", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceLessThan(Long value) { + addCriterion("balance <", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceLessThanOrEqualTo(Long value) { + addCriterion("balance <=", value, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceIn(List values) { + addCriterion("balance in", values, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceNotIn(List values) { + addCriterion("balance not in", values, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceBetween(Long value1, Long value2) { + addCriterion("balance between", value1, value2, "balance"); + return (Criteria) this; + } + + public Criteria andBalanceNotBetween(Long value1, Long value2) { + addCriterion("balance not between", value1, value2, "balance"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CostLog.java b/pims/src/main/java/com/ccsens/pims/bean/po/CostLog.java new file mode 100644 index 00000000..5fcf2f8f --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/CostLog.java @@ -0,0 +1,128 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CostLog implements Serializable { + private Long id; + + private Long costTypeId; + + private Byte productCost; + + private Integer yearTime; + + private Integer monthTime; + + private Long predictCost; + + private Long realCost; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCostTypeId() { + return costTypeId; + } + + public void setCostTypeId(Long costTypeId) { + this.costTypeId = costTypeId; + } + + public Byte getProductCost() { + return productCost; + } + + public void setProductCost(Byte productCost) { + this.productCost = productCost; + } + + public Integer getYearTime() { + return yearTime; + } + + public void setYearTime(Integer yearTime) { + this.yearTime = yearTime; + } + + public Integer getMonthTime() { + return monthTime; + } + + public void setMonthTime(Integer monthTime) { + this.monthTime = monthTime; + } + + public Long getPredictCost() { + return predictCost; + } + + public void setPredictCost(Long predictCost) { + this.predictCost = predictCost; + } + + public Long getRealCost() { + return realCost; + } + + public void setRealCost(Long realCost) { + this.realCost = realCost; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", costTypeId=").append(costTypeId); + sb.append(", productCost=").append(productCost); + sb.append(", yearTime=").append(yearTime); + sb.append(", monthTime=").append(monthTime); + sb.append(", predictCost=").append(predictCost); + sb.append(", realCost=").append(realCost); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CostLogExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/CostLogExample.java new file mode 100644 index 00000000..8c71384f --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/CostLogExample.java @@ -0,0 +1,801 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CostLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CostLogExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCostTypeIdIsNull() { + addCriterion("cost_type_id is null"); + return (Criteria) this; + } + + public Criteria andCostTypeIdIsNotNull() { + addCriterion("cost_type_id is not null"); + return (Criteria) this; + } + + public Criteria andCostTypeIdEqualTo(Long value) { + addCriterion("cost_type_id =", value, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdNotEqualTo(Long value) { + addCriterion("cost_type_id <>", value, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdGreaterThan(Long value) { + addCriterion("cost_type_id >", value, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdGreaterThanOrEqualTo(Long value) { + addCriterion("cost_type_id >=", value, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdLessThan(Long value) { + addCriterion("cost_type_id <", value, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdLessThanOrEqualTo(Long value) { + addCriterion("cost_type_id <=", value, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdIn(List values) { + addCriterion("cost_type_id in", values, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdNotIn(List values) { + addCriterion("cost_type_id not in", values, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdBetween(Long value1, Long value2) { + addCriterion("cost_type_id between", value1, value2, "costTypeId"); + return (Criteria) this; + } + + public Criteria andCostTypeIdNotBetween(Long value1, Long value2) { + addCriterion("cost_type_id not between", value1, value2, "costTypeId"); + return (Criteria) this; + } + + public Criteria andProductCostIsNull() { + addCriterion("product_cost is null"); + return (Criteria) this; + } + + public Criteria andProductCostIsNotNull() { + addCriterion("product_cost is not null"); + return (Criteria) this; + } + + public Criteria andProductCostEqualTo(Byte value) { + addCriterion("product_cost =", value, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostNotEqualTo(Byte value) { + addCriterion("product_cost <>", value, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostGreaterThan(Byte value) { + addCriterion("product_cost >", value, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostGreaterThanOrEqualTo(Byte value) { + addCriterion("product_cost >=", value, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostLessThan(Byte value) { + addCriterion("product_cost <", value, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostLessThanOrEqualTo(Byte value) { + addCriterion("product_cost <=", value, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostIn(List values) { + addCriterion("product_cost in", values, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostNotIn(List values) { + addCriterion("product_cost not in", values, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostBetween(Byte value1, Byte value2) { + addCriterion("product_cost between", value1, value2, "productCost"); + return (Criteria) this; + } + + public Criteria andProductCostNotBetween(Byte value1, Byte value2) { + addCriterion("product_cost not between", value1, value2, "productCost"); + return (Criteria) this; + } + + public Criteria andYearTimeIsNull() { + addCriterion("year_time is null"); + return (Criteria) this; + } + + public Criteria andYearTimeIsNotNull() { + addCriterion("year_time is not null"); + return (Criteria) this; + } + + public Criteria andYearTimeEqualTo(Integer value) { + addCriterion("year_time =", value, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeNotEqualTo(Integer value) { + addCriterion("year_time <>", value, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeGreaterThan(Integer value) { + addCriterion("year_time >", value, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("year_time >=", value, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeLessThan(Integer value) { + addCriterion("year_time <", value, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeLessThanOrEqualTo(Integer value) { + addCriterion("year_time <=", value, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeIn(List values) { + addCriterion("year_time in", values, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeNotIn(List values) { + addCriterion("year_time not in", values, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeBetween(Integer value1, Integer value2) { + addCriterion("year_time between", value1, value2, "yearTime"); + return (Criteria) this; + } + + public Criteria andYearTimeNotBetween(Integer value1, Integer value2) { + addCriterion("year_time not between", value1, value2, "yearTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeIsNull() { + addCriterion("month_time is null"); + return (Criteria) this; + } + + public Criteria andMonthTimeIsNotNull() { + addCriterion("month_time is not null"); + return (Criteria) this; + } + + public Criteria andMonthTimeEqualTo(Integer value) { + addCriterion("month_time =", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotEqualTo(Integer value) { + addCriterion("month_time <>", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeGreaterThan(Integer value) { + addCriterion("month_time >", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("month_time >=", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeLessThan(Integer value) { + addCriterion("month_time <", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeLessThanOrEqualTo(Integer value) { + addCriterion("month_time <=", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeIn(List values) { + addCriterion("month_time in", values, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotIn(List values) { + addCriterion("month_time not in", values, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeBetween(Integer value1, Integer value2) { + addCriterion("month_time between", value1, value2, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotBetween(Integer value1, Integer value2) { + addCriterion("month_time not between", value1, value2, "monthTime"); + return (Criteria) this; + } + + public Criteria andPredictCostIsNull() { + addCriterion("predict_cost is null"); + return (Criteria) this; + } + + public Criteria andPredictCostIsNotNull() { + addCriterion("predict_cost is not null"); + return (Criteria) this; + } + + public Criteria andPredictCostEqualTo(Long value) { + addCriterion("predict_cost =", value, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostNotEqualTo(Long value) { + addCriterion("predict_cost <>", value, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostGreaterThan(Long value) { + addCriterion("predict_cost >", value, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostGreaterThanOrEqualTo(Long value) { + addCriterion("predict_cost >=", value, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostLessThan(Long value) { + addCriterion("predict_cost <", value, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostLessThanOrEqualTo(Long value) { + addCriterion("predict_cost <=", value, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostIn(List values) { + addCriterion("predict_cost in", values, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostNotIn(List values) { + addCriterion("predict_cost not in", values, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostBetween(Long value1, Long value2) { + addCriterion("predict_cost between", value1, value2, "predictCost"); + return (Criteria) this; + } + + public Criteria andPredictCostNotBetween(Long value1, Long value2) { + addCriterion("predict_cost not between", value1, value2, "predictCost"); + return (Criteria) this; + } + + public Criteria andRealCostIsNull() { + addCriterion("real_cost is null"); + return (Criteria) this; + } + + public Criteria andRealCostIsNotNull() { + addCriterion("real_cost is not null"); + return (Criteria) this; + } + + public Criteria andRealCostEqualTo(Long value) { + addCriterion("real_cost =", value, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostNotEqualTo(Long value) { + addCriterion("real_cost <>", value, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostGreaterThan(Long value) { + addCriterion("real_cost >", value, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostGreaterThanOrEqualTo(Long value) { + addCriterion("real_cost >=", value, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostLessThan(Long value) { + addCriterion("real_cost <", value, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostLessThanOrEqualTo(Long value) { + addCriterion("real_cost <=", value, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostIn(List values) { + addCriterion("real_cost in", values, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostNotIn(List values) { + addCriterion("real_cost not in", values, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostBetween(Long value1, Long value2) { + addCriterion("real_cost between", value1, value2, "realCost"); + return (Criteria) this; + } + + public Criteria andRealCostNotBetween(Long value1, Long value2) { + addCriterion("real_cost not between", value1, value2, "realCost"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CostType.java b/pims/src/main/java/com/ccsens/pims/bean/po/CostType.java new file mode 100644 index 00000000..c9c6347f --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/CostType.java @@ -0,0 +1,117 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class CostType implements Serializable { + private Long id; + + private Long companyId; + + private Long projectId; + + private String name; + + private Byte level; + + private Long parentId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Byte getLevel() { + return level; + } + + public void setLevel(Byte level) { + this.level = level; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", projectId=").append(projectId); + sb.append(", name=").append(name); + sb.append(", level=").append(level); + sb.append(", parentId=").append(parentId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/CostTypeExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/CostTypeExample.java new file mode 100644 index 00000000..7336fe4f --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/CostTypeExample.java @@ -0,0 +1,751 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CostTypeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CostTypeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andLevelIsNull() { + addCriterion("level is null"); + return (Criteria) this; + } + + public Criteria andLevelIsNotNull() { + addCriterion("level is not null"); + return (Criteria) this; + } + + public Criteria andLevelEqualTo(Byte value) { + addCriterion("level =", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotEqualTo(Byte value) { + addCriterion("level <>", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThan(Byte value) { + addCriterion("level >", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThanOrEqualTo(Byte value) { + addCriterion("level >=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThan(Byte value) { + addCriterion("level <", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThanOrEqualTo(Byte value) { + addCriterion("level <=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelIn(List values) { + addCriterion("level in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotIn(List values) { + addCriterion("level not in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelBetween(Byte value1, Byte value2) { + addCriterion("level between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotBetween(Byte value1, Byte value2) { + addCriterion("level not between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatements.java b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatements.java new file mode 100644 index 00000000..dba39162 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatements.java @@ -0,0 +1,95 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class IncomeStatements implements Serializable { + private Long id; + + private Long companyId; + + private Long projectId; + + private String name; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", projectId=").append(projectId); + sb.append(", name=").append(name); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsExample.java new file mode 100644 index 00000000..8d4a1aa0 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsExample.java @@ -0,0 +1,631 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class IncomeStatementsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public IncomeStatementsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLog.java b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLog.java new file mode 100644 index 00000000..776c5769 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLog.java @@ -0,0 +1,139 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class IncomeStatementsLog implements Serializable { + private Long id; + + private Long companyId; + + private Long projectId; + + private Long incomeStatementsId; + + private Integer yearIncome; + + private Integer monthTime; + + private Long predictMoney; + + private Long realMoney; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getIncomeStatementsId() { + return incomeStatementsId; + } + + public void setIncomeStatementsId(Long incomeStatementsId) { + this.incomeStatementsId = incomeStatementsId; + } + + public Integer getYearIncome() { + return yearIncome; + } + + public void setYearIncome(Integer yearIncome) { + this.yearIncome = yearIncome; + } + + public Integer getMonthTime() { + return monthTime; + } + + public void setMonthTime(Integer monthTime) { + this.monthTime = monthTime; + } + + public Long getPredictMoney() { + return predictMoney; + } + + public void setPredictMoney(Long predictMoney) { + this.predictMoney = predictMoney; + } + + public Long getRealMoney() { + return realMoney; + } + + public void setRealMoney(Long realMoney) { + this.realMoney = realMoney; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", projectId=").append(projectId); + sb.append(", incomeStatementsId=").append(incomeStatementsId); + sb.append(", yearIncome=").append(yearIncome); + sb.append(", monthTime=").append(monthTime); + sb.append(", predictMoney=").append(predictMoney); + sb.append(", realMoney=").append(realMoney); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLogExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLogExample.java new file mode 100644 index 00000000..162b09ce --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/IncomeStatementsLogExample.java @@ -0,0 +1,861 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class IncomeStatementsLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public IncomeStatementsLogExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdIsNull() { + addCriterion("income_statements_id is null"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdIsNotNull() { + addCriterion("income_statements_id is not null"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdEqualTo(Long value) { + addCriterion("income_statements_id =", value, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdNotEqualTo(Long value) { + addCriterion("income_statements_id <>", value, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdGreaterThan(Long value) { + addCriterion("income_statements_id >", value, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdGreaterThanOrEqualTo(Long value) { + addCriterion("income_statements_id >=", value, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdLessThan(Long value) { + addCriterion("income_statements_id <", value, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdLessThanOrEqualTo(Long value) { + addCriterion("income_statements_id <=", value, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdIn(List values) { + addCriterion("income_statements_id in", values, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdNotIn(List values) { + addCriterion("income_statements_id not in", values, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdBetween(Long value1, Long value2) { + addCriterion("income_statements_id between", value1, value2, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andIncomeStatementsIdNotBetween(Long value1, Long value2) { + addCriterion("income_statements_id not between", value1, value2, "incomeStatementsId"); + return (Criteria) this; + } + + public Criteria andYearIncomeIsNull() { + addCriterion("year_income is null"); + return (Criteria) this; + } + + public Criteria andYearIncomeIsNotNull() { + addCriterion("year_income is not null"); + return (Criteria) this; + } + + public Criteria andYearIncomeEqualTo(Integer value) { + addCriterion("year_income =", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotEqualTo(Integer value) { + addCriterion("year_income <>", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeGreaterThan(Integer value) { + addCriterion("year_income >", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeGreaterThanOrEqualTo(Integer value) { + addCriterion("year_income >=", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeLessThan(Integer value) { + addCriterion("year_income <", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeLessThanOrEqualTo(Integer value) { + addCriterion("year_income <=", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeIn(List values) { + addCriterion("year_income in", values, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotIn(List values) { + addCriterion("year_income not in", values, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeBetween(Integer value1, Integer value2) { + addCriterion("year_income between", value1, value2, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotBetween(Integer value1, Integer value2) { + addCriterion("year_income not between", value1, value2, "yearIncome"); + return (Criteria) this; + } + + public Criteria andMonthTimeIsNull() { + addCriterion("month_time is null"); + return (Criteria) this; + } + + public Criteria andMonthTimeIsNotNull() { + addCriterion("month_time is not null"); + return (Criteria) this; + } + + public Criteria andMonthTimeEqualTo(Integer value) { + addCriterion("month_time =", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotEqualTo(Integer value) { + addCriterion("month_time <>", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeGreaterThan(Integer value) { + addCriterion("month_time >", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("month_time >=", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeLessThan(Integer value) { + addCriterion("month_time <", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeLessThanOrEqualTo(Integer value) { + addCriterion("month_time <=", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeIn(List values) { + addCriterion("month_time in", values, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotIn(List values) { + addCriterion("month_time not in", values, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeBetween(Integer value1, Integer value2) { + addCriterion("month_time between", value1, value2, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotBetween(Integer value1, Integer value2) { + addCriterion("month_time not between", value1, value2, "monthTime"); + return (Criteria) this; + } + + public Criteria andPredictMoneyIsNull() { + addCriterion("predict_money is null"); + return (Criteria) this; + } + + public Criteria andPredictMoneyIsNotNull() { + addCriterion("predict_money is not null"); + return (Criteria) this; + } + + public Criteria andPredictMoneyEqualTo(Long value) { + addCriterion("predict_money =", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyNotEqualTo(Long value) { + addCriterion("predict_money <>", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyGreaterThan(Long value) { + addCriterion("predict_money >", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyGreaterThanOrEqualTo(Long value) { + addCriterion("predict_money >=", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyLessThan(Long value) { + addCriterion("predict_money <", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyLessThanOrEqualTo(Long value) { + addCriterion("predict_money <=", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyIn(List values) { + addCriterion("predict_money in", values, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyNotIn(List values) { + addCriterion("predict_money not in", values, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyBetween(Long value1, Long value2) { + addCriterion("predict_money between", value1, value2, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyNotBetween(Long value1, Long value2) { + addCriterion("predict_money not between", value1, value2, "predictMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyIsNull() { + addCriterion("real_money is null"); + return (Criteria) this; + } + + public Criteria andRealMoneyIsNotNull() { + addCriterion("real_money is not null"); + return (Criteria) this; + } + + public Criteria andRealMoneyEqualTo(Long value) { + addCriterion("real_money =", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyNotEqualTo(Long value) { + addCriterion("real_money <>", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyGreaterThan(Long value) { + addCriterion("real_money >", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyGreaterThanOrEqualTo(Long value) { + addCriterion("real_money >=", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyLessThan(Long value) { + addCriterion("real_money <", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyLessThanOrEqualTo(Long value) { + addCriterion("real_money <=", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyIn(List values) { + addCriterion("real_money in", values, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyNotIn(List values) { + addCriterion("real_money not in", values, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyBetween(Long value1, Long value2) { + addCriterion("real_money between", value1, value2, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyNotBetween(Long value1, Long value2) { + addCriterion("real_money not between", value1, value2, "realMoney"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlow.java b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlow.java new file mode 100644 index 00000000..5899596e --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlow.java @@ -0,0 +1,106 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MoneyFlow implements Serializable { + private Long id; + + private Long companyId; + + private Long projectId; + + private String name; + + private Byte moneyType; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Byte getMoneyType() { + return moneyType; + } + + public void setMoneyType(Byte moneyType) { + this.moneyType = moneyType; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", projectId=").append(projectId); + sb.append(", name=").append(name); + sb.append(", moneyType=").append(moneyType); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowExample.java new file mode 100644 index 00000000..ee661c97 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowExample.java @@ -0,0 +1,691 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MoneyFlowExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MoneyFlowExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andMoneyTypeIsNull() { + addCriterion("money_type is null"); + return (Criteria) this; + } + + public Criteria andMoneyTypeIsNotNull() { + addCriterion("money_type is not null"); + return (Criteria) this; + } + + public Criteria andMoneyTypeEqualTo(Byte value) { + addCriterion("money_type =", value, "moneyType"); + return (Criteria) this; + } + + public Criteria andMoneyTypeNotEqualTo(Byte value) { + addCriterion("money_type <>", value, "moneyType"); + return (Criteria) this; + } + + public Criteria andMoneyTypeGreaterThan(Byte value) { + addCriterion("money_type >", value, "moneyType"); + return (Criteria) this; + } + + public Criteria andMoneyTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("money_type >=", value, "moneyType"); + return (Criteria) this; + } + + public Criteria andMoneyTypeLessThan(Byte value) { + addCriterion("money_type <", value, "moneyType"); + return (Criteria) this; + } + + public Criteria andMoneyTypeLessThanOrEqualTo(Byte value) { + addCriterion("money_type <=", value, "moneyType"); + return (Criteria) this; + } + + public Criteria andMoneyTypeIn(List values) { + addCriterion("money_type in", values, "moneyType"); + return (Criteria) this; + } + + public Criteria andMoneyTypeNotIn(List values) { + addCriterion("money_type not in", values, "moneyType"); + return (Criteria) this; + } + + public Criteria andMoneyTypeBetween(Byte value1, Byte value2) { + addCriterion("money_type between", value1, value2, "moneyType"); + return (Criteria) this; + } + + public Criteria andMoneyTypeNotBetween(Byte value1, Byte value2) { + addCriterion("money_type not between", value1, value2, "moneyType"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLog.java b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLog.java new file mode 100644 index 00000000..6862b79f --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLog.java @@ -0,0 +1,139 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MoneyFlowLog implements Serializable { + private Long id; + + private Long companyId; + + private Long projectId; + + private Long moneyFlowId; + + private Integer yearIncome; + + private Integer monthTime; + + private Long predictMoney; + + private Long realMoney; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getMoneyFlowId() { + return moneyFlowId; + } + + public void setMoneyFlowId(Long moneyFlowId) { + this.moneyFlowId = moneyFlowId; + } + + public Integer getYearIncome() { + return yearIncome; + } + + public void setYearIncome(Integer yearIncome) { + this.yearIncome = yearIncome; + } + + public Integer getMonthTime() { + return monthTime; + } + + public void setMonthTime(Integer monthTime) { + this.monthTime = monthTime; + } + + public Long getPredictMoney() { + return predictMoney; + } + + public void setPredictMoney(Long predictMoney) { + this.predictMoney = predictMoney; + } + + public Long getRealMoney() { + return realMoney; + } + + public void setRealMoney(Long realMoney) { + this.realMoney = realMoney; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", projectId=").append(projectId); + sb.append(", moneyFlowId=").append(moneyFlowId); + sb.append(", yearIncome=").append(yearIncome); + sb.append(", monthTime=").append(monthTime); + sb.append(", predictMoney=").append(predictMoney); + sb.append(", realMoney=").append(realMoney); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLogExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLogExample.java new file mode 100644 index 00000000..e3fd1150 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/MoneyFlowLogExample.java @@ -0,0 +1,861 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MoneyFlowLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MoneyFlowLogExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdIsNull() { + addCriterion("money_flow_id is null"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdIsNotNull() { + addCriterion("money_flow_id is not null"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdEqualTo(Long value) { + addCriterion("money_flow_id =", value, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdNotEqualTo(Long value) { + addCriterion("money_flow_id <>", value, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdGreaterThan(Long value) { + addCriterion("money_flow_id >", value, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdGreaterThanOrEqualTo(Long value) { + addCriterion("money_flow_id >=", value, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdLessThan(Long value) { + addCriterion("money_flow_id <", value, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdLessThanOrEqualTo(Long value) { + addCriterion("money_flow_id <=", value, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdIn(List values) { + addCriterion("money_flow_id in", values, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdNotIn(List values) { + addCriterion("money_flow_id not in", values, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdBetween(Long value1, Long value2) { + addCriterion("money_flow_id between", value1, value2, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andMoneyFlowIdNotBetween(Long value1, Long value2) { + addCriterion("money_flow_id not between", value1, value2, "moneyFlowId"); + return (Criteria) this; + } + + public Criteria andYearIncomeIsNull() { + addCriterion("year_income is null"); + return (Criteria) this; + } + + public Criteria andYearIncomeIsNotNull() { + addCriterion("year_income is not null"); + return (Criteria) this; + } + + public Criteria andYearIncomeEqualTo(Integer value) { + addCriterion("year_income =", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotEqualTo(Integer value) { + addCriterion("year_income <>", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeGreaterThan(Integer value) { + addCriterion("year_income >", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeGreaterThanOrEqualTo(Integer value) { + addCriterion("year_income >=", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeLessThan(Integer value) { + addCriterion("year_income <", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeLessThanOrEqualTo(Integer value) { + addCriterion("year_income <=", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeIn(List values) { + addCriterion("year_income in", values, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotIn(List values) { + addCriterion("year_income not in", values, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeBetween(Integer value1, Integer value2) { + addCriterion("year_income between", value1, value2, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotBetween(Integer value1, Integer value2) { + addCriterion("year_income not between", value1, value2, "yearIncome"); + return (Criteria) this; + } + + public Criteria andMonthTimeIsNull() { + addCriterion("month_time is null"); + return (Criteria) this; + } + + public Criteria andMonthTimeIsNotNull() { + addCriterion("month_time is not null"); + return (Criteria) this; + } + + public Criteria andMonthTimeEqualTo(Integer value) { + addCriterion("month_time =", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotEqualTo(Integer value) { + addCriterion("month_time <>", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeGreaterThan(Integer value) { + addCriterion("month_time >", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("month_time >=", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeLessThan(Integer value) { + addCriterion("month_time <", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeLessThanOrEqualTo(Integer value) { + addCriterion("month_time <=", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeIn(List values) { + addCriterion("month_time in", values, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotIn(List values) { + addCriterion("month_time not in", values, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeBetween(Integer value1, Integer value2) { + addCriterion("month_time between", value1, value2, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotBetween(Integer value1, Integer value2) { + addCriterion("month_time not between", value1, value2, "monthTime"); + return (Criteria) this; + } + + public Criteria andPredictMoneyIsNull() { + addCriterion("predict_money is null"); + return (Criteria) this; + } + + public Criteria andPredictMoneyIsNotNull() { + addCriterion("predict_money is not null"); + return (Criteria) this; + } + + public Criteria andPredictMoneyEqualTo(Long value) { + addCriterion("predict_money =", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyNotEqualTo(Long value) { + addCriterion("predict_money <>", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyGreaterThan(Long value) { + addCriterion("predict_money >", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyGreaterThanOrEqualTo(Long value) { + addCriterion("predict_money >=", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyLessThan(Long value) { + addCriterion("predict_money <", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyLessThanOrEqualTo(Long value) { + addCriterion("predict_money <=", value, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyIn(List values) { + addCriterion("predict_money in", values, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyNotIn(List values) { + addCriterion("predict_money not in", values, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyBetween(Long value1, Long value2) { + addCriterion("predict_money between", value1, value2, "predictMoney"); + return (Criteria) this; + } + + public Criteria andPredictMoneyNotBetween(Long value1, Long value2) { + addCriterion("predict_money not between", value1, value2, "predictMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyIsNull() { + addCriterion("real_money is null"); + return (Criteria) this; + } + + public Criteria andRealMoneyIsNotNull() { + addCriterion("real_money is not null"); + return (Criteria) this; + } + + public Criteria andRealMoneyEqualTo(Long value) { + addCriterion("real_money =", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyNotEqualTo(Long value) { + addCriterion("real_money <>", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyGreaterThan(Long value) { + addCriterion("real_money >", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyGreaterThanOrEqualTo(Long value) { + addCriterion("real_money >=", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyLessThan(Long value) { + addCriterion("real_money <", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyLessThanOrEqualTo(Long value) { + addCriterion("real_money <=", value, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyIn(List values) { + addCriterion("real_money in", values, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyNotIn(List values) { + addCriterion("real_money not in", values, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyBetween(Long value1, Long value2) { + addCriterion("real_money between", value1, value2, "realMoney"); + return (Criteria) this; + } + + public Criteria andRealMoneyNotBetween(Long value1, Long value2) { + addCriterion("real_money not between", value1, value2, "realMoney"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/Product.java b/pims/src/main/java/com/ccsens/pims/bean/po/Product.java new file mode 100644 index 00000000..ae2cc99d --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/Product.java @@ -0,0 +1,161 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class Product implements Serializable { + private Long id; + + private Long companyId; + + private Long projectId; + + private String name; + + private String description; + + private Long productTypeId; + + private Long pricing; + + private Long priceUnits; + + private String grossMargin; + + private Byte significanceSort; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Long getProductTypeId() { + return productTypeId; + } + + public void setProductTypeId(Long productTypeId) { + this.productTypeId = productTypeId; + } + + public Long getPricing() { + return pricing; + } + + public void setPricing(Long pricing) { + this.pricing = pricing; + } + + public Long getPriceUnits() { + return priceUnits; + } + + public void setPriceUnits(Long priceUnits) { + this.priceUnits = priceUnits; + } + + public String getGrossMargin() { + return grossMargin; + } + + public void setGrossMargin(String grossMargin) { + this.grossMargin = grossMargin == null ? null : grossMargin.trim(); + } + + public Byte getSignificanceSort() { + return significanceSort; + } + + public void setSignificanceSort(Byte significanceSort) { + this.significanceSort = significanceSort; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", projectId=").append(projectId); + sb.append(", name=").append(name); + sb.append(", description=").append(description); + sb.append(", productTypeId=").append(productTypeId); + sb.append(", pricing=").append(pricing); + sb.append(", priceUnits=").append(priceUnits); + sb.append(", grossMargin=").append(grossMargin); + sb.append(", significanceSort=").append(significanceSort); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/ProductExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/ProductExample.java new file mode 100644 index 00000000..a5b5016c --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/ProductExample.java @@ -0,0 +1,1011 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProductExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProductExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andProductTypeIdIsNull() { + addCriterion("product_type_id is null"); + return (Criteria) this; + } + + public Criteria andProductTypeIdIsNotNull() { + addCriterion("product_type_id is not null"); + return (Criteria) this; + } + + public Criteria andProductTypeIdEqualTo(Long value) { + addCriterion("product_type_id =", value, "productTypeId"); + return (Criteria) this; + } + + public Criteria andProductTypeIdNotEqualTo(Long value) { + addCriterion("product_type_id <>", value, "productTypeId"); + return (Criteria) this; + } + + public Criteria andProductTypeIdGreaterThan(Long value) { + addCriterion("product_type_id >", value, "productTypeId"); + return (Criteria) this; + } + + public Criteria andProductTypeIdGreaterThanOrEqualTo(Long value) { + addCriterion("product_type_id >=", value, "productTypeId"); + return (Criteria) this; + } + + public Criteria andProductTypeIdLessThan(Long value) { + addCriterion("product_type_id <", value, "productTypeId"); + return (Criteria) this; + } + + public Criteria andProductTypeIdLessThanOrEqualTo(Long value) { + addCriterion("product_type_id <=", value, "productTypeId"); + return (Criteria) this; + } + + public Criteria andProductTypeIdIn(List values) { + addCriterion("product_type_id in", values, "productTypeId"); + return (Criteria) this; + } + + public Criteria andProductTypeIdNotIn(List values) { + addCriterion("product_type_id not in", values, "productTypeId"); + return (Criteria) this; + } + + public Criteria andProductTypeIdBetween(Long value1, Long value2) { + addCriterion("product_type_id between", value1, value2, "productTypeId"); + return (Criteria) this; + } + + public Criteria andProductTypeIdNotBetween(Long value1, Long value2) { + addCriterion("product_type_id not between", value1, value2, "productTypeId"); + return (Criteria) this; + } + + public Criteria andPricingIsNull() { + addCriterion("pricing is null"); + return (Criteria) this; + } + + public Criteria andPricingIsNotNull() { + addCriterion("pricing is not null"); + return (Criteria) this; + } + + public Criteria andPricingEqualTo(Long value) { + addCriterion("pricing =", value, "pricing"); + return (Criteria) this; + } + + public Criteria andPricingNotEqualTo(Long value) { + addCriterion("pricing <>", value, "pricing"); + return (Criteria) this; + } + + public Criteria andPricingGreaterThan(Long value) { + addCriterion("pricing >", value, "pricing"); + return (Criteria) this; + } + + public Criteria andPricingGreaterThanOrEqualTo(Long value) { + addCriterion("pricing >=", value, "pricing"); + return (Criteria) this; + } + + public Criteria andPricingLessThan(Long value) { + addCriterion("pricing <", value, "pricing"); + return (Criteria) this; + } + + public Criteria andPricingLessThanOrEqualTo(Long value) { + addCriterion("pricing <=", value, "pricing"); + return (Criteria) this; + } + + public Criteria andPricingIn(List values) { + addCriterion("pricing in", values, "pricing"); + return (Criteria) this; + } + + public Criteria andPricingNotIn(List values) { + addCriterion("pricing not in", values, "pricing"); + return (Criteria) this; + } + + public Criteria andPricingBetween(Long value1, Long value2) { + addCriterion("pricing between", value1, value2, "pricing"); + return (Criteria) this; + } + + public Criteria andPricingNotBetween(Long value1, Long value2) { + addCriterion("pricing not between", value1, value2, "pricing"); + return (Criteria) this; + } + + public Criteria andPriceUnitsIsNull() { + addCriterion("price_units is null"); + return (Criteria) this; + } + + public Criteria andPriceUnitsIsNotNull() { + addCriterion("price_units is not null"); + return (Criteria) this; + } + + public Criteria andPriceUnitsEqualTo(Long value) { + addCriterion("price_units =", value, "priceUnits"); + return (Criteria) this; + } + + public Criteria andPriceUnitsNotEqualTo(Long value) { + addCriterion("price_units <>", value, "priceUnits"); + return (Criteria) this; + } + + public Criteria andPriceUnitsGreaterThan(Long value) { + addCriterion("price_units >", value, "priceUnits"); + return (Criteria) this; + } + + public Criteria andPriceUnitsGreaterThanOrEqualTo(Long value) { + addCriterion("price_units >=", value, "priceUnits"); + return (Criteria) this; + } + + public Criteria andPriceUnitsLessThan(Long value) { + addCriterion("price_units <", value, "priceUnits"); + return (Criteria) this; + } + + public Criteria andPriceUnitsLessThanOrEqualTo(Long value) { + addCriterion("price_units <=", value, "priceUnits"); + return (Criteria) this; + } + + public Criteria andPriceUnitsIn(List values) { + addCriterion("price_units in", values, "priceUnits"); + return (Criteria) this; + } + + public Criteria andPriceUnitsNotIn(List values) { + addCriterion("price_units not in", values, "priceUnits"); + return (Criteria) this; + } + + public Criteria andPriceUnitsBetween(Long value1, Long value2) { + addCriterion("price_units between", value1, value2, "priceUnits"); + return (Criteria) this; + } + + public Criteria andPriceUnitsNotBetween(Long value1, Long value2) { + addCriterion("price_units not between", value1, value2, "priceUnits"); + return (Criteria) this; + } + + public Criteria andGrossMarginIsNull() { + addCriterion("gross_margin is null"); + return (Criteria) this; + } + + public Criteria andGrossMarginIsNotNull() { + addCriterion("gross_margin is not null"); + return (Criteria) this; + } + + public Criteria andGrossMarginEqualTo(String value) { + addCriterion("gross_margin =", value, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginNotEqualTo(String value) { + addCriterion("gross_margin <>", value, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginGreaterThan(String value) { + addCriterion("gross_margin >", value, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginGreaterThanOrEqualTo(String value) { + addCriterion("gross_margin >=", value, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginLessThan(String value) { + addCriterion("gross_margin <", value, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginLessThanOrEqualTo(String value) { + addCriterion("gross_margin <=", value, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginLike(String value) { + addCriterion("gross_margin like", value, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginNotLike(String value) { + addCriterion("gross_margin not like", value, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginIn(List values) { + addCriterion("gross_margin in", values, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginNotIn(List values) { + addCriterion("gross_margin not in", values, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginBetween(String value1, String value2) { + addCriterion("gross_margin between", value1, value2, "grossMargin"); + return (Criteria) this; + } + + public Criteria andGrossMarginNotBetween(String value1, String value2) { + addCriterion("gross_margin not between", value1, value2, "grossMargin"); + return (Criteria) this; + } + + public Criteria andSignificanceSortIsNull() { + addCriterion("significance_sort is null"); + return (Criteria) this; + } + + public Criteria andSignificanceSortIsNotNull() { + addCriterion("significance_sort is not null"); + return (Criteria) this; + } + + public Criteria andSignificanceSortEqualTo(Byte value) { + addCriterion("significance_sort =", value, "significanceSort"); + return (Criteria) this; + } + + public Criteria andSignificanceSortNotEqualTo(Byte value) { + addCriterion("significance_sort <>", value, "significanceSort"); + return (Criteria) this; + } + + public Criteria andSignificanceSortGreaterThan(Byte value) { + addCriterion("significance_sort >", value, "significanceSort"); + return (Criteria) this; + } + + public Criteria andSignificanceSortGreaterThanOrEqualTo(Byte value) { + addCriterion("significance_sort >=", value, "significanceSort"); + return (Criteria) this; + } + + public Criteria andSignificanceSortLessThan(Byte value) { + addCriterion("significance_sort <", value, "significanceSort"); + return (Criteria) this; + } + + public Criteria andSignificanceSortLessThanOrEqualTo(Byte value) { + addCriterion("significance_sort <=", value, "significanceSort"); + return (Criteria) this; + } + + public Criteria andSignificanceSortIn(List values) { + addCriterion("significance_sort in", values, "significanceSort"); + return (Criteria) this; + } + + public Criteria andSignificanceSortNotIn(List values) { + addCriterion("significance_sort not in", values, "significanceSort"); + return (Criteria) this; + } + + public Criteria andSignificanceSortBetween(Byte value1, Byte value2) { + addCriterion("significance_sort between", value1, value2, "significanceSort"); + return (Criteria) this; + } + + public Criteria andSignificanceSortNotBetween(Byte value1, Byte value2) { + addCriterion("significance_sort not between", value1, value2, "significanceSort"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncome.java b/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncome.java new file mode 100644 index 00000000..a4b5e43b --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncome.java @@ -0,0 +1,117 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProductIncome implements Serializable { + private Long id; + + private Long productId; + + private Integer yearIncome; + + private Integer monthTime; + + private Long predictIncome; + + private Long realIncome; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProductId() { + return productId; + } + + public void setProductId(Long productId) { + this.productId = productId; + } + + public Integer getYearIncome() { + return yearIncome; + } + + public void setYearIncome(Integer yearIncome) { + this.yearIncome = yearIncome; + } + + public Integer getMonthTime() { + return monthTime; + } + + public void setMonthTime(Integer monthTime) { + this.monthTime = monthTime; + } + + public Long getPredictIncome() { + return predictIncome; + } + + public void setPredictIncome(Long predictIncome) { + this.predictIncome = predictIncome; + } + + public Long getRealIncome() { + return realIncome; + } + + public void setRealIncome(Long realIncome) { + this.realIncome = realIncome; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", productId=").append(productId); + sb.append(", yearIncome=").append(yearIncome); + sb.append(", monthTime=").append(monthTime); + sb.append(", predictIncome=").append(predictIncome); + sb.append(", realIncome=").append(realIncome); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncomeExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncomeExample.java new file mode 100644 index 00000000..c9e96481 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/ProductIncomeExample.java @@ -0,0 +1,741 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProductIncomeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProductIncomeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProductIdIsNull() { + addCriterion("product_id is null"); + return (Criteria) this; + } + + public Criteria andProductIdIsNotNull() { + addCriterion("product_id is not null"); + return (Criteria) this; + } + + public Criteria andProductIdEqualTo(Long value) { + addCriterion("product_id =", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotEqualTo(Long value) { + addCriterion("product_id <>", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThan(Long value) { + addCriterion("product_id >", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThanOrEqualTo(Long value) { + addCriterion("product_id >=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThan(Long value) { + addCriterion("product_id <", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThanOrEqualTo(Long value) { + addCriterion("product_id <=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdIn(List values) { + addCriterion("product_id in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotIn(List values) { + addCriterion("product_id not in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdBetween(Long value1, Long value2) { + addCriterion("product_id between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotBetween(Long value1, Long value2) { + addCriterion("product_id not between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andYearIncomeIsNull() { + addCriterion("year_income is null"); + return (Criteria) this; + } + + public Criteria andYearIncomeIsNotNull() { + addCriterion("year_income is not null"); + return (Criteria) this; + } + + public Criteria andYearIncomeEqualTo(Integer value) { + addCriterion("year_income =", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotEqualTo(Integer value) { + addCriterion("year_income <>", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeGreaterThan(Integer value) { + addCriterion("year_income >", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeGreaterThanOrEqualTo(Integer value) { + addCriterion("year_income >=", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeLessThan(Integer value) { + addCriterion("year_income <", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeLessThanOrEqualTo(Integer value) { + addCriterion("year_income <=", value, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeIn(List values) { + addCriterion("year_income in", values, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotIn(List values) { + addCriterion("year_income not in", values, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeBetween(Integer value1, Integer value2) { + addCriterion("year_income between", value1, value2, "yearIncome"); + return (Criteria) this; + } + + public Criteria andYearIncomeNotBetween(Integer value1, Integer value2) { + addCriterion("year_income not between", value1, value2, "yearIncome"); + return (Criteria) this; + } + + public Criteria andMonthTimeIsNull() { + addCriterion("month_time is null"); + return (Criteria) this; + } + + public Criteria andMonthTimeIsNotNull() { + addCriterion("month_time is not null"); + return (Criteria) this; + } + + public Criteria andMonthTimeEqualTo(Integer value) { + addCriterion("month_time =", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotEqualTo(Integer value) { + addCriterion("month_time <>", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeGreaterThan(Integer value) { + addCriterion("month_time >", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("month_time >=", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeLessThan(Integer value) { + addCriterion("month_time <", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeLessThanOrEqualTo(Integer value) { + addCriterion("month_time <=", value, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeIn(List values) { + addCriterion("month_time in", values, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotIn(List values) { + addCriterion("month_time not in", values, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeBetween(Integer value1, Integer value2) { + addCriterion("month_time between", value1, value2, "monthTime"); + return (Criteria) this; + } + + public Criteria andMonthTimeNotBetween(Integer value1, Integer value2) { + addCriterion("month_time not between", value1, value2, "monthTime"); + return (Criteria) this; + } + + public Criteria andPredictIncomeIsNull() { + addCriterion("predict_income is null"); + return (Criteria) this; + } + + public Criteria andPredictIncomeIsNotNull() { + addCriterion("predict_income is not null"); + return (Criteria) this; + } + + public Criteria andPredictIncomeEqualTo(Long value) { + addCriterion("predict_income =", value, "predictIncome"); + return (Criteria) this; + } + + public Criteria andPredictIncomeNotEqualTo(Long value) { + addCriterion("predict_income <>", value, "predictIncome"); + return (Criteria) this; + } + + public Criteria andPredictIncomeGreaterThan(Long value) { + addCriterion("predict_income >", value, "predictIncome"); + return (Criteria) this; + } + + public Criteria andPredictIncomeGreaterThanOrEqualTo(Long value) { + addCriterion("predict_income >=", value, "predictIncome"); + return (Criteria) this; + } + + public Criteria andPredictIncomeLessThan(Long value) { + addCriterion("predict_income <", value, "predictIncome"); + return (Criteria) this; + } + + public Criteria andPredictIncomeLessThanOrEqualTo(Long value) { + addCriterion("predict_income <=", value, "predictIncome"); + return (Criteria) this; + } + + public Criteria andPredictIncomeIn(List values) { + addCriterion("predict_income in", values, "predictIncome"); + return (Criteria) this; + } + + public Criteria andPredictIncomeNotIn(List values) { + addCriterion("predict_income not in", values, "predictIncome"); + return (Criteria) this; + } + + public Criteria andPredictIncomeBetween(Long value1, Long value2) { + addCriterion("predict_income between", value1, value2, "predictIncome"); + return (Criteria) this; + } + + public Criteria andPredictIncomeNotBetween(Long value1, Long value2) { + addCriterion("predict_income not between", value1, value2, "predictIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeIsNull() { + addCriterion("real_income is null"); + return (Criteria) this; + } + + public Criteria andRealIncomeIsNotNull() { + addCriterion("real_income is not null"); + return (Criteria) this; + } + + public Criteria andRealIncomeEqualTo(Long value) { + addCriterion("real_income =", value, "realIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeNotEqualTo(Long value) { + addCriterion("real_income <>", value, "realIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeGreaterThan(Long value) { + addCriterion("real_income >", value, "realIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeGreaterThanOrEqualTo(Long value) { + addCriterion("real_income >=", value, "realIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeLessThan(Long value) { + addCriterion("real_income <", value, "realIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeLessThanOrEqualTo(Long value) { + addCriterion("real_income <=", value, "realIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeIn(List values) { + addCriterion("real_income in", values, "realIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeNotIn(List values) { + addCriterion("real_income not in", values, "realIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeBetween(Long value1, Long value2) { + addCriterion("real_income between", value1, value2, "realIncome"); + return (Criteria) this; + } + + public Criteria andRealIncomeNotBetween(Long value1, Long value2) { + addCriterion("real_income not between", value1, value2, "realIncome"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/ProductType.java b/pims/src/main/java/com/ccsens/pims/bean/po/ProductType.java new file mode 100644 index 00000000..ea64a5fa --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/ProductType.java @@ -0,0 +1,95 @@ +package com.ccsens.pims.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProductType implements Serializable { + private Long id; + + private Long companyId; + + private Long projectId; + + private String name; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", projectId=").append(projectId); + sb.append(", name=").append(name); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/po/ProductTypeExample.java b/pims/src/main/java/com/ccsens/pims/bean/po/ProductTypeExample.java new file mode 100644 index 00000000..c20c0106 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/po/ProductTypeExample.java @@ -0,0 +1,631 @@ +package com.ccsens.pims.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProductTypeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProductTypeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/bean/vo/CompanyVo.java b/pims/src/main/java/com/ccsens/pims/bean/vo/CompanyVo.java new file mode 100644 index 00000000..60fcc676 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/vo/CompanyVo.java @@ -0,0 +1,263 @@ +package com.ccsens.pims.bean.vo; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class CompanyVo { + @Data + @ApiModel("产品分类信息") + public static class ProductType{ + @ApiModelProperty("产品分类id") + private Long productType; + @ApiModelProperty("产品分类名称") + private String productTypeName; + @ApiModelProperty("产品信息") + private List productList; + } + + + @Data + @ApiModel("查看产品使用依据") + public static class ProductInfo{ + @ApiModelProperty("产品id") + private Long productId; + @ApiModelProperty("产品名称") + private String productName; +// @JsonIgnore +// private Long pricingLong; + @ApiModelProperty("产品定价") + private BigDecimal pricing; + @ApiModelProperty("价格单温(元)") + private Long priceUnits; +// @JsonIgnore +// private String grossMarginStr; + @ApiModelProperty("毛利") + private String grossMargin; + @ApiModelProperty("重要性 越高代表越重要") + private int significanceSort; + @ApiModelProperty("备注/详情") + private String description; + +// public BigDecimal getPricing(){ +// BigDecimal pr = BigDecimal.valueOf(0); +// if(ObjectUtil.isNotNull(pricingLong)){ +// pr = BigDecimal.valueOf(pricingLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP); +// } +// return pr; +// } +// public String getGrossMargin(){ +// String str = ""; +// if(StrUtil.isNotEmpty(grossMarginStr)){ +// str = grossMarginStr + "%"; +// } +// return str; +// } + } + + @Data + @ApiModel("查询产品收入时分类") + public static class ProductIncomeType{ + @ApiModelProperty("产品分类id") + private Long productType; + @ApiModelProperty("产品分类名称") + private String productTypeName; + @ApiModelProperty("产品信息") + private List productIncomeAllList; + } + + @Data + @ApiModel("查看单个产品的销售收入") + public static class ProductIncome{ + @JsonIgnore + private Long incomeId; + @ApiModelProperty("月份") + private String month; +// @JsonIgnore +// private Long predictIncomeLong; + @ApiModelProperty("预计收入") + private BigDecimal predictIncome; +// @JsonIgnore +// private Long realIncomeLong; + @ApiModelProperty("预计收入") + private BigDecimal realIncome; + +// public BigDecimal getPredictIncome(){ +// BigDecimal pr = BigDecimal.valueOf(0); +// if(ObjectUtil.isNotNull(predictIncomeLong)){ +// pr = BigDecimal.valueOf(predictIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP); +// } +// return pr; +// } +// public BigDecimal getRealIncome(){ +// BigDecimal pr = BigDecimal.valueOf(0); +// if(ObjectUtil.isNotNull(realIncomeLong)){ +// pr = BigDecimal.valueOf(realIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP); +// } +// return pr; +// } + } + + @Data + @ApiModel + public static class ProductIncomeAll{ + @ApiModelProperty("产品id") + private Long productId; + @ApiModelProperty("产品名称") + private String productName; + @ApiModelProperty("每个月的销售收入") + private List productIncomeList; + } + + @Data + @ApiModel("查看产品总收入占比图") + public static class ProductIncomeProportion{ + @ApiModelProperty("月份") + private String month; + @JsonIgnore//每月预计收入 + private Long predictTotal; + @JsonIgnore//每月实际收入 + private Long realTotal; + @ApiModelProperty("预计占比") + private int predictProportion; + @ApiModelProperty("实际占比") + private int realProportion; + } + + + @Data + @ApiModel("不同类型的成本") + public static class FirstCostType{ + @ApiModelProperty("一级成本类型Id/产品分类id") + private Long fCostId; + @ApiModelProperty("成本类型名/产品名") + private String fCostName; + @ApiModelProperty("二级分类或者产品") + private List costTypeList; + } + + @Data + @ApiModel("不同类型的成本") + public static class CostType{ + @ApiModelProperty("成本类型Id/产品id") + private Long costId; + @ApiModelProperty("成本类型名/产品名") + private String costName; + @ApiModelProperty("每个月的成本") + private List costMonthList; + } + + @Data + @ApiModel("不同类型的成本") + public static class CostMonth{ + @ApiModelProperty("月份") + private String month; + @ApiModelProperty("预计成本") + private BigDecimal predictCost; + @ApiModelProperty("实际成本") + private BigDecimal realCost; + } + + @Data + @ApiModel() + public static class IncomeType{ + @ApiModelProperty("损益类型") + private Long incomeType; + @ApiModelProperty("损益类型名字") + private String incomeName; + @ApiModelProperty("每月损益") + private List incomeMonthList; + } + @Data + @ApiModel("损益") + public static class IncomeMonth{ + @JsonIgnore + private Long incomeId; + @ApiModelProperty("月份") + private String month; +// @JsonIgnore +// private Long predictIncomeLong; + @ApiModelProperty("预计损益数额") + private BigDecimal predictIncome; +// @JsonIgnore +// private Long realIncomeLong; + @ApiModelProperty("实际损益数额") + private BigDecimal realIncome; + +// public BigDecimal getPredictIncome(){ +// BigDecimal pr = BigDecimal.valueOf(0); +// if(ObjectUtil.isNotNull(predictIncomeLong)){ +// pr = BigDecimal.valueOf(predictIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP); +// } +// return pr; +// } +// public BigDecimal getRealIncome(){ +// BigDecimal pr = BigDecimal.valueOf(0); +// if(ObjectUtil.isNotNull(realIncomeLong)){ +// pr = BigDecimal.valueOf(realIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP); +// } +// return pr; +// } + + } + + @Data + @ApiModel + public static class MoneyFlowType{ + @ApiModelProperty("现金流变动类型id") + private Long moneyFlowType; + @ApiModelProperty("现金流变动类型名字") + private String moneyFlowName; + @ApiModelProperty("现金流变动类型 0收入 1支出") + private int moneyType; + @ApiModelProperty("每月现金流变动") + private List moneyFlowList; + + } + @Data + @ApiModel("现金流变动") + public static class MoneyFlow{ + @JsonIgnore + private Long moneyFlowLogId; + @ApiModelProperty("月份") + private String month; +// @JsonIgnore +// private Long predictFlowLong; +// @JsonIgnore +// private Long realFlowLong; + @ApiModelProperty("预计现金流变动(收入是正数,支出为负数)") + private BigDecimal predictMoneyFlow; + @ApiModelProperty("实际现金流变动(收入是正数,支出为负数)") + private BigDecimal realMoneyFlow; + +// public BigDecimal getPredictMoneyFlow(){ +// BigDecimal pr = BigDecimal.valueOf(0); +// if(ObjectUtil.isNotNull(predictFlowLong)){ +// pr = BigDecimal.valueOf(predictFlowLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP); +// } +// return pr; +// } +// public BigDecimal getRealMoneyFlow(){ +// BigDecimal pr = BigDecimal.valueOf(0); +// if(ObjectUtil.isNotNull(realFlowLong)){ +// pr = BigDecimal.valueOf(realFlowLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP); +// } +// return pr; +// } + } + @Data + public static class TotalIncome { + //"预计总收入" + private Long predictTotal; + //"实际总收入" + private Long realTotal; + } +} diff --git a/pims/src/main/java/com/ccsens/pims/bean/vo/ProductVo.java b/pims/src/main/java/com/ccsens/pims/bean/vo/ProductVo.java new file mode 100644 index 00000000..5b6e553f --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/bean/vo/ProductVo.java @@ -0,0 +1,119 @@ +package com.ccsens.pims.bean.vo; + +import cn.hutool.core.util.ObjectUtil; +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class ProductVo { + + @Data + @ApiModel("查看所有产品的销售收入") + public static class ProductIncomeMonth{ + @ApiModelProperty("月份") + private String month; + @ApiModelProperty("每个月的销售收入") + private List productIncomeList; + } + + @Data + @ApiModel("产品收入详情") + public static class ProductIncomeInfo{ + @ApiModelProperty("产品id") + private Long productId; + @ApiModelProperty("产品名") + private String productName; + @JsonIgnore + private Long predictIncomeLong; + @ApiModelProperty("预计收入") + private BigDecimal predictIncome; + @JsonIgnore + private Long realIncomeLong; + @ApiModelProperty("预计收入") + private BigDecimal realIncome; + + public BigDecimal getPredictIncome(){ + BigDecimal pr = BigDecimal.valueOf(0); + if(ObjectUtil.isNotNull(predictIncomeLong)){ + pr = BigDecimal.valueOf(predictIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP); + } + return pr; + } + public BigDecimal getRealIncome(){ + BigDecimal pr = BigDecimal.valueOf(0); + if(ObjectUtil.isNotNull(realIncomeLong)){ + pr = BigDecimal.valueOf(realIncomeLong).divide(BigDecimal.valueOf(100),2,BigDecimal.ROUND_HALF_UP); + } + return pr; + } + } + + @Data + @ApiModel("查看所有产品的销售收入") + public static class ProductInfo{ + @ApiModelProperty("产品Id") + private Long productId; + @ApiModelProperty("产品名") + private String productName; + @ApiModelProperty("预计收入") + private List predictIncome; + @ApiModelProperty("实际收入") + private List realIncome; + } + @Data + @ApiModel("总成本费用估算表") + public static class ProductCost{ + @ApiModelProperty("成本类型名") + private String costTypeName; + @ApiModelProperty("预计成本") + private List predictCost; + @ApiModelProperty("实际成本") + private List realCost; + } + + @Data + @ApiModel("损益类型") + public static class IncomeType{ + @ApiModelProperty("损益类型") + private Long incomeType; + @ApiModelProperty("损益类型名字") + private String incomeName; + @ApiModelProperty("每月预计损益") + private List predictIncome; + @ApiModelProperty("每月实际损益") + private List realIncome; + } + + @Data + @ApiModel("现金流变动类型") + public static class MoneyFlowType{ + @ApiModelProperty("现金流变动类型id") + private Long moneyFlowType; + @ApiModelProperty("现金流变动类型名字") + private String moneyFlowName; + @ApiModelProperty("现金流变动类型 0收入 1支出") + private int moneyType; + @ApiModelProperty("每月预计现金流变动") + private List predictMoneyFlow; + @ApiModelProperty("每月实际现金流变动") + private List realMoneyFlow; + + } + + @Data + @ApiModel("总成本费用估算表") + public static class MonthNum{ + @ApiModelProperty("预计成本") + private int month; + @ApiModelProperty("数额") + private BigDecimal num; + } +} diff --git a/pims/src/main/java/com/ccsens/pims/config/BeanConfig.java b/pims/src/main/java/com/ccsens/pims/config/BeanConfig.java new file mode 100644 index 00000000..cc9bfeb0 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/config/BeanConfig.java @@ -0,0 +1,31 @@ +package com.ccsens.pims.config; + +import com.ccsens.pims.intercept.MybatisInterceptor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @description: + * @author: wuHuiJuan + * @create: 2019/12/03 18:01 + */ +@Configuration +public class BeanConfig { +// @Bean +// public static PropertySourcesPlaceholderConfigurer properties(){ +// PropertySourcesPlaceholderConfigurer conf = new PropertySourcesPlaceholderConfigurer(); +// YamlPropertiesFactoryBean yml = new YamlPropertiesFactoryBean(); +// yml.setResources(new ClassPathResource("business.yml")); +// conf.setProperties(yml.getObject()); +// return conf; +// } + + /** + * 注册拦截器 + */ + @Bean + public MybatisInterceptor mybatisInterceptor() { + MybatisInterceptor interceptor = new MybatisInterceptor(); + return interceptor; + } +} diff --git a/pims/src/main/java/com/ccsens/pims/config/SpringConfig.java b/pims/src/main/java/com/ccsens/pims/config/SpringConfig.java new file mode 100644 index 00000000..2b00edcf --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/config/SpringConfig.java @@ -0,0 +1,164 @@ +package com.ccsens.pims.config; + + +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; +import com.ccsens.util.config.DruidProps; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.MediaType; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.StringHttpMessageConverter; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.web.servlet.config.annotation.*; + +import javax.sql.DataSource; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.List; + +@Configuration +//public class SpringConfig extends WebMvcConfigurationSupport { +public class SpringConfig implements WebMvcConfigurer { + @Autowired + private DruidProps druidPropsUtil; + @Value("${spring.snowflake.workerId}") + private String workerId; + @Value("${spring.snowflake.datacenterId}") + private String datacenterId; + + /** + * 配置Converter + * @return + */ + @Bean + public HttpMessageConverter responseStringConverter() { + StringHttpMessageConverter converter = new StringHttpMessageConverter( + Charset.forName("UTF-8")); + return converter; + } + + @Bean + public HttpMessageConverter responseJsonConverter(){ + MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); + List mediaTypeList = new ArrayList<>(); + mediaTypeList.add(MediaType.TEXT_HTML); + mediaTypeList.add(MediaType.APPLICATION_JSON_UTF8); + converter.setSupportedMediaTypes(mediaTypeList); + + //converter.setObjectMapper(); + ObjectMapper objectMapper = new ObjectMapper(); + SimpleModule simpleModule = new SimpleModule(); + simpleModule.addSerializer(Long.class, ToStringSerializer.instance); + simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); + objectMapper.registerModule(simpleModule); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + converter.setObjectMapper(objectMapper); + + return converter; + } + + @Override + public void configureMessageConverters(List> converters) { + //super.configureMessageConverters(converters); + converters.add(responseStringConverter()); + converters.add(responseJsonConverter()); + } + + @Override + public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { + configurer.favorPathExtension(false); + } + + + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS"); + } + + /** + * 配置视图解析器 SpringBoot建议使用Thymeleaf代替jsp,动态页面默认路径:resources/template,静态页面默认路径: resources/static + * @return + */ +// @Bean +// public ViewResolver getViewResolver() { +// InternalResourceViewResolver resolver = new InternalResourceViewResolver(); +// resolver.setPrefix("/WEB-INF/views/"); +// resolver.setSuffix(".jsp"); +// return resolver; +// } +// @Override +// public void configureDefaultServletHandling( +// DefaultServletHandlerConfigurer configurer) { +// configurer.enable(); +// } + + + /** + * 配置静态资源 + */ + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("swagger-ui.html") + .addResourceLocations("classpath:/META-INF/resources/"); + registry.addResourceHandler("/webjars/**") + .addResourceLocations("classpath:/META-INF/resources/webjars/"); + + registry.addResourceHandler("/uploads/**") + .addResourceLocations("file:///home/cloud/pims/uploads/"); + //super.addResourceHandlers(registry); + } + + /** + * 配置拦截器 + * @param registry + */ + @Override + public void addInterceptors(InterceptorRegistry registry) { + //addPathPatterns 用于添加拦截规则 + //excludePathPatterns 用于排除拦截 +// registry.addInterceptor(tokenInterceptor()) +// .addPathPatterns("/projects/**") +// .addPathPatterns("/messages/**") +// .addPathPatterns("/users/**") +// .excludePathPatterns("/users/signin") +// .excludePathPatterns("/users/smscode") +// .excludePathPatterns("/users/signup") +// .excludePathPatterns("/users/password") +// .excludePathPatterns("/users/account") +// .excludePathPatterns("/users/token") +// .excludePathPatterns("/users/claims") +// .addPathPatterns("/plugins/**") +// .addPathPatterns("/delivers/**") +// .addPathPatterns("/tasks/**") +// .addPathPatterns("/members/**") +// .addPathPatterns("/templates/**") +// .addPathPatterns("/hardware/**"); + //super.addInterceptors(registry); + } +// +// @Bean +// public TokenInterceptor tokenInterceptor(){ +// return new TokenInterceptor(); +// } + + /** + * 配置数据源(单数据源) + */ + @Bean + public DataSource dataSource(){ + return druidPropsUtil.createDruidDataSource(); + } + + @Bean + public Snowflake snowflake(){ +// return new Snowflake(Long.valueOf(workerId),Long.valueOf(datacenterId)); + return IdUtil.createSnowflake(Long.valueOf(workerId),Long.valueOf(datacenterId)); + } +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/config/SwaggerConfigure.java b/pims/src/main/java/com/ccsens/pims/config/SwaggerConfigure.java new file mode 100644 index 00000000..8c6e27a8 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/config/SwaggerConfigure.java @@ -0,0 +1,56 @@ +package com.ccsens.pims.config; + +import com.ccsens.util.WebConstant; +import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ParameterBuilder; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.schema.ModelRef; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.service.Parameter; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +import java.util.ArrayList; +import java.util.List; + +@Configuration +@EnableSwagger2 +@ConditionalOnExpression("${swagger.enable}") +//public class SwaggerConfigure extends WebMvcConfigurationSupport { +public class SwaggerConfigure /*implements WebMvcConfigurer*/ { + @Bean + public Docket customDocket() { + // + return new Docket(DocumentationType.SWAGGER_2) + .apiInfo(apiInfo()) + .select() + .apis(RequestHandlerSelectors + .basePackage("com.ccsens.pims.api")) + .build() + .globalOperationParameters(setHeaderToken()); + } + + private ApiInfo apiInfo() { + return new ApiInfo("Swagger Tall-game",//大标题 title + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",//小标题 + "1.0.0",//版本 + "http://swagger.io/terms/",//termsOfServiceUrl + "zhangsan",//作者 + "Apache 2.0",//链接显示文字 + "http://www.apache.org/licenses/LICENSE-2.0.html"//网站链接 + ); + } + + private List setHeaderToken() { + ParameterBuilder tokenPar = new ParameterBuilder(); + List pars = new ArrayList<>(); + tokenPar.name(WebConstant.HEADER_KEY_TOKEN).description("token") + .defaultValue(WebConstant.HEADER_KEY_TOKEN_PREFIX) + .modelRef(new ModelRef("string")).parameterType("header").required(false).build(); + pars.add(tokenPar.build()); + return pars; + } +} diff --git a/pims/src/main/java/com/ccsens/pims/intercept/MybatisInterceptor.java b/pims/src/main/java/com/ccsens/pims/intercept/MybatisInterceptor.java new file mode 100644 index 00000000..393c3b70 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/intercept/MybatisInterceptor.java @@ -0,0 +1,154 @@ +package com.ccsens.pims.intercept; + +import cn.hutool.core.collection.CollectionUtil; +import com.ccsens.util.WebConstant; +import org.apache.ibatis.executor.Executor; +import org.apache.ibatis.mapping.*; +import org.apache.ibatis.plugin.*; +import org.apache.ibatis.reflection.DefaultReflectorFactory; +import org.apache.ibatis.reflection.MetaObject; +import org.apache.ibatis.reflection.factory.DefaultObjectFactory; +import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory; +import org.apache.ibatis.session.ResultHandler; +import org.apache.ibatis.session.RowBounds; + +import java.lang.reflect.Method; +import java.util.List; +import java.util.Properties; + +/** + * @description: + * @author: wuHuiJuan + * @create: 2019/12/11 10:58 + */ +@Intercepts({ + @Signature( + type = Executor.class, + method = "query", + args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class} + ) +}) +public class MybatisInterceptor implements Interceptor { + @Override + public Object intercept(Invocation invocation) throws Throwable { + + + String selectByExample = "selectByExample"; + String selectByPrimaryKey = "selectByPrimaryKey"; + + Object[] args = invocation.getArgs(); + MappedStatement statement = (MappedStatement) args[0]; + if (statement.getId().endsWith(selectByExample)) { + //XXXExample + Object example = args[1]; + Method method = example.getClass().getMethod("getOredCriteria", null); + //获取到条件数组,第一个是Criteria + List list = (List)method.invoke(example); + if (CollectionUtil.isEmpty(list)) { + Class clazz = ((ResultMap)statement.getResultMaps().get(0)).getType(); + String exampleName = clazz.getName() + "Example"; + Object paramExample = Class.forName(exampleName).newInstance(); + Method createCriteria = paramExample.getClass().getMethod("createCriteria"); + Object criteria = createCriteria.invoke(paramExample); + Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); + andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); + list.add(criteria); + } else { + Object criteria = list.get(0); + Method getCriteria = criteria.getClass().getMethod("getCriteria"); + List params = (List)getCriteria.invoke(criteria); + boolean hasDel = false; + for(Object param: params) { + Method getCondition = param.getClass().getMethod("getCondition"); + Object condition = getCondition.invoke(param); + if ("iis_del =".equals(condition)) { + hasDel = true; + } + } + if (!hasDel) { + Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); + andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); + } + + } + + + } else if (statement.getId().endsWith(selectByPrimaryKey)) { + BoundSql boundSql = statement.getBoundSql(args[1]); + String sql = boundSql.getSql() + " and rec_status = 0"; + MappedStatement newStatement = newMappedStatement(statement, new BoundSqlSqlSource(boundSql)); + MetaObject msObject = MetaObject.forObject(newStatement, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),new DefaultReflectorFactory()); + msObject.setValue("sqlSource.boundSql.sql", sql); + args[0] = newStatement; + } + + return invocation.proceed(); + } + + @Override + public Object plugin(Object target) { + return Plugin.wrap(target, this); + } + + @Override + public void setProperties(Properties properties) { + + } + + private MappedStatement newMappedStatement(MappedStatement ms, SqlSource newSqlSource) { + MappedStatement.Builder builder = + new MappedStatement.Builder(ms.getConfiguration(), ms.getId(), newSqlSource, ms.getSqlCommandType()); + builder.resource(ms.getResource()); + builder.fetchSize(ms.getFetchSize()); + builder.statementType(ms.getStatementType()); + builder.keyGenerator(ms.getKeyGenerator()); + if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) { + StringBuilder keyProperties = new StringBuilder(); + for (String keyProperty : ms.getKeyProperties()) { + keyProperties.append(keyProperty).append(","); + } + keyProperties.delete(keyProperties.length() - 1, keyProperties.length()); + builder.keyProperty(keyProperties.toString()); + } + builder.timeout(ms.getTimeout()); + builder.parameterMap(ms.getParameterMap()); + builder.resultMaps(ms.getResultMaps()); + builder.resultSetType(ms.getResultSetType()); + builder.cache(ms.getCache()); + builder.flushCacheRequired(ms.isFlushCacheRequired()); + builder.useCache(ms.isUseCache()); + + return builder.build(); + } + + private String getOperateType(Invocation invocation) { + final Object[] args = invocation.getArgs(); + MappedStatement ms = (MappedStatement) args[0]; + SqlCommandType commondType = ms.getSqlCommandType(); + if (commondType.compareTo(SqlCommandType.SELECT) == 0) { + return "select"; + } + if (commondType.compareTo(SqlCommandType.INSERT) == 0) { + return "insert"; + } + if (commondType.compareTo(SqlCommandType.UPDATE) == 0) { + return "update"; + } + if (commondType.compareTo(SqlCommandType.DELETE) == 0) { + return "delete"; + } + return null; + } + // 定义一个内部辅助类,作用是包装sq + class BoundSqlSqlSource implements SqlSource { + private BoundSql boundSql; + public BoundSqlSqlSource(BoundSql boundSql) { + this.boundSql = boundSql; + } + @Override + public BoundSql getBoundSql(Object parameterObject) { + return boundSql; + } + } + +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/CostLogDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/CostLogDao.java new file mode 100644 index 00000000..aa76c001 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/dao/CostLogDao.java @@ -0,0 +1,8 @@ +package com.ccsens.pims.persist.dao; + +import com.ccsens.pims.persist.mapper.CostLogMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface CostLogDao extends CostLogMapper { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/CostTypeDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/CostTypeDao.java new file mode 100644 index 00000000..5bb0caee --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/dao/CostTypeDao.java @@ -0,0 +1,8 @@ +package com.ccsens.pims.persist.dao; + +import com.ccsens.pims.persist.mapper.CostTypeMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface CostTypeDao extends CostTypeMapper { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/IncomeStatementsDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/IncomeStatementsDao.java new file mode 100644 index 00000000..d43acb55 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/dao/IncomeStatementsDao.java @@ -0,0 +1,8 @@ +package com.ccsens.pims.persist.dao; + +import com.ccsens.pims.persist.mapper.IncomeStatementsMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface IncomeStatementsDao extends IncomeStatementsMapper { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/IncomeStatementsLogDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/IncomeStatementsLogDao.java new file mode 100644 index 00000000..48e88c2d --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/dao/IncomeStatementsLogDao.java @@ -0,0 +1,8 @@ +package com.ccsens.pims.persist.dao; + +import com.ccsens.pims.persist.mapper.IncomeStatementsLogMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface IncomeStatementsLogDao extends IncomeStatementsLogMapper { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/MoneyFlowDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/MoneyFlowDao.java new file mode 100644 index 00000000..f0604210 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/dao/MoneyFlowDao.java @@ -0,0 +1,8 @@ +package com.ccsens.pims.persist.dao; + +import com.ccsens.pims.persist.mapper.MoneyFlowMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface MoneyFlowDao extends MoneyFlowMapper { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/MoneyFlowLogDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/MoneyFlowLogDao.java new file mode 100644 index 00000000..5b27f898 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/dao/MoneyFlowLogDao.java @@ -0,0 +1,8 @@ +package com.ccsens.pims.persist.dao; + +import com.ccsens.pims.persist.mapper.MoneyFlowLogMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface MoneyFlowLogDao extends MoneyFlowLogMapper { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/ProductDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/ProductDao.java new file mode 100644 index 00000000..2d5ff825 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/dao/ProductDao.java @@ -0,0 +1,112 @@ +package com.ccsens.pims.persist.dao; + +import com.ccsens.pims.bean.vo.CompanyVo; +import com.ccsens.pims.bean.vo.ProductVo; +import com.ccsens.pims.persist.mapper.ProductMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @author 逗 + */ +@Repository +public interface ProductDao extends ProductMapper { + /** + * 获取产品信息 + * @param projectId 项目id + * @return 返回产品信息 + */ + List queryProductInfo(@Param("projectId") Long projectId); + + /** + * 查看所有产品的收入信息(excel表格时用) + * @param projectId 产品id + * @return 返回产品的收入信息 + */ + List queryProductIncome(@Param("projectId")Long projectId); + + /** + * 查看现金流变动 + * @param projectId 项目id + * @return 返回现金流变动信息 + */ + List queryMoneyFlowExcel(@Param("projectId")Long projectId); + + /** + * 查看损益表内容 + * @param projectId 项目id + * @return 损益 + */ + List queryIncomeExcel(@Param("projectId")Long projectId); + + /** + * 获取产品的成本信息 + * @param projectId 项目id + * @return 每个产品的成本信息 + */ + List getCostProductExcel(Long projectId); + + /** + * 获取其他成本信息 + * @param projectId 项目id + * @return 其他成本信息 + */ + List getCostOtherExcel(Long projectId); + + /*-------------------------------------------------------------------------------------------------*/ + + /** + * 查看所有产品的收入信息(图表时用) + * @param projectId 项目id + * @return 返回产品的收入信息 + */ + List queryProductIncomeMonth(@Param("projectId")Long projectId,@Param("year")int year,@Param("sMonth")int sMonth,@Param("eMonth")int eMonth); + + /** + * 查找单个产品的收入信息 + * @param productId 产品id + * @return 返回产品的收入信息 + */ + List getProductIncome(@Param("productId")Long productId); + + /** + * 查看现金流变动(图表时用) + * @param projectId 项目id + * @return 返回现金流变动信息 + */ + List queryMonthFlow(@Param("projectId")Long projectId,@Param("year")int year,@Param("sMonth")int sMonth,@Param("eMonth")int eMonth); + + /** + * 查看损益表内容(图表时用) + * @param projectId 项目id + * @return 损益 + */ + List queryIncome(@Param("projectId")Long projectId,@Param("year")int year,@Param("sMonth")int sMonth,@Param("eMonth")int eMonth); + + /** + * 查询所有产品全年总收入 + * @param projectId 项目id + * @param year 年份 + * @return 返回总收入 + */ + CompanyVo.TotalIncome getTotalIncome(@Param("projectId")Long projectId,@Param("year")int year); + + /** + * 查找每个月份产品的收入信息 + * @param projectId 项目id + * @param year 年份 + * @return 返回每个月的收入 + */ + List queryProductIncomeProportion(@Param("projectId")Long projectId,@Param("year")int year,@Param("sMonth")int sMonth,@Param("eMonth")int eMonth); + + + /** + * 获取不同类型的成本(图表用) + * @param projectId 项目id + * @return + */ + List getTotalCost(@Param("projectId")Long projectId,@Param("year")int year,@Param("sMonth")int sMonth,@Param("eMonth")int eMonth); + +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/ProductIncomeDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/ProductIncomeDao.java new file mode 100644 index 00000000..7c325553 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/dao/ProductIncomeDao.java @@ -0,0 +1,6 @@ +package com.ccsens.pims.persist.dao; + +import com.ccsens.pims.persist.mapper.ProductIncomeMapper; + +public interface ProductIncomeDao extends ProductIncomeMapper { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/dao/ProductTypeDao.java b/pims/src/main/java/com/ccsens/pims/persist/dao/ProductTypeDao.java new file mode 100644 index 00000000..f80a18a1 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/dao/ProductTypeDao.java @@ -0,0 +1,11 @@ +package com.ccsens.pims.persist.dao; + +import com.ccsens.pims.persist.mapper.ProductTypeMapper; +import org.springframework.stereotype.Repository; + +/** + * @author 逗 + */ +@Repository +public interface ProductTypeDao extends ProductTypeMapper { +} diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/CompanyMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/CompanyMapper.java new file mode 100644 index 00000000..848bde0f --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/CompanyMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.Company; +import com.ccsens.pims.bean.po.CompanyExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CompanyMapper { + long countByExample(CompanyExample example); + + int deleteByExample(CompanyExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Company record); + + int insertSelective(Company record); + + List selectByExample(CompanyExample example); + + Company selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Company record, @Param("example") CompanyExample example); + + int updateByExample(@Param("record") Company record, @Param("example") CompanyExample example); + + int updateByPrimaryKeySelective(Company record); + + int updateByPrimaryKey(Company record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/CostLogMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/CostLogMapper.java new file mode 100644 index 00000000..ca494089 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/CostLogMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.CostLog; +import com.ccsens.pims.bean.po.CostLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CostLogMapper { + long countByExample(CostLogExample example); + + int deleteByExample(CostLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CostLog record); + + int insertSelective(CostLog record); + + List selectByExample(CostLogExample example); + + CostLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CostLog record, @Param("example") CostLogExample example); + + int updateByExample(@Param("record") CostLog record, @Param("example") CostLogExample example); + + int updateByPrimaryKeySelective(CostLog record); + + int updateByPrimaryKey(CostLog record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/CostTypeMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/CostTypeMapper.java new file mode 100644 index 00000000..a864cc3a --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/CostTypeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.CostType; +import com.ccsens.pims.bean.po.CostTypeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CostTypeMapper { + long countByExample(CostTypeExample example); + + int deleteByExample(CostTypeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CostType record); + + int insertSelective(CostType record); + + List selectByExample(CostTypeExample example); + + CostType selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CostType record, @Param("example") CostTypeExample example); + + int updateByExample(@Param("record") CostType record, @Param("example") CostTypeExample example); + + int updateByPrimaryKeySelective(CostType record); + + int updateByPrimaryKey(CostType record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/IncomeStatementsLogMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/IncomeStatementsLogMapper.java new file mode 100644 index 00000000..2f39a14a --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/IncomeStatementsLogMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.IncomeStatementsLog; +import com.ccsens.pims.bean.po.IncomeStatementsLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface IncomeStatementsLogMapper { + long countByExample(IncomeStatementsLogExample example); + + int deleteByExample(IncomeStatementsLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(IncomeStatementsLog record); + + int insertSelective(IncomeStatementsLog record); + + List selectByExample(IncomeStatementsLogExample example); + + IncomeStatementsLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") IncomeStatementsLog record, @Param("example") IncomeStatementsLogExample example); + + int updateByExample(@Param("record") IncomeStatementsLog record, @Param("example") IncomeStatementsLogExample example); + + int updateByPrimaryKeySelective(IncomeStatementsLog record); + + int updateByPrimaryKey(IncomeStatementsLog record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/IncomeStatementsMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/IncomeStatementsMapper.java new file mode 100644 index 00000000..42a4f99e --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/IncomeStatementsMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.IncomeStatements; +import com.ccsens.pims.bean.po.IncomeStatementsExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface IncomeStatementsMapper { + long countByExample(IncomeStatementsExample example); + + int deleteByExample(IncomeStatementsExample example); + + int deleteByPrimaryKey(Long id); + + int insert(IncomeStatements record); + + int insertSelective(IncomeStatements record); + + List selectByExample(IncomeStatementsExample example); + + IncomeStatements selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") IncomeStatements record, @Param("example") IncomeStatementsExample example); + + int updateByExample(@Param("record") IncomeStatements record, @Param("example") IncomeStatementsExample example); + + int updateByPrimaryKeySelective(IncomeStatements record); + + int updateByPrimaryKey(IncomeStatements record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/MoneyFlowLogMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/MoneyFlowLogMapper.java new file mode 100644 index 00000000..b8dfb002 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/MoneyFlowLogMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.MoneyFlowLog; +import com.ccsens.pims.bean.po.MoneyFlowLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MoneyFlowLogMapper { + long countByExample(MoneyFlowLogExample example); + + int deleteByExample(MoneyFlowLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MoneyFlowLog record); + + int insertSelective(MoneyFlowLog record); + + List selectByExample(MoneyFlowLogExample example); + + MoneyFlowLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MoneyFlowLog record, @Param("example") MoneyFlowLogExample example); + + int updateByExample(@Param("record") MoneyFlowLog record, @Param("example") MoneyFlowLogExample example); + + int updateByPrimaryKeySelective(MoneyFlowLog record); + + int updateByPrimaryKey(MoneyFlowLog record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/MoneyFlowMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/MoneyFlowMapper.java new file mode 100644 index 00000000..4b8ee7d9 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/MoneyFlowMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.MoneyFlow; +import com.ccsens.pims.bean.po.MoneyFlowExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MoneyFlowMapper { + long countByExample(MoneyFlowExample example); + + int deleteByExample(MoneyFlowExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MoneyFlow record); + + int insertSelective(MoneyFlow record); + + List selectByExample(MoneyFlowExample example); + + MoneyFlow selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MoneyFlow record, @Param("example") MoneyFlowExample example); + + int updateByExample(@Param("record") MoneyFlow record, @Param("example") MoneyFlowExample example); + + int updateByPrimaryKeySelective(MoneyFlow record); + + int updateByPrimaryKey(MoneyFlow record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/ProductIncomeMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/ProductIncomeMapper.java new file mode 100644 index 00000000..edcce5eb --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/ProductIncomeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.ProductIncome; +import com.ccsens.pims.bean.po.ProductIncomeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProductIncomeMapper { + long countByExample(ProductIncomeExample example); + + int deleteByExample(ProductIncomeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProductIncome record); + + int insertSelective(ProductIncome record); + + List selectByExample(ProductIncomeExample example); + + ProductIncome selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProductIncome record, @Param("example") ProductIncomeExample example); + + int updateByExample(@Param("record") ProductIncome record, @Param("example") ProductIncomeExample example); + + int updateByPrimaryKeySelective(ProductIncome record); + + int updateByPrimaryKey(ProductIncome record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/ProductMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/ProductMapper.java new file mode 100644 index 00000000..634856a3 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/ProductMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.Product; +import com.ccsens.pims.bean.po.ProductExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProductMapper { + long countByExample(ProductExample example); + + int deleteByExample(ProductExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Product record); + + int insertSelective(Product record); + + List selectByExample(ProductExample example); + + Product selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example); + + int updateByExample(@Param("record") Product record, @Param("example") ProductExample example); + + int updateByPrimaryKeySelective(Product record); + + int updateByPrimaryKey(Product record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/persist/mapper/ProductTypeMapper.java b/pims/src/main/java/com/ccsens/pims/persist/mapper/ProductTypeMapper.java new file mode 100644 index 00000000..f4704cb9 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/persist/mapper/ProductTypeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.pims.persist.mapper; + +import com.ccsens.pims.bean.po.ProductType; +import com.ccsens.pims.bean.po.ProductTypeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProductTypeMapper { + long countByExample(ProductTypeExample example); + + int deleteByExample(ProductTypeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProductType record); + + int insertSelective(ProductType record); + + List selectByExample(ProductTypeExample example); + + ProductType selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProductType record, @Param("example") ProductTypeExample example); + + int updateByExample(@Param("record") ProductType record, @Param("example") ProductTypeExample example); + + int updateByPrimaryKeySelective(ProductType record); + + int updateByPrimaryKey(ProductType record); +} \ No newline at end of file diff --git a/pims/src/main/java/com/ccsens/pims/service/IProductService.java b/pims/src/main/java/com/ccsens/pims/service/IProductService.java new file mode 100644 index 00000000..1bee630c --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/service/IProductService.java @@ -0,0 +1,63 @@ +package com.ccsens.pims.service; + +import com.ccsens.pims.bean.dto.CompanyDto; +import com.ccsens.pims.bean.vo.CompanyVo; +import com.ccsens.pims.bean.vo.ProductVo; +import com.ccsens.util.bean.dto.QueryDto; + +import java.util.List; + +/** + * @author 逗 + */ +public interface IProductService { + + /** + * 查看所有产品的价格使用依据 + * @param params 项目id + * @return 返回所有产品的使用依据 + */ + List queryProductInfo(QueryDto params); + + /** + * 查看单个产品的销售收入 + * @param params 产品id + * @return 返回这个产品十个月的销售收入 + */ + List getProductIncome(QueryDto params); + + /** + * 查看所有的产品的销售收入 + * @param params 项目id + * @return 返回所有产品的销售收入 + */ + List queryProductIncome(QueryDto params); + + /** + * 查看产品总收入占比图 + * @param params 项目id + * @return 返回产品每个月份总收入的占比 + */ + List queryProductIncomeProportion(QueryDto params); + + /** + * 总成本费用估算表 + * @param params 项目id + * @return 返回每个与的预计成本与实际成本 + */ + List getTotalCost(QueryDto params); + + /** + * 损益表 + * @param params 项目id + * @return 返回损益类型和每个月的损益 + */ + List queryIncome(QueryDto params); + + /** + * 现金流变动表 + * @param params 项目id + * @return 返回现金流变动类型和每个与变动的数额 + */ + List getMonthFlow(QueryDto params); +} diff --git a/pims/src/main/java/com/ccsens/pims/service/IRealExcelService.java b/pims/src/main/java/com/ccsens/pims/service/IRealExcelService.java new file mode 100644 index 00000000..564483e2 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/service/IRealExcelService.java @@ -0,0 +1,36 @@ +package com.ccsens.pims.service; + +import com.ccsens.pims.bean.dto.CompanyDto; + +public interface IRealExcelService { + /** + * 读取价格依据表 + * @param params wps文件id + */ + void realProduct(CompanyDto.Async params) throws Exception; + + /** + * 读取产值及附加估算表 + * @param async wps文件id + */ + void realProduction(CompanyDto.Async async)throws Exception ; + + /** + * 读取成本表 + * @param async wps文件id + */ + void realCost(CompanyDto.Async async)throws Exception; + + /** + * 读取损益表 + * @param async wps文件id + * @throws Exception + */ + void realIncome(CompanyDto.Async async)throws Exception; + + /** + * 读取现金流表 + * @param async wps文件id + */ + void realMoney(CompanyDto.Async async)throws Exception; +} diff --git a/pims/src/main/java/com/ccsens/pims/service/IReportService.java b/pims/src/main/java/com/ccsens/pims/service/IReportService.java new file mode 100644 index 00000000..e0cee89f --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/service/IReportService.java @@ -0,0 +1,46 @@ +package com.ccsens.pims.service; + +import com.ccsens.pims.bean.dto.CompanyDto; +import com.ccsens.util.bean.dto.QueryDto; + +import java.util.List; + +/** + * @author 逗 + */ +public interface IReportService { + /** + * 通过项目id查找产品使用价格表 + * @param params 项目id + * @return 返回wps表格文件的路径 + */ + List getProduct(QueryDto params) throws Exception; + + /** + * 根据项目id查找产值及附加估算表 + * @param params 项目id + * @return 返回wps表格文件的路径 + */ + List getProduction(QueryDto params)throws Exception; + + /** + * 根据项目id查找总成本费用估算表 + * @param params 项目id + * @return 返回wps 表格文件的路径 + */ + List getCost(QueryDto params)throws Exception; + + /** + * 查看损益表 + * @param params 项目id + * @return 返回wps表格文件的路径 + */ + List getIncome(QueryDto params)throws Exception; + + /** + * 查看现金流表 + * @param params 项目id + * @return 返回wps表格文件的路径 + */ + List getMoney(QueryDto params)throws Exception; +} diff --git a/pims/src/main/java/com/ccsens/pims/service/ProductService.java b/pims/src/main/java/com/ccsens/pims/service/ProductService.java new file mode 100644 index 00000000..e7e26de9 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/service/ProductService.java @@ -0,0 +1,84 @@ +package com.ccsens.pims.service; + +import com.ccsens.pims.bean.dto.CompanyDto; +import com.ccsens.pims.bean.vo.CompanyVo; +import com.ccsens.pims.bean.vo.ProductVo; +import com.ccsens.pims.persist.dao.ProductDao; +import com.ccsens.util.bean.dto.QueryDto; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class ProductService implements IProductService{ + + @Resource + private ProductDao productDao; + + @Override + public List queryProductInfo(QueryDto params) { + CompanyDto.Project project = params.getParam(); + Long projectId = project.getProjectId(); + return productDao.queryProductInfo(projectId); + } + + @Override + public List getProductIncome(QueryDto params) { + CompanyDto.Product product = params.getParam(); + return productDao.getProductIncome(product.getProductId()); + } + + @Override + public List queryProductIncome(QueryDto params) { + CompanyDto.Project project = params.getParam(); + List productIncomeMonthList = productDao.queryProductIncomeMonth(project.getProjectId(),project.getYear(),project.getStartMonth(),project.getEndMonth()); + return productIncomeMonthList; + } + + @Override + public List queryProductIncomeProportion(QueryDto params) { + CompanyDto.Project project = params.getParam(); + //先查所有产品出全年总收入 + CompanyVo.TotalIncome totalIncome = productDao.getTotalIncome(project.getProjectId(),project.getYear()); + //查找每月收入 + List proportionList = + productDao.queryProductIncomeProportion(project.getProjectId(),project.getYear(),project.getStartMonth(),project.getEndMonth()); + //计算每月占比 + for(CompanyVo.ProductIncomeProportion proportion : proportionList){ + BigDecimal predictProportion = BigDecimal.valueOf(proportion.getPredictTotal()).divide(BigDecimal.valueOf(totalIncome.getPredictTotal()), 2, BigDecimal.ROUND_HALF_UP); + proportion.setPredictProportion(predictProportion.multiply(BigDecimal.valueOf(100)).intValue()); + BigDecimal realProportion = BigDecimal.valueOf(proportion.getRealTotal()).divide(BigDecimal.valueOf(totalIncome.getRealTotal()), 2, BigDecimal.ROUND_HALF_UP); + proportion.setPredictProportion(realProportion.multiply(BigDecimal.valueOf(100)).intValue()); + } + return proportionList; + } + + @Override + public List getTotalCost(QueryDto params) { + CompanyDto.Project project = params.getParam(); + List productCosts = productDao.getTotalCost(project.getProjectId(),project.getYear(),project.getStartMonth(),project.getEndMonth()); + return productCosts; + } + + @Override + public List queryIncome(QueryDto params) { + CompanyDto.Project project = params.getParam(); + return productDao.queryIncome(project.getProjectId(),project.getYear(),project.getStartMonth(),project.getEndMonth()); + } + + @Override + public List getMonthFlow(QueryDto params) { + CompanyDto.Project project = params.getParam(); + return productDao.queryMonthFlow(project.getProjectId(),project.getYear(),project.getStartMonth(),project.getEndMonth()); + } +} diff --git a/pims/src/main/java/com/ccsens/pims/service/RealExcelService.java b/pims/src/main/java/com/ccsens/pims/service/RealExcelService.java new file mode 100644 index 00000000..15b12190 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/service/RealExcelService.java @@ -0,0 +1,505 @@ +package com.ccsens.pims.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.cloudutil.bean.tall.vo.WpsVo; +import com.ccsens.cloudutil.feign.TallFeignClient; +import com.ccsens.pims.bean.dto.CompanyDto; +import com.ccsens.pims.bean.po.*; +import com.ccsens.pims.persist.dao.*; +import com.ccsens.util.ExcelUtil; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.io.FileInputStream; +import java.io.InputStream; +import java.math.BigDecimal; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class RealExcelService implements IRealExcelService { + @Resource + private TallFeignClient tallFeignClient; + @Resource + private ProductTypeDao productTypeDao; + @Resource + private Snowflake snowflake; + @Resource + private ProductDao productDao; + @Resource + private ProductIncomeDao productIncomeDao; + @Resource + private CostTypeDao costTypeDao; + @Resource + private CostLogDao costLogDao; + @Resource + private IncomeStatementsDao statementsDao; + @Resource + private IncomeStatementsLogDao statementsLogDao; + @Resource + private MoneyFlowDao moneyFlowDao; + @Resource + private MoneyFlowLogDao moneyFlowLogDao; + + @Override + public void realProduct(CompanyDto.Async params) throws Exception { + log.info("wps文件id:{}", params.toString()); + Long wpsId = params.getFileId(); + JsonResponse businessFileIdAndPath = tallFeignClient.getPathByWpsId(wpsId); + log.info("获取文件路径和项目id:{}", businessFileIdAndPath.toString()); + if (ObjectUtil.isNull(businessFileIdAndPath)) {return;} + WpsVo.BusinessFileIdAndPath fileIdAndPath = businessFileIdAndPath.getData(); + if (ObjectUtil.isNull(fileIdAndPath)) {return;} + //项目id + long projectId = fileIdAndPath.getBusinessId(); + //文件路径 + String path = fileIdAndPath.getFilePath(); + //获取excel文件 + InputStream is = new FileInputStream(path); + XSSFWorkbook wb = new XSSFWorkbook(is); + if (ObjectUtil.isNull(wb)) {return;} + XSSFSheet sheet = wb.getSheetAt(0); + if (ObjectUtil.isNull(sheet)) { return; } + //产品类型id + Long productTypeId = null; + for (int i = 2; i <= sheet.getLastRowNum(); i++){ + XSSFRow row = sheet.getRow(i); + if (ObjectUtil.isNull(row)) { continue; } + String productTypeCell = ExcelUtil.getCellValue(row.getCell(0)); + String productNameCell = ExcelUtil.getCellValue(row.getCell(1)); + String pricingCell = ExcelUtil.getCellValue(row.getCell(2)); + String priceUnitsCell = ExcelUtil.getCellValue(row.getCell(3)); + String grossMarginCell = ExcelUtil.getCellValue(row.getCell(4)); + String significanceSortCell = ExcelUtil.getCellValue(row.getCell( 5)); + String descriptionCell = ExcelUtil.getCellValue(row.getCell(6)); + //产品类型 + if(StrUtil.isNotEmpty(productTypeCell)){ + ProductTypeExample productTypeExample = new ProductTypeExample(); + productTypeExample.createCriteria().andProjectIdEqualTo(projectId).andNameEqualTo(productTypeCell); + List productTypeList = productTypeDao.selectByExample(productTypeExample); + if(CollectionUtil.isNotEmpty(productTypeList)){ + productTypeId = productTypeList.get(0).getId(); + }else { + ProductType productType = new ProductType(); + productType.setId(snowflake.nextId()); + productType.setProjectId(projectId); + productType.setName(productTypeCell); + productTypeDao.insertSelective(productType); + productTypeId = productType.getId(); + } + } + //产品 + if(ObjectUtil.isNull(productTypeId)){ + throw new BaseException("产品类型不存在"); + } + if(StrUtil.isNotEmpty(productNameCell)){ + //查找产品 + ProductExample productExample = new ProductExample(); + productExample.createCriteria().andProjectIdEqualTo(projectId) + .andProductTypeIdEqualTo(productTypeId).andNameEqualTo(productNameCell); + List productList = productDao.selectByExample(productExample); + if(CollectionUtil.isNotEmpty(productList)){ + Product product = productList.get(0); + //详情 + if(StrUtil.isNotEmpty(descriptionCell)){ + product.setDescription(descriptionCell); + } + //定价 + if(StrUtil.isNotEmpty(pricingCell)){ + product.setPricing(Long.valueOf(pricingCell)); + } + //单位 + if(StrUtil.isNotEmpty(priceUnitsCell)){ + product.setPriceUnits(Long.valueOf(priceUnitsCell)); + } + //TODO 重要性排序 + //毛利 + if(StrUtil.isNotEmpty(grossMarginCell)){ + product.setGrossMargin(grossMarginCell); + } + productDao.updateByPrimaryKeySelective(product); + }else { + Product product = new Product(); + product.setId(snowflake.nextId()); + product.setName(productNameCell); + product.setProjectId(projectId); + product.setProductTypeId(productTypeId); + //详情 + if(StrUtil.isNotEmpty(descriptionCell)){ + product.setDescription(descriptionCell); + } + //定价 + if(StrUtil.isNotEmpty(pricingCell)){ + product.setPricing(Long.valueOf(pricingCell)); + } + //单位 + if(StrUtil.isNotEmpty(priceUnitsCell)) { + product.setPriceUnits(Long.valueOf(priceUnitsCell)); + } + //TODO 重要性排序 + //毛利 + if(StrUtil.isNotEmpty(grossMarginCell)){ + product.setGrossMargin(grossMarginCell); + } + productDao.insertSelective(product); + } + } + } + + } + + @Override + public void realProduction(CompanyDto.Async params)throws Exception { + log.info("wps文件id:{}", params.toString()); + Long wpsId = params.getFileId(); + JsonResponse businessFileIdAndPath = tallFeignClient.getPathByWpsId(wpsId); + log.info("获取文件路径和项目id:{}", businessFileIdAndPath.toString()); + if (ObjectUtil.isNull(businessFileIdAndPath)) {return;} + WpsVo.BusinessFileIdAndPath fileIdAndPath = businessFileIdAndPath.getData(); + if (ObjectUtil.isNull(fileIdAndPath)) {return;} + //项目id + long projectId = fileIdAndPath.getBusinessId(); + //文件路径 + String path = fileIdAndPath.getFilePath(); + +// long projectId = 1289087369240252416L; +// String path = "F:\\home\\cloud\\tall\\uploads\\pims\\2020-08-04\\1596521696305.xlsx"; + + //获取excel文件 + InputStream is = new FileInputStream(path); + XSSFWorkbook wb = new XSSFWorkbook(is); + if (ObjectUtil.isNull(wb)) {return;} + XSSFSheet sheet = wb.getSheetAt(0); + if (ObjectUtil.isNull(sheet)) { return; } + long productTypeId = 0; + for (int i = 2; i <= sheet.getLastRowNum(); i+=3){ + XSSFRow row = sheet.getRow(i); + if (ObjectUtil.isNull(row)) { continue; } + String productTypeCell = ExcelUtil.getCellValue(row.getCell(0)); + String productNameCell = ExcelUtil.getCellValue(row.getCell(1)); + + //产品类型 + if(StrUtil.isNotEmpty(productTypeCell)){ + if("收入".equalsIgnoreCase(productTypeCell)){ return; } + ProductTypeExample productTypeExample = new ProductTypeExample(); + productTypeExample.createCriteria().andProjectIdEqualTo(projectId).andNameEqualTo(productTypeCell); + List productTypeList = productTypeDao.selectByExample(productTypeExample); + if(CollectionUtil.isNotEmpty(productTypeList)){ + productTypeId = productTypeList.get(0).getId(); + }else{ + throw new BaseException("产品类型不存在"); + } + } + //查找产品 + ProductExample productExample = new ProductExample(); + productExample.createCriteria().andProjectIdEqualTo(projectId) + .andProductTypeIdEqualTo(productTypeId).andNameEqualTo(productNameCell); + List productList = productDao.selectByExample(productExample); + if(CollectionUtil.isNotEmpty(productList)){ + Long productId = productList.get(0).getId(); + //查找以前的收入,删除后重新添加 + ProductIncomeExample incomeExample = new ProductIncomeExample(); + incomeExample.createCriteria().andProductIdEqualTo(productId); + List incomeList = productIncomeDao.selectByExample(incomeExample); + if(CollectionUtil.isNotEmpty(incomeList)){ + incomeList.forEach(income -> { + income.setRecStatus((byte) 2); + productIncomeDao.updateByPrimaryKeySelective(income); + }); + } + int month = 1; + for(int a = 3; a < 15; a++){ + String predictIncomeCell = ExcelUtil.getCellValue(row.getCell(a)); + long predictIncome = 0; + if(StrUtil.isNotEmpty(predictIncomeCell)){ + predictIncome = new BigDecimal(predictIncomeCell).multiply(BigDecimal.valueOf(100)).longValue(); + } + long realIncome = 0; + XSSFRow realRow = sheet.getRow(i + 1); + if(ObjectUtil.isNotNull(realRow)){ + String realIncomeCell = ExcelUtil.getCellValue(realRow.getCell(a)); + if(StrUtil.isNotEmpty(realIncomeCell)) { + realIncome = new BigDecimal(realIncomeCell).multiply(BigDecimal.valueOf(100)).longValue(); + } + } + //添加产品收入 + ProductIncome productIncome = new ProductIncome(); + productIncome.setId(snowflake.nextId()); + productIncome.setProductId(productId); + productIncome.setMonthTime(month); + productIncome.setPredictIncome(predictIncome); + productIncome.setRealIncome(realIncome); + productIncomeDao.insertSelective(productIncome); + month++; + } + } + + } + } + + @Override + public void realCost(CompanyDto.Async params) throws Exception { + log.info("wps文件id:{}", params.toString()); + Long wpsId = params.getFileId(); + JsonResponse businessFileIdAndPath = tallFeignClient.getPathByWpsId(wpsId); + log.info("获取文件路径和项目id:{}", businessFileIdAndPath.toString()); + if (ObjectUtil.isNull(businessFileIdAndPath)) {return;} + WpsVo.BusinessFileIdAndPath fileIdAndPath = businessFileIdAndPath.getData(); + if (ObjectUtil.isNull(fileIdAndPath)) {return;} + //项目id + long projectId = fileIdAndPath.getBusinessId(); + //文件路径 + String path = fileIdAndPath.getFilePath(); +// long projectId = 1289087369240252416L; +// String path = "C:\\Users\\逗\\Desktop\\产品成本费用估算表.xlsx"; + + //获取excel文件 + InputStream is = new FileInputStream(path); + XSSFWorkbook wb = new XSSFWorkbook(is); + if (ObjectUtil.isNull(wb)) {return;} + log.info("读取到excel文件"); + XSSFSheet sheet = wb.getSheetAt(0); + if (ObjectUtil.isNull(sheet)) { return; } + //产品或成本类型的id + long costTypeId = 0; + //产品成本还是,其他成本 1产品成本 0其他成本 + int otherType = 0; + for (int i = 2; i <= sheet.getLastRowNum(); i+=3){ + XSSFRow row = sheet.getRow(i); + if (ObjectUtil.isNull(row)) { continue; } + String costTypeCell = ExcelUtil.getCellValue(row.getCell(0)); + if(StrUtil.isNotEmpty(costTypeCell)){ + //根据名字查找产品 + ProductExample productExample = new ProductExample(); + productExample.createCriteria().andNameEqualTo(costTypeCell).andProjectIdEqualTo(projectId); + List productList = productDao.selectByExample(productExample); + if(CollectionUtil.isNotEmpty(productList)){ + Product product = productList.get(0); + costTypeId = product.getId(); + otherType = 1; + //查找所有这个产品的成本,删除 + CostLogExample costLogExample = new CostLogExample(); + costLogExample.createCriteria().andCostTypeIdEqualTo(costTypeId).andProductCostEqualTo((byte) otherType); + List costLogList = costLogDao.selectByExample(costLogExample); + if(CollectionUtil.isNotEmpty(costLogList)){ + costLogList.forEach(costLog -> { + costLog.setRecStatus((byte) 2); + costLogDao.updateByPrimaryKeySelective(costLog); + }); + } + }else { + //没有产品则去查询成本类型 + CostTypeExample costTypeExample = new CostTypeExample(); + costTypeExample.createCriteria().andNameEqualTo(costTypeCell).andProjectIdEqualTo(projectId); + List costTypeList = costTypeDao.selectByExample(costTypeExample); + if(CollectionUtil.isEmpty(costTypeList)){ + continue; + } + CostType costType = costTypeList.get(0); + costTypeId = costType.getId(); + //查找所有这个类型的成本,删除 + CostLogExample costLogExample = new CostLogExample(); + costLogExample.createCriteria().andCostTypeIdEqualTo(costTypeId).andProductCostEqualTo((byte) otherType); + List costLogList = costLogDao.selectByExample(costLogExample); + if(CollectionUtil.isNotEmpty(costLogList)){ + costLogList.forEach(costLog -> { + costLog.setRecStatus((byte) 2); + costLogDao.updateByPrimaryKeySelective(costLog); + }); + } + } + int month = 1; + for(int a = 2; a < 14; a++){ + String predictcostCell = ExcelUtil.getCellValue(row.getCell(a)); + long predictCost = 0; + if(StrUtil.isNotEmpty(predictcostCell)){ + predictCost = new BigDecimal(predictcostCell).multiply(BigDecimal.valueOf(100)).longValue(); + } + long realCost = 0; + XSSFRow realRow = sheet.getRow(i); + if(ObjectUtil.isNotNull(realRow)){ + String realCostCell = ExcelUtil.getCellValue(realRow.getCell(a)); + if(StrUtil.isNotEmpty(realCostCell)) { + realCost = new BigDecimal(realCostCell).multiply(BigDecimal.valueOf(100)).longValue(); + } + } + //添加成本 + CostLog costLog = new CostLog(); + costLog.setId(snowflake.nextId()); + costLog.setCostTypeId(costTypeId); + costLog.setProductCost((byte) otherType); + costLog.setMonthTime(month); + costLog.setPredictCost(predictCost); + costLog.setRealCost(realCost); + costLogDao.insertSelective(costLog); + month++; + } + } + } + } + + @Override + public void realIncome(CompanyDto.Async params) throws Exception { + log.info("wps文件id:{}", params.toString()); + Long wpsId = params.getFileId(); + JsonResponse businessFileIdAndPath = tallFeignClient.getPathByWpsId(wpsId); + log.info("获取文件路径和项目id:{}", businessFileIdAndPath.toString()); + if (ObjectUtil.isNull(businessFileIdAndPath)) {return;} + WpsVo.BusinessFileIdAndPath fileIdAndPath = businessFileIdAndPath.getData(); + if (ObjectUtil.isNull(fileIdAndPath)) {return;} + //项目id + long projectId = fileIdAndPath.getBusinessId(); + //文件路径 + String path = fileIdAndPath.getFilePath(); + //获取excel文件 + InputStream is = new FileInputStream(path); + XSSFWorkbook wb = new XSSFWorkbook(is); + if (ObjectUtil.isNull(wb)) {return;} + XSSFSheet sheet = wb.getSheetAt(0); + if (ObjectUtil.isNull(sheet)) { return; } + //产品或成本类型的id + long incomeId = 0; + for (int i = 2; i <= sheet.getLastRowNum(); i+=3){ + XSSFRow row = sheet.getRow(i); + if (ObjectUtil.isNull(row)) { continue; } + String incomeTypeCell = ExcelUtil.getCellValue(row.getCell(0)); + if(StrUtil.isNotEmpty(incomeTypeCell)){ + //根据名字查找收入类型 + IncomeStatementsExample statementsExample = new IncomeStatementsExample(); + statementsExample.createCriteria().andNameEqualTo(incomeTypeCell).andProjectIdEqualTo(projectId); + List incomeStatements = statementsDao.selectByExample(statementsExample); + if(CollectionUtil.isEmpty(incomeStatements)){ + continue; + } + incomeId = incomeStatements.get(0).getId(); + //删除此类型以前所有的收入信息 + IncomeStatementsLogExample statementsLogExample = new IncomeStatementsLogExample(); + statementsLogExample.createCriteria().andIncomeStatementsIdEqualTo(incomeId); + List statementsLogList = statementsLogDao.selectByExample(statementsLogExample); + if(CollectionUtil.isNotEmpty(statementsLogList)){ + statementsLogList.forEach(statementsLog ->{ + statementsLog.setRecStatus((byte) 2); + statementsLogDao.updateByPrimaryKeySelective(statementsLog); + }); + } + //循环添加新的收入记录 + int month = 1; + for(int a = 2; a < 14; a++){ + String statementsLogCell = ExcelUtil.getCellValue(row.getCell(a)); + long predictIncome = 0; + if(StrUtil.isNotEmpty(statementsLogCell)){ + predictIncome = new BigDecimal(statementsLogCell).multiply(BigDecimal.valueOf(100)).longValue(); + } + long realIncome = 0; + XSSFRow realRow = sheet.getRow(i); + if(ObjectUtil.isNotNull(realRow)){ + String realIncomeCell = ExcelUtil.getCellValue(realRow.getCell(a)); + if(StrUtil.isNotEmpty(realIncomeCell)) { + realIncome = new BigDecimal(realIncomeCell).multiply(BigDecimal.valueOf(100)).longValue(); + } + } + //添加成本 + IncomeStatementsLog statementsLog = new IncomeStatementsLog(); + statementsLog.setId(snowflake.nextId()); + statementsLog.setProjectId(projectId); + statementsLog.setIncomeStatementsId(incomeId); + statementsLog.setMonthTime(month); + statementsLog.setPredictMoney(predictIncome); + statementsLog.setRealMoney(realIncome); + statementsLogDao.insertSelective(statementsLog); + month++; + } + } + } + } + + @Override + public void realMoney(CompanyDto.Async params) throws Exception { + log.info("wps文件id:{}", params.toString()); + Long wpsId = params.getFileId(); + JsonResponse businessFileIdAndPath = tallFeignClient.getPathByWpsId(wpsId); + log.info("获取文件路径和项目id:{}", businessFileIdAndPath.toString()); + if (ObjectUtil.isNull(businessFileIdAndPath)) {return;} + WpsVo.BusinessFileIdAndPath fileIdAndPath = businessFileIdAndPath.getData(); + if (ObjectUtil.isNull(fileIdAndPath)) {return;} + //项目id + long projectId = fileIdAndPath.getBusinessId(); + //文件路径 + String path = fileIdAndPath.getFilePath(); + //获取excel文件 + InputStream is = new FileInputStream(path); + XSSFWorkbook wb = new XSSFWorkbook(is); + if (ObjectUtil.isNull(wb)) {return;} + XSSFSheet sheet = wb.getSheetAt(0); + if (ObjectUtil.isNull(sheet)) { return; } + //现金流动类型的id + long moneyTypeId = 0; + for (int i = 2; i <= sheet.getLastRowNum(); i+=3){ + XSSFRow row = sheet.getRow(i); + if (ObjectUtil.isNull(row)) { continue; } + String moneyTypeCell = ExcelUtil.getCellValue(row.getCell(0)); + if(StrUtil.isNotEmpty(moneyTypeCell)){ + //根据名字查看现金流类型 + MoneyFlowExample moneyFlowExample = new MoneyFlowExample(); + moneyFlowExample.createCriteria().andProjectIdEqualTo(projectId).andNameEqualTo(moneyTypeCell); + List moneyFlowList = moneyFlowDao.selectByExample(moneyFlowExample); + if(CollectionUtil.isEmpty(moneyFlowList)){ + continue; + } + moneyTypeId = moneyFlowList.get(0).getId(); + //删除之前的现金流信息 + MoneyFlowLogExample flowLogExample = new MoneyFlowLogExample(); + flowLogExample.createCriteria().andMoneyFlowIdEqualTo(moneyTypeId).andProjectIdEqualTo(projectId); + List moneyFlowLogList = moneyFlowLogDao.selectByExample(flowLogExample); + if(CollectionUtil.isNotEmpty(moneyFlowLogList)){ + moneyFlowLogList.forEach(moneyFlowLog -> { + moneyFlowLog.setRecStatus((byte) 2); + moneyFlowLogDao.updateByPrimaryKeySelective(moneyFlowLog); + }); + } + //添加新的现金流信息 + int month = 1; + for(int a = 3; a < 15; a++){ + String moeyLogCell = ExcelUtil.getCellValue(row.getCell(a)); + long predictMoney = 0; + if(StrUtil.isNotEmpty(moeyLogCell)){ + predictMoney = new BigDecimal(moeyLogCell).multiply(BigDecimal.valueOf(100)).longValue(); + } + long realMoney = 0; + XSSFRow realRow = sheet.getRow(i); + if(ObjectUtil.isNotNull(realRow)){ + String realMoneyCell = ExcelUtil.getCellValue(realRow.getCell(a)); + if(StrUtil.isNotEmpty(realMoneyCell)) { + realMoney = new BigDecimal(realMoneyCell).multiply(BigDecimal.valueOf(100)).longValue(); + } + } + //添加成本 + MoneyFlowLog moneyFlowLog = new MoneyFlowLog(); + moneyFlowLog.setId(snowflake.nextId()); + moneyFlowLog.setProjectId(projectId); + moneyFlowLog.setMoneyFlowId(moneyTypeId); + moneyFlowLog.setMonthTime(month); + moneyFlowLog.setPredictMoney(predictMoney); + moneyFlowLog.setRealMoney(realMoney); + moneyFlowLogDao.insertSelective(moneyFlowLog); + month++; + } + } + } + } +} diff --git a/pims/src/main/java/com/ccsens/pims/service/ReportService.java b/pims/src/main/java/com/ccsens/pims/service/ReportService.java new file mode 100644 index 00000000..96cb5313 --- /dev/null +++ b/pims/src/main/java/com/ccsens/pims/service/ReportService.java @@ -0,0 +1,846 @@ +package com.ccsens.pims.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import com.ccsens.cloudutil.bean.tall.dto.WpsDto; +import com.ccsens.cloudutil.feign.TallFeignClient; +import com.ccsens.pims.bean.dto.CompanyDto; +import com.ccsens.pims.bean.vo.CompanyVo; +import com.ccsens.pims.persist.dao.ProductDao; +import com.ccsens.util.PoiUtil; +import com.ccsens.util.PropUtil; +import com.ccsens.util.WebConstant; +import com.ccsens.util.bean.dto.QueryDto; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStream; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class ReportService implements IReportService { + @Resource + private ProductDao productDao; + @Resource + private TallFeignClient tallFeignClient; + + /** + * 产品价格依据表 + */ + @Override + public List getProduct(QueryDto params) throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 + List wpsPath = queryVisitUrls("read/product",project.getProjectId(),(byte)3,params.getUserId()); + if (CollectionUtil.isNotEmpty(wpsPath)) { + return wpsPath; + } + //查询产品信息 + List productTypeList = productDao.queryProductInfo(project.getProjectId()); + + //生成excel写入的数据 + List> product = generateProduct(productTypeList); + //写入WBS + generateExcelWithWps(project.getProjectId(),(byte)3, params.getUserId(), "价格依据表", product); + //获取wps文件的路径并返回 + wpsPath = queryVisitUrls("read/product",project.getProjectId(),(byte)3,params.getUserId()); + //添加wps关联信息 + return wpsPath; + } + + /** + * 查看产值及附加估算表 + */ + @Override + public List getProduction(QueryDto params) throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 +// List wpsPath = queryVisitUrls("read/production",project.getProjectId(),(byte) 4,params.getUserId()); +// if (CollectionUtil.isNotEmpty(wpsPath)) { +// return wpsPath; +// } + //从数据库查找产品收入信息 + List productIncomeTypeList = + productDao.queryProductIncome(project.getProjectId()); + //生成excel写入的数据 + List> product = generateProduction(productIncomeTypeList); + //写入WBS + generateExcelWithWps(project.getProjectId(),(byte)4, params.getUserId(), "产值及附加估算表", product); + //获取wps文件的路径并返回 +// wpsPath = queryVisitUrls("read/production",project.getProjectId(),(byte) 4,params.getUserId()); +// //添加wps关联信息 +// return wpsPath; + return null; + } + + /** + * 查看总成本费用估算表 + */ + @Override + public List getCost(QueryDto params)throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 + List wpsPath = queryVisitUrls("read/cost",project.getProjectId(),(byte) 5,params.getUserId()); + if (CollectionUtil.isNotEmpty(wpsPath)) { + return wpsPath; + } + //获取产品的成本 + List costProductTypeList = productDao.getCostProductExcel(project.getProjectId()); + //获取其他的成本 + List costOtherTypeList = productDao.getCostOtherExcel(project.getProjectId()); + //生成写入的数据 + List> cost = generateCost(costProductTypeList,costOtherTypeList); + //写入WBS + generateExcelWithWps(project.getProjectId(), (byte)5, params.getUserId(), "产品成本费用估算表", cost); + //获取wps文件的路径并返回 + wpsPath = queryVisitUrls("read/cost",project.getProjectId(),(byte) 5,params.getUserId()); + //添加wps关联信息 + return wpsPath; + } + + /** + * 查看损益表表 + */ + @Override + public List getIncome(QueryDto params) throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 + List wpsPath = queryVisitUrls("read/income",project.getProjectId(),(byte) 6,params.getUserId()); + if (CollectionUtil.isNotEmpty(wpsPath)) { + return wpsPath; + } + List incomeTypeList = productDao.queryIncomeExcel(project.getProjectId()); + //生成excel写入的数据 + List> product = generateIncome(incomeTypeList); + //写入WBS + generateExcelWithWps(project.getProjectId(),(byte)6, params.getUserId(), "损益表", product); + //获取wps文件的路径并返回 + wpsPath = queryVisitUrls("read/income",project.getProjectId(),(byte) 6,params.getUserId()); + //添加wps关联信息 + return wpsPath; + } + + /** + * 查看现金流表 + */ + @Override + public List getMoney(QueryDto params) throws Exception { + CompanyDto.Project project = params.getParam(); + //查询此任务的报表,有则直接返回 + List wpsPath = queryVisitUrls("read/money",project.getProjectId(),(byte) 7,params.getUserId()); + if (CollectionUtil.isNotEmpty(wpsPath)) { + return wpsPath; + } + + List moneyFlowTypes = productDao.queryMoneyFlowExcel(project.getProjectId()); + //生成excel写入的数据 + List> product = generateMoneyFlow(moneyFlowTypes); + //写入WBS + generateExcelWithWps(project.getProjectId(),(byte) 7, params.getUserId(), "现金流表", product); + //获取wps文件的路径并返回 + wpsPath = queryVisitUrls("read/money",project.getProjectId(),(byte) 7,params.getUserId()); + //添加wps关联信息 + return wpsPath; + } + + /** + * 查询wps文件访问路径 + * @param wUrl 回调接口的路径 + * @param businessId 业务id + * @param businessType 业务类型 + * @param userId userId + * @return 返回文件访问路径 + */ + private List queryVisitUrls(String wUrl,Long businessId,byte businessType,Long userId){ + List wpsPath; + Map paramsUrl = new HashMap<>(); + paramsUrl.put(WebConstant.Wps._W_URL, PropUtil.domain + wUrl); + WpsDto.VisitWpsUrl visitWpsUrl = new WpsDto.VisitWpsUrl(); + visitWpsUrl.setBusinessId(businessId); + visitWpsUrl.setBusinessType(businessType); + visitWpsUrl.setUserId(userId); + visitWpsUrl.setParams(paramsUrl); + wpsPath = tallFeignClient.queryVisitUrls(visitWpsUrl); + return wpsPath; + } + + /** + * 生成excel文件并关联wps + * @param businessId 业务类型id(任务id) + * @param userId userId + * @param sheetName 生成的excel文件的名字和sheet名字 + * @param list 需要写入的数据 + * @throws Exception 文件异常 + */ + private void generateExcelWithWps(Long businessId, Byte businessType,Long userId, String sheetName, List> list) throws Exception { + Workbook wb = new XSSFWorkbook(); + PoiUtil.exportWB(sheetName, list, wb); + //生成文件 + String name = sheetName + ".xlsx"; + String fileName = "pims/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = WebConstant.UPLOAD_PATH_BASE + File.separator + fileName; + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + tmpFile.getParentFile().mkdirs(); + } + OutputStream stream = new FileOutputStream(tmpFile); + wb.write(stream); + stream.close(); +// //关联wps +// WpsDto.Business business = new WpsDto.Business(); +// business.setBusinessId(businessId); +// business.setBusinessType(businessType); +// business.setUserId(userId); +// business.setFileName(name); +// business.setFilePath(fileName); +// business.setFileSize(tmpFile.length()); +// business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); +// business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_WRITE); +// tallFeignClient.saveWpsFile(business); + } + + /** + * 价格依据表的写入数据 + * @param productTypeList 价格依据数据 + * @return 返回写入数据 + */ + private List> generateProduct(List productTypeList) { + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("产品或服务价格使用依据表", 7, 1)); + list.add(title); + List header = new ArrayList<>(); + header.add(new PoiUtil.PoiUtilCell("产品或服务", 2, 1)); + header.add(new PoiUtil.PoiUtilCell()); + header.add(new PoiUtil.PoiUtilCell("定价")); + header.add(new PoiUtil.PoiUtilCell("单位(元)")); + header.add(new PoiUtil.PoiUtilCell("毛利")); + header.add(new PoiUtil.PoiUtilCell("重要性排序")); + header.add(new PoiUtil.PoiUtilCell("备注")); + list.add(header); + + if (CollectionUtil.isNotEmpty(productTypeList)) { + productTypeList.forEach(productType -> { + if (CollectionUtil.isEmpty(productType.getProductList())) { + List product = new ArrayList<>(); + product.add(new PoiUtil.PoiUtilCell(productType.getProductTypeName())); + list.add(product); + } else { + for (int i = 0; i < productType.getProductList().size(); i++) { + CompanyVo.ProductInfo productInfo = productType.getProductList().get(i); + List product = new ArrayList<>(); + if (i == 0) { + product.add(new PoiUtil.PoiUtilCell(productType.getProductTypeName(), 1, productType.getProductList().size())); + } else { + product.add(new PoiUtil.PoiUtilCell()); + } + product.add(new PoiUtil.PoiUtilCell(productInfo.getProductName())); + product.add(new PoiUtil.PoiUtilCell(productInfo.getPricing().toString())); + product.add(new PoiUtil.PoiUtilCell(productInfo.getPriceUnits().toString())); + product.add(new PoiUtil.PoiUtilCell(productInfo.getGrossMargin())); + product.add(new PoiUtil.PoiUtilCell()); + product.add(new PoiUtil.PoiUtilCell(productInfo.getDescription())); + list.add(product); + } + } + }); + } + return list; + } + + /** + * 产值及附加估算表 + * @param productIncomeTypeList 收入数据 + * @return 返回需写入的数据 + */ + private List> generateProduction(List productIncomeTypeList) { + //标题 + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("产值及附加估算表", 17, 1)); + list.add(title); + //表头 + List header = new ArrayList<>(); + header.add(new PoiUtil.PoiUtilCell("产品", 2, 1)); + header.add(new PoiUtil.PoiUtilCell()); + header.add(new PoiUtil.PoiUtilCell()); + for (int i = 1; i < 13; i++) { + header.add(new PoiUtil.PoiUtilCell(i + "月")); + } + header.add(new PoiUtil.PoiUtilCell("合计")); + header.add(new PoiUtil.PoiUtilCell("权重分析")); + list.add(header); + //产品信息 + if (CollectionUtil.isNotEmpty(productIncomeTypeList)) { + //循环产品类型 + productIncomeTypeList.forEach(productIncome -> { + if (CollectionUtil.isEmpty(productIncome.getProductIncomeAllList())) { + List product = new ArrayList<>(); + product.add(new PoiUtil.PoiUtilCell(productIncome.getProductTypeName())); + list.add(product); + } else { + //循环产品信息 + for (int i = 0; i < productIncome.getProductIncomeAllList().size(); i++) { + //生成每个产品信息需要的三行 + CompanyVo.ProductIncomeAll productIncomeAll = productIncome.getProductIncomeAllList().get(i); + List product1 = new ArrayList<>(); + List product2 = new ArrayList<>(); + List product3 = new ArrayList<>(); + if (i == 0) { + //每个类型的第一行有内容,其他的为空 + product1.add(new PoiUtil.PoiUtilCell(productIncome.getProductTypeName(), 1, productIncome.getProductIncomeAllList().size() * 3)); + product2.add(new PoiUtil.PoiUtilCell()); + product3.add(new PoiUtil.PoiUtilCell()); + } else { + product1.add(new PoiUtil.PoiUtilCell()); + product2.add(new PoiUtil.PoiUtilCell()); + product3.add(new PoiUtil.PoiUtilCell()); + } + //产品名称,第一行有,剩下两行为空 + product1.add(new PoiUtil.PoiUtilCell(productIncomeAll.getProductName(),1,3)); + product2.add(new PoiUtil.PoiUtilCell()); + product3.add(new PoiUtil.PoiUtilCell()); + + product1.add(new PoiUtil.PoiUtilCell("预计收入")); + product2.add(new PoiUtil.PoiUtilCell("实际收入")); + product3.add(new PoiUtil.PoiUtilCell("偏差率")); + //循环每月的收入 + BigDecimal totalProductIncome = BigDecimal.valueOf(0); + BigDecimal totalRealIncome = BigDecimal.valueOf(0); + for (int a = 0; a < 12; a++){ + if (a < productIncomeAll.getProductIncomeList().size()) { + CompanyVo.ProductIncome income = productIncomeAll.getProductIncomeList().get(a); + product1.add(new PoiUtil.PoiUtilCell(income.getPredictIncome().toString())); + product2.add(new PoiUtil.PoiUtilCell(income.getRealIncome().toString())); + + if(income.getPredictIncome().multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = income.getRealIncome().subtract(income.getPredictIncome()). + divide(income.getPredictIncome(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + product3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + product3.add(new PoiUtil.PoiUtilCell()); + } + totalProductIncome = totalProductIncome.add(income.getPredictIncome()); + totalRealIncome = totalRealIncome.add(income.getRealIncome()); + }else { + product1.add(new PoiUtil.PoiUtilCell()); + product2.add(new PoiUtil.PoiUtilCell()); + product3.add(new PoiUtil.PoiUtilCell()); + } + } + + product1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString())); + product2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString())); + if(totalProductIncome.multiply(BigDecimal.valueOf(100)).intValue() != 0){ + BigDecimal bias = totalRealIncome.subtract(totalProductIncome). + divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + product3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + product3.add(new PoiUtil.PoiUtilCell()); + } + product1.add(new PoiUtil.PoiUtilCell()); + product2.add(new PoiUtil.PoiUtilCell()); + product3.add(new PoiUtil.PoiUtilCell()); + list.add(product1); + list.add(product2); + list.add(product3); + } + } + }); +// //添加收入总计 +// List totalProduct = new ArrayList<>(); +// totalProduct.add(new PoiUtil.PoiUtilCell(productIncome.getProductTypeName())); +// list.add(product); + } + + return list; + } + + + /** + * 生成现金流表的写入数据 + * + * @param moneyFlowTypes 现金流表信息 + * @return 返回写入数据 + */ + private List> generateMoneyFlow(List moneyFlowTypes) { + //标题 + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("现金流表(全部定投)", 16, 1)); + list.add(title); + //表头 + List header = new ArrayList<>(); + header.add(new PoiUtil.PoiUtilCell()); + header.add(new PoiUtil.PoiUtilCell()); + header.add(new PoiUtil.PoiUtilCell("初期")); + for (int i = 1; i < 13; i++) { + header.add(new PoiUtil.PoiUtilCell(i + "月")); + } + header.add(new PoiUtil.PoiUtilCell("合计")); + list.add(header); + if (CollectionUtil.isNotEmpty(moneyFlowTypes)) { + for (int i = 0; i < moneyFlowTypes.size(); i++) { + CompanyVo.MoneyFlowType moneyFlowType = moneyFlowTypes.get(i); + if (moneyFlowType.getMoneyType() == 0) { + List income1 = new ArrayList<>(); + List income2 = new ArrayList<>(); + List income3 = new ArrayList<>(); + + income1.add(new PoiUtil.PoiUtilCell(moneyFlowType.getMoneyFlowName(), 1, 3)); + income2.add(new PoiUtil.PoiUtilCell()); + income3.add(new PoiUtil.PoiUtilCell()); + + income1.add(new PoiUtil.PoiUtilCell("预计收入")); + income2.add(new PoiUtil.PoiUtilCell("实际收入")); + income3.add(new PoiUtil.PoiUtilCell("偏差率")); + + income1.add(new PoiUtil.PoiUtilCell()); + income2.add(new PoiUtil.PoiUtilCell()); + income3.add(new PoiUtil.PoiUtilCell()); + //循环每月的收入 + BigDecimal totalProductIncome = BigDecimal.valueOf(0); + BigDecimal totalRealIncome = BigDecimal.valueOf(0); + for (int a = 0; a < 12; a++){ + if (a < moneyFlowType.getMoneyFlowList().size()) { + CompanyVo.MoneyFlow moneyFlow = moneyFlowType.getMoneyFlowList().get(a); + income1.add(new PoiUtil.PoiUtilCell(moneyFlow.getPredictMoneyFlow().toString())); + income2.add(new PoiUtil.PoiUtilCell(moneyFlow.getRealMoneyFlow().toString())); + + if(moneyFlow.getPredictMoneyFlow().multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = moneyFlow.getRealMoneyFlow().subtract(moneyFlow.getPredictMoneyFlow()). + divide(moneyFlow.getPredictMoneyFlow(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + income3.add(new PoiUtil.PoiUtilCell()); + } + totalProductIncome = totalProductIncome.add(moneyFlow.getPredictMoneyFlow()); + totalRealIncome = totalRealIncome.add(moneyFlow.getRealMoneyFlow()); + }else { + income1.add(new PoiUtil.PoiUtilCell()); + income2.add(new PoiUtil.PoiUtilCell()); + income3.add(new PoiUtil.PoiUtilCell()); + } + } +// if (CollectionUtil.isNotEmpty(moneyFlowType.getMoneyFlowList())) { +// for (CompanyVo.MoneyFlow moneyFlow : moneyFlowType.getMoneyFlowList()) { +// income1.add(new PoiUtil.PoiUtilCell(moneyFlow.getPredictMoneyFlow().toString())); +// income2.add(new PoiUtil.PoiUtilCell(moneyFlow.getRealMoneyFlow().toString())); +// BigDecimal bias = moneyFlow.getRealMoneyFlow().subtract(moneyFlow.getPredictMoneyFlow()). +// divide(moneyFlow.getRealMoneyFlow(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); +// income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); +// totalProductIncome = totalProductIncome.add(moneyFlow.getPredictMoneyFlow()); +// totalRealIncome = totalRealIncome.add(moneyFlow.getRealMoneyFlow()); +// } +// } + income1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString())); + income2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString())); + if(totalProductIncome.multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = totalRealIncome.subtract(totalProductIncome). + divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + income3.add(new PoiUtil.PoiUtilCell()); + } + list.add(income1); + list.add(income2); + list.add(income3); + } + } + //现金流入总计 + List totalMoneyIncome1 = new ArrayList<>(); + List totalMoneyIncome2 = new ArrayList<>(); + List totalMoneyIncome3 = new ArrayList<>(); + totalMoneyIncome1.add(new PoiUtil.PoiUtilCell("现金流入", 1, 3)); + totalMoneyIncome2.add(new PoiUtil.PoiUtilCell()); + totalMoneyIncome3.add(new PoiUtil.PoiUtilCell()); + totalMoneyIncome1.add(new PoiUtil.PoiUtilCell("预计收入")); + totalMoneyIncome2.add(new PoiUtil.PoiUtilCell("实际收入")); + totalMoneyIncome3.add(new PoiUtil.PoiUtilCell("偏差率")); + //TODO 现金流入 + list.add(totalMoneyIncome1); + list.add(totalMoneyIncome2); + list.add(totalMoneyIncome3); + + for (int i = 0; i < moneyFlowTypes.size(); i++) { + CompanyVo.MoneyFlowType moneyFlowType = moneyFlowTypes.get(i); + if (moneyFlowType.getMoneyType() == 1) { + List income1 = new ArrayList<>(); + List income2 = new ArrayList<>(); + List income3 = new ArrayList<>(); + + income1.add(new PoiUtil.PoiUtilCell(moneyFlowType.getMoneyFlowName(), 1, 3)); + income2.add(new PoiUtil.PoiUtilCell()); + income3.add(new PoiUtil.PoiUtilCell()); + + income1.add(new PoiUtil.PoiUtilCell("预计支出")); + income2.add(new PoiUtil.PoiUtilCell("实际支出")); + income3.add(new PoiUtil.PoiUtilCell("偏差率")); + income1.add(new PoiUtil.PoiUtilCell()); + income2.add(new PoiUtil.PoiUtilCell()); + income3.add(new PoiUtil.PoiUtilCell()); + //循环每月的收入 + BigDecimal totalProductIncome = BigDecimal.valueOf(0); + BigDecimal totalRealIncome = BigDecimal.valueOf(0); + for (int a = 0; a < 12; a++){ + if (a < moneyFlowType.getMoneyFlowList().size()) { + CompanyVo.MoneyFlow moneyFlow = moneyFlowType.getMoneyFlowList().get(a); + income1.add(new PoiUtil.PoiUtilCell(moneyFlow.getPredictMoneyFlow().toString())); + income2.add(new PoiUtil.PoiUtilCell(moneyFlow.getRealMoneyFlow().toString())); + + if(moneyFlow.getPredictMoneyFlow().multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = moneyFlow.getRealMoneyFlow().subtract(moneyFlow.getPredictMoneyFlow()). + divide(moneyFlow.getPredictMoneyFlow(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + income3.add(new PoiUtil.PoiUtilCell()); + } + totalProductIncome = totalProductIncome.add(moneyFlow.getPredictMoneyFlow()); + totalRealIncome = totalRealIncome.add(moneyFlow.getRealMoneyFlow()); + }else { + income1.add(new PoiUtil.PoiUtilCell()); + income2.add(new PoiUtil.PoiUtilCell()); + income3.add(new PoiUtil.PoiUtilCell()); + } + } +// if (CollectionUtil.isNotEmpty(moneyFlowType.getMoneyFlowList())) { +// for (CompanyVo.MoneyFlow moneyFlow : moneyFlowType.getMoneyFlowList()) { +// income1.add(new PoiUtil.PoiUtilCell(moneyFlow.getPredictMoneyFlow().toString())); +// income2.add(new PoiUtil.PoiUtilCell(moneyFlow.getRealMoneyFlow().toString())); +// BigDecimal bias = moneyFlow.getRealMoneyFlow().subtract(moneyFlow.getPredictMoneyFlow()). +// divide(moneyFlow.getRealMoneyFlow(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); +// income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); +// totalProductIncome = totalProductIncome.add(moneyFlow.getPredictMoneyFlow()); +// totalRealIncome = totalRealIncome.add(moneyFlow.getRealMoneyFlow()); +// } +// } + income1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString())); + income2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString())); + if(totalProductIncome.multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = totalRealIncome.subtract(totalProductIncome). + divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + income3.add(new PoiUtil.PoiUtilCell()); + } + list.add(income1); + list.add(income2); + list.add(income3); + } + } + //现金流入总计 + List totalMoneyExpend1 = new ArrayList<>(); + List totalMoneyExpend2 = new ArrayList<>(); + List totalMoneyExpend3 = new ArrayList<>(); + totalMoneyExpend1.add(new PoiUtil.PoiUtilCell("现金支出", 1, 3)); + totalMoneyExpend2.add(new PoiUtil.PoiUtilCell()); + totalMoneyExpend3.add(new PoiUtil.PoiUtilCell()); + totalMoneyExpend1.add(new PoiUtil.PoiUtilCell("预计支出")); + totalMoneyExpend2.add(new PoiUtil.PoiUtilCell("实际支出")); + totalMoneyExpend3.add(new PoiUtil.PoiUtilCell("偏差率")); + //TODO 现金流入 + list.add(totalMoneyExpend1); + list.add(totalMoneyExpend2); + list.add(totalMoneyExpend3); + } + return list; + } + + /** + * 生成损益表的写入数据 + * + * @param incomeTypeList 损益表数据 + * @return 返回写入数据 + */ + private List> generateIncome(List incomeTypeList) { + //标题 + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("损益表", 15, 1)); + list.add(title); + //表头 + List header = new ArrayList<>(); + header.add(new PoiUtil.PoiUtilCell("", 2, 1)); + header.add(new PoiUtil.PoiUtilCell()); + for (int i = 1; i < 13; i++) { + header.add(new PoiUtil.PoiUtilCell(i + "月")); + } + header.add(new PoiUtil.PoiUtilCell("合计")); + list.add(header); + + if (CollectionUtil.isNotEmpty(incomeTypeList)) { + for (int i = 0; i < incomeTypeList.size(); i++) { + CompanyVo.IncomeType incomeType = incomeTypeList.get(i); + List income1 = new ArrayList<>(); + List income2 = new ArrayList<>(); + List income3 = new ArrayList<>(); + + income1.add(new PoiUtil.PoiUtilCell(incomeType.getIncomeName(), 1, 3)); + income2.add(new PoiUtil.PoiUtilCell()); + income3.add(new PoiUtil.PoiUtilCell()); + + income1.add(new PoiUtil.PoiUtilCell("预计收入")); + income2.add(new PoiUtil.PoiUtilCell("实际收入")); + income3.add(new PoiUtil.PoiUtilCell("偏差率")); + + //循环每月的损益 + BigDecimal totalProductIncome = BigDecimal.valueOf(0); + BigDecimal totalRealIncome = BigDecimal.valueOf(0); + for (int a = 0; a < 12; a++){ + if (a < incomeType.getIncomeMonthList().size()) { + CompanyVo.IncomeMonth incomeMonth = incomeType.getIncomeMonthList().get(a); + income1.add(new PoiUtil.PoiUtilCell(incomeMonth.getPredictIncome().toString())); + income2.add(new PoiUtil.PoiUtilCell(incomeMonth.getRealIncome().toString())); + + if(incomeMonth.getPredictIncome().multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = incomeMonth.getRealIncome().subtract(incomeMonth.getPredictIncome()). + divide(incomeMonth.getPredictIncome(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + income3.add(new PoiUtil.PoiUtilCell()); + } + totalProductIncome = totalProductIncome.add(incomeMonth.getPredictIncome()); + totalRealIncome = totalRealIncome.add(incomeMonth.getRealIncome()); + }else { + income1.add(new PoiUtil.PoiUtilCell()); + income2.add(new PoiUtil.PoiUtilCell()); + income3.add(new PoiUtil.PoiUtilCell()); + } + } +// if (CollectionUtil.isNotEmpty(incomeType.getIncomeMonthList())) { +// for (CompanyVo.IncomeMonth incomeMonth : incomeType.getIncomeMonthList()) { +// income1.add(new PoiUtil.PoiUtilCell(incomeMonth.getPredictIncome().toString())); +// income2.add(new PoiUtil.PoiUtilCell(incomeMonth.getRealIncome().toString())); +// BigDecimal bias = incomeMonth.getRealIncome().subtract(incomeMonth.getPredictIncome()). +// divide(incomeMonth.getRealIncome(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); +// income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); +// totalProductIncome = totalProductIncome.add(incomeMonth.getPredictIncome()); +// totalRealIncome = totalRealIncome.add(incomeMonth.getRealIncome()); +// } +// } + income1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString())); + income2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString())); + if(totalProductIncome.multiply(BigDecimal.valueOf(100)).intValue() != 0){ + BigDecimal bias = totalRealIncome.subtract(totalProductIncome). + divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + income3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + income3.add(new PoiUtil.PoiUtilCell()); + } + list.add(income1); + list.add(income2); + list.add(income3); + } + } + + return list; + } + + + /** + * 生成成本表的写入数据 + * @param costProductTypeList 产品成本信息 + * @param costOtherTypeList 其他成本信息 + * @return 返回写入的数据 + */ + private List> generateCost(List costProductTypeList, List costOtherTypeList) { + //标题 + List> list = new ArrayList<>(); + List title = new ArrayList<>(); + title.add(new PoiUtil.PoiUtilCell("总成本费用估算表", 15, 1)); + list.add(title); + //表头 + List header = new ArrayList<>(); + header.add(new PoiUtil.PoiUtilCell("")); + header.add(new PoiUtil.PoiUtilCell("")); + for (int i = 1; i < 13; i++) { + header.add(new PoiUtil.PoiUtilCell(i + "月")); + } + header.add(new PoiUtil.PoiUtilCell("合计")); + list.add(header); + //TODO 产品成本 + List productTotalCost1 = new ArrayList<>(); + List productTotalCost2 = new ArrayList<>(); + List productTotalCost3 = new ArrayList<>(); + productTotalCost1.add(new PoiUtil.PoiUtilCell("产品成本",1,3)); + productTotalCost2.add(new PoiUtil.PoiUtilCell()); + productTotalCost3.add(new PoiUtil.PoiUtilCell()); + productTotalCost1.add(new PoiUtil.PoiUtilCell("预计成本")); + productTotalCost2.add(new PoiUtil.PoiUtilCell("实际成本")); + productTotalCost3.add(new PoiUtil.PoiUtilCell("偏差率")); + list.add(productTotalCost1); + list.add(productTotalCost2); + list.add(productTotalCost3); + + if(CollectionUtil.isNotEmpty(costProductTypeList)){ + for(CompanyVo.FirstCostType firstCostType : costProductTypeList) { + if(CollectionUtil.isNotEmpty(firstCostType.getCostTypeList())) { + for (CompanyVo.CostType costType : firstCostType.getCostTypeList()) { + List cost1 = new ArrayList<>(); + List cost2 = new ArrayList<>(); + List cost3 = new ArrayList<>(); + + cost1.add(new PoiUtil.PoiUtilCell(costType.getCostName(), 1, 3)); + cost2.add(new PoiUtil.PoiUtilCell()); + cost3.add(new PoiUtil.PoiUtilCell()); + + cost1.add(new PoiUtil.PoiUtilCell("预计成本")); + cost2.add(new PoiUtil.PoiUtilCell("实际成本")); + cost3.add(new PoiUtil.PoiUtilCell("偏差率")); + BigDecimal totalProductIncome = BigDecimal.valueOf(0); + BigDecimal totalRealIncome = BigDecimal.valueOf(0); + for (int a = 0; a < 12; a++){ + if (a < costType.getCostMonthList().size()) { + CompanyVo.CostMonth costMonth = costType.getCostMonthList().get(a); + cost1.add(new PoiUtil.PoiUtilCell(costMonth.getPredictCost().toString())); + cost2.add(new PoiUtil.PoiUtilCell(costMonth.getRealCost().toString())); + if(costMonth.getPredictCost().multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = costMonth.getRealCost().subtract(costMonth.getPredictCost()). + divide(costMonth.getPredictCost(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + cost3.add(new PoiUtil.PoiUtilCell()); + } + totalProductIncome = totalProductIncome.add(costMonth.getPredictCost()); + totalRealIncome = totalRealIncome.add(costMonth.getRealCost()); + }else { + cost1.add(new PoiUtil.PoiUtilCell()); + cost2.add(new PoiUtil.PoiUtilCell()); + cost3.add(new PoiUtil.PoiUtilCell()); + } + } +// if (CollectionUtil.isNotEmpty(costType.getCostMonthList())) { +// for (CompanyVo.CostMonth costMonth : costType.getCostMonthList()) { +// cost1.add(new PoiUtil.PoiUtilCell(costMonth.getPredictCost().toString())); +// cost2.add(new PoiUtil.PoiUtilCell(costMonth.getRealCost().toString())); +// BigDecimal bias = costMonth.getRealCost().subtract(costMonth.getPredictCost()). +// divide(costMonth.getRealCost(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); +// cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); +// totalProductIncome = totalProductIncome.add(costMonth.getPredictCost()); +// totalRealIncome = totalRealIncome.add(costMonth.getRealCost()); +// } +// } + cost1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString())); + cost2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString())); + if(totalProductIncome.multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = totalRealIncome.subtract(totalProductIncome). + divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + cost3.add(new PoiUtil.PoiUtilCell()); + } + list.add(cost1); + list.add(cost2); + list.add(cost3); + } + } + List productCostType1 = new ArrayList<>(); + List productCostType2 = new ArrayList<>(); + List productCostType3 = new ArrayList<>(); + productCostType1.add(new PoiUtil.PoiUtilCell(firstCostType.getFCostName(),1,3)); + productCostType2.add(new PoiUtil.PoiUtilCell()); + productCostType3.add(new PoiUtil.PoiUtilCell()); + productCostType1.add(new PoiUtil.PoiUtilCell("预计成本")); + productCostType2.add(new PoiUtil.PoiUtilCell("实际成本")); + productCostType3.add(new PoiUtil.PoiUtilCell("偏差率")); + list.add(productCostType1); + list.add(productCostType2); + list.add(productCostType3); + } + } + + if(CollectionUtil.isNotEmpty(costOtherTypeList)){ + for(CompanyVo.FirstCostType firstCostType : costOtherTypeList) { + if(CollectionUtil.isNotEmpty(firstCostType.getCostTypeList())) { + for (CompanyVo.CostType costType : firstCostType.getCostTypeList()) { + List cost1 = new ArrayList<>(); + List cost2 = new ArrayList<>(); + List cost3 = new ArrayList<>(); + + cost1.add(new PoiUtil.PoiUtilCell(costType.getCostName(), 1, 3)); + cost2.add(new PoiUtil.PoiUtilCell()); + cost3.add(new PoiUtil.PoiUtilCell()); + + cost1.add(new PoiUtil.PoiUtilCell("预计成本")); + cost2.add(new PoiUtil.PoiUtilCell("实际成本")); + cost3.add(new PoiUtil.PoiUtilCell("偏差率")); + BigDecimal totalProductIncome = BigDecimal.valueOf(0); + BigDecimal totalRealIncome = BigDecimal.valueOf(0); + for (int a = 0; a < 12; a++){ + if (a < costType.getCostMonthList().size()) { + CompanyVo.CostMonth costMonth = costType.getCostMonthList().get(a); + cost1.add(new PoiUtil.PoiUtilCell(costMonth.getPredictCost().toString())); + cost2.add(new PoiUtil.PoiUtilCell(costMonth.getRealCost().toString())); + if(costMonth.getPredictCost().multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = costMonth.getRealCost().subtract(costMonth.getPredictCost()). + divide(costMonth.getPredictCost(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + cost3.add(new PoiUtil.PoiUtilCell()); + } + totalProductIncome = totalProductIncome.add(costMonth.getPredictCost()); + totalRealIncome = totalRealIncome.add(costMonth.getRealCost()); + }else { + cost1.add(new PoiUtil.PoiUtilCell()); + cost2.add(new PoiUtil.PoiUtilCell()); + cost3.add(new PoiUtil.PoiUtilCell()); + } + } +// if (CollectionUtil.isNotEmpty(costType.getCostMonthList())) { +// for (CompanyVo.CostMonth costMonth : costType.getCostMonthList()) { +// cost1.add(new PoiUtil.PoiUtilCell(costMonth.getPredictCost().toString())); +// cost2.add(new PoiUtil.PoiUtilCell(costMonth.getRealCost().toString())); +// BigDecimal bias = costMonth.getRealCost().subtract(costMonth.getPredictCost()). +// divide(costMonth.getRealCost(), 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); +// cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); +// totalProductIncome = totalProductIncome.add(costMonth.getPredictCost()); +// totalRealIncome = totalRealIncome.add(costMonth.getRealCost()); +// } +// } + cost1.add(new PoiUtil.PoiUtilCell(totalProductIncome.toString())); + cost2.add(new PoiUtil.PoiUtilCell(totalRealIncome.toString())); + if(totalProductIncome.multiply(BigDecimal.valueOf(100)).intValue() != 0) { + BigDecimal bias = totalRealIncome.subtract(totalProductIncome). + divide(totalProductIncome, 2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100)); + cost3.add(new PoiUtil.PoiUtilCell(bias.toString() + "%")); + }else { + cost3.add(new PoiUtil.PoiUtilCell()); + } + list.add(cost1); + list.add(cost2); + list.add(cost3); + } + } + List costType1 = new ArrayList<>(); + List costType2 = new ArrayList<>(); + List costType3 = new ArrayList<>(); + costType1.add(new PoiUtil.PoiUtilCell(firstCostType.getFCostName(),1,3)); + costType2.add(new PoiUtil.PoiUtilCell()); + costType3.add(new PoiUtil.PoiUtilCell()); + costType1.add(new PoiUtil.PoiUtilCell("预计成本")); + costType2.add(new PoiUtil.PoiUtilCell("实际成本")); + costType3.add(new PoiUtil.PoiUtilCell("偏差率")); + list.add(costType1); + list.add(costType2); + list.add(costType3); + } + } + return list; + } +} diff --git a/pims/src/main/resources/application-common.yml b/pims/src/main/resources/application-common.yml new file mode 100644 index 00000000..40efee80 --- /dev/null +++ b/pims/src/main/resources/application-common.yml @@ -0,0 +1,30 @@ +logging: + level: + com: + favorites: DEBUG + org: + hibernate: ERROR + springframework: + web: DEBUG +mybatis: + config-location: classpath:mybatis/mybatis-config.xml + mapper-locations: classpath*:mapper_*/*.xml + type-aliases-package: com.ccsens.mtpro.bean +#server: +# tomcat: +# uri-encoding: UTF-8 +spring: + http: + encoding: + charset: UTF-8 + enabled: true + force: true + log-request-details: true + servlet: + multipart: + max-file-size: 10MB + max-request-size: 100MB + snowflake: + datacenterId: 1 + workerId: 1 + diff --git a/pims/src/main/resources/application-dev.yml b/pims/src/main/resources/application-dev.yml new file mode 100644 index 00000000..1568eb82 --- /dev/null +++ b/pims/src/main/resources/application-dev.yml @@ -0,0 +1,29 @@ +server: + port: 7100 + servlet: + context-path: +spring: + application: + name: pims + datasource: + type: com.alibaba.druid.pool.DruidDataSource + rabbitmq: + host: api.ccsens.com + password: 111111 + port: 5672 + username: admin + redis: + database: 0 + host: 127.0.0.1 + jedis: + pool: + max-active: 200 + max-idle: 10 + max-wait: -1ms + min-idle: 0 + password: '' + port: 6379 + timeout: 1000ms +swagger: + enable: true + diff --git a/pims/src/main/resources/application-prod.yml b/pims/src/main/resources/application-prod.yml new file mode 100644 index 00000000..41884d4e --- /dev/null +++ b/pims/src/main/resources/application-prod.yml @@ -0,0 +1,34 @@ +server: + port: 7100 + servlet: + context-path: +spring: + snowflake: + datacenterId: 2 + workerId: 2 + application: + name: health + datasource: + type: com.alibaba.druid.pool.DruidDataSource + rabbitmq: + host: api.ccsens.com + password: 111111 + port: 5672 + username: admin + redis: + database: 0 + host: 127.0.0.1 + jedis: + pool: + max-active: 200 + max-idle: 10 + max-wait: -1ms + min-idle: 0 + password: '' + port: 6379 + timeout: 1000ms +swagger: + enable: false +eureka: + instance: + ip-address: 192.144.182.42 diff --git a/pims/src/main/resources/application-test.yml b/pims/src/main/resources/application-test.yml new file mode 100644 index 00000000..bd3f5208 --- /dev/null +++ b/pims/src/main/resources/application-test.yml @@ -0,0 +1,34 @@ +server: + port: 7100 + servlet: + context-path: +spring: + application: + name: pims + datasource: + type: com.alibaba.druid.pool.DruidDataSource + rabbitmq: +# host: api.ccsens.com + host: 127.0.0.1 + password: 111111 + port: 5672 + username: admin + redis: + database: 0 + host: 127.0.0.1 + jedis: + pool: + max-active: 200 + max-idle: 10 + max-wait: -1ms + min-idle: 0 + password: '' + port: 6379 + timeout: 1000ms +swagger: + enable: true +eureka: + instance: + ip-address: 192.168.0.99 +file: + domain: https://test.tall.wiki/gateway/pims/ \ No newline at end of file diff --git a/pims/src/main/resources/application.yml b/pims/src/main/resources/application.yml new file mode 100644 index 00000000..5c2cd5c4 --- /dev/null +++ b/pims/src/main/resources/application.yml @@ -0,0 +1,4 @@ +spring: + profiles: + active: dev + include: common, util-dev \ No newline at end of file diff --git a/pims/src/main/resources/druid-dev.yml b/pims/src/main/resources/druid-dev.yml new file mode 100644 index 00000000..e2ad81b5 --- /dev/null +++ b/pims/src/main/resources/druid-dev.yml @@ -0,0 +1,33 @@ +spring: + datasource: + druid: + connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + driverClassName: com.mysql.cj.jdbc.Driver + dynamicUrl: jdbc:mysql://localhost:3306/${schema} + filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + filterName: druidFilter + filterProfileEnable: true + filterUrlPattern: /* + filters: stat,wall + initialSize: 5 + maxActive: 20 + maxPoolPreparedStatementPerConnectionSize: 20 + maxWait: 60000 + minEvictableIdleTimeMillis: 300000 + minIdle: 5 + password: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9 + poolPreparedStatements: true + servletLogSlowSql: true + servletLoginPassword: 111111 + servletLoginUsername: druid + servletName: druidServlet + servletResetEnable: true + servletUrlMapping: /druid/* + testOnBorrow: false + testOnReturn: false + testWhileIdle: true + timeBetweenEvictionRunsMillis: 60000 + url: jdbc:mysql://49.233.89.188:3306/pims?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai + username: root + validationQuery: SELECT 1 FROM DUAL + env: CCSENS_GAME \ No newline at end of file diff --git a/pims/src/main/resources/druid-prod.yml b/pims/src/main/resources/druid-prod.yml new file mode 100644 index 00000000..e38249c2 --- /dev/null +++ b/pims/src/main/resources/druid-prod.yml @@ -0,0 +1,33 @@ +spring: + datasource: + druid: + connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + driverClassName: com.mysql.cj.jdbc.Driver + dynamicUrl: jdbc:mysql://localhost:3306/${schema} + filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + filterName: druidFilter + filterProfileEnable: true + filterUrlPattern: /* + filters: stat,wall + initialSize: 5 + maxActive: 20 + maxPoolPreparedStatementPerConnectionSize: 20 + maxWait: 60000 + minEvictableIdleTimeMillis: 300000 + minIdle: 5 + password: + poolPreparedStatements: true + servletLogSlowSql: true + servletLoginPassword: 111111 + servletLoginUsername: druid + servletName: druidServlet + servletResetEnable: true + servletUrlMapping: /druid/* + testOnBorrow: false + testOnReturn: false + testWhileIdle: true + timeBetweenEvictionRunsMillis: 60000 + url: jdbc:mysql://127.0.0.1/ct?useUnicode=true&characterEncoding=UTF-8 + username: root + validationQuery: SELECT 1 FROM DUAL + env: CCSENS_GAME \ No newline at end of file diff --git a/pims/src/main/resources/druid-test.yml b/pims/src/main/resources/druid-test.yml new file mode 100644 index 00000000..bc484453 --- /dev/null +++ b/pims/src/main/resources/druid-test.yml @@ -0,0 +1,35 @@ +spring: + datasource: + druid: + connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + driverClassName: com.mysql.cj.jdbc.Driver + dynamicUrl: jdbc:mysql://localhost:3306/${schema} + filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + filterName: druidFilter + filterProfileEnable: true + filterUrlPattern: /* + filters: stat,wall + initialSize: 5 + maxActive: 20 + maxPoolPreparedStatementPerConnectionSize: 20 + maxWait: 60000 + minEvictableIdleTimeMillis: 300000 + minIdle: 5 +# password: + password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 + poolPreparedStatements: true + servletLogSlowSql: true + servletLoginPassword: 111111 + servletLoginUsername: druid + servletName: druidServlet + servletResetEnable: true + servletUrlMapping: /druid/* + testOnBorrow: false + testOnReturn: false + testWhileIdle: true + timeBetweenEvictionRunsMillis: 60000 +# url: jdbc:mysql://127.0.0.1/ct?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://test.tall.wiki/pims?useUnicode=true&characterEncoding=UTF-8 + username: root + validationQuery: SELECT 1 FROM DUAL + env: CCSENS_TALL \ No newline at end of file diff --git a/pims/src/main/resources/logback-spring.xml b/pims/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..cba835bf --- /dev/null +++ b/pims/src/main/resources/logback-spring.xml @@ -0,0 +1,196 @@ + + + + + + + + + + logback + + + + + + + + + + + + + + + + + info + + + ${CONSOLE_LOG_PATTERN} + + UTF-8 + + + + + + + + + + ${log.path}/log_debug.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + debug + ACCEPT + DENY + + + + + + + ${log.path}/log_info.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + info + ACCEPT + DENY + + + + + + + ${log.path}/log_warn.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + warn + ACCEPT + DENY + + + + + + + + ${log.path}/log_error.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_dao/ProducrDao.xml b/pims/src/main/resources/mapper_dao/ProducrDao.xml new file mode 100644 index 00000000..be46aef3 --- /dev/null +++ b/pims/src/main/resources/mapper_dao/ProducrDao.xml @@ -0,0 +1,426 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/CompanyMapper.xml b/pims/src/main/resources/mapper_raw/CompanyMapper.xml new file mode 100644 index 00000000..7edd9017 --- /dev/null +++ b/pims/src/main/resources/mapper_raw/CompanyMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, name, balance, created_at, updated_at, rec_status + + + + + delete from t_company + where id = #{id,jdbcType=BIGINT} + + + delete from t_company + + + + + + insert into t_company (id, project_id, name, + balance, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, + #{balance,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_company + + + id, + + + project_id, + + + name, + + + balance, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{balance,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_company + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + balance = #{record.balance,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_company + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + balance = #{record.balance,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_company + + + project_id = #{projectId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + balance = #{balance,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_company + set project_id = #{projectId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + balance = #{balance,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/CostLogMapper.xml b/pims/src/main/resources/mapper_raw/CostLogMapper.xml new file mode 100644 index 00000000..23000add --- /dev/null +++ b/pims/src/main/resources/mapper_raw/CostLogMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, cost_type_id, product_cost, year_time, month_time, predict_cost, real_cost, created_at, + updated_at, rec_status + + + + + delete from t_cost_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_cost_log + + + + + + insert into t_cost_log (id, cost_type_id, product_cost, + year_time, month_time, predict_cost, + real_cost, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{costTypeId,jdbcType=BIGINT}, #{productCost,jdbcType=TINYINT}, + #{yearTime,jdbcType=INTEGER}, #{monthTime,jdbcType=INTEGER}, #{predictCost,jdbcType=BIGINT}, + #{realCost,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_cost_log + + + id, + + + cost_type_id, + + + product_cost, + + + year_time, + + + month_time, + + + predict_cost, + + + real_cost, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{costTypeId,jdbcType=BIGINT}, + + + #{productCost,jdbcType=TINYINT}, + + + #{yearTime,jdbcType=INTEGER}, + + + #{monthTime,jdbcType=INTEGER}, + + + #{predictCost,jdbcType=BIGINT}, + + + #{realCost,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_cost_log + + + id = #{record.id,jdbcType=BIGINT}, + + + cost_type_id = #{record.costTypeId,jdbcType=BIGINT}, + + + product_cost = #{record.productCost,jdbcType=TINYINT}, + + + year_time = #{record.yearTime,jdbcType=INTEGER}, + + + month_time = #{record.monthTime,jdbcType=INTEGER}, + + + predict_cost = #{record.predictCost,jdbcType=BIGINT}, + + + real_cost = #{record.realCost,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_cost_log + set id = #{record.id,jdbcType=BIGINT}, + cost_type_id = #{record.costTypeId,jdbcType=BIGINT}, + product_cost = #{record.productCost,jdbcType=TINYINT}, + year_time = #{record.yearTime,jdbcType=INTEGER}, + month_time = #{record.monthTime,jdbcType=INTEGER}, + predict_cost = #{record.predictCost,jdbcType=BIGINT}, + real_cost = #{record.realCost,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_cost_log + + + cost_type_id = #{costTypeId,jdbcType=BIGINT}, + + + product_cost = #{productCost,jdbcType=TINYINT}, + + + year_time = #{yearTime,jdbcType=INTEGER}, + + + month_time = #{monthTime,jdbcType=INTEGER}, + + + predict_cost = #{predictCost,jdbcType=BIGINT}, + + + real_cost = #{realCost,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_cost_log + set cost_type_id = #{costTypeId,jdbcType=BIGINT}, + product_cost = #{productCost,jdbcType=TINYINT}, + year_time = #{yearTime,jdbcType=INTEGER}, + month_time = #{monthTime,jdbcType=INTEGER}, + predict_cost = #{predictCost,jdbcType=BIGINT}, + real_cost = #{realCost,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/CostTypeMapper.xml b/pims/src/main/resources/mapper_raw/CostTypeMapper.xml new file mode 100644 index 00000000..6bf1031f --- /dev/null +++ b/pims/src/main/resources/mapper_raw/CostTypeMapper.xml @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, company_id, project_id, name, level, parent_id, created_at, updated_at, rec_status + + + + + delete from t_cost_type + where id = #{id,jdbcType=BIGINT} + + + delete from t_cost_type + + + + + + insert into t_cost_type (id, company_id, project_id, + name, level, parent_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{level,jdbcType=TINYINT}, #{parentId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_cost_type + + + id, + + + company_id, + + + project_id, + + + name, + + + level, + + + parent_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{companyId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{level,jdbcType=TINYINT}, + + + #{parentId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_cost_type + + + id = #{record.id,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + level = #{record.level,jdbcType=TINYINT}, + + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_cost_type + set id = #{record.id,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + level = #{record.level,jdbcType=TINYINT}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_cost_type + + + company_id = #{companyId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + level = #{level,jdbcType=TINYINT}, + + + parent_id = #{parentId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_cost_type + set company_id = #{companyId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + level = #{level,jdbcType=TINYINT}, + parent_id = #{parentId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/IncomeStatementsLogMapper.xml b/pims/src/main/resources/mapper_raw/IncomeStatementsLogMapper.xml new file mode 100644 index 00000000..efc22951 --- /dev/null +++ b/pims/src/main/resources/mapper_raw/IncomeStatementsLogMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, company_id, project_id, income_statements_id, year_income, month_time, predict_money, + real_money, created_at, updated_at, rec_status + + + + + delete from t_income_statements_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_income_statements_log + + + + + + insert into t_income_statements_log (id, company_id, project_id, + income_statements_id, year_income, month_time, + predict_money, real_money, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{incomeStatementsId,jdbcType=BIGINT}, #{yearIncome,jdbcType=INTEGER}, #{monthTime,jdbcType=INTEGER}, + #{predictMoney,jdbcType=BIGINT}, #{realMoney,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_income_statements_log + + + id, + + + company_id, + + + project_id, + + + income_statements_id, + + + year_income, + + + month_time, + + + predict_money, + + + real_money, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{companyId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{incomeStatementsId,jdbcType=BIGINT}, + + + #{yearIncome,jdbcType=INTEGER}, + + + #{monthTime,jdbcType=INTEGER}, + + + #{predictMoney,jdbcType=BIGINT}, + + + #{realMoney,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_income_statements_log + + + id = #{record.id,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + income_statements_id = #{record.incomeStatementsId,jdbcType=BIGINT}, + + + year_income = #{record.yearIncome,jdbcType=INTEGER}, + + + month_time = #{record.monthTime,jdbcType=INTEGER}, + + + predict_money = #{record.predictMoney,jdbcType=BIGINT}, + + + real_money = #{record.realMoney,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_income_statements_log + set id = #{record.id,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + income_statements_id = #{record.incomeStatementsId,jdbcType=BIGINT}, + year_income = #{record.yearIncome,jdbcType=INTEGER}, + month_time = #{record.monthTime,jdbcType=INTEGER}, + predict_money = #{record.predictMoney,jdbcType=BIGINT}, + real_money = #{record.realMoney,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_income_statements_log + + + company_id = #{companyId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + income_statements_id = #{incomeStatementsId,jdbcType=BIGINT}, + + + year_income = #{yearIncome,jdbcType=INTEGER}, + + + month_time = #{monthTime,jdbcType=INTEGER}, + + + predict_money = #{predictMoney,jdbcType=BIGINT}, + + + real_money = #{realMoney,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_income_statements_log + set company_id = #{companyId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + income_statements_id = #{incomeStatementsId,jdbcType=BIGINT}, + year_income = #{yearIncome,jdbcType=INTEGER}, + month_time = #{monthTime,jdbcType=INTEGER}, + predict_money = #{predictMoney,jdbcType=BIGINT}, + real_money = #{realMoney,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/IncomeStatementsMapper.xml b/pims/src/main/resources/mapper_raw/IncomeStatementsMapper.xml new file mode 100644 index 00000000..da69c77c --- /dev/null +++ b/pims/src/main/resources/mapper_raw/IncomeStatementsMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, company_id, project_id, name, created_at, updated_at, rec_status + + + + + delete from t_income_statements + where id = #{id,jdbcType=BIGINT} + + + delete from t_income_statements + + + + + + insert into t_income_statements (id, company_id, project_id, + name, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_income_statements + + + id, + + + company_id, + + + project_id, + + + name, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{companyId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_income_statements + + + id = #{record.id,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_income_statements + set id = #{record.id,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_income_statements + + + company_id = #{companyId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_income_statements + set company_id = #{companyId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/MoneyFlowLogMapper.xml b/pims/src/main/resources/mapper_raw/MoneyFlowLogMapper.xml new file mode 100644 index 00000000..dddf9296 --- /dev/null +++ b/pims/src/main/resources/mapper_raw/MoneyFlowLogMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, company_id, project_id, money_flow_id, year_income, month_time, predict_money, + real_money, created_at, updated_at, rec_status + + + + + delete from t_money_flow_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_money_flow_log + + + + + + insert into t_money_flow_log (id, company_id, project_id, + money_flow_id, year_income, month_time, + predict_money, real_money, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{moneyFlowId,jdbcType=BIGINT}, #{yearIncome,jdbcType=INTEGER}, #{monthTime,jdbcType=INTEGER}, + #{predictMoney,jdbcType=BIGINT}, #{realMoney,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_money_flow_log + + + id, + + + company_id, + + + project_id, + + + money_flow_id, + + + year_income, + + + month_time, + + + predict_money, + + + real_money, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{companyId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{moneyFlowId,jdbcType=BIGINT}, + + + #{yearIncome,jdbcType=INTEGER}, + + + #{monthTime,jdbcType=INTEGER}, + + + #{predictMoney,jdbcType=BIGINT}, + + + #{realMoney,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_money_flow_log + + + id = #{record.id,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + money_flow_id = #{record.moneyFlowId,jdbcType=BIGINT}, + + + year_income = #{record.yearIncome,jdbcType=INTEGER}, + + + month_time = #{record.monthTime,jdbcType=INTEGER}, + + + predict_money = #{record.predictMoney,jdbcType=BIGINT}, + + + real_money = #{record.realMoney,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_money_flow_log + set id = #{record.id,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + money_flow_id = #{record.moneyFlowId,jdbcType=BIGINT}, + year_income = #{record.yearIncome,jdbcType=INTEGER}, + month_time = #{record.monthTime,jdbcType=INTEGER}, + predict_money = #{record.predictMoney,jdbcType=BIGINT}, + real_money = #{record.realMoney,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_money_flow_log + + + company_id = #{companyId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + money_flow_id = #{moneyFlowId,jdbcType=BIGINT}, + + + year_income = #{yearIncome,jdbcType=INTEGER}, + + + month_time = #{monthTime,jdbcType=INTEGER}, + + + predict_money = #{predictMoney,jdbcType=BIGINT}, + + + real_money = #{realMoney,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_money_flow_log + set company_id = #{companyId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + money_flow_id = #{moneyFlowId,jdbcType=BIGINT}, + year_income = #{yearIncome,jdbcType=INTEGER}, + month_time = #{monthTime,jdbcType=INTEGER}, + predict_money = #{predictMoney,jdbcType=BIGINT}, + real_money = #{realMoney,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/MoneyFlowMapper.xml b/pims/src/main/resources/mapper_raw/MoneyFlowMapper.xml new file mode 100644 index 00000000..b1be70c3 --- /dev/null +++ b/pims/src/main/resources/mapper_raw/MoneyFlowMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, company_id, project_id, name, money_type, created_at, updated_at, rec_status + + + + + delete from t_money_flow + where id = #{id,jdbcType=BIGINT} + + + delete from t_money_flow + + + + + + insert into t_money_flow (id, company_id, project_id, + name, money_type, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{moneyType,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_money_flow + + + id, + + + company_id, + + + project_id, + + + name, + + + money_type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{companyId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{moneyType,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_money_flow + + + id = #{record.id,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + money_type = #{record.moneyType,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_money_flow + set id = #{record.id,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + money_type = #{record.moneyType,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_money_flow + + + company_id = #{companyId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + money_type = #{moneyType,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_money_flow + set company_id = #{companyId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + money_type = #{moneyType,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/ProductIncomeMapper.xml b/pims/src/main/resources/mapper_raw/ProductIncomeMapper.xml new file mode 100644 index 00000000..7e8942aa --- /dev/null +++ b/pims/src/main/resources/mapper_raw/ProductIncomeMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, product_id, year_income, month_time, predict_income, real_income, created_at, + updated_at, rec_status + + + + + delete from t_product_income + where id = #{id,jdbcType=BIGINT} + + + delete from t_product_income + + + + + + insert into t_product_income (id, product_id, year_income, + month_time, predict_income, real_income, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{yearIncome,jdbcType=INTEGER}, + #{monthTime,jdbcType=INTEGER}, #{predictIncome,jdbcType=BIGINT}, #{realIncome,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_product_income + + + id, + + + product_id, + + + year_income, + + + month_time, + + + predict_income, + + + real_income, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{productId,jdbcType=BIGINT}, + + + #{yearIncome,jdbcType=INTEGER}, + + + #{monthTime,jdbcType=INTEGER}, + + + #{predictIncome,jdbcType=BIGINT}, + + + #{realIncome,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_product_income + + + id = #{record.id,jdbcType=BIGINT}, + + + product_id = #{record.productId,jdbcType=BIGINT}, + + + year_income = #{record.yearIncome,jdbcType=INTEGER}, + + + month_time = #{record.monthTime,jdbcType=INTEGER}, + + + predict_income = #{record.predictIncome,jdbcType=BIGINT}, + + + real_income = #{record.realIncome,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_product_income + set id = #{record.id,jdbcType=BIGINT}, + product_id = #{record.productId,jdbcType=BIGINT}, + year_income = #{record.yearIncome,jdbcType=INTEGER}, + month_time = #{record.monthTime,jdbcType=INTEGER}, + predict_income = #{record.predictIncome,jdbcType=BIGINT}, + real_income = #{record.realIncome,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_product_income + + + product_id = #{productId,jdbcType=BIGINT}, + + + year_income = #{yearIncome,jdbcType=INTEGER}, + + + month_time = #{monthTime,jdbcType=INTEGER}, + + + predict_income = #{predictIncome,jdbcType=BIGINT}, + + + real_income = #{realIncome,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_product_income + set product_id = #{productId,jdbcType=BIGINT}, + year_income = #{yearIncome,jdbcType=INTEGER}, + month_time = #{monthTime,jdbcType=INTEGER}, + predict_income = #{predictIncome,jdbcType=BIGINT}, + real_income = #{realIncome,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/ProductMapper.xml b/pims/src/main/resources/mapper_raw/ProductMapper.xml new file mode 100644 index 00000000..55174cd2 --- /dev/null +++ b/pims/src/main/resources/mapper_raw/ProductMapper.xml @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, company_id, project_id, name, description, product_type_id, pricing, price_units, + gross_margin, significance_sort, created_at, updated_at, rec_status + + + + + delete from t_product + where id = #{id,jdbcType=BIGINT} + + + delete from t_product + + + + + + insert into t_product (id, company_id, project_id, + name, description, product_type_id, + pricing, price_units, gross_margin, + significance_sort, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{productTypeId,jdbcType=BIGINT}, + #{pricing,jdbcType=BIGINT}, #{priceUnits,jdbcType=BIGINT}, #{grossMargin,jdbcType=VARCHAR}, + #{significanceSort,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_product + + + id, + + + company_id, + + + project_id, + + + name, + + + description, + + + product_type_id, + + + pricing, + + + price_units, + + + gross_margin, + + + significance_sort, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{companyId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{productTypeId,jdbcType=BIGINT}, + + + #{pricing,jdbcType=BIGINT}, + + + #{priceUnits,jdbcType=BIGINT}, + + + #{grossMargin,jdbcType=VARCHAR}, + + + #{significanceSort,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_product + + + id = #{record.id,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + product_type_id = #{record.productTypeId,jdbcType=BIGINT}, + + + pricing = #{record.pricing,jdbcType=BIGINT}, + + + price_units = #{record.priceUnits,jdbcType=BIGINT}, + + + gross_margin = #{record.grossMargin,jdbcType=VARCHAR}, + + + significance_sort = #{record.significanceSort,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_product + set id = #{record.id,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + product_type_id = #{record.productTypeId,jdbcType=BIGINT}, + pricing = #{record.pricing,jdbcType=BIGINT}, + price_units = #{record.priceUnits,jdbcType=BIGINT}, + gross_margin = #{record.grossMargin,jdbcType=VARCHAR}, + significance_sort = #{record.significanceSort,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_product + + + company_id = #{companyId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + product_type_id = #{productTypeId,jdbcType=BIGINT}, + + + pricing = #{pricing,jdbcType=BIGINT}, + + + price_units = #{priceUnits,jdbcType=BIGINT}, + + + gross_margin = #{grossMargin,jdbcType=VARCHAR}, + + + significance_sort = #{significanceSort,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_product + set company_id = #{companyId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + product_type_id = #{productTypeId,jdbcType=BIGINT}, + pricing = #{pricing,jdbcType=BIGINT}, + price_units = #{priceUnits,jdbcType=BIGINT}, + gross_margin = #{grossMargin,jdbcType=VARCHAR}, + significance_sort = #{significanceSort,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mapper_raw/ProductTypeMapper.xml b/pims/src/main/resources/mapper_raw/ProductTypeMapper.xml new file mode 100644 index 00000000..3427a0d6 --- /dev/null +++ b/pims/src/main/resources/mapper_raw/ProductTypeMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, company_id, project_id, name, created_at, updated_at, rec_status + + + + + delete from t_product_type + where id = #{id,jdbcType=BIGINT} + + + delete from t_product_type + + + + + + insert into t_product_type (id, company_id, project_id, + name, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_product_type + + + id, + + + company_id, + + + project_id, + + + name, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{companyId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_product_type + + + id = #{record.id,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_product_type + set id = #{record.id,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_product_type + + + company_id = #{companyId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_product_type + set company_id = #{companyId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pims/src/main/resources/mybatis/mybatis-config.xml b/pims/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 00000000..06ec6488 --- /dev/null +++ b/pims/src/main/resources/mybatis/mybatis-config.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index e1cc5e6e..aa1626ba 100644 --- a/pom.xml +++ b/pom.xml @@ -7,13 +7,15 @@ pom cloudutil - ht - tall util + tall + ht game mt - health - ct + pims + + + com.ccsens @@ -31,6 +33,7 @@ UTF-8 1.8 + true diff --git a/tall/src/main/java/com/ccsens/tall/aspect/RobotAspect.java b/tall/src/main/java/com/ccsens/tall/aspect/RobotAspect.java index 73dea104..32dc3edb 100644 --- a/tall/src/main/java/com/ccsens/tall/aspect/RobotAspect.java +++ b/tall/src/main/java/com/ccsens/tall/aspect/RobotAspect.java @@ -1,19 +1,18 @@ package com.ccsens.tall.aspect; -import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.tall.bean.vo.MessageVo; import com.ccsens.tall.service.IAsyncService; import com.ccsens.tall.service.IRobotService; -import com.ccsens.tall.service.RobotService; import com.ccsens.tall.util.RobotUtil; import com.ccsens.util.annotation.OperateType; +import com.ccsens.util.wx.WxTemplateMessage; +import com.fasterxml.jackson.core.JsonProcessingException; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.Signature; import org.aspectj.lang.annotation.*; import org.aspectj.lang.reflect.MethodSignature; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Lazy; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; @@ -25,27 +24,33 @@ import java.lang.reflect.Method; @Aspect @Component public class RobotAspect { - @Autowired - private IRobotService robotService; @Resource private IAsyncService asyncService; + @Pointcut("@annotation(com.ccsens.util.annotation.OperateType)") public void robotAdvice(){ } @After("robotAdvice()") - public void robotMessageSend(JoinPoint joinPoint){ + public void robotMessageSend(JoinPoint joinPoint) throws JsonProcessingException { //1.获取方法类型Code Signature signature = joinPoint.getSignature(); MethodSignature methodSignature = (MethodSignature) signature; Method targetMethod = methodSignature.getMethod(); OperateType operateType = targetMethod.getAnnotation(OperateType.class); //2.获取发送参数 - RobotUtil.Message message = RobotUtil.get(); + RobotUtil.Message message = RobotUtil.getRobotMessage(); + MessageVo.Inform inform = RobotUtil.getInform(); + WxTemplateMessage wxTemplate = RobotUtil.getWxTemplate(); + // 3.机器人通知 asyncService.sendRobotMessage(operateType,message); - + // 4.ws和公众号通知 + asyncService.sendMessage(operateType, inform, wxTemplate); + //删除线程 + RobotUtil.delRobotMessage(); + RobotUtil.delInform(); } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/ChartDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/ChartDto.java new file mode 100644 index 00000000..79878781 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/ChartDto.java @@ -0,0 +1,71 @@ +package com.ccsens.tall.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +@Data +public class ChartDto { + @ApiModel + @Data + public static class ProjectTrendDto{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @NotEmpty + @ApiModelProperty("开始日期") + private String start; + @NotEmpty + @ApiModelProperty("结束日期") + private String end; + @ApiModelProperty("角色id") + private Long roleId; + } + @ApiModel + @Data + public static class ChartsExecutorDto{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("类型 0按任务数量返回 1按任务时长返回(分钟)") + private Integer type = 0; + @ApiModelProperty("完成状态 0全部,1完成,2未完成 默认0") + private Integer process = 0; + @ApiModelProperty("开始时间") + private Long beginTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("角色id") + private List roleList; + } + @ApiModel + @Data + public static class ChartsCompleteDto{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("开始时间") + private Long beginTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("角色id") + private List roleList; + } + @ApiModel + @Data + public static class ChartsOverviewDto{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("开始时间") + private Long beginTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("角色id") + private List roleList; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/DeliverDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/DeliverDto.java index 59dde4a5..4c1e5281 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/DeliverDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/DeliverDto.java @@ -6,6 +6,8 @@ import lombok.Data; import lombok.Getter; import lombok.Setter; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; import java.util.List; public class DeliverDto { @@ -13,13 +15,17 @@ public class DeliverDto { @Data public static class CheckDeliver{ @ApiModelProperty("交付物Id") - private Long deliverId; + private Long deliverLogId; @ApiModelProperty("任务在此时间段的id") private Long taskId; @ApiModelProperty("检查状况") private Boolean checkStatus; @ApiModelProperty("检查人备注") private String text; + @Max(10) + @Min(0) + @ApiModelProperty("评分") + private int score = 10; } @ApiModel @@ -34,16 +40,18 @@ public class DeliverDto { @ApiModelProperty("检查人") private List checkerIdList; @ApiModelProperty("文件信息") - private List fileInfo; + private List fileInfo; } @ApiModel @Data - public static class fileInfo{ + public static class FileInfo{ @ApiModelProperty("文件ID") private Long id; @ApiModelProperty("文件名称") private String name; @ApiModelProperty("文件路径") private String url; + @ApiModelProperty("wps文件Id,可以为空") + private Long wpsFileId; } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/DomainDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/DomainDto.java new file mode 100644 index 00000000..a117ec27 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/DomainDto.java @@ -0,0 +1,98 @@ +package com.ccsens.tall.bean.dto; + +import com.ccsens.tall.bean.vo.DomainVo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class DomainDto { + + @ApiModel("添加域配置信息") + @Data + public static class DomainInfo{ + @NotEmpty(message = "域名不能为空") + @ApiModelProperty("域名") + private String domainName; + @ApiModelProperty("Logo") + private String logo; + @ApiModelProperty("公司名") + private String companyName; + @ApiModelProperty("系统名") + private String systemName; + @ApiModelProperty("登陆背景图路径") + private String backdropUrl; + @ApiModelProperty("标题") + private String caption; + @ApiModelProperty("栏外标题") + private String headline; + @ApiModelProperty("是否显示日历 0不显示 1显示") + private Byte showCalendar; + @ApiModelProperty("不展示日历时。显示的项目的id") + private Long showProjectId; + @ApiModelProperty("常驻项目的id") + private Long foreverProjectId; + @ApiModelProperty("是否展示导航") + private Byte domainNav; + + @ApiModelProperty("域特有导航信息") + private List domainNavInfoList; + } + + @ApiModel("添加域导航信息") + @Data + public static class DomainNavInfo{ + @ApiModelProperty("首页") + private String text; + @ApiModelProperty("0 -> 内部链接, 1 -> 外部链接") + private Integer type; + @ApiModelProperty("导航对应的链接") + private String path; + @ApiModelProperty("参数") + private String params; + @ApiModelProperty("导航栏图标") + private String icon; + @ApiModelProperty("0 -> 左侧/上 1 -> 右侧/下") + private Integer position; + } + + @ApiModel("添加域配置信息") + @Data + public static class UpdateDomainInfo{ + @NotNull + @ApiModelProperty("id") + private Long id; + @ApiModelProperty("域名") + private String domainName; + @ApiModelProperty("Logo") + private String logo; + @ApiModelProperty("公司名") + private String companyName; + @ApiModelProperty("系统名") + private String systemName; + @ApiModelProperty("登陆背景图路径") + private String backdropUrl; + @ApiModelProperty("标题") + private String caption; + @ApiModelProperty("栏外标题") + private String headline; + @ApiModelProperty("是否显示日历 0不显示 1显示") + private Byte showCalendar; + @ApiModelProperty("不展示日历时。显示的项目的id") + private Long showProjectId; + @ApiModelProperty("常驻项目的id") + private Long foreverProjectId; + @ApiModelProperty("是否展示导航") + private Byte domainNav; + + @ApiModelProperty("域特有导航信息") + private List domainNavInfoList; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java new file mode 100644 index 00000000..c448d2f1 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java @@ -0,0 +1,64 @@ +package com.ccsens.tall.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +@Data +public class LabelDto { + @Data + @ApiModel("添加标签") + public static class AddLabel{ + @NotEmpty(message = "请输入标签名") + @ApiModelProperty("标签名") + private String name; + @ApiModelProperty("标签code") + private String code; + @NotEmpty(message = "请选择颜色") + @ApiModelProperty("颜色") + private String color; + @ApiModelProperty("备注信息") + private String description; + @ApiModelProperty("优先级") + private int level; + } + @Data + @ApiModel("删除标签") + public static class DelLabel{ + @NotNull + @ApiModelProperty("标签id") + private Long id; + } + + @Data + @ApiModel("修改标签") + public static class ChangeLabel{ + @NotNull + @ApiModelProperty("标签id") + private Long id; + @ApiModelProperty("标签名") + private String name; + @ApiModelProperty("标签code") + private String code; + @ApiModelProperty("颜色") + private String color; + @ApiModelProperty("备注信息") + private String description; + @ApiModelProperty("优先级") + private int level; + } + + @Data + @ApiModel("给项目添加标签") + public static class ProjectLabel{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("标签id") + private List labelList; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/MemberDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/MemberDto.java new file mode 100644 index 00000000..7e2e5e27 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/MemberDto.java @@ -0,0 +1,58 @@ +package com.ccsens.tall.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class MemberDto { + @Data + @ApiModel("添加成员") + public static class SaveMember{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("成员名") + private String memberName; + @NotEmpty + @ApiModelProperty("成员手机号") + private String phone; + @ApiModelProperty("所属角色的id") + private List roleId; + @ApiModelProperty("奖惩干系人手机号") + private String stakeholderPhone; + @ApiModelProperty("奖惩干系人姓名") + private String stakeholderName; + } + + + @Data + @ApiModel("删除成员") + public static class DeleteMember{ + @ApiModelProperty("成员id") + private Long memberId; + } + + @Data + @ApiModel("修改成员信息") + public static class UpdateMemberInfo{ + @NotNull(message = "成员id不能为空") + @ApiModelProperty("成员id") + private Long memberId; + @ApiModelProperty("成员名") + private String memberName; + @ApiModelProperty("成员手机号") + private String phone; + @ApiModelProperty("奖惩干系人手机号") + private String stakeholderPhone; + @ApiModelProperty("奖惩干系人姓名") + private String stakeholderName; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java index 8ff26c26..64c24ff0 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java @@ -3,10 +3,12 @@ package com.ccsens.tall.bean.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.NonNull; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; +import java.util.List; @Data public class PluginDto { @@ -21,4 +23,75 @@ public class PluginDto { @Size(max =140,min = 0,message = "信息格式错误") private String description; } + + @Data + @ApiModel("添加笔记") + public static class SaveNotes { + @ApiModelProperty("任务id") + @NotNull(message = "任务id为空") + private Long taskId; + @ApiModelProperty("角色id") + private Long roleId; + @ApiModelProperty("被添加笔记的插件id,不是笔记插件的id,在插件上记笔记时需要,在任务上记笔记时不需要传参") + private Long pluginId; + @ApiModelProperty("笔记内容") + @NotEmpty(message = "您还什么都没写") + @Size(max =140,min = 0,message = "字数超出限制") + private String value; + @ApiModelProperty("是否公开展示,0否 1是 默认0") + private Integer publicity = 0; + } + + @Data + @ApiModel("获取会议记录") + public static class GetMinutes { + @ApiModelProperty("任务id") + @NotNull(message = "任务id为空") + private Long taskId; + @ApiModelProperty("域名") + private String domainName; + @ApiModelProperty("项目id") + private List projectIdList; + } + + @Data + @ApiModel("修改会议记录") + public static class UpdateMinutes { + @ApiModelProperty("wps文件id") + @NotNull(message = "文件id不能为空") + private Long wpsFileId; + @ApiModelProperty("任务id") + private Long taskId; + @ApiModelProperty("域名") + private String domainName; + @ApiModelProperty("项目id") + private List projectList; + } + @Data + @ApiModel("表格内需要修改的项目") + public static class UpdateMinutesProject { + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("添加还是删除 0添加项目 1删除项目") + private byte type; + } + + @Data + @ApiModel("修改插件配置") + public static class UpdatePluginConfig { + @NonNull + @ApiModelProperty("任务id") + private Long taskId; + @ApiModelProperty("任务插件id") + private Long taskPluginId; + @ApiModelProperty("页面接口路径") + private String webPath; + @ApiModelProperty("入参") + private String importParam; + @ApiModelProperty("放置位置 默认0 ,0任务名 1详情页 2任务下") + private Byte placeLocation; + @ApiModelProperty("程序位置 0:tall内部,1外部") + private Byte routineLocation; + } + } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java index bdbaeaba..6eda0918 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectDto.java @@ -1,5 +1,7 @@ package com.ccsens.tall.bean.dto; +import cn.hutool.core.util.ObjectUtil; +import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -66,5 +68,75 @@ public class ProjectDto { private String description; @ApiModelProperty("被修改的项目的地址") private String address; + @ApiModelProperty("项目开始时间") + private Long beginTime; + @ApiModelProperty("项目结束时间") + private Long endTime; + } + + @Data + @ApiModel("修改项目配置信息") + public static class ProjectConfig{ + @NotNull + @ApiModelProperty("被修改的项目的id") + private Long projectId; + @ApiModelProperty("上下滑动类型 0:上下滑动 1:只支持向下滑 2:只支持上滑 4:上下都不滑动") + private Integer slide; + @ApiModelProperty("筛选框显示 0:都显示 1:都不显示 2.只展示时间轴/清单") + private Integer filter; + @ApiModelProperty("是否展示添加任务按钮 0:不展示 1:展示") + private Integer createTask; + @ApiModelProperty("是否展示MVP 0:不展示 1:展示") + private Integer showMvp; + @JsonIgnore//0日程,1天,2周,3月 + private Integer selectTaskType; + @ApiModelProperty("查询任务类型") + private String selectType; + @ApiModelProperty("第三列展示页面的路径") + private String detailPath; + @ApiModelProperty("项目关联pims域内的导航栏信息 0无关联 1例会系统 2财务系统 3课程") + private Integer pimsNavType; + + public Integer getSelectTaskType(){ + if(ObjectUtil.isNull(selectType)) { + return null; + } + switch (selectType){ + case "日程": return this.selectTaskType = 0; + case "天": return this.selectTaskType = 1; + case "周": return this.selectTaskType = 2; + case "月": return this.selectTaskType = 3; + default: return this.selectTaskType = 0; + } + } + } + + @Data + @ApiModel("用户选择变身成为某个角色") + public static class ImitationRole{ + @NotNull + @ApiModelProperty("项目的id") + private Long projectId; + @NotNull + @ApiModelProperty("角色的id") + private Long roleId; + @NotNull + @ApiModelProperty("变身的秘钥") + private String code; + } + + @Data + @ApiModel("创建新项目") + public static class CreateProject{ + @ApiModelProperty("名字") + private String name; + @ApiModelProperty("详情") + private String description; + @ApiModelProperty("地址") + private String address; + @ApiModelProperty("开始时间") + private Long beginTime; + @ApiModelProperty("结束时间") + private Long endTime; } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectMessageDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectMessageDto.java new file mode 100644 index 00000000..164884a8 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/ProjectMessageDto.java @@ -0,0 +1,72 @@ +package com.ccsens.tall.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +/** + * @description: + * @author: whj + * @time: 2020/5/28 17:34 + */ +@ApiModel("消息通知相关请求参数") +public class ProjectMessageDto { + + @Data + @ApiModel("查询未读消息数-请求") + public static class UnreadNum{ + @NotNull + @ApiModelProperty("发送类型 0:ws,1:微信公众号") + private Byte sendType; + } + + @Data + @ApiModel("查询消息-请求") + public static class Query{ + @NotNull + @ApiModelProperty("发送类型 0:ws,1:微信公众号") + private Byte sendType; + @ApiModelProperty("第几页") + @Min(value = 1) + private int pageNum = 1; + @ApiModelProperty("每页多少条") + @Min(value = 1) + @Max(value=100) + private int pageSize = 10; + } + + @Data + @ApiModel("项目动态-请求") + public static class ProjectMsg{ + @NotNull + @ApiModelProperty("项目ID") + private Long projectId; + @ApiModelProperty("第几页") + @Min(value = 1) + private int pageNum = 1; + @ApiModelProperty("每页多少条") + @Min(value = 1) + @Max(value=100) + private int pageSize = 10; + } + + @Data + @ApiModel("标记某条消息已读-请求") + public static class MarkRead{ + @NotNull(message="发送消息ID不能为空") + @ApiModelProperty("发送消息ID") + private Long id; + } + + @Data + @ApiModel("标记所有消息已读-请求") + public static class MarkAllRead{ + @NotNull + @ApiModelProperty("消息发送类型 0:ws,1:微信公众号") + private Byte sendType; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/RingDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/RingDto.java new file mode 100644 index 00000000..289fc311 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/RingDto.java @@ -0,0 +1,51 @@ +package com.ccsens.tall.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.util.List; + +@Data +public class RingDto { + + @Data + @ApiModel("发送ring消息") + public static class RingSendDto { + @NotNull(message = "项目id不能为空") + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("消息内容") + private String value; + @ApiModelProperty("接收的角色的id") + private List roleList; + } + + @Data + @ApiModel("查找ring消息") + public static class GetRingDto { + @NotNull(message = "项目id不能为空") + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("页数") + private Integer page; + @ApiModelProperty("每页数量") + private Integer pageSize; + } + + @Data + @ApiModel("将消息设为已读") + public static class MessageId { + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("消息id") + private List messageIdList; + } + @Data + @ApiModel("将项目内的消息设为已读") + public static class ReadMessageByProjectId{ + @ApiModelProperty("项目id") + private Long projectId; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/RoleDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/RoleDto.java new file mode 100644 index 00000000..c46fe312 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/RoleDto.java @@ -0,0 +1,45 @@ +package com.ccsens.tall.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +@Data +public class RoleDto { + + @Data + @ApiModel("添加角色") + public static class SaveRole{ + @NotNull(message = "项目不能为空") + @ApiModelProperty("项目id") + private Long projectId; + @NotEmpty(message = "角色名不能为空") + @ApiModelProperty("角色名") + private String roleName; + } + + @Data + @ApiModel("修改角色信息") + public static class UpdateRole{ + @NotNull(message = "角色Id不能为空") + @ApiModelProperty("角色id") + private Long roleId; + @ApiModelProperty("角色名") + private String roleName; + @ApiModelProperty("关联项目id(只有角色项目可以修改)") + private Long relevanceProjectId; + } + + @Data + @ApiModel("给角色添加成员") + public static class SaveMember{ + @NotNull(message = "角色Id不能为空") + @ApiModelProperty("角色id") + private Long roleId; + @ApiModelProperty("成员Id") + private Long memberId; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java index 09489422..2f99736e 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java @@ -1,10 +1,11 @@ package com.ccsens.tall.bean.dto; +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.util.exception.BaseException; +import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import lombok.Getter; -import lombok.Setter; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; @@ -38,6 +39,40 @@ public class TaskDto { private String taskDeliver; @ApiModelProperty("插件") private List pluginList; + @ApiModelProperty("优先级 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急 默认0") + private Byte priority; + @ApiModelProperty("任务提醒消息") + private TaskRemindByAdd taskRemind; + } + + @Data + @ApiModel("添加时设置任务提醒") + public static class TaskRemindByAdd{ + @ApiModelProperty("提醒时机 0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间") + private Byte remindTiming; + @ApiModelProperty("时长 提醒时机是“开始时”或“结束时”可以为空") + private Long duration = 0L; + @ApiModelProperty("时间单位 0分钟 1小时 2天") + private Byte unit; + + public Long getDuration(){ + if(ObjectUtil.isNull(unit)) { + throw new BaseException("时间单位不能为空"); + } + if(remindTiming == 7){ + return duration; + } + switch (unit) { + case 0: + return duration * 60 * 1000L; + case 1: + return duration * 60 * 60 * 1000L; + case 2: + return duration * 24 * 60 * 60 * 1000L; + default: + return duration; + } + } } @ApiModel @@ -84,7 +119,7 @@ public class TaskDto { private Long roleId; @ApiModelProperty("任务在当前时间的subTimeId") @NotNull(message = "taskId is required.") - private Long id; + private Long taskId; @ApiModelProperty("开始任务的时间 如果为空则为当前时间") private Long startTime; } @@ -104,18 +139,18 @@ public class TaskDto { private Long prevId; //移动之后的前一个节点 } - @Data - public static class InsertTask { - @NotNull(message = "projectId is required.") - private Long projectId; - @NotNull(message = "roleId is required.") - private Long roleId; - private Long prevId; //移动之后的前一个节点 - private __TaskDto taskId; //插入的节点 - } +// @Data +// public static class InsertTask { +// @NotNull(message = "projectId is required.") +// private Long projectId; +// @NotNull(message = "roleId is required.") +// private Long roleId; +// private Long prevId; //移动之后的前一个节点 +// private __TaskDto taskId; //插入的节点 +// } @Data - @ApiModel + @ApiModel("修改任务详细信息") public static class UpdateTaskInfo{ @ApiModelProperty("任务id") private Long id; @@ -137,8 +172,27 @@ public class TaskDto { private int delay; @ApiModelProperty("延迟切换时间") private Long delayTime; + @ApiModelProperty("优先级 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急 默认0") + private Byte priority; + @ApiModelProperty("是否是里程碑 0否 1是") + private Byte milestone; + @ApiModelProperty("交付物id和修改后的名字") + private List deliverList; + @ApiModelProperty("需要修改的插件Id") + private List plugins; + @ApiModelProperty("任务提醒信息") + private List taskRemindList; + } + @Data + @ApiModel("修改任务时修改交付物名称") + public static class UpdateTaskDeliverName { + @ApiModelProperty("交付物id") + private Long deliverId; + @ApiModelProperty("交付物名字") + private String deliverName; } + @ApiModel @Data public static class ChangeBeginTime { @@ -157,16 +211,16 @@ public class TaskDto { } - public static class __TaskDto{ - private String name; - private String description; - private Long duration; - private Long prevId; - private Boolean isVirtual; - private String title; - private String speaker; - private String text; - } +// public static class __TaskDto{ +// private String name; +// private String description; +// private Long duration; +// private Long prevId; +// private Boolean isVirtual; +// private String title; +// private String speaker; +// private String text; +// } @ApiModel @Data @@ -177,4 +231,160 @@ public class TaskDto { private Integer completedStatus; } + @ApiModel("修改看板信息") + @Data + public static class ChangeKanbanTask { + @NotNull(message = "任务id不能为空") + @ApiModelProperty("任务id") + private Long id; + @NotNull(message = "状态不能为空") + @ApiModelProperty("任务状态 0未完成 1进行中 2已完成") + private Integer type; + } + + @Data + @ApiModel("修改任务配置") + public static class UpdateTaskConfig{ + @NotNull(message = "任务id不能为空") + @ApiModelProperty("任务id") + private Long taskId; + @ApiModelProperty("开始时间显示样式(默认 MM-DD HH:mm) 为空时不展示时间") + private String timeShow; + @ApiModelProperty("时长展示单位 0:根据时长转换成对应分钟或小时 1:不展示 2:转化成分钟 3:转化成小时") + private Integer duration; + @ApiModelProperty("是否显示新建任务按钮 0不展示 1展示") + private Integer createTask; + @ApiModelProperty("是否展示硬件按钮 0不展示 1展示") + private Integer showHardware; + @ApiModelProperty("是否展示交付物按钮 0不展示 1展示") + private Integer showDeliver; + @ApiModelProperty("是否展示奖惩金额按钮 0不展示 1展示") + private Integer showMoney; + @ApiModelProperty("时间轴上显示计划时间还是实际时间 0计划时间,1实际时间") + private Integer showRealTime; + @ApiModelProperty("是否展示完成按钮 0不展示 1展示") + private Integer showFinish; + } + + @Data + @ApiModel("给任务添加提醒") + public static class TaskRemind{ + @ApiModelProperty("任务日期id(subTimeId)") + private Long taskId; + @ApiModelProperty("提醒时机 0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间") + private Byte remindTiming; + @ApiModelProperty("时长 提醒时机是“开始时”或“结束时”可以为空") + private Long duration = 0L; + @ApiModelProperty("时间单位 0分钟 1小时 2天") + private Byte unit; + + public Long getDuration(){ + if(ObjectUtil.isNull(unit)) { + throw new BaseException("时间单位不能为空"); + } + if(remindTiming == 7){ + return duration; + } + switch (unit) { + case 0: + return duration * 60 * 1000L; + case 1: + return duration * 60 * 60 * 1000L; + case 2: + return duration * 24 * 60 * 60 * 1000L; + default: + return duration; + } + } + } + @Data + @ApiModel("删除任务提醒") + public static class DeleteTaskRemind{ + @ApiModelProperty("提醒记录的id") + private Long remindId; + } + @Data + @ApiModel("修改时设置任务提醒") + public static class UpdateTaskRemind{ + @NotNull + @ApiModelProperty("提醒信息的id") + private Long remindId; + @ApiModelProperty("提醒时机 0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间") + private Byte remindTiming; + @ApiModelProperty("时长 提醒时机是“开始时”或“结束时”可以为空") + private Long duration = 0L; + @ApiModelProperty("时间单位 0分钟 1小时 2天") + private Byte unit; + + public Long getDuration(){ + if(ObjectUtil.isNull(unit)) { + throw new BaseException("时间单位不能为空"); + } + if(remindTiming == 7){ + return duration; + } + switch (unit) { + case 0: + return duration * 60 * 1000L; + case 1: + return duration * 60 * 60 * 1000L; + case 2: + return duration * 24 * 60 * 60 * 1000L; + default: + return duration; + } + } + } + + @Data + @ApiModel("查看项目内的任务清单") + public static class SelectListByProject{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("任务关键字") + private String key; + @ApiModelProperty("开始时间") + private String start; + @ApiModelProperty("结束时间") + private String end; + @ApiModelProperty("页码") + private Integer page = 0; + @ApiModelProperty("每页数量 默认10") + private Integer pageSize = 10; + @ApiModelProperty("角色id") + private List roleList; + } + + + @Data + @ApiModel("根据角色查找任务") + public static class QueryTaskInfoByRoleId{ + @ApiModelProperty("角色Id") + private Long roleId; + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("完成状态 0全部,1完成,2未完成") + private Integer process = 0; + @ApiModelProperty("优先级排序 0无 1倒叙(优先级高的在前) 2正序") + private Integer priority = 0; + @ApiModelProperty("是否是变身模式 0否 1是") + private Integer imitation = 0; + @ApiModelProperty("页数 -1表示不分页") + private Integer page = 1; + @ApiModelProperty("每页数量") + private Integer pageSize = 10; + } + + + @Data + @ApiModel + public static class QueryAllTaskByProjectId { + @ApiModelProperty("项目Id") + private Long projectId; + @ApiModelProperty("角色id") + private Long roleId; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java index ddcc9765..6b4bd524 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/UserDto.java @@ -4,12 +4,14 @@ import com.ccsens.util.WebConstant; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import lombok.Getter; -import lombok.Setter; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; + +/** + * @author 逗 + */ @Data public class UserDto { @Data @@ -75,9 +77,24 @@ public class UserDto { private String password; } - //注册 @Data - @ApiModel + @ApiModel("通过账号修改密码") + public static class UpdatePasswordByAccount{ + @ApiModelProperty("账号") + @NotEmpty(message = "账号不能为空") + private String account; + @ApiModelProperty("旧密码") + @NotEmpty(message = "旧密码不能为空.") + @Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") + private String passwordOld; + @ApiModelProperty("新密码") + @NotEmpty(message = "新密码不能为空") + @Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") + private String passwordNew; + } + + @Data + @ApiModel("手机号注册") public static class UserSignup{ @ApiModelProperty("手机号") @NotEmpty(message = "手机号不能为空") @@ -97,9 +114,9 @@ public class UserDto { @ApiModelProperty("来源 0:默认注册,1:HT病人注册") private byte source = WebConstant.Regist.SOURCE; } - //注册 + @Data - @ApiModel + @ApiModel("注册") public static class UserSignupSystem{ @ApiModelProperty("账号") private String account; @@ -144,4 +161,54 @@ public class UserDto { @ApiModelProperty("语言") private String language; } + + @Data + @ApiModel("修改登录账号") + public static class UpdateAccount{ + @ApiModelProperty("手机号") + @NotEmpty(message = "手机号不能为空") + @Pattern(regexp="^[1]([3-9])[0-9]{9}$",message="请输入正确的手机号") + private String phone; + @ApiModelProperty("验证码") + @NotEmpty(message = "验证码不能为空.") + private String smsCode; + @ApiModelProperty("账号") + @NotEmpty(message = "新账号不能为空.") + private String account; + @ApiModelProperty("密码,有账号登录信息则验证密码,没有则设为新密码") + @NotEmpty(message = "密码不能为空") + private String password; + } + + @Data + @ApiModel("修改昵称") + public static class UpdateNickname{ + @ApiModelProperty("昵称") + @NotEmpty(message = "新昵称不能为空.") + private String nickname; + } + + @Data + @ApiModel("修改个人详细信息") + public static class UpdateUserInfo{ + @NotNull + @ApiModelProperty("userId") + private Long id; + @ApiModelProperty("昵称") + private String nickname; + @ApiModelProperty("个人签名") + private String signature; + @ApiModelProperty("个人简介") + private String introduction; + @ApiModelProperty("生日") + private String birthday; + @ApiModelProperty("所在地") + private String address; + @ApiModelProperty("网页") + private String webPath; + @ApiModelProperty("公司") + private String company; + @ApiModelProperty("职位") + private String position; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java new file mode 100644 index 00000000..a5f84046 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java @@ -0,0 +1,223 @@ +package com.ccsens.tall.bean.dto; + +import com.alibaba.fastjson.JSONObject; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.util.Map; + +/** + * @description: + * @author: whj + * @time: 2020/6/17 11:04 + */ +@Data +@ApiModel("wps相关请求参数") +public class WpsDto { + + @ApiModel("回调通知请求") + @Data + public static class Notify{ + @NotNull + @ApiModelProperty("请求签名") + private String _w_signature; + @NotNull + @ApiModelProperty("应用id") + private String _w_appid; + } + @ApiModel("回调通知请求body") + @Data + public static class NotifyBody{ + @NotNull + @ApiModelProperty("命令参数") + private String cmd; + @NotNull + @ApiModelProperty("信息内容") + private JSONObject body; + } + + @ApiModel("获取所有历史版本文件信息请求") + @Data + public static class FileHistory{ + @NotNull + @ApiModelProperty("请求签名") + private String _w_signature; + @NotNull + @ApiModelProperty("应用id") + private String _w_appid; + } + @ApiModel("获取所有历史版本文件信息body请求") + @Data + public static class FileHistoryBody{ + @NotNull + @ApiModelProperty("文件id") + private Long id; + @NotNull + @ApiModelProperty("记录偏移量") + private Integer offset; + @NotNull + @ApiModelProperty("记录总数") + private Integer count; + } + + @ApiModel("获取特定版本的文件信息请求") + @Data + public static class FileRename{ + @NotNull + @ApiModelProperty("请求签名") + private String _w_signature; + @NotNull + @ApiModelProperty("应用id") + private String _w_appid; + } + @ApiModel("获取特定版本的文件信息请求") + @Data + public static class FileRenameBody{ + @NotNull + @ApiModelProperty("文件新名称") + private String name; + } + + @ApiModel("获取特定版本的文件信息请求") + @Data + public static class FileVersion{ + @NotNull + @ApiModelProperty("请求签名") + private String _w_signature; + @NotNull + @ApiModelProperty("应用id") + private String _w_appid; + } + + @ApiModel("获取文件元数据请求") + @Data + public static class FileInfo{ + @NotNull + @ApiModelProperty("请求签名") + private String _w_signature; + @NotNull + @ApiModelProperty("应用id") + private String _w_appid; + + public String get_w_signature() { + return _w_signature; + } + + public void set_w_signature(String _w_signature) { + this._w_signature = _w_signature; + } + + public String get_w_appid() { + return _w_appid; + } + + public void set_w_appid(String _w_appid) { + this._w_appid = _w_appid; + } + } + + @ApiModel("上传文件新版本请求") + @Data + public static class FileSave{ + @NotNull + @ApiModelProperty("请求签名") + private String _w_signature; + @NotNull + @ApiModelProperty("应用id") + private String _w_appid; + @ApiModelProperty("业务处理路径") + private String _w_url; + } + + @ApiModel("获取用户信息请求") + @Data + public static class UserInfo{ + @NotNull + @ApiModelProperty("请求签名") + private String _w_signature; + @NotNull + @ApiModelProperty("应用id") + private String _w_appid; + } + @ApiModel("获取用户信息body请求") + @Data + public static class UserInfoBody{ + private Long[] ids; + } + + @ApiModel("上传文件新版本请求") + @Data + public static class FileNew{ + @NotNull + @ApiModelProperty("请求签名") + private String _w_signature; + @NotNull + @ApiModelProperty("应用id") + private String _w_appid; + @ApiModelProperty("业务处理路径") + private String _w_url; + } + + @Data + @ApiModel("业务和WPS") + public static class Business{ + @ApiModelProperty("业务ID") + private Long businessId; + @ApiModelProperty("wps文件ID") + private Long wpsFileId; + @ApiModelProperty("业务类型 0: 项目ID 1:交付物ID 2会议记录 3产品依据表" + + ",4产品收入表,5成本表,6损益表,7现金流表,8数钱游戏配置,9赛跑游戏配置,10拔河游戏配置") + private Byte businessType; + @ApiModelProperty("用户ID") + private Long userId; + @ApiModelProperty("文件名") + private String fileName; + @ApiModelProperty("文件路径,默认在WebConstant.UPLOAD_PATH_BASE下") + private String filePath; + @ApiModelProperty("文件大小") + private Long fileSize; + @ApiModelProperty("操作类型 值:WebConstant Wps USER_OPERATION... ") + private byte operation; + @ApiModelProperty("操作权限 WebConstant Wps PROJECT_PRIVILEGE...") + private byte privilege; + @ApiModelProperty("操作权限查询路径") + private String privilegeQueryUrl; + } + @Data + @ApiModel("异步通知") + public static class Async{ + @ApiModelProperty("文件ID") + private Long fileId; + } + + @Data + @ApiModel("查找wps文件路径") + public static class VisitWpsUrl{ + @NotNull + @ApiModelProperty("业务ID") + private Long businessId; + @NotNull + @ApiModelProperty("业务类型") + private Byte businessType; + @NotNull + @ApiModelProperty("userId") + private Long userId; + @ApiModelProperty("访问路径") + private Map params; + } + + @Data + @ApiModel("查看用户的读取权限") + public static class WpsPower { + @ApiModelProperty("业务ID") + private Long id; + @ApiModelProperty("业务类型") + private byte type; + @ApiModelProperty("wps文件id") + private Long fileId; + @ApiModelProperty("用户id") + private Long userId; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/message/BaseMessageDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/message/BaseMessageDto.java index 9b3f8f0c..c80889bd 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/message/BaseMessageDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/message/BaseMessageDto.java @@ -1,8 +1,14 @@ package com.ccsens.tall.bean.dto.message; +import cn.hutool.core.collection.CollectionUtil; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.util.bean.message.common.InMessage; import lombok.Data; +import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; @Data public class BaseMessageDto { @@ -16,6 +22,10 @@ public class BaseMessageDto { public MessageUser(){ hasRead = false; } + public MessageUser(Long userId){ + hasRead = false; + this.userId = userId; + } public MessageUser(Long id,Long userId,String nickname,String avatarUrl){ this(); this.id = id; @@ -23,6 +33,14 @@ public class BaseMessageDto { this.nickname = nickname; this.avatarUrl = avatarUrl; } + + public static List userIdToUsers(List userIds) { + List users = new ArrayList<>(); + userIds.forEach(userId ->{ + users.add(new MessageUser(userId)); + }); + return users; + } } private Long time; @@ -32,4 +50,17 @@ public class BaseMessageDto { private MessageUser sender; private List receivers; // private Object data; + + public Set receiversTransTos() { + Set tos = new HashSet<>(); + if (CollectionUtil.isEmpty(receivers)) { + return tos; + } + receivers.forEach(receiver -> { + InMessage.To to = new InMessage.To(receiver.getUserId()); + tos.add(JSONObject.toJSONString(to)); + }); + + return tos; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/message/DeliverMessageWithUploadDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/message/DeliverMessageWithUploadDto.java index 85c05754..4ffd8a9c 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/message/DeliverMessageWithUploadDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/message/DeliverMessageWithUploadDto.java @@ -21,8 +21,7 @@ public class DeliverMessageWithUploadDto extends BaseMessageDto { private String deliverName; private Long uploader; private Long uploadTime; - private List file; - + private List file; } private Data data; @@ -35,8 +34,10 @@ public class DeliverMessageWithUploadDto extends BaseMessageDto { public DeliverMessageWithUploadDto(Long projectId,Long roleId, Long taskId, Long deliverId,String deliverName - ,Long uploader,Long uploadTime,List file){ + ,Long uploader,Long uploadTime,List file,List receivers){ this(); + setReceivers(receivers); + Data d = new Data(); d.setProjectId(projectId); d.setRoleId(roleId); diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/message/ProjectMessageDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/message/ProjectMessageDto.java new file mode 100644 index 00000000..33609f69 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/message/ProjectMessageDto.java @@ -0,0 +1,46 @@ +package com.ccsens.tall.bean.dto.message; + +import com.ccsens.tall.bean.vo.MessageVo; +import com.ccsens.util.WebConstant; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @description: + * @author: whj + * @time: 2020/6/8 10:24 + */ +@ApiModel("消息系统") +@Data +public class ProjectMessageDto extends BaseMessageDto { + + @lombok.Data + public static class Data{ + private List messages; + } + + private Data data; + + public ProjectMessageDto(){ + setType(WebConstant.Message_Type.PROJECT_MESSAGE.phase); + setTime(System.currentTimeMillis()); + this.data = new Data(); + } + + @lombok.Data + @ApiModel("消息内容") + public static class Message { + @ApiModelProperty("消息属性") + private String name; + @ApiModelProperty("消息内容") + private String content; + @ApiModelProperty("类型 0:文本 1:链接") + private Byte type = 0; + @ApiModelProperty("配置") + private String settings; + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithReadDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithReadDto.java index 8a6f7628..2943fc46 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithReadDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithReadDto.java @@ -11,6 +11,8 @@ public class RingMessageWithReadDto extends BaseMessageDto{ @Getter public static class Data{ private Long msgId; + private Long projectId; + private Long roleId; } private Data data; @@ -21,10 +23,12 @@ public class RingMessageWithReadDto extends BaseMessageDto{ setTime(System.currentTimeMillis()); } - public RingMessageWithReadDto(Long msgId){ + public RingMessageWithReadDto(Long msgId,Long projectId,Long roleId){ this(); Data d = new Data(); d.setMsgId(msgId); + d.setProjectId(projectId); + d.setRoleId(roleId); setData(d); } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithSendDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithSendDto.java index b4096a83..9c74f25f 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithSendDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithSendDto.java @@ -12,7 +12,9 @@ public class RingMessageWithSendDto extends BaseMessageDto{ @Getter public static class Data{ private Long msgId; + private Long projectId; private String text; + private Long sendTime; } private Data data; @@ -23,11 +25,13 @@ public class RingMessageWithSendDto extends BaseMessageDto{ setTime(System.currentTimeMillis()); } - public RingMessageWithSendDto(Long msgId,String text){ + public RingMessageWithSendDto(Long msgId,Long projectId,String text,Long sendTime){ this(); Data d = new Data(); d.setMsgId(msgId); + d.setProjectId(projectId); d.setText(text); + d.setSendTime(sendTime); setData(d); } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/Constant.java b/tall/src/main/java/com/ccsens/tall/bean/po/Constant.java new file mode 100644 index 00000000..6d4368e1 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/Constant.java @@ -0,0 +1,95 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class Constant implements Serializable { + private Long id; + + private String tKey; + + private String tValue; + + private String description; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String gettKey() { + return tKey; + } + + public void settKey(String tKey) { + this.tKey = tKey == null ? null : tKey.trim(); + } + + public String gettValue() { + return tValue; + } + + public void settValue(String tValue) { + this.tValue = tValue == null ? null : tValue.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", tKey=").append(tKey); + sb.append(", tValue=").append(tValue); + sb.append(", description=").append(description); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ConstantExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ConstantExample.java new file mode 100644 index 00000000..7cfcc7a8 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ConstantExample.java @@ -0,0 +1,651 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ConstantExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ConstantExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTKeyIsNull() { + addCriterion("t_key is null"); + return (Criteria) this; + } + + public Criteria andTKeyIsNotNull() { + addCriterion("t_key is not null"); + return (Criteria) this; + } + + public Criteria andTKeyEqualTo(String value) { + addCriterion("t_key =", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyNotEqualTo(String value) { + addCriterion("t_key <>", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyGreaterThan(String value) { + addCriterion("t_key >", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyGreaterThanOrEqualTo(String value) { + addCriterion("t_key >=", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyLessThan(String value) { + addCriterion("t_key <", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyLessThanOrEqualTo(String value) { + addCriterion("t_key <=", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyLike(String value) { + addCriterion("t_key like", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyNotLike(String value) { + addCriterion("t_key not like", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyIn(List values) { + addCriterion("t_key in", values, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyNotIn(List values) { + addCriterion("t_key not in", values, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyBetween(String value1, String value2) { + addCriterion("t_key between", value1, value2, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyNotBetween(String value1, String value2) { + addCriterion("t_key not between", value1, value2, "tKey"); + return (Criteria) this; + } + + public Criteria andTValueIsNull() { + addCriterion("t_value is null"); + return (Criteria) this; + } + + public Criteria andTValueIsNotNull() { + addCriterion("t_value is not null"); + return (Criteria) this; + } + + public Criteria andTValueEqualTo(String value) { + addCriterion("t_value =", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueNotEqualTo(String value) { + addCriterion("t_value <>", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueGreaterThan(String value) { + addCriterion("t_value >", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueGreaterThanOrEqualTo(String value) { + addCriterion("t_value >=", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueLessThan(String value) { + addCriterion("t_value <", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueLessThanOrEqualTo(String value) { + addCriterion("t_value <=", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueLike(String value) { + addCriterion("t_value like", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueNotLike(String value) { + addCriterion("t_value not like", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueIn(List values) { + addCriterion("t_value in", values, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueNotIn(List values) { + addCriterion("t_value not in", values, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueBetween(String value1, String value2) { + addCriterion("t_value between", value1, value2, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueNotBetween(String value1, String value2) { + addCriterion("t_value not between", value1, value2, "tValue"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/DomainNav.java b/tall/src/main/java/com/ccsens/tall/bean/po/DomainNav.java new file mode 100644 index 00000000..027ce345 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/DomainNav.java @@ -0,0 +1,139 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class DomainNav implements Serializable { + private Long id; + + private Long domainId; + + private String text; + + private Byte type; + + private String path; + + private String params; + + private String icon; + + private Byte position; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getDomainId() { + return domainId; + } + + public void setDomainId(Long domainId) { + this.domainId = domainId; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text == null ? null : text.trim(); + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path == null ? null : path.trim(); + } + + public String getParams() { + return params; + } + + public void setParams(String params) { + this.params = params == null ? null : params.trim(); + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon == null ? null : icon.trim(); + } + + public Byte getPosition() { + return position; + } + + public void setPosition(Byte position) { + this.position = position; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", domainId=").append(domainId); + sb.append(", text=").append(text); + sb.append(", type=").append(type); + sb.append(", path=").append(path); + sb.append(", params=").append(params); + sb.append(", icon=").append(icon); + sb.append(", position=").append(position); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/DomainNavExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/DomainNavExample.java new file mode 100644 index 00000000..42478a7e --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/DomainNavExample.java @@ -0,0 +1,901 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class DomainNavExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public DomainNavExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDomainIdIsNull() { + addCriterion("domain_id is null"); + return (Criteria) this; + } + + public Criteria andDomainIdIsNotNull() { + addCriterion("domain_id is not null"); + return (Criteria) this; + } + + public Criteria andDomainIdEqualTo(Long value) { + addCriterion("domain_id =", value, "domainId"); + return (Criteria) this; + } + + public Criteria andDomainIdNotEqualTo(Long value) { + addCriterion("domain_id <>", value, "domainId"); + return (Criteria) this; + } + + public Criteria andDomainIdGreaterThan(Long value) { + addCriterion("domain_id >", value, "domainId"); + return (Criteria) this; + } + + public Criteria andDomainIdGreaterThanOrEqualTo(Long value) { + addCriterion("domain_id >=", value, "domainId"); + return (Criteria) this; + } + + public Criteria andDomainIdLessThan(Long value) { + addCriterion("domain_id <", value, "domainId"); + return (Criteria) this; + } + + public Criteria andDomainIdLessThanOrEqualTo(Long value) { + addCriterion("domain_id <=", value, "domainId"); + return (Criteria) this; + } + + public Criteria andDomainIdIn(List values) { + addCriterion("domain_id in", values, "domainId"); + return (Criteria) this; + } + + public Criteria andDomainIdNotIn(List values) { + addCriterion("domain_id not in", values, "domainId"); + return (Criteria) this; + } + + public Criteria andDomainIdBetween(Long value1, Long value2) { + addCriterion("domain_id between", value1, value2, "domainId"); + return (Criteria) this; + } + + public Criteria andDomainIdNotBetween(Long value1, Long value2) { + addCriterion("domain_id not between", value1, value2, "domainId"); + return (Criteria) this; + } + + public Criteria andTextIsNull() { + addCriterion("text is null"); + return (Criteria) this; + } + + public Criteria andTextIsNotNull() { + addCriterion("text is not null"); + return (Criteria) this; + } + + public Criteria andTextEqualTo(String value) { + addCriterion("text =", value, "text"); + return (Criteria) this; + } + + public Criteria andTextNotEqualTo(String value) { + addCriterion("text <>", value, "text"); + return (Criteria) this; + } + + public Criteria andTextGreaterThan(String value) { + addCriterion("text >", value, "text"); + return (Criteria) this; + } + + public Criteria andTextGreaterThanOrEqualTo(String value) { + addCriterion("text >=", value, "text"); + return (Criteria) this; + } + + public Criteria andTextLessThan(String value) { + addCriterion("text <", value, "text"); + return (Criteria) this; + } + + public Criteria andTextLessThanOrEqualTo(String value) { + addCriterion("text <=", value, "text"); + return (Criteria) this; + } + + public Criteria andTextLike(String value) { + addCriterion("text like", value, "text"); + return (Criteria) this; + } + + public Criteria andTextNotLike(String value) { + addCriterion("text not like", value, "text"); + return (Criteria) this; + } + + public Criteria andTextIn(List values) { + addCriterion("text in", values, "text"); + return (Criteria) this; + } + + public Criteria andTextNotIn(List values) { + addCriterion("text not in", values, "text"); + return (Criteria) this; + } + + public Criteria andTextBetween(String value1, String value2) { + addCriterion("text between", value1, value2, "text"); + return (Criteria) this; + } + + public Criteria andTextNotBetween(String value1, String value2) { + addCriterion("text not between", value1, value2, "text"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andPathIsNull() { + addCriterion("path is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("path is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("path =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("path <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("path >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("path >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("path <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("path <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("path like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("path not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("path in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("path not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("path between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("path not between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andParamsIsNull() { + addCriterion("params is null"); + return (Criteria) this; + } + + public Criteria andParamsIsNotNull() { + addCriterion("params is not null"); + return (Criteria) this; + } + + public Criteria andParamsEqualTo(String value) { + addCriterion("params =", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotEqualTo(String value) { + addCriterion("params <>", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsGreaterThan(String value) { + addCriterion("params >", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsGreaterThanOrEqualTo(String value) { + addCriterion("params >=", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsLessThan(String value) { + addCriterion("params <", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsLessThanOrEqualTo(String value) { + addCriterion("params <=", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsLike(String value) { + addCriterion("params like", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotLike(String value) { + addCriterion("params not like", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsIn(List values) { + addCriterion("params in", values, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotIn(List values) { + addCriterion("params not in", values, "params"); + return (Criteria) this; + } + + public Criteria andParamsBetween(String value1, String value2) { + addCriterion("params between", value1, value2, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotBetween(String value1, String value2) { + addCriterion("params not between", value1, value2, "params"); + return (Criteria) this; + } + + public Criteria andIconIsNull() { + addCriterion("icon is null"); + return (Criteria) this; + } + + public Criteria andIconIsNotNull() { + addCriterion("icon is not null"); + return (Criteria) this; + } + + public Criteria andIconEqualTo(String value) { + addCriterion("icon =", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconNotEqualTo(String value) { + addCriterion("icon <>", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconGreaterThan(String value) { + addCriterion("icon >", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconGreaterThanOrEqualTo(String value) { + addCriterion("icon >=", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconLessThan(String value) { + addCriterion("icon <", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconLessThanOrEqualTo(String value) { + addCriterion("icon <=", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconLike(String value) { + addCriterion("icon like", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconNotLike(String value) { + addCriterion("icon not like", value, "icon"); + return (Criteria) this; + } + + public Criteria andIconIn(List values) { + addCriterion("icon in", values, "icon"); + return (Criteria) this; + } + + public Criteria andIconNotIn(List values) { + addCriterion("icon not in", values, "icon"); + return (Criteria) this; + } + + public Criteria andIconBetween(String value1, String value2) { + addCriterion("icon between", value1, value2, "icon"); + return (Criteria) this; + } + + public Criteria andIconNotBetween(String value1, String value2) { + addCriterion("icon not between", value1, value2, "icon"); + return (Criteria) this; + } + + public Criteria andPositionIsNull() { + addCriterion("position is null"); + return (Criteria) this; + } + + public Criteria andPositionIsNotNull() { + addCriterion("position is not null"); + return (Criteria) this; + } + + public Criteria andPositionEqualTo(Byte value) { + addCriterion("position =", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotEqualTo(Byte value) { + addCriterion("position <>", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionGreaterThan(Byte value) { + addCriterion("position >", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionGreaterThanOrEqualTo(Byte value) { + addCriterion("position >=", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLessThan(Byte value) { + addCriterion("position <", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLessThanOrEqualTo(Byte value) { + addCriterion("position <=", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionIn(List values) { + addCriterion("position in", values, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotIn(List values) { + addCriterion("position not in", values, "position"); + return (Criteria) this; + } + + public Criteria andPositionBetween(Byte value1, Byte value2) { + addCriterion("position between", value1, value2, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotBetween(Byte value1, Byte value2) { + addCriterion("position not between", value1, value2, "position"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProNotes.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProNotes.java new file mode 100644 index 00000000..5b4eb681 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProNotes.java @@ -0,0 +1,139 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProNotes implements Serializable { + private Long id; + + private String value; + + private Long taskId; + + private Long pluginId; + + private Long userId; + + private Long roleId; + + private Long time; + + private Byte publicity; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public Long getPluginId() { + return pluginId; + } + + public void setPluginId(Long pluginId) { + this.pluginId = pluginId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public Long getTime() { + return time; + } + + public void setTime(Long time) { + this.time = time; + } + + public Byte getPublicity() { + return publicity; + } + + public void setPublicity(Byte publicity) { + this.publicity = publicity; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", value=").append(value); + sb.append(", taskId=").append(taskId); + sb.append(", pluginId=").append(pluginId); + sb.append(", userId=").append(userId); + sb.append(", roleId=").append(roleId); + sb.append(", time=").append(time); + sb.append(", publicity=").append(publicity); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProNotesExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProNotesExample.java new file mode 100644 index 00000000..a3104f1f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProNotesExample.java @@ -0,0 +1,871 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProNotesExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProNotesExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andValueIsNull() { + addCriterion("value is null"); + return (Criteria) this; + } + + public Criteria andValueIsNotNull() { + addCriterion("value is not null"); + return (Criteria) this; + } + + public Criteria andValueEqualTo(String value) { + addCriterion("value =", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotEqualTo(String value) { + addCriterion("value <>", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThan(String value) { + addCriterion("value >", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThanOrEqualTo(String value) { + addCriterion("value >=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThan(String value) { + addCriterion("value <", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThanOrEqualTo(String value) { + addCriterion("value <=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLike(String value) { + addCriterion("value like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotLike(String value) { + addCriterion("value not like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueIn(List values) { + addCriterion("value in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueNotIn(List values) { + addCriterion("value not in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueBetween(String value1, String value2) { + addCriterion("value between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andValueNotBetween(String value1, String value2) { + addCriterion("value not between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andTaskIdIsNull() { + addCriterion("task_id is null"); + return (Criteria) this; + } + + public Criteria andTaskIdIsNotNull() { + addCriterion("task_id is not null"); + return (Criteria) this; + } + + public Criteria andTaskIdEqualTo(Long value) { + addCriterion("task_id =", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotEqualTo(Long value) { + addCriterion("task_id <>", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdGreaterThan(Long value) { + addCriterion("task_id >", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdGreaterThanOrEqualTo(Long value) { + addCriterion("task_id >=", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdLessThan(Long value) { + addCriterion("task_id <", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdLessThanOrEqualTo(Long value) { + addCriterion("task_id <=", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdIn(List values) { + addCriterion("task_id in", values, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotIn(List values) { + addCriterion("task_id not in", values, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdBetween(Long value1, Long value2) { + addCriterion("task_id between", value1, value2, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotBetween(Long value1, Long value2) { + addCriterion("task_id not between", value1, value2, "taskId"); + return (Criteria) this; + } + + public Criteria andPluginIdIsNull() { + addCriterion("plugin_id is null"); + return (Criteria) this; + } + + public Criteria andPluginIdIsNotNull() { + addCriterion("plugin_id is not null"); + return (Criteria) this; + } + + public Criteria andPluginIdEqualTo(Long value) { + addCriterion("plugin_id =", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotEqualTo(Long value) { + addCriterion("plugin_id <>", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdGreaterThan(Long value) { + addCriterion("plugin_id >", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdGreaterThanOrEqualTo(Long value) { + addCriterion("plugin_id >=", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLessThan(Long value) { + addCriterion("plugin_id <", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLessThanOrEqualTo(Long value) { + addCriterion("plugin_id <=", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdIn(List values) { + addCriterion("plugin_id in", values, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotIn(List values) { + addCriterion("plugin_id not in", values, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdBetween(Long value1, Long value2) { + addCriterion("plugin_id between", value1, value2, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotBetween(Long value1, Long value2) { + addCriterion("plugin_id not between", value1, value2, "pluginId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("role_id is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("role_id is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(Long value) { + addCriterion("role_id =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(Long value) { + addCriterion("role_id <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(Long value) { + addCriterion("role_id >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("role_id >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(Long value) { + addCriterion("role_id <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(Long value) { + addCriterion("role_id <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("role_id in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("role_id not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(Long value1, Long value2) { + addCriterion("role_id between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(Long value1, Long value2) { + addCriterion("role_id not between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andTimeIsNull() { + addCriterion("time is null"); + return (Criteria) this; + } + + public Criteria andTimeIsNotNull() { + addCriterion("time is not null"); + return (Criteria) this; + } + + public Criteria andTimeEqualTo(Long value) { + addCriterion("time =", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotEqualTo(Long value) { + addCriterion("time <>", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThan(Long value) { + addCriterion("time >", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThanOrEqualTo(Long value) { + addCriterion("time >=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThan(Long value) { + addCriterion("time <", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThanOrEqualTo(Long value) { + addCriterion("time <=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeIn(List values) { + addCriterion("time in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotIn(List values) { + addCriterion("time not in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeBetween(Long value1, Long value2) { + addCriterion("time between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotBetween(Long value1, Long value2) { + addCriterion("time not between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andPublicityIsNull() { + addCriterion("publicity is null"); + return (Criteria) this; + } + + public Criteria andPublicityIsNotNull() { + addCriterion("publicity is not null"); + return (Criteria) this; + } + + public Criteria andPublicityEqualTo(Byte value) { + addCriterion("publicity =", value, "publicity"); + return (Criteria) this; + } + + public Criteria andPublicityNotEqualTo(Byte value) { + addCriterion("publicity <>", value, "publicity"); + return (Criteria) this; + } + + public Criteria andPublicityGreaterThan(Byte value) { + addCriterion("publicity >", value, "publicity"); + return (Criteria) this; + } + + public Criteria andPublicityGreaterThanOrEqualTo(Byte value) { + addCriterion("publicity >=", value, "publicity"); + return (Criteria) this; + } + + public Criteria andPublicityLessThan(Byte value) { + addCriterion("publicity <", value, "publicity"); + return (Criteria) this; + } + + public Criteria andPublicityLessThanOrEqualTo(Byte value) { + addCriterion("publicity <=", value, "publicity"); + return (Criteria) this; + } + + public Criteria andPublicityIn(List values) { + addCriterion("publicity in", values, "publicity"); + return (Criteria) this; + } + + public Criteria andPublicityNotIn(List values) { + addCriterion("publicity not in", values, "publicity"); + return (Criteria) this; + } + + public Criteria andPublicityBetween(Byte value1, Byte value2) { + addCriterion("publicity between", value1, value2, "publicity"); + return (Criteria) this; + } + + public Criteria andPublicityNotBetween(Byte value1, Byte value2) { + addCriterion("publicity not between", value1, value2, "publicity"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFile.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFile.java new file mode 100644 index 00000000..e1c33339 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFile.java @@ -0,0 +1,117 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProProjectFile implements Serializable { + private Long id; + + private Long businessId; + + private Long wpsFileId; + + private Byte businessType; + + private Byte privilege; + + private String privilegeQueryUrl; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getBusinessId() { + return businessId; + } + + public void setBusinessId(Long businessId) { + this.businessId = businessId; + } + + public Long getWpsFileId() { + return wpsFileId; + } + + public void setWpsFileId(Long wpsFileId) { + this.wpsFileId = wpsFileId; + } + + public Byte getBusinessType() { + return businessType; + } + + public void setBusinessType(Byte businessType) { + this.businessType = businessType; + } + + public Byte getPrivilege() { + return privilege; + } + + public void setPrivilege(Byte privilege) { + this.privilege = privilege; + } + + public String getPrivilegeQueryUrl() { + return privilegeQueryUrl; + } + + public void setPrivilegeQueryUrl(String privilegeQueryUrl) { + this.privilegeQueryUrl = privilegeQueryUrl == null ? null : privilegeQueryUrl.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", businessId=").append(businessId); + sb.append(", wpsFileId=").append(wpsFileId); + sb.append(", businessType=").append(businessType); + sb.append(", privilege=").append(privilege); + sb.append(", privilegeQueryUrl=").append(privilegeQueryUrl); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFileExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFileExample.java new file mode 100644 index 00000000..0058cddc --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFileExample.java @@ -0,0 +1,751 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProProjectFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProProjectFileExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andBusinessIdIsNull() { + addCriterion("business_id is null"); + return (Criteria) this; + } + + public Criteria andBusinessIdIsNotNull() { + addCriterion("business_id is not null"); + return (Criteria) this; + } + + public Criteria andBusinessIdEqualTo(Long value) { + addCriterion("business_id =", value, "businessId"); + return (Criteria) this; + } + + public Criteria andBusinessIdNotEqualTo(Long value) { + addCriterion("business_id <>", value, "businessId"); + return (Criteria) this; + } + + public Criteria andBusinessIdGreaterThan(Long value) { + addCriterion("business_id >", value, "businessId"); + return (Criteria) this; + } + + public Criteria andBusinessIdGreaterThanOrEqualTo(Long value) { + addCriterion("business_id >=", value, "businessId"); + return (Criteria) this; + } + + public Criteria andBusinessIdLessThan(Long value) { + addCriterion("business_id <", value, "businessId"); + return (Criteria) this; + } + + public Criteria andBusinessIdLessThanOrEqualTo(Long value) { + addCriterion("business_id <=", value, "businessId"); + return (Criteria) this; + } + + public Criteria andBusinessIdIn(List values) { + addCriterion("business_id in", values, "businessId"); + return (Criteria) this; + } + + public Criteria andBusinessIdNotIn(List values) { + addCriterion("business_id not in", values, "businessId"); + return (Criteria) this; + } + + public Criteria andBusinessIdBetween(Long value1, Long value2) { + addCriterion("business_id between", value1, value2, "businessId"); + return (Criteria) this; + } + + public Criteria andBusinessIdNotBetween(Long value1, Long value2) { + addCriterion("business_id not between", value1, value2, "businessId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdIsNull() { + addCriterion("wps_file_id is null"); + return (Criteria) this; + } + + public Criteria andWpsFileIdIsNotNull() { + addCriterion("wps_file_id is not null"); + return (Criteria) this; + } + + public Criteria andWpsFileIdEqualTo(Long value) { + addCriterion("wps_file_id =", value, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdNotEqualTo(Long value) { + addCriterion("wps_file_id <>", value, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdGreaterThan(Long value) { + addCriterion("wps_file_id >", value, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdGreaterThanOrEqualTo(Long value) { + addCriterion("wps_file_id >=", value, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdLessThan(Long value) { + addCriterion("wps_file_id <", value, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdLessThanOrEqualTo(Long value) { + addCriterion("wps_file_id <=", value, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdIn(List values) { + addCriterion("wps_file_id in", values, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdNotIn(List values) { + addCriterion("wps_file_id not in", values, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdBetween(Long value1, Long value2) { + addCriterion("wps_file_id between", value1, value2, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andWpsFileIdNotBetween(Long value1, Long value2) { + addCriterion("wps_file_id not between", value1, value2, "wpsFileId"); + return (Criteria) this; + } + + public Criteria andBusinessTypeIsNull() { + addCriterion("business_type is null"); + return (Criteria) this; + } + + public Criteria andBusinessTypeIsNotNull() { + addCriterion("business_type is not null"); + return (Criteria) this; + } + + public Criteria andBusinessTypeEqualTo(Byte value) { + addCriterion("business_type =", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeNotEqualTo(Byte value) { + addCriterion("business_type <>", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeGreaterThan(Byte value) { + addCriterion("business_type >", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("business_type >=", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeLessThan(Byte value) { + addCriterion("business_type <", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeLessThanOrEqualTo(Byte value) { + addCriterion("business_type <=", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeIn(List values) { + addCriterion("business_type in", values, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeNotIn(List values) { + addCriterion("business_type not in", values, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeBetween(Byte value1, Byte value2) { + addCriterion("business_type between", value1, value2, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeNotBetween(Byte value1, Byte value2) { + addCriterion("business_type not between", value1, value2, "businessType"); + return (Criteria) this; + } + + public Criteria andPrivilegeIsNull() { + addCriterion("privilege is null"); + return (Criteria) this; + } + + public Criteria andPrivilegeIsNotNull() { + addCriterion("privilege is not null"); + return (Criteria) this; + } + + public Criteria andPrivilegeEqualTo(Byte value) { + addCriterion("privilege =", value, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeNotEqualTo(Byte value) { + addCriterion("privilege <>", value, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeGreaterThan(Byte value) { + addCriterion("privilege >", value, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeGreaterThanOrEqualTo(Byte value) { + addCriterion("privilege >=", value, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeLessThan(Byte value) { + addCriterion("privilege <", value, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeLessThanOrEqualTo(Byte value) { + addCriterion("privilege <=", value, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeIn(List values) { + addCriterion("privilege in", values, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeNotIn(List values) { + addCriterion("privilege not in", values, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeBetween(Byte value1, Byte value2) { + addCriterion("privilege between", value1, value2, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeNotBetween(Byte value1, Byte value2) { + addCriterion("privilege not between", value1, value2, "privilege"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlIsNull() { + addCriterion("privilege_query_url is null"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlIsNotNull() { + addCriterion("privilege_query_url is not null"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlEqualTo(String value) { + addCriterion("privilege_query_url =", value, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlNotEqualTo(String value) { + addCriterion("privilege_query_url <>", value, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlGreaterThan(String value) { + addCriterion("privilege_query_url >", value, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlGreaterThanOrEqualTo(String value) { + addCriterion("privilege_query_url >=", value, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlLessThan(String value) { + addCriterion("privilege_query_url <", value, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlLessThanOrEqualTo(String value) { + addCriterion("privilege_query_url <=", value, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlLike(String value) { + addCriterion("privilege_query_url like", value, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlNotLike(String value) { + addCriterion("privilege_query_url not like", value, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlIn(List values) { + addCriterion("privilege_query_url in", values, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlNotIn(List values) { + addCriterion("privilege_query_url not in", values, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlBetween(String value1, String value2) { + addCriterion("privilege_query_url between", value1, value2, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andPrivilegeQueryUrlNotBetween(String value1, String value2) { + addCriterion("privilege_query_url not between", value1, value2, "privilegeQueryUrl"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProRemind.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProRemind.java new file mode 100644 index 00000000..86b2fce7 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProRemind.java @@ -0,0 +1,128 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProRemind implements Serializable { + private Long id; + + private Long subTaskId; + + private Byte remindTiming; + + private Long remindAbsoluteTime; + + private Byte finishStatus; + + private Integer remindTimes; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private String duration; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getSubTaskId() { + return subTaskId; + } + + public void setSubTaskId(Long subTaskId) { + this.subTaskId = subTaskId; + } + + public Byte getRemindTiming() { + return remindTiming; + } + + public void setRemindTiming(Byte remindTiming) { + this.remindTiming = remindTiming; + } + + public Long getRemindAbsoluteTime() { + return remindAbsoluteTime; + } + + public void setRemindAbsoluteTime(Long remindAbsoluteTime) { + this.remindAbsoluteTime = remindAbsoluteTime; + } + + public Byte getFinishStatus() { + return finishStatus; + } + + public void setFinishStatus(Byte finishStatus) { + this.finishStatus = finishStatus; + } + + public Integer getRemindTimes() { + return remindTimes; + } + + public void setRemindTimes(Integer remindTimes) { + this.remindTimes = remindTimes; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public String getDuration() { + return duration; + } + + public void setDuration(String duration) { + this.duration = duration == null ? null : duration.trim(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", subTaskId=").append(subTaskId); + sb.append(", remindTiming=").append(remindTiming); + sb.append(", remindAbsoluteTime=").append(remindAbsoluteTime); + sb.append(", finishStatus=").append(finishStatus); + sb.append(", remindTimes=").append(remindTimes); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", duration=").append(duration); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProRemindExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProRemindExample.java new file mode 100644 index 00000000..4344b56d --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProRemindExample.java @@ -0,0 +1,811 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProRemindExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProRemindExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andSubTaskIdIsNull() { + addCriterion("sub_task_id is null"); + return (Criteria) this; + } + + public Criteria andSubTaskIdIsNotNull() { + addCriterion("sub_task_id is not null"); + return (Criteria) this; + } + + public Criteria andSubTaskIdEqualTo(Long value) { + addCriterion("sub_task_id =", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdNotEqualTo(Long value) { + addCriterion("sub_task_id <>", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdGreaterThan(Long value) { + addCriterion("sub_task_id >", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdGreaterThanOrEqualTo(Long value) { + addCriterion("sub_task_id >=", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdLessThan(Long value) { + addCriterion("sub_task_id <", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdLessThanOrEqualTo(Long value) { + addCriterion("sub_task_id <=", value, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdIn(List values) { + addCriterion("sub_task_id in", values, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdNotIn(List values) { + addCriterion("sub_task_id not in", values, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdBetween(Long value1, Long value2) { + addCriterion("sub_task_id between", value1, value2, "subTaskId"); + return (Criteria) this; + } + + public Criteria andSubTaskIdNotBetween(Long value1, Long value2) { + addCriterion("sub_task_id not between", value1, value2, "subTaskId"); + return (Criteria) this; + } + + public Criteria andRemindTimingIsNull() { + addCriterion("remind_timing is null"); + return (Criteria) this; + } + + public Criteria andRemindTimingIsNotNull() { + addCriterion("remind_timing is not null"); + return (Criteria) this; + } + + public Criteria andRemindTimingEqualTo(Byte value) { + addCriterion("remind_timing =", value, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindTimingNotEqualTo(Byte value) { + addCriterion("remind_timing <>", value, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindTimingGreaterThan(Byte value) { + addCriterion("remind_timing >", value, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindTimingGreaterThanOrEqualTo(Byte value) { + addCriterion("remind_timing >=", value, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindTimingLessThan(Byte value) { + addCriterion("remind_timing <", value, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindTimingLessThanOrEqualTo(Byte value) { + addCriterion("remind_timing <=", value, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindTimingIn(List values) { + addCriterion("remind_timing in", values, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindTimingNotIn(List values) { + addCriterion("remind_timing not in", values, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindTimingBetween(Byte value1, Byte value2) { + addCriterion("remind_timing between", value1, value2, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindTimingNotBetween(Byte value1, Byte value2) { + addCriterion("remind_timing not between", value1, value2, "remindTiming"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeIsNull() { + addCriterion("remind_absolute_time is null"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeIsNotNull() { + addCriterion("remind_absolute_time is not null"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeEqualTo(Long value) { + addCriterion("remind_absolute_time =", value, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeNotEqualTo(Long value) { + addCriterion("remind_absolute_time <>", value, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeGreaterThan(Long value) { + addCriterion("remind_absolute_time >", value, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeGreaterThanOrEqualTo(Long value) { + addCriterion("remind_absolute_time >=", value, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeLessThan(Long value) { + addCriterion("remind_absolute_time <", value, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeLessThanOrEqualTo(Long value) { + addCriterion("remind_absolute_time <=", value, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeIn(List values) { + addCriterion("remind_absolute_time in", values, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeNotIn(List values) { + addCriterion("remind_absolute_time not in", values, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeBetween(Long value1, Long value2) { + addCriterion("remind_absolute_time between", value1, value2, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andRemindAbsoluteTimeNotBetween(Long value1, Long value2) { + addCriterion("remind_absolute_time not between", value1, value2, "remindAbsoluteTime"); + return (Criteria) this; + } + + public Criteria andFinishStatusIsNull() { + addCriterion("finish_status is null"); + return (Criteria) this; + } + + public Criteria andFinishStatusIsNotNull() { + addCriterion("finish_status is not null"); + return (Criteria) this; + } + + public Criteria andFinishStatusEqualTo(Byte value) { + addCriterion("finish_status =", value, "finishStatus"); + return (Criteria) this; + } + + public Criteria andFinishStatusNotEqualTo(Byte value) { + addCriterion("finish_status <>", value, "finishStatus"); + return (Criteria) this; + } + + public Criteria andFinishStatusGreaterThan(Byte value) { + addCriterion("finish_status >", value, "finishStatus"); + return (Criteria) this; + } + + public Criteria andFinishStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("finish_status >=", value, "finishStatus"); + return (Criteria) this; + } + + public Criteria andFinishStatusLessThan(Byte value) { + addCriterion("finish_status <", value, "finishStatus"); + return (Criteria) this; + } + + public Criteria andFinishStatusLessThanOrEqualTo(Byte value) { + addCriterion("finish_status <=", value, "finishStatus"); + return (Criteria) this; + } + + public Criteria andFinishStatusIn(List values) { + addCriterion("finish_status in", values, "finishStatus"); + return (Criteria) this; + } + + public Criteria andFinishStatusNotIn(List values) { + addCriterion("finish_status not in", values, "finishStatus"); + return (Criteria) this; + } + + public Criteria andFinishStatusBetween(Byte value1, Byte value2) { + addCriterion("finish_status between", value1, value2, "finishStatus"); + return (Criteria) this; + } + + public Criteria andFinishStatusNotBetween(Byte value1, Byte value2) { + addCriterion("finish_status not between", value1, value2, "finishStatus"); + return (Criteria) this; + } + + public Criteria andRemindTimesIsNull() { + addCriterion("remind_times is null"); + return (Criteria) this; + } + + public Criteria andRemindTimesIsNotNull() { + addCriterion("remind_times is not null"); + return (Criteria) this; + } + + public Criteria andRemindTimesEqualTo(Integer value) { + addCriterion("remind_times =", value, "remindTimes"); + return (Criteria) this; + } + + public Criteria andRemindTimesNotEqualTo(Integer value) { + addCriterion("remind_times <>", value, "remindTimes"); + return (Criteria) this; + } + + public Criteria andRemindTimesGreaterThan(Integer value) { + addCriterion("remind_times >", value, "remindTimes"); + return (Criteria) this; + } + + public Criteria andRemindTimesGreaterThanOrEqualTo(Integer value) { + addCriterion("remind_times >=", value, "remindTimes"); + return (Criteria) this; + } + + public Criteria andRemindTimesLessThan(Integer value) { + addCriterion("remind_times <", value, "remindTimes"); + return (Criteria) this; + } + + public Criteria andRemindTimesLessThanOrEqualTo(Integer value) { + addCriterion("remind_times <=", value, "remindTimes"); + return (Criteria) this; + } + + public Criteria andRemindTimesIn(List values) { + addCriterion("remind_times in", values, "remindTimes"); + return (Criteria) this; + } + + public Criteria andRemindTimesNotIn(List values) { + addCriterion("remind_times not in", values, "remindTimes"); + return (Criteria) this; + } + + public Criteria andRemindTimesBetween(Integer value1, Integer value2) { + addCriterion("remind_times between", value1, value2, "remindTimes"); + return (Criteria) this; + } + + public Criteria andRemindTimesNotBetween(Integer value1, Integer value2) { + addCriterion("remind_times not between", value1, value2, "remindTimes"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andDurationIsNull() { + addCriterion("duration is null"); + return (Criteria) this; + } + + public Criteria andDurationIsNotNull() { + addCriterion("duration is not null"); + return (Criteria) this; + } + + public Criteria andDurationEqualTo(String value) { + addCriterion("duration =", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotEqualTo(String value) { + addCriterion("duration <>", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThan(String value) { + addCriterion("duration >", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThanOrEqualTo(String value) { + addCriterion("duration >=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThan(String value) { + addCriterion("duration <", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThanOrEqualTo(String value) { + addCriterion("duration <=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLike(String value) { + addCriterion("duration like", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotLike(String value) { + addCriterion("duration not like", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationIn(List values) { + addCriterion("duration in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotIn(List values) { + addCriterion("duration not in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationBetween(String value1, String value2) { + addCriterion("duration between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotBetween(String value1, String value2) { + addCriterion("duration not between", value1, value2, "duration"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java index ca27873a..7440a524 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java @@ -1,117 +1,128 @@ -package com.ccsens.tall.bean.po; - -import java.io.Serializable; -import java.util.Date; - -public class ProRole implements Serializable { - private Long id; - - private Long projectId; - - private Long parentId; - - private String name; - - private String description; - - private Integer sequence; - - private Date createdAt; - - private Date updatedAt; - - private Byte recStatus; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getProjectId() { - return projectId; - } - - public void setProjectId(Long projectId) { - this.projectId = projectId; - } - - public Long getParentId() { - return parentId; - } - - public void setParentId(Long parentId) { - this.parentId = parentId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Integer getSequence() { - return sequence; - } - - public void setSequence(Integer sequence) { - this.sequence = sequence; - } - - public Date getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Date createdAt) { - this.createdAt = createdAt; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - - public Byte getRecStatus() { - return recStatus; - } - - public void setRecStatus(Byte recStatus) { - this.recStatus = recStatus; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", projectId=").append(projectId); - sb.append(", parentId=").append(parentId); - sb.append(", name=").append(name); - sb.append(", description=").append(description); - sb.append(", sequence=").append(sequence); - sb.append(", createdAt=").append(createdAt); - sb.append(", updatedAt=").append(updatedAt); - sb.append(", recStatus=").append(recStatus); - sb.append("]"); - return sb.toString(); - } +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProRole implements Serializable { + private Long id; + + private Long projectId; + + private Long parentId; + + private String name; + + private String description; + + private Integer sequence; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private Long relevanceProjectId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public Long getRelevanceProjectId() { + return relevanceProjectId; + } + + public void setRelevanceProjectId(Long relevanceProjectId) { + this.relevanceProjectId = relevanceProjectId; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", parentId=").append(parentId); + sb.append(", name=").append(name); + sb.append(", description=").append(description); + sb.append(", sequence=").append(sequence); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", relevanceProjectId=").append(relevanceProjectId); + sb.append("]"); + return sb.toString(); + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java index 45a2e821..a29cbb00 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java @@ -1,761 +1,821 @@ -package com.ccsens.tall.bean.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class ProRoleExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ProRoleExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andProjectIdIsNull() { - addCriterion("project_id is null"); - return (Criteria) this; - } - - public Criteria andProjectIdIsNotNull() { - addCriterion("project_id is not null"); - return (Criteria) this; - } - - public Criteria andProjectIdEqualTo(Long value) { - addCriterion("project_id =", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotEqualTo(Long value) { - addCriterion("project_id <>", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThan(Long value) { - addCriterion("project_id >", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { - addCriterion("project_id >=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThan(Long value) { - addCriterion("project_id <", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdLessThanOrEqualTo(Long value) { - addCriterion("project_id <=", value, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdIn(List values) { - addCriterion("project_id in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotIn(List values) { - addCriterion("project_id not in", values, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdBetween(Long value1, Long value2) { - addCriterion("project_id between", value1, value2, "projectId"); - return (Criteria) this; - } - - public Criteria andProjectIdNotBetween(Long value1, Long value2) { - addCriterion("project_id not between", value1, value2, "projectId"); - return (Criteria) this; - } - - public Criteria andParentIdIsNull() { - addCriterion("parent_id is null"); - return (Criteria) this; - } - - public Criteria andParentIdIsNotNull() { - addCriterion("parent_id is not null"); - return (Criteria) this; - } - - public Criteria andParentIdEqualTo(Long value) { - addCriterion("parent_id =", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdNotEqualTo(Long value) { - addCriterion("parent_id <>", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdGreaterThan(Long value) { - addCriterion("parent_id >", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdGreaterThanOrEqualTo(Long value) { - addCriterion("parent_id >=", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdLessThan(Long value) { - addCriterion("parent_id <", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdLessThanOrEqualTo(Long value) { - addCriterion("parent_id <=", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdIn(List values) { - addCriterion("parent_id in", values, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdNotIn(List values) { - addCriterion("parent_id not in", values, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdBetween(Long value1, Long value2) { - addCriterion("parent_id between", value1, value2, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdNotBetween(Long value1, Long value2) { - addCriterion("parent_id not between", value1, value2, "parentId"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andSequenceIsNull() { - addCriterion("sequence is null"); - return (Criteria) this; - } - - public Criteria andSequenceIsNotNull() { - addCriterion("sequence is not null"); - return (Criteria) this; - } - - public Criteria andSequenceEqualTo(Integer value) { - addCriterion("sequence =", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceNotEqualTo(Integer value) { - addCriterion("sequence <>", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceGreaterThan(Integer value) { - addCriterion("sequence >", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceGreaterThanOrEqualTo(Integer value) { - addCriterion("sequence >=", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceLessThan(Integer value) { - addCriterion("sequence <", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceLessThanOrEqualTo(Integer value) { - addCriterion("sequence <=", value, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceIn(List values) { - addCriterion("sequence in", values, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceNotIn(List values) { - addCriterion("sequence not in", values, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceBetween(Integer value1, Integer value2) { - addCriterion("sequence between", value1, value2, "sequence"); - return (Criteria) this; - } - - public Criteria andSequenceNotBetween(Integer value1, Integer value2) { - addCriterion("sequence not between", value1, value2, "sequence"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNull() { - addCriterion("created_at is null"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNotNull() { - addCriterion("created_at is not null"); - return (Criteria) this; - } - - public Criteria andCreatedAtEqualTo(Date value) { - addCriterion("created_at =", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotEqualTo(Date value) { - addCriterion("created_at <>", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThan(Date value) { - addCriterion("created_at >", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("created_at >=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThan(Date value) { - addCriterion("created_at <", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThanOrEqualTo(Date value) { - addCriterion("created_at <=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtIn(List values) { - addCriterion("created_at in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotIn(List values) { - addCriterion("created_at not in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtBetween(Date value1, Date value2) { - addCriterion("created_at between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotBetween(Date value1, Date value2) { - addCriterion("created_at not between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNull() { - addCriterion("updated_at is null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNotNull() { - addCriterion("updated_at is not null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtEqualTo(Date value) { - addCriterion("updated_at =", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotEqualTo(Date value) { - addCriterion("updated_at <>", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThan(Date value) { - addCriterion("updated_at >", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("updated_at >=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThan(Date value) { - addCriterion("updated_at <", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { - addCriterion("updated_at <=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIn(List values) { - addCriterion("updated_at in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotIn(List values) { - addCriterion("updated_at not in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtBetween(Date value1, Date value2) { - addCriterion("updated_at between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { - addCriterion("updated_at not between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNull() { - addCriterion("rec_status is null"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNotNull() { - addCriterion("rec_status is not null"); - return (Criteria) this; - } - - public Criteria andRecStatusEqualTo(Byte value) { - addCriterion("rec_status =", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotEqualTo(Byte value) { - addCriterion("rec_status <>", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThan(Byte value) { - addCriterion("rec_status >", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("rec_status >=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThan(Byte value) { - addCriterion("rec_status <", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThanOrEqualTo(Byte value) { - addCriterion("rec_status <=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusIn(List values) { - addCriterion("rec_status in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotIn(List values) { - addCriterion("rec_status not in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusBetween(Byte value1, Byte value2) { - addCriterion("rec_status between", value1, value2, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { - addCriterion("rec_status not between", value1, value2, "recStatus"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProRoleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProRoleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andSequenceIsNull() { + addCriterion("sequence is null"); + return (Criteria) this; + } + + public Criteria andSequenceIsNotNull() { + addCriterion("sequence is not null"); + return (Criteria) this; + } + + public Criteria andSequenceEqualTo(Integer value) { + addCriterion("sequence =", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotEqualTo(Integer value) { + addCriterion("sequence <>", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThan(Integer value) { + addCriterion("sequence >", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThanOrEqualTo(Integer value) { + addCriterion("sequence >=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThan(Integer value) { + addCriterion("sequence <", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThanOrEqualTo(Integer value) { + addCriterion("sequence <=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceIn(List values) { + addCriterion("sequence in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotIn(List values) { + addCriterion("sequence not in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceBetween(Integer value1, Integer value2) { + addCriterion("sequence between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotBetween(Integer value1, Integer value2) { + addCriterion("sequence not between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIsNull() { + addCriterion("relevance_project_id is null"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIsNotNull() { + addCriterion("relevance_project_id is not null"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdEqualTo(Long value) { + addCriterion("relevance_project_id =", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotEqualTo(Long value) { + addCriterion("relevance_project_id <>", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdGreaterThan(Long value) { + addCriterion("relevance_project_id >", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("relevance_project_id >=", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdLessThan(Long value) { + addCriterion("relevance_project_id <", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdLessThanOrEqualTo(Long value) { + addCriterion("relevance_project_id <=", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIn(List values) { + addCriterion("relevance_project_id in", values, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotIn(List values) { + addCriterion("relevance_project_id not in", values, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdBetween(Long value1, Long value2) { + addCriterion("relevance_project_id between", value1, value2, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotBetween(Long value1, Long value2) { + addCriterion("relevance_project_id not between", value1, value2, "relevanceProjectId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java index 87f44a95..1aed7e5f 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProShow.java @@ -16,12 +16,6 @@ public class ProShow implements Serializable { private Byte createTask; - private Date createdAt; - - private Date updatedAt; - - private Byte recStatus; - private String timeShow; private Byte duration; @@ -30,6 +24,20 @@ public class ProShow implements Serializable { private Byte selectTaskType; + private String detailPath; + + private Byte pimsNavType; + + private Byte shareChange; + + private String shareChangeCode; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + private static final long serialVersionUID = 1L; public Long getId() { @@ -80,30 +88,6 @@ public class ProShow implements Serializable { this.createTask = createTask; } - public Date getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Date createdAt) { - this.createdAt = createdAt; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - - public Byte getRecStatus() { - return recStatus; - } - - public void setRecStatus(Byte recStatus) { - this.recStatus = recStatus; - } - public String getTimeShow() { return timeShow; } @@ -136,6 +120,62 @@ public class ProShow implements Serializable { this.selectTaskType = selectTaskType; } + public String getDetailPath() { + return detailPath; + } + + public void setDetailPath(String detailPath) { + this.detailPath = detailPath == null ? null : detailPath.trim(); + } + + public Byte getPimsNavType() { + return pimsNavType; + } + + public void setPimsNavType(Byte pimsNavType) { + this.pimsNavType = pimsNavType; + } + + public Byte getShareChange() { + return shareChange; + } + + public void setShareChange(Byte shareChange) { + this.shareChange = shareChange; + } + + public String getShareChangeCode() { + return shareChangeCode; + } + + public void setShareChangeCode(String shareChangeCode) { + this.shareChangeCode = shareChangeCode == null ? null : shareChangeCode.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -148,13 +188,17 @@ public class ProShow implements Serializable { sb.append(", filter=").append(filter); sb.append(", isShowMvp=").append(isShowMvp); sb.append(", createTask=").append(createTask); - sb.append(", createdAt=").append(createdAt); - sb.append(", updatedAt=").append(updatedAt); - sb.append(", recStatus=").append(recStatus); sb.append(", timeShow=").append(timeShow); sb.append(", duration=").append(duration); sb.append(", showShortcuts=").append(showShortcuts); sb.append(", selectTaskType=").append(selectTaskType); + sb.append(", detailPath=").append(detailPath); + sb.append(", pimsNavType=").append(pimsNavType); + sb.append(", shareChange=").append(shareChange); + sb.append(", shareChangeCode=").append(shareChangeCode); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java index 81ecc10d..6295c28d 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProShowExample.java @@ -465,433 +465,693 @@ public class ProShowExample { return (Criteria) this; } - public Criteria andCreatedAtIsNull() { - addCriterion("created_at is null"); + public Criteria andTimeShowIsNull() { + addCriterion("time_show is null"); return (Criteria) this; } - public Criteria andCreatedAtIsNotNull() { - addCriterion("created_at is not null"); + public Criteria andTimeShowIsNotNull() { + addCriterion("time_show is not null"); return (Criteria) this; } - public Criteria andCreatedAtEqualTo(Date value) { - addCriterion("created_at =", value, "createdAt"); + public Criteria andTimeShowEqualTo(String value) { + addCriterion("time_show =", value, "timeShow"); return (Criteria) this; } - public Criteria andCreatedAtNotEqualTo(Date value) { - addCriterion("created_at <>", value, "createdAt"); + public Criteria andTimeShowNotEqualTo(String value) { + addCriterion("time_show <>", value, "timeShow"); return (Criteria) this; } - public Criteria andCreatedAtGreaterThan(Date value) { - addCriterion("created_at >", value, "createdAt"); + public Criteria andTimeShowGreaterThan(String value) { + addCriterion("time_show >", value, "timeShow"); return (Criteria) this; } - public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("created_at >=", value, "createdAt"); + public Criteria andTimeShowGreaterThanOrEqualTo(String value) { + addCriterion("time_show >=", value, "timeShow"); return (Criteria) this; } - public Criteria andCreatedAtLessThan(Date value) { - addCriterion("created_at <", value, "createdAt"); + public Criteria andTimeShowLessThan(String value) { + addCriterion("time_show <", value, "timeShow"); return (Criteria) this; } - public Criteria andCreatedAtLessThanOrEqualTo(Date value) { - addCriterion("created_at <=", value, "createdAt"); + public Criteria andTimeShowLessThanOrEqualTo(String value) { + addCriterion("time_show <=", value, "timeShow"); return (Criteria) this; } - public Criteria andCreatedAtIn(List values) { - addCriterion("created_at in", values, "createdAt"); + public Criteria andTimeShowLike(String value) { + addCriterion("time_show like", value, "timeShow"); return (Criteria) this; } - public Criteria andCreatedAtNotIn(List values) { - addCriterion("created_at not in", values, "createdAt"); + public Criteria andTimeShowNotLike(String value) { + addCriterion("time_show not like", value, "timeShow"); return (Criteria) this; } - public Criteria andCreatedAtBetween(Date value1, Date value2) { - addCriterion("created_at between", value1, value2, "createdAt"); + public Criteria andTimeShowIn(List values) { + addCriterion("time_show in", values, "timeShow"); return (Criteria) this; } - public Criteria andCreatedAtNotBetween(Date value1, Date value2) { - addCriterion("created_at not between", value1, value2, "createdAt"); + public Criteria andTimeShowNotIn(List values) { + addCriterion("time_show not in", values, "timeShow"); return (Criteria) this; } - public Criteria andUpdatedAtIsNull() { - addCriterion("updated_at is null"); + public Criteria andTimeShowBetween(String value1, String value2) { + addCriterion("time_show between", value1, value2, "timeShow"); return (Criteria) this; } - public Criteria andUpdatedAtIsNotNull() { - addCriterion("updated_at is not null"); + public Criteria andTimeShowNotBetween(String value1, String value2) { + addCriterion("time_show not between", value1, value2, "timeShow"); return (Criteria) this; } - public Criteria andUpdatedAtEqualTo(Date value) { - addCriterion("updated_at =", value, "updatedAt"); + public Criteria andDurationIsNull() { + addCriterion("duration is null"); return (Criteria) this; } - public Criteria andUpdatedAtNotEqualTo(Date value) { - addCriterion("updated_at <>", value, "updatedAt"); + public Criteria andDurationIsNotNull() { + addCriterion("duration is not null"); return (Criteria) this; } - public Criteria andUpdatedAtGreaterThan(Date value) { - addCriterion("updated_at >", value, "updatedAt"); + public Criteria andDurationEqualTo(Byte value) { + addCriterion("duration =", value, "duration"); return (Criteria) this; } - public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("updated_at >=", value, "updatedAt"); + public Criteria andDurationNotEqualTo(Byte value) { + addCriterion("duration <>", value, "duration"); return (Criteria) this; } - public Criteria andUpdatedAtLessThan(Date value) { - addCriterion("updated_at <", value, "updatedAt"); + public Criteria andDurationGreaterThan(Byte value) { + addCriterion("duration >", value, "duration"); return (Criteria) this; } - public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { - addCriterion("updated_at <=", value, "updatedAt"); + public Criteria andDurationGreaterThanOrEqualTo(Byte value) { + addCriterion("duration >=", value, "duration"); return (Criteria) this; } - public Criteria andUpdatedAtIn(List values) { - addCriterion("updated_at in", values, "updatedAt"); + public Criteria andDurationLessThan(Byte value) { + addCriterion("duration <", value, "duration"); return (Criteria) this; } - public Criteria andUpdatedAtNotIn(List values) { - addCriterion("updated_at not in", values, "updatedAt"); + public Criteria andDurationLessThanOrEqualTo(Byte value) { + addCriterion("duration <=", value, "duration"); return (Criteria) this; } - public Criteria andUpdatedAtBetween(Date value1, Date value2) { - addCriterion("updated_at between", value1, value2, "updatedAt"); + public Criteria andDurationIn(List values) { + addCriterion("duration in", values, "duration"); return (Criteria) this; } - public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { - addCriterion("updated_at not between", value1, value2, "updatedAt"); + public Criteria andDurationNotIn(List values) { + addCriterion("duration not in", values, "duration"); return (Criteria) this; } - public Criteria andRecStatusIsNull() { - addCriterion("rec_status is null"); + public Criteria andDurationBetween(Byte value1, Byte value2) { + addCriterion("duration between", value1, value2, "duration"); return (Criteria) this; } - public Criteria andRecStatusIsNotNull() { - addCriterion("rec_status is not null"); + public Criteria andDurationNotBetween(Byte value1, Byte value2) { + addCriterion("duration not between", value1, value2, "duration"); return (Criteria) this; } - public Criteria andRecStatusEqualTo(Byte value) { - addCriterion("rec_status =", value, "recStatus"); + public Criteria andShowShortcutsIsNull() { + addCriterion("show_shortcuts is null"); return (Criteria) this; } - public Criteria andRecStatusNotEqualTo(Byte value) { - addCriterion("rec_status <>", value, "recStatus"); + public Criteria andShowShortcutsIsNotNull() { + addCriterion("show_shortcuts is not null"); return (Criteria) this; } - public Criteria andRecStatusGreaterThan(Byte value) { - addCriterion("rec_status >", value, "recStatus"); + public Criteria andShowShortcutsEqualTo(Byte value) { + addCriterion("show_shortcuts =", value, "showShortcuts"); return (Criteria) this; } - public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("rec_status >=", value, "recStatus"); + public Criteria andShowShortcutsNotEqualTo(Byte value) { + addCriterion("show_shortcuts <>", value, "showShortcuts"); return (Criteria) this; } - public Criteria andRecStatusLessThan(Byte value) { - addCriterion("rec_status <", value, "recStatus"); + public Criteria andShowShortcutsGreaterThan(Byte value) { + addCriterion("show_shortcuts >", value, "showShortcuts"); return (Criteria) this; } - public Criteria andRecStatusLessThanOrEqualTo(Byte value) { - addCriterion("rec_status <=", value, "recStatus"); + public Criteria andShowShortcutsGreaterThanOrEqualTo(Byte value) { + addCriterion("show_shortcuts >=", value, "showShortcuts"); return (Criteria) this; } - public Criteria andRecStatusIn(List values) { - addCriterion("rec_status in", values, "recStatus"); + public Criteria andShowShortcutsLessThan(Byte value) { + addCriterion("show_shortcuts <", value, "showShortcuts"); return (Criteria) this; } - public Criteria andRecStatusNotIn(List values) { - addCriterion("rec_status not in", values, "recStatus"); + public Criteria andShowShortcutsLessThanOrEqualTo(Byte value) { + addCriterion("show_shortcuts <=", value, "showShortcuts"); return (Criteria) this; } - public Criteria andRecStatusBetween(Byte value1, Byte value2) { - addCriterion("rec_status between", value1, value2, "recStatus"); + public Criteria andShowShortcutsIn(List values) { + addCriterion("show_shortcuts in", values, "showShortcuts"); return (Criteria) this; } - public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { - addCriterion("rec_status not between", value1, value2, "recStatus"); + public Criteria andShowShortcutsNotIn(List values) { + addCriterion("show_shortcuts not in", values, "showShortcuts"); return (Criteria) this; } - public Criteria andTimeShowIsNull() { - addCriterion("time_show is null"); + public Criteria andShowShortcutsBetween(Byte value1, Byte value2) { + addCriterion("show_shortcuts between", value1, value2, "showShortcuts"); return (Criteria) this; } - public Criteria andTimeShowIsNotNull() { - addCriterion("time_show is not null"); + public Criteria andShowShortcutsNotBetween(Byte value1, Byte value2) { + addCriterion("show_shortcuts not between", value1, value2, "showShortcuts"); return (Criteria) this; } - public Criteria andTimeShowEqualTo(String value) { - addCriterion("time_show =", value, "timeShow"); + public Criteria andSelectTaskTypeIsNull() { + addCriterion("select_task_type is null"); return (Criteria) this; } - public Criteria andTimeShowNotEqualTo(String value) { - addCriterion("time_show <>", value, "timeShow"); + public Criteria andSelectTaskTypeIsNotNull() { + addCriterion("select_task_type is not null"); return (Criteria) this; } - public Criteria andTimeShowGreaterThan(String value) { - addCriterion("time_show >", value, "timeShow"); + public Criteria andSelectTaskTypeEqualTo(Byte value) { + addCriterion("select_task_type =", value, "selectTaskType"); return (Criteria) this; } - public Criteria andTimeShowGreaterThanOrEqualTo(String value) { - addCriterion("time_show >=", value, "timeShow"); + public Criteria andSelectTaskTypeNotEqualTo(Byte value) { + addCriterion("select_task_type <>", value, "selectTaskType"); return (Criteria) this; } - public Criteria andTimeShowLessThan(String value) { - addCriterion("time_show <", value, "timeShow"); + public Criteria andSelectTaskTypeGreaterThan(Byte value) { + addCriterion("select_task_type >", value, "selectTaskType"); return (Criteria) this; } - public Criteria andTimeShowLessThanOrEqualTo(String value) { - addCriterion("time_show <=", value, "timeShow"); + public Criteria andSelectTaskTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("select_task_type >=", value, "selectTaskType"); return (Criteria) this; } - public Criteria andTimeShowLike(String value) { - addCriterion("time_show like", value, "timeShow"); + public Criteria andSelectTaskTypeLessThan(Byte value) { + addCriterion("select_task_type <", value, "selectTaskType"); return (Criteria) this; } - public Criteria andTimeShowNotLike(String value) { - addCriterion("time_show not like", value, "timeShow"); + public Criteria andSelectTaskTypeLessThanOrEqualTo(Byte value) { + addCriterion("select_task_type <=", value, "selectTaskType"); return (Criteria) this; } - public Criteria andTimeShowIn(List values) { - addCriterion("time_show in", values, "timeShow"); + public Criteria andSelectTaskTypeIn(List values) { + addCriterion("select_task_type in", values, "selectTaskType"); return (Criteria) this; } - public Criteria andTimeShowNotIn(List values) { - addCriterion("time_show not in", values, "timeShow"); + public Criteria andSelectTaskTypeNotIn(List values) { + addCriterion("select_task_type not in", values, "selectTaskType"); return (Criteria) this; } - public Criteria andTimeShowBetween(String value1, String value2) { - addCriterion("time_show between", value1, value2, "timeShow"); + public Criteria andSelectTaskTypeBetween(Byte value1, Byte value2) { + addCriterion("select_task_type between", value1, value2, "selectTaskType"); return (Criteria) this; } - public Criteria andTimeShowNotBetween(String value1, String value2) { - addCriterion("time_show not between", value1, value2, "timeShow"); + public Criteria andSelectTaskTypeNotBetween(Byte value1, Byte value2) { + addCriterion("select_task_type not between", value1, value2, "selectTaskType"); return (Criteria) this; } - public Criteria andDurationIsNull() { - addCriterion("duration is null"); + public Criteria andDetailPathIsNull() { + addCriterion("detail_path is null"); return (Criteria) this; } - public Criteria andDurationIsNotNull() { - addCriterion("duration is not null"); + public Criteria andDetailPathIsNotNull() { + addCriterion("detail_path is not null"); return (Criteria) this; } - public Criteria andDurationEqualTo(Byte value) { - addCriterion("duration =", value, "duration"); + public Criteria andDetailPathEqualTo(String value) { + addCriterion("detail_path =", value, "detailPath"); return (Criteria) this; } - public Criteria andDurationNotEqualTo(Byte value) { - addCriterion("duration <>", value, "duration"); + public Criteria andDetailPathNotEqualTo(String value) { + addCriterion("detail_path <>", value, "detailPath"); return (Criteria) this; } - public Criteria andDurationGreaterThan(Byte value) { - addCriterion("duration >", value, "duration"); + public Criteria andDetailPathGreaterThan(String value) { + addCriterion("detail_path >", value, "detailPath"); return (Criteria) this; } - public Criteria andDurationGreaterThanOrEqualTo(Byte value) { - addCriterion("duration >=", value, "duration"); + public Criteria andDetailPathGreaterThanOrEqualTo(String value) { + addCriterion("detail_path >=", value, "detailPath"); return (Criteria) this; } - public Criteria andDurationLessThan(Byte value) { - addCriterion("duration <", value, "duration"); + public Criteria andDetailPathLessThan(String value) { + addCriterion("detail_path <", value, "detailPath"); return (Criteria) this; } - public Criteria andDurationLessThanOrEqualTo(Byte value) { - addCriterion("duration <=", value, "duration"); + public Criteria andDetailPathLessThanOrEqualTo(String value) { + addCriterion("detail_path <=", value, "detailPath"); return (Criteria) this; } - public Criteria andDurationIn(List values) { - addCriterion("duration in", values, "duration"); + public Criteria andDetailPathLike(String value) { + addCriterion("detail_path like", value, "detailPath"); return (Criteria) this; } - public Criteria andDurationNotIn(List values) { - addCriterion("duration not in", values, "duration"); + public Criteria andDetailPathNotLike(String value) { + addCriterion("detail_path not like", value, "detailPath"); return (Criteria) this; } - public Criteria andDurationBetween(Byte value1, Byte value2) { - addCriterion("duration between", value1, value2, "duration"); + public Criteria andDetailPathIn(List values) { + addCriterion("detail_path in", values, "detailPath"); return (Criteria) this; } - public Criteria andDurationNotBetween(Byte value1, Byte value2) { - addCriterion("duration not between", value1, value2, "duration"); + public Criteria andDetailPathNotIn(List values) { + addCriterion("detail_path not in", values, "detailPath"); return (Criteria) this; } - public Criteria andShowShortcutsIsNull() { - addCriterion("show_shortcuts is null"); + public Criteria andDetailPathBetween(String value1, String value2) { + addCriterion("detail_path between", value1, value2, "detailPath"); return (Criteria) this; } - public Criteria andShowShortcutsIsNotNull() { - addCriterion("show_shortcuts is not null"); + public Criteria andDetailPathNotBetween(String value1, String value2) { + addCriterion("detail_path not between", value1, value2, "detailPath"); return (Criteria) this; } - public Criteria andShowShortcutsEqualTo(Byte value) { - addCriterion("show_shortcuts =", value, "showShortcuts"); + public Criteria andPimsNavTypeIsNull() { + addCriterion("pims_nav_type is null"); return (Criteria) this; } - public Criteria andShowShortcutsNotEqualTo(Byte value) { - addCriterion("show_shortcuts <>", value, "showShortcuts"); + public Criteria andPimsNavTypeIsNotNull() { + addCriterion("pims_nav_type is not null"); return (Criteria) this; } - public Criteria andShowShortcutsGreaterThan(Byte value) { - addCriterion("show_shortcuts >", value, "showShortcuts"); + public Criteria andPimsNavTypeEqualTo(Byte value) { + addCriterion("pims_nav_type =", value, "pimsNavType"); return (Criteria) this; } - public Criteria andShowShortcutsGreaterThanOrEqualTo(Byte value) { - addCriterion("show_shortcuts >=", value, "showShortcuts"); + public Criteria andPimsNavTypeNotEqualTo(Byte value) { + addCriterion("pims_nav_type <>", value, "pimsNavType"); return (Criteria) this; } - public Criteria andShowShortcutsLessThan(Byte value) { - addCriterion("show_shortcuts <", value, "showShortcuts"); + public Criteria andPimsNavTypeGreaterThan(Byte value) { + addCriterion("pims_nav_type >", value, "pimsNavType"); return (Criteria) this; } - public Criteria andShowShortcutsLessThanOrEqualTo(Byte value) { - addCriterion("show_shortcuts <=", value, "showShortcuts"); + public Criteria andPimsNavTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("pims_nav_type >=", value, "pimsNavType"); return (Criteria) this; } - public Criteria andShowShortcutsIn(List values) { - addCriterion("show_shortcuts in", values, "showShortcuts"); + public Criteria andPimsNavTypeLessThan(Byte value) { + addCriterion("pims_nav_type <", value, "pimsNavType"); return (Criteria) this; } - public Criteria andShowShortcutsNotIn(List values) { - addCriterion("show_shortcuts not in", values, "showShortcuts"); + public Criteria andPimsNavTypeLessThanOrEqualTo(Byte value) { + addCriterion("pims_nav_type <=", value, "pimsNavType"); return (Criteria) this; } - public Criteria andShowShortcutsBetween(Byte value1, Byte value2) { - addCriterion("show_shortcuts between", value1, value2, "showShortcuts"); + public Criteria andPimsNavTypeIn(List values) { + addCriterion("pims_nav_type in", values, "pimsNavType"); return (Criteria) this; } - public Criteria andShowShortcutsNotBetween(Byte value1, Byte value2) { - addCriterion("show_shortcuts not between", value1, value2, "showShortcuts"); + public Criteria andPimsNavTypeNotIn(List values) { + addCriterion("pims_nav_type not in", values, "pimsNavType"); return (Criteria) this; } - public Criteria andSelectTaskTypeIsNull() { - addCriterion("select_task_type is null"); + public Criteria andPimsNavTypeBetween(Byte value1, Byte value2) { + addCriterion("pims_nav_type between", value1, value2, "pimsNavType"); return (Criteria) this; } - public Criteria andSelectTaskTypeIsNotNull() { - addCriterion("select_task_type is not null"); + public Criteria andPimsNavTypeNotBetween(Byte value1, Byte value2) { + addCriterion("pims_nav_type not between", value1, value2, "pimsNavType"); return (Criteria) this; } - public Criteria andSelectTaskTypeEqualTo(Byte value) { - addCriterion("select_task_type =", value, "selectTaskType"); + public Criteria andShareChangeIsNull() { + addCriterion("share_change is null"); return (Criteria) this; } - public Criteria andSelectTaskTypeNotEqualTo(Byte value) { - addCriterion("select_task_type <>", value, "selectTaskType"); + public Criteria andShareChangeIsNotNull() { + addCriterion("share_change is not null"); return (Criteria) this; } - public Criteria andSelectTaskTypeGreaterThan(Byte value) { - addCriterion("select_task_type >", value, "selectTaskType"); + public Criteria andShareChangeEqualTo(Byte value) { + addCriterion("share_change =", value, "shareChange"); return (Criteria) this; } - public Criteria andSelectTaskTypeGreaterThanOrEqualTo(Byte value) { - addCriterion("select_task_type >=", value, "selectTaskType"); + public Criteria andShareChangeNotEqualTo(Byte value) { + addCriterion("share_change <>", value, "shareChange"); return (Criteria) this; } - public Criteria andSelectTaskTypeLessThan(Byte value) { - addCriterion("select_task_type <", value, "selectTaskType"); + public Criteria andShareChangeGreaterThan(Byte value) { + addCriterion("share_change >", value, "shareChange"); return (Criteria) this; } - public Criteria andSelectTaskTypeLessThanOrEqualTo(Byte value) { - addCriterion("select_task_type <=", value, "selectTaskType"); + public Criteria andShareChangeGreaterThanOrEqualTo(Byte value) { + addCriterion("share_change >=", value, "shareChange"); return (Criteria) this; } - public Criteria andSelectTaskTypeIn(List values) { - addCriterion("select_task_type in", values, "selectTaskType"); + public Criteria andShareChangeLessThan(Byte value) { + addCriterion("share_change <", value, "shareChange"); return (Criteria) this; } - public Criteria andSelectTaskTypeNotIn(List values) { - addCriterion("select_task_type not in", values, "selectTaskType"); + public Criteria andShareChangeLessThanOrEqualTo(Byte value) { + addCriterion("share_change <=", value, "shareChange"); return (Criteria) this; } - public Criteria andSelectTaskTypeBetween(Byte value1, Byte value2) { - addCriterion("select_task_type between", value1, value2, "selectTaskType"); + public Criteria andShareChangeIn(List values) { + addCriterion("share_change in", values, "shareChange"); return (Criteria) this; } - public Criteria andSelectTaskTypeNotBetween(Byte value1, Byte value2) { - addCriterion("select_task_type not between", value1, value2, "selectTaskType"); + public Criteria andShareChangeNotIn(List values) { + addCriterion("share_change not in", values, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeBetween(Byte value1, Byte value2) { + addCriterion("share_change between", value1, value2, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeNotBetween(Byte value1, Byte value2) { + addCriterion("share_change not between", value1, value2, "shareChange"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeIsNull() { + addCriterion("share_change_code is null"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeIsNotNull() { + addCriterion("share_change_code is not null"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeEqualTo(String value) { + addCriterion("share_change_code =", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeNotEqualTo(String value) { + addCriterion("share_change_code <>", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeGreaterThan(String value) { + addCriterion("share_change_code >", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeGreaterThanOrEqualTo(String value) { + addCriterion("share_change_code >=", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeLessThan(String value) { + addCriterion("share_change_code <", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeLessThanOrEqualTo(String value) { + addCriterion("share_change_code <=", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeLike(String value) { + addCriterion("share_change_code like", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeNotLike(String value) { + addCriterion("share_change_code not like", value, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeIn(List values) { + addCriterion("share_change_code in", values, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeNotIn(List values) { + addCriterion("share_change_code not in", values, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeBetween(String value1, String value2) { + addCriterion("share_change_code between", value1, value2, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andShareChangeCodeNotBetween(String value1, String value2) { + addCriterion("share_change_code not between", value1, value2, "shareChangeCode"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); return (Criteria) this; } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogChecker.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogChecker.java index fe347039..73fdd4e2 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogChecker.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogChecker.java @@ -1,106 +1,117 @@ -package com.ccsens.tall.bean.po; - -import java.io.Serializable; -import java.util.Date; - -public class ProTaskDeliverPostLogChecker implements Serializable { - private Long id; - - private Long deliverPostLogId; - - private Long checkerId; - - private String remark; - - private Integer checkStatus; - - private Date createdAt; - - private Date updatedAt; - - private Byte recStatus; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getDeliverPostLogId() { - return deliverPostLogId; - } - - public void setDeliverPostLogId(Long deliverPostLogId) { - this.deliverPostLogId = deliverPostLogId; - } - - public Long getCheckerId() { - return checkerId; - } - - public void setCheckerId(Long checkerId) { - this.checkerId = checkerId; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark == null ? null : remark.trim(); - } - - public Integer getCheckStatus() { - return checkStatus; - } - - public void setCheckStatus(Integer checkStatus) { - this.checkStatus = checkStatus; - } - - public Date getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Date createdAt) { - this.createdAt = createdAt; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - - public Byte getRecStatus() { - return recStatus; - } - - public void setRecStatus(Byte recStatus) { - this.recStatus = recStatus; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", deliverPostLogId=").append(deliverPostLogId); - sb.append(", checkerId=").append(checkerId); - sb.append(", remark=").append(remark); - sb.append(", checkStatus=").append(checkStatus); - sb.append(", createdAt=").append(createdAt); - sb.append(", updatedAt=").append(updatedAt); - sb.append(", recStatus=").append(recStatus); - sb.append("]"); - return sb.toString(); - } +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProTaskDeliverPostLogChecker implements Serializable { + private Long id; + + private Long deliverPostLogId; + + private Long checkerId; + + private String remark; + + private Integer checkStatus; + + private Integer score; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getDeliverPostLogId() { + return deliverPostLogId; + } + + public void setDeliverPostLogId(Long deliverPostLogId) { + this.deliverPostLogId = deliverPostLogId; + } + + public Long getCheckerId() { + return checkerId; + } + + public void setCheckerId(Long checkerId) { + this.checkerId = checkerId; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Integer getCheckStatus() { + return checkStatus; + } + + public void setCheckStatus(Integer checkStatus) { + this.checkStatus = checkStatus; + } + + public Integer getScore() { + return score; + } + + public void setScore(Integer score) { + this.score = score; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", deliverPostLogId=").append(deliverPostLogId); + sb.append(", checkerId=").append(checkerId); + sb.append(", remark=").append(remark); + sb.append(", checkStatus=").append(checkStatus); + sb.append(", score=").append(score); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogCheckerExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogCheckerExample.java index 07f26c34..5bf14536 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogCheckerExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDeliverPostLogCheckerExample.java @@ -1,691 +1,751 @@ -package com.ccsens.tall.bean.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class ProTaskDeliverPostLogCheckerExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ProTaskDeliverPostLogCheckerExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdIsNull() { - addCriterion("deliver_post_log_id is null"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdIsNotNull() { - addCriterion("deliver_post_log_id is not null"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdEqualTo(Long value) { - addCriterion("deliver_post_log_id =", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdNotEqualTo(Long value) { - addCriterion("deliver_post_log_id <>", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdGreaterThan(Long value) { - addCriterion("deliver_post_log_id >", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdGreaterThanOrEqualTo(Long value) { - addCriterion("deliver_post_log_id >=", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdLessThan(Long value) { - addCriterion("deliver_post_log_id <", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdLessThanOrEqualTo(Long value) { - addCriterion("deliver_post_log_id <=", value, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdIn(List values) { - addCriterion("deliver_post_log_id in", values, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdNotIn(List values) { - addCriterion("deliver_post_log_id not in", values, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdBetween(Long value1, Long value2) { - addCriterion("deliver_post_log_id between", value1, value2, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andDeliverPostLogIdNotBetween(Long value1, Long value2) { - addCriterion("deliver_post_log_id not between", value1, value2, "deliverPostLogId"); - return (Criteria) this; - } - - public Criteria andCheckerIdIsNull() { - addCriterion("checker_id is null"); - return (Criteria) this; - } - - public Criteria andCheckerIdIsNotNull() { - addCriterion("checker_id is not null"); - return (Criteria) this; - } - - public Criteria andCheckerIdEqualTo(Long value) { - addCriterion("checker_id =", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdNotEqualTo(Long value) { - addCriterion("checker_id <>", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdGreaterThan(Long value) { - addCriterion("checker_id >", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdGreaterThanOrEqualTo(Long value) { - addCriterion("checker_id >=", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdLessThan(Long value) { - addCriterion("checker_id <", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdLessThanOrEqualTo(Long value) { - addCriterion("checker_id <=", value, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdIn(List values) { - addCriterion("checker_id in", values, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdNotIn(List values) { - addCriterion("checker_id not in", values, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdBetween(Long value1, Long value2) { - addCriterion("checker_id between", value1, value2, "checkerId"); - return (Criteria) this; - } - - public Criteria andCheckerIdNotBetween(Long value1, Long value2) { - addCriterion("checker_id not between", value1, value2, "checkerId"); - return (Criteria) this; - } - - public Criteria andRemarkIsNull() { - addCriterion("remark is null"); - return (Criteria) this; - } - - public Criteria andRemarkIsNotNull() { - addCriterion("remark is not null"); - return (Criteria) this; - } - - public Criteria andRemarkEqualTo(String value) { - addCriterion("remark =", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotEqualTo(String value) { - addCriterion("remark <>", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkGreaterThan(String value) { - addCriterion("remark >", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkGreaterThanOrEqualTo(String value) { - addCriterion("remark >=", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkLessThan(String value) { - addCriterion("remark <", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkLessThanOrEqualTo(String value) { - addCriterion("remark <=", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkLike(String value) { - addCriterion("remark like", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotLike(String value) { - addCriterion("remark not like", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkIn(List values) { - addCriterion("remark in", values, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotIn(List values) { - addCriterion("remark not in", values, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkBetween(String value1, String value2) { - addCriterion("remark between", value1, value2, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotBetween(String value1, String value2) { - addCriterion("remark not between", value1, value2, "remark"); - return (Criteria) this; - } - - public Criteria andCheckStatusIsNull() { - addCriterion("check_status is null"); - return (Criteria) this; - } - - public Criteria andCheckStatusIsNotNull() { - addCriterion("check_status is not null"); - return (Criteria) this; - } - - public Criteria andCheckStatusEqualTo(Integer value) { - addCriterion("check_status =", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusNotEqualTo(Integer value) { - addCriterion("check_status <>", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusGreaterThan(Integer value) { - addCriterion("check_status >", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusGreaterThanOrEqualTo(Integer value) { - addCriterion("check_status >=", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusLessThan(Integer value) { - addCriterion("check_status <", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusLessThanOrEqualTo(Integer value) { - addCriterion("check_status <=", value, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusIn(List values) { - addCriterion("check_status in", values, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusNotIn(List values) { - addCriterion("check_status not in", values, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusBetween(Integer value1, Integer value2) { - addCriterion("check_status between", value1, value2, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCheckStatusNotBetween(Integer value1, Integer value2) { - addCriterion("check_status not between", value1, value2, "checkStatus"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNull() { - addCriterion("created_at is null"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNotNull() { - addCriterion("created_at is not null"); - return (Criteria) this; - } - - public Criteria andCreatedAtEqualTo(Date value) { - addCriterion("created_at =", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotEqualTo(Date value) { - addCriterion("created_at <>", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThan(Date value) { - addCriterion("created_at >", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("created_at >=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThan(Date value) { - addCriterion("created_at <", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThanOrEqualTo(Date value) { - addCriterion("created_at <=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtIn(List values) { - addCriterion("created_at in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotIn(List values) { - addCriterion("created_at not in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtBetween(Date value1, Date value2) { - addCriterion("created_at between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotBetween(Date value1, Date value2) { - addCriterion("created_at not between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNull() { - addCriterion("updated_at is null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNotNull() { - addCriterion("updated_at is not null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtEqualTo(Date value) { - addCriterion("updated_at =", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotEqualTo(Date value) { - addCriterion("updated_at <>", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThan(Date value) { - addCriterion("updated_at >", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("updated_at >=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThan(Date value) { - addCriterion("updated_at <", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { - addCriterion("updated_at <=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIn(List values) { - addCriterion("updated_at in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotIn(List values) { - addCriterion("updated_at not in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtBetween(Date value1, Date value2) { - addCriterion("updated_at between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { - addCriterion("updated_at not between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNull() { - addCriterion("rec_status is null"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNotNull() { - addCriterion("rec_status is not null"); - return (Criteria) this; - } - - public Criteria andRecStatusEqualTo(Byte value) { - addCriterion("rec_status =", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotEqualTo(Byte value) { - addCriterion("rec_status <>", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThan(Byte value) { - addCriterion("rec_status >", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("rec_status >=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThan(Byte value) { - addCriterion("rec_status <", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThanOrEqualTo(Byte value) { - addCriterion("rec_status <=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusIn(List values) { - addCriterion("rec_status in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotIn(List values) { - addCriterion("rec_status not in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusBetween(Byte value1, Byte value2) { - addCriterion("rec_status between", value1, value2, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { - addCriterion("rec_status not between", value1, value2, "recStatus"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProTaskDeliverPostLogCheckerExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProTaskDeliverPostLogCheckerExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdIsNull() { + addCriterion("deliver_post_log_id is null"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdIsNotNull() { + addCriterion("deliver_post_log_id is not null"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdEqualTo(Long value) { + addCriterion("deliver_post_log_id =", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdNotEqualTo(Long value) { + addCriterion("deliver_post_log_id <>", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdGreaterThan(Long value) { + addCriterion("deliver_post_log_id >", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdGreaterThanOrEqualTo(Long value) { + addCriterion("deliver_post_log_id >=", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdLessThan(Long value) { + addCriterion("deliver_post_log_id <", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdLessThanOrEqualTo(Long value) { + addCriterion("deliver_post_log_id <=", value, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdIn(List values) { + addCriterion("deliver_post_log_id in", values, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdNotIn(List values) { + addCriterion("deliver_post_log_id not in", values, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdBetween(Long value1, Long value2) { + addCriterion("deliver_post_log_id between", value1, value2, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andDeliverPostLogIdNotBetween(Long value1, Long value2) { + addCriterion("deliver_post_log_id not between", value1, value2, "deliverPostLogId"); + return (Criteria) this; + } + + public Criteria andCheckerIdIsNull() { + addCriterion("checker_id is null"); + return (Criteria) this; + } + + public Criteria andCheckerIdIsNotNull() { + addCriterion("checker_id is not null"); + return (Criteria) this; + } + + public Criteria andCheckerIdEqualTo(Long value) { + addCriterion("checker_id =", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdNotEqualTo(Long value) { + addCriterion("checker_id <>", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdGreaterThan(Long value) { + addCriterion("checker_id >", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdGreaterThanOrEqualTo(Long value) { + addCriterion("checker_id >=", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdLessThan(Long value) { + addCriterion("checker_id <", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdLessThanOrEqualTo(Long value) { + addCriterion("checker_id <=", value, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdIn(List values) { + addCriterion("checker_id in", values, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdNotIn(List values) { + addCriterion("checker_id not in", values, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdBetween(Long value1, Long value2) { + addCriterion("checker_id between", value1, value2, "checkerId"); + return (Criteria) this; + } + + public Criteria andCheckerIdNotBetween(Long value1, Long value2) { + addCriterion("checker_id not between", value1, value2, "checkerId"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andCheckStatusIsNull() { + addCriterion("check_status is null"); + return (Criteria) this; + } + + public Criteria andCheckStatusIsNotNull() { + addCriterion("check_status is not null"); + return (Criteria) this; + } + + public Criteria andCheckStatusEqualTo(Integer value) { + addCriterion("check_status =", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusNotEqualTo(Integer value) { + addCriterion("check_status <>", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusGreaterThan(Integer value) { + addCriterion("check_status >", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("check_status >=", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusLessThan(Integer value) { + addCriterion("check_status <", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusLessThanOrEqualTo(Integer value) { + addCriterion("check_status <=", value, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusIn(List values) { + addCriterion("check_status in", values, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusNotIn(List values) { + addCriterion("check_status not in", values, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusBetween(Integer value1, Integer value2) { + addCriterion("check_status between", value1, value2, "checkStatus"); + return (Criteria) this; + } + + public Criteria andCheckStatusNotBetween(Integer value1, Integer value2) { + addCriterion("check_status not between", value1, value2, "checkStatus"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Integer value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Integer value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Integer value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Integer value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Integer value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Integer value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Integer value1, Integer value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Integer value1, Integer value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java index 91736b43..e6be23b9 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java @@ -56,6 +56,10 @@ public class ProTaskDetail implements Serializable { private Byte recStatus; + private Byte priority; + + private Byte milestone; + private static final long serialVersionUID = 1L; public Long getId() { @@ -266,6 +270,22 @@ public class ProTaskDetail implements Serializable { this.recStatus = recStatus; } + public Byte getPriority() { + return priority; + } + + public void setPriority(Byte priority) { + this.priority = priority; + } + + public Byte getMilestone() { + return milestone; + } + + public void setMilestone(Byte milestone) { + this.milestone = milestone; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -298,6 +318,8 @@ public class ProTaskDetail implements Serializable { sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); + sb.append(", priority=").append(priority); + sb.append(", milestone=").append(milestone); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java index b2a280ea..203675e3 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java @@ -1714,6 +1714,126 @@ public class ProTaskDetailExample { addCriterion("rec_status not between", value1, value2, "recStatus"); return (Criteria) this; } + + public Criteria andPriorityIsNull() { + addCriterion("priority is null"); + return (Criteria) this; + } + + public Criteria andPriorityIsNotNull() { + addCriterion("priority is not null"); + return (Criteria) this; + } + + public Criteria andPriorityEqualTo(Byte value) { + addCriterion("priority =", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotEqualTo(Byte value) { + addCriterion("priority <>", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityGreaterThan(Byte value) { + addCriterion("priority >", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityGreaterThanOrEqualTo(Byte value) { + addCriterion("priority >=", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLessThan(Byte value) { + addCriterion("priority <", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLessThanOrEqualTo(Byte value) { + addCriterion("priority <=", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityIn(List values) { + addCriterion("priority in", values, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotIn(List values) { + addCriterion("priority not in", values, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityBetween(Byte value1, Byte value2) { + addCriterion("priority between", value1, value2, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotBetween(Byte value1, Byte value2) { + addCriterion("priority not between", value1, value2, "priority"); + return (Criteria) this; + } + + public Criteria andMilestoneIsNull() { + addCriterion("milestone is null"); + return (Criteria) this; + } + + public Criteria andMilestoneIsNotNull() { + addCriterion("milestone is not null"); + return (Criteria) this; + } + + public Criteria andMilestoneEqualTo(Byte value) { + addCriterion("milestone =", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneNotEqualTo(Byte value) { + addCriterion("milestone <>", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneGreaterThan(Byte value) { + addCriterion("milestone >", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneGreaterThanOrEqualTo(Byte value) { + addCriterion("milestone >=", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneLessThan(Byte value) { + addCriterion("milestone <", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneLessThanOrEqualTo(Byte value) { + addCriterion("milestone <=", value, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneIn(List values) { + addCriterion("milestone in", values, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneNotIn(List values) { + addCriterion("milestone not in", values, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneBetween(Byte value1, Byte value2) { + addCriterion("milestone between", value1, value2, "milestone"); + return (Criteria) this; + } + + public Criteria andMilestoneNotBetween(Byte value1, Byte value2) { + addCriterion("milestone not between", value1, value2, "milestone"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysDomain.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysDomain.java index a52df7a9..2b6f88ff 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysDomain.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysDomain.java @@ -10,6 +10,8 @@ public class SysDomain implements Serializable { private String logo; + private String logoPath; + private String companyName; private String systemName; @@ -32,6 +34,8 @@ public class SysDomain implements Serializable { private String foreverProjectId; + private Byte navigationBar; + private static final long serialVersionUID = 1L; public Long getId() { @@ -58,6 +62,14 @@ public class SysDomain implements Serializable { this.logo = logo == null ? null : logo.trim(); } + public String getLogoPath() { + return logoPath; + } + + public void setLogoPath(String logoPath) { + this.logoPath = logoPath == null ? null : logoPath.trim(); + } + public String getCompanyName() { return companyName; } @@ -146,6 +158,14 @@ public class SysDomain implements Serializable { this.foreverProjectId = foreverProjectId == null ? null : foreverProjectId.trim(); } + public Byte getNavigationBar() { + return navigationBar; + } + + public void setNavigationBar(Byte navigationBar) { + this.navigationBar = navigationBar; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -155,6 +175,7 @@ public class SysDomain implements Serializable { sb.append(", id=").append(id); sb.append(", domainName=").append(domainName); sb.append(", logo=").append(logo); + sb.append(", logoPath=").append(logoPath); sb.append(", companyName=").append(companyName); sb.append(", systemName=").append(systemName); sb.append(", backdropUrl=").append(backdropUrl); @@ -166,6 +187,7 @@ public class SysDomain implements Serializable { sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); sb.append(", foreverProjectId=").append(foreverProjectId); + sb.append(", navigationBar=").append(navigationBar); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysDomainExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysDomainExample.java index 11d52065..e100bac0 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysDomainExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysDomainExample.java @@ -305,6 +305,76 @@ public class SysDomainExample { return (Criteria) this; } + public Criteria andLogoPathIsNull() { + addCriterion("logo_path is null"); + return (Criteria) this; + } + + public Criteria andLogoPathIsNotNull() { + addCriterion("logo_path is not null"); + return (Criteria) this; + } + + public Criteria andLogoPathEqualTo(String value) { + addCriterion("logo_path =", value, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathNotEqualTo(String value) { + addCriterion("logo_path <>", value, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathGreaterThan(String value) { + addCriterion("logo_path >", value, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathGreaterThanOrEqualTo(String value) { + addCriterion("logo_path >=", value, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathLessThan(String value) { + addCriterion("logo_path <", value, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathLessThanOrEqualTo(String value) { + addCriterion("logo_path <=", value, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathLike(String value) { + addCriterion("logo_path like", value, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathNotLike(String value) { + addCriterion("logo_path not like", value, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathIn(List values) { + addCriterion("logo_path in", values, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathNotIn(List values) { + addCriterion("logo_path not in", values, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathBetween(String value1, String value2) { + addCriterion("logo_path between", value1, value2, "logoPath"); + return (Criteria) this; + } + + public Criteria andLogoPathNotBetween(String value1, String value2) { + addCriterion("logo_path not between", value1, value2, "logoPath"); + return (Criteria) this; + } + public Criteria andCompanyNameIsNull() { addCriterion("company_name is null"); return (Criteria) this; @@ -1024,6 +1094,66 @@ public class SysDomainExample { addCriterion("forever_project_id not between", value1, value2, "foreverProjectId"); return (Criteria) this; } + + public Criteria andNavigationBarIsNull() { + addCriterion("navigation_bar is null"); + return (Criteria) this; + } + + public Criteria andNavigationBarIsNotNull() { + addCriterion("navigation_bar is not null"); + return (Criteria) this; + } + + public Criteria andNavigationBarEqualTo(Byte value) { + addCriterion("navigation_bar =", value, "navigationBar"); + return (Criteria) this; + } + + public Criteria andNavigationBarNotEqualTo(Byte value) { + addCriterion("navigation_bar <>", value, "navigationBar"); + return (Criteria) this; + } + + public Criteria andNavigationBarGreaterThan(Byte value) { + addCriterion("navigation_bar >", value, "navigationBar"); + return (Criteria) this; + } + + public Criteria andNavigationBarGreaterThanOrEqualTo(Byte value) { + addCriterion("navigation_bar >=", value, "navigationBar"); + return (Criteria) this; + } + + public Criteria andNavigationBarLessThan(Byte value) { + addCriterion("navigation_bar <", value, "navigationBar"); + return (Criteria) this; + } + + public Criteria andNavigationBarLessThanOrEqualTo(Byte value) { + addCriterion("navigation_bar <=", value, "navigationBar"); + return (Criteria) this; + } + + public Criteria andNavigationBarIn(List values) { + addCriterion("navigation_bar in", values, "navigationBar"); + return (Criteria) this; + } + + public Criteria andNavigationBarNotIn(List values) { + addCriterion("navigation_bar not in", values, "navigationBar"); + return (Criteria) this; + } + + public Criteria andNavigationBarBetween(Byte value1, Byte value2) { + addCriterion("navigation_bar between", value1, value2, "navigationBar"); + return (Criteria) this; + } + + public Criteria andNavigationBarNotBetween(Byte value1, Byte value2) { + addCriterion("navigation_bar not between", value1, value2, "navigationBar"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysImitation.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysImitation.java new file mode 100644 index 00000000..295e9d67 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysImitation.java @@ -0,0 +1,95 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysImitation implements Serializable { + private Long id; + + private Long userId; + + private Long projectId; + + private Long roleId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", projectId=").append(projectId); + sb.append(", roleId=").append(roleId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysImitationExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysImitationExample.java new file mode 100644 index 00000000..ac32e0e2 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysImitationExample.java @@ -0,0 +1,621 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysImitationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysImitationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("role_id is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("role_id is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(Long value) { + addCriterion("role_id =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(Long value) { + addCriterion("role_id <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(Long value) { + addCriterion("role_id >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("role_id >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(Long value) { + addCriterion("role_id <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(Long value) { + addCriterion("role_id <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("role_id in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("role_id not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(Long value1, Long value2) { + addCriterion("role_id between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(Long value1, Long value2) { + addCriterion("role_id not between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java new file mode 100644 index 00000000..63e30b09 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java @@ -0,0 +1,128 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysLabel implements Serializable { + private Long id; + + private String name; + + private String code; + + private String color; + + private String description; + + private Byte level; + + private Long userId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color == null ? null : color.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Byte getLevel() { + return level; + } + + public void setLevel(Byte level) { + this.level = level; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", code=").append(code); + sb.append(", color=").append(color); + sb.append(", description=").append(description); + sb.append(", level=").append(level); + sb.append(", userId=").append(userId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java new file mode 100644 index 00000000..5abb17a5 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java @@ -0,0 +1,841 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysLabelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysLabelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andColorIsNull() { + addCriterion("color is null"); + return (Criteria) this; + } + + public Criteria andColorIsNotNull() { + addCriterion("color is not null"); + return (Criteria) this; + } + + public Criteria andColorEqualTo(String value) { + addCriterion("color =", value, "color"); + return (Criteria) this; + } + + public Criteria andColorNotEqualTo(String value) { + addCriterion("color <>", value, "color"); + return (Criteria) this; + } + + public Criteria andColorGreaterThan(String value) { + addCriterion("color >", value, "color"); + return (Criteria) this; + } + + public Criteria andColorGreaterThanOrEqualTo(String value) { + addCriterion("color >=", value, "color"); + return (Criteria) this; + } + + public Criteria andColorLessThan(String value) { + addCriterion("color <", value, "color"); + return (Criteria) this; + } + + public Criteria andColorLessThanOrEqualTo(String value) { + addCriterion("color <=", value, "color"); + return (Criteria) this; + } + + public Criteria andColorLike(String value) { + addCriterion("color like", value, "color"); + return (Criteria) this; + } + + public Criteria andColorNotLike(String value) { + addCriterion("color not like", value, "color"); + return (Criteria) this; + } + + public Criteria andColorIn(List values) { + addCriterion("color in", values, "color"); + return (Criteria) this; + } + + public Criteria andColorNotIn(List values) { + addCriterion("color not in", values, "color"); + return (Criteria) this; + } + + public Criteria andColorBetween(String value1, String value2) { + addCriterion("color between", value1, value2, "color"); + return (Criteria) this; + } + + public Criteria andColorNotBetween(String value1, String value2) { + addCriterion("color not between", value1, value2, "color"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andLevelIsNull() { + addCriterion("level is null"); + return (Criteria) this; + } + + public Criteria andLevelIsNotNull() { + addCriterion("level is not null"); + return (Criteria) this; + } + + public Criteria andLevelEqualTo(Byte value) { + addCriterion("level =", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotEqualTo(Byte value) { + addCriterion("level <>", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThan(Byte value) { + addCriterion("level >", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThanOrEqualTo(Byte value) { + addCriterion("level >=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThan(Byte value) { + addCriterion("level <", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThanOrEqualTo(Byte value) { + addCriterion("level <=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelIn(List values) { + addCriterion("level in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotIn(List values) { + addCriterion("level not in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelBetween(Byte value1, Byte value2) { + addCriterion("level between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotBetween(Byte value1, Byte value2) { + addCriterion("level not between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSend.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSend.java new file mode 100644 index 00000000..47919afd --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSend.java @@ -0,0 +1,150 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysMessageSend implements Serializable { + private Long id; + + private Long operationId; + + private Long receiverId; + + private Byte sendType; + + private Byte sendStatus; + + private Byte readStatus; + + private Byte initRead; + + private Long sendTime; + + private Byte complete; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getOperationId() { + return operationId; + } + + public void setOperationId(Long operationId) { + this.operationId = operationId; + } + + public Long getReceiverId() { + return receiverId; + } + + public void setReceiverId(Long receiverId) { + this.receiverId = receiverId; + } + + public Byte getSendType() { + return sendType; + } + + public void setSendType(Byte sendType) { + this.sendType = sendType; + } + + public Byte getSendStatus() { + return sendStatus; + } + + public void setSendStatus(Byte sendStatus) { + this.sendStatus = sendStatus; + } + + public Byte getReadStatus() { + return readStatus; + } + + public void setReadStatus(Byte readStatus) { + this.readStatus = readStatus; + } + + public Byte getInitRead() { + return initRead; + } + + public void setInitRead(Byte initRead) { + this.initRead = initRead; + } + + public Long getSendTime() { + return sendTime; + } + + public void setSendTime(Long sendTime) { + this.sendTime = sendTime; + } + + public Byte getComplete() { + return complete; + } + + public void setComplete(Byte complete) { + this.complete = complete; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", operationId=").append(operationId); + sb.append(", receiverId=").append(receiverId); + sb.append(", sendType=").append(sendType); + sb.append(", sendStatus=").append(sendStatus); + sb.append(", readStatus=").append(readStatus); + sb.append(", initRead=").append(initRead); + sb.append(", sendTime=").append(sendTime); + sb.append(", complete=").append(complete); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSendExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSendExample.java new file mode 100644 index 00000000..0d57d3cc --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysMessageSendExample.java @@ -0,0 +1,921 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysMessageSendExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysMessageSendExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andOperationIdIsNull() { + addCriterion("operation_id is null"); + return (Criteria) this; + } + + public Criteria andOperationIdIsNotNull() { + addCriterion("operation_id is not null"); + return (Criteria) this; + } + + public Criteria andOperationIdEqualTo(Long value) { + addCriterion("operation_id =", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdNotEqualTo(Long value) { + addCriterion("operation_id <>", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdGreaterThan(Long value) { + addCriterion("operation_id >", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdGreaterThanOrEqualTo(Long value) { + addCriterion("operation_id >=", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdLessThan(Long value) { + addCriterion("operation_id <", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdLessThanOrEqualTo(Long value) { + addCriterion("operation_id <=", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdIn(List values) { + addCriterion("operation_id in", values, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdNotIn(List values) { + addCriterion("operation_id not in", values, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdBetween(Long value1, Long value2) { + addCriterion("operation_id between", value1, value2, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdNotBetween(Long value1, Long value2) { + addCriterion("operation_id not between", value1, value2, "operationId"); + return (Criteria) this; + } + + public Criteria andReceiverIdIsNull() { + addCriterion("receiver_id is null"); + return (Criteria) this; + } + + public Criteria andReceiverIdIsNotNull() { + addCriterion("receiver_id is not null"); + return (Criteria) this; + } + + public Criteria andReceiverIdEqualTo(Long value) { + addCriterion("receiver_id =", value, "receiverId"); + return (Criteria) this; + } + + public Criteria andReceiverIdNotEqualTo(Long value) { + addCriterion("receiver_id <>", value, "receiverId"); + return (Criteria) this; + } + + public Criteria andReceiverIdGreaterThan(Long value) { + addCriterion("receiver_id >", value, "receiverId"); + return (Criteria) this; + } + + public Criteria andReceiverIdGreaterThanOrEqualTo(Long value) { + addCriterion("receiver_id >=", value, "receiverId"); + return (Criteria) this; + } + + public Criteria andReceiverIdLessThan(Long value) { + addCriterion("receiver_id <", value, "receiverId"); + return (Criteria) this; + } + + public Criteria andReceiverIdLessThanOrEqualTo(Long value) { + addCriterion("receiver_id <=", value, "receiverId"); + return (Criteria) this; + } + + public Criteria andReceiverIdIn(List values) { + addCriterion("receiver_id in", values, "receiverId"); + return (Criteria) this; + } + + public Criteria andReceiverIdNotIn(List values) { + addCriterion("receiver_id not in", values, "receiverId"); + return (Criteria) this; + } + + public Criteria andReceiverIdBetween(Long value1, Long value2) { + addCriterion("receiver_id between", value1, value2, "receiverId"); + return (Criteria) this; + } + + public Criteria andReceiverIdNotBetween(Long value1, Long value2) { + addCriterion("receiver_id not between", value1, value2, "receiverId"); + return (Criteria) this; + } + + public Criteria andSendTypeIsNull() { + addCriterion("send_type is null"); + return (Criteria) this; + } + + public Criteria andSendTypeIsNotNull() { + addCriterion("send_type is not null"); + return (Criteria) this; + } + + public Criteria andSendTypeEqualTo(Byte value) { + addCriterion("send_type =", value, "sendType"); + return (Criteria) this; + } + + public Criteria andSendTypeNotEqualTo(Byte value) { + addCriterion("send_type <>", value, "sendType"); + return (Criteria) this; + } + + public Criteria andSendTypeGreaterThan(Byte value) { + addCriterion("send_type >", value, "sendType"); + return (Criteria) this; + } + + public Criteria andSendTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("send_type >=", value, "sendType"); + return (Criteria) this; + } + + public Criteria andSendTypeLessThan(Byte value) { + addCriterion("send_type <", value, "sendType"); + return (Criteria) this; + } + + public Criteria andSendTypeLessThanOrEqualTo(Byte value) { + addCriterion("send_type <=", value, "sendType"); + return (Criteria) this; + } + + public Criteria andSendTypeIn(List values) { + addCriterion("send_type in", values, "sendType"); + return (Criteria) this; + } + + public Criteria andSendTypeNotIn(List values) { + addCriterion("send_type not in", values, "sendType"); + return (Criteria) this; + } + + public Criteria andSendTypeBetween(Byte value1, Byte value2) { + addCriterion("send_type between", value1, value2, "sendType"); + return (Criteria) this; + } + + public Criteria andSendTypeNotBetween(Byte value1, Byte value2) { + addCriterion("send_type not between", value1, value2, "sendType"); + return (Criteria) this; + } + + public Criteria andSendStatusIsNull() { + addCriterion("send_status is null"); + return (Criteria) this; + } + + public Criteria andSendStatusIsNotNull() { + addCriterion("send_status is not null"); + return (Criteria) this; + } + + public Criteria andSendStatusEqualTo(Byte value) { + addCriterion("send_status =", value, "sendStatus"); + return (Criteria) this; + } + + public Criteria andSendStatusNotEqualTo(Byte value) { + addCriterion("send_status <>", value, "sendStatus"); + return (Criteria) this; + } + + public Criteria andSendStatusGreaterThan(Byte value) { + addCriterion("send_status >", value, "sendStatus"); + return (Criteria) this; + } + + public Criteria andSendStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("send_status >=", value, "sendStatus"); + return (Criteria) this; + } + + public Criteria andSendStatusLessThan(Byte value) { + addCriterion("send_status <", value, "sendStatus"); + return (Criteria) this; + } + + public Criteria andSendStatusLessThanOrEqualTo(Byte value) { + addCriterion("send_status <=", value, "sendStatus"); + return (Criteria) this; + } + + public Criteria andSendStatusIn(List values) { + addCriterion("send_status in", values, "sendStatus"); + return (Criteria) this; + } + + public Criteria andSendStatusNotIn(List values) { + addCriterion("send_status not in", values, "sendStatus"); + return (Criteria) this; + } + + public Criteria andSendStatusBetween(Byte value1, Byte value2) { + addCriterion("send_status between", value1, value2, "sendStatus"); + return (Criteria) this; + } + + public Criteria andSendStatusNotBetween(Byte value1, Byte value2) { + addCriterion("send_status not between", value1, value2, "sendStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusIsNull() { + addCriterion("read_status is null"); + return (Criteria) this; + } + + public Criteria andReadStatusIsNotNull() { + addCriterion("read_status is not null"); + return (Criteria) this; + } + + public Criteria andReadStatusEqualTo(Byte value) { + addCriterion("read_status =", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusNotEqualTo(Byte value) { + addCriterion("read_status <>", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusGreaterThan(Byte value) { + addCriterion("read_status >", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("read_status >=", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusLessThan(Byte value) { + addCriterion("read_status <", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusLessThanOrEqualTo(Byte value) { + addCriterion("read_status <=", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusIn(List values) { + addCriterion("read_status in", values, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusNotIn(List values) { + addCriterion("read_status not in", values, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusBetween(Byte value1, Byte value2) { + addCriterion("read_status between", value1, value2, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusNotBetween(Byte value1, Byte value2) { + addCriterion("read_status not between", value1, value2, "readStatus"); + return (Criteria) this; + } + + public Criteria andInitReadIsNull() { + addCriterion("init_read is null"); + return (Criteria) this; + } + + public Criteria andInitReadIsNotNull() { + addCriterion("init_read is not null"); + return (Criteria) this; + } + + public Criteria andInitReadEqualTo(Byte value) { + addCriterion("init_read =", value, "initRead"); + return (Criteria) this; + } + + public Criteria andInitReadNotEqualTo(Byte value) { + addCriterion("init_read <>", value, "initRead"); + return (Criteria) this; + } + + public Criteria andInitReadGreaterThan(Byte value) { + addCriterion("init_read >", value, "initRead"); + return (Criteria) this; + } + + public Criteria andInitReadGreaterThanOrEqualTo(Byte value) { + addCriterion("init_read >=", value, "initRead"); + return (Criteria) this; + } + + public Criteria andInitReadLessThan(Byte value) { + addCriterion("init_read <", value, "initRead"); + return (Criteria) this; + } + + public Criteria andInitReadLessThanOrEqualTo(Byte value) { + addCriterion("init_read <=", value, "initRead"); + return (Criteria) this; + } + + public Criteria andInitReadIn(List values) { + addCriterion("init_read in", values, "initRead"); + return (Criteria) this; + } + + public Criteria andInitReadNotIn(List values) { + addCriterion("init_read not in", values, "initRead"); + return (Criteria) this; + } + + public Criteria andInitReadBetween(Byte value1, Byte value2) { + addCriterion("init_read between", value1, value2, "initRead"); + return (Criteria) this; + } + + public Criteria andInitReadNotBetween(Byte value1, Byte value2) { + addCriterion("init_read not between", value1, value2, "initRead"); + return (Criteria) this; + } + + public Criteria andSendTimeIsNull() { + addCriterion("send_time is null"); + return (Criteria) this; + } + + public Criteria andSendTimeIsNotNull() { + addCriterion("send_time is not null"); + return (Criteria) this; + } + + public Criteria andSendTimeEqualTo(Long value) { + addCriterion("send_time =", value, "sendTime"); + return (Criteria) this; + } + + public Criteria andSendTimeNotEqualTo(Long value) { + addCriterion("send_time <>", value, "sendTime"); + return (Criteria) this; + } + + public Criteria andSendTimeGreaterThan(Long value) { + addCriterion("send_time >", value, "sendTime"); + return (Criteria) this; + } + + public Criteria andSendTimeGreaterThanOrEqualTo(Long value) { + addCriterion("send_time >=", value, "sendTime"); + return (Criteria) this; + } + + public Criteria andSendTimeLessThan(Long value) { + addCriterion("send_time <", value, "sendTime"); + return (Criteria) this; + } + + public Criteria andSendTimeLessThanOrEqualTo(Long value) { + addCriterion("send_time <=", value, "sendTime"); + return (Criteria) this; + } + + public Criteria andSendTimeIn(List values) { + addCriterion("send_time in", values, "sendTime"); + return (Criteria) this; + } + + public Criteria andSendTimeNotIn(List values) { + addCriterion("send_time not in", values, "sendTime"); + return (Criteria) this; + } + + public Criteria andSendTimeBetween(Long value1, Long value2) { + addCriterion("send_time between", value1, value2, "sendTime"); + return (Criteria) this; + } + + public Criteria andSendTimeNotBetween(Long value1, Long value2) { + addCriterion("send_time not between", value1, value2, "sendTime"); + return (Criteria) this; + } + + public Criteria andCompleteIsNull() { + addCriterion("complete is null"); + return (Criteria) this; + } + + public Criteria andCompleteIsNotNull() { + addCriterion("complete is not null"); + return (Criteria) this; + } + + public Criteria andCompleteEqualTo(Byte value) { + addCriterion("complete =", value, "complete"); + return (Criteria) this; + } + + public Criteria andCompleteNotEqualTo(Byte value) { + addCriterion("complete <>", value, "complete"); + return (Criteria) this; + } + + public Criteria andCompleteGreaterThan(Byte value) { + addCriterion("complete >", value, "complete"); + return (Criteria) this; + } + + public Criteria andCompleteGreaterThanOrEqualTo(Byte value) { + addCriterion("complete >=", value, "complete"); + return (Criteria) this; + } + + public Criteria andCompleteLessThan(Byte value) { + addCriterion("complete <", value, "complete"); + return (Criteria) this; + } + + public Criteria andCompleteLessThanOrEqualTo(Byte value) { + addCriterion("complete <=", value, "complete"); + return (Criteria) this; + } + + public Criteria andCompleteIn(List values) { + addCriterion("complete in", values, "complete"); + return (Criteria) this; + } + + public Criteria andCompleteNotIn(List values) { + addCriterion("complete not in", values, "complete"); + return (Criteria) this; + } + + public Criteria andCompleteBetween(Byte value1, Byte value2) { + addCriterion("complete between", value1, value2, "complete"); + return (Criteria) this; + } + + public Criteria andCompleteNotBetween(Byte value1, Byte value2) { + addCriterion("complete not between", value1, value2, "complete"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysOperation.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysOperation.java new file mode 100644 index 00000000..5a9bca1c --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysOperation.java @@ -0,0 +1,106 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysOperation implements Serializable { + private Long id; + + private Long operatorId; + + private Long projectId; + + private Byte operateType; + + private Long operationTime; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getOperatorId() { + return operatorId; + } + + public void setOperatorId(Long operatorId) { + this.operatorId = operatorId; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Byte getOperateType() { + return operateType; + } + + public void setOperateType(Byte operateType) { + this.operateType = operateType; + } + + public Long getOperationTime() { + return operationTime; + } + + public void setOperationTime(Long operationTime) { + this.operationTime = operationTime; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", operatorId=").append(operatorId); + sb.append(", projectId=").append(projectId); + sb.append(", operateType=").append(operateType); + sb.append(", operationTime=").append(operationTime); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysOperationExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysOperationExample.java new file mode 100644 index 00000000..d37f5397 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysOperationExample.java @@ -0,0 +1,681 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysOperationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysOperationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andOperatorIdIsNull() { + addCriterion("operator_id is null"); + return (Criteria) this; + } + + public Criteria andOperatorIdIsNotNull() { + addCriterion("operator_id is not null"); + return (Criteria) this; + } + + public Criteria andOperatorIdEqualTo(Long value) { + addCriterion("operator_id =", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotEqualTo(Long value) { + addCriterion("operator_id <>", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThan(Long value) { + addCriterion("operator_id >", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("operator_id >=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThan(Long value) { + addCriterion("operator_id <", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThanOrEqualTo(Long value) { + addCriterion("operator_id <=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdIn(List values) { + addCriterion("operator_id in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotIn(List values) { + addCriterion("operator_id not in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdBetween(Long value1, Long value2) { + addCriterion("operator_id between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotBetween(Long value1, Long value2) { + addCriterion("operator_id not between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andOperateTypeIsNull() { + addCriterion("operate_type is null"); + return (Criteria) this; + } + + public Criteria andOperateTypeIsNotNull() { + addCriterion("operate_type is not null"); + return (Criteria) this; + } + + public Criteria andOperateTypeEqualTo(Byte value) { + addCriterion("operate_type =", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotEqualTo(Byte value) { + addCriterion("operate_type <>", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeGreaterThan(Byte value) { + addCriterion("operate_type >", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("operate_type >=", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLessThan(Byte value) { + addCriterion("operate_type <", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLessThanOrEqualTo(Byte value) { + addCriterion("operate_type <=", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeIn(List values) { + addCriterion("operate_type in", values, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotIn(List values) { + addCriterion("operate_type not in", values, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeBetween(Byte value1, Byte value2) { + addCriterion("operate_type between", value1, value2, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotBetween(Byte value1, Byte value2) { + addCriterion("operate_type not between", value1, value2, "operateType"); + return (Criteria) this; + } + + public Criteria andOperationTimeIsNull() { + addCriterion("operation_time is null"); + return (Criteria) this; + } + + public Criteria andOperationTimeIsNotNull() { + addCriterion("operation_time is not null"); + return (Criteria) this; + } + + public Criteria andOperationTimeEqualTo(Long value) { + addCriterion("operation_time =", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeNotEqualTo(Long value) { + addCriterion("operation_time <>", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeGreaterThan(Long value) { + addCriterion("operation_time >", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeGreaterThanOrEqualTo(Long value) { + addCriterion("operation_time >=", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeLessThan(Long value) { + addCriterion("operation_time <", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeLessThanOrEqualTo(Long value) { + addCriterion("operation_time <=", value, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeIn(List values) { + addCriterion("operation_time in", values, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeNotIn(List values) { + addCriterion("operation_time not in", values, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeBetween(Long value1, Long value2) { + addCriterion("operation_time between", value1, value2, "operationTime"); + return (Criteria) this; + } + + public Criteria andOperationTimeNotBetween(Long value1, Long value2) { + addCriterion("operation_time not between", value1, value2, "operationTime"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessage.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessage.java new file mode 100644 index 00000000..f6de4db5 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessage.java @@ -0,0 +1,117 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysOperationMessage implements Serializable { + private Long id; + + private Long operationId; + + private String content; + + private Byte type; + + private String settings; + + private Byte sort; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getOperationId() { + return operationId; + } + + public void setOperationId(Long operationId) { + this.operationId = operationId; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content == null ? null : content.trim(); + } + + public Byte getType() { + return type; + } + + public void setType(Byte type) { + this.type = type; + } + + public String getSettings() { + return settings; + } + + public void setSettings(String settings) { + this.settings = settings == null ? null : settings.trim(); + } + + public Byte getSort() { + return sort; + } + + public void setSort(Byte sort) { + this.sort = sort; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", operationId=").append(operationId); + sb.append(", content=").append(content); + sb.append(", type=").append(type); + sb.append(", settings=").append(settings); + sb.append(", sort=").append(sort); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessageExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessageExample.java new file mode 100644 index 00000000..d2bc0929 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysOperationMessageExample.java @@ -0,0 +1,761 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysOperationMessageExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysOperationMessageExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andOperationIdIsNull() { + addCriterion("operation_id is null"); + return (Criteria) this; + } + + public Criteria andOperationIdIsNotNull() { + addCriterion("operation_id is not null"); + return (Criteria) this; + } + + public Criteria andOperationIdEqualTo(Long value) { + addCriterion("operation_id =", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdNotEqualTo(Long value) { + addCriterion("operation_id <>", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdGreaterThan(Long value) { + addCriterion("operation_id >", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdGreaterThanOrEqualTo(Long value) { + addCriterion("operation_id >=", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdLessThan(Long value) { + addCriterion("operation_id <", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdLessThanOrEqualTo(Long value) { + addCriterion("operation_id <=", value, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdIn(List values) { + addCriterion("operation_id in", values, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdNotIn(List values) { + addCriterion("operation_id not in", values, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdBetween(Long value1, Long value2) { + addCriterion("operation_id between", value1, value2, "operationId"); + return (Criteria) this; + } + + public Criteria andOperationIdNotBetween(Long value1, Long value2) { + addCriterion("operation_id not between", value1, value2, "operationId"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Byte value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Byte value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Byte value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Byte value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Byte value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Byte value1, Byte value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Byte value1, Byte value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andSettingsIsNull() { + addCriterion("settings is null"); + return (Criteria) this; + } + + public Criteria andSettingsIsNotNull() { + addCriterion("settings is not null"); + return (Criteria) this; + } + + public Criteria andSettingsEqualTo(String value) { + addCriterion("settings =", value, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsNotEqualTo(String value) { + addCriterion("settings <>", value, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsGreaterThan(String value) { + addCriterion("settings >", value, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsGreaterThanOrEqualTo(String value) { + addCriterion("settings >=", value, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsLessThan(String value) { + addCriterion("settings <", value, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsLessThanOrEqualTo(String value) { + addCriterion("settings <=", value, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsLike(String value) { + addCriterion("settings like", value, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsNotLike(String value) { + addCriterion("settings not like", value, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsIn(List values) { + addCriterion("settings in", values, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsNotIn(List values) { + addCriterion("settings not in", values, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsBetween(String value1, String value2) { + addCriterion("settings between", value1, value2, "settings"); + return (Criteria) this; + } + + public Criteria andSettingsNotBetween(String value1, String value2) { + addCriterion("settings not between", value1, value2, "settings"); + return (Criteria) this; + } + + public Criteria andSortIsNull() { + addCriterion("sort is null"); + return (Criteria) this; + } + + public Criteria andSortIsNotNull() { + addCriterion("sort is not null"); + return (Criteria) this; + } + + public Criteria andSortEqualTo(Byte value) { + addCriterion("sort =", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotEqualTo(Byte value) { + addCriterion("sort <>", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThan(Byte value) { + addCriterion("sort >", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThanOrEqualTo(Byte value) { + addCriterion("sort >=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThan(Byte value) { + addCriterion("sort <", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThanOrEqualTo(Byte value) { + addCriterion("sort <=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortIn(List values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List values) { + addCriterion("sort not in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortBetween(Byte value1, Byte value2) { + addCriterion("sort between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotBetween(Byte value1, Byte value2) { + addCriterion("sort not between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysPlugin.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysPlugin.java index d42802ac..bc03deca 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysPlugin.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysPlugin.java @@ -1,95 +1,106 @@ -package com.ccsens.tall.bean.po; - -import java.io.Serializable; -import java.util.Date; - -public class SysPlugin implements Serializable { - private Long id; - - private String name; - - private String description; - - private Byte scene; - - private Date createdAt; - - private Date updatedAt; - - private Byte recStatus; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Byte getScene() { - return scene; - } - - public void setScene(Byte scene) { - this.scene = scene; - } - - public Date getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(Date createdAt) { - this.createdAt = createdAt; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - - public Byte getRecStatus() { - return recStatus; - } - - public void setRecStatus(Byte recStatus) { - this.recStatus = recStatus; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", name=").append(name); - sb.append(", description=").append(description); - sb.append(", scene=").append(scene); - sb.append(", createdAt=").append(createdAt); - sb.append(", updatedAt=").append(updatedAt); - sb.append(", recStatus=").append(recStatus); - sb.append("]"); - return sb.toString(); - } +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysPlugin implements Serializable { + private Long id; + + private String name; + + private String description; + + private Byte scene; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private Byte showType; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Byte getScene() { + return scene; + } + + public void setScene(Byte scene) { + this.scene = scene; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public Byte getShowType() { + return showType; + } + + public void setShowType(Byte showType) { + this.showType = showType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", description=").append(description); + sb.append(", scene=").append(scene); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", showType=").append(showType); + sb.append("]"); + return sb.toString(); + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysPluginExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysPluginExample.java index f7f2f57b..21985a1d 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysPluginExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysPluginExample.java @@ -1,641 +1,701 @@ -package com.ccsens.tall.bean.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class SysPluginExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SysPluginExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andSceneIsNull() { - addCriterion("scene is null"); - return (Criteria) this; - } - - public Criteria andSceneIsNotNull() { - addCriterion("scene is not null"); - return (Criteria) this; - } - - public Criteria andSceneEqualTo(Byte value) { - addCriterion("scene =", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneNotEqualTo(Byte value) { - addCriterion("scene <>", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneGreaterThan(Byte value) { - addCriterion("scene >", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneGreaterThanOrEqualTo(Byte value) { - addCriterion("scene >=", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneLessThan(Byte value) { - addCriterion("scene <", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneLessThanOrEqualTo(Byte value) { - addCriterion("scene <=", value, "scene"); - return (Criteria) this; - } - - public Criteria andSceneIn(List values) { - addCriterion("scene in", values, "scene"); - return (Criteria) this; - } - - public Criteria andSceneNotIn(List values) { - addCriterion("scene not in", values, "scene"); - return (Criteria) this; - } - - public Criteria andSceneBetween(Byte value1, Byte value2) { - addCriterion("scene between", value1, value2, "scene"); - return (Criteria) this; - } - - public Criteria andSceneNotBetween(Byte value1, Byte value2) { - addCriterion("scene not between", value1, value2, "scene"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNull() { - addCriterion("created_at is null"); - return (Criteria) this; - } - - public Criteria andCreatedAtIsNotNull() { - addCriterion("created_at is not null"); - return (Criteria) this; - } - - public Criteria andCreatedAtEqualTo(Date value) { - addCriterion("created_at =", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotEqualTo(Date value) { - addCriterion("created_at <>", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThan(Date value) { - addCriterion("created_at >", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("created_at >=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThan(Date value) { - addCriterion("created_at <", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtLessThanOrEqualTo(Date value) { - addCriterion("created_at <=", value, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtIn(List values) { - addCriterion("created_at in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotIn(List values) { - addCriterion("created_at not in", values, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtBetween(Date value1, Date value2) { - addCriterion("created_at between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andCreatedAtNotBetween(Date value1, Date value2) { - addCriterion("created_at not between", value1, value2, "createdAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNull() { - addCriterion("updated_at is null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIsNotNull() { - addCriterion("updated_at is not null"); - return (Criteria) this; - } - - public Criteria andUpdatedAtEqualTo(Date value) { - addCriterion("updated_at =", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotEqualTo(Date value) { - addCriterion("updated_at <>", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThan(Date value) { - addCriterion("updated_at >", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { - addCriterion("updated_at >=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThan(Date value) { - addCriterion("updated_at <", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { - addCriterion("updated_at <=", value, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtIn(List values) { - addCriterion("updated_at in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotIn(List values) { - addCriterion("updated_at not in", values, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtBetween(Date value1, Date value2) { - addCriterion("updated_at between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { - addCriterion("updated_at not between", value1, value2, "updatedAt"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNull() { - addCriterion("rec_status is null"); - return (Criteria) this; - } - - public Criteria andRecStatusIsNotNull() { - addCriterion("rec_status is not null"); - return (Criteria) this; - } - - public Criteria andRecStatusEqualTo(Byte value) { - addCriterion("rec_status =", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotEqualTo(Byte value) { - addCriterion("rec_status <>", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThan(Byte value) { - addCriterion("rec_status >", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("rec_status >=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThan(Byte value) { - addCriterion("rec_status <", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusLessThanOrEqualTo(Byte value) { - addCriterion("rec_status <=", value, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusIn(List values) { - addCriterion("rec_status in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotIn(List values) { - addCriterion("rec_status not in", values, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusBetween(Byte value1, Byte value2) { - addCriterion("rec_status between", value1, value2, "recStatus"); - return (Criteria) this; - } - - public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { - addCriterion("rec_status not between", value1, value2, "recStatus"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysPluginExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysPluginExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andSceneIsNull() { + addCriterion("scene is null"); + return (Criteria) this; + } + + public Criteria andSceneIsNotNull() { + addCriterion("scene is not null"); + return (Criteria) this; + } + + public Criteria andSceneEqualTo(Byte value) { + addCriterion("scene =", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotEqualTo(Byte value) { + addCriterion("scene <>", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneGreaterThan(Byte value) { + addCriterion("scene >", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneGreaterThanOrEqualTo(Byte value) { + addCriterion("scene >=", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLessThan(Byte value) { + addCriterion("scene <", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLessThanOrEqualTo(Byte value) { + addCriterion("scene <=", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneIn(List values) { + addCriterion("scene in", values, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotIn(List values) { + addCriterion("scene not in", values, "scene"); + return (Criteria) this; + } + + public Criteria andSceneBetween(Byte value1, Byte value2) { + addCriterion("scene between", value1, value2, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotBetween(Byte value1, Byte value2) { + addCriterion("scene not between", value1, value2, "scene"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andShowTypeIsNull() { + addCriterion("show_type is null"); + return (Criteria) this; + } + + public Criteria andShowTypeIsNotNull() { + addCriterion("show_type is not null"); + return (Criteria) this; + } + + public Criteria andShowTypeEqualTo(Byte value) { + addCriterion("show_type =", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeNotEqualTo(Byte value) { + addCriterion("show_type <>", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeGreaterThan(Byte value) { + addCriterion("show_type >", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("show_type >=", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeLessThan(Byte value) { + addCriterion("show_type <", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeLessThanOrEqualTo(Byte value) { + addCriterion("show_type <=", value, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeIn(List values) { + addCriterion("show_type in", values, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeNotIn(List values) { + addCriterion("show_type not in", values, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeBetween(Byte value1, Byte value2) { + addCriterion("show_type between", value1, value2, "showType"); + return (Criteria) this; + } + + public Criteria andShowTypeNotBetween(Byte value1, Byte value2) { + addCriterion("show_type not between", value1, value2, "showType"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabel.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabel.java new file mode 100644 index 00000000..7cd9ce83 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabel.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysProjectLabel implements Serializable { + private Long id; + + private Long projectId; + + private Long labelId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getLabelId() { + return labelId; + } + + public void setLabelId(Long labelId) { + this.labelId = labelId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", labelId=").append(labelId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabelExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabelExample.java new file mode 100644 index 00000000..00e8720d --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabelExample.java @@ -0,0 +1,561 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysProjectLabelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysProjectLabelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andLabelIdIsNull() { + addCriterion("label_id is null"); + return (Criteria) this; + } + + public Criteria andLabelIdIsNotNull() { + addCriterion("label_id is not null"); + return (Criteria) this; + } + + public Criteria andLabelIdEqualTo(Long value) { + addCriterion("label_id =", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotEqualTo(Long value) { + addCriterion("label_id <>", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdGreaterThan(Long value) { + addCriterion("label_id >", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdGreaterThanOrEqualTo(Long value) { + addCriterion("label_id >=", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdLessThan(Long value) { + addCriterion("label_id <", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdLessThanOrEqualTo(Long value) { + addCriterion("label_id <=", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdIn(List values) { + addCriterion("label_id in", values, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotIn(List values) { + addCriterion("label_id not in", values, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdBetween(Long value1, Long value2) { + addCriterion("label_id between", value1, value2, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotBetween(Long value1, Long value2) { + addCriterion("label_id not between", value1, value2, "labelId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProject.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProject.java new file mode 100644 index 00000000..55725907 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProject.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysRelevanceProject implements Serializable { + private Long id; + + private Long projectId; + + private Long relevanceProjectId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getRelevanceProjectId() { + return relevanceProjectId; + } + + public void setRelevanceProjectId(Long relevanceProjectId) { + this.relevanceProjectId = relevanceProjectId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", relevanceProjectId=").append(relevanceProjectId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProjectExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProjectExample.java new file mode 100644 index 00000000..1f1e9ed9 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProjectExample.java @@ -0,0 +1,561 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysRelevanceProjectExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysRelevanceProjectExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIsNull() { + addCriterion("relevance_project_id is null"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIsNotNull() { + addCriterion("relevance_project_id is not null"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdEqualTo(Long value) { + addCriterion("relevance_project_id =", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotEqualTo(Long value) { + addCriterion("relevance_project_id <>", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdGreaterThan(Long value) { + addCriterion("relevance_project_id >", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("relevance_project_id >=", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdLessThan(Long value) { + addCriterion("relevance_project_id <", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdLessThanOrEqualTo(Long value) { + addCriterion("relevance_project_id <=", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIn(List values) { + addCriterion("relevance_project_id in", values, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotIn(List values) { + addCriterion("relevance_project_id not in", values, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdBetween(Long value1, Long value2) { + addCriterion("relevance_project_id between", value1, value2, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotBetween(Long value1, Long value2) { + addCriterion("relevance_project_id not between", value1, value2, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysRingMsg.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingMsg.java new file mode 100644 index 00000000..56359985 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingMsg.java @@ -0,0 +1,117 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysRingMsg implements Serializable { + private Long id; + + private Long projectId; + + private String value; + + private Long senderId; + + private Long time; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private String valueText; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value == null ? null : value.trim(); + } + + public Long getSenderId() { + return senderId; + } + + public void setSenderId(Long senderId) { + this.senderId = senderId; + } + + public Long getTime() { + return time; + } + + public void setTime(Long time) { + this.time = time; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public String getValueText() { + return valueText; + } + + public void setValueText(String valueText) { + this.valueText = valueText == null ? null : valueText.trim(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", value=").append(value); + sb.append(", senderId=").append(senderId); + sb.append(", time=").append(time); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", valueText=").append(valueText); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysRingMsgExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingMsgExample.java new file mode 100644 index 00000000..2bf206e2 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingMsgExample.java @@ -0,0 +1,691 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysRingMsgExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysRingMsgExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andValueIsNull() { + addCriterion("value is null"); + return (Criteria) this; + } + + public Criteria andValueIsNotNull() { + addCriterion("value is not null"); + return (Criteria) this; + } + + public Criteria andValueEqualTo(String value) { + addCriterion("value =", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotEqualTo(String value) { + addCriterion("value <>", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThan(String value) { + addCriterion("value >", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThanOrEqualTo(String value) { + addCriterion("value >=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThan(String value) { + addCriterion("value <", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThanOrEqualTo(String value) { + addCriterion("value <=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLike(String value) { + addCriterion("value like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotLike(String value) { + addCriterion("value not like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueIn(List values) { + addCriterion("value in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueNotIn(List values) { + addCriterion("value not in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueBetween(String value1, String value2) { + addCriterion("value between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andValueNotBetween(String value1, String value2) { + addCriterion("value not between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andSenderIdIsNull() { + addCriterion("sender_id is null"); + return (Criteria) this; + } + + public Criteria andSenderIdIsNotNull() { + addCriterion("sender_id is not null"); + return (Criteria) this; + } + + public Criteria andSenderIdEqualTo(Long value) { + addCriterion("sender_id =", value, "senderId"); + return (Criteria) this; + } + + public Criteria andSenderIdNotEqualTo(Long value) { + addCriterion("sender_id <>", value, "senderId"); + return (Criteria) this; + } + + public Criteria andSenderIdGreaterThan(Long value) { + addCriterion("sender_id >", value, "senderId"); + return (Criteria) this; + } + + public Criteria andSenderIdGreaterThanOrEqualTo(Long value) { + addCriterion("sender_id >=", value, "senderId"); + return (Criteria) this; + } + + public Criteria andSenderIdLessThan(Long value) { + addCriterion("sender_id <", value, "senderId"); + return (Criteria) this; + } + + public Criteria andSenderIdLessThanOrEqualTo(Long value) { + addCriterion("sender_id <=", value, "senderId"); + return (Criteria) this; + } + + public Criteria andSenderIdIn(List values) { + addCriterion("sender_id in", values, "senderId"); + return (Criteria) this; + } + + public Criteria andSenderIdNotIn(List values) { + addCriterion("sender_id not in", values, "senderId"); + return (Criteria) this; + } + + public Criteria andSenderIdBetween(Long value1, Long value2) { + addCriterion("sender_id between", value1, value2, "senderId"); + return (Criteria) this; + } + + public Criteria andSenderIdNotBetween(Long value1, Long value2) { + addCriterion("sender_id not between", value1, value2, "senderId"); + return (Criteria) this; + } + + public Criteria andTimeIsNull() { + addCriterion("time is null"); + return (Criteria) this; + } + + public Criteria andTimeIsNotNull() { + addCriterion("time is not null"); + return (Criteria) this; + } + + public Criteria andTimeEqualTo(Long value) { + addCriterion("time =", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotEqualTo(Long value) { + addCriterion("time <>", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThan(Long value) { + addCriterion("time >", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThanOrEqualTo(Long value) { + addCriterion("time >=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThan(Long value) { + addCriterion("time <", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThanOrEqualTo(Long value) { + addCriterion("time <=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeIn(List values) { + addCriterion("time in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotIn(List values) { + addCriterion("time not in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeBetween(Long value1, Long value2) { + addCriterion("time between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotBetween(Long value1, Long value2) { + addCriterion("time not between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSend.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSend.java new file mode 100644 index 00000000..9f78d722 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSend.java @@ -0,0 +1,106 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysRingSend implements Serializable { + private Long id; + + private Long ringId; + + private Long roleId; + + private Byte readStatus; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private Long readTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getRingId() { + return ringId; + } + + public void setRingId(Long ringId) { + this.ringId = ringId; + } + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public Byte getReadStatus() { + return readStatus; + } + + public void setReadStatus(Byte readStatus) { + this.readStatus = readStatus; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + public Long getReadTime() { + return readTime; + } + + public void setReadTime(Long readTime) { + this.readTime = readTime; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", ringId=").append(ringId); + sb.append(", roleId=").append(roleId); + sb.append(", readStatus=").append(readStatus); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append(", readTime=").append(readTime); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSendExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSendExample.java new file mode 100644 index 00000000..278cf6a7 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSendExample.java @@ -0,0 +1,681 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysRingSendExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysRingSendExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRingIdIsNull() { + addCriterion("ring_id is null"); + return (Criteria) this; + } + + public Criteria andRingIdIsNotNull() { + addCriterion("ring_id is not null"); + return (Criteria) this; + } + + public Criteria andRingIdEqualTo(Long value) { + addCriterion("ring_id =", value, "ringId"); + return (Criteria) this; + } + + public Criteria andRingIdNotEqualTo(Long value) { + addCriterion("ring_id <>", value, "ringId"); + return (Criteria) this; + } + + public Criteria andRingIdGreaterThan(Long value) { + addCriterion("ring_id >", value, "ringId"); + return (Criteria) this; + } + + public Criteria andRingIdGreaterThanOrEqualTo(Long value) { + addCriterion("ring_id >=", value, "ringId"); + return (Criteria) this; + } + + public Criteria andRingIdLessThan(Long value) { + addCriterion("ring_id <", value, "ringId"); + return (Criteria) this; + } + + public Criteria andRingIdLessThanOrEqualTo(Long value) { + addCriterion("ring_id <=", value, "ringId"); + return (Criteria) this; + } + + public Criteria andRingIdIn(List values) { + addCriterion("ring_id in", values, "ringId"); + return (Criteria) this; + } + + public Criteria andRingIdNotIn(List values) { + addCriterion("ring_id not in", values, "ringId"); + return (Criteria) this; + } + + public Criteria andRingIdBetween(Long value1, Long value2) { + addCriterion("ring_id between", value1, value2, "ringId"); + return (Criteria) this; + } + + public Criteria andRingIdNotBetween(Long value1, Long value2) { + addCriterion("ring_id not between", value1, value2, "ringId"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("role_id is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("role_id is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(Long value) { + addCriterion("role_id =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(Long value) { + addCriterion("role_id <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(Long value) { + addCriterion("role_id >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("role_id >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(Long value) { + addCriterion("role_id <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(Long value) { + addCriterion("role_id <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("role_id in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("role_id not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(Long value1, Long value2) { + addCriterion("role_id between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(Long value1, Long value2) { + addCriterion("role_id not between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andReadStatusIsNull() { + addCriterion("read_status is null"); + return (Criteria) this; + } + + public Criteria andReadStatusIsNotNull() { + addCriterion("read_status is not null"); + return (Criteria) this; + } + + public Criteria andReadStatusEqualTo(Byte value) { + addCriterion("read_status =", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusNotEqualTo(Byte value) { + addCriterion("read_status <>", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusGreaterThan(Byte value) { + addCriterion("read_status >", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("read_status >=", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusLessThan(Byte value) { + addCriterion("read_status <", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusLessThanOrEqualTo(Byte value) { + addCriterion("read_status <=", value, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusIn(List values) { + addCriterion("read_status in", values, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusNotIn(List values) { + addCriterion("read_status not in", values, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusBetween(Byte value1, Byte value2) { + addCriterion("read_status between", value1, value2, "readStatus"); + return (Criteria) this; + } + + public Criteria andReadStatusNotBetween(Byte value1, Byte value2) { + addCriterion("read_status not between", value1, value2, "readStatus"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andReadTimeIsNull() { + addCriterion("read_time is null"); + return (Criteria) this; + } + + public Criteria andReadTimeIsNotNull() { + addCriterion("read_time is not null"); + return (Criteria) this; + } + + public Criteria andReadTimeEqualTo(Long value) { + addCriterion("read_time =", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeNotEqualTo(Long value) { + addCriterion("read_time <>", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeGreaterThan(Long value) { + addCriterion("read_time >", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeGreaterThanOrEqualTo(Long value) { + addCriterion("read_time >=", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeLessThan(Long value) { + addCriterion("read_time <", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeLessThanOrEqualTo(Long value) { + addCriterion("read_time <=", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeIn(List values) { + addCriterion("read_time in", values, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeNotIn(List values) { + addCriterion("read_time not in", values, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeBetween(Long value1, Long value2) { + addCriterion("read_time between", value1, value2, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeNotBetween(Long value1, Long value2) { + addCriterion("read_time not between", value1, value2, "readTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysUserInfo.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysUserInfo.java new file mode 100644 index 00000000..650da028 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysUserInfo.java @@ -0,0 +1,150 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysUserInfo implements Serializable { + private Long id; + + private Long userId; + + private String signature; + + private String introduction; + + private String birthday; + + private String address; + + private String webPath; + + private String company; + + private String position; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature == null ? null : signature.trim(); + } + + public String getIntroduction() { + return introduction; + } + + public void setIntroduction(String introduction) { + this.introduction = introduction == null ? null : introduction.trim(); + } + + public String getBirthday() { + return birthday; + } + + public void setBirthday(String birthday) { + this.birthday = birthday == null ? null : birthday.trim(); + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address == null ? null : address.trim(); + } + + public String getWebPath() { + return webPath; + } + + public void setWebPath(String webPath) { + this.webPath = webPath == null ? null : webPath.trim(); + } + + public String getCompany() { + return company; + } + + public void setCompany(String company) { + this.company = company == null ? null : company.trim(); + } + + public String getPosition() { + return position; + } + + public void setPosition(String position) { + this.position = position == null ? null : position.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", signature=").append(signature); + sb.append(", introduction=").append(introduction); + sb.append(", birthday=").append(birthday); + sb.append(", address=").append(address); + sb.append(", webPath=").append(webPath); + sb.append(", company=").append(company); + sb.append(", position=").append(position); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysUserInfoExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysUserInfoExample.java new file mode 100644 index 00000000..02f989f1 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysUserInfoExample.java @@ -0,0 +1,991 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysUserInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysUserInfoExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andSignatureIsNull() { + addCriterion("signature is null"); + return (Criteria) this; + } + + public Criteria andSignatureIsNotNull() { + addCriterion("signature is not null"); + return (Criteria) this; + } + + public Criteria andSignatureEqualTo(String value) { + addCriterion("signature =", value, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureNotEqualTo(String value) { + addCriterion("signature <>", value, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureGreaterThan(String value) { + addCriterion("signature >", value, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureGreaterThanOrEqualTo(String value) { + addCriterion("signature >=", value, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureLessThan(String value) { + addCriterion("signature <", value, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureLessThanOrEqualTo(String value) { + addCriterion("signature <=", value, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureLike(String value) { + addCriterion("signature like", value, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureNotLike(String value) { + addCriterion("signature not like", value, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureIn(List values) { + addCriterion("signature in", values, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureNotIn(List values) { + addCriterion("signature not in", values, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureBetween(String value1, String value2) { + addCriterion("signature between", value1, value2, "signature"); + return (Criteria) this; + } + + public Criteria andSignatureNotBetween(String value1, String value2) { + addCriterion("signature not between", value1, value2, "signature"); + return (Criteria) this; + } + + public Criteria andIntroductionIsNull() { + addCriterion("introduction is null"); + return (Criteria) this; + } + + public Criteria andIntroductionIsNotNull() { + addCriterion("introduction is not null"); + return (Criteria) this; + } + + public Criteria andIntroductionEqualTo(String value) { + addCriterion("introduction =", value, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionNotEqualTo(String value) { + addCriterion("introduction <>", value, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionGreaterThan(String value) { + addCriterion("introduction >", value, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionGreaterThanOrEqualTo(String value) { + addCriterion("introduction >=", value, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionLessThan(String value) { + addCriterion("introduction <", value, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionLessThanOrEqualTo(String value) { + addCriterion("introduction <=", value, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionLike(String value) { + addCriterion("introduction like", value, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionNotLike(String value) { + addCriterion("introduction not like", value, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionIn(List values) { + addCriterion("introduction in", values, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionNotIn(List values) { + addCriterion("introduction not in", values, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionBetween(String value1, String value2) { + addCriterion("introduction between", value1, value2, "introduction"); + return (Criteria) this; + } + + public Criteria andIntroductionNotBetween(String value1, String value2) { + addCriterion("introduction not between", value1, value2, "introduction"); + return (Criteria) this; + } + + public Criteria andBirthdayIsNull() { + addCriterion("birthday is null"); + return (Criteria) this; + } + + public Criteria andBirthdayIsNotNull() { + addCriterion("birthday is not null"); + return (Criteria) this; + } + + public Criteria andBirthdayEqualTo(String value) { + addCriterion("birthday =", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayNotEqualTo(String value) { + addCriterion("birthday <>", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayGreaterThan(String value) { + addCriterion("birthday >", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayGreaterThanOrEqualTo(String value) { + addCriterion("birthday >=", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayLessThan(String value) { + addCriterion("birthday <", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayLessThanOrEqualTo(String value) { + addCriterion("birthday <=", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayLike(String value) { + addCriterion("birthday like", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayNotLike(String value) { + addCriterion("birthday not like", value, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayIn(List values) { + addCriterion("birthday in", values, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayNotIn(List values) { + addCriterion("birthday not in", values, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayBetween(String value1, String value2) { + addCriterion("birthday between", value1, value2, "birthday"); + return (Criteria) this; + } + + public Criteria andBirthdayNotBetween(String value1, String value2) { + addCriterion("birthday not between", value1, value2, "birthday"); + return (Criteria) this; + } + + public Criteria andAddressIsNull() { + addCriterion("address is null"); + return (Criteria) this; + } + + public Criteria andAddressIsNotNull() { + addCriterion("address is not null"); + return (Criteria) this; + } + + public Criteria andAddressEqualTo(String value) { + addCriterion("address =", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotEqualTo(String value) { + addCriterion("address <>", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressGreaterThan(String value) { + addCriterion("address >", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressGreaterThanOrEqualTo(String value) { + addCriterion("address >=", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLessThan(String value) { + addCriterion("address <", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLessThanOrEqualTo(String value) { + addCriterion("address <=", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLike(String value) { + addCriterion("address like", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotLike(String value) { + addCriterion("address not like", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressIn(List values) { + addCriterion("address in", values, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotIn(List values) { + addCriterion("address not in", values, "address"); + return (Criteria) this; + } + + public Criteria andAddressBetween(String value1, String value2) { + addCriterion("address between", value1, value2, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotBetween(String value1, String value2) { + addCriterion("address not between", value1, value2, "address"); + return (Criteria) this; + } + + public Criteria andWebPathIsNull() { + addCriterion("web_path is null"); + return (Criteria) this; + } + + public Criteria andWebPathIsNotNull() { + addCriterion("web_path is not null"); + return (Criteria) this; + } + + public Criteria andWebPathEqualTo(String value) { + addCriterion("web_path =", value, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathNotEqualTo(String value) { + addCriterion("web_path <>", value, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathGreaterThan(String value) { + addCriterion("web_path >", value, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathGreaterThanOrEqualTo(String value) { + addCriterion("web_path >=", value, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathLessThan(String value) { + addCriterion("web_path <", value, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathLessThanOrEqualTo(String value) { + addCriterion("web_path <=", value, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathLike(String value) { + addCriterion("web_path like", value, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathNotLike(String value) { + addCriterion("web_path not like", value, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathIn(List values) { + addCriterion("web_path in", values, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathNotIn(List values) { + addCriterion("web_path not in", values, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathBetween(String value1, String value2) { + addCriterion("web_path between", value1, value2, "webPath"); + return (Criteria) this; + } + + public Criteria andWebPathNotBetween(String value1, String value2) { + addCriterion("web_path not between", value1, value2, "webPath"); + return (Criteria) this; + } + + public Criteria andCompanyIsNull() { + addCriterion("company is null"); + return (Criteria) this; + } + + public Criteria andCompanyIsNotNull() { + addCriterion("company is not null"); + return (Criteria) this; + } + + public Criteria andCompanyEqualTo(String value) { + addCriterion("company =", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyNotEqualTo(String value) { + addCriterion("company <>", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyGreaterThan(String value) { + addCriterion("company >", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyGreaterThanOrEqualTo(String value) { + addCriterion("company >=", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyLessThan(String value) { + addCriterion("company <", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyLessThanOrEqualTo(String value) { + addCriterion("company <=", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyLike(String value) { + addCriterion("company like", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyNotLike(String value) { + addCriterion("company not like", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyIn(List values) { + addCriterion("company in", values, "company"); + return (Criteria) this; + } + + public Criteria andCompanyNotIn(List values) { + addCriterion("company not in", values, "company"); + return (Criteria) this; + } + + public Criteria andCompanyBetween(String value1, String value2) { + addCriterion("company between", value1, value2, "company"); + return (Criteria) this; + } + + public Criteria andCompanyNotBetween(String value1, String value2) { + addCriterion("company not between", value1, value2, "company"); + return (Criteria) this; + } + + public Criteria andPositionIsNull() { + addCriterion("position is null"); + return (Criteria) this; + } + + public Criteria andPositionIsNotNull() { + addCriterion("position is not null"); + return (Criteria) this; + } + + public Criteria andPositionEqualTo(String value) { + addCriterion("position =", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotEqualTo(String value) { + addCriterion("position <>", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionGreaterThan(String value) { + addCriterion("position >", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionGreaterThanOrEqualTo(String value) { + addCriterion("position >=", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLessThan(String value) { + addCriterion("position <", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLessThanOrEqualTo(String value) { + addCriterion("position <=", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLike(String value) { + addCriterion("position like", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotLike(String value) { + addCriterion("position not like", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionIn(List values) { + addCriterion("position in", values, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotIn(List values) { + addCriterion("position not in", values, "position"); + return (Criteria) this; + } + + public Criteria andPositionBetween(String value1, String value2) { + addCriterion("position between", value1, value2, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotBetween(String value1, String value2) { + addCriterion("position not between", value1, value2, "position"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFile.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFile.java new file mode 100644 index 00000000..3e9f8415 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFile.java @@ -0,0 +1,139 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class WpsFile implements Serializable { + private Long id; + + private Integer currentVersion; + + private String name; + + private Long size; + + private String downloadUrl; + + private String saveUrl; + + private Long creator; + + private Long modifier; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getCurrentVersion() { + return currentVersion; + } + + public void setCurrentVersion(Integer currentVersion) { + this.currentVersion = currentVersion; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl == null ? null : downloadUrl.trim(); + } + + public String getSaveUrl() { + return saveUrl; + } + + public void setSaveUrl(String saveUrl) { + this.saveUrl = saveUrl == null ? null : saveUrl.trim(); + } + + public Long getCreator() { + return creator; + } + + public void setCreator(Long creator) { + this.creator = creator; + } + + public Long getModifier() { + return modifier; + } + + public void setModifier(Long modifier) { + this.modifier = modifier; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", currentVersion=").append(currentVersion); + sb.append(", name=").append(name); + sb.append(", size=").append(size); + sb.append(", downloadUrl=").append(downloadUrl); + sb.append(", saveUrl=").append(saveUrl); + sb.append(", creator=").append(creator); + sb.append(", modifier=").append(modifier); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileExample.java new file mode 100644 index 00000000..f36e60a4 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileExample.java @@ -0,0 +1,891 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class WpsFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WpsFileExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCurrentVersionIsNull() { + addCriterion("current_version is null"); + return (Criteria) this; + } + + public Criteria andCurrentVersionIsNotNull() { + addCriterion("current_version is not null"); + return (Criteria) this; + } + + public Criteria andCurrentVersionEqualTo(Integer value) { + addCriterion("current_version =", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionNotEqualTo(Integer value) { + addCriterion("current_version <>", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionGreaterThan(Integer value) { + addCriterion("current_version >", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionGreaterThanOrEqualTo(Integer value) { + addCriterion("current_version >=", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionLessThan(Integer value) { + addCriterion("current_version <", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionLessThanOrEqualTo(Integer value) { + addCriterion("current_version <=", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionIn(List values) { + addCriterion("current_version in", values, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionNotIn(List values) { + addCriterion("current_version not in", values, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionBetween(Integer value1, Integer value2) { + addCriterion("current_version between", value1, value2, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionNotBetween(Integer value1, Integer value2) { + addCriterion("current_version not between", value1, value2, "currentVersion"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andSizeIsNull() { + addCriterion("size is null"); + return (Criteria) this; + } + + public Criteria andSizeIsNotNull() { + addCriterion("size is not null"); + return (Criteria) this; + } + + public Criteria andSizeEqualTo(Long value) { + addCriterion("size =", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotEqualTo(Long value) { + addCriterion("size <>", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThan(Long value) { + addCriterion("size >", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThanOrEqualTo(Long value) { + addCriterion("size >=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThan(Long value) { + addCriterion("size <", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThanOrEqualTo(Long value) { + addCriterion("size <=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeIn(List values) { + addCriterion("size in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotIn(List values) { + addCriterion("size not in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeBetween(Long value1, Long value2) { + addCriterion("size between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotBetween(Long value1, Long value2) { + addCriterion("size not between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIsNull() { + addCriterion("download_url is null"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIsNotNull() { + addCriterion("download_url is not null"); + return (Criteria) this; + } + + public Criteria andDownloadUrlEqualTo(String value) { + addCriterion("download_url =", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotEqualTo(String value) { + addCriterion("download_url <>", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlGreaterThan(String value) { + addCriterion("download_url >", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlGreaterThanOrEqualTo(String value) { + addCriterion("download_url >=", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLessThan(String value) { + addCriterion("download_url <", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLessThanOrEqualTo(String value) { + addCriterion("download_url <=", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLike(String value) { + addCriterion("download_url like", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotLike(String value) { + addCriterion("download_url not like", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIn(List values) { + addCriterion("download_url in", values, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotIn(List values) { + addCriterion("download_url not in", values, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlBetween(String value1, String value2) { + addCriterion("download_url between", value1, value2, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotBetween(String value1, String value2) { + addCriterion("download_url not between", value1, value2, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlIsNull() { + addCriterion("save_url is null"); + return (Criteria) this; + } + + public Criteria andSaveUrlIsNotNull() { + addCriterion("save_url is not null"); + return (Criteria) this; + } + + public Criteria andSaveUrlEqualTo(String value) { + addCriterion("save_url =", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlNotEqualTo(String value) { + addCriterion("save_url <>", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlGreaterThan(String value) { + addCriterion("save_url >", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlGreaterThanOrEqualTo(String value) { + addCriterion("save_url >=", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlLessThan(String value) { + addCriterion("save_url <", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlLessThanOrEqualTo(String value) { + addCriterion("save_url <=", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlLike(String value) { + addCriterion("save_url like", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlNotLike(String value) { + addCriterion("save_url not like", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlIn(List values) { + addCriterion("save_url in", values, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlNotIn(List values) { + addCriterion("save_url not in", values, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlBetween(String value1, String value2) { + addCriterion("save_url between", value1, value2, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlNotBetween(String value1, String value2) { + addCriterion("save_url not between", value1, value2, "saveUrl"); + return (Criteria) this; + } + + public Criteria andCreatorIsNull() { + addCriterion("creator is null"); + return (Criteria) this; + } + + public Criteria andCreatorIsNotNull() { + addCriterion("creator is not null"); + return (Criteria) this; + } + + public Criteria andCreatorEqualTo(Long value) { + addCriterion("creator =", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotEqualTo(Long value) { + addCriterion("creator <>", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThan(Long value) { + addCriterion("creator >", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThanOrEqualTo(Long value) { + addCriterion("creator >=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThan(Long value) { + addCriterion("creator <", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThanOrEqualTo(Long value) { + addCriterion("creator <=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorIn(List values) { + addCriterion("creator in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotIn(List values) { + addCriterion("creator not in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorBetween(Long value1, Long value2) { + addCriterion("creator between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotBetween(Long value1, Long value2) { + addCriterion("creator not between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andModifierIsNull() { + addCriterion("modifier is null"); + return (Criteria) this; + } + + public Criteria andModifierIsNotNull() { + addCriterion("modifier is not null"); + return (Criteria) this; + } + + public Criteria andModifierEqualTo(Long value) { + addCriterion("modifier =", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotEqualTo(Long value) { + addCriterion("modifier <>", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierGreaterThan(Long value) { + addCriterion("modifier >", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierGreaterThanOrEqualTo(Long value) { + addCriterion("modifier >=", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierLessThan(Long value) { + addCriterion("modifier <", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierLessThanOrEqualTo(Long value) { + addCriterion("modifier <=", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierIn(List values) { + addCriterion("modifier in", values, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotIn(List values) { + addCriterion("modifier not in", values, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierBetween(Long value1, Long value2) { + addCriterion("modifier between", value1, value2, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotBetween(Long value1, Long value2) { + addCriterion("modifier not between", value1, value2, "modifier"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUser.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUser.java new file mode 100644 index 00000000..04e7c9d7 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUser.java @@ -0,0 +1,95 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class WpsFileUser implements Serializable { + private Long id; + + private Long userId; + + private Long versionId; + + private Byte operation; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getVersionId() { + return versionId; + } + + public void setVersionId(Long versionId) { + this.versionId = versionId; + } + + public Byte getOperation() { + return operation; + } + + public void setOperation(Byte operation) { + this.operation = operation; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", versionId=").append(versionId); + sb.append(", operation=").append(operation); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUserExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUserExample.java new file mode 100644 index 00000000..9cee6be6 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUserExample.java @@ -0,0 +1,621 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class WpsFileUserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WpsFileUserExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNull() { + addCriterion("version_id is null"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNotNull() { + addCriterion("version_id is not null"); + return (Criteria) this; + } + + public Criteria andVersionIdEqualTo(Long value) { + addCriterion("version_id =", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotEqualTo(Long value) { + addCriterion("version_id <>", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThan(Long value) { + addCriterion("version_id >", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThanOrEqualTo(Long value) { + addCriterion("version_id >=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThan(Long value) { + addCriterion("version_id <", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThanOrEqualTo(Long value) { + addCriterion("version_id <=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdIn(List values) { + addCriterion("version_id in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotIn(List values) { + addCriterion("version_id not in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdBetween(Long value1, Long value2) { + addCriterion("version_id between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotBetween(Long value1, Long value2) { + addCriterion("version_id not between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andOperationIsNull() { + addCriterion("operation is null"); + return (Criteria) this; + } + + public Criteria andOperationIsNotNull() { + addCriterion("operation is not null"); + return (Criteria) this; + } + + public Criteria andOperationEqualTo(Byte value) { + addCriterion("operation =", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotEqualTo(Byte value) { + addCriterion("operation <>", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationGreaterThan(Byte value) { + addCriterion("operation >", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationGreaterThanOrEqualTo(Byte value) { + addCriterion("operation >=", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationLessThan(Byte value) { + addCriterion("operation <", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationLessThanOrEqualTo(Byte value) { + addCriterion("operation <=", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationIn(List values) { + addCriterion("operation in", values, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotIn(List values) { + addCriterion("operation not in", values, "operation"); + return (Criteria) this; + } + + public Criteria andOperationBetween(Byte value1, Byte value2) { + addCriterion("operation between", value1, value2, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotBetween(Byte value1, Byte value2) { + addCriterion("operation not between", value1, value2, "operation"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersion.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersion.java new file mode 100644 index 00000000..6bb0bcc3 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersion.java @@ -0,0 +1,139 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class WpsFileVersion implements Serializable { + private Long id; + + private Long fileId; + + private Integer version; + + private String name; + + private Long size; + + private String downloadUrl; + + private String saveUrl; + + private Long modifier; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getFileId() { + return fileId; + } + + public void setFileId(Long fileId) { + this.fileId = fileId; + } + + public Integer getVersion() { + return version; + } + + public void setVersion(Integer version) { + this.version = version; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl == null ? null : downloadUrl.trim(); + } + + public String getSaveUrl() { + return saveUrl; + } + + public void setSaveUrl(String saveUrl) { + this.saveUrl = saveUrl == null ? null : saveUrl.trim(); + } + + public Long getModifier() { + return modifier; + } + + public void setModifier(Long modifier) { + this.modifier = modifier; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", fileId=").append(fileId); + sb.append(", version=").append(version); + sb.append(", name=").append(name); + sb.append(", size=").append(size); + sb.append(", downloadUrl=").append(downloadUrl); + sb.append(", saveUrl=").append(saveUrl); + sb.append(", modifier=").append(modifier); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersionExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersionExample.java new file mode 100644 index 00000000..dc617762 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersionExample.java @@ -0,0 +1,891 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class WpsFileVersionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WpsFileVersionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andFileIdIsNull() { + addCriterion("file_id is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("file_id is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(Long value) { + addCriterion("file_id =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(Long value) { + addCriterion("file_id <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(Long value) { + addCriterion("file_id >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(Long value) { + addCriterion("file_id >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(Long value) { + addCriterion("file_id <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(Long value) { + addCriterion("file_id <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("file_id in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("file_id not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(Long value1, Long value2) { + addCriterion("file_id between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(Long value1, Long value2) { + addCriterion("file_id not between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andVersionIsNull() { + addCriterion("version is null"); + return (Criteria) this; + } + + public Criteria andVersionIsNotNull() { + addCriterion("version is not null"); + return (Criteria) this; + } + + public Criteria andVersionEqualTo(Integer value) { + addCriterion("version =", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotEqualTo(Integer value) { + addCriterion("version <>", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThan(Integer value) { + addCriterion("version >", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThanOrEqualTo(Integer value) { + addCriterion("version >=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThan(Integer value) { + addCriterion("version <", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThanOrEqualTo(Integer value) { + addCriterion("version <=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionIn(List values) { + addCriterion("version in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotIn(List values) { + addCriterion("version not in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionBetween(Integer value1, Integer value2) { + addCriterion("version between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotBetween(Integer value1, Integer value2) { + addCriterion("version not between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andSizeIsNull() { + addCriterion("size is null"); + return (Criteria) this; + } + + public Criteria andSizeIsNotNull() { + addCriterion("size is not null"); + return (Criteria) this; + } + + public Criteria andSizeEqualTo(Long value) { + addCriterion("size =", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotEqualTo(Long value) { + addCriterion("size <>", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThan(Long value) { + addCriterion("size >", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThanOrEqualTo(Long value) { + addCriterion("size >=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThan(Long value) { + addCriterion("size <", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThanOrEqualTo(Long value) { + addCriterion("size <=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeIn(List values) { + addCriterion("size in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotIn(List values) { + addCriterion("size not in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeBetween(Long value1, Long value2) { + addCriterion("size between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotBetween(Long value1, Long value2) { + addCriterion("size not between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIsNull() { + addCriterion("download_url is null"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIsNotNull() { + addCriterion("download_url is not null"); + return (Criteria) this; + } + + public Criteria andDownloadUrlEqualTo(String value) { + addCriterion("download_url =", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotEqualTo(String value) { + addCriterion("download_url <>", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlGreaterThan(String value) { + addCriterion("download_url >", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlGreaterThanOrEqualTo(String value) { + addCriterion("download_url >=", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLessThan(String value) { + addCriterion("download_url <", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLessThanOrEqualTo(String value) { + addCriterion("download_url <=", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLike(String value) { + addCriterion("download_url like", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotLike(String value) { + addCriterion("download_url not like", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIn(List values) { + addCriterion("download_url in", values, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotIn(List values) { + addCriterion("download_url not in", values, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlBetween(String value1, String value2) { + addCriterion("download_url between", value1, value2, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotBetween(String value1, String value2) { + addCriterion("download_url not between", value1, value2, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlIsNull() { + addCriterion("save_url is null"); + return (Criteria) this; + } + + public Criteria andSaveUrlIsNotNull() { + addCriterion("save_url is not null"); + return (Criteria) this; + } + + public Criteria andSaveUrlEqualTo(String value) { + addCriterion("save_url =", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlNotEqualTo(String value) { + addCriterion("save_url <>", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlGreaterThan(String value) { + addCriterion("save_url >", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlGreaterThanOrEqualTo(String value) { + addCriterion("save_url >=", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlLessThan(String value) { + addCriterion("save_url <", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlLessThanOrEqualTo(String value) { + addCriterion("save_url <=", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlLike(String value) { + addCriterion("save_url like", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlNotLike(String value) { + addCriterion("save_url not like", value, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlIn(List values) { + addCriterion("save_url in", values, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlNotIn(List values) { + addCriterion("save_url not in", values, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlBetween(String value1, String value2) { + addCriterion("save_url between", value1, value2, "saveUrl"); + return (Criteria) this; + } + + public Criteria andSaveUrlNotBetween(String value1, String value2) { + addCriterion("save_url not between", value1, value2, "saveUrl"); + return (Criteria) this; + } + + public Criteria andModifierIsNull() { + addCriterion("modifier is null"); + return (Criteria) this; + } + + public Criteria andModifierIsNotNull() { + addCriterion("modifier is not null"); + return (Criteria) this; + } + + public Criteria andModifierEqualTo(Long value) { + addCriterion("modifier =", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotEqualTo(Long value) { + addCriterion("modifier <>", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierGreaterThan(Long value) { + addCriterion("modifier >", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierGreaterThanOrEqualTo(Long value) { + addCriterion("modifier >=", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierLessThan(Long value) { + addCriterion("modifier <", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierLessThanOrEqualTo(Long value) { + addCriterion("modifier <=", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierIn(List values) { + addCriterion("modifier in", values, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotIn(List values) { + addCriterion("modifier not in", values, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierBetween(Long value1, Long value2) { + addCriterion("modifier between", value1, value2, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotBetween(Long value1, Long value2) { + addCriterion("modifier not between", value1, value2, "modifier"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotify.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotify.java new file mode 100644 index 00000000..a85b606e --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotify.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class WpsNotify implements Serializable { + private Long id; + + private String cmd; + + private String body; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCmd() { + return cmd; + } + + public void setCmd(String cmd) { + this.cmd = cmd == null ? null : cmd.trim(); + } + + public String getBody() { + return body; + } + + public void setBody(String body) { + this.body = body == null ? null : body.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", cmd=").append(cmd); + sb.append(", body=").append(body); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotifyExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotifyExample.java new file mode 100644 index 00000000..8d418877 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotifyExample.java @@ -0,0 +1,581 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class WpsNotifyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WpsNotifyExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCmdIsNull() { + addCriterion("cmd is null"); + return (Criteria) this; + } + + public Criteria andCmdIsNotNull() { + addCriterion("cmd is not null"); + return (Criteria) this; + } + + public Criteria andCmdEqualTo(String value) { + addCriterion("cmd =", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdNotEqualTo(String value) { + addCriterion("cmd <>", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdGreaterThan(String value) { + addCriterion("cmd >", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdGreaterThanOrEqualTo(String value) { + addCriterion("cmd >=", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdLessThan(String value) { + addCriterion("cmd <", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdLessThanOrEqualTo(String value) { + addCriterion("cmd <=", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdLike(String value) { + addCriterion("cmd like", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdNotLike(String value) { + addCriterion("cmd not like", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdIn(List values) { + addCriterion("cmd in", values, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdNotIn(List values) { + addCriterion("cmd not in", values, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdBetween(String value1, String value2) { + addCriterion("cmd between", value1, value2, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdNotBetween(String value1, String value2) { + addCriterion("cmd not between", value1, value2, "cmd"); + return (Criteria) this; + } + + public Criteria andBodyIsNull() { + addCriterion("body is null"); + return (Criteria) this; + } + + public Criteria andBodyIsNotNull() { + addCriterion("body is not null"); + return (Criteria) this; + } + + public Criteria andBodyEqualTo(String value) { + addCriterion("body =", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyNotEqualTo(String value) { + addCriterion("body <>", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyGreaterThan(String value) { + addCriterion("body >", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyGreaterThanOrEqualTo(String value) { + addCriterion("body >=", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyLessThan(String value) { + addCriterion("body <", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyLessThanOrEqualTo(String value) { + addCriterion("body <=", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyLike(String value) { + addCriterion("body like", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyNotLike(String value) { + addCriterion("body not like", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyIn(List values) { + addCriterion("body in", values, "body"); + return (Criteria) this; + } + + public Criteria andBodyNotIn(List values) { + addCriterion("body not in", values, "body"); + return (Criteria) this; + } + + public Criteria andBodyBetween(String value1, String value2) { + addCriterion("body between", value1, value2, "body"); + return (Criteria) this; + } + + public Criteria andBodyNotBetween(String value1, String value2) { + addCriterion("body not between", value1, value2, "body"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/ChartVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/ChartVo.java new file mode 100644 index 00000000..60d8a4ca --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/ChartVo.java @@ -0,0 +1,113 @@ +package com.ccsens.tall.bean.vo; + +import cn.hutool.core.util.ObjectUtil; +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Data +public class ChartVo { + + @Data + public static class ExecutorChart{ + @ApiModelProperty("查询类型") + private int type; + @ApiModelProperty("详细数据") + private List<__ExecutorChart> executorChart; + } + @Data + public static class __ExecutorChart{ + @ApiModelProperty("角色id") + private Long roleId; + @ApiModelProperty("角色名") + private String roleName; + @ApiModelProperty("value") + private int value; + } + + + @Data + public static class CompleteTaskNum{ + @ApiModelProperty("角色id") + private Long roleId; + @ApiModelProperty("角色名") + private String roleName; + @ApiModelProperty("完成数量/未完成的数量") + private int value; + @ApiModelProperty("任务总数") + private int total; + } + + + @Data + public static class ProjectTrendVo { + @ApiModelProperty("日期") + private String date; + @ApiModelProperty("当天任务总数") + private Integer total; + @ApiModelProperty("当天已完成的任务数") + private Integer completed; + } + + @Data + public static class ProjectOverview { + @ApiModelProperty("任务总数") + private Integer total; + @ApiModelProperty("已完成的任务数") + private Integer completed; + @ApiModelProperty("未完成的任务数") + private Integer undone; + @ApiModelProperty("按时完成") + private Integer completedOnTime; + @ApiModelProperty("逾期完成") + private Integer completedOverTime; + @ApiModelProperty("今天任务总数") + private Integer today; + @ApiModelProperty("今日已完成") + private Integer todayCompleted; + @ApiModelProperty("今日未完成") + private Integer todayUndone; + + public Integer getUndone(){ + if(ObjectUtil.isNotNull(total) && ObjectUtil.isNotNull(completed)){ + return total - completed; + } + return null; + } + + public Integer getCompletedOverTime(){ + if(ObjectUtil.isNotNull(completed) && ObjectUtil.isNotNull(completedOnTime)){ + return completed - completedOnTime; + } + return null; + } + + public Integer getTodayUndone(){ + if(ObjectUtil.isNotNull(today) && ObjectUtil.isNotNull(todayCompleted)){ + return today - todayCompleted; + } + return null; + } + } + + @Data + public static class BurnoutFigure { + @ApiModelProperty("日期 MM-DD") + private String date; + @ApiModelProperty("理想的剩余任务数,回出现小数 保留1位小数") + private BigDecimal ideal; + @ApiModelProperty("计划的剩余任务数") + private Integer planned; + @ApiModelProperty("实际的剩余任务数") + private Integer realistic; + @JsonIgnore//任务总数 + private Integer total; + @JsonIgnore//每天的任务数 + private Integer totalDay; + @JsonIgnore//每天完成的任务数量 + private Integer completed; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java index ef384669..2f9569f7 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/DeliverVo.java @@ -29,8 +29,8 @@ public class DeliverVo { public static class FilePath { @ApiModelProperty("文件ID") private Long fileId; - @JsonIgnore - private Long postLogId; + @ApiModelProperty("交付物上传的记录id") + private Long deliverLogId; @JsonIgnore private Date updateTime; @ApiModelProperty("交付物详情(备注)") @@ -41,6 +41,8 @@ public class DeliverVo { private Long deleteTime; @ApiModelProperty("交付物访问路径") private String url; + @ApiModelProperty("WPS文件信息") + private List wpsFilePaths; @ApiModelProperty("是否是历史交付物 1是 0不是") private String isHistory; @ApiModelProperty("该用户自身是否是此交付物的检查人") @@ -63,6 +65,8 @@ public class DeliverVo { private String checkerName; @ApiModelProperty("检查情况 0未检查,1合格,2不合格") private int checkerStatus; + @ApiModelProperty("检查人评分") + private int score; @ApiModelProperty("检查人备注") private String remark; } diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/DomainVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/DomainVo.java index ebbfa2f8..7c09a96a 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/DomainVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/DomainVo.java @@ -1,15 +1,17 @@ package com.ccsens.tall.bean.vo; -import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import lombok.Getter; -import lombok.Setter; +import java.util.List; + +/** + * @author 逗 + */ @Data public class DomainVo { - @ApiModel + @ApiModel("根据名字查找域配置信息") @Data public static class DomainInfo{ @ApiModelProperty("配置信息的id") @@ -33,6 +35,27 @@ public class DomainVo { private int showCalendar; @ApiModelProperty("不展示日历时。显示的项目的id") private Long showProjectId; + @ApiModelProperty("是否展示导航") + private int domainNav; + + @ApiModelProperty("域特有导航信息") + private List domainNavInfoList; } + @ApiModel + @Data + public static class DomainNavInfo{ + @ApiModelProperty("首页") + private String text; + @ApiModelProperty("0 -> 内部链接, 1 -> 外部链接") + private Integer type; + @ApiModelProperty("导航对应的链接") + private String path; + @ApiModelProperty("参数") + private String params; + @ApiModelProperty("导航栏图标") + private String icon; + @ApiModelProperty("0 -> 左侧/上 1 -> 右侧/下") + private Integer position; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/LabelVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/LabelVo.java new file mode 100644 index 00000000..975b269c --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/LabelVo.java @@ -0,0 +1,31 @@ +package com.ccsens.tall.bean.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.beans.BeanUtils; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.math.BigDecimal; + +@Data +public class LabelVo { + @Data + @ApiModel("查询标签返回") + public static class SelectLabel{ + @ApiModelProperty("标签id") + private Long id; + @ApiModelProperty("标签名") + private String name; + @ApiModelProperty("标签code") + private String code; + @ApiModelProperty("颜色") + private String color; + @ApiModelProperty("备注信息") + private String description; + @ApiModelProperty("优先级") + private int level; + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/MemberVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/MemberVo.java index 6c27ab71..f9d5fb3d 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/MemberVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/MemberVo.java @@ -1,12 +1,10 @@ package com.ccsens.tall.bean.vo; import lombok.Data; -import lombok.Getter; -import lombok.Setter; - -import java.util.ArrayList; -import java.util.List; +/** + * @author 逗 + */ @Data public class MemberVo { @@ -37,9 +35,5 @@ public class MemberVo { // private String roleExclude; // private List memberList; // } -// @Data -// public static class Member{ -// private Long id; -// private String name; -// } + } diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/MessageVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/MessageVo.java new file mode 100644 index 00000000..a09d3c7d --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/MessageVo.java @@ -0,0 +1,207 @@ +package com.ccsens.tall.bean.vo; + +import com.alibaba.fastjson.JSONObject; +import com.ccsens.util.WebConstant; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: whj + * @time: 2020/5/26 15:05 + */ +public class MessageVo { + + + + + @Data + @ApiModel("消息通知--前端") + public static class InformToWeb{ + @ApiModelProperty("消息Id") + private Long id; + @ApiModelProperty("消息列表") + private List messages; + } + + @Data + @ApiModel("消息通知") + public static class Inform{ + @ApiModelProperty("项目ID") + private Long projectId; + @ApiModelProperty("操作者ID") + private Long operatorId; + @ApiModelProperty("消息列表") + private List messages = new ArrayList<>(); + + public Inform() { + } + + public Inform(Long projectId, Long operatorId) { + this.projectId = projectId; + this.operatorId = operatorId; + } + + public Inform appendMessage(Message message) { + messages.add(message); + return this; + } + } + + @Data + @ApiModel("消息内容") + public static class Message { + @ApiModelProperty("消息属性") + private String name; + @ApiModelProperty("消息内容") + private String content; + @ApiModelProperty("类型 0:文本 1:链接") + private Byte type = 0; + @ApiModelProperty("配置") + private String settings; + + public static String getProjectSettings(Long projectId) { + JSONObject json = new JSONObject(); + json.put(WebConstant.Project.PROJECT_ID, projectId); + return json.toJSONString(); + } + + public Message() { + } + public Message(String content) { + this.content = content; + } + public Message(String name, String content) { + this.name = name; + this.content = content; + } + + public Message(String name, String content, Byte type, String settings) { + this.name = name; + this.content = content; + this.type = type; + this.settings = settings; + } + } + + + + + /** + * 组装添加任务模板 + * @param userId + * @param userName + * @param projectId + * @param projectName + * @param taskName + * @param principal + * @return + */ + public static Inform addTask(Long userId, String userName, Long projectId, String projectName, String taskName, String principal) { + MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); + inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Principal.value,principal)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)); + return inform; + } + + /** + * 组装完成任务模板 + * @param userId + * @param userName + * @param projectId + * @param projectName + * @param isFinish + * @param taskName + * @return + */ + public static Inform finishTask(Long userId, String userName, Long projectId, String projectName, String isFinish, String taskName) { + MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); + inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operate.value, isFinish)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)); + return inform; + } + + /** + * 上传交付物 + * @param userId + * @param userName + * @param projectId + * @param projectName + * @param taskName + * @param deliverName + * @return + */ + public static Inform addDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String deliverName) { + MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); + inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)); + return inform; + } + + /** + * 检查交付物 + * @param userId + * @param userName + * @param projectId + * @param projectName + * @param taskName + * @param principalName + * @param deliverName + * @return + */ + public static Inform checkDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String principalName, String deliverName) { + MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); + inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Principal.value,principalName)); + return inform; + } + + public static Inform deleteDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String deliverName) { + MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); + inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)); + return inform; + } + + public static Inform deleteTask(Long userId, String userName, Long projectId, String projectName, String taskName) { + MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); + inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)); + return inform; + + } + + public static Inform changeTask(Long userId, String userName, Long projectId, String projectName, String taskName, String principal) { + MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); + inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Principal.value,principal)); + return inform; + } + + public static Inform addComment(Long userId, String userName, Long projectId, String projectName, String taskName) { + MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); + inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) + .appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)); + return inform; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java index 6551962b..405a02e4 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java @@ -3,8 +3,6 @@ package com.ccsens.tall.bean.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import lombok.Getter; -import lombok.Setter; @Data public class PluginVo { @@ -59,6 +57,40 @@ public class PluginVo { private Long commentTime; @ApiModelProperty("评论内容") private String description; + @ApiModelProperty("是否属于自己的评论,0否 1是") + private int mine; } + + @ApiModel("笔记后返回") + @Data + public static class NotesInfo { + @ApiModelProperty("id") + private Long id; + @ApiModelProperty("任务id") + private Long taskId; + @ApiModelProperty("角色Id") + private Long roleId; + @ApiModelProperty("插件id") + private Long pluginId; + @ApiModelProperty("记笔记的时间") + private Long notesTime; + @ApiModelProperty("笔记内容") + private String value; + @ApiModelProperty("是否公开展示 0否 1是") + private int publicity; + } + + @ApiModel("会议记录返回") + @Data + public static class MinutesInfo { + @ApiModelProperty("查看路径") + private String wpsPath; + @ApiModelProperty("下载路径") + private String downloadPath; + @ApiModelProperty("文件id") + private Long wpsFileId; + } + + } diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectMessageVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectMessageVo.java new file mode 100644 index 00000000..03b464cd --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectMessageVo.java @@ -0,0 +1,60 @@ +package com.ccsens.tall.bean.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @description: + * @author: whj + * @time: 2020/5/28 17:34 + */ +@ApiModel("未读消息相关返回结果") +public class ProjectMessageVo { + @Data + @ApiModel("未读消息数-返回") + public static class UnreadNum{ + @ApiModelProperty("发送类型 0:ws,1:微信公众号") + private Integer unreadNum; + } + + @Data + @ApiModel("未读消息-返回") + @JsonIgnoreProperties(value = { "handler" }) + public static class Query{ + @ApiModelProperty("发送消息ID") + private Long id; + @JsonIgnore + @ApiModelProperty("消息操作ID") + private Long operationId; + @ApiModelProperty("发送类型 0:ws,1:微信公众号") + private Byte sendType; + @ApiModelProperty("阅读状态 0未读 1已读") + private Byte readStatus; + @ApiModelProperty("消息内容") + List messages; + @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone = "GMT-5") + @ApiModelProperty("发送时间") + private Date createTime; + } + + @Data + @ApiModel("项目动态-返回") + @JsonIgnoreProperties(value = { "handler" }) + public static class ProjectMsg{ + @JsonIgnore + @ApiModelProperty("消息操作ID") + private Long operationId; + @ApiModelProperty("消息内容") + List messages; + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + @ApiModelProperty("发送时间") + private Date createTime; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java index f3f71c44..541d5258 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java @@ -9,6 +9,7 @@ import lombok.Data; import lombok.Getter; import lombok.Setter; +import java.util.ArrayList; import java.util.List; @Data public class ProjectVo { @@ -30,13 +31,19 @@ public class ProjectVo { @ApiModelProperty("项目进行状态:0未开始,1进行中,2已过期") private Integer process; @ApiModelProperty("当前用户在本项目中的角色") - private List roles; + private List roles = new ArrayList<>(); @ApiModelProperty("当前用户在本项目中的最高权限") private int power; @ApiModelProperty("当前用户是否是本项目的创建者") private boolean creator; @ApiModelProperty("项目配置") private ProjectConfig projectConfig; + @ApiModelProperty("标签信息") + private List labelList; + @ApiModelProperty("未处理信息的数量") + private ProjectUnreadMsg projectUnreadMsg; + @ApiModelProperty("WPS文件信息") + private List wpsFilePaths; public Long getTotalDuration(){ if(ObjectUtil.isNotNull(endTime) && ObjectUtil.isNotNull(beginTime)){ @@ -69,7 +76,7 @@ public class ProjectVo { return false; } ProjectInfo o = (ProjectInfo)obj; - if(this.id == o.id) { + if(this.id.equals(o.id)) { return true; } return false; @@ -77,25 +84,55 @@ public class ProjectVo { @Override public int hashCode(){ - return (int)((id.longValue() / 1000)); + return (int)((id / 1000)); } } - @ApiModel + @Data + @ApiModel("项目下未处理的消息数量") + public static class ProjectUnreadMsg{ + @ApiModelProperty("未处理的消息总数") + private Integer totalNum; + @ApiModelProperty("ring消息") + private Integer ringNum = 0; + @ApiModelProperty("check消息") + private Integer checkNum = 0; + @ApiModelProperty("交付物消息") + private Integer deliverNum = 0; + + public Integer getTotalNum(){ + return ringNum + checkNum + deliverNum; + } + } + +// @Data +// @ApiModel("WBS文件信息") +// public static class WbsFileInfo{ +// @ApiModelProperty("文件路径") +// private String filePath; +// @ApiModelProperty("wps的文件id") +// private Long wpsFileId; +// } + + @ApiModel("返回的项目配置信息") @Data public static class ProjectConfig{ @ApiModelProperty("上下滑动类型 0:上下滑动 1:只支持向下滑 2:只支持上滑 4:上下都不滑动") - private int slide; + private int slide = 0; @ApiModelProperty("筛选框显示 0:都显示 1:都不显示 2.只展示时间轴/清单") - private int filter; + private int filter = 0; @ApiModelProperty("是否展示添加任务按钮 0:不展示 1:展示") - private int createTask; + private int createTask = 1; @ApiModelProperty("是否展示MVP 0:不展示 1:展示") - private int showMvp; + private int showMvp = 1; @JsonIgnore//0日程,1天,2周,3月 - private int selectTaskType; + private int selectTaskType = 1; @ApiModelProperty("查询任务类型") private String selectType; + @ApiModelProperty("第三列展示页面的路径") + private String detailPath = "/project"; + @ApiModelProperty("项目关联pims域内的导航栏信息 0无关联 1例会系统 2财务系统 3课程") + private int pimsNavType = 0; public String getSelectType(){ if(ObjectUtil.isNull(selectTaskType)) { @@ -111,6 +148,7 @@ public class ProjectVo { } } + @ApiModel @Data public static class RoleInfo{ @@ -122,10 +160,14 @@ public class ProjectVo { private boolean pm; @ApiModelProperty("当前用户是否属于该角色") private boolean mine; + @ApiModelProperty("是否是变身后 0否 1是") + private byte imitation = 0; @ApiModelProperty("是否是当前角色的奖惩干系人") private boolean stakeholder; @ApiModelProperty("该角色是否显示") - private Boolean isShow; + private Boolean isShow = true; + @ApiModelProperty("是否是项目虚拟的角色 0否 1是") + private byte projectRole = 0; @ApiModelProperty("成员信息") private List members; @JsonIgnore @@ -265,5 +307,43 @@ public class ProjectVo { private String name; } + @ApiModel + @Data + public static class RelevanceProject { + @ApiModelProperty("项目id") + private Long id; + @ApiModelProperty("项目名称") + private String name; + @ApiModelProperty("地点") + private String address; + @ApiModelProperty("项目开始时间(milltime)") + private Long beginTime; + @ApiModelProperty("项目时长(milltime)") + private Long totalDuration; + @ApiModelProperty("项目结束时间(milltime)") + private Long endTime; + @ApiModelProperty("标签信息") + private List labelList; + + public Long getTotalDuration() { + if (ObjectUtil.isNotNull(endTime) && ObjectUtil.isNotNull(beginTime)) { + return endTime - beginTime; + } + return null; + } + } + + @Data + @ApiModel("关注者的信息") + public static class AttentionInfo{ + @ApiModelProperty("关注者id") + private Long attentionId; + @ApiModelProperty("关注者的姓名") + private String attentionName; + @ApiModelProperty("关注者头像") + private String avatarUrl; + @ApiModelProperty("关注者手机号") + private String phone; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/RingVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/RingVo.java new file mode 100644 index 00000000..fea38106 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/RingVo.java @@ -0,0 +1,76 @@ +package com.ccsens.tall.bean.vo; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class RingVo { + @Data + @ApiModel("返回ring消息") + public static class PageInfoRing{ + @ApiModelProperty("当前页数") + private Integer pageNum; + @ApiModelProperty("总页数") + private Integer totalPage ; + @JsonIgnore //"总数据量" + private Integer size ; + } + @Data + @ApiModel("查找ring消息") + public static class RingInfo{ + @ApiModelProperty("消息id") + private Long messageId; + @ApiModelProperty("消息内容") + private String value; + @ApiModelProperty("消息发送时间") + private Long time; + @ApiModelProperty("是否是自己发送的消息 0否 1是") + private Integer mine; + @ApiModelProperty("未读数量") + private Integer unread; + @ApiModelProperty("发送者信息") + private MsgSender sender; + @ApiModelProperty("接收角色的信息") + private List roleList = new ArrayList<>(); + } + + @Data + @ApiModel("发送者信息") + public static class MsgReceiveRole{ + @ApiModelProperty("接收者的角色id") + private Long id; + @ApiModelProperty("接收者的角色名") + private String name; + @ApiModelProperty("该角色是否已读") + private Integer readStatus; + } + + @Data + @ApiModel("接收者信息") + public static class MsgSender{ + @ApiModelProperty("发送者的id") + private Long id; + @ApiModelProperty("发送者的名字") + private String name; + @ApiModelProperty("发送者的头像") + private String avatarUrl; + } + + @Data + @ApiModel("发送后返回消息详情") + public static class RingInfoByReturn{ + @ApiModelProperty("消息id") + private Long messageId; + @ApiModelProperty("消息内容") + private String value; + @ApiModelProperty("消息发送时间") + private Long time; + @ApiModelProperty("接收角色的信息") + private List roleList = new ArrayList<>(); + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/RoleVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/RoleVo.java new file mode 100644 index 00000000..11298007 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/RoleVo.java @@ -0,0 +1,20 @@ +package com.ccsens.tall.bean.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author 逗 + */ +@Data +public class RoleVo { + @Data + @ApiModel("查找项目下的所有角色(包括全体成员)") + public static class RoleByProjectId{ + @ApiModelProperty("角色id") + private Long roleId; + @ApiModelProperty("角色名") + private String roleName; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java index f79bab9e..d6920221 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java @@ -1,13 +1,17 @@ package com.ccsens.tall.bean.vo; import cn.hutool.core.util.ObjectUtil; +import com.ccsens.util.exception.BaseException; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.github.pagehelper.PageInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.Getter; import lombok.Setter; +import javax.validation.constraints.NotNull; +import java.io.ByteArrayInputStream; import java.math.BigDecimal; import java.util.List; @@ -96,12 +100,6 @@ public class TaskVo { private Long endTime; @ApiModelProperty("时长") private Long duration; -// @ApiModelProperty("显示的日期格式") -// private String showTimeFormat; -// @ApiModelProperty("是否展示快捷方式(交付物硬件按钮)0不展示 1展示") -// private int showShortcuts; -// @ApiModelProperty("是否展示添加任务的按钮 0不展示 1展示") -// private int createTask; @ApiModelProperty("循环周期") private String cycle; @ApiModelProperty("跳转模式 0自动,1延迟,2手动") @@ -120,6 +118,10 @@ public class TaskVo { private BigDecimal money; @ApiModelProperty("状态:0-未开始,1-进行中,2-已完成") private int process; + @ApiModelProperty("子项目id") + private Long subProjectId; + @ApiModelProperty("子项目名字") + private String subProjectName; @ApiModelProperty("服务器时间") private Long serverTime; @ApiModelProperty("任务类型 0普通任务 1虚拟任务") @@ -138,13 +140,18 @@ public class TaskVo { private int sequence; @ApiModelProperty("任务配置") private ProTaskShow proTaskConfig; - @ApiModelProperty("页面/接口路径") private String webPath; @ApiModelProperty("程序位置 0:tall内部,1外部") private Byte routineLocation; @ApiModelProperty("入参") private String importParam; + @ApiModelProperty("优先级 默认0 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急") + private Byte priority; + @ApiModelProperty("是否是里程碑 0否 1是") + private Byte milestone; + @ApiModelProperty("提醒的信息") + private List remindInfoList; public Long getDuration(){ if(ObjectUtil.isNotNull(beginTime) && ObjectUtil.isNotNull(endTime)) { return endTime - beginTime; @@ -214,6 +221,14 @@ public class TaskVo { private String name; @ApiModelProperty("插件描述") private String description; + @ApiModelProperty("显示分类") + private String showType; + @ApiModelProperty("页面/接口路径") + private String webPath; + @ApiModelProperty("程序位置 0:tall内部,1外部") + private Byte routineLocation; + @ApiModelProperty("入参") + private String importParam; @JsonIgnore private Long roleId; } @@ -319,9 +334,150 @@ public class TaskVo { private String projectName; } -// @Data -// public static class FirstTask{ -// private Long id; -// private String taskName; -// } + + @ApiModel("看板信息") + @Data + public static class KanBan{ + @ApiModelProperty("状态code") + private Integer code; + @ApiModelProperty("状态名字") + private String typeName; + @ApiModelProperty("任务列表") + private com.github.pagehelper.PageInfo taskList; + } + + @ApiModel("看板信息任务列表") + @Data + public static class KanBanTask{ + @ApiModelProperty("任务id") + private Long id; + @ApiModelProperty("任务名称") + private String taskName; + @ApiModelProperty("任务详情id") + private Long taskDetailId; + @ApiModelProperty("角色Id") + private Long roleId; + @ApiModelProperty("角色名字") + private String roleName; + @ApiModelProperty("开始时间") + private Long taskBeginTime; + @ApiModelProperty("结束时间") + private Long taskEndTime; + @ApiModelProperty("是否是自己的任务 0否 1是") + private Integer mine; + } + + @Data + public static class RemindTask{ + //任务详情id + private Long taskDetailId; + //任务id(任务日期id) + private Long subTaskId; + //任务名 + private String taskName; + //任务开始时间 + private String taskBeginTime; + //任务结束时间 + private String taskEndTime; + //提醒信息的id + private Long remindId; + //需要被提醒的时间 + private String absoluteTime; + //提醒的时机 + private Byte timing; + //任务负责人id(需要被提醒) + private Long executorRole; + //项目id + private Long projectId; + //项目名 + private String projectName; + } + @ApiModel + @Data + public static class RemindInfo{ + @ApiModelProperty("提醒记录的id") + private Long remindId; + @ApiModelProperty("提醒的时机") + private Integer remindTiming; + @ApiModelProperty("时间") + private String time; + } + + /** + * 会议纪要里的任务信息 + */ + @Data + public static class TaskMinutesWps{ + private Long taskSubTimeId; + //负责人角色名 + private String executorRoleName; + //任务名 + private String taskName; + //计划开始时间 + private String beginTime; + //计划结束时间 + private String endTime; + //实际开始时间 + private String realBeginTime; + //实际结束时间 + private String realEndTime; + //评论 + private List comment; + //交付物 + private List deliverList; + @Data + public static class CommentByMinutes{ + private Long commentId; + //发送者的名字 + private String userName; + //评论内容 + private String commentValue; + } + @Data + public static class DeliverByMinutes{ + private Long deliverId; + //交付物名 + private String deliverName; + //交付物文件地址,没有则为空 + private String deliverPath; + } + } + + + @Data + @ApiModel("根据项目id查询所有任务信息") + public static class TaskListByProjectId{ + @ApiModelProperty("任务详细信息id") + private Long detailId; + @ApiModelProperty("名称") + private String name; + @ApiModelProperty("详细描述") + private String description; + @ApiModelProperty("所属项目id") + private Long projectId; + @ApiModelProperty("所属项目名称") + private String projectName; + @ApiModelProperty("负责人Id") + private Long executorRole; + @ApiModelProperty("负责人名称") + private String executorRoleName; + @ApiModelProperty("交付物id") + private Long deliverId; + @ApiModelProperty("交付物名称") + private String deliverName; + @ApiModelProperty("开始时间") + private Long beginTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("循环周期") + private String cycle; + @ApiModelProperty("奖惩") + private BigDecimal money; + @ApiModelProperty("优先级 默认0 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急") + private Byte priority; + @ApiModelProperty("是否是里程碑 0否 1是") + private Byte milestone; + @ApiModelProperty("二级任务") + private List secondTasks; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java index eff45bb8..d0d18891 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java @@ -1,11 +1,16 @@ package com.ccsens.tall.bean.vo; import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.Getter; import lombok.Setter; + +import java.util.Date; +import java.util.List; + @Data public class UserVo { @Data @@ -81,4 +86,83 @@ public class UserVo { @ApiModelProperty("语言") private String language; } + + @Data + @ApiModel("公众号用户") + public static class Oauth2WX{ + @ApiModelProperty("openid") + private String openid; + @ApiModelProperty("用户id") + private Long userId; + } + + @Data + @ApiModel("用户信息") + public static class UserInfo { + @ApiModelProperty("用户id") + private Long id; + @ApiModelProperty("昵称") + private String nickname; + @ApiModelProperty("头像") + private String avatarUrl; + } + + @Data + @ApiModel("查询个人信息") + public static class SelectUserInfo{ + @ApiModelProperty("userId") + private Long id; + @ApiModelProperty("账号") + private String account; + @ApiModelProperty("手机号") + private String phone; + @ApiModelProperty("昵称") + private String nickname; + @ApiModelProperty("头像") + private String avatarUrl; + @ApiModelProperty("个人签名") + private String signature; + @ApiModelProperty("个人简介") + private String introduction; + @ApiModelProperty("生日") + private String birthday; + @ApiModelProperty("所在地") + private String address; + @ApiModelProperty("网页") + private String webPath; + @ApiModelProperty("公司") + private String company; + @ApiModelProperty("职位") + private String position; + @ApiModelProperty("已使用tall多少天") + private Integer dayOfUseTall; + @JsonIgnore // 已使用tall多少天 + private Date createdAt; + @ApiModelProperty("空间使用情况") + private Interspace interspace; + @ApiModelProperty("标签信息") + private List labelList; + } + + @Data + @ApiModel("空间使用信息") + public static class Interspace{ + @ApiModelProperty("空间已有项目") + private Integer projectNum; + @ApiModelProperty("空间总项目(目前写无限制)") + private Integer projectTotal; + @ApiModelProperty("空间剩余(目前写无限制)") + private Integer interspaceResidue; + @ApiModelProperty("总空间(目前写无限制)") + private Integer interspaceTotal; + } + + @Data + @ApiModel("返回图片验证码") + public static class VerificationCode{ + @ApiModelProperty("图片验证码Id") + private String verificationCodeId; + @ApiModelProperty("图片的Base64字符串") + private String imageBase64; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java new file mode 100644 index 00000000..42c1ca9f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java @@ -0,0 +1,285 @@ +package com.ccsens.tall.bean.vo; + +import com.ccsens.tall.bean.po.WpsFile; +import com.ccsens.util.WebConstant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @description: wps相关接口返回值 + * @author: whj + * @time: 2020/6/18 10:21 + */ +@ApiModel("wps相关接口返回值") +public class WpsVo { + @Data + @ApiModel("文件历史版本信息返回") + public static class FileHistory{ + private List histories; + + public FileHistory(List histories) { + this.histories = histories; + } + } + + @Data + @ApiModel("文件历史版本信息子元素") + public static class FileHistoryMsg { + @ApiModelProperty("文件id,字符串长度小于40") + private String id; + @ApiModelProperty("文件名") + private String name; + @ApiModelProperty("当前版本号,位数小于11") + private Integer version; + @ApiModelProperty("文件大小,单位为B") + private int size; + @ApiModelProperty("文档下载地址") + @JsonProperty("download_url") + private String downloadUrl; + private int create_time; + private int modify_time; + private UserBase creator; + private UserBase modifier; + @JsonIgnore + private Long creator_id; + @JsonIgnore + private Long modifier_id; + @JsonIgnore + private Long fileVersionId; + } + + @Data + @ApiModel("获取用户信息返回") + public static class FileNew{ + @ApiModelProperty("文件路径") + private String redirect_url; + @ApiModelProperty("用户iD") + private String user_id; + } + + @Data + @ApiModel("获取用户信息返回") + public static class UserInfo{ + private List users; + + public static UserInfo getInstance(List infos) { + List userBases = new ArrayList<>(); + infos.forEach(info -> { + UserBase base = new UserBase(); + base.setId(String.valueOf(info.getId())); + base.setName(info.getNickname()); + base.setAvatar_url(info.getAvatarUrl()); + userBases.add(base); + }); + UserInfo userInfo = new UserInfo(); + userInfo.setUsers(userBases); + return userInfo; + } + } + + @ApiModel("用户基本信息") + @Data + public static class UserBase{ + @ApiModelProperty("用户id") + private String id; + @ApiModelProperty("用户名称") + private String name; + @ApiModelProperty("用户头像地址") + private String avatar_url; + + } + + @ApiModel("文件保存返回信息") + @Data + public static class FileSave { + @ApiModelProperty("文件基本信息") + private FileBase file; + + public FileSave(FileBase file) { + this.file = file; + } + } + + @Data + @ApiModel("文件基本信息") + public static class FileBase { + @ApiModelProperty("文件id,字符串长度小于40") + private String id; + @ApiModelProperty("文件名") + private String name; + @ApiModelProperty("当前版本号,位数小于11") + @JsonProperty("version") + private Integer currentVersion; + @ApiModelProperty("文件大小,单位为B") + private int size; + @ApiModelProperty("文档下载地址") + @JsonProperty("download_url") + private String downloadUrl; + private String creator; + private String modifier; + + private int create_time; + private int modify_time; + @JsonIgnore + private Long fileVersionId; + public FileBase(){} + public FileBase(WpsFile wpsFile) { + this.id = String.valueOf(wpsFile.getId()); + this.name = wpsFile.getName(); + this.currentVersion = wpsFile.getCurrentVersion(); + this.size = (int)(long)wpsFile.getSize(); + this.downloadUrl = wpsFile.getDownloadUrl(); + this.creator = String.valueOf(wpsFile.getCreator()); + this.modifier = String.valueOf(wpsFile.getModifier()); + this.create_time = (int) (wpsFile.getCreatedAt().getTime()/1000); + this.modify_time = (int) (wpsFile.getUpdatedAt().getTime()/1000); + } + } + + @Data + @ApiModel("文件信息查询返回") + public static class FileInfo{ + @ApiModelProperty("文件信息") + private File file; + @ApiModelProperty("用户信息") + private User user; + } + + @ApiModel("文件信息") + @Data + public static class File{ + @ApiModelProperty("文件id,字符串长度小于40") + private String id; + @ApiModelProperty("文件名") + private String name; + @ApiModelProperty("当前版本号,位数小于11") + private Integer version; + @ApiModelProperty("文件大小,单位为B") + + private Integer size; + @ApiModelProperty("文档下载地址") + private String download_url; + @ApiModelProperty("创建者id,字符串长度小于40") + private String creator; + @ApiModelProperty("创建时间,时间戳,单位为秒") + private Integer create_time; + @ApiModelProperty("修改者id,字符串长度小于40") + private String modifier; + @ApiModelProperty("修改时间,时间戳,单位为秒") + private Integer modify_time; + @ApiModelProperty("用户权限") + private UserAcl user_acl = new UserAcl(); + @ApiModelProperty("水印") + private Watermark watermark; + + public File(String id, String name, Integer version, long size, String download_url, String creator, long create_time, String modifier, long modify_time) { + this.id = id; + this.name = name; + this.version = version; + this.size = (int)size; + this.download_url = download_url; + this.creator = creator; + this.create_time = (int)create_time; + this.modifier = modifier; + this.modify_time = (int)modify_time; + } + + public static File beanToVo(WpsFile wpsFile, String name) { + File file = new File(wpsFile.getId()+"", wpsFile.getName(), + wpsFile.getCurrentVersion(), wpsFile.getSize(), + wpsFile.getDownloadUrl(), wpsFile.getCreator() + "", + wpsFile.getCreatedAt().getTime()/1000, + wpsFile.getModifier() + "", + wpsFile.getUpdatedAt().getTime()/1000 + ); +// Watermark watermark = new Watermark(StrUtil.isEmpty(name) ? WebConstant.DEFAULT_NICKNAME : name); +// file.watermark = watermark; + return file; + } + } + + @ApiModel("用户信息") + @Data + public static class User{ + @ApiModelProperty("用户id") + private String id; + @ApiModelProperty("用户名称") + private String name; + @ApiModelProperty("用户操作权限,write:可编辑,read:预览") + private String permission = WebConstant.Wps.PERMISSION_READ; + @ApiModelProperty("用户头像地址") + private String avatar_url; + + public static User getInstance(UserVo.UserInfo userInfo) { + User user = new User(); + user.setId(String.valueOf(userInfo.getId())); + user.setName(userInfo.getNickname()); + user.setAvatar_url(userInfo.getAvatarUrl()); + return user; + } + } + + @ApiModel("用户权限信息") + @Data + public static class UserAcl{ + @ApiModelProperty("重命名权限,1为打开该权限,0为关闭该权限,默认为0") + private Byte rename = 1; + @ApiModelProperty("历史版本权限,1为打开该权限,0为关闭该权限,默认为1") + private Byte history = 1; + @ApiModelProperty("复制") + private Byte copy = 1; + @ApiModelProperty("导出PDF") + private Byte export = 1; + @ApiModelProperty("打印") + private Byte print = 1; + + } + + @ApiModel("水印信息") + @Data + public static class Watermark{ + @ApiModelProperty("水印类型, 0为无水印; 1为文字水印") + private Byte type; + @ApiModelProperty("文字水印的文字,当type为1时此字段必选") + private String value; + @ApiModelProperty("水印的透明度,非必选,有默认值") + private String fillstyle; + @ApiModelProperty("水印的字体,非必选,有默认值") + private String font; + @ApiModelProperty("水印的旋转度,非必选,有默认值") + private String rotate; + @ApiModelProperty("水印水平间距,非必选,有默认值") + private String horizontal; + @ApiModelProperty("水印垂直间距,非必选,有默认值") + private String vertical; + + public Watermark(String value) { + this.type = 1; + this.value = value; + } + } + + @ApiModel("业务关联的文件") + @Data + public static class BusinessFile{ + @ApiModelProperty("文件ID") + private Long fileId; + @ApiModelProperty("文件名字") + private String fileName; + } + + + @Data + public static class BusinessFileIdAndPath{ + @ApiModelProperty("业务id") + private Long businessId; + @ApiModelProperty("文件路径") + private String filePath; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java index 38610bb1..157e6222 100644 --- a/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java +++ b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java @@ -137,13 +137,17 @@ public class SpringConfig implements WebMvcConfigurer { .excludePathPatterns("/users/smscode") .excludePathPatterns("/users/signup/**") .excludePathPatterns("/users/password") + .excludePathPatterns("/users/password/account") .excludePathPatterns("/users/account") .excludePathPatterns("/users/token") .excludePathPatterns("/users/claims") .excludePathPatterns("/users/member") + .excludePathPatterns("/users/memberByTask") .excludePathPatterns("/users/allMemberAll") .excludePathPatterns("/users/userId") .excludePathPatterns("/users/mergeUserId") + .excludePathPatterns("/users/code") + .excludePathPatterns("/users/getUserInfo") .addPathPatterns("/plugins/**") .excludePathPatterns("/plugins/sign") .excludePathPatterns("/plugins/fuzzy") @@ -153,7 +157,11 @@ public class SpringConfig implements WebMvcConfigurer { .excludePathPatterns("/tasks/projectId") .addPathPatterns("/members/**") .addPathPatterns("/templates/**") - .addPathPatterns("/hardware/**"); + .addPathPatterns("/hardware/**") + .addPathPatterns("/labels/**") + .addPathPatterns("/charts/**") + .addPathPatterns("/ring/**") + .addPathPatterns("/roles/**"); //super.addInterceptors(registry); } diff --git a/tall/src/main/java/com/ccsens/tall/intercept/MybatisInterceptor.java b/tall/src/main/java/com/ccsens/tall/intercept/MybatisInterceptor.java index e35e1230..25367769 100644 --- a/tall/src/main/java/com/ccsens/tall/intercept/MybatisInterceptor.java +++ b/tall/src/main/java/com/ccsens/tall/intercept/MybatisInterceptor.java @@ -3,7 +3,10 @@ package com.ccsens.tall.intercept; import cn.hutool.core.collection.CollectionUtil; import com.ccsens.util.WebConstant; import org.apache.ibatis.executor.Executor; -import org.apache.ibatis.mapping.*; +import org.apache.ibatis.mapping.BoundSql; +import org.apache.ibatis.mapping.MappedStatement; +import org.apache.ibatis.mapping.ResultMap; +import org.apache.ibatis.mapping.SqlSource; import org.apache.ibatis.plugin.*; import org.apache.ibatis.reflection.DefaultReflectorFactory; import org.apache.ibatis.reflection.MetaObject; @@ -12,8 +15,10 @@ import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory; import org.apache.ibatis.session.ResultHandler; import org.apache.ibatis.session.RowBounds; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; +import java.util.Map; import java.util.Properties; /** @@ -34,43 +39,21 @@ public class MybatisInterceptor implements Interceptor { String selectByExample = "selectByExample"; + String countByExample = "countByExample"; + String countByExample2 = "selectByExample_COUNT"; String selectByPrimaryKey = "selectByPrimaryKey"; Object[] args = invocation.getArgs(); MappedStatement statement = (MappedStatement) args[0]; - if (statement.getId().endsWith(selectByExample)) { + if (statement.getId().endsWith(selectByExample) + || statement.getId().endsWith(countByExample) + || statement.getId().endsWith(countByExample2)) { //XXXExample Object example = args[1]; - Method method = example.getClass().getMethod("getOredCriteria", null); - //获取到条件数组,第一个是Criteria - List list = (List)method.invoke(example); - if (CollectionUtil.isEmpty(list)) { - Class clazz = ((ResultMap)statement.getResultMaps().get(0)).getType(); - String exampleName = clazz.getName() + "Example"; - Object paramExample = Class.forName(exampleName).newInstance(); - Method createCriteria = paramExample.getClass().getMethod("createCriteria"); - Object criteria = createCriteria.invoke(paramExample); - Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); - andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); - list.add(criteria); - } else { - Object criteria = list.get(0); - Method getCriteria = criteria.getClass().getMethod("getCriteria"); - List params = (List)getCriteria.invoke(criteria); - boolean hasDel = false; - for(Object param: params) { - Method getCondition = param.getClass().getMethod("getCondition"); - Object condition = getCondition.invoke(param); - if ("iis_del =".equals(condition)) { - hasDel = true; - } - } - if (!hasDel) { - Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); - andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); - } - } + addCondition(statement, example); + + } else if (statement.getId().endsWith(selectByPrimaryKey)) { @@ -85,6 +68,45 @@ public class MybatisInterceptor implements Interceptor { return invocation.proceed(); } + private void addCondition(MappedStatement statement, Object example) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException { + if (example instanceof Map) { + example = ((Map) example).get("_ORIGINAL_PARAMETER_OBJECT"); + } + + + Method method = example.getClass().getMethod("getOredCriteria", null); + //获取到条件数组,第一个是Criteria + List list = (List) method.invoke(example); + if (CollectionUtil.isEmpty(list)) { + Class clazz = ((ResultMap) statement.getResultMaps().get(0)).getType(); + String exampleName = clazz.getName() + "Example"; + Object paramExample = Class.forName(exampleName).newInstance(); + Method createCriteria = paramExample.getClass().getMethod("createCriteria"); + Object criteria = createCriteria.invoke(paramExample); + Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); + andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); + list.add(criteria); + } else { + Object criteria = list.get(0); + Method getCriteria = criteria.getClass().getMethod("getCriteria"); + List params = (List) getCriteria.invoke(criteria); + boolean hasDel = false; + for (Object param : params) { + Method getCondition = param.getClass().getMethod("getCondition"); + Object condition = getCondition.invoke(param); + if ("rec_status =".equals(condition)) { + hasDel = true; + } + } + if (!hasDel) { + Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); + andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); + } + + } + + } + @Override public Object plugin(Object target) { return Plugin.wrap(target, this); @@ -121,24 +143,7 @@ public class MybatisInterceptor implements Interceptor { return builder.build(); } - private String getOperateType(Invocation invocation) { - final Object[] args = invocation.getArgs(); - MappedStatement ms = (MappedStatement) args[0]; - SqlCommandType commondType = ms.getSqlCommandType(); - if (commondType.compareTo(SqlCommandType.SELECT) == 0) { - return "select"; - } - if (commondType.compareTo(SqlCommandType.INSERT) == 0) { - return "insert"; - } - if (commondType.compareTo(SqlCommandType.UPDATE) == 0) { - return "update"; - } - if (commondType.compareTo(SqlCommandType.DELETE) == 0) { - return "delete"; - } - return null; - } + // 定义一个内部辅助类,作用是包装sq class BoundSqlSqlSource implements SqlSource { private BoundSql boundSql; diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/DomainNavDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/DomainNavDao.java new file mode 100644 index 00000000..dd50fa1c --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/DomainNavDao.java @@ -0,0 +1,11 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.DomainNavMapper; +import org.springframework.stereotype.Repository; + +/** + * @author 逗 + */ +@Repository +public interface DomainNavDao extends DomainNavMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java index 1f501c15..4c5c134e 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberDao.java @@ -1,6 +1,8 @@ package com.ccsens.tall.persist.dao; +import com.ccsens.tall.bean.po.ProMember; import com.ccsens.tall.bean.vo.MemberVo; +import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.WbsVo; import com.ccsens.tall.persist.mapper.ProMemberMapper; import org.apache.ibatis.annotations.Param; @@ -17,4 +19,26 @@ public interface ProMemberDao extends ProMemberMapper{ List selectByRoleId(@Param("roleId")Long roleId); List getMemberAndStakeholder(@Param("projectId")Long projectId); + + /** + * 查询项目内所有成员的userid + * @param projectId + */ + List queryUserIdsByProjectId(@Param("projectId") Long projectId); + + List selectMemberByRoleId(@Param("roleId")Long roleId); + + List selectMembersByProjectId(@Param("projectId")Long projectId); + + ProjectVo.MembersByProject getMemberInfoByMemberId(@Param("memberId")Long memberId); + + List queryAttention(@Param("projectId")Long projectId); + + /** + * 根据用户ID和任务ID查询用户信息 + * @param userId 用户ID + * @param taskId 任务ID + * @return 用户信息 + */ + MemberVo.MemberInfo getMemberByUserIdAndTaskId(@Param("userId") Long userId, @Param("taskId")Long taskId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberRoleDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberRoleDao.java index 2bf4ed9d..0024797a 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberRoleDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProMemberRoleDao.java @@ -9,4 +9,8 @@ import java.util.List; @Repository public interface ProMemberRoleDao extends ProMemberRoleMapper{ void insertBatch(List members); + + List selectUserIdByRoleId(Long roleId); + + List selectUserIdByProjectId(Long projectId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProNotesDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProNotesDao.java new file mode 100644 index 00000000..b5e4b237 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProNotesDao.java @@ -0,0 +1,24 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.bean.vo.PluginVo; +import com.ccsens.tall.persist.mapper.ProNotesMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @author 逗 + */ +@Repository +public interface ProNotesDao extends ProNotesMapper { + /** + * 查找任务下的笔记 + * @param userId 用户id + * @param taskId 任务id + * @param pluginId 被记笔记的插件的id,可以为null + * @return 返回笔记list + */ + List queryNotesInfo(@Param("userId") Long userId, @Param("taskId")Long taskId,@Param("pluginId") Long pluginId); + +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProProjectFileDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProProjectFileDao.java new file mode 100644 index 00000000..9272ad2e --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProProjectFileDao.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.ProProjectFileMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface ProProjectFileDao extends ProProjectFileMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRemindDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRemindDao.java new file mode 100644 index 00000000..1b8dabd9 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRemindDao.java @@ -0,0 +1,29 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.bean.po.ProRemind; +import com.ccsens.tall.bean.vo.TaskVo; +import com.ccsens.tall.persist.mapper.ProRemindMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @author 逗 + */ +@Repository +public interface ProRemindDao extends ProRemindMapper { + /** + * 获取当前需要提醒的任务 + * @param now + * @return + */ + List queryRemindByNow(@Param("now") long now); + + /** + * 获取任务的提醒消息 + * @param taskId + * @return + */ + List queryRemindByTask(@Param("taskId") Long taskId); +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java index 46f9bdba..0c05070d 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java @@ -35,4 +35,25 @@ public interface ProRoleDao extends ProRoleMapper{ List selectByProjectAndName(MemberRoleDto.Assign assign); List selectSecondRoleName(@Param("projectId")Long projectId); + + /** + * 通过角色id判断角色是否是项目经理 + * @param roleId + * @return + */ + Integer isPmByRoleId(@Param("roleId")Long roleId); + + /** + * 通过项目id查找成员的名字或者项目经理的名字 + * @param projectId 项目id + * @return 返回项目经理的名字 + */ + String getMemberNameByProjectId(@Param("projectId")Long projectId,@Param("parentRoleName")String parentRoleName); + +// /** +// * 查找项目下的所有成员的名字用“,”分隔 +// * @param projectId 项目id +// * @return 返回成员姓名 +// */ +// String getMemberNameByProjectId(Long projectId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProTaskCommentDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProTaskCommentDao.java index af6df15f..95293cce 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/ProTaskCommentDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProTaskCommentDao.java @@ -9,6 +9,6 @@ import java.util.List; @Repository public interface ProTaskCommentDao extends ProTaskCommentMapper { - List getCommentByTaskId(@Param("taskId") Long taskId); + List getCommentByTaskId(@Param("userId")Long userId,@Param("taskId") Long taskId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysAuthDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysAuthDao.java index f6fc3452..fc02adf2 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysAuthDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysAuthDao.java @@ -1,8 +1,17 @@ package com.ccsens.tall.persist.dao; +import com.ccsens.tall.bean.vo.UserVo; import com.ccsens.tall.persist.mapper.SysAuthMapper; import org.springframework.stereotype.Repository; +import java.util.List; + @Repository public interface SysAuthDao extends SysAuthMapper { + /** + * 查询关注了公众号的用户的openid + * @param userIds + * @return + */ + List queryOauth2WX(List userIds); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysDomainDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysDomainDao.java index a63c7137..846fc58e 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysDomainDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysDomainDao.java @@ -1,8 +1,18 @@ package com.ccsens.tall.persist.dao; +import com.ccsens.tall.bean.vo.DomainVo; import com.ccsens.tall.persist.mapper.SysDomainMapper; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; +import java.util.List; + @Repository public interface SysDomainDao extends SysDomainMapper{ + /** + * 通过domainId查找导航信息 + * @param domainId + * @return + */ + List queryDomainNavByDomainId(@Param("domainId") Long domainId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java new file mode 100644 index 00000000..064794c6 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java @@ -0,0 +1,15 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.bean.vo.LabelVo; +import com.ccsens.tall.persist.mapper.SysLabelMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SysLabelDao extends SysLabelMapper { + List selectLabelByUserId(@Param("userId")Long userId,@Param("key")String key); + + List selectLabelByProjectId(@Param("userId")Long userId,@Param("projectId")Long projectId); +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysMessageSendDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysMessageSendDao.java new file mode 100644 index 00000000..ad040cbf --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysMessageSendDao.java @@ -0,0 +1,32 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.SysMessageSendMapper; +import org.apache.ibatis.annotations.Param; + +public interface SysMessageSendDao extends SysMessageSendMapper { + /** + * 标记消息已读+初始读 + * @param id + */ + void markInitRead(@Param("id") Long id); + + /** + * 标记某人某消息的所有未读发送为已读 + * @param operationId + * @param userId + */ + void markOtherSendRead(@Param("operationId") Long operationId, @Param("receiverId") Long userId); + + /** + * 标记用户该方式的消息为已读+初始阅读 + * @param sendType + * @param userId + */ + void markInitReadBySendType(@Param("sendType") Byte sendType, @Param("receiverId") Long userId); + + /** + * 标记用户的其他未读消息为已读 + * @param userId + */ + void markAllRead(@Param("receiverId") Long userId); +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysOperationDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysOperationDao.java new file mode 100644 index 00000000..c63a9009 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysOperationDao.java @@ -0,0 +1,42 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.bean.dto.ProjectMessageDto; +import com.ccsens.tall.bean.vo.MessageVo; +import com.ccsens.tall.bean.vo.ProjectMessageVo; +import com.ccsens.tall.persist.mapper.SysOperationMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface SysOperationDao extends SysOperationMapper { + + /** + * 查询未读消息数 + * @param sendType + * @param userId + * @return + */ + ProjectMessageVo.UnreadNum queryUnreadNum(@Param("sendType") Byte sendType, @Param("userId") Long userId); + + /** + * 查询消息 + * @param param + * @param userId + * @return + */ + List queryMsg(@Param("param") ProjectMessageDto.Query param, @Param("userId")Long userId); + + /** + * 查询消息的具体内容 + * @param operationId + * @return + */ + List queryContent(@Param("operationId") Long operationId); + + /** + * 查询项目动态 + * @param param + * @return + */ + List queryProjectMsg(ProjectMessageDto.ProjectMsg param); +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginDao.java index 241f6571..e93d6942 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginDao.java @@ -1,5 +1,6 @@ package com.ccsens.tall.persist.dao; +import com.ccsens.tall.bean.po.ProPluginConfig; import com.ccsens.tall.bean.vo.PluginVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.bean.vo.WbsVo; @@ -20,4 +21,6 @@ public interface SysPluginDao extends SysPluginMapper{ void deleteByTaskId(@Param("taskId")Long taskId); List getPluginNameAndTaskName(@Param("projectId")Long projectId); + + ProPluginConfig getPluginConfigByTaskPluginId(@Param("taskPluginId")String taskPluginId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java index 5b7a9d02..70a7ee7f 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java @@ -1,6 +1,7 @@ package com.ccsens.tall.persist.dao; import com.ccsens.tall.bean.po.SysProject; +import com.ccsens.tall.bean.vo.ChartVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.persist.mapper.SysProjectMapper; import org.apache.ibatis.annotations.Param; @@ -16,4 +17,30 @@ public interface SysProjectDao extends SysProjectMapper{ List selectByTemplateStatus(@Param("templateStatus") Integer templateStatus); List getProjectByKey(@Param("userId") Long userId, @Param("key") String key); + + List findProjectIdByUserId01(@Param("userId") Long currentUserId, @Param("startTime") Long startTime, + @Param("endTime") Long endTime,@Param("orderType")Integer orderType,@Param("order")Integer order); + + List selectByLabelName(@Param("userId")Long currentUserId, @Param("labelName")String labelName); + + List selectRelevanceProject(@Param("projectId")Long projectId); + + List getExecutorChart(@Param("projectId")Long projectId,@Param("type")Integer type,@Param("process")Integer process, + @Param("roleIdList")List roleIdList,@Param("beginTime")Long beginTime,@Param("endTime")Long endTime); + + List getCompleteTaskByTime(@Param("projectId")Long projectId,@Param("roleIdList")List roleIdList, + @Param("beginTime")Long beginTime,@Param("endTime")Long endTime); + + List getProjectTrend(@Param("projectId")Long projectId, @Param("start")Long start, @Param("end")Long end, + @Param("roleId")Long roleId,@Param("allMemberId")Long allMemberId); + + ChartVo.ProjectOverview getOverview(@Param("projectId")Long projectId, @Param("beginTime")Long beginTime,@Param("endTime")Long endTime,@Param("roleIdList")List roleIdList); + + List getBurnoutFigure(@Param("projectId")Long projectId, + @Param("start")Long start, @Param("end")Long end, + @Param("roleId")Long roleId,@Param("allMemberId")Long allMemberId,@Param("type") Integer type); + + Integer getTaskTotalByProjectId(@Param("projectId")Long projectId, @Param("start")Long start, @Param("end")Long end, @Param("roleId")Long roleId); + + ChartVo.ProjectOverview getOverviewByToDay(@Param("projectId")Long projectId, @Param("startTime")Long startTime, @Param("endTime")Long endTime,@Param("roleIdList")List roleIdList); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectLabelDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectLabelDao.java new file mode 100644 index 00000000..d84b2aeb --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectLabelDao.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.SysProjectLabelMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface SysProjectLabelDao extends SysProjectLabelMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysRelevanceProjectDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRelevanceProjectDao.java new file mode 100644 index 00000000..5500c20f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRelevanceProjectDao.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.SysRelevanceProjectMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface SysRelevanceProjectDao extends SysRelevanceProjectMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingMsgDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingMsgDao.java new file mode 100644 index 00000000..0aad02d1 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingMsgDao.java @@ -0,0 +1,52 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.bean.vo.RingVo; +import com.ccsens.tall.persist.mapper.SysRingMsgMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SysRingMsgDao extends SysRingMsgMapper { + + /** + * 查找项目下关于自己的ring消息 + * @param userId userId + * @param projectId 项目id + * @return 消息详情 + */ + List selectRingInfoByProject(@Param("userId")Long userId, @Param("projectId")Long projectId); + + /** + * 获取用户在项目内的角色id + * @param userId userId + * @param projectId 项目id + * @return 角色id + */ + List selectRoleIdByUserId(@Param("userId")Long userId, @Param("projectId")Long projectId); + + /** + * 获取ring消息的每个接收者的信息和读取的情况 + * @param messageId ring消息id + * @return 接收者信息 + */ + List ringReceiveRole(@Param("messageId")Long messageId); + + /** + * 透过消息id查找消息详情 + * @param userId userId + * @param projectId 项目id + * @param msgId ring消息id + * @return ring消息信息 + */ + List selectRingInfoByRingMsgId(@Param("userId")Long userId, @Param("projectId")Long projectId, @Param("msgId")Long msgId); + + /** + * 查找用户在项目下的未读ring消息的数量 + * @param userId userId + * @param projectId 项目id + * @return 未读的消息的数量 + */ + Integer getRingUnreadNum(@Param("userId")Long userId, @Param("projectId")Long projectId); +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingSendDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingSendDao.java new file mode 100644 index 00000000..718876aa --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingSendDao.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.SysRingSendMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface SysRingSendDao extends SysRingSendMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java index b38b54dd..344526b9 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java @@ -1,9 +1,12 @@ package com.ccsens.tall.persist.dao; +import com.ccsens.tall.bean.vo.UserVo; import com.ccsens.tall.persist.mapper.SysUserMapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; +import java.util.List; + @Repository public interface SysUserDao extends SysUserMapper { @@ -22,4 +25,40 @@ public interface SysUserDao extends SysUserMapper { void replaceProLog(@Param("oldUserId") Long userId,@Param("newUserId") Long currentUserId); String getUserNameByUserId(@Param("userId") Long userId); + + void replaceComment(@Param("oldUserId")Long userId, @Param("newUserId") Long currentUserId); + + /** + * 查询用户信息 + * @param userId 用户id + * @return 用户信息 + */ + UserVo.UserInfo getUserInfoByUserId(Long userId); + + /** + * 根据id查询用户信息 + * @param ids 用户id数组 + * @return 用户信息列表 + */ + List queryUserInfos(Long[] ids); + /** + * 查找个人详细信息 + * @param currentUserId userId + * @return 个人信息 + */ + UserVo.SelectUserInfo selectUserInfo(@Param("userId")Long currentUserId); + + /** + * 获取空间使用信息 + * @param currentUserId userId + * @return 目前只查询用户创建了几个项目 + */ + UserVo.Interspace selectInterspace(@Param("userId")Long currentUserId); + + /** + * 查询登录返回的信息 + * @param userId + * @return + */ + UserVo.TokenBean getTokenBeanByUserId(Long userId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserInfoDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserInfoDao.java new file mode 100644 index 00000000..50b1439b --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserInfoDao.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.SysUserInfoMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface SysUserInfoDao extends SysUserInfoMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/TaskDetailDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/TaskDetailDao.java index a80b1cb3..83019e70 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/TaskDetailDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/TaskDetailDao.java @@ -17,7 +17,7 @@ public interface TaskDetailDao extends ProTaskDetailMapper { @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("roleId") Long roleId); List selectTaskByRoleAndAllMembers(@Param("projectId") Long projectId, @Param("roleId") Long roleId,@Param("allMemberId") Long allMemberId, - @Param("startTime") Long startTime, @Param("endTime") Long endTime); + @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("priority") Integer priority); TaskVo.NormalTask selectTaskByTaskId(@Param("subTimeId") Long subTimeId, @Param("taskId") Long taskId,@Param("roleId") Long roleId); @@ -40,4 +40,17 @@ public interface TaskDetailDao extends ProTaskDetailMapper { List selectAllByProject(@Param("projectId")Long projectId); List getChecklistsByProjectId(@Param("projectId")Long projectId,@Param("roleId")Long roleId,@Param("allMemberId")Long allMemberId,@Param("startTime")Long startTime,@Param("endTime")Long endTime); + + /** + * 通过任务id查看任务信息(查看项目下所有任务时) + * @param detailTaskId + * @return + */ + TaskVo.TaskListByProjectId getTaskById(@Param("detailTaskId")Long detailTaskId); + /** + * 通过任务id查看任务信息(查看项目下所有任务时) + * @param parentTaskId + * @return + */ + List getTaskByParentId(@Param("parentTaskId")Long parentTaskId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/TaskSubTimeDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/TaskSubTimeDao.java index 405a4c8d..5a75b779 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/TaskSubTimeDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/TaskSubTimeDao.java @@ -1,6 +1,7 @@ package com.ccsens.tall.persist.dao; import com.ccsens.tall.bean.po.ProTaskSubTime; +import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.mapper.ProTaskSubTimeMapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @@ -12,4 +13,13 @@ public interface TaskSubTimeDao extends ProTaskSubTimeMapper{ List getUnderwayTaskByRoleId(@Param("subTaskId") Long subTaskId, @Param("roleId") Long roleId); void clearTaskRealTime(@Param("projectId")Long projectId); + + List getKanbanTake(@Param("userId")Long userId,@Param("projectId")Long projectId, @Param("roleId")Long roleId, + @Param("type") Integer type,@Param("memberId")Long memberId,@Param("orderType")Integer orderType,@Param("order")Integer order); + + List getKanbanTakeByType(@Param("userId")Long userId,@Param("projectId")Long projectId, @Param("roleId")Long roleId, + @Param("type")Integer type,@Param("orderType")Integer orderType,@Param("order")Integer order); + + List queryMinutesTaskByTime(@Param("projectId")Long projectId, @Param("startTime")Long startTime, @Param("endTime")Long endTime); } + diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/WpsFileDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/WpsFileDao.java new file mode 100644 index 00000000..4f8991c2 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/WpsFileDao.java @@ -0,0 +1,46 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.bean.dto.WpsDto; +import com.ccsens.tall.bean.vo.WpsVo; +import com.ccsens.tall.persist.mapper.WpsFileMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author whj + */ +public interface WpsFileDao extends WpsFileMapper { + + + /** + * 查詢指定版本信息 + * @param fileId 文件id + * @param version 版本 + * @return 文件信息 + */ + Map getVersion(@Param("fileId") Long fileId, @Param("version") Integer version); + + /** + * 文件重命名 + * @param fileId 文件id + * @param name 文件名称 + */ + void updateName(@Param("fileId") long fileId, @Param("fileName") String name); + + /** + * 分页查询历史版本文件信息 + * @param body 分页信息和文件id + * @return 历史文件信息 + */ + List queryFileHistory(WpsDto.FileHistoryBody body); + + /** + * 根据业务ID和类型查询文件相关 + * @param businessId 业务ID + * @param businessType 业务类型 + * @return 文件信息 + */ + List queryFileByBusiness(@Param("businessId") long businessId, @Param("businessType") byte businessType); +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ConstantMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ConstantMapper.java new file mode 100644 index 00000000..146c99b0 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ConstantMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.Constant; +import com.ccsens.tall.bean.po.ConstantExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ConstantMapper { + long countByExample(ConstantExample example); + + int deleteByExample(ConstantExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Constant record); + + int insertSelective(Constant record); + + List selectByExample(ConstantExample example); + + Constant selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Constant record, @Param("example") ConstantExample example); + + int updateByExample(@Param("record") Constant record, @Param("example") ConstantExample example); + + int updateByPrimaryKeySelective(Constant record); + + int updateByPrimaryKey(Constant record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/DomainNavMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/DomainNavMapper.java new file mode 100644 index 00000000..d31d5b6d --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/DomainNavMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.DomainNav; +import com.ccsens.tall.bean.po.DomainNavExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface DomainNavMapper { + long countByExample(DomainNavExample example); + + int deleteByExample(DomainNavExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DomainNav record); + + int insertSelective(DomainNav record); + + List selectByExample(DomainNavExample example); + + DomainNav selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DomainNav record, @Param("example") DomainNavExample example); + + int updateByExample(@Param("record") DomainNav record, @Param("example") DomainNavExample example); + + int updateByPrimaryKeySelective(DomainNav record); + + int updateByPrimaryKey(DomainNav record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProNotesMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProNotesMapper.java new file mode 100644 index 00000000..e09b1b9c --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProNotesMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProNotes; +import com.ccsens.tall.bean.po.ProNotesExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProNotesMapper { + long countByExample(ProNotesExample example); + + int deleteByExample(ProNotesExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProNotes record); + + int insertSelective(ProNotes record); + + List selectByExample(ProNotesExample example); + + ProNotes selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProNotes record, @Param("example") ProNotesExample example); + + int updateByExample(@Param("record") ProNotes record, @Param("example") ProNotesExample example); + + int updateByPrimaryKeySelective(ProNotes record); + + int updateByPrimaryKey(ProNotes record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProProjectFileMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProProjectFileMapper.java new file mode 100644 index 00000000..ca93f7d6 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProProjectFileMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProProjectFile; +import com.ccsens.tall.bean.po.ProProjectFileExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProProjectFileMapper { + long countByExample(ProProjectFileExample example); + + int deleteByExample(ProProjectFileExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProProjectFile record); + + int insertSelective(ProProjectFile record); + + List selectByExample(ProProjectFileExample example); + + ProProjectFile selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProProjectFile record, @Param("example") ProProjectFileExample example); + + int updateByExample(@Param("record") ProProjectFile record, @Param("example") ProProjectFileExample example); + + int updateByPrimaryKeySelective(ProProjectFile record); + + int updateByPrimaryKey(ProProjectFile record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRemindMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRemindMapper.java new file mode 100644 index 00000000..3e324eb0 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRemindMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProRemind; +import com.ccsens.tall.bean.po.ProRemindExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProRemindMapper { + long countByExample(ProRemindExample example); + + int deleteByExample(ProRemindExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProRemind record); + + int insertSelective(ProRemind record); + + List selectByExample(ProRemindExample example); + + ProRemind selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProRemind record, @Param("example") ProRemindExample example); + + int updateByExample(@Param("record") ProRemind record, @Param("example") ProRemindExample example); + + int updateByPrimaryKeySelective(ProRemind record); + + int updateByPrimaryKey(ProRemind record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleMapper.java index 1fe78d98..790d500b 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleMapper.java +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleMapper.java @@ -1,31 +1,30 @@ -package com.ccsens.tall.persist.mapper; - -import com.ccsens.tall.bean.po.ProRole; -import com.ccsens.tall.bean.po.ProRoleExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface ProRoleMapper { - long countByExample(ProRoleExample example); - - int deleteByExample(ProRoleExample example); - - int deleteByPrimaryKey(Long id); - - int insert(ProRole record); - - int insertSelective(ProRole record); - - List selectByExample(ProRoleExample example); - - ProRole selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") ProRole record, @Param("example") ProRoleExample example); - - int updateByExample(@Param("record") ProRole record, @Param("example") ProRoleExample example); - - int updateByPrimaryKeySelective(ProRole record); - - int updateByPrimaryKey(ProRole record); +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProRole; +import com.ccsens.tall.bean.po.ProRoleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProRoleMapper { + long countByExample(ProRoleExample example); + + int deleteByExample(ProRoleExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProRole record); + + int insertSelective(ProRole record); + + List selectByExample(ProRoleExample example); + + ProRole selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProRole record, @Param("example") ProRoleExample example); + + int updateByExample(@Param("record") ProRole record, @Param("example") ProRoleExample example); + + int updateByPrimaryKeySelective(ProRole record); + + int updateByPrimaryKey(ProRole record); } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDeliverPostLogCheckerMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDeliverPostLogCheckerMapper.java index 84b95218..885a03ab 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDeliverPostLogCheckerMapper.java +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDeliverPostLogCheckerMapper.java @@ -1,31 +1,30 @@ -package com.ccsens.tall.persist.mapper; - -import com.ccsens.tall.bean.po.ProTaskDeliverPostLogChecker; -import com.ccsens.tall.bean.po.ProTaskDeliverPostLogCheckerExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface ProTaskDeliverPostLogCheckerMapper { - long countByExample(ProTaskDeliverPostLogCheckerExample example); - - int deleteByExample(ProTaskDeliverPostLogCheckerExample example); - - int deleteByPrimaryKey(Long id); - - int insert(ProTaskDeliverPostLogChecker record); - - int insertSelective(ProTaskDeliverPostLogChecker record); - - List selectByExample(ProTaskDeliverPostLogCheckerExample example); - - ProTaskDeliverPostLogChecker selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") ProTaskDeliverPostLogChecker record, @Param("example") ProTaskDeliverPostLogCheckerExample example); - - int updateByExample(@Param("record") ProTaskDeliverPostLogChecker record, @Param("example") ProTaskDeliverPostLogCheckerExample example); - - int updateByPrimaryKeySelective(ProTaskDeliverPostLogChecker record); - - int updateByPrimaryKey(ProTaskDeliverPostLogChecker record); +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProTaskDeliverPostLogChecker; +import com.ccsens.tall.bean.po.ProTaskDeliverPostLogCheckerExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProTaskDeliverPostLogCheckerMapper { + long countByExample(ProTaskDeliverPostLogCheckerExample example); + + int deleteByExample(ProTaskDeliverPostLogCheckerExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProTaskDeliverPostLogChecker record); + + int insertSelective(ProTaskDeliverPostLogChecker record); + + List selectByExample(ProTaskDeliverPostLogCheckerExample example); + + ProTaskDeliverPostLogChecker selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProTaskDeliverPostLogChecker record, @Param("example") ProTaskDeliverPostLogCheckerExample example); + + int updateByExample(@Param("record") ProTaskDeliverPostLogChecker record, @Param("example") ProTaskDeliverPostLogCheckerExample example); + + int updateByPrimaryKeySelective(ProTaskDeliverPostLogChecker record); + + int updateByPrimaryKey(ProTaskDeliverPostLogChecker record); } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDetailMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDetailMapper.java index 75f08e74..a9105e86 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDetailMapper.java +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskDetailMapper.java @@ -1,31 +1,30 @@ -package com.ccsens.tall.persist.mapper; - -import com.ccsens.tall.bean.po.ProTaskDetail; -import com.ccsens.tall.bean.po.ProTaskDetailExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface ProTaskDetailMapper { - long countByExample(ProTaskDetailExample example); - - int deleteByExample(ProTaskDetailExample example); - - int deleteByPrimaryKey(Long id); - - int insert(ProTaskDetail record); - - int insertSelective(ProTaskDetail record); - - List selectByExample(ProTaskDetailExample example); - - ProTaskDetail selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") ProTaskDetail record, @Param("example") ProTaskDetailExample example); - - int updateByExample(@Param("record") ProTaskDetail record, @Param("example") ProTaskDetailExample example); - - int updateByPrimaryKeySelective(ProTaskDetail record); - - int updateByPrimaryKey(ProTaskDetail record); +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProTaskDetail; +import com.ccsens.tall.bean.po.ProTaskDetailExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProTaskDetailMapper { + long countByExample(ProTaskDetailExample example); + + int deleteByExample(ProTaskDetailExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProTaskDetail record); + + int insertSelective(ProTaskDetail record); + + List selectByExample(ProTaskDetailExample example); + + ProTaskDetail selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProTaskDetail record, @Param("example") ProTaskDetailExample example); + + int updateByExample(@Param("record") ProTaskDetail record, @Param("example") ProTaskDetailExample example); + + int updateByPrimaryKeySelective(ProTaskDetail record); + + int updateByPrimaryKey(ProTaskDetail record); } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysImitationMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysImitationMapper.java new file mode 100644 index 00000000..8522775f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysImitationMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysImitation; +import com.ccsens.tall.bean.po.SysImitationExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysImitationMapper { + long countByExample(SysImitationExample example); + + int deleteByExample(SysImitationExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysImitation record); + + int insertSelective(SysImitation record); + + List selectByExample(SysImitationExample example); + + SysImitation selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysImitation record, @Param("example") SysImitationExample example); + + int updateByExample(@Param("record") SysImitation record, @Param("example") SysImitationExample example); + + int updateByPrimaryKeySelective(SysImitation record); + + int updateByPrimaryKey(SysImitation record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLabelMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLabelMapper.java new file mode 100644 index 00000000..ab9513c2 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLabelMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysLabel; +import com.ccsens.tall.bean.po.SysLabelExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysLabelMapper { + long countByExample(SysLabelExample example); + + int deleteByExample(SysLabelExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysLabel record); + + int insertSelective(SysLabel record); + + List selectByExample(SysLabelExample example); + + SysLabel selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysLabel record, @Param("example") SysLabelExample example); + + int updateByExample(@Param("record") SysLabel record, @Param("example") SysLabelExample example); + + int updateByPrimaryKeySelective(SysLabel record); + + int updateByPrimaryKey(SysLabel record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysMessageSendMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysMessageSendMapper.java new file mode 100644 index 00000000..0827b91b --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysMessageSendMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysMessageSend; +import com.ccsens.tall.bean.po.SysMessageSendExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysMessageSendMapper { + long countByExample(SysMessageSendExample example); + + int deleteByExample(SysMessageSendExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysMessageSend record); + + int insertSelective(SysMessageSend record); + + List selectByExample(SysMessageSendExample example); + + SysMessageSend selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysMessageSend record, @Param("example") SysMessageSendExample example); + + int updateByExample(@Param("record") SysMessageSend record, @Param("example") SysMessageSendExample example); + + int updateByPrimaryKeySelective(SysMessageSend record); + + int updateByPrimaryKey(SysMessageSend record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMapper.java new file mode 100644 index 00000000..229b83fb --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysOperation; +import com.ccsens.tall.bean.po.SysOperationExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysOperationMapper { + long countByExample(SysOperationExample example); + + int deleteByExample(SysOperationExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysOperation record); + + int insertSelective(SysOperation record); + + List selectByExample(SysOperationExample example); + + SysOperation selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysOperation record, @Param("example") SysOperationExample example); + + int updateByExample(@Param("record") SysOperation record, @Param("example") SysOperationExample example); + + int updateByPrimaryKeySelective(SysOperation record); + + int updateByPrimaryKey(SysOperation record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMessageMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMessageMapper.java new file mode 100644 index 00000000..e6d044c0 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysOperationMessageMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysOperationMessage; +import com.ccsens.tall.bean.po.SysOperationMessageExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysOperationMessageMapper { + long countByExample(SysOperationMessageExample example); + + int deleteByExample(SysOperationMessageExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysOperationMessage record); + + int insertSelective(SysOperationMessage record); + + List selectByExample(SysOperationMessageExample example); + + SysOperationMessage selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysOperationMessage record, @Param("example") SysOperationMessageExample example); + + int updateByExample(@Param("record") SysOperationMessage record, @Param("example") SysOperationMessageExample example); + + int updateByPrimaryKeySelective(SysOperationMessage record); + + int updateByPrimaryKey(SysOperationMessage record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysPluginMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysPluginMapper.java index 8e39c537..0d759fec 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysPluginMapper.java +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysPluginMapper.java @@ -1,31 +1,30 @@ -package com.ccsens.tall.persist.mapper; - -import com.ccsens.tall.bean.po.SysPlugin; -import com.ccsens.tall.bean.po.SysPluginExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SysPluginMapper { - long countByExample(SysPluginExample example); - - int deleteByExample(SysPluginExample example); - - int deleteByPrimaryKey(Long id); - - int insert(SysPlugin record); - - int insertSelective(SysPlugin record); - - List selectByExample(SysPluginExample example); - - SysPlugin selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); - - int updateByExample(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); - - int updateByPrimaryKeySelective(SysPlugin record); - - int updateByPrimaryKey(SysPlugin record); +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysPlugin; +import com.ccsens.tall.bean.po.SysPluginExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysPluginMapper { + long countByExample(SysPluginExample example); + + int deleteByExample(SysPluginExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysPlugin record); + + int insertSelective(SysPlugin record); + + List selectByExample(SysPluginExample example); + + SysPlugin selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); + + int updateByExample(@Param("record") SysPlugin record, @Param("example") SysPluginExample example); + + int updateByPrimaryKeySelective(SysPlugin record); + + int updateByPrimaryKey(SysPlugin record); } \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysProjectLabelMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysProjectLabelMapper.java new file mode 100644 index 00000000..bd83af8e --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysProjectLabelMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysProjectLabel; +import com.ccsens.tall.bean.po.SysProjectLabelExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysProjectLabelMapper { + long countByExample(SysProjectLabelExample example); + + int deleteByExample(SysProjectLabelExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysProjectLabel record); + + int insertSelective(SysProjectLabel record); + + List selectByExample(SysProjectLabelExample example); + + SysProjectLabel selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysProjectLabel record, @Param("example") SysProjectLabelExample example); + + int updateByExample(@Param("record") SysProjectLabel record, @Param("example") SysProjectLabelExample example); + + int updateByPrimaryKeySelective(SysProjectLabel record); + + int updateByPrimaryKey(SysProjectLabel record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRelevanceProjectMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRelevanceProjectMapper.java new file mode 100644 index 00000000..a5a24aa9 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRelevanceProjectMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysRelevanceProject; +import com.ccsens.tall.bean.po.SysRelevanceProjectExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysRelevanceProjectMapper { + long countByExample(SysRelevanceProjectExample example); + + int deleteByExample(SysRelevanceProjectExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysRelevanceProject record); + + int insertSelective(SysRelevanceProject record); + + List selectByExample(SysRelevanceProjectExample example); + + SysRelevanceProject selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysRelevanceProject record, @Param("example") SysRelevanceProjectExample example); + + int updateByExample(@Param("record") SysRelevanceProject record, @Param("example") SysRelevanceProjectExample example); + + int updateByPrimaryKeySelective(SysRelevanceProject record); + + int updateByPrimaryKey(SysRelevanceProject record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRingMsgMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRingMsgMapper.java new file mode 100644 index 00000000..61ff47f6 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRingMsgMapper.java @@ -0,0 +1,36 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysRingMsg; +import com.ccsens.tall.bean.po.SysRingMsgExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysRingMsgMapper { + long countByExample(SysRingMsgExample example); + + int deleteByExample(SysRingMsgExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysRingMsg record); + + int insertSelective(SysRingMsg record); + + List selectByExampleWithBLOBs(SysRingMsgExample example); + + List selectByExample(SysRingMsgExample example); + + SysRingMsg selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysRingMsg record, @Param("example") SysRingMsgExample example); + + int updateByExampleWithBLOBs(@Param("record") SysRingMsg record, @Param("example") SysRingMsgExample example); + + int updateByExample(@Param("record") SysRingMsg record, @Param("example") SysRingMsgExample example); + + int updateByPrimaryKeySelective(SysRingMsg record); + + int updateByPrimaryKeyWithBLOBs(SysRingMsg record); + + int updateByPrimaryKey(SysRingMsg record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRingSendMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRingSendMapper.java new file mode 100644 index 00000000..c4e8f8df --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRingSendMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysRingSend; +import com.ccsens.tall.bean.po.SysRingSendExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysRingSendMapper { + long countByExample(SysRingSendExample example); + + int deleteByExample(SysRingSendExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysRingSend record); + + int insertSelective(SysRingSend record); + + List selectByExample(SysRingSendExample example); + + SysRingSend selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysRingSend record, @Param("example") SysRingSendExample example); + + int updateByExample(@Param("record") SysRingSend record, @Param("example") SysRingSendExample example); + + int updateByPrimaryKeySelective(SysRingSend record); + + int updateByPrimaryKey(SysRingSend record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysUserInfoMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysUserInfoMapper.java new file mode 100644 index 00000000..52a69ea8 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysUserInfoMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysUserInfo; +import com.ccsens.tall.bean.po.SysUserInfoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysUserInfoMapper { + long countByExample(SysUserInfoExample example); + + int deleteByExample(SysUserInfoExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysUserInfo record); + + int insertSelective(SysUserInfo record); + + List selectByExample(SysUserInfoExample example); + + SysUserInfo selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysUserInfo record, @Param("example") SysUserInfoExample example); + + int updateByExample(@Param("record") SysUserInfo record, @Param("example") SysUserInfoExample example); + + int updateByPrimaryKeySelective(SysUserInfo record); + + int updateByPrimaryKey(SysUserInfo record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileMapper.java new file mode 100644 index 00000000..ba2f8650 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.WpsFile; +import com.ccsens.tall.bean.po.WpsFileExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface WpsFileMapper { + long countByExample(WpsFileExample example); + + int deleteByExample(WpsFileExample example); + + int deleteByPrimaryKey(Long id); + + int insert(WpsFile record); + + int insertSelective(WpsFile record); + + List selectByExample(WpsFileExample example); + + WpsFile selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") WpsFile record, @Param("example") WpsFileExample example); + + int updateByExample(@Param("record") WpsFile record, @Param("example") WpsFileExample example); + + int updateByPrimaryKeySelective(WpsFile record); + + int updateByPrimaryKey(WpsFile record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileUserMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileUserMapper.java new file mode 100644 index 00000000..73042c73 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileUserMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.WpsFileUser; +import com.ccsens.tall.bean.po.WpsFileUserExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface WpsFileUserMapper { + long countByExample(WpsFileUserExample example); + + int deleteByExample(WpsFileUserExample example); + + int deleteByPrimaryKey(Long id); + + int insert(WpsFileUser record); + + int insertSelective(WpsFileUser record); + + List selectByExample(WpsFileUserExample example); + + WpsFileUser selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") WpsFileUser record, @Param("example") WpsFileUserExample example); + + int updateByExample(@Param("record") WpsFileUser record, @Param("example") WpsFileUserExample example); + + int updateByPrimaryKeySelective(WpsFileUser record); + + int updateByPrimaryKey(WpsFileUser record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileVersionMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileVersionMapper.java new file mode 100644 index 00000000..dae693c8 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileVersionMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.WpsFileVersion; +import com.ccsens.tall.bean.po.WpsFileVersionExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface WpsFileVersionMapper { + long countByExample(WpsFileVersionExample example); + + int deleteByExample(WpsFileVersionExample example); + + int deleteByPrimaryKey(Long id); + + int insert(WpsFileVersion record); + + int insertSelective(WpsFileVersion record); + + List selectByExample(WpsFileVersionExample example); + + WpsFileVersion selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") WpsFileVersion record, @Param("example") WpsFileVersionExample example); + + int updateByExample(@Param("record") WpsFileVersion record, @Param("example") WpsFileVersionExample example); + + int updateByPrimaryKeySelective(WpsFileVersion record); + + int updateByPrimaryKey(WpsFileVersion record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsNotifyMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsNotifyMapper.java new file mode 100644 index 00000000..47bc017f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsNotifyMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.WpsNotify; +import com.ccsens.tall.bean.po.WpsNotifyExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface WpsNotifyMapper { + long countByExample(WpsNotifyExample example); + + int deleteByExample(WpsNotifyExample example); + + int deleteByPrimaryKey(Long id); + + int insert(WpsNotify record); + + int insertSelective(WpsNotify record); + + List selectByExample(WpsNotifyExample example); + + WpsNotify selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") WpsNotify record, @Param("example") WpsNotifyExample example); + + int updateByExample(@Param("record") WpsNotify record, @Param("example") WpsNotifyExample example); + + int updateByPrimaryKeySelective(WpsNotify record); + + int updateByPrimaryKey(WpsNotify record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java b/tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java index 84c9fa2d..52333846 100644 --- a/tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java +++ b/tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java @@ -6,9 +6,10 @@ import com.ccsens.util.bean.message.common.MessageConstant; import com.ccsens.util.bean.message.common.ServerMessage; import com.ccsens.util.config.RabbitMQConfig; +import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.AmqpTemplate; import org.springframework.beans.factory.annotation.Autowired; - +@Slf4j public class MessageTest { @Autowired private AmqpTemplate rabbitTemplate; @@ -18,8 +19,8 @@ public class MessageTest { serverMessage.setType("Ping"); InMessage inMessage = InMessage.newToServerMessage(MessageConstant.DomainType.Server,serverMessage); String j = JacksonUtil.beanToJson(inMessage); - System.out.println(j); + log.info(j); //FixMe 发送到消息队列 - rabbitTemplate.convertAndSend(RabbitMQConfig.TALL_MESSAGE_1,j); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,j); } } diff --git a/tall/src/main/java/com/ccsens/tall/rabbitMQ/RabbitController.java b/tall/src/main/java/com/ccsens/tall/rabbitMQ/RabbitController.java index 8057ec65..89fe84d2 100644 --- a/tall/src/main/java/com/ccsens/tall/rabbitMQ/RabbitController.java +++ b/tall/src/main/java/com/ccsens/tall/rabbitMQ/RabbitController.java @@ -1,29 +1,29 @@ -package com.ccsens.tall.rabbitMQ; - - -import com.ccsens.util.config.RabbitMQConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.amqp.rabbit.annotation.RabbitHandler; -import org.springframework.amqp.rabbit.annotation.RabbitListener; -import org.springframework.stereotype.Component; - - -@Component -@RabbitListener(queues = RabbitMQConfig.TALL_MESSAGE_2) -public class RabbitController { - private Logger logger = LoggerFactory.getLogger(RabbitController.class); - - @RabbitHandler - public void process(String messageJson) { - logger.info("Rabbit Received: {}",messageJson); - try { - System.out.println("Rabbit Received: " + messageJson); - - }catch (Exception e){ - e.printStackTrace(); - } - - } - -} +//package com.ccsens.tall.rabbitMQ; +// +// +//import com.ccsens.util.config.RabbitMQConfig; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.amqp.rabbit.annotation.RabbitHandler; +//import org.springframework.amqp.rabbit.annotation.RabbitListener; +//import org.springframework.stereotype.Component; +// +// +//@Component +//@RabbitListener(queues = RabbitMQConfig.TALL_MESSAGE_2) +//public class RabbitController { +// private Logger logger = LoggerFactory.getLogger(RabbitController.class); +// +// @RabbitHandler +// public void process(String messageJson) { +// logger.info("Rabbit Received: {}",messageJson); +// try { +// System.out.println("Rabbit Received: " + messageJson); +// +// }catch (Exception e){ +// e.printStackTrace(); +// } +// +// } +// +//} diff --git a/tall/src/main/java/com/ccsens/tall/scheduled/ScheduledService.java b/tall/src/main/java/com/ccsens/tall/scheduled/ScheduledService.java new file mode 100644 index 00000000..c838931e --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/scheduled/ScheduledService.java @@ -0,0 +1,110 @@ +package com.ccsens.tall.scheduled; + +import cn.hutool.core.collection.CollectionUtil; +import com.ccsens.tall.bean.po.ProRemind; +import com.ccsens.tall.bean.vo.TaskVo; +import com.ccsens.tall.persist.dao.ProRemindDao; +import com.ccsens.tall.service.IProjectMessageService; +import com.ccsens.tall.service.IRobotService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +@Component +@EnableScheduling +public class ScheduledService { + @Resource + private ProRemindDao proRemindDao; + @Resource + private IRobotService robotService; + @Resource + private IProjectMessageService projectMessageService; + + public static final String BEFORE_START = "您在项目's'中的任务's'将在s开始"; + public static final String START = "您在项目's'中的任务's'开始了"; + public static final String AFTER_START = "您在项目's'中的任务's'已经在's'开始了"; + public static final String BEFORE_END = "您在项目's'中的任务's'将在's'结束"; + public static final String END = "您在项目's'中的任务's'结束了"; + public static final String AFTER_END = "您在项目's'中的任务's'已经在's'结束了"; + public static final String USER_DEFINED = "来自项目's'中的任务's'的提醒"; + + @Scheduled(cron = "*/60 * * * * ?") + public void runfirst(){ + long now = System.currentTimeMillis(); +// long now = 1594611047000L; + List taskRemindList = proRemindDao.queryRemindByNow(now); + if(CollectionUtil.isNotEmpty(taskRemindList)){ + log.info(taskRemindList.toString()); + taskRemindList.forEach(taskRemind -> { + //修改提醒信息的状态(设为进行中) + ProRemind proRemind = new ProRemind(); + proRemind.setId(taskRemind.getRemindId()); + proRemind.setFinishStatus((byte) 2); + proRemindDao.updateByPrimaryKeySelective(proRemind); + + String content = ""; + switch (taskRemind.getTiming()){ + case 1: + content = BEFORE_START.replaceFirst("s",taskRemind.getProjectName()); + content = content.replaceFirst("s",taskRemind.getTaskName()); + content = content.replaceFirst("s",taskRemind.getTaskBeginTime()); + break; + case 2: + content = START.replaceFirst("s",taskRemind.getProjectName()); + content = content.replaceFirst("s",taskRemind.getTaskName()); + break; + case 3: + content = AFTER_START.replaceFirst("s",taskRemind.getProjectName()); + content = content.replaceFirst("s",taskRemind.getTaskName()); + content = content.replaceFirst("s",taskRemind.getTaskBeginTime()); + break; + case 4: + content = BEFORE_END.replaceFirst("s",taskRemind.getProjectName()); + content = content.replaceFirst("s",taskRemind.getTaskName()); + content = content.replaceFirst("s",taskRemind.getTaskEndTime()); + break; + case 5: + content = END.replaceFirst("s",taskRemind.getProjectName()); + content = content.replaceFirst("s",taskRemind.getTaskName()); + break; + case 6: + content = AFTER_END.replaceFirst("s",taskRemind.getProjectName()); + content = content.replaceFirst("s",taskRemind.getTaskName()); + content = content.replaceFirst("s",taskRemind.getTaskEndTime()); + break; + case 7: + content = USER_DEFINED.replaceFirst("s",taskRemind.getProjectName()); + content = content.replaceFirst("s",taskRemind.getTaskName()); + break; + default: + break; + } + try { + //机器人发送 + robotService.sendRemindByRobot(taskRemind,content); + //公众号 + projectMessageService.sendRemindByWx(taskRemind,content); + + //修改提醒信息的状态 + proRemind.setFinishStatus((byte) 4); + proRemindDao.updateByPrimaryKeySelective(proRemind); + } catch (Exception e) { + e.printStackTrace(); + } + }); + } + } + + +} diff --git a/tall/src/main/java/com/ccsens/tall/service/AsyncService.java b/tall/src/main/java/com/ccsens/tall/service/AsyncService.java index 5f3696fa..26ceae7e 100644 --- a/tall/src/main/java/com/ccsens/tall/service/AsyncService.java +++ b/tall/src/main/java/com/ccsens/tall/service/AsyncService.java @@ -1,14 +1,24 @@ package com.ccsens.tall.service; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.tall.bean.vo.MessageVo; import com.ccsens.tall.util.RobotUtil; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.RestTemplateUtil; +import com.ccsens.util.WebConstant; import com.ccsens.util.annotation.OperateType; +import com.ccsens.util.wx.WxTemplateMessage; +import com.fasterxml.jackson.core.JsonProcessingException; import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.util.Map; @Slf4j @Async @@ -16,8 +26,12 @@ import javax.annotation.Resource; @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class AsyncService implements IAsyncService{ + @Lazy @Resource private IRobotService robotService; + @Lazy + @Resource + private IProjectMessageService projectMessageService; @Override @@ -25,4 +39,24 @@ public class AsyncService implements IAsyncService{ robotService.robotMessage(operateType,message); } + @Override + public void sendMessage(OperateType operateType, MessageVo.Inform inform, WxTemplateMessage wxTemplate) throws JsonProcessingException { + projectMessageService.sendProjectMessage(operateType, inform, wxTemplate); + } + + @Override + public void postBody(String url, Object params) { + log.info("post请求,url:{}, params:{}", url, params); + String result = RestTemplateUtil.postBody(url, params); + log.info("post调用结果:{}", result); + if (RestTemplateUtil.pageResult(result)) { + // TODO 错误信息存库,方便后续定时重发 + return; + } + JSONObject json = JSONObject.parseObject(result); + if (json.getIntValue(WebConstant.Field.CODE) == CodeEnum.SUCCESS.getCode().intValue()) { + return; + } + // TODO 错误信息存库,方便后续定时重发 + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/ChartService.java b/tall/src/main/java/com/ccsens/tall/service/ChartService.java new file mode 100644 index 00000000..4654df03 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/ChartService.java @@ -0,0 +1,162 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.tall.bean.dto.ChartDto; +import com.ccsens.tall.bean.po.ProRole; +import com.ccsens.tall.bean.po.SysProject; +import com.ccsens.tall.bean.vo.ChartVo; +import com.ccsens.tall.persist.dao.SysProjectDao; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.exception.BaseException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; + +@Service +public class ChartService implements IChartService{ + @Autowired + private SysProjectDao sysProjectDao; + @Autowired + private ProRoleService proRoleService; + + /** + * 任务执行者分布图 + * @param currentUserId + * @param + * @return + */ + @Override + public ChartVo.ExecutorChart getExecutorChart(Long currentUserId,ChartDto.ChartsExecutorDto executor) { + SysProject sysProject = sysProjectDao.selectByPrimaryKey(executor.getProjectId()); + if(ObjectUtil.isNull(sysProject)){ + throw new BaseException(CodeEnum.NOT_PROJECT); + } + List executorChartList = sysProjectDao.getExecutorChart(executor.getProjectId(),executor.getType(), executor.getProcess(), + executor.getRoleList(),executor.getBeginTime(),executor.getEndTime()); + ChartVo.ExecutorChart executorChart = new ChartVo.ExecutorChart(); + executorChart.setType(executor.getType()); + executorChart.setExecutorChart(executorChartList); + return executorChart; + } + + /** + * 计划时间内完成任务 + * @param currentUserId + * @param + * @return + */ + @Override + public List getCompleteTaskByTime(Long currentUserId, ChartDto.ChartsCompleteDto completeDto) { + //查找所有角色及任务数量 + List completeTaskNumList = sysProjectDao.getCompleteTaskByTime(completeDto.getProjectId(),completeDto.getRoleList(), + completeDto.getBeginTime(),completeDto.getEndTime()); + return completeTaskNumList; + } + + /** + * 项目进展趋势图 + * @param currentUserId + * @param projectTrendDto + * @return + */ + @Override + public List getProjectTrend(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto) { + Long start = DateUtil.parse(projectTrendDto.getStart()).getTime(); + Long end = DateUtil.parse(projectTrendDto.getEnd()).getTime(); + //获取“全体成员”角色 + ProRole allMember = proRoleService.getAllMember(projectTrendDto.getProjectId()); + Long allMemberId = null; + if (ObjectUtil.isNotNull(allMember)) { + allMemberId = allMember.getId(); + } + List projectTrendVoList = sysProjectDao.getProjectTrend(projectTrendDto.getProjectId(),start,end,projectTrendDto.getRoleId(),allMemberId); + return projectTrendVoList; + } + + /** + * 概览报表 + * @param currentUserId + * @param overview 项目id 时间范围 角色id + * @return + */ + @Override + public ChartVo.ProjectOverview getOverview(Long currentUserId, ChartDto.ChartsOverviewDto overview) throws Exception { + //获取全部的数据 + ChartVo.ProjectOverview projectOverview = sysProjectDao.getOverview(overview.getProjectId(),overview.getBeginTime(),overview.getEndTime(),overview.getRoleList()); + //获取当天零点和二十四点的时间 + Long startTime = DateUtil.beginOfDay(new Date()).getTime(); + Long endTime = DateUtil.endOfDay(new Date()).getTime(); + //获取当天的数据 + ChartVo.ProjectOverview projectOverview1 = sysProjectDao.getOverviewByToDay(overview.getProjectId(),startTime,endTime,overview.getRoleList()); + //将数据整合在一起 + projectOverview.setTodayCompleted(projectOverview1.getTodayCompleted() == null ? 0 : projectOverview1.getTodayCompleted()); + projectOverview.setToday(projectOverview1.getToday()); + return projectOverview; + } + + /** + * 燃尽图 + * @param currentUserId + * @param projectTrendDto + * @return + */ + @Override + public List getBurnoutFigure(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto) { + Long start = DateUtil.parse(projectTrendDto.getStart()).getTime(); + Long end = DateUtil.parse(projectTrendDto.getEnd()).getTime(); + //获取“全体成员”角色 + ProRole allMember = proRoleService.getAllMember(projectTrendDto.getProjectId()); + Long allMemberId = null; + if (ObjectUtil.isNotNull(allMember)) { + allMemberId = allMember.getId(); + } + //获取任务总数(如果type传1 查询规定条件内的任务总数,若传null,则按天分组查找) + List totalList = sysProjectDao.getBurnoutFigure(projectTrendDto.getProjectId(),start,end,projectTrendDto.getRoleId(),allMemberId,1); + //理想 + AtomicReference idealTotal = new AtomicReference<>(); + BigDecimal idealTotalInt = new BigDecimal(0); + //计划 + AtomicInteger plannedTotal = new AtomicInteger(); + //实际 + AtomicInteger realTotal = new AtomicInteger(); + if(CollectionUtil.isNotEmpty(totalList)) { + idealTotal.set(BigDecimal.valueOf(totalList.get(0).getTotalDay())); + idealTotalInt = BigDecimal.valueOf(totalList.get(0).getTotalDay()); + plannedTotal.set(totalList.get(0).getTotalDay()); + realTotal.set(totalList.get(0).getTotalDay()); + } + //按天获取信息 + List burnoutFigureList = sysProjectDao.getBurnoutFigure(projectTrendDto.getProjectId(),start,end,projectTrendDto.getRoleId(),allMemberId,null); + if(CollectionUtil.isNotEmpty(burnoutFigureList)){ + //每天理想完成数,总数/天数=每天理想完成数 + BigDecimal idealFinish = idealTotalInt.divide(BigDecimal.valueOf(burnoutFigureList.size()),1,BigDecimal.ROUND_HALF_UP); + burnoutFigureList.forEach(burnoutFigure -> { + //理想剩余数量 + idealTotal.set(idealTotal.get().subtract(idealFinish)); + if(idealTotal.get().compareTo(BigDecimal.valueOf(0)) < 1){ + burnoutFigure.setIdeal(BigDecimal.valueOf(0)); + }else { + burnoutFigure.setIdeal(idealTotal.get()); + } + //计划剩余数量 + plannedTotal.set(plannedTotal.get() - burnoutFigure.getTotalDay()); + burnoutFigure.setPlanned(plannedTotal.get()); + //实际剩余数量 + if(ObjectUtil.isNotNull(burnoutFigure.getCompleted())){ + realTotal.set(realTotal.get() - burnoutFigure.getCompleted()); + burnoutFigure.setRealistic(realTotal.get()); + }else{ + burnoutFigure.setRealistic(realTotal.get()); + } + }); + } + return burnoutFigureList; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java index 0c9d1b89..6d0b580d 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java @@ -1,74 +1,83 @@ package com.ccsens.tall.service; -import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.WpsDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.ProjectVo; -import com.ccsens.tall.persist.dao.SysPluginDao; -import com.ccsens.tall.persist.dao.TaskDetailDao; +import com.ccsens.tall.persist.dao.*; import com.ccsens.util.*; import com.ccsens.util.cron.CronConstant; import com.ccsens.util.cron.NatureToDate; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; -import net.sf.jsqlparser.expression.LongValue; -import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionDefinition; +import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.support.DefaultTransactionDefinition; +import javax.annotation.Resource; import java.io.FileInputStream; import java.io.InputStream; -import java.text.ParseException; -import java.text.SimpleDateFormat; import java.util.*; +/** + * @author 逗 + */ @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ExcelService implements IExcelService { - @Autowired + @Resource private SysPluginDao sysPluginDao; - @Autowired + @Resource private IProjectService projectService; - @Autowired + @Resource + private SysProjectDao sysProjectDao; + @Resource private IProShowService proShowService; - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private IProRoleService proRoleService; - @Autowired + @Resource private IProMemberRoleService proMemberRoleService; - @Autowired + @Resource private IExcludeRoleService excludeRoleService; - @Autowired + @Resource private IProMemberService proMemberService; - @Autowired + @Resource private IProTaskDetailService proTaskDetailService; - @Autowired + @Resource private TaskDetailDao taskDetailDao; - @Autowired + @Resource private ITaskSubTimeService taskSubTimeService; - @Autowired - private ITaskMemberService taskMemberService; - @Autowired + @Resource private ITaskDeliverService taskDeliverService; - @Autowired + @Resource private ITaskPluginService taskPluginService; - @Autowired + @Resource private IUserService userService; - @Autowired + @Resource private IUserAttentionService userAttentionService; - @Autowired + @Resource private IWbsSubSheetService wbsSubSheetService; + @Resource + private IWpsService wpsService; + @Resource + private ProRoleDao proRoleDao; + @Resource + private ProPluginConfigDao proPluginConfigDao; @Override @@ -77,8 +86,7 @@ public class ExcelService implements IExcelService { XSSFWorkbook xssfWorkbook = new XSSFWorkbook(is); //读取WBS表 SysProject sysProject = readWbs(xssfWorkbook, currentUserId); - ProjectVo.ProjectInfo projectInfo = selectByProjectId(currentUserId, sysProject); - return projectInfo; + return selectByProjectId(currentUserId, sysProject); } /** @@ -96,14 +104,14 @@ public class ExcelService implements IExcelService { List taskDetails = new ArrayList<>(); XSSFSheet memberSheet = xssfWorkbook.getSheet("项目成员表"); - XSSFSheet wbsSheet = xssfWorkbook.getSheetAt(0);//wbs + XSSFSheet wbsSheet = xssfWorkbook.getSheetAt(0); int projectInfoStart = 0; int projectInfoEnd = 0; int memberStart = 0; int memberEnd = 0; int taskStart = 0; - int taskEnd = 0; + int taskEnd; taskEnd = wbsSheet.getLastRowNum(); for (int i = 0; i <= wbsSheet.getLastRowNum(); i++) { @@ -142,7 +150,6 @@ public class ExcelService implements IExcelService { readProject(wbsSheet, projectInfoStart, projectInfoEnd, currentUserId, sysProject); readMember(wbsSheet, memberSheet, memberStart, memberEnd, sysProject, proRoles, proMembers); readTask(xssfWorkbook, wbsSheet, taskStart, taskEnd, currentUserId, sysProject, taskDetails, proRoles, proMembers, hasGroupMap); - saveProTaskSubTime(taskDetails); //读取插件表 readPlugin(xssfWorkbook, taskDetails, proRoles, hasGroupMap); //读取插件配置表 @@ -151,6 +158,10 @@ public class ExcelService implements IExcelService { wbsSubSheetService.getSigninSheet(sysProject.getId(),xssfWorkbook,taskDetails); //读取智能助手表 wbsSubSheetService.getRoBotSheet(sysProject.getId(),xssfWorkbook); + //读取关联项目表 + wbsSubSheetService.readRelevanceProject(sysProject.getId(),xssfWorkbook); + + saveProTaskSubTime(taskDetails); return sysProject; } @@ -159,14 +170,17 @@ public class ExcelService implements IExcelService { */ private void readProject(XSSFSheet wbsSheet, int projectInfoStart, int projectInfoEnd, Long currentUserId, SysProject sysProject) throws Exception { XSSFRow row = wbsSheet.getRow(projectInfoStart + 1); + if(ObjectUtil.isNull(row)){ + throw new BaseException(CodeEnum.NOT_ROW.addMsg(wbsSheet.getSheetName() + (projectInfoStart + 1))); + } String projectName = ExcelUtil.getCellValue(row.getCell(0)); if (StrUtil.isNotEmpty(projectName)) { String begin = ExcelUtil.getCellValue(row.getCell(3)); String end = ExcelUtil.getCellValue(row.getCell(4)); if (StrUtil.isNotEmpty(begin) && StrUtil.isNotEmpty(end)) { - Long beginTime = null; - Long endTime = null; + long beginTime; + long endTime; try { beginTime = Long.parseLong(begin); endTime = Long.parseLong(end); @@ -186,7 +200,7 @@ public class ExcelService implements IExcelService { //是否是模板,新加的不是模板 0 sysProject.setTemplate((byte) 0); projectService.saveProject(sysProject); - System.out.println(sysProject); + log.info(String.valueOf(sysProject)); //TODO 添加项目的展示配置 暂时全是默认 ProShow proShow = new ProShow(); proShow.setId(snowflake.nextId()); @@ -218,8 +232,8 @@ public class ExcelService implements IExcelService { proRoles.add(stakeholderRole); //添加奖惩干系人角色(二级角色) ProRole stakeholderProRole = new ProRole(); - stakeholderProRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.value); - stakeholderProRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.phase); + stakeholderProRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.phase); + stakeholderProRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.value); stakeholderProRole.setParentId(stakeholderRole.getId()); stakeholderProRole.setProjectId(sysProject.getId()); stakeholderProRole.setId(snowflake.nextId()); @@ -236,8 +250,8 @@ public class ExcelService implements IExcelService { proRoles.add(creator); //添加创建者角色(二级角色) ProRole creatorRole = new ProRole(); - creatorRole.setName(WebConstant.ROLE_NAME.Creator.value); - creatorRole.setDescription(WebConstant.ROLE_NAME.Creator.phase); + creatorRole.setName(WebConstant.ROLE_NAME.Creator.phase); + creatorRole.setDescription(WebConstant.ROLE_NAME.Creator.value); creatorRole.setParentId(creator.getId()); creatorRole.setProjectId(sysProject.getId()); creatorRole.setId(snowflake.nextId()); @@ -269,9 +283,13 @@ public class ExcelService implements IExcelService { Long secondRoleId = null; for (int i = memberStart + 1; i <= memberEnd; i++) { XSSFRow row = wbsSheet.getRow(i); + if(ObjectUtil.isNull(row)){ + continue; + } String proRoleCell = ExcelUtil.getCellValue(row.getCell(1)); String secondRoleCell = ExcelUtil.getCellValue(row.getCell(2)); String memberCell = ExcelUtil.getCellValue(row.getCell(3)); + String roleRelevanceProjectId = ExcelUtil.getCellValue(row.getCell(3)); //添加一级角色 if (StrUtil.isNotEmpty(proRoleCell)) { ProRole role = new ProRole(); @@ -300,6 +318,9 @@ public class ExcelService implements IExcelService { } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Attention.phase)) { role.setName(WebConstant.ROLE_NAME.Attention.value); role.setDescription(WebConstant.ROLE_NAME.Attention.phase); + }else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.ProjectVirtualRole.phase)) { + role.setName(WebConstant.ROLE_NAME.ProjectVirtualRole.value); + role.setDescription(WebConstant.ROLE_NAME.ProjectVirtualRole.phase); } else { throw new BaseException(CodeEnum.WBS_NOT_FIRST_ROLE.addMsg(wbsSheet.getSheetName() + i)); } @@ -328,6 +349,19 @@ public class ExcelService implements IExcelService { proRole.setParentId(firstRoleId); proRole.setProjectId(sysProject.getId()); proRole.setId(snowflake.nextId()); + //为虚拟项目角色添加关联的项目id + if (StrUtil.isEmpty(memberCell) && StrUtil.isNotEmpty(roleRelevanceProjectId)){ + //查找关联的项目 + try { + SysProject project = sysProjectDao.selectByPrimaryKey(Long.parseLong(roleRelevanceProjectId)); + if(ObjectUtil.isNull(project)){ + throw new BaseException(CodeEnum.NOT_PROJECT.addMsg(wbsSheet.getSheetName() + i)); + } + proRole.setRelevanceProjectId(project.getId()); + }catch (NumberFormatException e){ + throw new BaseException(CodeEnum.NOT_PROJECT.addMsg(wbsSheet.getSheetName() + i)); + } + } proRoleService.saveProRole(proRole); proRoles.add(proRole); secondRoleId = proRole.getId(); @@ -338,7 +372,7 @@ public class ExcelService implements IExcelService { if (ObjectUtil.isNull(secondRoleId)) { throw new BaseException("找不到二级角色[" + i + "]"); } - + //添加角色成员关联信息 if (StrUtil.isNotEmpty(memberCell)) { ProMemberRole memberRole = null; for (ProMember member : proMembers) { @@ -353,12 +387,19 @@ public class ExcelService implements IExcelService { if (ObjectUtil.isNull(memberRole)) { throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(wbsSheet.getSheetName() + i)); } + }else if (StrUtil.isNotEmpty(roleRelevanceProjectId)) { + + } + } //角色对谁不可见 String[] excludeRoleCells; for (int i = memberStart + 1; i <= memberEnd; i++) { XSSFRow row = wbsSheet.getRow(i); + if(ObjectUtil.isNull(row)){ + continue; + } String secondRoleCell = ExcelUtil.getCellValue(row.getCell(2)); String excludeRoleCell = StringUtil.replaceComma(ExcelUtil.getCellValue(row.getCell(4))); //获取角色对谁不可见 @@ -432,12 +473,16 @@ public class ExcelService implements IExcelService { Set userIdSet = new HashSet<>(); for (int i = 1; i <= memberSheet.getLastRowNum(); i++) { - String memberCell = ExcelUtil.getCellValue(memberSheet.getRow(i).getCell(1)); - String phoneCell = ExcelUtil.getCellValue(memberSheet.getRow(i).getCell(2)); - String stakeholderCell = ExcelUtil.getCellValue(memberSheet.getRow(i).getCell(3)); - String stakeholderPhoneCell = ExcelUtil.getCellValue(memberSheet.getRow(i).getCell(4)); + XSSFRow row = memberSheet.getRow(i); + if(ObjectUtil.isNull(row)){ + continue; + } + String memberCell = ExcelUtil.getCellValue(row.getCell(1)); + String phoneCell = ExcelUtil.getCellValue(row.getCell(2)); + String stakeholderCell = ExcelUtil.getCellValue(row.getCell(3)); + String stakeholderPhoneCell = ExcelUtil.getCellValue(row.getCell(4)); ProMember stakeholder = null; - ProMember member = null; + ProMember member; //手机号不能为空 if ((StrUtil.isNotEmpty(memberCell) && StrUtil.isEmpty(phoneCell)) || (StrUtil.isNotEmpty(stakeholderCell) && StrUtil.isEmpty(stakeholderPhoneCell))) { @@ -594,14 +639,17 @@ public class ExcelService implements IExcelService { Long firstStartTime = null; for (int i = taskStart + 1; i <= taskEnd; i++) { XSSFRow row = wbsSheet.getRow(i); + if(ObjectUtil.isNull(row)){ + continue; + } //一级任务名称 String task1 = ExcelUtil.getCellValue(row.getCell(1)); //二级任务名称 String task2 = ExcelUtil.getCellValue(row.getCell(2)); String description = ExcelUtil.getCellValue(row.getCell(3)); - String beginTime = ExcelUtil.getCellValue(row.getCell(4)); - String endTime = ExcelUtil.getCellValue(row.getCell(5)); + String beginTime = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(4))); + String endTime = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(5))); String repeat = ExcelUtil.getCellValue(row.getCell(7)); String subTaskCell = ExcelUtil.getCellValue(row.getCell(8)); String subProject = ExcelUtil.getCellValue(row.getCell(9)); @@ -685,12 +733,18 @@ public class ExcelService implements IExcelService { taskDetail.setAllMember((byte) 1); //子项目 if (StrUtil.isNotEmpty(subProject)) { - SysProject project = projectService.selectByNameAndUserId(subProject, currentUserId); - if (ObjectUtil.isNotNull(project)) { - taskDetail.setSubProjectId(project.getId()); - taskDetail.setSubProject(subProject); - project.setParentTaskId(taskDetail.getId()); - projectService.updateProject(project); + subProject = StringUtil.replaceComma(subProject); + List projectId = StringUtil.extractMessage(subProject); + if(CollectionUtil.isNotEmpty(projectId)) { + Long projectId1 = Long.valueOf(projectId.get(0)); +// SysProject project = projectService.selectByNameAndUserId(subProject, currentUserId); + SysProject project = sysProjectDao.selectByPrimaryKey(projectId1); + if (ObjectUtil.isNotNull(project)) { + taskDetail.setSubProjectId(project.getId()); + taskDetail.setSubProject(project.getName()); + project.setParentTaskId(taskDetail.getId()); + projectService.updateProject(project); + } } } //负责人 @@ -835,6 +889,8 @@ public class ExcelService implements IExcelService { } } } +// // 添加默认例会任务 +// saveMeeting(taskDetails,pmRoleId,sysProject,proRoles); //添加一个结束虚拟节点 ProTaskDetail endTask = new ProTaskDetail(); endTask.setId(snowflake.nextId()); @@ -847,15 +903,101 @@ public class ExcelService implements IExcelService { taskDetails.add(endTask); } + /** + * 添加默认的例会任务 + * @param taskDetails 任务集合 + * @param pmRoleId 项目经理的角色id + * @param sysProject 项目信息 + * @param proRoles 所有角色 + */ + private void saveMeeting(List taskDetails, Long pmRoleId, SysProject sysProject, List proRoles) { + //添加一级任务“例会” + ProTaskDetail firstTaskDetail = new ProTaskDetail(); + firstTaskDetail.setId(snowflake.nextId()); + firstTaskDetail.setName("例会"); + firstTaskDetail.setProjectId(sysProject.getId()); + firstTaskDetail.setBeginTime(sysProject.getBeginTime()); + firstTaskDetail.setEndTime(sysProject.getEndTime()); + firstTaskDetail.setDelay((byte) WebConstant.TASK_DELAY.SelfMotion.value); + firstTaskDetail.setVirtual((byte) WebConstant.TASK_VIRTUAL.Normal.value); + firstTaskDetail.setLevel((byte) WebConstant.TASK_LEVEL.FirstTask.value); + firstTaskDetail.setExecutorRole(pmRoleId); + proTaskDetailService.saveTaskDetail(firstTaskDetail); + taskDetails.add(firstTaskDetail); + + //获取全体成员的角色id,如果没有,给每个角色添加任务 + long allMemberId = 0; + ProRoleExample proRoleExample = new ProRoleExample(); + proRoleExample.createCriteria().andProjectIdEqualTo(sysProject.getId()).andNameEqualTo(WebConstant.ROLE_NAME.AllMember.phase); + List roles = proRoleDao.selectByExample(proRoleExample); + if(CollectionUtil.isEmpty(roles)){ + //如果没有“全体成员”的角色,则添加一个 + ProRoleExample firstRole = new ProRoleExample(); + firstRole.createCriteria().andProjectIdEqualTo(sysProject.getId()).andNameEqualTo(WebConstant.ROLE_NAME.Member.value) + .andParentIdEqualTo(0L); + List firstRoles = proRoleDao.selectByExample(firstRole); + if(CollectionUtil.isNotEmpty(firstRoles)){ + ProRole proRole = new ProRole(); + proRole.setId(snowflake.nextId()); + proRole.setName("全体成员"); + proRole.setParentId(firstRoles.get(0).getId()); + proRole.setProjectId(sysProject.getId()); + proRoleService.saveProRole(proRole); + proRoles.add(proRole); + allMemberId = proRole.getId(); + } + }else { + allMemberId = roles.get(0).getId(); + } + if(allMemberId != 0) { + //添加日报 + saveMeetingTask("日报", "每天", taskDetails, sysProject, pmRoleId, allMemberId, firstTaskDetail.getId(), + "/home/report?type=\"day\""); + //添加周报 + saveMeetingTask("周报", "每周一", taskDetails, sysProject, pmRoleId, allMemberId, firstTaskDetail.getId(), + "/home/report?type=\"week\""); + // TODO 添加季报 + //添加月报 + saveMeetingTask("月报", "每月1号", taskDetails, sysProject, pmRoleId, allMemberId, firstTaskDetail.getId(), + "/home/report?type=\"month\""); + //添加年报 + saveMeetingTask("年报", "每年第一天", taskDetails, sysProject, pmRoleId, allMemberId, firstTaskDetail.getId(), + "/home/report?type=\"year\""); + } + } + + private void saveMeetingTask(String name, String cycle, List taskDetails, SysProject sysProject, + Long checkerRoleId, Long executorRoleId,Long parentId, String webPath) { + ProTaskDetail dayMeeting = new ProTaskDetail(); + dayMeeting.setId(snowflake.nextId()); + dayMeeting.setName(name); + dayMeeting.setCycle(cycle); + dayMeeting.setProjectId(sysProject.getId()); + dayMeeting.setBeginTime(sysProject.getBeginTime()); + dayMeeting.setEndTime(sysProject.getEndTime()); + dayMeeting.setParentId(parentId); + dayMeeting.setLevel((byte) WebConstant.TASK_LEVEL.SecondTask.value); + dayMeeting.setVirtual((byte) WebConstant.TASK_VIRTUAL.Normal.value); + dayMeeting.setCheckerRole(checkerRoleId); + dayMeeting.setExecutorRole(executorRoleId); + dayMeeting.setHasGroup((byte) 0); + proTaskDetailService.saveTaskDetail(dayMeeting); + //添加任务配置(配置第三栏默认显示页面的路径) + ProPluginConfig proPluginConfig = new ProPluginConfig(); + proPluginConfig.setId(snowflake.nextId()); + proPluginConfig.setTaskId(dayMeeting.getId()); + proPluginConfig.setWebPath(webPath); + proPluginConfigDao.insertSelective(proPluginConfig); + + taskDetails.add(dayMeeting); + } /** * 分解任务时间 - * - * @param taskDetails - * @throws Exception + * @param taskDetails 任务集合 */ - public void saveProTaskSubTime(List taskDetails) throws Exception { + public void saveProTaskSubTime(List taskDetails) { if (CollectionUtil.isNotEmpty(taskDetails)) { for (ProTaskDetail taskDetail : taskDetails) { //虚拟任务不拆分 @@ -879,11 +1021,13 @@ public class ExcelService implements IExcelService { return; } for (CronConstant.TaskDate taskDate : taskDateList) { + ProTaskSubTime proTaskSubTime = new ProTaskSubTime(); proTaskSubTime.setId(snowflake.nextId()); proTaskSubTime.setTaskDetailId(taskDetail.getId()); proTaskSubTime.setBeginTime(taskDate.getStartDate().getTime()); proTaskSubTime.setEndTime(taskDate.getEndDate().getTime()); + taskSubTimeService.saveProTaskSubTask(proTaskSubTime); } } @@ -895,20 +1039,24 @@ public class ExcelService implements IExcelService { * 读取交付物表 */ @Override - public void readDeliverSheet(String deliverCell, XSSFWorkbook xssfWorkbook, Long taskId) throws Exception { + public void readDeliverSheet(String deliverCell, XSSFWorkbook xssfWorkbook, Long taskId) { if (StrUtil.isNotEmpty(deliverCell)) { String str = ""; if (deliverCell.length() > 4) { str = deliverCell.substring(0, 3); } - if ("关联表".equals(str)) { + if ("关联表".equalsIgnoreCase(str)) { String subStr = deliverCell.substring(4); XSSFSheet subSheet = xssfWorkbook.getSheet(subStr); if(ObjectUtil.isNull(subSheet)){ throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); } for (int i = 2; i <= subSheet.getLastRowNum(); i++) { - String deliver = ExcelUtil.getCellValue(subSheet.getRow(i).getCell(1)); + XSSFRow row = subSheet.getRow(i); + if(ObjectUtil.isNull(row)){ + continue; + } + String deliver = ExcelUtil.getCellValue(row.getCell(1)); if (StrUtil.isNotEmpty(deliver)) { ProTaskDeliver taskDeliver = new ProTaskDeliver(); taskDeliver.setId(snowflake.nextId()); @@ -936,12 +1084,11 @@ public class ExcelService implements IExcelService { /** * 读取插件 - * - * @param xssfWorkbook - * @param taskDetails - * @param proRoles + * @param xssfWorkbook 插件sheet + * @param taskDetails 任务集合 + * @param proRoles 角色集合 */ - private void readPlugin(XSSFWorkbook xssfWorkbook, List taskDetails, List proRoles, Map> hasGroupMap) throws Exception { + private void readPlugin(XSSFWorkbook xssfWorkbook, List taskDetails, List proRoles, Map> hasGroupMap) { SysPluginExample pluginExample = new SysPluginExample(); pluginExample.clear(); List sysPluginList = sysPluginDao.selectByExample(pluginExample); @@ -951,10 +1098,15 @@ public class ExcelService implements IExcelService { Long taskId = null; Long memberRoleId = null; XSSFRow roleRow = sheet.getRow(2); - + if(ObjectUtil.isNull(roleRow)){ + throw new BaseException(CodeEnum.NOT_ROW.addMsg(sheet.getSheetName() + (2))); + } for (int i = 3; i < sheet.getLastRowNum(); i++) { List taskNameList = null; XSSFRow pluginRow = sheet.getRow(i); + if(ObjectUtil.isNull(pluginRow)){ + continue; + } String task = ExcelUtil.getCellValue(pluginRow.getCell(1)); //获取任务Id if (StrUtil.isNotEmpty(task)) { @@ -1028,13 +1180,11 @@ public class ExcelService implements IExcelService { /** * 返回信息 - * - * @param currentUserId - * @param sysProject - * @return - * @throws Exception + * @param currentUserId userId + * @param sysProject 项目信息 + * @return 项目详细信息 */ - public ProjectVo.ProjectInfo selectByProjectId(Long currentUserId, SysProject sysProject) throws Exception { + public ProjectVo.ProjectInfo selectByProjectId(Long currentUserId, SysProject sysProject) { //返回参数 ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); projectInfo.setId(sysProject.getId()); @@ -1046,14 +1196,43 @@ public class ExcelService implements IExcelService { if (ObjectUtil.isNotNull(projectInfo)) { projectInfo.setCreator(true); } -// //获取当前用户在本项目中的一级角色 -// List proRoles = proRoleService.getProRoleByProjectIdAndUserId(projectInfo.getId(), currentUserId); -// if (CollectionUtil.isNotEmpty(proRoles)) { -// projectInfo.setRoles(new ArrayList<>()); -// for (ProRole proRole : proRoles) { -// projectInfo.getRoles().add(proRole.getName()); -// } -// } + return projectInfo; } + + /** + * 保存wbs的文件信息,添加wps信息 + * @param projectId 项目Id + * @param filePath 文件路径 + * @param fileName 文件名 + * @param fileSize 文件大小 + * @param wpsFileId wps里的文件的id + */ + @Override + public void saveWbsExcelFile(Long userId,Long projectId,String filePath, String fileName, Long fileSize,Long wpsFileId) { +// //添加文件信息 +// SysCommitedFile commitedFile = new SysCommitedFile(); +// commitedFile.setId(snowflake.nextId()); +// commitedFile.setPath(filePath); +// commitedFile.setName(fileName); +// String md5 = Md5Util.getFileMD5(new File(WebConstant.UPLOAD_PATH_BASE + File.separator + filePath)); +// String sha1 = Sha1Util.getFileSha1(new File(WebConstant.UPLOAD_PATH_BASE + File.separator + filePath)); +// commitedFile.setMd5(md5); +// commitedFile.setSha1(sha1); +// commitedFile.setCount(1); +// commitedFile.setTime(System.currentTimeMillis()); +// commitedFileDao.insertSelective(commitedFile); + //添加wps的信息 + WpsDto.Business business = new WpsDto.Business(); + business.setBusinessId(projectId); + business.setWpsFileId(wpsFileId); + business.setBusinessType((byte) 0); + business.setUserId(userId); + business.setFileName(fileName); + business.setFilePath(filePath); + business.setFileSize(fileSize); + business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); + business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_READ); + wpsService.saveFile(business); + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/ExportWbsService.java b/tall/src/main/java/com/ccsens/tall/service/ExportWbsService.java index 7762e073..06a49334 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExportWbsService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExportWbsService.java @@ -12,6 +12,7 @@ import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.WbsVo; import com.ccsens.tall.persist.dao.*; import com.ccsens.util.PoiUtil; +import com.ccsens.util.PropUtil; import com.ccsens.util.WebConstant; import lombok.Data; import lombok.extern.slf4j.Slf4j; @@ -105,7 +106,7 @@ public class ExportWbsService implements IExportWbsService{ wb.write(stream); stream.close(); - return WebConstant.TEST_URL_BASE + fileName; + return PropUtil.imgDomain + "/" + fileName; } /** * 查找所有成员及奖惩干系人 @@ -711,7 +712,7 @@ public class ExportWbsService implements IExportWbsService{ wb.write(stream); stream.close(); - return WebConstant.TEST_URL_BASE + fileName; + return PropUtil.imgDomain + "/" + fileName; } /** * 生成清单excel的写入数据 @@ -793,7 +794,7 @@ public class ExportWbsService implements IExportWbsService{ //生成压缩包并返回下载路径 String zipPath = "/project/" + DateUtil.today() +"/"+ deliverWithExcelList.get(0).getProjectName()+".zip"; ZipUtil.zip(WebConstant.UPLOAD_PATH_BASE + "/"+filePath, WebConstant.UPLOAD_PATH_BASE + zipPath); - path = WebConstant.TEST_URL_BASE + zipPath; + path = PropUtil.imgDomain + "/" + zipPath; //删除压缩前的文件 FileUtil.del(WebConstant.UPLOAD_PATH_BASE + "/"+filePath); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IAsyncService.java b/tall/src/main/java/com/ccsens/tall/service/IAsyncService.java index aa8f6c5f..16beaabd 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IAsyncService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IAsyncService.java @@ -1,11 +1,34 @@ package com.ccsens.tall.service; +import com.ccsens.tall.bean.vo.MessageVo; import com.ccsens.tall.util.RobotUtil; import com.ccsens.util.annotation.OperateType; +import com.ccsens.util.wx.WxTemplateMessage; +import com.fasterxml.jackson.core.JsonProcessingException; + +import java.util.Map; /** * 异步方法 */ + public interface IAsyncService { void sendRobotMessage(OperateType operateType, RobotUtil.Message message); + + /** + * 消息发送(ws,公众号) + * @param operateType + * @param inform + * @param wxTemplate + */ + void sendMessage(OperateType operateType, MessageVo.Inform inform, WxTemplateMessage wxTemplate) throws JsonProcessingException; + + /** + * 消息发送 + * @param url 调用路径 + * @param params 参数 + */ + void postBody(String url, Object params); + + } diff --git a/tall/src/main/java/com/ccsens/tall/service/IChartService.java b/tall/src/main/java/com/ccsens/tall/service/IChartService.java new file mode 100644 index 00000000..8fa2a1c9 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/IChartService.java @@ -0,0 +1,19 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.dto.ChartDto; +import com.ccsens.tall.bean.vo.ChartVo; + +import java.util.List; + +public interface IChartService { + ChartVo.ExecutorChart getExecutorChart(Long currentUserId,ChartDto.ChartsExecutorDto chartsExecutorDto); + + List getCompleteTaskByTime(Long currentUserId,ChartDto.ChartsCompleteDto chartsCompleteDto); + + List getProjectTrend(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto); + + ChartVo.ProjectOverview getOverview(Long currentUserId, ChartDto.ChartsOverviewDto chartsOverviewDto) throws Exception; + + List getBurnoutFigure(Long currentUserId, ChartDto.ProjectTrendDto projectTrendDto); + +} diff --git a/tall/src/main/java/com/ccsens/tall/service/IExcelService.java b/tall/src/main/java/com/ccsens/tall/service/IExcelService.java index 4daabee9..c3aca4fd 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IExcelService.java @@ -4,8 +4,35 @@ package com.ccsens.tall.service; import com.ccsens.tall.bean.vo.ProjectVo; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import javax.servlet.http.Part; + public interface IExcelService { + /** + * 导入wbs + * @param path 文件路径 + * @param currentUserId userId + * @return 返回项目详细信息 + * @throws Exception io + */ ProjectVo.ProjectInfo readXls(String path, Long currentUserId) throws Exception; + /** + * 读取交付物表 + * @param deliverCell 交付物子表名 + * @param xssfWorkbook excel文件 + * @param taskId 任务id + * @throws Exception io + */ void readDeliverSheet(String deliverCell, XSSFWorkbook xssfWorkbook, Long taskId) throws Exception; + + /** + * 保存wbs文件,保存wps信息 + * @param userId userId + * @param projectId 项目id + * @param filePath 文件路径 + * @param fileName 文件名 + * @param fileSize 文件大小 + * @param wpsFileId 前端传的wps里的文件id + */ + void saveWbsExcelFile(Long userId,Long projectId,String filePath, String fileName,Long fileSize,Long wpsFileId); } diff --git a/tall/src/main/java/com/ccsens/tall/service/ILabelService.java b/tall/src/main/java/com/ccsens/tall/service/ILabelService.java new file mode 100644 index 00000000..f921fee1 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/ILabelService.java @@ -0,0 +1,20 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.dto.LabelDto; +import com.ccsens.tall.bean.vo.LabelVo; + +import java.util.List; + +public interface ILabelService { + List addLabel(Long userId,LabelDto.AddLabel labelList); + + List selectLabel(Long currentUserId,String key); + + void delLabel(Long currentUserId, LabelDto.DelLabel delLabel); + + void changeLabel(Long currentUserId, LabelDto.ChangeLabel changeLabel); + + List projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); + + List projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); +} diff --git a/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java b/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java index e1009abd..cb996d8d 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java @@ -1,5 +1,7 @@ package com.ccsens.tall.service; +import com.ccsens.tall.bean.dto.MemberDto; +import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.po.ProMember; import com.ccsens.tall.bean.po.ProRole; import com.ccsens.tall.bean.vo.MemberVo; @@ -12,9 +14,9 @@ public interface IProMemberService { List selectMembersByProjectId(Long projectId) throws Exception; - Boolean userIsBelongRole(Long currentUserId, Long id) throws Exception; + Boolean userIsBelongRole(Long currentUserId, Long id,Integer imitation) throws Exception; - List selectRolesByUserIdAndProjectId(Long currentUserId, Long projectId) throws Exception; + List selectRolesByUserIdAndProjectId(Long currentUserId, Long projectId,Integer imitation) throws Exception; MemberVo.MemberInfo getProMemberByProjectIdAndUserId(Long projectId, Long currentUserId)throws Exception; @@ -29,4 +31,43 @@ public interface IProMemberService { List getMemberIdByProjectId(Long projectId); MemberVo.MemberInfo getUserInfoByUserId(Long userId); + + /** + * 添加成员 + * @param currentUserId userId + * @param saveMember 项目id,角色id,成员姓名和手机号等 + * @throws Exception 权限不足异常 + */ + void saveProMember(Long currentUserId, MemberDto.SaveMember saveMember) throws Exception; + + /** + * 删除成员 + * @param currentUserId userId + * @param deleteMember 被删除的成员的id + */ + void deleteMember(Long currentUserId, MemberDto.DeleteMember deleteMember); + + /** + * 修改成员的信息 + * @param currentUserId userId + * @param updateMemberInfo 需要修改的信息 + * @return 返回修改后的成员信息 + */ + ProjectVo.MembersByProject updateMemberInfo(Long currentUserId, MemberDto.UpdateMemberInfo updateMemberInfo) throws Exception; + + /** + * 获取项目的关注者(不包含成员) + * @param projectDto 项目id + * @return 返回关注者的信息 + */ + List queryAttention(ProjectDto.ProjectIdDto projectDto); + + /** + * 根据用户id和任務id查询用户信息 + * @param userId 用户ID + * @param taskId 任务ID + * @return 用户信息 + */ + MemberVo.MemberInfo getMemberByUserIdAndTaskId(Long userId, Long taskId); + } diff --git a/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java b/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java index 2fa21c78..342279c3 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java @@ -1,7 +1,9 @@ package com.ccsens.tall.service; +import com.ccsens.tall.bean.dto.RoleDto; import com.ccsens.tall.bean.po.ProRole; import com.ccsens.tall.bean.vo.ProjectVo; +import com.ccsens.tall.bean.vo.RoleVo; import com.ccsens.tall.bean.vo.TaskVo; import java.util.List; @@ -12,7 +14,7 @@ public interface IProRoleService { List getProRoleByProjectIdAndUserId(Long projectId, Long currentUserId); - List getRolesByProjectIdAndUserId(Long projectId, Long currentUserId) throws Exception; + List getRolesByProjectIdAndUserId(Long projectId, Long currentUserId,Integer imitation) throws Exception; List getRealMemberRolesByProjectId(Long projectId); @@ -25,4 +27,19 @@ public interface IProRoleService { void deleteRole(Long userId,Long roleId) throws Exception; void deleteRoleByProjectId(Long projectId) throws Exception; + + void saveRole(Long currentUserId, RoleDto.SaveRole saveRole); + + void updateRole(Long currentUserId, RoleDto.UpdateRole updateRole); + + void saveMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember); + + void deleteMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember); + + /** + * 查找项目下的角色包含“全体成员” + * @param projectId 项目id + * @return + */ + RoleVo.RoleByProjectId queryRoleByProjectId(Long projectId); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java b/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java index ffac0a98..195c74cf 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java @@ -1,5 +1,6 @@ package com.ccsens.tall.service; +import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.dto.TaskDto; import com.ccsens.tall.bean.po.ProSubTimeMember; import com.ccsens.tall.bean.po.ProTaskDetail; @@ -10,13 +11,15 @@ import java.util.List; public interface IProTaskDetailService { void saveTaskDetail(ProTaskDetail taskDetail); - Object getTasksByRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception; + Object getTasksByRoleId(Long currentUserId, Long projectId, TaskDto.QueryTaskInfoByRoleId taskInfoByRoleId) throws Exception; - TaskVo.NormalTask getTaskInfoByTaskId(Long currentUserId, Long projectId, Long taskId) throws Exception; + List getTaskInfoByMvp(Long projectId); + + TaskVo.NormalTask getTaskInfoByTaskId(Long currentUserId, Long projectId, Long taskId,Integer imitation) throws Exception; TaskVo.TaskCheckList selectTaskList(Long currentUserId, String key, String start, String end, String role, Integer page, Integer pageSize) throws Exception; - TaskVo.TaskCheckList selectTaskListByProject(Long projectId, Long currentUserId, Integer page, Integer pageSize, String key, String start, String end, Long roleId) throws Exception; + TaskVo.TaskCheckList selectTaskListByProject(Long currentUserId,TaskDto.SelectListByProject selectListByProject) throws Exception; List getTaskDetailByKey(Long currentUserId, Long projectId, String key); @@ -31,6 +34,25 @@ public interface IProTaskDetailService { TaskVo.NormalTask updateTaskInfo(Long currentUserId, TaskDto.UpdateTaskInfo updateTaskInfo) throws Exception; TaskVo.TaskInfoWithFeign getProjectIdByTaskId(Long taskId); - - void managePlugin(Long userId,Long roleId,TaskVo.NormalTask normalTask) throws Exception; + /** + * 处理任务的插件 + */ + void managePlugin(Long userId,Long roleId,TaskVo.NormalTask normalTask,Integer imitation) throws Exception; + + /** + * 修改任务的配置信息 + * @param userId userId + * @param updateTaskConfig 任务的配置信息 + * @return 返回修改后的配置信息 + * @throws Exception 异常 + */ + TaskVo.NormalTask updateTaskConfig(Long userId,TaskDto.UpdateTaskConfig updateTaskConfig) throws Exception; + + /** + * 通过项目id查找所有任务 + * @param currentUserId userId + * @param projectId 项目Id + * @return 返回所有任务 + */ + List queryAllTaskByProjectId(Long currentUserId, TaskDto.QueryAllTaskByProjectId projectId) throws Exception; } diff --git a/tall/src/main/java/com/ccsens/tall/service/IProjectMessageService.java b/tall/src/main/java/com/ccsens/tall/service/IProjectMessageService.java new file mode 100644 index 00000000..2983090f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/IProjectMessageService.java @@ -0,0 +1,73 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.dto.ProjectMessageDto; +import com.ccsens.tall.bean.vo.MessageVo; +import com.ccsens.tall.bean.vo.ProjectMessageVo; +import com.ccsens.tall.bean.vo.TaskVo; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.annotation.OperateType; +import com.ccsens.util.wx.WxTemplateMessage; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.github.pagehelper.PageInfo; + +/** + * @description: + * @author: whj + * @time: 2020/5/26 17:36 + */ +public interface IProjectMessageService { + + /** + * 发送消息(ws/公众号) + * @param operateType + * @param inform + */ + void sendProjectMessage(OperateType operateType, MessageVo.Inform inform, WxTemplateMessage wxMessage) throws JsonProcessingException; + + /** + * 查询未读消息数 + * @param sendType + * @param userId + * @return + */ + ProjectMessageVo.UnreadNum queryUnreadNum(Byte sendType, Long userId); + + /** + * 分页查询未读消息数 + * @param param + * @param userId + * @return + */ + PageInfo queryMsg(ProjectMessageDto.Query param, Long userId); + + /** + * 标记某条消息已读 + * @param param + * @param userId + * @return + */ + CodeEnum markRead(ProjectMessageDto.MarkRead param, Long userId); + + /** + * 标记全部消息已读 + * @param param + * @param userId + * @return + */ + CodeEnum markAllRead(ProjectMessageDto.MarkAllRead param, Long userId); + + /** + * 查询项目动态 + * @param param + * @param userId + * @return + */ + PageInfo queryProjectMsg(ProjectMessageDto.ProjectMsg param, Long userId); + + /** + * 任务提醒 + * @param taskRemind 提醒相关消息 + * @param content 提醒的内容 + */ + void sendRemindByWx(TaskVo.RemindTask taskRemind, String content) throws Exception; +} diff --git a/tall/src/main/java/com/ccsens/tall/service/IProjectService.java b/tall/src/main/java/com/ccsens/tall/service/IProjectService.java index 240b87ad..a0ed1c20 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProjectService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProjectService.java @@ -13,11 +13,11 @@ public interface IProjectService { SysProject selectByNameAndUserId(String subProject, Long currentUserId)throws Exception; - List getProjectInfo(Long currentUserId, String date)throws Exception; + List getProjectInfo(Long currentUserId, String date,Integer orderType,Integer order,String token)throws Exception; List haveProjectDay(Long currentUserId, String date) throws Exception; - ProjectVo.ProjectInfo getProjectInfoById(Long currentUserId, Long projectId) throws Exception; + ProjectVo.ProjectInfo getProjectInfoById(Long currentUserId, Long projectId,String token) throws Exception; List getTemplate()throws Exception; @@ -29,7 +29,31 @@ public interface IProjectService { void deleteProject(Long currentUserId, Long projectId)throws Exception; - ProjectVo.ProjectInfo copyProject(Long userId, ProjectDto.ProjectIdDto projectDto); + ProjectVo.ProjectInfo copyProject(Long userId, ProjectDto.ProjectIdDto projectDto,String token); - ProjectVo.ProjectInfo changeProjectInfo(Long currentUserId, ProjectDto.ProjectInfoDto projectInfoDto); + ProjectVo.ProjectInfo changeProjectInfo(Long currentUserId, ProjectDto.ProjectInfoDto projectInfoDto,String token); + + ProjectVo.ProjectAllDetailed selectByLabelName(Long currentUserId, String labelName,Integer pageSize,Integer page,String token); + + List selectRelevanceProject(Long currentUserId, Long projectId); + + /** + * 修改项目配置信息 + * @param currentUserId userId + * @param projectConfig 项目配置信息 + * @return 返回修改后的项目信息 + */ + ProjectVo.ProjectInfo updateProjectConfig(Long currentUserId, ProjectDto.ProjectConfig projectConfig,String token); + + /** + * 变身成为某个角色 + */ + void imitationRole(Long currentUserId, ProjectDto.ImitationRole imitationRole); + + /** + * 新建项目 + * @param currentUserId userId + * @return 返回项目信息 + */ + ProjectVo.ProjectInfo createProject(Long currentUserId,ProjectDto.CreateProject createProject,String token); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IRingService.java b/tall/src/main/java/com/ccsens/tall/service/IRingService.java new file mode 100644 index 00000000..d40a1a51 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/IRingService.java @@ -0,0 +1,44 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.dto.RingDto; +import com.ccsens.tall.bean.vo.RingVo; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.github.pagehelper.PageInfo; + +import java.util.List; + +public interface IRingService { + /** + * 发送消息 + * @param currentUserId userId + * @param ringSendDto 发送的消息内容 + * @return 返回发送的消息详细信息 + * @throws Exception json异常 + */ + RingVo.RingInfo sendRingMsg(Long currentUserId, RingDto.RingSendDto ringSendDto) throws Exception; + + /** + * 查找ring消息 + * @param currentUserId userId + * @param getRingDto 项目id和分页信息 + * @return 分页查找的消息详情 + */ + PageInfo getRingInfo(Long currentUserId, RingDto.GetRingDto getRingDto); + + /** + * 阅读消息 + * @param currentUserId userId + * @param message 消息id + * @return 返回已读的消息的信息 + * @throws JsonProcessingException json异常 + */ + List readRingMsg(Long currentUserId, RingDto.MessageId message) throws JsonProcessingException; + + /** + * 将项目下的消息全部已读 + * @param currentUserId userId + * @param projectId 项目id + * @throws Exception json异常 + */ + void readRingMsgByProjectId(Long currentUserId, Long projectId) throws Exception; +} diff --git a/tall/src/main/java/com/ccsens/tall/service/IRobotService.java b/tall/src/main/java/com/ccsens/tall/service/IRobotService.java index 9ffa1fea..dab530d2 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IRobotService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IRobotService.java @@ -44,7 +44,7 @@ public interface IRobotService { * @param currentUserId * @param subTimeId */ - void addDeliverRobotSend(Long currentUserId,String deliverName, Long subTimeId) throws Exception; + void addDeliverRobotSend(Long currentUserId,String deliverName, Long subTimeId,SysProject project) throws Exception; /** * 删除交付物信息 @@ -69,4 +69,17 @@ public interface IRobotService { * @param proTaskDetail */ void addCommentRobotSend(Long userId, ProTaskDetail proTaskDetail) throws Exception; + + /** + * 查询模板 + * @param code + * @return + */ + String getRobotTemplate(int code); + + /** + * 通过机器人发送提醒消息 + * @param taskRemind 需要发送的任务信息 + */ + void sendRemindByRobot(TaskVo.RemindTask taskRemind,String content) throws Exception; } diff --git a/tall/src/main/java/com/ccsens/tall/service/ISysDomainService.java b/tall/src/main/java/com/ccsens/tall/service/ISysDomainService.java index 5b510ef3..e8607543 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ISysDomainService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ISysDomainService.java @@ -1,7 +1,30 @@ package com.ccsens.tall.service; +import com.ccsens.tall.bean.dto.DomainDto; import com.ccsens.tall.bean.vo.DomainVo; +/** + * @author 逗 + */ public interface ISysDomainService { + /** + * 根据名字查找域配置 + * @param domainName 域名 + * @return 返回域的详细信息 + */ DomainVo.DomainInfo getDomainByName(String domainName); + + /** + * 添加域配置信息 + * @param domainInfo 域详细配置信息 + * @return 返回域配置信息 + */ + DomainVo.DomainInfo saveDomain(DomainDto.DomainInfo domainInfo); + + /** + * 修改数组 + * @param domainInfo 需要修改的信息 + * @return 返回域信息 + */ + DomainVo.DomainInfo updateDomain(DomainDto.UpdateDomainInfo domainInfo); } diff --git a/tall/src/main/java/com/ccsens/tall/service/ITaskDeliverService.java b/tall/src/main/java/com/ccsens/tall/service/ITaskDeliverService.java index 41a0a536..650da50a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ITaskDeliverService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ITaskDeliverService.java @@ -18,13 +18,13 @@ public interface ITaskDeliverService { ProjectVo.DeliverInfo addDeliver(Long currentUserId, DeliverDto.UploadDeliver uploadDeliver) throws Exception; - List selectTaskDeliver(Long currentUserId, Long subTimeId)throws Exception; + List selectTaskDeliver(Long currentUserId, Long subTimeId,String token)throws Exception; - DeliverVo.DeliverInfo selectDeliverInfo(Long currentUserId, Long deliverId, Long subTimeId) throws Exception; + DeliverVo.DeliverInfo selectDeliverInfo(Long currentUserId, Long deliverId, Long subTimeId,String token) throws Exception; DeliverVo.DeliverFileList selectDeliverList(Long currentUserId, Integer page, Integer pageSize, String key, String start, String end) throws Exception; - DeliverVo.DeliverInfo checkDeliver(Long currentUserId, DeliverDto.CheckDeliver checker) throws Exception; + DeliverVo.DeliverInfo checkDeliver(Long currentUserId, DeliverDto.CheckDeliver checker,String token) throws Exception; void deleteDeliverByTaskId(Long taskId)throws Exception; diff --git a/tall/src/main/java/com/ccsens/tall/service/ITaskPluginService.java b/tall/src/main/java/com/ccsens/tall/service/ITaskPluginService.java index 36053643..6c0e9794 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ITaskPluginService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ITaskPluginService.java @@ -7,6 +7,9 @@ import com.ccsens.tall.bean.vo.TaskVo; import java.util.List; +/** + * @author 逗 + */ public interface ITaskPluginService { void savePlugin(ProTaskPlugin taskPlugin); @@ -17,4 +20,51 @@ public interface ITaskPluginService { List getComment(Long currentUserId, Long taskId); void deleteComment(Long currentUserId, Long commentId); + + /** + * 在任务上记笔记 + * @param currentUserId userId + * @param saveNotes 笔记内容 + * @return 返回笔记的详情 + */ + PluginVo.NotesInfo saveNotes(Long currentUserId, PluginDto.SaveNotes saveNotes); + + /** + * 查询任务下的笔记 + * @param currentUserId userId + * @param taskId 任务Id + * @param pluginId 被查询的插件的id,不是笔记插件的id,只查询任务的笔记时不需要传参 + * @return 返回任务下的所有笔记信息 + */ + List queryNotesInfo(Long currentUserId, Long taskId, Long pluginId); + + /** + * 删除笔记记录 + * @param currentUserId userId + * @param notesId 笔记记录id + */ + void deleteNotes(Long currentUserId, Long notesId); + + /** + * 获取会议纪要表 + * @param currentUserId userId + * @param token token + * @return 返回wps里的文件的路径 + */ + List saveMinutes(Long currentUserId,PluginDto.GetMinutes getMinutes,String token) throws Exception; + + /** + * 给周会表添加项目或删除项目 + * @param currentUserId userId + * @param updateMinutes 修改的信息 + * @param token token + * @return 返回wps里的文件的路径 + */ + List updateMinutesProject(Long currentUserId, PluginDto.UpdateMinutes updateMinutes, String token) throws Exception; + + /** + * 修改插件配置 + * @param updatePluginConfig 插件配置 + */ + void updatePluginConfig(PluginDto.UpdatePluginConfig updatePluginConfig); } diff --git a/tall/src/main/java/com/ccsens/tall/service/ITaskSubTimeService.java b/tall/src/main/java/com/ccsens/tall/service/ITaskSubTimeService.java index 557e9cca..8472cd68 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ITaskSubTimeService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ITaskSubTimeService.java @@ -3,6 +3,10 @@ package com.ccsens.tall.service; import com.ccsens.tall.bean.dto.TaskDto; import com.ccsens.tall.bean.po.ProTaskSubTime; import com.ccsens.tall.bean.vo.TaskVo; +import com.github.pagehelper.PageInfo; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; public interface ITaskSubTimeService { void saveProTaskSubTask(ProTaskSubTime proTaskSubTime); @@ -14,4 +18,32 @@ public interface ITaskSubTimeService { TaskVo.NormalTask addTask(Long currentUserId, TaskDto.AddTask addTask) throws Exception; void clearTaskRealTime(Long projectId); + + List getKanbanTake(Long currentUserId, Long projectId, Long roleId, Integer type, + Integer page, Integer pageSize, Integer orderType, Integer order) throws Exception; + + void changeKanbanTake(Long currentUserId, TaskDto.ChangeKanbanTask changeKanbanTask) throws Exception; + + /** + * 给任务添加提醒 + * @param userId 当前用户的id + * @param taskRemind 任务id 提醒的时机和时间 + */ + List saveRemind(Long userId, TaskDto.TaskRemind taskRemind) throws Exception; + + /** + * 删除任务的提醒 + * @param currentUserId userId + * @param deleteTaskRemind 任务提醒记录的id + * @return 返回这个任务下的所有提醒 + */ + List deleteRemind(Long currentUserId, TaskDto.DeleteTaskRemind deleteTaskRemind); + + /** + * 修改提醒的信息 + * @param currentUserId userId + * @param updateTaskRemind 需要修改的信息 + * @return 返回值这个任务的所有提醒 + */ + List updateRemind(Long currentUserId, TaskDto.UpdateTaskRemind updateTaskRemind); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IUserInfoService.java b/tall/src/main/java/com/ccsens/tall/service/IUserInfoService.java new file mode 100644 index 00000000..f4b6c9c9 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/IUserInfoService.java @@ -0,0 +1,49 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.dto.UserDto; +import com.ccsens.tall.bean.vo.UserVo; +import com.ccsens.util.NotSupportedFileTypeException; + +import javax.servlet.http.Part; + +/** + * @author 逗 + */ +public interface IUserInfoService { + /** + * 修改登录的账号 + * @param userId 用户id + * @param changeAccount 验证码和新账号 + */ + void updateAccount(Long userId, UserDto.UpdateAccount changeAccount); + + /** + * 修改昵称 + * @param userId 用户id + * @param updateNickname 新昵称 + */ + void updateNickname(Long userId, UserDto.UpdateNickname updateNickname); + + /** + * 上传头像 + * @param currentUserId userId + * @param file 上传的文件 + * @throws Exception 文件异常 + */ + void uploadAvatarUrl(Long currentUserId, Part file) throws Exception; + + /** + * 查找全部个人信息 + * @param currentUserId userId + * @return 个人信息 + */ + UserVo.SelectUserInfo selectUserInfo(Long currentUserId); + + /** + * 修改个人详细信息 + * @param currentUserId userId + * @param updateUserInfo 需要修改的信息,为空则不需要修改 + * @return 返回当前用户的详细信息 + */ + UserVo.SelectUserInfo updateUserInfo(Long currentUserId, UserDto.UpdateUserInfo updateUserInfo); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/service/IUserService.java b/tall/src/main/java/com/ccsens/tall/service/IUserService.java index 87bf61fb..93a82bb3 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IUserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IUserService.java @@ -1,17 +1,19 @@ package com.ccsens.tall.service; - - - import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.dto.UserDto; import com.ccsens.tall.bean.po.SysUser; import com.ccsens.tall.bean.vo.UserVo; import com.ccsens.util.WebConstant; +import java.security.NoSuchAlgorithmException; +import java.security.spec.InvalidKeySpecException; import java.util.List; import java.util.Map; +/** + * @author 逗 + */ public interface IUserService { UserVo.UserSign signin(WebConstant.CLIENT_TYPE clientType, WebConstant.IDENTIFY_TYPE identifyType, String identifier, String credential, String clientIp, String redirect) throws Exception; @@ -22,7 +24,7 @@ public interface IUserService { boolean tokenNotExistInCache(Long authId) throws Exception; - UserVo.SmsCode getSignInSmsCode(String phone,Integer client) throws Exception; + UserVo.SmsCode getSignInSmsCode(String phone,String verificationCodeId, String verificationCodeValue) throws Exception; SysUser getUserById(Long aLong) throws Exception; @@ -42,8 +44,23 @@ public interface IUserService { void updateAccount(UserDto.Account account); + /** + * 通过手机号修改密码 + * @param passwordDto 手机号验证码 + */ void updatePassword(UserDto.UpdatePassword passwordDto) throws Exception; + /** + * 通过账号密码修改密码 + * @param passwordDto 账号旧密码和新密码 + */ + void updatePasswordByAccount(UserDto.UpdatePasswordByAccount passwordDto) throws Exception; + + /** + * 通过手机号查找userId + * @param phoneCell 手机号 + * @return userId + */ Long selectUserIdByPhone(String phoneCell)throws Exception; String selectAccountByPhone(String phone)throws Exception; @@ -69,7 +86,7 @@ public interface IUserService { UserVo.WxInfo updateUserInfo(Long currentUserId, UserDto.WxInfo userInfo); - void relievePhone(Long userId,String phone); + void relievePhone(Long userId,UserDto.WxBindingPhone phoneInfo); UserVo.UserSign changePhoneNotPassword(Long userId,UserDto.WxBindingPhone phoneInfo) throws Exception; @@ -80,4 +97,17 @@ public interface IUserService { UserVo.Account systemRegister(UserDto.UserSignupSystem userSignup); String getUserNameByUserId(Long userId); + + /** + * 根据id查询用户信息 + * @param ids + * @return + */ + List queryUserInfos(Long[] ids); + + /** + * 获取图片验证码信息 + * @return 返回图片转成的base64字符串,和图片的id + */ + UserVo.VerificationCode getVertifyCode(); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java b/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java index 948a58b7..cdcb1488 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java @@ -20,4 +20,6 @@ public interface IWbsSubSheetService { void getPluginConfig(Long id, XSSFWorkbook xssfWorkbook, List taskDetails) throws Exception; void getRoBotSheet(Long projectId, XSSFWorkbook xssfWorkbook); + + void readRelevanceProject(Long id, XSSFWorkbook xssfWorkbook); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IWpsService.java b/tall/src/main/java/com/ccsens/tall/service/IWpsService.java new file mode 100644 index 00000000..df67e0e6 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/IWpsService.java @@ -0,0 +1,118 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.dto.WpsDto; +import com.ccsens.tall.bean.vo.WpsVo; + +import javax.servlet.http.Part; +import java.util.List; +import java.util.Map; + +/** + * @author whj + */ +public interface IWpsService { + /** + * 获取文件元数据 + * @param fileId 文件ID + * @param token token + * @return 文件信息 + * @throws Exception 异常 + */ + WpsVo.FileInfo getFileInfo(String fileId, String token) throws Exception; + + /** + * 上传文件新版本 + * @param token 身份识别 + * @param fileId 文件id + * @param fileSave 文件保存其他属性 + * @param file 文件 + * @return 保存结果 + * @throws Exception 异常 + */ + WpsVo.FileSave fileSave(String token, String fileId, WpsDto.FileSave fileSave, Part file) throws Exception; + + /** + * 新建文件 + * @param token 身份识别 + * @param fileId 文件id + * + * @param name 文件名称 + * @param file 文件 + * @param fileNew 文件保存 + * @return 文件信息 + * @throws Exception 异常 + */ + WpsVo.FileNew fileNew(String token, String fileId, String name, Part file, WpsDto.FileNew fileNew) throws Exception; + + /** + * 在历史版本预览和回滚历史版本的时候,获取特定版本文档的文件信息。 + * @param token 身份识别 + * @param fileId 文件id + * @param version 版本 + * @return 文件信息 + * @throws Exception 异常 + */ + WpsVo.FileBase fileVersion(String token, Long fileId, Integer version) throws Exception; + + /** + * 修改文件名 + * @param token 身份识别 + * @param fileId 文件id + * @param renameBody 重命名相关 + * @throws Exception 异常 + */ + void fileRename(String token, long fileId, WpsDto.FileRenameBody renameBody) throws Exception; + + /** + * 分页查询历史版本信息 + * @param token 身份识别 + * @param body 分页和文件信息 + * @return 历史版本 + * @throws Exception 异常 + */ + List queryFileHistory(String token, WpsDto.FileHistoryBody body) throws Exception; + + /** + * wps通知 + * @param token 身份识别 + * @param body 通知内容 + * @throws Exception 异常 + */ + void notify(String token, WpsDto.NotifyBody body) throws Exception; + + /** + * 保存业务和文件记录, + * @param business 业务和文件关系 + */ + void saveFile(WpsDto.Business business); + + /** + * 根据业务ID和类型返回文件预览 + * + * @param businessId 业务ID + * @param businessType 业务类型 + * @param token token + * @return WPS访问路径 + */ + List queryVisitUrls(long businessId, byte businessType, String token, Map params); + + /** + * 通过wpsId查找wps文件的路径 + * @param fileId 文件id + * @return 返回问价路径 + */ + WpsVo.BusinessFileIdAndPath getPathById(Long fileId); + + /** + * 获取文件的读取权限 + * @param wpsPower 业务id 业务类型,wpsid,userId + * @return 返回读取类型 + */ + String getWpsPower(WpsDto.WpsPower wpsPower); + + /** + * 通过业务类型和业务id查找文件的路径 + * @return 返回文件路径 + */ + String getFilePath(Long businessId,byte businessType); +} diff --git a/tall/src/main/java/com/ccsens/tall/service/LabelService.java b/tall/src/main/java/com/ccsens/tall/service/LabelService.java new file mode 100644 index 00000000..8b325520 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/LabelService.java @@ -0,0 +1,205 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.LabelDto; +import com.ccsens.tall.bean.po.*; +import com.ccsens.tall.bean.vo.LabelVo; +import com.ccsens.tall.persist.dao.SysLabelDao; +import com.ccsens.tall.persist.dao.SysProjectDao; +import com.ccsens.tall.persist.dao.SysProjectLabelDao; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.WebConstant; +import com.ccsens.util.exception.BaseException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Service +public class LabelService implements ILabelService{ + @Autowired + private Snowflake snowflake; + @Autowired + private SysLabelDao sysLabelDao; + @Autowired + private SysProjectDao sysProjectDao; + @Autowired + private SysProjectLabelDao sysProjectLabelDao; + @Autowired + private ProRoleService proRoleService; + + /** + * 添加标签 + * @param label 添加的标签信息 + */ + @Override + public List addLabel(Long userId,LabelDto.AddLabel label) { + if(ObjectUtil.isNotNull(label)){ + SysLabelExample sysLabelExample = new SysLabelExample(); + sysLabelExample.createCriteria().andNameEqualTo(label.getName()).andUserIdEqualTo(userId); + List sysLabels = sysLabelDao.selectByExample(sysLabelExample); + if(CollectionUtil.isNotEmpty(sysLabels)){ + throw new BaseException(CodeEnum.REPEAT_LABEL); + } + SysLabel sysLabel = new SysLabel(); + sysLabel.setId(snowflake.nextId()); + sysLabel.setUserId(userId); + BeanUtil.copyProperties(label,sysLabel); + sysLabelDao.insertSelective(sysLabel); + } + return sysLabelDao.selectLabelByUserId(userId,null); + } + + /** + * 查找此用户的所有标签 + * @param currentUserId userId + * @param key 标签名包含的关键字 + * @return 返回该用户添加的所有标签 + */ + @Override + public List selectLabel(Long currentUserId,String key) { + return sysLabelDao.selectLabelByUserId(currentUserId,key); + } + + /** + * 删除标签 + * @param currentUserId userID + * @param delLabel 被删除的标签id + */ + @Override + public void delLabel(Long currentUserId, LabelDto.DelLabel delLabel) { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(delLabel.getId()); + if(ObjectUtil.isNull(sysLabel)){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + if(sysLabel.getUserId().longValue() != currentUserId){ + throw new BaseException(CodeEnum.NOT_POWER); + } + sysLabel.setRecStatus((byte) 2); + sysLabelDao.updateByPrimaryKeySelective(sysLabel); + } + + /** + * 修改标签 + * @param currentUserId userid + * @param changeLabel 修改后的标签信息 + */ + @Override + public void changeLabel(Long currentUserId, LabelDto.ChangeLabel changeLabel) { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(changeLabel.getId()); + if(ObjectUtil.isNull(sysLabel)){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + if(sysLabel.getUserId().longValue() != currentUserId){ + throw new BaseException(CodeEnum.NOT_POWER); + } + + if(StrUtil.isNotEmpty(changeLabel.getName())){ + sysLabel.setName(changeLabel.getName()); + } + if(StrUtil.isNotEmpty(changeLabel.getCode())){ + sysLabel.setCode(changeLabel.getCode()); + } + if(StrUtil.isNotEmpty(changeLabel.getColor())){ + sysLabel.setColor(changeLabel.getColor()); + } + if(StrUtil.isNotEmpty(changeLabel.getDescription())){ + sysLabel.setDescription(changeLabel.getDescription()); + } + if(ObjectUtil.isNotNull(changeLabel.getLevel())){ + sysLabel.setLevel((byte) changeLabel.getLevel()); + } + sysLabelDao.updateByPrimaryKeySelective(sysLabel); + } + + /** + * 给项目添加标签 + * @param currentUserId userid + * @param projectLabel 项目id和标签id + */ + @Override + public List projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { + List selectLabelList = new ArrayList<>(); + SysProject project = sysProjectDao.selectByPrimaryKey(projectLabel.getProjectId()); + if (ObjectUtil.isNotNull(project)) { + //用户在项目中的最高权限 +// int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId()); +// if (power > 1) { + if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){ + projectLabel.getLabelList().forEach(labelId->{ + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if(ObjectUtil.isNull(sysLabel)){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + if(sysLabel.getUserId().longValue() != currentUserId){ + throw new BaseException(CodeEnum.NOT_POWER); + } + //添加项目和标签的关联信息 + SysProjectLabel sysProjectLabel = new SysProjectLabel(); + sysProjectLabel.setId(snowflake.nextId()); + sysProjectLabel.setProjectId(projectLabel.getProjectId()); + sysProjectLabel.setLabelId(labelId); + sysProjectLabelDao.insertSelective(sysProjectLabel); + }); + } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId()); +// } else { +// throw new BaseException(CodeEnum.NOT_POWER); +// } + } else { + throw new BaseException(CodeEnum.NOT_PROJECT); + } + return selectLabelList; + } + + /** + * 删除项目关联的标签 + * @param currentUserId userID + * @param projectLabel 项目id和被删除的标签的id + */ + @Override + public List projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { + List selectLabelList = new ArrayList<>(); + SysProject project = sysProjectDao.selectByPrimaryKey(projectLabel.getProjectId()); + if (ObjectUtil.isNotNull(project)) { + //用户在项目中的最高权限 +// int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId()); +// if (power > 1) { + if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){ + projectLabel.getLabelList().forEach(labelId -> { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if(ObjectUtil.isNull(sysLabel)){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + if(sysLabel.getUserId().longValue() != currentUserId){ + throw new BaseException(CodeEnum.NOT_POWER); + } + //添加项目和标签的关联信息 + SysProjectLabelExample sysProjectLabelExample = new SysProjectLabelExample(); + sysProjectLabelExample.createCriteria().andProjectIdEqualTo(projectLabel.getProjectId()).andLabelIdEqualTo(labelId); + List sysProjectLabelList = sysProjectLabelDao.selectByExample(sysProjectLabelExample); + if(CollectionUtil.isNotEmpty(sysProjectLabelList)){ + sysProjectLabelList.forEach(label -> { + label.setRecStatus((byte) 2); + sysProjectLabelDao.updateByPrimaryKeySelective(label); + }); + } + }); + } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId()); + } else { + throw new BaseException(CodeEnum.NOT_POWER); + } +// } else { +// throw new BaseException(CodeEnum.NOT_PROJECT); +// } + return selectLabelList; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/service/MessageService.java b/tall/src/main/java/com/ccsens/tall/service/MessageService.java index 5898f95b..53ce0151 100644 --- a/tall/src/main/java/com/ccsens/tall/service/MessageService.java +++ b/tall/src/main/java/com/ccsens/tall/service/MessageService.java @@ -2,10 +2,13 @@ package com.ccsens.tall.service; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; -import com.ccsens.tall.bean.dto.message.*; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.tall.bean.dto.message.BaseMessageDto; +import com.ccsens.tall.bean.dto.message.SyncMessageWithStartDto; import com.ccsens.tall.bean.vo.MemberVo; import com.ccsens.util.JacksonUtil; import com.ccsens.util.bean.message.common.InMessage; +import com.ccsens.util.bean.message.common.MessageConstant; import com.ccsens.util.config.RabbitMQConfig; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.AmqpTemplate; @@ -17,8 +20,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; -import static io.lettuce.core.pubsub.PubSubOutput.Type.message; - @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) @@ -60,41 +61,53 @@ public class MessageService implements IMessageService{ SyncMessageWithStartDto message = new SyncMessageWithStartDto(projectId, sender, receivers, roleId, taskId, null, time, duration,player); //FixMe 发送到消息队列 - System.out.println("+++++++++++++"+JacksonUtil.beanToJson(message)); - rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, - JacksonUtil.beanToJson(message)); + log.info("+++++++++++++"+JacksonUtil.beanToJson(message)); +// rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, +// JacksonUtil.beanToJson(message)); + + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(message.receiversTransTos()); + inMessage.setData(JSONObject.toJSONString(message)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, inMessage); } } @Override public void sendDeliverMessageWithUpload(InMessage inMessage) throws Exception { - System.out.println(JacksonUtil.beanToJson(inMessage)); + log.info(JacksonUtil.beanToJson(inMessage)); //FixMe 发送到消息队列 - rabbitTemplate.convertAndSend(RabbitMQConfig.TALL_MESSAGE_1,JacksonUtil.beanToJson(inMessage)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,JacksonUtil.beanToJson(inMessage)); } @Override public void sendDeliverMessageWithChecker(InMessage inMessage) throws Exception { - System.out.println(JacksonUtil.beanToJson(inMessage)); + log.info(JacksonUtil.beanToJson(inMessage)); //FixMe 发送到消息队列 - rabbitTemplate.convertAndSend(RabbitMQConfig.TALL_MESSAGE_1, + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, JacksonUtil.beanToJson(inMessage)); } @Override public void sendDeliverMessageWithDelete(InMessage inMessage) throws Exception { - System.out.println(JacksonUtil.beanToJson(inMessage)); + log.info(JacksonUtil.beanToJson(inMessage)); //FixMe 发送到消息队列 - rabbitTemplate.convertAndSend(RabbitMQConfig.TALL_MESSAGE_1 , + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME , JacksonUtil.beanToJson(inMessage)); } @Override public void sendStartTaskMessage(SyncMessageWithStartDto syncMessage) throws Exception { - System.out.println(JacksonUtil.beanToJson(syncMessage)); + log.info(JacksonUtil.beanToJson(syncMessage)); //FixMe 发送到消息队列 - rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME , - JacksonUtil.beanToJson(syncMessage)); +// rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME , +// JacksonUtil.beanToJson(syncMessage)); + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(syncMessage.receiversTransTos()); + inMessage.setData(JSONObject.toJSONString(syncMessage)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, JacksonUtil.beanToJson(inMessage)); + } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java b/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java index 7c9098d7..27a97c57 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java @@ -2,38 +2,56 @@ package com.ccsens.tall.service; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.MemberDto; +import com.ccsens.tall.bean.dto.MemberRoleDto; +import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.MemberVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.persist.dao.*; +import com.ccsens.tall.persist.mapper.SysImitationMapper; +import com.ccsens.util.CodeEnum; import com.ccsens.util.WebConstant; +import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import java.lang.reflect.Member; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; +/** + * @author 逗 + */ @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) public class ProMemberService implements IProMemberService { - @Autowired + @Resource private ProMemberDao proMemberDao; - @Autowired + @Resource private ProRoleDao proRoleDao; - @Autowired + @Resource private ProMemberRoleDao proMemberRoleDao; - @Autowired - private IUserService userService; - @Autowired + @Resource private SysUserDao userDao; - @Autowired + @Resource private SysAuthDao authDao; + @Resource + private ProRoleService proRoleService; + @Resource + private IUserService userService; + @Resource + private Snowflake snowflake; + @Resource + private UserAttentionDao userAttentionDao; + @Resource + private SysImitationMapper imitationMapper; @Override @@ -42,98 +60,40 @@ public class ProMemberService implements IProMemberService { } @Override - public List selectMembersByProjectId(Long projectId) throws Exception { - List members = new ArrayList<>(); - ProjectVo.MembersByProject member = null; - List belongRoleList = null; - ProjectVo.MembersByProject.BelongRole belongRole = null; - ProMemberExample memberExample = new ProMemberExample(); - memberExample.createCriteria().andProjectIdEqualTo(projectId).andStakeholderIdIsNull(); - List memberList = proMemberDao.selectByExample(memberExample); - if(CollectionUtil.isNotEmpty(memberList)){ - for(ProMember proMember:memberList){ - member = new ProjectVo.MembersByProject(); - member.setMemberId(proMember.getId()); - member.setName(proMember.getNickname()); - member.setPhone(proMember.getPhone()); - member.setUserId(proMember.getUserId()); - } - } - - //查找所有角色 - ProRoleExample roleExample = new ProRoleExample(); - roleExample.createCriteria().andProjectIdEqualTo(projectId); - List roleList = proRoleDao.selectByExample(roleExample); - if(CollectionUtil.isNotEmpty(roleList)){ - for(ProRole role :roleList){ - if(!role.getName().equals(WebConstant.ROLE_NAME.AllMember.phase)&&!role.getName().equals("MVP")) { - //查找角色下所有成员 - ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); - memberRoleExample.createCriteria().andRoleIdEqualTo(role.getId()); - List memberRoleList = proMemberRoleDao.selectByExample(memberRoleExample); - if(CollectionUtil.isNotEmpty(memberRoleList)){ - for (ProMemberRole memberRole:memberRoleList){ - ProMember proMember = proMemberDao.selectByPrimaryKey(memberRole.getMemberId()); - if(ObjectUtil.isNotNull(proMember)){ - Boolean flag = false; - if (CollectionUtil.isNotEmpty(members)) { - for (ProjectVo.MembersByProject membersByProject : members) { - if (membersByProject.getPhone().equals(proMember.getPhone())) { - belongRole = new ProjectVo.MembersByProject.BelongRole(); - belongRole.setRoleId(role.getId()); - belongRole.setRoleName(role.getName()); - membersByProject.getBelongRole().add(belongRole); - flag = true; - break; - } - } - } - if (!flag) { - member = new ProjectVo.MembersByProject(); - member.setMemberId(proMember.getId()); - member.setName(proMember.getNickname()); - member.setPhone(proMember.getPhone()); - member.setUserId(proMember.getUserId()); - String mAccount = userService.selectAccountByPhone(member.getPhone()); - member.setAccount(mAccount); - - belongRoleList = new ArrayList<>(); - belongRole = new ProjectVo.MembersByProject.BelongRole(); - belongRole.setRoleId(role.getId()); - belongRole.setRoleName(role.getName()); - belongRoleList.add(belongRole); - member.setBelongRole(belongRoleList); - - members.add(member); - } - } - } - } - } - } - } - return members; + public List selectMembersByProjectId(Long projectId) { + return proMemberDao.selectMembersByProjectId(projectId); } /** *该用户是否是角色下的成员 */ @Override - public Boolean userIsBelongRole(Long userId, Long roleId) { - Boolean flag = false; - //如果改角色是全体成员返回true + public Boolean userIsBelongRole(Long userId, Long roleId,Integer imitation) { + boolean flag = false; + //如果该角色是全体成员返回true ProRole role = proRoleDao.selectByPrimaryKey(roleId); + if(ObjectUtil.isNull(role)){ + return false; + } if(role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)){ flag = true; } - ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); - memberRoleExample.createCriteria().andRoleIdEqualTo(roleId); - List memberRoleList = proMemberRoleDao.selectByExample(memberRoleExample); - if (CollectionUtil.isNotEmpty(memberRoleList)) { - for (ProMemberRole memberRole : memberRoleList) { - ProMember proMember = proMemberDao.selectByPrimaryKey(memberRole.getMemberId()); - if (ObjectUtil.isNotNull(proMember) && proMember.getUserId().longValue() == userId) { - flag = true; + if(imitation != null && imitation == 1){ + SysImitationExample sysImitationExample = new SysImitationExample(); + sysImitationExample.createCriteria().andUserIdEqualTo(userId).andRoleIdEqualTo(roleId); + if(imitationMapper.countByExample(sysImitationExample) != 0){ + flag = true; + } + }else { + ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); + memberRoleExample.createCriteria().andRoleIdEqualTo(roleId); + List memberRoleList = proMemberRoleDao.selectByExample(memberRoleExample); + if (CollectionUtil.isNotEmpty(memberRoleList)) { + for (ProMemberRole memberRole : memberRoleList) { + ProMember proMember = proMemberDao.selectByPrimaryKey(memberRole.getMemberId()); + if (ObjectUtil.isNotNull(proMember) && proMember.getUserId().longValue() == userId) { + flag = true; + } } } } @@ -144,16 +104,30 @@ public class ProMemberService implements IProMemberService { * 获取用户在项目中所属的所有角色 */ @Override - public List selectRolesByUserIdAndProjectId(Long userId, Long projectId) throws Exception { - - List roleList = proRoleDao.selectRolesByProjectIdAndUserId(projectId, userId); - if(CollectionUtil.isEmpty(roleList)){ - ProRoleExample roleExample = new ProRoleExample(); - roleExample.createCriteria().andProjectIdEqualTo(projectId) - .andNameEqualTo(WebConstant.ROLE_NAME.Attention.phase).andParentIdNotEqualTo(0L); - List proRoleList = proRoleDao.selectByExample(roleExample); - if(CollectionUtil.isNotEmpty(proRoleList)){ - roleList.addAll(proRoleList); + public List selectRolesByUserIdAndProjectId(Long userId, Long projectId,Integer imitation) { + List roleList = new ArrayList<>(); + if(imitation != null && imitation == 1){ + SysImitationExample imitationExample = new SysImitationExample(); + imitationExample.createCriteria().andProjectIdEqualTo(projectId).andUserIdEqualTo(userId); + List sysImitationList = imitationMapper.selectByExample(imitationExample); + if(CollectionUtil.isNotEmpty(sysImitationList)){ + for(SysImitation sysImitation: sysImitationList){ + ProRole role = proRoleDao.selectByPrimaryKey(sysImitation.getRoleId()); + if(ObjectUtil.isNotNull(role)){ + roleList.add(role); + } + } + } + }else { + roleList = proRoleDao.selectRolesByProjectIdAndUserId(projectId, userId); + if (CollectionUtil.isEmpty(roleList)) { + ProRoleExample roleExample = new ProRoleExample(); + roleExample.createCriteria().andProjectIdEqualTo(projectId) + .andNameEqualTo(WebConstant.ROLE_NAME.Attention.phase).andParentIdNotEqualTo(0L); + List proRoleList = proRoleDao.selectByExample(roleExample); + if (CollectionUtil.isNotEmpty(proRoleList)) { + roleList.addAll(proRoleList); + } } } return roleList; @@ -162,11 +136,11 @@ public class ProMemberService implements IProMemberService { @Override - public MemberVo.MemberInfo getProMemberByProjectIdAndUserId(Long projectId, Long currentUserId) throws Exception { + public MemberVo.MemberInfo getProMemberByProjectIdAndUserId(Long projectId, Long currentUserId) { return proMemberDao.selectByProjectIdAndUserId(projectId,currentUserId); } @Override - public List getAuthedMemberByProjectId(Long projectId) throws Exception { + public List getAuthedMemberByProjectId(Long projectId) { return proMemberDao.selectAuthedMemberByProjectId(projectId); } @@ -174,7 +148,7 @@ public class ProMemberService implements IProMemberService { * 查找用户在项目下对应的成员 */ @Override - public ProMember selectByUserId(Long userId, Long projectId) throws Exception { + public ProMember selectByUserId(Long userId, Long projectId) { ProMember member = null; ProMemberExample memberExample = new ProMemberExample(); memberExample.createCriteria().andUserIdEqualTo(userId).andProjectIdEqualTo(projectId); @@ -190,24 +164,35 @@ public class ProMemberService implements IProMemberService { */ @Override public List selectByRole(Long roleId){ - List memberList = new ArrayList<>(); - ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); - memberRoleExample.createCriteria().andRoleIdEqualTo(roleId); - List memberRoleList = proMemberRoleDao.selectByExample(memberRoleExample); - if(CollectionUtil.isNotEmpty(memberRoleList)){ - for(ProMemberRole memberRole:memberRoleList){ - ProMember member = proMemberDao.selectByPrimaryKey(memberRole.getMemberId()); - memberList.add(member); - } + ProRole role = proRoleDao.selectByPrimaryKey(roleId); + if(ObjectUtil.isNull(role)){ + throw new BaseException(CodeEnum.NOT_ROLE); + } + if(role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)){ + ProMemberExample proMemberExample = new ProMemberExample(); + proMemberExample.createCriteria().andProjectIdEqualTo(role.getProjectId()); + return proMemberDao.selectByExample(proMemberExample); } - return memberList; + + return proMemberDao.selectMemberByRoleId(roleId); + +// ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); +// memberRoleExample.createCriteria().andRoleIdEqualTo(roleId); +// List memberRoleList = proMemberRoleDao.selectByExample(memberRoleExample); +// if(CollectionUtil.isNotEmpty(memberRoleList)){ +// for(ProMemberRole memberRole:memberRoleList){ +// ProMember member = proMemberDao.selectByPrimaryKey(memberRole.getMemberId()); +// memberList.add(member); +// } +// } +// return memberList; } /** * 查询用户在项目中的成员信息 - * @param userId - * @param projectId - * @return + * @param userId 用户id + * @param projectId 项目id + * @return 返回成员信息 */ @Override public MemberVo.MemberInfo getMemberByUserIdAndProjectId(Long userId, Long projectId) { @@ -224,8 +209,8 @@ public class ProMemberService implements IProMemberService { /** * 游戏中查询用户的信息 - * @param userId - * @return + * @param userId 用户id + * @return 返回成员信息 */ @Override public MemberVo.MemberInfo getUserInfoByUserId(Long userId) { @@ -236,24 +221,24 @@ public class ProMemberService implements IProMemberService { memberInfo.setUserId(user.getId()); memberInfo.setNickname(user.getNickname()); memberInfo.setAvatarUrl(user.getAvatarUrl()); - //查询该用户的手机号 - SysAuthExample authExample = new SysAuthExample(); - authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) - .andUserIdEqualTo(user.getId()); - List authList = authDao.selectByExample(authExample); - if(CollectionUtil.isNotEmpty(authList)){ - memberInfo.setPhone(authList.get(0).getIdentifier()); - } - if(ObjectUtil.isNull(user.getNickname())){ - //查找账号名 - SysAuthExample sysAuthExample = new SysAuthExample(); - sysAuthExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) - .andUserIdEqualTo(user.getId()); - List accountAuth = authDao.selectByExample(sysAuthExample); - if(CollectionUtil.isNotEmpty(accountAuth)){ - memberInfo.setNickname(accountAuth.get(0).getIdentifier()); - } - } +// //查询该用户的手机号 +// SysAuthExample authExample = new SysAuthExample(); +// authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) +// .andUserIdEqualTo(user.getId()); +// List authList = authDao.selectByExample(authExample); +// if(CollectionUtil.isNotEmpty(authList)){ +// memberInfo.setPhone(authList.get(0).getIdentifier()); +// } +// if(ObjectUtil.isNull(user.getNickname())){ +// //查找账号名 +// SysAuthExample sysAuthExample = new SysAuthExample(); +// sysAuthExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) +// .andUserIdEqualTo(user.getId()); +// List accountAuth = authDao.selectByExample(sysAuthExample); +// if(CollectionUtil.isNotEmpty(accountAuth)){ +// memberInfo.setNickname(accountAuth.get(0).getIdentifier()); +// } +// } } return memberInfo; } @@ -261,17 +246,207 @@ public class ProMemberService implements IProMemberService { @Override public List getMemberIdByProjectId(Long projectId) { List memberIdList = null; - ProMemberExample memberExample = new ProMemberExample(); - memberExample.createCriteria().andProjectIdEqualTo(projectId); - List proMemberList = proMemberDao.selectByExample(memberExample); - if(CollectionUtil.isNotEmpty(proMemberList)){ - memberIdList = new ArrayList<>(); - for(ProMember member : proMemberList){ - if(ObjectUtil.isNotNull(member.getUserId())){ - memberIdList.add(member.getUserId()); + if(ObjectUtil.isNotNull(projectId)) { + ProMemberExample memberExample = new ProMemberExample(); + memberExample.createCriteria().andProjectIdEqualTo(projectId).andUserIdNotEqualTo(0L); + List proMemberList = proMemberDao.selectByExample(memberExample); + if (CollectionUtil.isNotEmpty(proMemberList)) { + memberIdList = new ArrayList<>(); + for (ProMember member : proMemberList) { + if (ObjectUtil.isNotNull(member.getUserId()) && member.getUserId() != 0) { + memberIdList.add(member.getUserId()); + } } } } return memberIdList; } + + @Override + public void saveProMember(Long currentUserId, MemberDto.SaveMember saveMember) throws Exception { + int power = proRoleService.selectPowerByRoleName(currentUserId, saveMember.getProjectId()); + if (power > 1) { + //用项目id和手机号判断用户是否存在 + ProMemberExample memberExample = new ProMemberExample(); + memberExample.createCriteria().andProjectIdEqualTo(saveMember.getProjectId()).andPhoneEqualTo(saveMember.getPhone()); + List memberList = proMemberDao.selectByExample(memberExample); + if(CollectionUtil.isNotEmpty(memberList)){ + throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE); + } + //通过手机号查找用户 + Long userId = userService.selectUserIdByPhone(saveMember.getPhone()); + //添加成员 + ProMember proMember = new ProMember(); + proMember.setId(snowflake.nextId()); + proMember.setProjectId(saveMember.getProjectId()); + proMember.setNickname(saveMember.getMemberName()); + proMember.setPhone(saveMember.getPhone()); + proMember.setUserId(userId); + //获取奖惩干系人 + Long stakeholderId = null; + if(ObjectUtil.isNotNull(saveMember.getStakeholderPhone())){ + ProMemberExample stakeholderExample = new ProMemberExample(); + stakeholderExample.createCriteria().andProjectIdEqualTo(saveMember.getProjectId()).andPhoneEqualTo(saveMember.getStakeholderPhone()); + List stakeholderList = proMemberDao.selectByExample(stakeholderExample); + if(CollectionUtil.isNotEmpty(stakeholderList)){ + stakeholderId = stakeholderList.get(0).getId(); + }else { + //添加奖惩干系人 + Long stakeholderUserId = userService.selectUserIdByPhone(saveMember.getPhone()); + ProMember stakeholder = new ProMember(); + stakeholder.setId(snowflake.nextId()); + stakeholder.setProjectId(saveMember.getProjectId()); + stakeholder.setNickname(saveMember.getStakeholderName()); + stakeholder.setPhone(saveMember.getStakeholderPhone()); + stakeholder.setUserId(stakeholderUserId); + proMemberDao.insertSelective(stakeholder); + stakeholderId = stakeholder.getId(); + //添加奖惩干系人与角色的关联 + //1.先查找项目内的奖惩干系人角色 + ProRoleExample proRoleExample = new ProRoleExample(); + proRoleExample.createCriteria().andProjectIdEqualTo(saveMember.getProjectId()) + .andNameEqualTo(WebConstant.ROLE_NAME.MoneyStakeholder.phase).andParentIdNotEqualTo(0L); + List roleList = proRoleDao.selectByExample(proRoleExample); + if(CollectionUtil.isNotEmpty(roleList)){ + //2.然后添加关联信息 + ProMemberRole proMemberRole = new MemberRoleDto(); + proMemberRole.setId(snowflake.nextId()); + proMemberRole.setRoleId(roleList.get(0).getId()); + proMemberRole.setMemberId(stakeholder.getId()); + proMemberRoleDao.insertSelective(proMemberRole); + } + } + } + proMember.setStakeholderId(stakeholderId); + proMemberDao.insertSelective(proMember); + //添加成员与角色的关联 + if(CollectionUtil.isNotEmpty(saveMember.getRoleId())){ + saveMember.getRoleId().forEach(roleId -> { + ProMemberRole proMemberRole = new MemberRoleDto(); + proMemberRole.setId(snowflake.nextId()); + proMemberRole.setRoleId(roleId); + proMemberRole.setMemberId(proMember.getId()); + proMemberRoleDao.insertSelective(proMemberRole); + }); + } + //添加用户关注项目信息 + if(ObjectUtil.isNotNull(userId)) { + UserAttention userAttention = new UserAttention(); + userAttention.setId(snowflake.nextId()); + userAttention.setUserId(userId); + userAttention.setProjectId(saveMember.getProjectId()); + userAttentionDao.insertSelective(userAttention); + } + } else { + throw new BaseException(CodeEnum.NOT_POWER); + } + } + + @Override + public void deleteMember(Long currentUserId, MemberDto.DeleteMember deleteMember) { + //查找要删除的成员 + ProMember proMember = proMemberDao.selectByPrimaryKey(deleteMember.getMemberId()); + if(ObjectUtil.isNull(proMember)){ + throw new BaseException(CodeEnum.NOT_MEMBER); + } + //检查操作者的权限 + int power = proRoleService.selectPowerByRoleName(currentUserId, proMember.getProjectId()); + if (power < 2) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //修改成员状态来删除 + proMember.setRecStatus((byte) 2); + proMemberDao.updateByPrimaryKeySelective(proMember); + //删除成员和角色关联信息 + ProMemberRoleExample proMemberRoleExample = new ProMemberRoleExample(); + proMemberRoleExample.createCriteria().andMemberIdEqualTo(proMember.getId()); + List proMemberRoleList = proMemberRoleDao.selectByExample(proMemberRoleExample); + if(CollectionUtil.isNotEmpty(proMemberRoleList)){ + proMemberRoleList.forEach(proMemberRole -> { + proMemberRole.setRecStatus((byte) 2); + proMemberRoleDao.updateByPrimaryKeySelective(proMemberRole); + }); + } + //删除成员关注项目的信息 + UserAttentionExample userAttentionExample = new UserAttentionExample(); + userAttentionExample.createCriteria().andUserIdEqualTo(proMember.getUserId()).andProjectIdEqualTo(proMember.getProjectId()); + List userAttentionList = userAttentionDao.selectByExample(userAttentionExample); + if(CollectionUtil.isNotEmpty(userAttentionList)){ + userAttentionList.forEach(userAttention -> { + userAttention.setRecStatus((byte) 2); + userAttentionDao.updateByPrimaryKeySelective(userAttention); + }); + } + } + + @Override + public ProjectVo.MembersByProject updateMemberInfo(Long currentUserId, MemberDto.UpdateMemberInfo updateMemberInfo) throws Exception { + //查找要修改的成员 + ProMember proMember = proMemberDao.selectByPrimaryKey(updateMemberInfo.getMemberId()); + if(ObjectUtil.isNull(proMember)){ + throw new BaseException(CodeEnum.NOT_MEMBER); + } + //检查操作者的权限,权限不足或不是成员本人,不可以修改 + int power = proRoleService.selectPowerByRoleName(currentUserId, proMember.getProjectId()); + if (power < 2 && proMember.getUserId().longValue() != currentUserId.longValue()) { + throw new BaseException(CodeEnum.NOT_POWER); + } + if(StrUtil.isNotEmpty(updateMemberInfo.getMemberName())){ + proMember.setNickname(updateMemberInfo.getMemberName()); + } + if(StrUtil.isNotEmpty(updateMemberInfo.getPhone())){ + proMember.setPhone(updateMemberInfo.getPhone()); + } + //修改奖惩干系人 + Long stakeholderId = null; + if(ObjectUtil.isNotNull(updateMemberInfo.getStakeholderPhone())){ + ProMemberExample stakeholderExample = new ProMemberExample(); + stakeholderExample.createCriteria().andProjectIdEqualTo(proMember.getProjectId()).andPhoneEqualTo(updateMemberInfo.getStakeholderPhone()); + List stakeholderList = proMemberDao.selectByExample(stakeholderExample); + if(CollectionUtil.isNotEmpty(stakeholderList)){ + stakeholderId = stakeholderList.get(0).getId(); + }else { + //添加奖惩干系人 + Long stakeholderUserId = userService.selectUserIdByPhone(updateMemberInfo.getPhone()); + ProMember stakeholder = new ProMember(); + stakeholder.setId(snowflake.nextId()); + stakeholder.setProjectId(proMember.getProjectId()); + stakeholder.setNickname(updateMemberInfo.getStakeholderName()); + stakeholder.setPhone(updateMemberInfo.getStakeholderPhone()); + stakeholder.setUserId(stakeholderUserId); + proMemberDao.insertSelective(stakeholder); + stakeholderId = stakeholder.getId(); + //添加奖惩干系人与角色的关联 + //1.先查找项目内的奖惩干系人角色 + ProRoleExample proRoleExample = new ProRoleExample(); + proRoleExample.createCriteria().andProjectIdEqualTo(proMember.getProjectId()) + .andNameEqualTo(WebConstant.ROLE_NAME.MoneyStakeholder.phase).andParentIdNotEqualTo(0L); + List roleList = proRoleDao.selectByExample(proRoleExample); + if(CollectionUtil.isNotEmpty(roleList)){ + //2.然后添加关联信息 + ProMemberRole proMemberRole = new MemberRoleDto(); + proMemberRole.setId(snowflake.nextId()); + proMemberRole.setRoleId(roleList.get(0).getId()); + proMemberRole.setMemberId(stakeholder.getId()); + proMemberRoleDao.insertSelective(proMemberRole); + } + } + } +// if(ObjectUtil.isNotNull(updateMemberInfo.getStakeholderId())){ + proMember.setStakeholderId(stakeholderId); +// } + proMemberDao.updateByPrimaryKeySelective(proMember); + //查找被修改的成员的信息并返回 + return proMemberDao.getMemberInfoByMemberId(updateMemberInfo.getMemberId()); + } + + @Override + public List queryAttention(ProjectDto.ProjectIdDto projectDto) { + return proMemberDao.queryAttention(projectDto.getProjectId()); + } + + @Override + public MemberVo.MemberInfo getMemberByUserIdAndTaskId(Long userId, Long taskId) { + return proMemberDao.getMemberByUserIdAndTaskId(userId, taskId); + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java b/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java index d339b67a..6d2bf023 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java @@ -1,46 +1,53 @@ package com.ccsens.tall.service; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.MemberRoleDto; +import com.ccsens.tall.bean.dto.RoleDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.ProjectVo; +import com.ccsens.tall.bean.vo.RoleVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.dao.*; import com.ccsens.util.CodeEnum; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; +/** + * @author 逗 + */ @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ProRoleService implements IProRoleService { - @Autowired + @Resource private ProRoleDao proRoleDao; - @Autowired - private ProShowDao proShowDao; - @Autowired + @Resource private ProMemberDao proMemberDao; - @Autowired + @Resource private ProMemberRoleDao memberRoleDao; - @Autowired + @Resource private ProRoleExcludeDao excludeDao; - @Autowired + @Resource private SysProjectDao projectDao; - @Autowired + @Resource private IProMemberService proMemberService; - @Autowired + @Resource private IProTaskDetailService taskDetailService; - @Autowired + @Resource private IUserService userService; + @Resource + private Snowflake snowflake; @Override public void saveProRole(ProRole proRole) { @@ -59,33 +66,32 @@ public class ProRoleService implements IProRoleService { * 根据项目id和用户Id查询项目下的所有二级角色的详细信息 */ @Override - public List getRolesByProjectIdAndUserId(Long projectId, Long currentUserId) throws Exception { + public List getRolesByProjectIdAndUserId(Long projectId, Long currentUserId,Integer imitation) throws Exception { - List memberRoleList = null; + List memberRoleList; //获取用户在项目中的角色 - List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, projectId); + List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, projectId,imitation); //1.查询二级角色(项目经理+项目成员+mvp) memberRoleList = getRealMemberRolesByProjectId(projectId); - if (CollectionUtil.isNotEmpty(memberRoleList)) { - //获取项目的配置(是否展示mvp) - ProShowExample showExample = new ProShowExample(); - showExample.createCriteria().andProjectIdEqualTo(projectId); - List showList = proShowDao.selectByExample(showExample); - if(CollectionUtil.isNotEmpty(showList)){ - if(showList.get(0).getIsShowMvp() == 0){ - for(int i = 0 ; i < memberRoleList.size() ; i++){ - ProjectVo.RoleInfo roleInfo = memberRoleList.get(i); - if(roleInfo.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.phase)){ - memberRoleList.remove(i); - break; - } - } - } - } +// //获取项目的配置(是否展示mvp) +// ProShowExample showExample = new ProShowExample(); +// showExample.createCriteria().andProjectIdEqualTo(projectId); +// List showList = proShowDao.selectByExample(showExample); +// if(CollectionUtil.isNotEmpty(showList)){ +// if(showList.get(0).getIsShowMvp() == 0){ +// for(int i = 0 ; i < memberRoleList.size() ; i++){ +// ProjectVo.RoleInfo roleInfo = memberRoleList.get(i); +// if(roleInfo.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.phase)){ +// memberRoleList.remove(i); +// break; +// } +// } +// } +// } if (CollectionUtil.isNotEmpty(roleList)) { //用户是否只是关注者 - Boolean isAttention = false; + boolean isAttention = false; if(roleList.size() == 1){ ProRole role = roleList.get(0); if(role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.Attention.phase)){ @@ -102,6 +108,9 @@ public class ProRoleService implements IProRoleService { if (memberRole.getId().equals(role.getId())) { memberRole.setMine(true); memberRole.setIsShow(true); + if(imitation != null && imitation == 1){ + memberRole.setImitation((byte) 1); + } break; } else { memberRole.setMine(false); @@ -178,26 +187,25 @@ public class ProRoleService implements IProRoleService { @Override public List getRealMemberRolesByProjectId(Long projectId) { //查询二级角色 - List memberRoleList = null; + List memberRoleList; memberRoleList = proRoleDao.selectSecondRolesByProjectId(projectId); return memberRoleList; } - /** - * 获取此用户不可见的角色 - * - * @param projectId - * @param currentUserId - * @return - */ - public List getCareLessRoleByProjectIdAndUserId(Long projectId, Long currentUserId) { - return proRoleDao.selectCareLessRoleByProjectIdAndUserId(projectId, currentUserId); - } +// /** +// * 获取此用户不可见的角色 +// * +// * @param projectId 项目id +// * @param currentUserId userId +// * @return 返回不可见的角色id +// */ +// public List getCareLessRoleByProjectIdAndUserId(Long projectId, Long currentUserId) { +// return proRoleDao.selectCareLessRoleByProjectIdAndUserId(projectId, currentUserId); +// } /** * 获取用户在项目中的最高权限 - * - * @return + * @return 返回权限 */ @Override public int selectPowerByRoleName(Long userId, Long projectId) { @@ -211,7 +219,7 @@ public class ProRoleService implements IProRoleService { if (CollectionUtil.isNotEmpty(roles)) { for (ProRole role : roles) { int i = proRoleDao.selectPowerByRoleName(role.getDescription()); - power = i > power ? i : power; + power = Math.max(i, power); } } } @@ -250,13 +258,21 @@ public class ProRoleService implements IProRoleService { return role; } + private boolean isPmByRoleId(Long roleId) { + Integer i = proRoleDao.isPmByRoleId(roleId); + if(ObjectUtil.isNull(i)){ + throw new BaseException(CodeEnum.NOT_ROLE); + } + return i == 1; + } + //======================================================================= /** * 删除角色 */ @Override - public void deleteRole(Long userId, Long roleId) throws Exception { + public void deleteRole(Long userId, Long roleId) { ProRole role = proRoleDao.selectByPrimaryKey(roleId); // //本用户在项目中的角色 // List proRoles = getProRoleByProjectIdAndUserId(role.getProjectId(), userId); @@ -325,4 +341,109 @@ public class ProRoleService implements IProRoleService { // proRoleDao.deleteByPrimaryKey(roleId); } + + @Override + public void saveRole(Long currentUserId, RoleDto.SaveRole saveRole) { + //检查操作者的权限 + int power = selectPowerByRoleName(currentUserId, saveRole.getProjectId()); + if (power < 2) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //获取项目下的“普通成员”一级角色的id + Long parentId = null; + ProRoleExample proRoleExample = new ProRoleExample(); + proRoleExample.createCriteria().andProjectIdEqualTo(saveRole.getProjectId()).andNameEqualTo(WebConstant.ROLE_NAME.Member.value); + List memberRoleList = proRoleDao.selectByExample(proRoleExample); + if(CollectionUtil.isNotEmpty(memberRoleList)){ + parentId = memberRoleList.get(0).getId(); + } + //添加角色 + ProRole role = new ProRole(); + role.setId(snowflake.nextId()); + role.setProjectId(saveRole.getProjectId()); + role.setName(saveRole.getRoleName()); + role.setParentId(parentId); + proRoleDao.insertSelective(role); + } + + @Override + public void updateRole(Long currentUserId, RoleDto.UpdateRole updateRole) { + //查找角色 + ProRole proRole = proRoleDao.selectByPrimaryKey(updateRole.getRoleId()); + if(ObjectUtil.isNull(proRole)){ + throw new BaseException(CodeEnum.NOT_ROLE); + } + //检查操作者的权限 + int power = selectPowerByRoleName(currentUserId, proRole.getProjectId()); + if (power < 2) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //修改名字 + if(StrUtil.isNotEmpty(updateRole.getRoleName())){ + proRole.setName(updateRole.getRoleName()); + } + //修改关联项目id + if(ObjectUtil.isNotNull(updateRole.getRelevanceProjectId())){ + //检查角色是否是角色项目 + ProRole parentRole = proRoleDao.selectByPrimaryKey(proRole.getParentId()); + if(parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.ProjectVirtualRole.value)){ + proRole.setRelevanceProjectId(updateRole.getRelevanceProjectId()); + } + } + proRoleDao.updateByPrimaryKeySelective(proRole); + } + + @Override + public void saveMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember) { + //检查成员是否为空 + ProMember member = proMemberDao.selectByPrimaryKey(saveMember.getMemberId()); + if(ObjectUtil.isNull(member)){ + throw new BaseException(CodeEnum.NOT_MEMBER); + } + //检查角色是否为PM 是的话则需要更高权限 + boolean isPm = isPmByRoleId(saveMember.getRoleId()); + //检查当前用户的权限是否可以修改 + int power = selectPowerByRoleName(currentUserId, member.getProjectId()); + if ((isPm && power < WebConstant.ROLE_POWER.ADMIN_POWER.value) || (!isPm && power < WebConstant.ROLE_POWER.OPERATION_POWER.value)) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //添加成员与角色关联信息 + ProMemberRole proMemberRole = new MemberRoleDto(); + proMemberRole.setId(snowflake.nextId()); + proMemberRole.setRoleId(saveMember.getRoleId()); + proMemberRole.setMemberId(member.getId()); + memberRoleDao.insertSelective(proMemberRole); + } + + @Override + public void deleteMemberByRole(Long currentUserId, RoleDto.SaveMember saveMember) { + //检查参数是否正确 + ProMember member = proMemberDao.selectByPrimaryKey(saveMember.getMemberId()); + if(ObjectUtil.isNull(member)){ + throw new BaseException(CodeEnum.NOT_MEMBER); + } + //检查被操作的角色是否是项目PM + boolean isPm = isPmByRoleId(saveMember.getRoleId()); + //检查当前用户的权限是否可以修改 + int power = selectPowerByRoleName(currentUserId, member.getProjectId()); + if ((isPm && power < WebConstant.ROLE_POWER.ADMIN_POWER.value) || (!isPm && power < WebConstant.ROLE_POWER.OPERATION_POWER.value)) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //删除角色与成员的关联信息 + ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); + memberRoleExample.createCriteria().andRoleIdEqualTo(saveMember.getRoleId()).andMemberIdEqualTo(member.getId()); + List memberRoleList = memberRoleDao.selectByExample(memberRoleExample); + if(CollectionUtil.isEmpty(memberRoleList)){ + throw new BaseException(CodeEnum.NOT_MEMBER); + } + for(ProMemberRole memberRole : memberRoleList){ + memberRole.setRecStatus((byte)2); + memberRoleDao.updateByPrimaryKeySelective(memberRole); + } + } + + @Override + public RoleVo.RoleByProjectId queryRoleByProjectId(Long projectId) { + return null; + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java b/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java index ab566fbf..255c800e 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java @@ -6,6 +6,7 @@ import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.ccsens.cloudutil.feign.MtFeignClient; +import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.dto.TaskDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.MemberVo; @@ -14,7 +15,6 @@ import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.dao.*; import com.ccsens.tall.persist.dao.ProTaskShowDao; import com.ccsens.tall.persist.mapper.ProPluginConfigMapper; -import com.ccsens.tall.util.RobotUtil; import com.ccsens.tall.util.TaskUtil; import com.ccsens.util.CodeEnum; import com.ccsens.util.DateUtil; @@ -23,7 +23,6 @@ import com.ccsens.util.cron.CronConstant; import com.ccsens.util.cron.NatureToDate; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -31,51 +30,54 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.math.BigDecimal; import java.util.*; -import java.util.concurrent.atomic.AtomicInteger; @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ProTaskDetailService implements IProTaskDetailService { - @Autowired + @Resource private IProRoleService proRoleService; - @Autowired + @Resource private ITaskDeliverService taskDeliverService; - @Autowired + @Resource private IUserAttentionService attentionService; - @Autowired - private ITaskPluginService pluginService; - @Autowired + @Resource + private TaskPluginDao taskPluginDao; + @Resource private IProMemberService proMemberService; - @Autowired - private IUserService userService; - @Autowired + @Resource private ProTaskShowDao proTaskShowDao; - @Autowired + @Resource private TaskDetailDao taskDetailDao; - @Autowired + @Resource private TaskSubTimeDao taskSubTimeDao; - @Autowired + @Resource + private ITaskSubTimeService taskSubTimeService; + @Resource private TaskMemberDao taskMemberDao; - @Autowired + @Resource private ProSubTimeMemberDao proSubTimeMemberDao; - @Autowired + @Resource private ProRoleDao proRoleDao; - @Autowired + @Resource private ProMemberDao proMemberDao; - @Autowired + @Resource private SysProjectDao sysProjectDao; - @Autowired + @Resource private SysPluginDao sysPluginDao; - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private MtFeignClient mtFeignClient; @Resource private ProPluginConfigMapper proPluginConfigMapper; - @Autowired + @Resource private IRobotService robotService; + @Resource + private ProRemindDao proRemindDao; + @Resource + private TaskDeliverDao taskDeliverDao; @Override public void saveTaskDetail(ProTaskDetail taskDetail) { @@ -83,16 +85,16 @@ public class ProTaskDetailService implements IProTaskDetailService { } @Override - public Object getTasksByRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception { + public Object getTasksByRoleId(Long currentUserId, Long projectId, TaskDto.QueryTaskInfoByRoleId taskInfoByRoleId) throws Exception { SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); if (ObjectUtil.isNull(sysProject)) { throw new BaseException(CodeEnum.NOT_PROJECT); } - startTime = startTime == null ? sysProject.getBeginTime() : startTime; - endTime = endTime == null ? sysProject.getEndTime() : endTime; + taskInfoByRoleId.setStartTime(taskInfoByRoleId.getStartTime() == null ? sysProject.getBeginTime() : taskInfoByRoleId.getStartTime()); + taskInfoByRoleId.setEndTime(taskInfoByRoleId.getEndTime() == null ? sysProject.getEndTime() : taskInfoByRoleId.getEndTime()); Object obj = null; - ProRole role = proRoleDao.selectByPrimaryKey(roleId); + ProRole role = proRoleDao.selectByPrimaryKey(taskInfoByRoleId.getRoleId()); if (ObjectUtil.isNull(role)) { throw new BaseException(CodeEnum.NOT_ROLE); } @@ -101,12 +103,17 @@ public class ProTaskDetailService implements IProTaskDetailService { throw new BaseException(CodeEnum.NOT_ROLE); } if (ObjectUtil.isNotNull(role)) { - if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.value)) { - obj = getTaskInfoByMvp(projectId, page, pageSize); - } else if (parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { - obj = getTaskInfoByProjectIdAndPM(currentUserId, projectId, roleId, startTime, endTime, process, page, pageSize); +// if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.value)) { +// obj = getTaskInfoByMvp(projectId, page, pageSize); +// } else + if (parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { + obj = getTaskInfoByProjectIdAndPm(currentUserId, projectId, taskInfoByRoleId.getRoleId(), + taskInfoByRoleId.getStartTime(), taskInfoByRoleId.getEndTime(), taskInfoByRoleId.getProcess(), + taskInfoByRoleId.getPage(), taskInfoByRoleId.getPageSize(),taskInfoByRoleId.getPriority(),taskInfoByRoleId.getImitation()); } else if (parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.Member.value)) { - obj = getTaskInfoByProjectIdAndRoleId(currentUserId, projectId, roleId, startTime, endTime, process, page, pageSize); + obj = getTaskInfoByProjectIdAndRoleId(currentUserId, projectId,taskInfoByRoleId.getRoleId(), + taskInfoByRoleId.getStartTime(), taskInfoByRoleId.getEndTime(), taskInfoByRoleId.getProcess(), + taskInfoByRoleId.getPage(), taskInfoByRoleId.getPageSize(),taskInfoByRoleId.getPriority(),taskInfoByRoleId.getImitation()); } } else { throw new BaseException(CodeEnum.NOT_ROLE); @@ -114,40 +121,11 @@ public class ProTaskDetailService implements IProTaskDetailService { return obj; } -// /** -// * 获取项目里的任务展示配置 -// */ -// private TaskVo.ProShow getProShow(Long projectId)throws Exception{ -// TaskVo.ProShow proShowInfo = new TaskVo.ProShow(); -// ProShow proShow = proShowService.selectByProjectId(projectId); -//// ProTaskShow proTaskShow = proShowService.selectByProjectId(projectId); -// if(ObjectUtil.isNotNull(proShow)){ -// proShowInfo.setSlide(proShow.getSlide()); -// proShowInfo.setFilter(proShow.getFilter()); -// proShowInfo.setIsShowMvp(proShow.getIsShowMvp()); -// proShowInfo.setCreateTask(proShow.getCreateTask()); -// proShowInfo.setDuration(proShow.getDuration()); -// proShowInfo.setShowTimeFormat(proShow.getTimeShow()); -// proShowInfo.setShowShortcuts(proShow.getShowShortcuts()); -// if(proShow.getDuration() == 1) { -// proShowInfo.setShowTimeFormat(null); -// } -// }else { -// proShowInfo.setSlide(0); -// proShowInfo.setFilter(0); -// proShowInfo.setIsShowMvp(1); -// proShowInfo.setCreateTask(1); -// proShowInfo.setDuration(0); -// proShowInfo.setShowTimeFormat("MM-dd HH:mm"); -// proShowInfo.setShowShortcuts(1); -// } -// return proShowInfo; -// } /** * 查找任务配置 */ - private TaskVo.ProTaskShow getProTaskShow(Long taskId)throws Exception{ + private TaskVo.ProTaskShow getProTaskShow(Long taskId) { TaskVo.ProTaskShow proTaskShow = proTaskShowDao.getProTaskShowByTaskId(taskId); if(ObjectUtil.isNull(proTaskShow)){ proTaskShow = new TaskVo.ProTaskShow(); @@ -165,13 +143,14 @@ public class ProTaskDetailService implements IProTaskDetailService { /** * 查看任务 项目经理 */ - private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndPM(Long currentUserId, Long projectId,Long roleId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception { + private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndPm(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, + Integer process, Integer page, Integer pageSize, Integer priority, Integer imitation) throws Exception { TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo(); List globalTaskList = new ArrayList<>(); List normalTaskList = new ArrayList<>(); - TaskVo.GlobalTask globalTask = null; - TaskVo.NormalTask normalTask = null; + TaskVo.GlobalTask globalTask; + TaskVo.NormalTask normalTask; //1、查找一级任务 SysProject project = sysProjectDao.selectByPrimaryKey(projectId); if (endTime < project.getBeginTime() || startTime > project.getEndTime()) { @@ -217,15 +196,22 @@ public class ProTaskDetailService implements IProTaskDetailService { task.setScore(score); } //处理插件 - managePlugin(currentUserId,roleId,task); + managePlugin(currentUserId,roleId,task,imitation); //二级任务完成状态 - ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, task.getId()); - if (ObjectUtil.isNotNull(subTimeMember)) { - task.setRealEndTime(subTimeMember.getRealFinishTime()); - task.setProcess(subTimeMember.getComplatedStatus()); + if(task.getProcess() != 2) { + ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, task.getId()); + if (ObjectUtil.isNotNull(subTimeMember)) { + task.setRealEndTime(subTimeMember.getRealFinishTime()); + task.setProcess(subTimeMember.getComplatedStatus()); + }else if(task.getProcess() > 2){ + task.setRealEndTime((long) 0); + task.setProcess(0); + } } //二级任务配置 task.setProTaskConfig(getProTaskShow(task.getDetailId())); + //提醒信息 + normalTask.setRemindInfoList(proRemindDao.queryRemindByTask(normalTask.getId())); } TaskUtil.Task task = TaskUtil.splitTask(secondNormalTaskList, startTime, endTime, process); if (CollectionUtil.isNotEmpty(task.getGlobalTask())) { @@ -259,12 +245,13 @@ public class ProTaskDetailService implements IProTaskDetailService { /** * 查看任务 项目成员 */ - private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception { + private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, + Long endTime, Integer process, Integer page, Integer pageSize,Integer priority,Integer imitation) throws Exception { TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo(); List globalTaskList = new ArrayList<>(); List normalTaskList = new ArrayList<>(); - TaskVo.GlobalTask globalTask = null; + TaskVo.GlobalTask globalTask; //获取“全体成员”角色 ProRole allMember = proRoleService.getAllMember(projectId); Long allMemberId = null; @@ -272,7 +259,8 @@ public class ProTaskDetailService implements IProTaskDetailService { allMemberId = allMember.getId(); } //查找该角色的所有任务(全体成员的任务也是这个角色的任务) - List secondTaskVoList = taskDetailDao.selectTaskByRoleAndAllMembers(projectId, roleId,allMemberId, startTime, endTime); + List secondTaskVoList = taskDetailDao.selectTaskByRoleAndAllMembers(projectId, roleId, + allMemberId, startTime, endTime,priority); if (CollectionUtil.isNotEmpty(secondTaskVoList)) { for (TaskVo.NormalTask normalTask : secondTaskVoList) { @@ -285,14 +273,22 @@ public class ProTaskDetailService implements IProTaskDetailService { } } //处理插件 - managePlugin(currentUserId,roleId,normalTask); - ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, normalTask.getId()); - if (ObjectUtil.isNotNull(subTimeMember)) { - normalTask.setProcess(subTimeMember.getComplatedStatus()); - normalTask.setRealEndTime(subTimeMember.getRealFinishTime()); + managePlugin(currentUserId,roleId,normalTask,imitation); + //任务完成状态 + if(normalTask.getProcess() != 2) { + ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, normalTask.getId()); + if (ObjectUtil.isNotNull(subTimeMember)) { + normalTask.setProcess(subTimeMember.getComplatedStatus()); + normalTask.setRealEndTime(subTimeMember.getRealFinishTime()); + }else if(normalTask.getProcess() > 2){ + normalTask.setRealEndTime((long) 0); + normalTask.setProcess(0); + } } //任务配置 normalTask.setProTaskConfig(getProTaskShow(normalTask.getDetailId())); + //提醒信息 + normalTask.setRemindInfoList(proRemindDao.queryRemindByTask(normalTask.getId())); } TaskUtil.Task task = TaskUtil.splitTask(secondTaskVoList, startTime, endTime, process); @@ -305,7 +301,11 @@ public class ProTaskDetailService implements IProTaskDetailService { } } if (CollectionUtil.isNotEmpty(task.getCommonTask())) { - normalTaskList = sortTaskTime(task.getCommonTask()); + if (priority == 0) { + normalTaskList = sortTaskTime(task.getCommonTask()); + }else { + normalTaskList = task.getCommonTask(); + } } } @@ -354,15 +354,14 @@ public class ProTaskDetailService implements IProTaskDetailService { private List sortTaskTime(List commonTask) { List normalTaskList = new ArrayList<>(); - List secondTaskVoList = null; + List secondTaskVoList; Set longSet = new HashSet<>(); - List timeList = new ArrayList<>(); if (CollectionUtil.isNotEmpty(commonTask)) { for (TaskVo.NormalTask secondTaskVo : commonTask) { longSet.add(secondTaskVo.getBeginTime()); longSet.add(secondTaskVo.getEndTime()); } - timeList.addAll(longSet); + List timeList = new ArrayList<>(longSet); for (int i = 0; i < timeList.size(); i++) { for (int j = 0; j < timeList.size() - i - 1; j++) { if (timeList.get(j) > timeList.get(j + 1)) { @@ -374,7 +373,7 @@ public class ProTaskDetailService implements IProTaskDetailService { } int sequence = 1; for (int i = 0; i < timeList.size() - 1; i++) { - TaskVo.NormalTask normalTask = null; + TaskVo.NormalTask normalTask; secondTaskVoList = new ArrayList<>(); Long startTime = timeList.get(i); Long endTime = timeList.get(i + 1); @@ -442,8 +441,8 @@ public class ProTaskDetailService implements IProTaskDetailService { * 处理任务的插件 */ @Override - public void managePlugin(Long userId,Long roleId,TaskVo.NormalTask normalTask) throws Exception { - Boolean isMain = proMemberService.userIsBelongRole(userId,roleId); + public void managePlugin(Long userId,Long roleId,TaskVo.NormalTask normalTask,Integer imitation) throws Exception { + Boolean isMain = proMemberService.userIsBelongRole(userId,roleId,imitation); if(!isMain){ normalTask.setPlugins(null); }else { @@ -453,32 +452,39 @@ public class ProTaskDetailService implements IProTaskDetailService { String[] pluginIds = pluginVo.getId().split(","); String[] pluginNames = pluginVo.getName().split(","); String[] pluginDescription = pluginVo.getDescription().split(","); + String[] pluginShowType = pluginVo.getShowType().split(","); - TaskVo.PluginVo plugin = null; + TaskVo.PluginVo plugin; for(int i = 0;i taskDeliverByMVPList = new ArrayList<>(); - TaskVo.TaskDeliverByMVP taskDeliverByMVP = null; + @Override + public List getTaskInfoByMvp(Long projectId) { + List taskDeliverByMvpList; + TaskVo.TaskDeliverByMVP taskDeliverByMvp; List firstTasks = new ArrayList<>(); - TaskVo.FirstTask firstProTask = null; + TaskVo.FirstTask firstProTask; //查找项目下的一级任务 ProTaskDetailExample firstTaskExample = new ProTaskDetailExample(); firstTaskExample.createCriteria().andProjectIdEqualTo(projectId) @@ -486,7 +492,7 @@ public class ProTaskDetailService implements IProTaskDetailService { List firstTaskList = taskDetailDao.selectByExample(firstTaskExample); if (CollectionUtil.isNotEmpty(firstTaskList)) { for (ProTaskDetail firstTask : firstTaskList) { - taskDeliverByMVPList = new ArrayList<>(); + taskDeliverByMvpList = new ArrayList<>(); //查找项目下所有的二级任务 ProTaskDetailExample taskExample = new ProTaskDetailExample(); taskExample.createCriteria().andProjectIdEqualTo(projectId) @@ -495,9 +501,9 @@ public class ProTaskDetailService implements IProTaskDetailService { if (CollectionUtil.isNotEmpty(taskList)) { for (ProTaskDetail task : taskList) { - taskDeliverByMVP = new TaskVo.TaskDeliverByMVP(); - taskDeliverByMVP.setId(task.getId()); - taskDeliverByMVP.setName(task.getName()); + taskDeliverByMvp = new TaskVo.TaskDeliverByMVP(); + taskDeliverByMvp.setId(task.getId()); + taskDeliverByMvp.setName(task.getName()); //负责人信息 TaskVo.RoleCheckList roleCheckList = proRoleService.selectRoleByCheckOrExecutor(task.getExecutorRole()); if (ObjectUtil.isNotNull(roleCheckList)) { @@ -507,44 +513,42 @@ public class ProTaskDetailService implements IProTaskDetailService { } else { roleCheckListList.add(roleCheckList); } - taskDeliverByMVP.setRoles(roleCheckListList); + taskDeliverByMvp.setRoles(roleCheckListList); } //检查人信息 - taskDeliverByMVP.setChecker(proRoleService.selectRoleByCheckOrExecutor(task.getCheckerRole())); + taskDeliverByMvp.setChecker(proRoleService.selectRoleByCheckOrExecutor(task.getCheckerRole())); //查找任务下的交付物 if(task.getHasGroup() == 0){ - taskDeliverByMVP.setDelivers(taskDeliverService.selectDeliverOrInputByTask(task.getId(), 0)); + taskDeliverByMvp.setDelivers(taskDeliverService.selectDeliverOrInputByTask(task.getId(), 0)); }else { Long now = System.currentTimeMillis(); - System.out.println(task.getName()); + log.info(task.getName()); TaskVo.TaskIdAndSubTimeIdByParentIdAndTime taskAndSubTime = taskDetailDao.selectSubTimeByTaskParentIdAndTime(task.getId(), now); if(ObjectUtil.isNotNull(taskAndSubTime)){ - taskDeliverByMVP.setDelivers(taskDeliverService.selectDeliverOrInputByTask(taskAndSubTime.getTaskId(), 0)); + taskDeliverByMvp.setDelivers(taskDeliverService.selectDeliverOrInputByTask(taskAndSubTime.getTaskId(), 0)); } } //查找任务的输入文档 - taskDeliverByMVP.setInputs(taskDeliverService.selectDeliverOrInputByTask(task.getId(), 1)); + taskDeliverByMvp.setInputs(taskDeliverService.selectDeliverOrInputByTask(task.getId(), 1)); - taskDeliverByMVPList.add(taskDeliverByMVP); + taskDeliverByMvpList.add(taskDeliverByMvp); } } firstProTask = new TaskVo.FirstTask(); firstProTask.setId(firstTask.getId()); firstProTask.setName(firstTask.getName()); - firstProTask.setTaskDeliverByMVP(taskDeliverByMVPList); + firstProTask.setTaskDeliverByMVP(taskDeliverByMvpList); firstTasks.add(firstProTask); } } - - proTaskInfoByMVP.setFirstTaskList(firstTasks); - return proTaskInfoByMVP; + return firstTasks; } /** * 通过任务id查任务详情 */ @Override - public TaskVo.NormalTask getTaskInfoByTaskId(Long currentUserId, Long projectId, Long taskId) throws Exception { + public TaskVo.NormalTask getTaskInfoByTaskId(Long currentUserId, Long projectId, Long taskId, Integer imitation) throws Exception { ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(taskId); TaskVo.NormalTask taskDetail = null; @@ -552,41 +556,55 @@ public class ProTaskDetailService implements IProTaskDetailService { ProTaskDetail task = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId()); taskDetail = taskDetailDao.selectTaskByTaskId(subTime.getId(), subTime.getTaskDetailId(),task.getExecutorRole()); if(ObjectUtil.isNotNull(taskDetail)) { -// //处理查询到的任务的插件 -// managePlugin(currentUserId,task.getExecutorRole(),taskDetail); + //处理查询到的任务的插件 + managePlugin(currentUserId,task.getExecutorRole(),taskDetail,imitation); //任务的完成状态 - ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, taskDetail.getId()); - if (ObjectUtil.isNotNull(subTimeMember)) { - taskDetail.setProcess(subTimeMember.getComplatedStatus()); - taskDetail.setRealEndTime(subTimeMember.getRealFinishTime()); + if(taskDetail.getProcess() != 2) { + ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, taskDetail.getId()); + if (ObjectUtil.isNotNull(subTimeMember)) { + taskDetail.setProcess(subTimeMember.getComplatedStatus()); + taskDetail.setRealEndTime(subTimeMember.getRealFinishTime()); + }else if(taskDetail.getProcess() > 2){ + taskDetail.setRealEndTime((long) 0); + taskDetail.setProcess(0); + } } + //任务配置 + taskDetail.setProTaskConfig(getProTaskShow(taskDetail.getDetailId())); - //添加项目信息和插件信息 - normalTaskAddPlugin(currentUserId, subTime.getTaskDetailId(), taskDetail); - List groupTaskList = new ArrayList<>(); + //添加项目信息 + normalTaskAddPlugin(subTime.getTaskDetailId(), taskDetail); + List groupTaskList = new ArrayList<>(); + //提醒信息 + taskDetail.setRemindInfoList(proRemindDao.queryRemindByTask(taskDetail.getId())); //获取此任务的子任务 ProTaskDetailExample detailExample = new ProTaskDetailExample(); detailExample.createCriteria().andParentIdEqualTo(taskDetail.getDetailId()); List detailList = taskDetailDao.selectByExample(detailExample); if(CollectionUtil.isNotEmpty(detailList)){ for(ProTaskDetail detail : detailList){ - TaskVo.NormalTask groupTask = null; + TaskVo.NormalTask groupTask; Long subTimeId = taskDeliverService.isTaskOrSubTime(detail.getId()); if(ObjectUtil.isNotNull(subTimeId)){ groupTask = taskDetailDao.selectTaskByTaskId(subTimeId, detail.getId(),detail.getExecutorRole()); if(ObjectUtil.isNotNull(groupTask)){ -// //处理查询到的任务的插件 -// managePlugin(currentUserId,task.getExecutorRole(),taskDetail); + //处理查询到的任务的插件 + managePlugin(currentUserId,task.getExecutorRole(),taskDetail,imitation); //任务的完成状态 - ProSubTimeMember proSubTimeMember = getProcessByUserIdAndTask(currentUserId, groupTask.getId()); - if (ObjectUtil.isNotNull(proSubTimeMember)) { - groupTask.setProcess(proSubTimeMember.getComplatedStatus()); - groupTask.setRealEndTime(proSubTimeMember.getRealFinishTime()); + if(taskDetail.getProcess() != 2) { + ProSubTimeMember proSubTimeMember = getProcessByUserIdAndTask(currentUserId, groupTask.getId()); + if (ObjectUtil.isNotNull(proSubTimeMember)) { + groupTask.setProcess(proSubTimeMember.getComplatedStatus()); + groupTask.setRealEndTime(proSubTimeMember.getRealFinishTime()); + }else if(taskDetail.getProcess() > 2){ + taskDetail.setRealEndTime((long) 0); + taskDetail.setProcess(0); + } } //添加项目信息和插件信息 - normalTaskAddPlugin(currentUserId, groupTask.getDetailId(), groupTask); + normalTaskAddPlugin(groupTask.getDetailId(), groupTask); //修改返回时子任务的名字(“任务名+(xx和XX)”) if (detail.getAllMember() == 0) { groupTask.setName(updateSubTaskName(groupTask.getDetailId(), groupTask.getName())); @@ -604,7 +622,7 @@ public class ProTaskDetailService implements IProTaskDetailService { return taskDetail; } - private void normalTaskAddPlugin(Long userId, Long taskId, TaskVo.NormalTask normalTask) throws Exception { + private void normalTaskAddPlugin( Long taskId, TaskVo.NormalTask normalTask) { ProTaskDetail task = taskDetailDao.selectByPrimaryKey(taskId); //添加项目信息 SysProject project = sysProjectDao.selectByPrimaryKey(task.getProjectId()); @@ -616,17 +634,13 @@ public class ProTaskDetailService implements IProTaskDetailService { if (ObjectUtil.isNotNull(role)) { normalTask.setExecutorRoleName(role.getName()); } - //添加插件 - List pluginVoList = pluginService.getPluginByTask(task.getId(), userId); - normalTask.setPlugins(new ArrayList<>()); - normalTask.getPlugins().addAll(pluginVoList); } /** * 修改返回时子任务的名字 格式:“任务名+(xx和XX)” */ private String updateSubTaskName(Long taskId, String taskName) { - String name = taskName + "("; + StringBuilder name = new StringBuilder(taskName + "("); ProTaskMemberExample taskMemberExample = new ProTaskMemberExample(); taskMemberExample.createCriteria().andTaskDetailIdEqualTo(taskId); List taskMemberList = taskMemberDao.selectByExample(taskMemberExample); @@ -634,15 +648,15 @@ public class ProTaskDetailService implements IProTaskDetailService { for (int i = 0; i < taskMemberList.size(); i++) { ProMember member = proMemberDao.selectByPrimaryKey(taskMemberList.get(i).getMemberId()); if (ObjectUtil.isNotNull(member)) { - name += member.getNickname(); + name.append(member.getNickname()); if (i != taskMemberList.size() - 1) { - name += "和"; + name.append("和"); } } } } - name = name + ")"; - return name; + name.append(")"); + return name.toString(); } @@ -659,7 +673,7 @@ public class ProTaskDetailService implements IProTaskDetailService { //获取日期的开始结束时间 Long startMillisTime = null; Long endMillisTime = null; - Map timeMap = null; + Map timeMap; if (StrUtil.isNotEmpty(start)) { timeMap = DateUtil.projectFormatDateTime(start); startMillisTime = timeMap.get("startMillisTime"); @@ -708,13 +722,7 @@ public class ProTaskDetailService implements IProTaskDetailService { //关键词模糊搜索 if (StrUtil.isNotEmpty(key)) { if (CollectionUtil.isNotEmpty(normalTaskList)) { - Iterator it = normalTaskList.iterator(); - while (it.hasNext()) { - TaskVo.NormalTask normalTask = it.next(); - if (!normalTask.getName().contains(key)) { - it.remove(); - } - } + normalTaskList.removeIf(normalTask -> !normalTask.getName().contains(key)); } } @@ -755,37 +763,48 @@ public class ProTaskDetailService implements IProTaskDetailService { } private List getTaskInfoByProjectIdAndUserId(SysProject project, Long userId, - Long startTime, Long endTime,List roleList) throws Exception { + Long startTime, Long endTime,Set roleList) throws Exception { List normalTaskList = new ArrayList<>(); //获取用户的角色 if(CollectionUtil.isEmpty(roleList)){ + roleList = new HashSet<>(); //查询此用户在项目中的的所有角色的任务 - roleList = proMemberService.selectRolesByUserIdAndProjectId(userId, project.getId()); + List roles = proMemberService.selectRolesByUserIdAndProjectId(userId, project.getId(),null); + for (ProRole role : roles){ + roleList.add(role.getId()); + } +// roles.forEach(role->{ +// roleList.add(role.getId()); +// }); } -// List roleList = proMemberService.selectRolesByUserIdAndProjectId(userId, project.getId()); //获取“全体成员”角色 ProRole allMember = proRoleService.getAllMember(project.getId()); if (ObjectUtil.isNotNull(allMember)) { - roleList.add(allMember); + roleList.add(allMember.getId()); } if (CollectionUtil.isNotEmpty(roleList)) { - for (ProRole role : roleList) { - SysProject sysProject = sysProjectDao.selectByPrimaryKey(role.getProjectId()); + for (Long roleId : roleList) { +// SysProject sysProject = sysProjectDao.selectByPrimaryKey(role.getProjectId()); List taskList = - taskDetailDao.selectTaskByRoleAndAllMembers(project.getId(), role.getId(), null,startTime, endTime); + taskDetailDao.selectTaskByRoleAndAllMembers(project.getId(), roleId, null,startTime, endTime,0); if (CollectionUtil.isNotEmpty(taskList)) { for (TaskVo.NormalTask normalTask : taskList) { //任务的完成状态 - ProSubTimeMember proSubTimeMember = getProcessByUserIdAndTask(userId, normalTask.getId()); - if (ObjectUtil.isNotNull(proSubTimeMember)) { - normalTask.setProcess(proSubTimeMember.getComplatedStatus()); - normalTask.setRealEndTime(proSubTimeMember.getRealFinishTime()); + if(normalTask.getProcess() != 2) { + ProSubTimeMember proSubTimeMember = getProcessByUserIdAndTask(userId, normalTask.getId()); + if (ObjectUtil.isNotNull(proSubTimeMember)) { + normalTask.setProcess(proSubTimeMember.getComplatedStatus()); + normalTask.setRealEndTime(proSubTimeMember.getRealFinishTime()); + }else if(normalTask.getProcess() > 2){ + normalTask.setRealEndTime((long) 0); + normalTask.setProcess(0); + } } ProRole proRole = proRoleDao.selectByPrimaryKey(normalTask.getExecutorRole()); - if (ObjectUtil.isNotNull(sysProject)) { - normalTask.setProjectId(sysProject.getId()); - normalTask.setProjectName(sysProject.getName()); + if (ObjectUtil.isNotNull(project)) { + normalTask.setProjectId(project.getId()); + normalTask.setProjectName(project.getName()); } if (ObjectUtil.isNotNull(proRole)) { normalTask.setExecutorRoleName(proRole.getName()); @@ -802,8 +821,7 @@ public class ProTaskDetailService implements IProTaskDetailService { * 项目内的任务清单 */ @Override - public TaskVo.TaskCheckList selectTaskListByProject(Long projectId, Long currentUserId, Integer page, Integer pageSize, - String key, String start, String end, Long roleId) throws Exception { + public TaskVo.TaskCheckList selectTaskListByProject(Long currentUserId, TaskDto.SelectListByProject list) throws Exception { TaskVo.TaskCheckList taskCheckList = new TaskVo.TaskCheckList(); List normalTaskList = new ArrayList<>(); TaskVo.PageInfo pageInfo = new TaskVo.PageInfo(); @@ -811,46 +829,70 @@ public class ProTaskDetailService implements IProTaskDetailService { //获取日期的开始结束时间 Long startMillisTime = null; Long endMillisTime = null; - Map timeMap = null; - if (StrUtil.isNotEmpty(start)) { - timeMap = DateUtil.projectFormatDateTime(start); + Map timeMap; + if (StrUtil.isNotEmpty(list.getStart())) { + timeMap = DateUtil.projectFormatDateTime(list.getStart()); startMillisTime = timeMap.get("startMillisTime"); } - if (StrUtil.isNotEmpty(end)) { - timeMap = DateUtil.projectFormatDateTime(end); + if (StrUtil.isNotEmpty(list.getEnd())) { + timeMap = DateUtil.projectFormatDateTime(list.getEnd()); endMillisTime = timeMap.get("endMillisTime"); } //获取需查询的角色 - List roleList = new ArrayList<>(); - if(ObjectUtil.isNotNull(roleId)){ - //获取指定的角色 - ProRole role = proRoleDao.selectByPrimaryKey(roleId); - if(ObjectUtil.isNotNull(role)){ - ProRole parentRole = proRoleDao.selectByPrimaryKey(role.getParentId()); - if(ObjectUtil.isNotNull(parentRole)){ - //若角色为项目经理或MVP,则查询全部角色 - if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.value) || - parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { - //查询项目下所有角色的任务 - List roleInfoList = proRoleService.getRealMemberRolesByProjectId(projectId); - if(CollectionUtil.isNotEmpty(roleInfoList)) { - for (ProjectVo.RoleInfo roleInfo : roleInfoList) { - ProRole proRole = proRoleDao.selectByPrimaryKey(roleInfo.getId()); - roleList.add(proRole); + Set roleList = new HashSet<>(); + if(ObjectUtil.isNotNull(list.getRoleList())){ + list.getRoleList().forEach(roleId -> { + ProRole role = proRoleDao.selectByPrimaryKey(roleId); + if(ObjectUtil.isNotNull(role)){ + ProRole parentRole = proRoleDao.selectByPrimaryKey(role.getParentId()); + if(ObjectUtil.isNotNull(parentRole)){ + //若角色为项目经理或MVP,则查询全部角色 + if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.value) || + parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { + //查询项目下所有角色 + List roleInfoList = proRoleService.getRealMemberRolesByProjectId(list.getProjectId()); + if(CollectionUtil.isNotEmpty(roleInfoList)) { + for (ProjectVo.RoleInfo roleInfo : roleInfoList) { +// ProRole proRole = proRoleDao.selectByPrimaryKey(roleInfo.getId()); + roleList.add(roleInfo.getId()); + } } } - }else { - //否则只查询指定角色的任务清单 - roleList.add(role); } } - }else{ - throw new BaseException(CodeEnum.NOT_ROLE); + }); + if(CollectionUtil.isEmpty(roleList)){ + roleList.addAll(list.getRoleList()); } + +// //获取指定的角色 +// ProRole role = proRoleDao.selectByPrimaryKey(roleId); +// if(ObjectUtil.isNotNull(role)){ +// ProRole parentRole = proRoleDao.selectByPrimaryKey(role.getParentId()); +// if(ObjectUtil.isNotNull(parentRole)){ +// //若角色为项目经理或MVP,则查询全部角色 +// if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.MVP.value) || +// parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { +// //查询项目下所有角色的任务 +// List roleInfoList = proRoleService.getRealMemberRolesByProjectId(projectId); +// if(CollectionUtil.isNotEmpty(roleInfoList)) { +// for (ProjectVo.RoleInfo roleInfo : roleInfoList) { +// ProRole proRole = proRoleDao.selectByPrimaryKey(roleInfo.getId()); +// roleList.add(proRole); +// } +// } +// }else { +// //否则只查询指定角色的任务清单 +// roleList.add(role); +// } +// } +// }else{ +// throw new BaseException(CodeEnum.NOT_ROLE); +// } } //获取项目 - SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); + SysProject sysProject = sysProjectDao.selectByPrimaryKey(list.getProjectId()); if (ObjectUtil.isNotNull(sysProject)) { List taskList = getTaskInfoByProjectIdAndUserId(sysProject, currentUserId, startMillisTime, endMillisTime,roleList); if (CollectionUtil.isNotEmpty(taskList)) { @@ -858,15 +900,16 @@ public class ProTaskDetailService implements IProTaskDetailService { } } //关键词模糊搜索 - if (StrUtil.isNotEmpty(key)) { + if (StrUtil.isNotEmpty(list.getKey())) { if (CollectionUtil.isNotEmpty(normalTaskList)) { - Iterator it = normalTaskList.iterator(); - while (it.hasNext()) { - TaskVo.NormalTask normalTask = it.next(); - if (!normalTask.getName().contains(key)) { - it.remove(); - } - } + normalTaskList.removeIf(normalTask -> !normalTask.getName().contains(list.getKey())); +// Iterator it = normalTaskList.iterator(); +// while (it.hasNext()) { +// TaskVo.NormalTask normalTask = it.next(); +// if (!normalTask.getName().contains(key)) { +// it.remove(); +// } +// } } } //业务分页 @@ -874,11 +917,11 @@ public class ProTaskDetailService implements IProTaskDetailService { int totalPages = 1; if (CollectionUtil.isNotEmpty(normalTaskList)) { //1.计算分页条件 - if (page > 0) { + if (list.getPage() > 0) { int size = normalTaskList.size(); - totalPages = size / pageSize + 1; - int num = pageSize; - int startIndex = pageSize * (page - 1); + totalPages = size / list.getPageSize() + 1; + int num = list.getPageSize(); + int startIndex = list.getPageSize() * (list.getPage() - 1); if (startIndex >= size) { startIndex = -1; } else { @@ -897,7 +940,7 @@ public class ProTaskDetailService implements IProTaskDetailService { theNormalList = CollectionUtil.newArrayList(normalTaskList); } } - pageInfo.setCurrentPage(page); + pageInfo.setCurrentPage(list.getPage()); pageInfo.setTotalPage(totalPages); taskCheckList.setNormalTaskList(theNormalList); @@ -929,52 +972,59 @@ public class ProTaskDetailService implements IProTaskDetailService { public ProSubTimeMember getProcessByUserIdAndTask(Long userId, Long subTimeId) throws Exception { ProSubTimeMember subTimeMember = null; ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(subTimeId); + if(ObjectUtil.isNull(subTime)){ + throw new BaseException(CodeEnum.NOT_TASK); + } ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId()); - if (taskDetail.getFinishNeedAll() == 0) { - ProSubTimeMemberExample subTimeMemberExample = new ProSubTimeMemberExample(); - subTimeMemberExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId).andComplatedStatusEqualTo((byte) 2); - subTimeMemberExample.setOrderByClause("real_finish_time DESC"); - List subTimeMemberList = proSubTimeMemberDao.selectByExample(subTimeMemberExample); - if (CollectionUtil.isNotEmpty(subTimeMemberList)) { + if(ObjectUtil.isNull(taskDetail)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + ProSubTimeMemberExample subTimeMemberExample = new ProSubTimeMemberExample(); + subTimeMemberExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId).andComplatedStatusEqualTo((byte) 2); + subTimeMemberExample.setOrderByClause("real_finish_time DESC"); + List subTimeMemberList = proSubTimeMemberDao.selectByExample(subTimeMemberExample); + if (CollectionUtil.isNotEmpty(subTimeMemberList)) { + if (taskDetail.getFinishNeedAll() == 0) { subTimeMember = subTimeMemberList.get(0); - } - } else { - //查找此用户在任务下的成员 - ProMember porMember = proMemberService.selectByUserId(userId, taskDetail.getProjectId()); - //该用户是否是任务的负责人 - ProRole role = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); - Boolean isBelongRole = proMemberService.userIsBelongRole(userId, role.getId()); - if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase) || isBelongRole) { - ProSubTimeMemberExample subTimeMemberExample = new ProSubTimeMemberExample(); - subTimeMemberExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId) - .andMemberIdEqualTo(porMember.getId()).andComplatedStatusEqualTo((byte) 2); - List subTimeMemberList = proSubTimeMemberDao.selectByExample(subTimeMemberExample); - if (CollectionUtil.isNotEmpty(subTimeMemberList)) { - subTimeMember = subTimeMemberList.get(0); - } - } else { - //查找任务负责人下的所有成员 - List memberList = proMemberService.selectByRole(taskDetail.getExecutorRole()); - if (CollectionUtil.isNotEmpty(memberList)) { - boolean flag = false; - for (ProMember member : memberList) { - ProSubTimeMemberExample subTimeMemberExample = new ProSubTimeMemberExample(); - subTimeMemberExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId) - .andMemberIdEqualTo(member.getId()).andComplatedStatusEqualTo((byte) 2); - subTimeMemberExample.setOrderByClause("real_finish_time"); - List subTimeMemberList = proSubTimeMemberDao.selectByExample(subTimeMemberExample); - if (CollectionUtil.isEmpty(subTimeMemberList)) { - flag = true; + }else { + //查找此用户在任务下的成员 + ProMember porMember = proMemberService.selectByUserId(userId, taskDetail.getProjectId()); + //该用户是否是任务的负责人 + ProRole role = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); + Boolean isBelongRole = proMemberService.userIsBelongRole(userId, role.getId(),null); + if (isBelongRole) { + for(ProSubTimeMember sTimeMember:subTimeMemberList){ + if(sTimeMember.getMemberId().longValue() == porMember.getId()){ + subTimeMember = sTimeMember; break; } - subTimeMember = subTimeMemberList.get(0); } - if(flag){ - subTimeMember = null; + }else { + //查找任务负责人下的所有成员 + List memberList = proMemberService.selectByRole(taskDetail.getExecutorRole()); + + if (CollectionUtil.isNotEmpty(memberList)) { + boolean flag = false; + for (ProMember member : memberList) { + ProSubTimeMemberExample sTimeMemberExample = new ProSubTimeMemberExample(); + sTimeMemberExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId) + .andMemberIdEqualTo(member.getId()).andComplatedStatusEqualTo((byte) 2); + sTimeMemberExample.setOrderByClause("real_finish_time"); + List sTimeMemberList = proSubTimeMemberDao.selectByExample(sTimeMemberExample); + if (CollectionUtil.isEmpty(sTimeMemberList)) { + flag = true; + break; + } + subTimeMember = subTimeMemberList.get(0); + } + if(flag){ + subTimeMember = null; + } } } } } + return subTimeMember; } @@ -986,7 +1036,7 @@ public class ProTaskDetailService implements IProTaskDetailService { @Override public void deleteTask(Long currentUserId, Long taskId) throws Exception { //检查id是详情id还是subTimeId - ProTaskDetail taskDetail = null; + ProTaskDetail taskDetail; ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(taskId); if (ObjectUtil.isNotNull(subTime)) { taskDetail = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId()); @@ -1055,9 +1105,9 @@ public class ProTaskDetailService implements IProTaskDetailService { */ @Override public TaskVo.NormalTask updateTaskInfo(Long currentUserId, TaskDto.UpdateTaskInfo updateTaskInfo) throws Exception { - TaskVo.NormalTask normalTask = null; + TaskVo.NormalTask normalTask; - ProTaskDetail taskDetail = null; + ProTaskDetail taskDetail; ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(updateTaskInfo.getId()); if(ObjectUtil.isNotNull(taskSubTime)){ taskDetail = taskDetailDao.selectByPrimaryKey(taskSubTime.getTaskDetailId()); @@ -1089,11 +1139,19 @@ public class ProTaskDetailService implements IProTaskDetailService { if(ObjectUtil.isNotNull(updateTaskInfo.getDelay())){ taskDetail.setDelay((byte) updateTaskInfo.getDelay()); } + //修改任务优先级 + if(ObjectUtil.isNotNull(updateTaskInfo.getPriority())){ + taskDetail.setPriority(updateTaskInfo.getPriority()); + } //延迟切换时间 if(ObjectUtil.isNotNull(updateTaskInfo.getDelayTime()) && (taskDetail.getDelay() == WebConstant.TASK_DELAY.DelayManual.value)){ taskDetail.setDelayTime(updateTaskInfo.getDelayTime()); } + //是否是里程碑 + if(ObjectUtil.isNotNull(updateTaskInfo.getMilestone())){ + taskDetail.setMilestone(updateTaskInfo.getMilestone()); + } //时间 if(ObjectUtil.isNotNull(updateTaskInfo.getBeginTime()) || ObjectUtil.isNotNull(updateTaskInfo.getEndTime()) || @@ -1116,11 +1174,83 @@ public class ProTaskDetailService implements IProTaskDetailService { partTaskSubTime(taskDetail); } } + + //如果传入的插件不为空,先将原来的插件删除, + if(CollectionUtil.isNotEmpty(updateTaskInfo.getPlugins())){ + ProTaskPluginExample pluginExample = new ProTaskPluginExample(); + pluginExample.createCriteria().andTaskDetailIdEqualTo(taskDetail.getId()) + .andMemberRoleIdEqualTo(taskDetail.getExecutorRole()); + List pluginList = taskPluginDao.selectByExample(pluginExample); + if(CollectionUtil.isNotEmpty(pluginList)){ + pluginList.forEach(proTaskPlugin -> { + proTaskPlugin.setRecStatus((byte) 2); + taskPluginDao.updateByPrimaryKeySelective(proTaskPlugin); + }); + } + //将新的插件加入任务 + updateTaskInfo.getPlugins().forEach(taskPlugin -> { + SysPlugin sysPlugin = sysPluginDao.selectByPrimaryKey(taskPlugin); + if(ObjectUtil.isNull(sysPlugin)){ + throw new BaseException(CodeEnum.WBS_NOT_PLUGIN); + } + ProTaskPlugin plugin = new ProTaskPlugin(); + plugin.setId(snowflake.nextId()); + plugin.setTaskDetailId(taskDetail.getId()); + plugin.setPluginId(taskPlugin); + plugin.setMemberRoleId(taskDetail.getExecutorRole()); + taskPluginDao.insertSelective(plugin); + }); + } + //修改交付物信息 + if(CollectionUtil.isNotEmpty(updateTaskInfo.getDeliverList())){ + updateTaskInfo.getDeliverList().forEach(taskDeliver -> { + if(StrUtil.isNotEmpty(taskDeliver.getDeliverName())){ + if(ObjectUtil.isNotNull(taskDeliver.getDeliverId())) { + ProTaskDeliver deliver = taskDeliverDao.selectByPrimaryKey(taskDeliver.getDeliverId()); + if (ObjectUtil.isNotNull(deliver)) { + deliver.setName(taskDeliver.getDeliverName()); + taskDeliverDao.updateByPrimaryKeySelective(deliver); + } + }else { + ProTaskDeliver deliver = new ProTaskDeliver(); + deliver.setId(snowflake.nextId()); + deliver.setTaskDetailId(taskDetail.getId()); + deliver.setName(taskDeliver.getDeliverName()); + deliver.setIsInput(0); + deliver.setIsFinal(1); + taskDeliverService.saveDeliver(deliver); + } + } + }); + } + //修改数据 taskDetailDao.updateByPrimaryKeySelective(taskDetail); + //修改提醒信息 + if(CollectionUtil.isNotEmpty(updateTaskInfo.getTaskRemindList())){ + //删除之前的提醒信息 + ProRemindExample proRemindExample = new ProRemindExample(); + proRemindExample.createCriteria().andSubTaskIdEqualTo(updateTaskInfo.getId()); + List proRemindList = proRemindDao.selectByExample(proRemindExample); + if(CollectionUtil.isNotEmpty(proRemindList)){ + proRemindList.forEach(proRemind -> { + proRemind.setRecStatus((byte) 2); + proRemindDao.updateByPrimaryKeySelective(proRemind); + }); + } + updateTaskInfo.getTaskRemindList().forEach(updateTaskRemind -> { + try { + taskSubTimeService.saveRemind(currentUserId,updateTaskRemind); + } catch (Exception e) { + e.printStackTrace(); + } + }); + } //返回的任务详细信息 Long subTimeId = taskDeliverService.isTaskOrSubTime(taskDetail.getId()); - normalTask = getTaskInfoByTaskId(currentUserId,project.getId(),subTimeId); + normalTask = getTaskInfoByTaskId(currentUserId,project.getId(),subTimeId,null); + } else { + throw new BaseException(CodeEnum.NOT_POWER); } }else { throw new BaseException(CodeEnum.NOT_POWER); @@ -1177,7 +1307,7 @@ public class ProTaskDetailService implements IProTaskDetailService { eTime = groupTask.getEndTime(); } bTime = bTime < groupTask.getBeginTime() ? bTime : groupTask.getBeginTime(); - eTime = eTime > groupTask.getEndTime() ? eTime : groupTask.getEndTime();; + eTime = eTime > groupTask.getEndTime() ? eTime : groupTask.getEndTime(); } } //如果子任务最早最晚时间和父任务不同,则修改父任务时间 @@ -1236,11 +1366,10 @@ public class ProTaskDetailService implements IProTaskDetailService { } } - @Override public TaskVo.TaskInfoWithFeign getProjectIdByTaskId(Long taskId) { TaskVo.TaskInfoWithFeign taskInfo = null; - ProTaskDetail detail = null; + ProTaskDetail detail; ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(taskId); if(ObjectUtil.isNull(subTime)){ detail = taskDetailDao.selectByPrimaryKey(taskId); @@ -1262,4 +1391,115 @@ public class ProTaskDetailService implements IProTaskDetailService { } return taskInfo; } + + @Override + public TaskVo.NormalTask updateTaskConfig(Long userId, TaskDto.UpdateTaskConfig updateTaskConfig) throws Exception { + //检查任务是否存在 + ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(updateTaskConfig.getTaskId()); + if(ObjectUtil.isNull(taskDetail)){ + ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(updateTaskConfig.getTaskId()); + if(ObjectUtil.isNull(taskSubTime)) { + throw new BaseException(CodeEnum.NOT_TASK); + } + taskDetail = taskDetailDao.selectByPrimaryKey(taskSubTime.getTaskDetailId()); + } + //查找任务原来的配置 + ProTaskShowExample taskShowExample = new ProTaskShowExample(); + taskShowExample.createCriteria().andTaskDetailIdEqualTo(taskDetail.getId()); + List proTaskShowList = proTaskShowDao.selectByExample(taskShowExample); + if(CollectionUtil.isEmpty(proTaskShowList)){ + //没有则新建配置信息 + ProTaskShow proTaskShow = new ProTaskShow(); + BeanUtil.copyProperties(updateTaskConfig,proTaskShow); + proTaskShow.setId(snowflake.nextId()); + proTaskShow.setProjectId(taskDetail.getProjectId()); + proTaskShow.setTaskDetailId(taskDetail.getId()); + proTaskShowDao.insertSelective(proTaskShow); + }else { + //有则修改 + ProTaskShow proTaskShow = proTaskShowList.get(0); + BeanUtil.copyProperties(updateTaskConfig,proTaskShow); + proTaskShowDao.updateByPrimaryKeySelective(proTaskShow); + } + return getTaskInfoByTaskId(userId,taskDetail.getProjectId(),updateTaskConfig.getTaskId(),null); + } + + @Override + public List queryAllTaskByProjectId(Long currentUserId, TaskDto.QueryAllTaskByProjectId projectIdDto) throws Exception { + List taskList = new ArrayList<>(); +// TaskVo.TaskListByProjectId firstTask; + //1、查找一级任务 + SysProject project = sysProjectDao.selectByPrimaryKey(projectIdDto.getProjectId()); + if (ObjectUtil.isNull(project)) { + throw new BaseException(CodeEnum.NOT_PROJECT); + } + + ProTaskDetailExample proTaskDetailExample = new ProTaskDetailExample(); + proTaskDetailExample.createCriteria().andProjectIdEqualTo(projectIdDto.getProjectId()).andLevelEqualTo((byte) 1); + List firstTaskDetailList = taskDetailDao.selectByExample(proTaskDetailExample); + if (CollectionUtil.isNotEmpty(firstTaskDetailList)) { + firstTaskDetailList.forEach(firstTaskDetail -> { + TaskVo.TaskListByProjectId firstTask = taskDetailDao.getTaskById(firstTaskDetail.getId()); + List secondTaskList = taskDetailDao.getTaskByParentId(firstTaskDetail.getId()); + firstTask.setSecondTasks(secondTaskList); + taskList.add(firstTask); + }); + } +// int sequence = 1; +// for (ProTaskDetail firstTaskDetail : firstTaskDetailList) { +// TaskVo.TaskListByProjectId firstTask = new TaskVo.TaskListByProjectId(); +// BeanUtil.copyProperties(firstTaskDetail, firstTask); +// normalTask.setDetailId(firstTaskDetail.getId()); +// normalTask.setId(taskDeliverService.isTaskOrSubTime(firstTaskDetail.getId())); +// normalTask.setSequence(sequence); +// // 查询任务对应的配置 +// ProPluginConfigExample configExample = new ProPluginConfigExample(); +// configExample.createCriteria().andTaskIdEqualTo(firstTaskDetail.getId()).andPlaceLocationEqualTo((byte)0); +// List proPluginConfigs = proPluginConfigMapper.selectByExample(configExample); +// if (CollectionUtil.isNotEmpty(proPluginConfigs)) { +// ProPluginConfig config = proPluginConfigs.get(0); +// normalTask.setImportParam(config.getImportParam()); +// normalTask.setRoutineLocation(config.getRoutineLocation()); +// normalTask.setWebPath(config.getWebPath()); +// } +// //一级任务配置 +// normalTask.setProTaskConfig(getProTaskShow(normalTask.getDetailId())); +// +// //一级任务完成状态 +// ProSubTimeMember firstSubTimeMember = getProcessByUserIdAndTask(currentUserId, normalTask.getId()); +// if (ObjectUtil.isNotNull(firstSubTimeMember)) { +// normalTask.setRealEndTime(firstSubTimeMember.getRealFinishTime()); +// normalTask.setProcess(firstSubTimeMember.getComplatedStatus()); +// } +// //查找一级任务下的二级任务 +// List secondNormalTaskList = taskDetailDao.selectNormalTaskListByPM(projectIdDto.getProjectId(), firstTaskDetail.getId(), project.getBeginTime(), project.getEndTime(),projectIdDto.getRoleId()); +// if (CollectionUtil.isNotEmpty(secondNormalTaskList)) { +// for (TaskVo.NormalTask task : secondNormalTaskList) { +// //处理插件 +// managePlugin(currentUserId,projectIdDto.getRoleId(),task,null); +// //二级任务完成状态 +// if(task.getProcess() != 2) { +// ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, task.getId()); +// if (ObjectUtil.isNotNull(subTimeMember)) { +// task.setRealEndTime(subTimeMember.getRealFinishTime()); +// task.setProcess(subTimeMember.getComplatedStatus()); +// }else if(task.getProcess() > 2){ +// task.setRealEndTime((long) 0); +// task.setProcess(0); +// } +// } +// //二级任务配置 +// task.setProTaskConfig(getProTaskShow(task.getDetailId())); +// //提醒信息 +// task.setRemindInfoList(proRemindDao.queryRemindByTask(normalTask.getId())); +// } +// } +// normalTask.setSecondTasks(secondNormalTaskList); +// normalTaskList.add(normalTask); +// sequence++; +// } +// } +// return normalTaskList; + return taskList; + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProjectMessageService.java b/tall/src/main/java/com/ccsens/tall/service/ProjectMessageService.java new file mode 100644 index 00000000..683c5981 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/ProjectMessageService.java @@ -0,0 +1,414 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.tall.bean.dto.ProjectMessageDto; +import com.ccsens.tall.bean.dto.message.BaseMessageDto; +import com.ccsens.tall.bean.po.SysMessageSend; +import com.ccsens.tall.bean.po.SysMessageSendExample; +import com.ccsens.tall.bean.po.SysOperation; +import com.ccsens.tall.bean.po.SysOperationMessage; +import com.ccsens.tall.bean.vo.MessageVo; +import com.ccsens.tall.bean.vo.ProjectMessageVo; +import com.ccsens.tall.bean.vo.TaskVo; +import com.ccsens.tall.bean.vo.UserVo; +import com.ccsens.tall.persist.dao.ProMemberDao; +import com.ccsens.tall.persist.dao.SysAuthDao; +import com.ccsens.tall.persist.dao.SysMessageSendDao; +import com.ccsens.tall.persist.dao.SysOperationDao; +import com.ccsens.tall.persist.mapper.SysOperationMessageMapper; +import com.ccsens.tall.util.RobotUtil; +import com.ccsens.tall.util.WxTemplateUtil; +import com.ccsens.util.*; +import com.ccsens.util.annotation.OperateType; +import com.ccsens.util.bean.message.common.InMessage; +import com.ccsens.util.bean.message.common.MessageConstant; +import com.ccsens.util.config.RabbitMQConfig; +import com.ccsens.util.exception.BaseException; +import com.ccsens.util.wx.WxGzhUtil; +import com.ccsens.util.wx.WxTemplateMessage; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; +import org.springframework.amqp.core.AmqpTemplate; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionException; +import org.springframework.transaction.TransactionStatus; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * @description: + * @author: whj + * @time: 2020/5/26 17:36 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) +public class ProjectMessageService implements IProjectMessageService { + @Resource + private IRobotService robotService; + @Resource + private ProMemberDao proMemberDao; + @Resource + private SysOperationDao sysOperationDao; + @Resource + private SysOperationMessageMapper sysOperationMessageMapper; + @Resource + private SysMessageSendDao sysMessageSendDao; + @Resource + private SysAuthDao sysAuthDao; + @Resource + private IUserService userService; + + @Resource + private AmqpTemplate rabbitTemplate; + @Resource + private Snowflake snowflake; +// @Resource +// private PlatformTransactionManager transactionManager; + + @Override + public void sendProjectMessage(OperateType operateType, MessageVo.Inform inform, WxTemplateMessage wxMessage) throws JsonProcessingException { + log.info("发送消息请求参数:类型:{},消息:{}", operateType, inform); + if (operateType == null || inform == null) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + // 模板 + List newMessages = getMessages(operateType, inform); + log.info("模板:{}", newMessages); + // 查询项目内所有成员ID + List userIds = proMemberDao.queryUserIdsByProjectId(inform.getProjectId()); + if (CollectionUtil.isEmpty(userIds)) { + log.info("项目{}下没有用户,未发送消息", inform.getProjectId()); + return; + } + //保存消息记录 + Long operationId = initMessage(operateType, inform, newMessages); + + //查询关注公众号的用户 + List oauths = sysAuthDao.queryOauth2WX(userIds); + + List openids = new ArrayList<>(); + List oauthUserIds = new ArrayList<>(); + oauths.forEach(oauth2WX -> { + openids.add(oauth2WX.getOpenid()); + oauthUserIds.add(oauth2WX.getUserId()); + }); + //mq-->ws + // 操作发送 + initMessageSend(userIds, oauthUserIds, operationId); + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(InMessage.transTos(userIds)); + inMessage.setData(JSONObject.toJSONString(newMessages)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, JSONObject.toJSONString(inMessage)); + log.info("mq通知消息:{}", inMessage); + +// com.ccsens.tall.bean.dto.message.ProjectMessageDto dto = new com.ccsens.tall.bean.dto.message.ProjectMessageDto(); +// dto.setReceivers(BaseMessageDto.MessageUser.userIdToUsers(userIds)); +// List messages = JSONObject.parseArray(JSONObject.toJSONString(newMessages), com.ccsens.tall.bean.dto.message.ProjectMessageDto.Message.class); +// dto.getData().setMessages(messages); +// rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, +// JacksonUtil.beanToJson(dto)); + //更新ws消息发送成功 + updateStatus(operationId, WebConstant.Message.SEND_WS); + + //TODO 公众号通知消息 + if (CollectionUtil.isEmpty(openids)) { + log.info("项目{}下没有关注公众号的用户,未发送公众号关注", inform.getProjectId()); + return; + } + String template = getTemplate(newMessages); + openids.forEach(openid -> { + WxTemplateMessage wxTemplateMessage = new WxTemplateMessage(); + BeanUtils.copyProperties(wxMessage, wxTemplateMessage); + wxTemplateMessage.setTouser(openid); + wxTemplateMessage.getData().setRemark(new WxTemplateMessage.TemplateSettings(template)); + String result = RestTemplateUtil.postBody(WebConstant.Wx.TEMPLATE_SEND, wxTemplateMessage); + log.info("发送模板返回结果:{}", result); +// JsonResponse response = JSONObject.parseObject(result, JsonResponse.class); + + JsonResponse response = null; + try { + response = JacksonUtil.xmlToBean(result, JsonResponse.class); + } catch (IOException e) { + e.printStackTrace(); + } + if (response.getCode().intValue() != CodeEnum.SUCCESS.getCode().intValue()) { + //TODO 报警 + log.error("公众号通知失败{}", result); + } + }); + //更新ws消息发送成功 + updateStatus(operationId, WebConstant.Message.SEND_WX_OFFICIAL); + + } + + /** + * 获取模板 + * @param newMessages + * @return + */ + private String getTemplate(List newMessages) { + StringBuilder builder = new StringBuilder(); + newMessages.forEach(message -> { + builder.append(message.getContent()); + }); + return builder.toString(); + } + + /** + * 更新记录为发送成功 + * @param operationId + * @param sendType + */ + private void updateStatus(Long operationId, byte sendType) { + SysMessageSend send = new SysMessageSend(); + send.setComplete(WebConstant.Message.SEND_SUCCESS); + SysMessageSendExample sendExample = new SysMessageSendExample(); + sendExample.createCriteria().andOperationIdEqualTo(operationId).andSendTypeEqualTo(sendType).andRecStatusEqualTo(WebConstant.REC_STATUS.Normal.value); + sysMessageSendDao.updateByExampleSelective(send, sendExample); + log.info("修改操作:{}的发送类型:{}为发送成功", operationId, sendType); + } + + /** + * 保存操作记录 + * @param operateType + * @param inform + * @param messages + * @return + */ + private Long initMessage(OperateType operateType, MessageVo.Inform inform, List messages) { + // 操作日志 + SysOperation operation = new SysOperation(); + operation.setId(snowflake.nextId()); + operation.setProjectId(inform.getProjectId()); + operation.setOperatorId(inform.getOperatorId()); + operation.setOperateType((byte)operateType.value()); + log.info("保存操作记录:{}", operation); + sysOperationDao.insertSelective(operation); + // 操作内容 + if(CollectionUtil.isNotEmpty(messages)) { + for (int i = 0; i < messages.size(); i++) { + MessageVo.Message message = messages.get(i); + SysOperationMessage operationMessage = new SysOperationMessage(); + operationMessage.setId(snowflake.nextId()); + operationMessage.setOperationId(operation.getId()); + operationMessage.setContent(message.getContent()); + operationMessage.setType(message.getType()); + operationMessage.setSettings(message.getSettings()); + operationMessage.setSort((byte)i); + log.info("第{}个消息内容:{}", i, operationMessage); + sysOperationMessageMapper.insertSelective(operationMessage); + } + } + + return operation.getId(); + } + + /** + * 保存消息通知了谁 + * @param userIds + * @param wxUserIds + * @param operationId + */ + private void initMessageSend(List userIds, List wxUserIds, Long operationId) { + + // 封装发送消息记录 + List sends = new ArrayList<>(); + appendSends(sends, userIds, WebConstant.Message.SEND_WS, operationId); + appendSends(sends, wxUserIds, WebConstant.Message.SEND_WX_OFFICIAL, operationId); + if (CollectionUtil.isEmpty(sends)) { + return; + } + int length = userIds.size(); +// TransactionStatus transactionStatus = TransactionUtil.getTransactionStatus(transactionManager); + // 设置手动事务提交 +// try { + for (int i = 0; i < length ; i++) { + SysMessageSend send = sends.get(i); + sysMessageSendDao.insertSelective(send); + log.info("消息发送:{}", send); + // 判断是否需要提交事务,并开启新事务 +// boolean needCommit = (i > 0 && (i+1)%100==0) || i >= length - 1; +// if (needCommit) { +// transactionManager.commit(transactionStatus); +// if (i sends, List userIds, Byte type, Long operationId) { + if (CollectionUtil.isEmpty(userIds)) { + return; + } + userIds.forEach(userId -> { + SysMessageSend send = new SysMessageSend(); + send.setId(snowflake.nextId()); + send.setOperationId(operationId); + send.setReceiverId(userId); + send.setSendType(type); + sends.add(send); + }); + + } + + /** + * 获取消息(模板和内容) + * @param operateType + * @param inform + * @return + */ + private List getMessages(OperateType operateType, MessageVo.Inform inform) { + String template = robotService.getRobotTemplate(operateType.value()); + // 解析模板 + List oldMessages = inform.getMessages(); + List newMessages = new ArrayList<>(); + int lastIndex = oldMessages.size() - 1; + //文本替换参数 + modifyTemplate(template, oldMessages, newMessages, lastIndex); + + return newMessages; + } + + /** + * 将模板中的参数替换成对应的值,如果参数类型不是文本类型,需要将模板在参数位置分成三部分 + * 递归 + * @param template + * @param oldMessages + * @param newMessages + * @param lastIndex + */ + private void modifyTemplate(String template, List oldMessages, List newMessages, int lastIndex) { + for (int i = 0; i <= lastIndex; i++) { + MessageVo.Message msg = oldMessages.get(i); + if (msg.getType().byteValue() == WebConstant.Message.TYPE_TEXT) { + template=template.replace(msg.getName(), msg.getContent()); + } else { + // 若非文本类,将前面的 + int index = template.indexOf(msg.getName()); + if (index < 0) { + continue; + } + if (index > 0) { + String text = template.substring(0, index); + if (text.contains("{{")) { + modifyTemplate(text, oldMessages, newMessages, lastIndex); + } else { + newMessages.add(new MessageVo.Message(text)); + } + } + newMessages.add(msg); + template = template.substring(index + msg.getName().length()); + } + + } + if (StrUtil.isNotBlank(template)) { + newMessages.add(new MessageVo.Message(template)); + } + } + + @Override + public ProjectMessageVo.UnreadNum queryUnreadNum(Byte sendType, Long userId) { + return sysOperationDao.queryUnreadNum(sendType, userId); + } + + @Override + public PageInfo queryMsg(ProjectMessageDto.Query param, Long userId) { + PageHelper.startPage(param.getPageNum(), param.getPageSize()); + List list = sysOperationDao.queryMsg(param, userId); + return new PageInfo<>(list); + } + + @Override + public CodeEnum markRead(ProjectMessageDto.MarkRead param, Long userId) { + SysMessageSend send = sysMessageSendDao.selectByPrimaryKey(param.getId()); + log.info("消息发送:{}", send); + if (send == null) { + return CodeEnum.PARAM_ERROR; + } + // 标记已读+初始阅读为真 + sysMessageSendDao.markInitRead(param.getId()); + // 标记同一消息+同一接收人的不同发送方式为已读 + sysMessageSendDao.markOtherSendRead(send.getOperationId(), userId); + return CodeEnum.SUCCESS; + } + + @Override + public CodeEnum markAllRead(ProjectMessageDto.MarkAllRead param, Long userId) { + + // 标记用户该方式的消息为已读+初始阅读 + sysMessageSendDao.markInitReadBySendType(param.getSendType(), userId); + // 标记用户的其他未读消息为已读 + sysMessageSendDao.markAllRead(userId); + return CodeEnum.SUCCESS; + } + + @Override + public PageInfo queryProjectMsg(ProjectMessageDto.ProjectMsg param, Long userId) { + PageHelper.startPage(param.getPageNum(), param.getPageSize()); + List list = sysOperationDao.queryProjectMsg(param); + return new PageInfo<>(list); + } + + @Override + public void sendRemindByWx(TaskVo.RemindTask taskRemind, String content) throws Exception { + //查询角色下的所有人员的userId + List userIds = userService.selectUserIdByRoleId(taskRemind.getExecutorRole()); + //查询关注公众号的用户 + List oauths = sysAuthDao.queryOauth2WX(userIds); + List openids = new ArrayList<>(); + oauths.forEach(oauth2WX -> { + openids.add(oauth2WX.getOpenid()); + }); + openids.forEach(openid -> { + String url = String.format(WechatUtil.PROJECT_URL, taskRemind.getProjectId()); + WxTemplateMessage.MiniProgram miniProgram = new WxTemplateMessage.MiniProgram(WechatUtil.appid,url); + + WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); + data.setFirst(new WxTemplateMessage.TemplateSettings("任务提醒")); + data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskRemind.getTaskName())); + data.setKeyword2(new WxTemplateMessage.TemplateSettings("提醒")); + + WxTemplateMessage wxTemplateMessage = new WxTemplateMessage(); + wxTemplateMessage.setTouser(openid); + wxTemplateMessage.setMiniprogram(miniProgram); + wxTemplateMessage.setTemplate_id(WxGzhUtil.Template.TASK_PROGRESS.templateId); + wxTemplateMessage.setData(data); + wxTemplateMessage.getData().setRemark(new WxTemplateMessage.TemplateSettings(content)); + + String result = RestTemplateUtil.postBody(WebConstant.Wx.TEMPLATE_SEND, wxTemplateMessage); + log.info("发送模板返回结果:{}", result); + + JsonResponse response = null; + try { + response = JacksonUtil.xmlToBean(result, JsonResponse.class); + } catch (IOException e) { + e.printStackTrace(); + } + if (response.getCode().intValue() != CodeEnum.SUCCESS.getCode().intValue()) { + //TODO 报警 + log.error("公众号通知失败{}", result); + } + }); + } +} diff --git a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java index ffd2ee70..0a51842a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java @@ -5,11 +5,13 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.MemberRoleDto; import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.po.*; -import com.ccsens.tall.bean.vo.DomainVo; +import com.ccsens.tall.bean.vo.LabelVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.persist.dao.*; +import com.ccsens.tall.persist.mapper.SysImitationMapper; import com.ccsens.util.CodeEnum; import com.ccsens.util.DateUtil; import com.ccsens.util.WebConstant; @@ -17,12 +19,13 @@ import com.ccsens.util.cron.CronConstant; import com.ccsens.util.cron.NatureToDate; import com.ccsens.util.exception.BaseException; import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.text.SimpleDateFormat; import java.util.*; @@ -30,30 +33,51 @@ import java.util.*; @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ProjectService implements IProjectService { - @Autowired + @Resource private SysProjectDao sysProjectDao; - @Autowired + @Resource private ProShowDao proShowDao; - @Autowired + @Resource private ProRoleExcludeDao roleExcludeDao; - @Autowired + @Resource private ProRoleDao proRoleDao; - @Autowired + @Resource + private ProMemberDao proMemberDao; + @Resource + private ProMemberRoleDao memberRoleDao; + @Resource private TaskDetailDao taskDetailDao; - @Autowired + @Resource private TaskSubTimeDao taskSubTimeDao; - @Autowired + @Resource private UserAttentionDao attentionDao; - @Autowired + @Resource private TaskPluginDao pluginDao; - @Autowired + @Resource private TaskDeliverDao taskDeliverDao; - @Autowired + @Resource private IProRoleService proRoleService; - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private SysDomainDao sysDomainDao; + @Resource + private SysLabelDao sysLabelDao; + @Resource + private SysRingMsgDao sysRingMsgDao; + @Resource + private IWpsService wpsService; + @Resource + private ProTaskShowDao proTaskShowDao; + @Resource + private SysImitationMapper imitationMapper; + @Resource + private UserAttentionDao userAttentionDao; + @Resource + private SysUserDao sysUserDao; + @Resource + private SysAuthDao sysAuthDao; + @Override public void saveProject(SysProject sysProject) { @@ -67,13 +91,12 @@ public class ProjectService implements IProjectService { /** * 根据名字查找此用户创建的项目 - * - * @param subProject - * @param currentUserId - * @return + * @param subProject 项目名 + * @param currentUserId userId + * @return 项目信息 */ @Override - public SysProject selectByNameAndUserId(String subProject, Long currentUserId) throws Exception { + public SysProject selectByNameAndUserId(String subProject, Long currentUserId) { SysProject project = new SysProject(); SysProjectExample projectExample = new SysProjectExample(); projectExample.createCriteria().andCreatorIdEqualTo(currentUserId).andNameEqualTo(subProject); @@ -86,16 +109,15 @@ public class ProjectService implements IProjectService { /** * 查找本月哪一天有项目 - * - * @param currentUserId - * @param date - * @return + * @param currentUserId userId + * @param date 日期 + * @return 返回有项目的日期 */ @Override public List haveProjectDay(Long currentUserId, String date) throws Exception { List dateList = new ArrayList<>(); //获取日期的开始结束时间 - Map timeMap = new HashMap<>(); + Map timeMap; timeMap = DateUtil.projectFormatDateTime(date); Long startMillisTime = timeMap.get("startMillisTime"); Long endMillisTime = timeMap.get("endMillisTime"); @@ -105,13 +127,13 @@ public class ProjectService implements IProjectService { for (SysProject sysProject : projectList) { startMillisTime = sysProject.getBeginTime() > startMillisTime ? sysProject.getBeginTime() : startMillisTime; endMillisTime = sysProject.getEndTime() < endMillisTime ? sysProject.getEndTime() : endMillisTime; - dateList = getTimeList(dateList, startMillisTime, endMillisTime); + getTimeList(dateList, startMillisTime, endMillisTime); } } return dateList; } - private List getTimeList(List dateList, Long startTime, Long endTime) { + private void getTimeList(List dateList, Long startTime, Long endTime) { SimpleDateFormat sdf = new SimpleDateFormat("dd"); Date s = new Date(startTime); Date e = new Date(endTime); @@ -120,44 +142,105 @@ public class ProjectService implements IProjectService { Calendar max = Calendar.getInstance(); min.setTime(s); max.setTime(e); - Calendar curr = min; - while (curr.before(max)) { - for (String str : dateList) { - if (!sdf.format(min.getTime()).equalsIgnoreCase(str)) { - dateList.add(sdf.format(min.getTime())); - } + while (min.before(max)) { +// for (String str : dateList) { +// if (!sdf.format(min.getTime()).equalsIgnoreCase(str)) { + if(!dateList.contains(sdf.format(min.getTime()))) { + dateList.add(sdf.format(min.getTime())); } - curr.add(Calendar.DATE, 1); +// } +// } + min.add(Calendar.DATE, 1); } - return dateList; } /** * 根据用户和日期查找项目 * - * @param currentUserId - * @param date - * @return - * @throws Exception + * @param currentUserId userId + * @param date 日期 + * @return 返回查到的所有项目信息 + * @throws Exception 分解日期时抛错 */ @Override - public List getProjectInfo(Long currentUserId, String date) throws Exception { - List projectInfoList = new ArrayList<>(); + public List getProjectInfo(Long currentUserId, String date,Integer orderType,Integer order,String token) throws Exception { //获取日期的开始结束时间 - Map timeMap = new HashMap<>(); + Map timeMap; timeMap = DateUtil.projectFormatDateTime(date); Long startMillisTime = timeMap.get("startMillisTime"); Long endMillisTime = timeMap.get("endMillisTime") + 1; //查找此用户关注的项目 - List projectList = sysProjectDao.findProjectIdByUserId(currentUserId, startMillisTime, endMillisTime); - projectInfoList = projectInfoByProject(projectList, currentUserId); + List projectInfoList = sysProjectDao.findProjectIdByUserId01(currentUserId, startMillisTime, endMillisTime,orderType,order); + projectByProject(projectInfoList,currentUserId,token); return projectInfoList; } + private void projectByProject(List projectInfoList, Long currentUserId,String token){ + if (CollectionUtil.isNotEmpty(projectInfoList)) { + projectInfoList.forEach(projectInfo -> { + //是否是创建者 + if (projectInfo.isCreator()) { + projectInfo.getRoles().add(WebConstant.ROLE_NAME.Creator.phase); + } + //本用户在项目中的角色 + List proRoles = proRoleService.getProRoleByProjectIdAndUserId(projectInfo.getId(), currentUserId); + if (CollectionUtil.isNotEmpty(proRoles)) { + for (ProRole proRole : proRoles) { + projectInfo.getRoles().add(proRole.getDescription()); + } + } + if (CollectionUtil.isEmpty(projectInfo.getRoles())) { + projectInfo.getRoles().add(WebConstant.ROLE_NAME.Attention.phase); + } + //用户在项目中的最高权限 + int power = proRoleService.selectPowerByRoleName(currentUserId, projectInfo.getId()); + projectInfo.setPower(power); + //获取项目配置 + ProShowExample proShowExample = new ProShowExample(); + proShowExample.createCriteria().andProjectIdEqualTo(projectInfo.getId()); + List proShowList = proShowDao.selectByExample(proShowExample); + if (CollectionUtil.isNotEmpty(proShowList)) { + ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); + projectConfig.setSlide(proShowList.get(0).getSlide()); + projectConfig.setCreateTask(proShowList.get(0).getCreateTask()); + projectConfig.setFilter(proShowList.get(0).getFilter()); + projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp()); + projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType()); + projectConfig.setDetailPath(proShowList.get(0).getDetailPath()); + projectConfig.setPimsNavType(proShowList.get(0).getPimsNavType()); + projectInfo.setProjectConfig(projectConfig); + } else { + ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); + projectInfo.setProjectConfig(projectConfig); + } + //查找项目未处理的消息数量 + ProjectVo.ProjectUnreadMsg unreadMsg = getUnreadMsgByProject(currentUserId,projectInfo.getId()); + projectInfo.setProjectUnreadMsg(unreadMsg); + //获取wps文件路径 + projectInfo.setWpsFilePaths(wpsService.queryVisitUrls(projectInfo.getId(), (byte) 0,token, null)); + }); + } + } + + private ProjectVo.ProjectUnreadMsg getUnreadMsgByProject(Long userId,Long projectId) { + //获取ring消息未读数量 + Integer ringUnread = sysRingMsgDao.getRingUnreadNum(userId,projectId); + ProjectVo.ProjectUnreadMsg unreadMsg = new ProjectVo.ProjectUnreadMsg(); + if(ObjectUtil.isNotNull(ringUnread)){ + unreadMsg.setRingNum(ringUnread); + }else { + unreadMsg.setRingNum(0); + } + //TODO 获取check未读消息 + unreadMsg.setCheckNum(0); + //TODO 获取未读交付物的消息 + unreadMsg.setDeliverNum(0); + return unreadMsg; + } private List projectInfoByProject(List projectList, Long currentUserId) { List projectInfoList = new ArrayList<>(); if (CollectionUtil.isNotEmpty(projectList)) { - ProjectVo.ProjectInfo projectInfo = null; + ProjectVo.ProjectInfo projectInfo; for (SysProject project : projectList) { projectInfo = new ProjectVo.ProjectInfo(); BeanUtil.copyProperties(project, projectInfo); @@ -192,6 +275,8 @@ public class ProjectService implements IProjectService { projectConfig.setFilter(proShowList.get(0).getFilter()); projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp()); projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType()); + projectConfig.setDetailPath(proShowList.get(0).getDetailPath()); + projectConfig.setPimsNavType(proShowList.get(0).getPimsNavType()); projectInfo.setProjectConfig(projectConfig); } else { ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); @@ -200,7 +285,11 @@ public class ProjectService implements IProjectService { projectConfig.setCreateTask(1); projectInfo.setProjectConfig(projectConfig); } - + //获取项目下的标签信息 + List labelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId()); + if(CollectionUtil.isNotEmpty(labelList)){ + projectInfo.setLabelList(labelList); + } projectInfoList.add(projectInfo); } } @@ -211,12 +300,15 @@ public class ProjectService implements IProjectService { * 通过项目id查询项目 * * @param userId 用户id - * @param projectId - * @return + * @param projectId 项目id + * @return 返回项目信息 */ @Override - public ProjectVo.ProjectInfo getProjectInfoById(Long userId, Long projectId) { + public ProjectVo.ProjectInfo getProjectInfoById(Long userId, Long projectId,String token) { SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); + if(ObjectUtil.isNull(sysProject)){ + throw new BaseException(CodeEnum.NOT_PROJECT); + } ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); BeanUtil.copyProperties(sysProject, projectInfo); projectInfo.setCreator(false); @@ -250,22 +342,26 @@ public class ProjectService implements IProjectService { projectConfig.setCreateTask(proShowList.get(0).getCreateTask()); projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp()); projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType()); + projectConfig.setDetailPath(proShowList.get(0).getDetailPath()); + projectConfig.setPimsNavType(proShowList.get(0).getPimsNavType()); projectInfo.setProjectConfig(projectConfig); } else { ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); - projectConfig.setSlide(0); - projectConfig.setFilter(0); - projectConfig.setCreateTask(1); projectInfo.setProjectConfig(projectConfig); } - + //获取项目下的标签信息 + List labelList = sysLabelDao.selectLabelByProjectId(userId,projectId); + if(CollectionUtil.isNotEmpty(labelList)){ + projectInfo.setLabelList(labelList); + } + //获取wps文件路径 + projectInfo.setWpsFilePaths(wpsService.queryVisitUrls(projectInfo.getId(), (byte) 0,token,null)); return projectInfo; } /** * 根据类型查项目 项目类型 0普通项目 1模板项目 2常驻项目 - * - * @return + * @return 返回项目信息 */ @Override public List getTemplate() { @@ -274,7 +370,6 @@ public class ProjectService implements IProjectService { PageHelper.startPage(1, 4); List templateProject = sysProjectDao.selectByTemplateStatus(1); - PageHelper.startPage(1, 2); List commonProject = sysProjectDao.selectByTemplateStatus(0); // PageInfo pageInfo =new PageInfo<>(project); @@ -295,8 +390,8 @@ public class ProjectService implements IProjectService { if (CollectionUtil.isNotEmpty(domainList)) { SysDomain sysDomain = domainList.get(0); String[] projectIds = sysDomain.getForeverProjectId().split(","); - for(int i = 0; i < projectIds.length; i++){ - SysProject project = sysProjectDao.selectByPrimaryKey(Long.valueOf(projectIds[i])); + for (String projectId : projectIds) { + SysProject project = sysProjectDao.selectByPrimaryKey(Long.valueOf(projectId)); ProjectVo.TemplateStatus templateStatus = new ProjectVo.TemplateStatus(); templateStatus.setId(project.getId()); templateStatus.setName(project.getName()); @@ -321,12 +416,12 @@ public class ProjectService implements IProjectService { @Override public ProjectVo.ProjectAllDetailed getProjectList(Long currentUserId, Integer page, Integer pageSize, String key, String start, String end, String role) throws Exception { ProjectVo.ProjectAllDetailed projectAllDetailed = new ProjectVo.ProjectAllDetailed(); - List projectInfoList = new ArrayList<>(); + List projectInfoList; //获取日期的开始结束时间 Long startMillisTime = null; Long endMillisTime = null; - Map timeMap = null; + Map timeMap; if (StrUtil.isNotEmpty(start)) { timeMap = DateUtil.projectFormatDateTime(start); startMillisTime = timeMap.get("startMillisTime"); @@ -338,6 +433,7 @@ public class ProjectService implements IProjectService { List projectList = sysProjectDao.findProjectIdByUserId(currentUserId, startMillisTime, endMillisTime); // List projectList = attentionService.findProjectIdByUserId(currentUserId); projectInfoList = projectInfoByProject(projectList, currentUserId); + //关键字模糊查询和是否创建者 if (CollectionUtil.isNotEmpty(projectInfoList) && StrUtil.isNotEmpty(key)) { Iterator it = projectInfoList.iterator(); @@ -396,7 +492,7 @@ public class ProjectService implements IProjectService { * 通过名字模糊查询项目 */ @Override - public List getProjectByKey(Long currentUserId, String key) throws Exception { + public List getProjectByKey(Long currentUserId, String key) { return sysProjectDao.getProjectByKey(currentUserId, key); } @@ -451,15 +547,17 @@ public class ProjectService implements IProjectService { * 复制项目 */ @Override - public ProjectVo.ProjectInfo copyProject(Long userId, ProjectDto.ProjectIdDto projectDto) { - ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); + public ProjectVo.ProjectInfo copyProject(Long userId, ProjectDto.ProjectIdDto projectDto,String token) { +// ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); SysProject oldProject = sysProjectDao.selectByPrimaryKey(projectDto.getProjectId()); SysProject newProject = new SysProject(); if (ObjectUtil.isNotNull(oldProject)) { + BeanUtil.copyProperties(oldProject, newProject); newProject.setId(snowflake.nextId()); newProject.setCreatorId(userId); + newProject.setTemplate((byte) 0); saveProject(newProject); //该用户关注新项目 UserAttention userAttention = new UserAttention(); @@ -469,12 +567,13 @@ public class ProjectService implements IProjectService { attentionDao.insertSelective(userAttention); //添加角色 copyRole(oldProject.getId(), newProject.getId()); + //复制项目配置信息 + copyProjectConfig(oldProject.getId(), newProject.getId()); } else { throw new BaseException(CodeEnum.NOT_PROJECT); } //返回参数 - projectInfo = getProjectInfoById(userId, newProject.getId()); -// projectInfo.setId(newProject.getId()); + // projectInfo.setId(newProject.getId()); // projectInfo.setName(newProject.getName()); // projectInfo.setAddress(newProject.getAddress()); // projectInfo.setBeginTime(newProject.getBeginTime()); @@ -484,7 +583,27 @@ public class ProjectService implements IProjectService { // projectInfo.setCreator(true); // } - return projectInfo; + return getProjectInfoById(userId, newProject.getId(),token); + } + + /** + * 复制项目配置信息 + * @param oldId 被复制的项目的id + * @param newId 新建的项目的id + */ + private void copyProjectConfig(Long oldId, Long newId) { + ProShowExample showExample = new ProShowExample(); + showExample.createCriteria().andProjectIdEqualTo(oldId); + List shows = proShowDao.selectByExample(showExample); + if(CollectionUtil.isNotEmpty(shows)){ + shows.forEach(show -> { + ProShow newShow = new ProShow(); + BeanUtil.copyProperties(show,newShow); + newShow.setId(snowflake.nextId()); + newShow.setProjectId(newId); + proShowDao.insertSelective(newShow); + }); + } } /** @@ -535,6 +654,7 @@ public class ProjectService implements IProjectService { if (CollectionUtil.isNotEmpty(roleExecludeList)) { for (ProRoleExclude roleExeclude : roleExecludeList) { ProRoleExclude newRoleExeclude = new ProRoleExclude(); + newRoleExeclude.setId(snowflake.nextId()); newRoleExeclude.setRoleId(newRoleMap.get(oldRoleMap.get(roleExeclude.getRoleId()))); newRoleExeclude.setOtherRoleId(newRoleMap.get(oldRoleMap.get(roleExeclude.getRoleId()))); roleExcludeDao.insertSelective(newRoleExeclude); @@ -602,13 +722,38 @@ public class ProjectService implements IProjectService { } } copyPluginAndDeliver(oldDetail.getId(), newDetail.getId(), oldRoleMap, newRoleMap); + copyTaskConfig(oldDetail.getId(),newDetail.getId(),oldProjectId,newProjectId); } } copyPluginAndDeliver(oldDetail.getId(), newDetail.getId(), oldRoleMap, newRoleMap); + copyTaskConfig(oldDetail.getId(),newDetail.getId(),oldProjectId,newProjectId); } } } + /** + * 复制任务配置信息 + * @param oldDetailId 旧任务id + * @param newDetailId 新任务id + * @param oldProjectId 旧项目id + * @param newProjectId 新项目id + */ + private void copyTaskConfig(Long oldDetailId, Long newDetailId, Long oldProjectId, Long newProjectId) { + ProTaskShowExample taskShowExample = new ProTaskShowExample(); + taskShowExample.createCriteria().andTaskDetailIdEqualTo(oldDetailId).andProjectIdEqualTo(oldProjectId); + List taskShowList = proTaskShowDao.selectByExample(taskShowExample); + if(CollectionUtil.isNotEmpty(taskShowList)){ + taskShowList.forEach(taskShow -> { + ProTaskShow newTaskShow = new ProTaskShow(); + BeanUtil.copyProperties(taskShow,newTaskShow); + newTaskShow.setId(snowflake.nextId()); + newTaskShow.setProjectId(newProjectId); + newTaskShow.setTaskDetailId(newDetailId); + proTaskShowDao.insertSelective(newTaskShow); + }); + } + } + /** * 根据时间分解任务 */ @@ -680,7 +825,7 @@ public class ProjectService implements IProjectService { * 修改项目信息 */ @Override - public ProjectVo.ProjectInfo changeProjectInfo(Long currentUserId, ProjectDto.ProjectInfoDto projectInfoDto) { + public ProjectVo.ProjectInfo changeProjectInfo(Long currentUserId, ProjectDto.ProjectInfoDto projectInfoDto,String token) { //查找项目 SysProject project = sysProjectDao.selectByPrimaryKey(projectInfoDto.getId()); if (ObjectUtil.isNotNull(project)) { @@ -702,13 +847,247 @@ public class ProjectService implements IProjectService { if (StrUtil.isNotEmpty(projectInfoDto.getAddress())) { project.setAddress(projectInfoDto.getAddress()); } + // TODO 修改项目时间后,重复任务需要跟着改变 + // 修改项目时间 + if(ObjectUtil.isNotNull(projectInfoDto.getBeginTime())){ + project.setBeginTime(projectInfoDto.getBeginTime()); + } + if(ObjectUtil.isNotNull(projectInfoDto.getEndTime())){ + project.setEndTime(projectInfoDto.getEndTime()); + } sysProjectDao.updateByPrimaryKeySelective(project); } else { throw new BaseException(CodeEnum.NOT_POWER); + } } else { throw new BaseException(CodeEnum.NOT_PROJECT); } - return getProjectInfoById(currentUserId, project.getId()); + return getProjectInfoById(currentUserId, project.getId(),token); + } + + /** + * 根据标签查找项目 + * @param currentUserId userId + * @param labelName 标签名 + * @return 返回根据标签查找出的所有项目 + */ + @Override + public ProjectVo.ProjectAllDetailed selectByLabelName(Long currentUserId, String labelName,Integer pageSize ,Integer page,String token) { +// List projectInfoList = sysProjectDao.selectByLabelName(currentUserId,labelName); +// projectByProject(projectInfoList,currentUserId); + + PageHelper.startPage(page, pageSize); + List projectInfoList = sysProjectDao.selectByLabelName(currentUserId,labelName); + PageInfo projectInfoPage = new PageInfo<>(projectInfoList); + projectByProject(projectInfoList,currentUserId,token); + + ProjectVo.ProjectAllDetailed projectAllDetailed = new ProjectVo.ProjectAllDetailed(); + projectAllDetailed.setProjectInfoList(projectInfoList); + ProjectVo.PageInfo pageInfo = new ProjectVo.PageInfo(); + pageInfo.setTotalPage(projectInfoPage.getPages()); + pageInfo.setCurrentPage(projectInfoPage.getPageNum()); + projectAllDetailed.setPageInfo(pageInfo); + return projectAllDetailed; + } + + @Override + public List selectRelevanceProject(Long currentUserId, Long projectId) { + return sysProjectDao.selectRelevanceProject(projectId); + } + + @Override + public ProjectVo.ProjectInfo updateProjectConfig(Long currentUserId, ProjectDto.ProjectConfig projectConfig,String token) { + //检查项目id是否正确 + SysProject project = sysProjectDao.selectByPrimaryKey(projectConfig.getProjectId()); + if(ObjectUtil.isNull(project)){ + throw new BaseException(CodeEnum.NOT_PROJECT); + } + //查找项目配置 + ProShowExample proShowExample = new ProShowExample(); + proShowExample.createCriteria().andProjectIdEqualTo(projectConfig.getProjectId()); + List proShowList = proShowDao.selectByExample(proShowExample); + if(CollectionUtil.isEmpty(proShowList)){ + //没有则新加一条记录 + ProShow proShow = new ProShow(); + BeanUtil.copyProperties(projectConfig,proShow); + proShow.setId(snowflake.nextId()); + proShow.setProjectId(project.getId()); + if(ObjectUtil.isNotNull(projectConfig.getShowMvp())) { + proShow.setIsShowMvp(projectConfig.getShowMvp().byteValue()); + } + proShowDao.insertSelective(proShow); + }else { + //有则修改原来的配置信息 + ProShow proShow = proShowList.get(0); + BeanUtil.copyProperties(projectConfig,proShow); + if(ObjectUtil.isNotNull(projectConfig.getShowMvp())) { + proShow.setIsShowMvp(projectConfig.getShowMvp().byteValue()); + } + proShowDao.updateByPrimaryKeySelective(proShow); + } + return getProjectInfoById(currentUserId,projectConfig.getProjectId(),token); + } + + @Override + public void imitationRole(Long currentUserId, ProjectDto.ImitationRole imitationRole) { + log.info("用户:{}选择一个角色变身:{}",currentUserId,imitationRole); + //检查此项目是否开启变身功能且变身密码正确 + ProShowExample proShowExample = new ProShowExample(); + proShowExample.createCriteria().andProjectIdEqualTo(imitationRole.getProjectId()); + List proShowList = proShowDao.selectByExample(proShowExample); + if(CollectionUtil.isNotEmpty(proShowList)){ + if(proShowList.get(0).getShareChange() == 4){ + throw new BaseException(CodeEnum.PROJECT_IMITATION_NO); + } + if(!proShowList.get(0).getShareChangeCode().equalsIgnoreCase(imitationRole.getCode())){ + throw new BaseException(CodeEnum.PROJECT_IMITATION_CODE_ERROR); + } + } + //将该用户在此项目中以前的变身角色信息删除 + SysImitationExample sysImitationExample = new SysImitationExample(); + sysImitationExample.createCriteria().andProjectIdEqualTo(imitationRole.getProjectId()).andUserIdEqualTo(currentUserId); + List sysImitationList = imitationMapper.selectByExample(sysImitationExample); + if(CollectionUtil.isNotEmpty(sysImitationList)){ + sysImitationList.forEach(sysImitation -> { + sysImitation.setRecStatus((byte) 2); + imitationMapper.updateByPrimaryKeySelective(sysImitation); + }); + } + //新加一条变身信息 + SysImitation sysImitation = new SysImitation(); + sysImitation.setId(snowflake.nextId()); + sysImitation.setProjectId(imitationRole.getProjectId()); + sysImitation.setRoleId(imitationRole.getRoleId()); + sysImitation.setUserId(currentUserId); + imitationMapper.insertSelective(sysImitation); + } + + @Override + public ProjectVo.ProjectInfo createProject(Long currentUserId,ProjectDto.CreateProject createProject,String token) { + //查找当前账号的用户名和手机号 + String name = sysUserDao.selectByPrimaryKey(currentUserId).getNickname(); + String phone = null; + SysAuthExample sysAuthExample = new SysAuthExample(); + sysAuthExample.createCriteria().andUserIdEqualTo(currentUserId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + List sysAuthList = sysAuthDao.selectByExample(sysAuthExample); + if(CollectionUtil.isNotEmpty(sysAuthList)){ + phone = sysAuthList.get(0).getIdentifier(); + } + log.info("新建项目,操作用户id:{}",currentUserId); + //新建项目 + long beginTime = createProject.getBeginTime() == null ? System.currentTimeMillis() : createProject.getBeginTime(); + long endTime = createProject.getEndTime() == null ? beginTime + (3600 * 24 * 10 * 1000) : createProject.getEndTime(); + SysProject sysProject = new SysProject(); + sysProject.setId(snowflake.nextId()); + sysProject.setName(createProject.getName()); + sysProject.setDescription(createProject.getDescription()); + sysProject.setAddress(createProject.getAddress()); + sysProject.setBeginTime(beginTime); + sysProject.setEndTime(endTime); + sysProject.setCreatorId(currentUserId); + sysProjectDao.insertSelective(sysProject); + //让当前用户关注项目 + UserAttention userAttention = new UserAttention(); + userAttention.setId(snowflake.nextId()); + userAttention.setUserId(currentUserId); + userAttention.setProjectId(sysProject.getId()); + userAttentionDao.insertSelective(userAttention); + //添加默认的角色(奖惩干系人、创建者、关注者、项目经理、和项目成员的一级角色) + //添加奖惩干系人角色(一级角色) + ProRole stakeholderRole = new ProRole(); + stakeholderRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.value); + stakeholderRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.phase); + stakeholderRole.setProjectId(sysProject.getId()); + stakeholderRole.setId(snowflake.nextId()); + proRoleService.saveProRole(stakeholderRole); + //添加奖惩干系人角色(二级角色) + ProRole stakeholderProRole = new ProRole(); + stakeholderProRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.phase); + stakeholderProRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.value); + stakeholderProRole.setParentId(stakeholderRole.getId()); + stakeholderProRole.setProjectId(sysProject.getId()); + stakeholderProRole.setId(snowflake.nextId()); + proRoleService.saveProRole(stakeholderProRole); + //添加创建者一级角色 + ProRole creator = new ProRole(); + creator.setName(WebConstant.ROLE_NAME.Creator.value); + creator.setDescription(WebConstant.ROLE_NAME.Creator.phase); + creator.setProjectId(sysProject.getId()); + creator.setId(snowflake.nextId()); + proRoleService.saveProRole(creator); + //添加创建者角色(二级角色) + ProRole creatorRole = new ProRole(); + creatorRole.setName(WebConstant.ROLE_NAME.Creator.phase); + creatorRole.setDescription(WebConstant.ROLE_NAME.Creator.value); + creatorRole.setParentId(creator.getId()); + creatorRole.setProjectId(sysProject.getId()); + creatorRole.setId(snowflake.nextId()); + proRoleService.saveProRole(creatorRole); + + //添加关注者一级角色 + ProRole attention = new ProRole(); + attention.setName(WebConstant.ROLE_NAME.Attention.value); + attention.setDescription(WebConstant.ROLE_NAME.Attention.phase); + attention.setProjectId(sysProject.getId()); + attention.setId(snowflake.nextId()); + proRoleService.saveProRole(attention); + //添加关注者角色(二级角色) + ProRole attentionRole = new ProRole(); + attentionRole.setName(WebConstant.ROLE_NAME.Attention.phase); + attentionRole.setDescription(WebConstant.ROLE_NAME.Attention.value); + attentionRole.setParentId(attention.getId()); + attentionRole.setProjectId(sysProject.getId()); + attentionRole.setId(snowflake.nextId()); + proRoleService.saveProRole(attentionRole); + //添加项目经理一级角色 + ProRole pm = new ProRole(); + pm.setName(WebConstant.ROLE_NAME.PM.value); + pm.setDescription(WebConstant.ROLE_NAME.PM.phase); + pm.setProjectId(sysProject.getId()); + pm.setId(snowflake.nextId()); + proRoleService.saveProRole(pm); + //添加项目经理角色(二级角色) + ProRole pmRole = new ProRole(); + pmRole.setName(WebConstant.ROLE_NAME.PM.value); + pmRole.setParentId(pm.getId()); + pmRole.setProjectId(sysProject.getId()); + pmRole.setId(snowflake.nextId()); + proRoleService.saveProRole(pmRole); + //添加项目成员一级角色 + ProRole memberRole = new ProRole(); + memberRole.setName(WebConstant.ROLE_NAME.Member.value); + memberRole.setDescription(WebConstant.ROLE_NAME.Member.phase); + memberRole.setProjectId(sysProject.getId()); + memberRole.setId(snowflake.nextId()); + proRoleService.saveProRole(memberRole); + + //添加默认成员(当前用户) + ProMember proMember = new ProMember(); + proMember.setId(snowflake.nextId()); + proMember.setNickname(name); + proMember.setPhone(phone); + proMember.setUserId(currentUserId); + proMember.setProjectId(sysProject.getId()); + proMemberDao.insertSelective(proMember); + + //关联成员与项目经理 + ProMemberRole proMemberRole = new MemberRoleDto(); + proMemberRole.setId(snowflake.nextId()); + proMemberRole.setRoleId(pmRole.getId()); + proMemberRole.setMemberId(proMember.getId()); + memberRoleDao.insertSelective(proMemberRole); + //添加一个默认任务 + ProTaskDetail taskDetail = new ProTaskDetail(); + taskDetail.setId(snowflake.nextId()); + taskDetail.setProjectId(sysProject.getId()); + taskDetail.setName("一级任务"); + taskDetail.setBeginTime(sysProject.getBeginTime()); + taskDetail.setEndTime(sysProject.getEndTime()); + taskDetail.setExecutorRole(pmRole.getId()); + taskDetail.setCheckerRole(pmRole.getId()); + taskDetailDao.insertSelective(taskDetail); + + return getProjectInfoById(currentUserId,sysProject.getId(),token); } } diff --git a/tall/src/main/java/com/ccsens/tall/service/RingService.java b/tall/src/main/java/com/ccsens/tall/service/RingService.java new file mode 100644 index 00000000..7384bc81 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/RingService.java @@ -0,0 +1,317 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.tall.bean.dto.RingDto; +import com.ccsens.tall.bean.dto.message.BaseMessageDto; +import com.ccsens.tall.bean.dto.message.RingMessageWithReadDto; +import com.ccsens.tall.bean.dto.message.RingMessageWithSendDto; +import com.ccsens.tall.bean.po.SysRingMsg; +import com.ccsens.tall.bean.po.SysRingSend; +import com.ccsens.tall.bean.po.SysRingSendExample; +import com.ccsens.tall.bean.po.SysUser; +import com.ccsens.tall.bean.vo.RingVo; +import com.ccsens.tall.persist.dao.SysRingMsgDao; +import com.ccsens.tall.persist.dao.SysRingSendDao; +import com.ccsens.tall.persist.dao.SysUserDao; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.JacksonUtil; +import com.ccsens.util.PropUtil; +import com.ccsens.util.bean.message.common.InMessage; +import com.ccsens.util.bean.message.common.MessageConstant; +import com.ccsens.util.config.RabbitMQConfig; +import com.ccsens.util.exception.BaseException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; +import org.springframework.amqp.rabbit.core.RabbitTemplate; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.*; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class RingService implements IRingService { + @Resource + private Snowflake snowflake; + @Resource + private SysRingMsgDao sysRingMsgDao; + @Resource + private SysRingSendDao sysRingSendDao; + @Resource + private IUserService userService; + @Resource + private SysUserDao userDao; + @Resource + private RabbitTemplate rabbitTemplate; + + + /** + * 发送ring消息 + * + * @param currentUserId 当前用户userid + * @param ringSendDto 发送的消息内容 + */ + @Override + public RingVo.RingInfo sendRingMsg(Long currentUserId, RingDto.RingSendDto ringSendDto) throws Exception { + //获取当前时间 + Long time = System.currentTimeMillis(); + //将消息详情保存至数据库 + SysRingMsg ringMsg = new SysRingMsg(); + ringMsg.setId(snowflake.nextId()); + ringMsg.setProjectId(ringSendDto.getProjectId()); + ringMsg.setSenderId(currentUserId); + ringMsg.setTime(time); + ringMsg.setValueText(ringSendDto.getValue()); + if (ringSendDto.getValue().length() > 20) { + ringMsg.setValue(ringSendDto.getValue().substring(0, 20)); + } else { + ringMsg.setValue(ringSendDto.getValue()); + } + sysRingMsgDao.insertSelective(ringMsg); + //所有接收者的userId + Set userIdSet = new HashSet<>(); + //添加消息详情与接收角色的关联信息 + if (CollectionUtil.isNotEmpty(ringSendDto.getRoleList())) { + for (Long roleId : ringSendDto.getRoleList()) { + SysRingSend sysRingSend = new SysRingSend(); + sysRingSend.setId(snowflake.nextId()); + sysRingSend.setRingId(ringMsg.getId()); + sysRingSend.setRoleId(roleId); + sysRingSendDao.insertSelective(sysRingSend); + List userIdList = userService.selectUserIdByRoleId(roleId); + userIdList.forEach(id -> { + userIdSet.add(String.valueOf(id)); + }); +// userIdSet.addAll(userIdList); + } + } + + if (CollectionUtil.isNotEmpty(userIdSet)) { + //发送消息 + RingMessageWithSendDto ringMessageWithSendDto = new RingMessageWithSendDto( + ringMsg.getId(), ringSendDto.getProjectId(), ringMsg.getValue(), time); + log.info(JSONObject.toJSONString(ringMessageWithSendDto.getData())); + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(userIdSet); + inMessage.setData(JSONObject.toJSONString(ringMessageWithSendDto)); + log.info("发送的ring消息:{}",JSONObject.toJSONString(inMessage)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, JSONObject.toJSONString(inMessage)); + + } + +// List userIdList = new ArrayList<>(userIdSet); +// //发送消息 +// RingMessageWithSendDto ringMessageWithSendDto = new RingMessageWithSendDto( +// ringMsg.getId(), ringSendDto.getProjectId(), ringMsg.getValue(), time); +// ringMessageWithSendDto.setReceivers(BaseMessageDto.MessageUser.userIdToUsers(userIdList)); +// rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, +// JacksonUtil.beanToJson(ringMessageWithSendDto)); + //返回消息的详细信息 + RingVo.RingInfo ringInfo = new RingVo.RingInfo(); + ringInfo.setMessageId(ringMsg.getId()); + ringInfo.setTime(ringMsg.getTime()); + ringInfo.setValue(ringMsg.getValueText()); + ringInfo.setMine(1); + //获取发送者的信息 + RingVo.MsgSender msgSender = new RingVo.MsgSender(); + msgSender.setId(currentUserId); + msgSender.setName(userService.getUserNameByUserId(currentUserId)); + //添加发送者的头像 + if (ObjectUtil.isNotNull(ringInfo.getSender())) { + SysUser user = userDao.selectByPrimaryKey(ringInfo.getSender().getId()); + if (ObjectUtil.isNotNull(user) && StrUtil.isNotEmpty(user.getAvatarUrl())) { + msgSender.setAvatarUrl(user.getAvatarUrl()); + } else { + msgSender.setAvatarUrl(PropUtil.notGatewayUrl + "staticrec/logo.png"); + } + } + ringInfo.setSender(msgSender); + //查找未读数量 + SysRingSendExample ringSendExample = new SysRingSendExample(); + ringSendExample.createCriteria().andRingIdEqualTo(ringMsg.getId()).andReadStatusEqualTo((byte) 0); + List ringSendList = sysRingSendDao.selectByExample(ringSendExample); + if(ObjectUtil.isNotNull(ringSendList)){ + ringInfo.setUnread(ringSendList.size()); + }else { + ringInfo.setUnread(0); + } + //获取接收角色的信息 + List msgReceiveRole = sysRingMsgDao.ringReceiveRole(ringMsg.getId()); + ringInfo.setRoleList(msgReceiveRole); + return ringInfo; + } + + /** + * 查询ring消息 + * + * @param currentUserId userId + * @param getRingDto 查询条件 + * @return 时间倒叙查询最近10条信息。在返回的结果中需时间正序展示 + */ + @Override + public PageInfo getRingInfo(Long currentUserId, RingDto.GetRingDto getRingDto) { + log.info("查找第{}页,项目id:{}",getRingDto.getPage(),getRingDto.getProjectId()); + getRingDto.setPage(getRingDto.getPage() == null ? 1 : getRingDto.getPage()); + getRingDto.setPageSize(getRingDto.getPageSize() == null ? 10 : getRingDto.getPageSize()); + + PageHelper.startPage(getRingDto.getPage(), getRingDto.getPageSize()); + List ringInfoList = sysRingMsgDao.selectRingInfoByProject(currentUserId, getRingDto.getProjectId()); + if (CollectionUtil.isNotEmpty(ringInfoList)) { + ringInfoList.forEach(ringInfo -> { + //添加接收角色的信息 + List msgReceiveRole = sysRingMsgDao.ringReceiveRole(ringInfo.getMessageId()); + ringInfo.setRoleList(msgReceiveRole); + //添加发送者的头像 + if (ObjectUtil.isNotNull(ringInfo.getSender())) { + SysUser user = userDao.selectByPrimaryKey(ringInfo.getSender().getId()); + if (ObjectUtil.isNotNull(user) && StrUtil.isNotEmpty(user.getAvatarUrl())) { + ringInfo.getSender().setAvatarUrl(user.getAvatarUrl()); + } else { + ringInfo.getSender().setAvatarUrl(PropUtil.notGatewayUrl + "staticrec/logo.png"); + } + } + }); + } + + CollectionUtil.sort(ringInfoList, new Comparator() { + @Override + public int compare(RingVo.RingInfo o1, RingVo.RingInfo o2) { + return (int) (o1.getTime() - o2.getTime()); + } + }); + + return new PageInfo<>(ringInfoList); + } + + /** + * 阅读消息(将消息设为已读) + * + * @param currentUserId userId + * @param message 项目id,和消息id,可以多个。同时将多个消息设为已读 + */ + @Override + public List readRingMsg(Long currentUserId, RingDto.MessageId message) throws JsonProcessingException { + List ringInfoList = new ArrayList<>(); + //获取当前用户在项目内的角色 + List roleIdList = sysRingMsgDao.selectRoleIdByUserId(currentUserId, message.getProjectId()); + log.info("阅读者的角色:{}", roleIdList.toString()); + //将每条消息的状态设为已读 + if (CollectionUtil.isNotEmpty(roleIdList) && CollectionUtil.isNotEmpty(message.getMessageIdList())) { + for (Long msgId : message.getMessageIdList()) { + for (Long roleId : roleIdList) { + //查找消息 + SysRingMsg sysRingMsg = sysRingMsgDao.selectByPrimaryKey(msgId); + if (ObjectUtil.isNull(sysRingMsg)) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + SysRingSendExample sysRingSendExample = new SysRingSendExample(); + sysRingSendExample.createCriteria().andRingIdEqualTo(msgId).andRoleIdEqualTo(roleId); + List sysRingSendList = sysRingSendDao.selectByExample(sysRingSendExample); + if (CollectionUtil.isNotEmpty(sysRingSendList)) { + for (SysRingSend sysRingSend : sysRingSendList) { + sysRingSend.setReadStatus((byte) 1); + sysRingSend.setReadTime(System.currentTimeMillis()); + sysRingSendDao.updateByPrimaryKeySelective(sysRingSend); + } + //将已读消息返回给发送者 +// List userIdList = new ArrayList<>(); +// userIdList.add(sysRingMsg.getSenderId()); +// RingMessageWithReadDto ringMessageWithReadDto = new RingMessageWithReadDto(msgId, message.getProjectId(), roleId); +// ringMessageWithReadDto.setReceivers(BaseMessageDto.MessageUser.userIdToUsers(userIdList)); +// rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, +// JacksonUtil.beanToJson(ringMessageWithReadDto)); + + RingMessageWithReadDto ringMessageWithReadDto = new RingMessageWithReadDto(msgId, message.getProjectId(), roleId); + Set userIdSet = new HashSet<>(); + userIdSet.add(String.valueOf(sysRingMsg.getSenderId())); + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(userIdSet); + inMessage.setData(JSONObject.toJSONString(ringMessageWithReadDto.getData())); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, JSONObject.toJSONString(inMessage)); + } + } + //查询被读的信息返回 + List ringInfos = sysRingMsgDao.selectRingInfoByRingMsgId(currentUserId, message.getProjectId(), msgId); + if (CollectionUtil.isNotEmpty(ringInfos)) { + ringInfos.forEach(ringInfo -> { + //添加接收角色的信息 + List msgReceiveRole = sysRingMsgDao.ringReceiveRole(msgId); + ringInfo.setRoleList(msgReceiveRole); + //添加发送者的头像 + if (ObjectUtil.isNotNull(ringInfo.getSender())) { + SysUser user = userDao.selectByPrimaryKey(ringInfo.getSender().getId()); + if (ObjectUtil.isNotNull(user) && StrUtil.isNotEmpty(user.getAvatarUrl())) { + ringInfo.getSender().setAvatarUrl(user.getAvatarUrl()); + } else { + ringInfo.getSender().setAvatarUrl(PropUtil.notGatewayUrl + "staticrec/logo.png"); + } + } + }); + } + ringInfoList.addAll(ringInfos); + } + } + return ringInfoList; + } + + + @Override + public void readRingMsgByProjectId(Long currentUserId, Long projectId) throws Exception { + log.info("读取消息的项目id:{}", projectId); + //获取当前用户在项目内的角色 + List roleIdList = sysRingMsgDao.selectRoleIdByUserId(currentUserId, projectId); + log.info("阅读者的角色:{}", roleIdList.toString()); + if (CollectionUtil.isNotEmpty(roleIdList)) { + for (Long roleId : roleIdList) { + //查找消息 + SysRingSendExample sysRingSendExample = new SysRingSendExample(); + sysRingSendExample.createCriteria().andRoleIdEqualTo(roleId); + List sysRingSendList = sysRingSendDao.selectByExample(sysRingSendExample); + if (CollectionUtil.isNotEmpty(sysRingSendList)) { + //循环已读消息 + for (SysRingSend sysRingSend : sysRingSendList) { + if (sysRingSend.getReadStatus() != 1) { + sysRingSend.setReadStatus((byte) 1); + sysRingSend.setReadTime(System.currentTimeMillis()); + sysRingSendDao.updateByPrimaryKeySelective(sysRingSend); + //获取消息 + SysRingMsg sysRingMsg = sysRingMsgDao.selectByPrimaryKey(sysRingSend.getRingId()); + //ws消息接收者的userId +// Set userIdSet = new HashSet<>(); +// userIdSet.add(sysRingMsg.getSenderId()); +// List userIdList = new ArrayList<>(userIdSet); +// //将已读消息返回给发送者 +// RingMessageWithReadDto ringMessageWithReadDto = new RingMessageWithReadDto(sysRingMsg.getId(), projectId, roleId); +// ringMessageWithReadDto.setReceivers(BaseMessageDto.MessageUser.userIdToUsers(userIdList)); +// rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, +// JacksonUtil.beanToJson(ringMessageWithReadDto)); + + Set userIdSet = new HashSet<>(); + userIdSet.add(String.valueOf(sysRingMsg.getSenderId())); + RingMessageWithReadDto ringMessageWithReadDto = new RingMessageWithReadDto(sysRingMsg.getId(), projectId, roleId); + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(userIdSet); + inMessage.setData(JSONObject.toJSONString(ringMessageWithReadDto)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, JSONObject.toJSONString(inMessage)); + } + } + } + } + } + } +} diff --git a/tall/src/main/java/com/ccsens/tall/service/RobotService.java b/tall/src/main/java/com/ccsens/tall/service/RobotService.java index ee69ae66..a94a4cdc 100644 --- a/tall/src/main/java/com/ccsens/tall/service/RobotService.java +++ b/tall/src/main/java/com/ccsens/tall/service/RobotService.java @@ -4,12 +4,15 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.ccsens.tall.bean.po.*; +import com.ccsens.tall.bean.vo.MessageVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.dao.*; import com.ccsens.tall.util.RobotUtil; import com.ccsens.tall.util.TallConstant; +import com.ccsens.tall.util.WxTemplateUtil; import com.ccsens.util.CodeEnum; import com.ccsens.util.RedisUtil; +import com.ccsens.util.WebConstant; import com.ccsens.util.annotation.OperateType; import com.ccsens.util.exception.BaseException; import com.ccsens.util.wx.WxRobotUtil; @@ -19,6 +22,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import java.util.Arrays; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -62,11 +66,9 @@ public class RobotService implements IRobotService{ if(isSend(sysProjectRobot.getId(),operateType.value())){ String content = getRobotTemplate(operateType.value()); //获取发送参数 - StringBuilder builder = new StringBuilder(content); - String replace = "{{}}"; + final String[] builder = {content}; message.getParams().forEach(param->{ - int start = builder.indexOf(replace); - builder.replace(start, start + replace.length(),param); + builder[0] = builder[0].replace(param.getName(),param.getContent()); }); //获取机器人信息 @@ -76,20 +78,14 @@ public class RobotService implements IRobotService{ switch (sysRobot.getClientType()){ case 0://微信 try { - WxRobotUtil.sendRobotInfo(sysRobot.getWebHook(),builder,message.getMsgType(),message.getMentionedList(),message.getMentionedMobileList()); + WxRobotUtil.sendRobotInfo(sysRobot.getWebHook(), builder[0],message.getMsgType(),message.getMentionedList(),message.getMentionedMobileList()); } catch (Exception e) { e.printStackTrace(); } - //删除线程 - RobotUtil.del(); break; case 1://钉钉 - //删除线程 - RobotUtil.del(); break; default: - //删除线程 - RobotUtil.del(); } } } @@ -112,7 +108,8 @@ public class RobotService implements IRobotService{ return flag.get(); } - private String getRobotTemplate(int code){ + @Override + public String getRobotTemplate(int code){ String robotKey = TallConstant.getRobotTemplateKey(code); String template = ""; template = (String)redisUtil.get(robotKey); @@ -156,35 +153,55 @@ public class RobotService implements IRobotService{ } RobotUtil.Message message = new RobotUtil.Message(projectId); - message.appendParams(userName,projectName,isFinish,taskName); + message.appendParams( + new MessageVo.Message(WebConstant.TemplateParam.Operator.value,userName), + new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value,projectName), + new MessageVo.Message(WebConstant.TemplateParam.Operate.value,isFinish), + new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)); //获取角色内成员的手机号 String[] memberPhone = getMemberPhonesByRoleId(executorRoleId); if(memberPhone.length != 0){ message.appendMentionedMobileList(memberPhone); } - RobotUtil.set(message); + RobotUtil.setRobotMessage(message); + // 添加ws消息通知 + MessageVo.Inform inform = MessageVo.finishTask(currentUserId, userName, projectId, projectName, isFinish, taskName); + RobotUtil.setInform(inform); + // 添加wx消息通知 + RobotUtil.setWxTemplate(WxTemplateUtil.getFinishTask(projectId, userName, isFinish, taskName)); } @Override public void addTaskRobotSend(Long currentUserId, SysProject project, String taskName, Long executorId) throws Exception { + String userName = userService.getUserNameByUserId(currentUserId); + String projectName = ""; - String executorName = ""; - TaskVo.RoleCheckList role = proRoleService.selectRoleByCheckOrExecutor(executorId); - if(ObjectUtil.isNotNull(role)){ - executorName = role.getName(); - } + if(ObjectUtil.isNotNull(project)){ projectName = project.getName(); } + // 获取角色名 + TaskVo.RoleCheckList role = proRoleService.selectRoleByCheckOrExecutor(executorId); + String executorName = ObjectUtil.isNotNull(role) ? role.getName() : ""; + RobotUtil.Message message = new RobotUtil.Message(project.getId()); - message.appendParams(userName,projectName,taskName,executorName); + message.appendParams( + new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName), + new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName), + new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, taskName), + new MessageVo.Message(WebConstant.TemplateParam.Principal.value, executorName)); //获取角色内成员的手机号 String[] memberPhone = getMemberPhonesByRoleId(executorId); if(memberPhone.length != 0){ message.appendMentionedMobileList(memberPhone); } - RobotUtil.set(message); + RobotUtil.setRobotMessage(message); + // 添加消息通知 + MessageVo.Inform inform = MessageVo.addTask(currentUserId, userName, project.getId(), projectName, taskName, executorName); + RobotUtil.setInform(inform); + // 添加wx消息通知 + RobotUtil.setWxTemplate(WxTemplateUtil.getAddTask(project.getId(), userName, taskName)); } @Override @@ -196,30 +213,48 @@ public class RobotService implements IRobotService{ projectName = sysProject.getName(); } RobotUtil.Message message = new RobotUtil.Message(sysProject.getId()); - message.appendParams(userName,projectName,taskDetail.getName()); + message.appendParams( + new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName), + new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName), + new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, taskDetail.getName())); //获取角色内成员的手机号 String[] memberPhone = getMemberPhonesByRoleId(taskDetail.getExecutorRole()); if(memberPhone.length != 0){ message.appendMentionedMobileList(memberPhone); } - RobotUtil.set(message); + RobotUtil.setRobotMessage(message); + + MessageVo.Inform inform = MessageVo.deleteTask(currentUserId, userName, sysProject.getId(), projectName, taskDetail.getName()); + RobotUtil.setInform(inform); + // 添加wx消息通知 + RobotUtil.setWxTemplate(WxTemplateUtil.getDeleteTask(sysProject.getId(), userName, taskDetail.getName())); } @Override public void changeTaskRobotSend(Long currentUserId, TaskVo.NormalTask normalTask) throws Exception { String userName = userService.getUserNameByUserId(currentUserId); RobotUtil.Message message = new RobotUtil.Message(normalTask.getProjectId()); - message.appendParams(userName,normalTask.getProjectName(),normalTask.getName(),normalTask.getExecutorRoleName()); + message.appendParams( + new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName), + new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, normalTask.getProjectName()), + new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, normalTask.getName()), + new MessageVo.Message(WebConstant.TemplateParam.Principal.value, normalTask.getExecutorRoleName())); //获取角色内成员的手机号 String[] memberPhone = getMemberPhonesByRoleId(normalTask.getExecutorRole()); if(memberPhone.length != 0){ message.appendMentionedMobileList(memberPhone); } - RobotUtil.set(message); + RobotUtil.setRobotMessage(message); + + MessageVo.Inform inform = MessageVo.changeTask(currentUserId, userName, normalTask.getProjectId(), normalTask.getProjectName(), normalTask.getName(), normalTask.getExecutorRoleName()); + RobotUtil.setInform(inform); + // 添加wx消息通知 + RobotUtil.setWxTemplate(WxTemplateUtil.getChangeTask(normalTask.getProjectId(), userName, normalTask.getName())); } + @Override - public void addDeliverRobotSend(Long currentUserId, String deliverName, Long subTimeId) throws Exception { + public void addDeliverRobotSend(Long currentUserId, String deliverName, Long subTimeId,SysProject project) throws Exception { String userName = userService.getUserNameByUserId(currentUserId); String projectName = ""; ProTaskSubTime proTaskSubTime = taskSubTimeDao.selectByPrimaryKey(subTimeId); @@ -230,19 +265,29 @@ public class RobotService implements IRobotService{ if(ObjectUtil.isNull(taskDetail)){ throw new BaseException(CodeEnum.NOT_TASK); } - SysProject project = sysProjectDao.selectByPrimaryKey(taskDetail.getProjectId()); + if(ObjectUtil.isNotNull(project)){ projectName = project.getName(); } //生成消息 RobotUtil.Message message = new RobotUtil.Message(project.getId()); - message.appendParams(userName,projectName,taskDetail.getName(),deliverName); + message.appendParams( + new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName), + new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName), + new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, taskDetail.getName()), + new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName)); //获取角色内成员的手机号 String[] memberPhone = getMemberPhonesByRoleId(taskDetail.getExecutorRole()); if(memberPhone.length != 0){ message.appendMentionedMobileList(memberPhone); } - RobotUtil.set(message); + RobotUtil.setRobotMessage(message); + // 添加消息通知 + MessageVo.Inform inform = MessageVo.addDeliver(currentUserId, userName, taskDetail.getProjectId(), projectName, taskDetail.getName(),deliverName); + RobotUtil.setInform(inform); + // 添加wx消息通知 + RobotUtil.setWxTemplate(WxTemplateUtil.getAddDeliver(taskDetail.getProjectId(), userName, deliverName)); + } @Override @@ -263,13 +308,22 @@ public class RobotService implements IRobotService{ } //生成消息 RobotUtil.Message message = new RobotUtil.Message(project.getId()); - message.appendParams(userName,projectName,taskDetail.getName(),deliverName); + message.appendParams( + new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName), + new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName), + new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, taskDetail.getName()), + new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName)); //获取角色内成员的手机号 String[] memberPhone = getMemberPhonesByRoleId(taskDetail.getExecutorRole()); if(memberPhone.length != 0){ message.appendMentionedMobileList(memberPhone); } - RobotUtil.set(message); + RobotUtil.setRobotMessage(message); + + MessageVo.Inform inform = MessageVo.deleteDeliver(currentUserId, userName, project.getId(), project.getName(), taskDetail.getName(), deliverName); + RobotUtil.setInform(inform); + // 添加wx消息通知 + RobotUtil.setWxTemplate(WxTemplateUtil.getDeleteDeliver(taskDetail.getProjectId(), userName, deliverName)); } @Override @@ -286,13 +340,25 @@ public class RobotService implements IRobotService{ } //生成消息 RobotUtil.Message message = new RobotUtil.Message(project.getId()); - message.appendParams(userName,uploadUserName,projectName,task.getName(),deliverName); + message.appendParams( + new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName), + new MessageVo.Message(WebConstant.TemplateParam.Principal.value, uploadUserName), + new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName), + new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, task.getName()), + new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName)); + + //获取角色内成员的手机号 String[] memberPhone = getMemberPhonesByRoleId(task.getExecutorRole()); if(memberPhone.length != 0){ message.appendMentionedMobileList(memberPhone); } - RobotUtil.set(message); + RobotUtil.setRobotMessage(message); + + MessageVo.Inform inform = MessageVo.checkDeliver(currentUserId, userName, project.getId(), project.getName(), task.getName(), uploadUserName, deliverName); + RobotUtil.setInform(inform); + // 添加wx消息通知 + RobotUtil.setWxTemplate(WxTemplateUtil.getCheckDeliver(project.getId(), userName, deliverName)); } @Override @@ -305,12 +371,52 @@ public class RobotService implements IRobotService{ } //生成消息 RobotUtil.Message message = new RobotUtil.Message(project.getId()); - message.appendParams(userName,projectName,proTaskDetail.getName()); + message.appendParams( + new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName), + new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName), + new MessageVo.Message(WebConstant.TemplateParam.TaskName.value, proTaskDetail.getName())); //获取角色内成员的手机号 String[] memberPhone = getMemberPhonesByRoleId(proTaskDetail.getExecutorRole()); if(memberPhone.length != 0){ message.appendMentionedMobileList(memberPhone); } - RobotUtil.set(message); + RobotUtil.setRobotMessage(message); + + MessageVo.Inform inform = MessageVo.addComment(userId, userName, project.getId(), project.getName(), proTaskDetail.getName()); + RobotUtil.setInform(inform); + // 添加wx消息通知 + RobotUtil.setWxTemplate(WxTemplateUtil.getAddComment(project.getId(), userName)); + } + + + @Override + public void sendRemindByRobot(TaskVo.RemindTask taskRemind,String content) throws Exception { + String[] rolePhone = getMemberPhonesByRoleId(taskRemind.getExecutorRole()); + //获取机器人信息 + SysProjectRobotExample sysProjectRobotExample = new SysProjectRobotExample(); + sysProjectRobotExample.createCriteria().andProjectIdEqualTo(taskRemind.getProjectId()); + List sysProjectRobotList = sysProjectRobotDao.selectByExample(sysProjectRobotExample); + if(CollectionUtil.isNotEmpty(sysProjectRobotList)){ + sysProjectRobotList.forEach(sysProjectRobot -> { + //获取机器人信息 + SysRobot sysRobot = sysRobotDao.selectByPrimaryKey(sysProjectRobot.getRobotId()); + //4.发送消息 + if(ObjectUtil.isNotNull(sysRobot)){ + switch (sysRobot.getClientType()){ + case 0://微信 + try { + WxRobotUtil.sendRobotInfo(sysRobot.getWebHook(), content,"text",null, Arrays.asList(rolePhone)); + } catch (Exception e) { + e.printStackTrace(); + } + break; + case 1://钉钉 + break; + default: + } + } +// } + }); + } } } diff --git a/tall/src/main/java/com/ccsens/tall/service/SysDomainService.java b/tall/src/main/java/com/ccsens/tall/service/SysDomainService.java index 7ce98f30..61ad04d0 100644 --- a/tall/src/main/java/com/ccsens/tall/service/SysDomainService.java +++ b/tall/src/main/java/com/ccsens/tall/service/SysDomainService.java @@ -2,41 +2,68 @@ package com.ccsens.tall.service; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.DomainDto; +import com.ccsens.tall.bean.po.DomainNav; +import com.ccsens.tall.bean.po.DomainNavExample; import com.ccsens.tall.bean.po.SysDomain; import com.ccsens.tall.bean.po.SysDomainExample; import com.ccsens.tall.bean.vo.DomainVo; +import com.ccsens.tall.persist.dao.DomainNavDao; import com.ccsens.tall.persist.dao.SysDomainDao; -import org.springframework.beans.factory.annotation.Autowired; +import com.ccsens.util.PropUtil; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.util.List; +/** + * @author 逗 + */ +@Slf4j @Service +@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) public class SysDomainService implements ISysDomainService{ - @Autowired + @Resource private SysDomainDao sysDomainDao; + @Resource + private DomainNavDao domainNavDao; + @Resource + private Snowflake snowflake; /** * 根据域名获取域的配置信息 */ @Override public DomainVo.DomainInfo getDomainByName(String domainName) { + log.info("根据域名:{} 来查找域配置信息",domainName); DomainVo.DomainInfo domainInfo = null; if(StrUtil.isNotEmpty(domainName)) { SysDomainExample domainExample = new SysDomainExample(); domainExample.createCriteria().andDomainNameEqualTo(domainName); List domainList = sysDomainDao.selectByExample(domainExample); if (CollectionUtil.isNotEmpty(domainList)) { + log.info("查找到的域配置信息:{}",domainList); domainInfo = new DomainVo.DomainInfo(); BeanUtil.copyProperties(domainList.get(0), domainInfo); + domainInfo.setDomainNav(domainList.get(0).getNavigationBar()); + if(domainInfo.getDomainNav() != 0){ + List domainNavInfoList = sysDomainDao.queryDomainNavByDomainId(domainInfo.getId()); + if(CollectionUtil.isNotEmpty(domainNavInfoList)){ + domainInfo.setDomainNavInfoList(domainNavInfoList); + } + } } } if(ObjectUtil.isNull(domainInfo)){ domainInfo = new DomainVo.DomainInfo(); - domainInfo.setDomainName("https://test.tall.wiki/gateway/tall/v1.0"); - domainInfo.setLogo(""); + domainInfo.setDomainName(PropUtil.notGatewayUrl + "gateway/tall/v1.0"); + domainInfo.setLogo(PropUtil.notGatewayUrl+"staticrec/logo.png"); domainInfo.setCompanyName("传控电子科技有限公司"); domainInfo.setSystemName("TALL时物链条"); domainInfo.setBackdropUrl(""); @@ -46,4 +73,55 @@ public class SysDomainService implements ISysDomainService{ } return domainInfo; } + + @Override + public DomainVo.DomainInfo saveDomain(DomainDto.DomainInfo domainInfo) { + if(ObjectUtil.isNotNull(domainInfo)){ + SysDomain sysDomain = new SysDomain(); + BeanUtil.copyProperties(domainInfo, sysDomain); + sysDomain.setId(snowflake.nextId()); + sysDomain.setNavigationBar(domainInfo.getDomainNav()); + sysDomainDao.insertSelective(sysDomain); + if(CollectionUtil.isNotEmpty(domainInfo.getDomainNavInfoList())){ + domainInfo.getDomainNavInfoList().forEach(domainNavInfo -> { + DomainNav domainNav = new DomainNav(); + BeanUtil.copyProperties(domainNavInfo, domainNav); + domainNav.setId(snowflake.nextId()); + domainNav.setDomainId(sysDomain.getId()); + domainNavDao.insertSelective(domainNav); + }); + } + } + return getDomainByName(domainInfo.getDomainName()); + } + + @Override + public DomainVo.DomainInfo updateDomain(DomainDto.UpdateDomainInfo domainInfo) { + SysDomain domain = sysDomainDao.selectByPrimaryKey(domainInfo.getId()); + String domainName = domain.getDomainName(); + BeanUtil.copyProperties(domainInfo, domain); + domain.setNavigationBar(domainInfo.getDomainNav()); + sysDomainDao.updateByPrimaryKeySelective(domain); + if(CollectionUtil.isNotEmpty(domainInfo.getDomainNavInfoList())){ + //如果之前有导航,删掉,重新添加新导航 + DomainNavExample domainNavExample = new DomainNavExample(); + domainNavExample.createCriteria().andDomainIdEqualTo(domain.getId()); + List domainNavList = domainNavDao.selectByExample(domainNavExample); + if(CollectionUtil.isNotEmpty(domainNavList)){ + domainNavList.forEach(domainNav -> { + domainNav.setRecStatus((byte) 2); + domainNavDao.updateByPrimaryKeySelective(domainNav); + }); + } + //添加新的导航信息 + domainInfo.getDomainNavInfoList().forEach(domainNavInfo -> { + DomainNav domainNav = new DomainNav(); + BeanUtil.copyProperties(domainNavInfo, domainNav); + domainNav.setId(snowflake.nextId()); + domainNav.setDomainId(domain.getId()); + domainNavDao.insertSelective(domainNav); + }); + } + return getDomainByName(domainName); + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java b/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java index d8c0942d..bf60511c 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java @@ -5,6 +5,7 @@ import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.ccsens.tall.bean.dto.DeliverDto; +import com.ccsens.tall.bean.dto.WpsDto; import com.ccsens.tall.bean.dto.message.BaseMessageDto; import com.ccsens.tall.bean.dto.message.DeliverMessageWithCheckerDto; import com.ccsens.tall.bean.dto.message.DeliverMessageWithDeleteDto; @@ -21,51 +22,54 @@ import com.ccsens.util.bean.message.common.MessageRule; import com.ccsens.util.config.RabbitMQConfig; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; -import org.omg.CORBA.OBJ_ADAPTER; import org.springframework.amqp.core.AmqpTemplate; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; import java.io.File; -import java.math.BigDecimal; import java.util.*; +/** + * @author 逗 + */ @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) public class TaskDeliverService implements ITaskDeliverService { - @Autowired + @Resource private TaskDeliverDao taskDeliverDao; - @Autowired + @Resource private SysCommitedFileDao commitedFileDao; - @Autowired + @Resource private ProTaskDeliverPostLogDao deliverPostLogDao; - @Autowired + @Resource private PostLogCheckerDao postLogCheckerDao; - @Autowired + @Resource private TaskDetailDao taskDetailDao; - @Autowired + @Resource private TaskSubTimeDao taskSubTimeDao; - @Autowired + @Resource private ProRoleDao proRoleDao; - @Autowired + @Resource private ProSubTimeMemberDao proSubTimeMemberDao; - @Autowired - private ProMemberDao proMemberDao; - @Autowired + @Resource private IProMemberService proMemberService; - @Autowired + @Resource private IUserService userService; - @Autowired + @Resource private IMessageService messageService; - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private AmqpTemplate rabbitTemplate; - @Autowired + @Resource private IRobotService robotService; + @Resource + private SysProjectDao sysProjectDao; + @Resource + private IWpsService wpsService; @Override public void saveDeliver(ProTaskDeliver taskDeliver) { @@ -84,14 +88,14 @@ public class TaskDeliverService implements ITaskDeliverService { List deliverList = taskDeliverDao.selectByExample(deliverExample); if (CollectionUtil.isNotEmpty(deliverList)) { for (ProTaskDeliver deliver : deliverList) { - TaskVo.TaskDeliverByMVP.DeliverInfoByMVP deliverInfoByMVP = new TaskVo.TaskDeliverByMVP.DeliverInfoByMVP(); - deliverInfoByMVP.setId(deliver.getId()); - deliverInfoByMVP.setName(deliver.getName()); + TaskVo.TaskDeliverByMVP.DeliverInfoByMVP deliverInfoByMvp = new TaskVo.TaskDeliverByMVP.DeliverInfoByMVP(); + deliverInfoByMvp.setId(deliver.getId()); + deliverInfoByMvp.setName(deliver.getName()); if (ObjectUtil.isNotNull(deliver.getIsFinal())) { if (deliver.getIsFinal() == 0) { - deliverInfoByMVP.setFinals(false); + deliverInfoByMvp.setFinals(false); } else if (deliver.getIsFinal() == 1) { - deliverInfoByMVP.setFinals(true); + deliverInfoByMvp.setFinals(true); } } if (ObjectUtil.isNotNull(subTimeId)) { @@ -102,32 +106,32 @@ public class TaskDeliverService implements ITaskDeliverService { if (CollectionUtil.isNotEmpty(postLogList)) { ProTaskDeliverPostLog postLog = postLogList.get(0); SysCommitedFile file = commitedFileDao.selectByPrimaryKey(postLog.getFileId()); - deliverInfoByMVP.setUrl(WebConstant.TEST_URL_BASE + file.getPath()); + deliverInfoByMvp.setUrl(WebConstant.TEST_URL_BASE + file.getPath()); ProTaskDeliverPostLogCheckerExample checkerExample = new ProTaskDeliverPostLogCheckerExample(); checkerExample.createCriteria().andDeliverPostLogIdEqualTo(postLog.getId()); List postLogCheckerList = postLogCheckerDao.selectByExample(checkerExample); if (CollectionUtil.isNotEmpty(postLogCheckerList)) { - Boolean isChecker = true; + boolean isChecker = true; for (ProTaskDeliverPostLogChecker checker : postLogCheckerList) { if (checker.getCheckStatus() == 0) { - deliverInfoByMVP.setStatus("待检查"); + deliverInfoByMvp.setStatus("待检查"); isChecker = false; } else if(checker.getCheckStatus() == -1) { - deliverInfoByMVP.setStatus("未通过"); + deliverInfoByMvp.setStatus("未通过"); isChecker = false; break; } } if(isChecker){ - deliverInfoByMVP.setStatus("已通过"); + deliverInfoByMvp.setStatus("已通过"); } } } else { - deliverInfoByMVP.setStatus("未上传"); + deliverInfoByMvp.setStatus("未上传"); } } - deliverInfoByMVPList.add(deliverInfoByMVP); + deliverInfoByMVPList.add(deliverInfoByMvp); } } return deliverInfoByMVPList; @@ -163,130 +167,156 @@ public class TaskDeliverService implements ITaskDeliverService { */ @Override public ProjectVo.DeliverInfo addDeliver(Long currentUserId, DeliverDto.UploadDeliver uploadDeliver) throws Exception { + Long now = System.currentTimeMillis(); Long subTimeId = isTaskOrSubTime(uploadDeliver.getTaskId()); if (ObjectUtil.isNull(subTimeId)) { throw new BaseException(CodeEnum.NOT_TASK); } ProjectVo.DeliverInfo deliverInfo = null; //查找交付 - ProTaskDeliver d = taskDeliverDao.selectByPrimaryKey(uploadDeliver.getDeliverId()); - if (ObjectUtil.isNull(d)) { + ProTaskDeliver taskDeliver = taskDeliverDao.selectByPrimaryKey(uploadDeliver.getDeliverId()); + if (ObjectUtil.isNull(taskDeliver)) { throw new BaseException(CodeEnum.NOT_DELIVER); } - ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(d.getTaskDetailId()); + ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskDeliver.getTaskDetailId()); ProRole role = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); - Boolean isBelongRole = proMemberService.userIsBelongRole(currentUserId, role.getId()); - if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase) || isBelongRole) { - //发送信息 - List messageUserList = new ArrayList<>(); - BaseMessageDto.MessageUser messageUser = null; - List userIdList = new ArrayList<>(); - //查找以前的交付物。如果有,改为历史信息 - ProTaskDeliverPostLogExample logExample = new ProTaskDeliverPostLogExample(); - logExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId) - .andDeliverIdEqualTo(uploadDeliver.getDeliverId()).andUserIdEqualTo(currentUserId); - List deliverPostLogList = deliverPostLogDao.selectByExample(logExample); - if (CollectionUtil.isNotEmpty(deliverPostLogList)) { - for (ProTaskDeliverPostLog deliverPostLog : deliverPostLogList) { - if (deliverPostLog.getIsHistory() == 0) { - deliverPostLog.setIsHistory(1); - deliverPostLogDao.updateByPrimaryKeySelective(deliverPostLog); - } - } + Boolean isBelongRole = proMemberService.userIsBelongRole(currentUserId, role.getId(),null); + if (!role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase) && !isBelongRole){ + throw new BaseException(CodeEnum.NOT_CHECKER); + } + //查找以前上传的不为历史信息的文件。改为历史信息 + ProTaskDeliverPostLogExample logExample = new ProTaskDeliverPostLogExample(); + logExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId).andDeliverIdEqualTo(uploadDeliver.getDeliverId()) + .andUserIdEqualTo(currentUserId).andIsHistoryEqualTo(0); + List deliverPostLogList = deliverPostLogDao.selectByExample(logExample); + if (CollectionUtil.isNotEmpty(deliverPostLogList)) { + for (ProTaskDeliverPostLog deliverPostLog : deliverPostLogList) { + deliverPostLog.setIsHistory(1); + deliverPostLogDao.updateByPrimaryKeySelective(deliverPostLog); } - //添加PostLog - ProTaskDeliverPostLog deliverPostLog = new ProTaskDeliverPostLog(); - deliverPostLog.setId(snowflake.nextId()); - deliverPostLog.setDeliverId(uploadDeliver.getDeliverId()); - deliverPostLog.setTaskSubTimeId(subTimeId); - //如果有文件则添加,没有不添加 - if (CollectionUtil.isNotEmpty(uploadDeliver.getFileInfo())) { - for (DeliverDto.fileInfo fileInfo : uploadDeliver.getFileInfo()) { - SysCommitedFile file = commitedFileDao.selectByPrimaryKey(fileInfo.getId()); - deliverPostLog.setFileId(fileInfo.getId()); + } + //将文件信息与交付物绑定,添加记录deliverPostLog + if (CollectionUtil.isNotEmpty(uploadDeliver.getFileInfo())) { + for (DeliverDto.FileInfo fileInfo : uploadDeliver.getFileInfo()) { + SysCommitedFile file = commitedFileDao.selectByPrimaryKey(fileInfo.getId()); + if(ObjectUtil.isNull(file)){ + throw new BaseException(CodeEnum.NOT_DELIVER_FILE); } - } - deliverPostLog.setUserId(currentUserId); - deliverPostLog.setDescription(uploadDeliver.getDescription()); - deliverPostLog.setTime(System.currentTimeMillis()); - deliverPostLog.setIsHistory(0); - deliverPostLogDao.insertSelective(deliverPostLog); - //添加交付物检查人表 - if (CollectionUtil.isNotEmpty(uploadDeliver.getCheckerIdList())) { - ProTaskDeliverPostLogChecker postLogChecker = null; - for (Long checkerId : uploadDeliver.getCheckerIdList()) { - postLogChecker = new ProTaskDeliverPostLogChecker(); - postLogChecker.setId(snowflake.nextId()); - postLogChecker.setDeliverPostLogId(deliverPostLog.getId()); - postLogChecker.setCheckerId(checkerId); - postLogCheckerDao.insertSelective(postLogChecker); + ProTaskDeliverPostLog deliverPostLog = new ProTaskDeliverPostLog(); + deliverPostLog.setId(snowflake.nextId()); + deliverPostLog.setDeliverId(uploadDeliver.getDeliverId()); + deliverPostLog.setTaskSubTimeId(subTimeId); + deliverPostLog.setFileId(file.getId()); + deliverPostLog.setUserId(currentUserId); + deliverPostLog.setDescription(uploadDeliver.getDescription()); + deliverPostLog.setTime(now); + deliverPostLog.setIsHistory(0); + deliverPostLogDao.insertSelective(deliverPostLog); + //添加交付物检查人表 + if (CollectionUtil.isNotEmpty(uploadDeliver.getCheckerIdList())) { + ProTaskDeliverPostLogChecker postLogChecker; + for (Long checkerId : uploadDeliver.getCheckerIdList()) { + postLogChecker = new ProTaskDeliverPostLogChecker(); + postLogChecker.setId(snowflake.nextId()); + postLogChecker.setDeliverPostLogId(deliverPostLog.getId()); + postLogChecker.setCheckerId(checkerId); + postLogCheckerDao.insertSelective(postLogChecker); + } + } else { + throw new BaseException(CodeEnum.NOT_CHECKER); } - } else { - throw new BaseException(CodeEnum.NOT_CHECKER); + //保存wps的文件消息 + saveWpsFile(currentUserId,deliverPostLog.getId(),fileInfo); } - //修改交付物状态 ProTaskDeliver deliver = new ProTaskDeliver(); deliver.setId(uploadDeliver.getDeliverId()); deliver.setIsUpload(1); taskDeliverDao.updateByPrimaryKeySelective(deliver); + } - //返回 - List deliverInfoList = taskDeliverDao.selectByDeliverId(uploadDeliver.getDeliverId()); - if (CollectionUtil.isNotEmpty(deliverInfoList)) { - deliverInfo = deliverInfoList.get(0); - deliverInfo.setUrl(WebConstant.TEST_URL_BASE + deliverInfo.getUrl()); - } + //发送WS信息 - //消息的内容 - if (CollectionUtil.isNotEmpty(uploadDeliver.getCheckerIdList())) { - for (Long postLogCheckerId : uploadDeliver.getCheckerIdList()) { - userIdList.addAll(userService.selectUserIdByRoleId(postLogCheckerId)); - } - } - Set userIdSet = new HashSet<>(); - if (CollectionUtil.isNotEmpty(userIdList)) { - HashSet h = new HashSet<>(userIdList); - userIdList.clear(); - userIdList.addAll(h); - for (Long userId : userIdList) { - userIdSet.add(userId.toString()); - messageUser = new BaseMessageDto.MessageUser(); - messageUser.setUserId(userId); - messageUserList.add(messageUser); - } - } - DeliverMessageWithUploadDto uploadMessage = new DeliverMessageWithUploadDto(); - DeliverMessageWithUploadDto.Data uploadMessageData = new DeliverMessageWithUploadDto.Data(); - uploadMessageData.setProjectId(taskDetail.getProjectId()); - if (role.getName().equals(WebConstant.ROLE_NAME.AllMember.phase)) { - List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, taskDetail.getProjectId()); - uploadMessageData.setRoleId(roleList.get(0).getId()); - } else { - uploadMessageData.setRoleId(taskDetail.getExecutorRole()); + //获取所有接收者的id + List messageUserList = new ArrayList<>(); + BaseMessageDto.MessageUser messageUser; + HashSet userIdSet = new HashSet<>(); + HashSet userIdStr = new HashSet<>(); + if (CollectionUtil.isNotEmpty(uploadDeliver.getCheckerIdList())) { + for (Long postLogCheckerId : uploadDeliver.getCheckerIdList()) { + userIdSet.addAll(userService.selectUserIdByRoleId(postLogCheckerId)); } - uploadMessageData.setTaskId(taskDetail.getId()); - uploadMessageData.setDeliverId(d.getId()); - uploadMessageData.setDeliverName(d.getName()); - uploadMessageData.setUploadTime(System.currentTimeMillis()); - uploadMessageData.setFile(uploadDeliver.getFileInfo()); - uploadMessage.setData(uploadMessageData); - - MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User); - String s = JacksonUtil.beanToJson(uploadMessage); - InMessage inMessage = InMessage.newToUserMessage(currentUserId.toString(),userIdSet,null,messageRule,s); - String j = JacksonUtil.beanToJson(inMessage); - System.out.println(j); - messageService.sendDeliverMessageWithUpload(inMessage); + } + // ws 发送消息 + Set userIds = new HashSet<>(); + for (Long userId : userIdSet) { + messageUser = new BaseMessageDto.MessageUser(); + messageUser.setUserId(userId); + messageUserList.add(messageUser); + userIds.add(userId.toString()); + } + Long roleId; + if (role.getName().equals(WebConstant.ROLE_NAME.AllMember.phase)) { + List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, taskDetail.getProjectId(),null); + roleId = roleList.get(0).getId(); } else { - throw new BaseException(CodeEnum.IS_NOT_EXECUTOR); + roleId = taskDetail.getExecutorRole(); + } +// DeliverMessageWithUploadDto uploadMessage = new DeliverMessageWithUploadDto(taskDetail.getProjectId(),roleId,taskDetail.getId(), +// taskDeliver.getId(),taskDeliver.getName(),currentUserId,now,uploadDeliver.getFileInfo(),messageUserList); +// log.info("上传交付物:{}",JacksonUtil.beanToJson(uploadMessage)); + DeliverMessageWithUploadDto.Data data = new DeliverMessageWithUploadDto.Data(); + data.setProjectId(taskDetail.getProjectId()); + data.setDeliverId(taskDeliver.getId()); + data.setDeliverName(taskDeliver.getName()); + data.setRoleId(roleId); + data.setTaskId(taskDetail.getId()); + data.setUploader(currentUserId); + data.setUploadTime(now); + data.setFile(uploadDeliver.getFileInfo()); + DeliverMessageWithUploadDto uploadMessage = new DeliverMessageWithUploadDto(); + uploadMessage.setData(data); + + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(userIds); + inMessage.setData(JacksonUtil.beanToJson(uploadMessage)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, + JacksonUtil.beanToJson(inMessage) ); +// //用智能助手发送消息 +// SysProject project = sysProjectDao.selectByPrimaryKey(taskDetail.getProjectId()); +// robotService.addDeliverRobotSend(currentUserId,taskDeliver.getName(),subTimeId, project); + + //返回 + List deliverInfoList = taskDeliverDao.selectByDeliverId(uploadDeliver.getDeliverId()); + if (CollectionUtil.isNotEmpty(deliverInfoList)) { + deliverInfo = deliverInfoList.get(0); + deliverInfo.setUrl(WebConstant.TEST_URL_BASE + deliverInfo.getUrl()); } - //用智能助手发送消息 - robotService.addDeliverRobotSend(currentUserId,d.getName(),subTimeId); return deliverInfo; } + private void saveWpsFile(Long currentUserId, Long deliverLogId, DeliverDto.FileInfo fileInfo) { + File file = new File(WebConstant.UPLOAD_PATH_BASE + File.separator + fileInfo.getUrl()); + if(file.exists()) { + //添加wps的信息 + WpsDto.Business business = new WpsDto.Business(); + business.setBusinessId(deliverLogId); + business.setWpsFileId(fileInfo.getWpsFileId()); + business.setBusinessType((byte) 1); + business.setUserId(currentUserId); + business.setFileName(fileInfo.getName()); + business.setFilePath(fileInfo.getUrl()); + business.setFileSize(file.length()); + business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); + business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_READ); + wpsService.saveFile(business); + }else { + throw new BaseException(CodeEnum.NOT_DELIVER_FILE); + } + } + /** * 判断id是taskId还是subTimeId */ @@ -310,6 +340,8 @@ public class TaskDeliverService implements ITaskDeliverService { subTimeId = taskAndSubTime.getSubTimeId(); } } + }else { + throw new BaseException(CodeEnum.NOT_TASK); } if(ObjectUtil.isNull(subTimeId)){ ProTaskSubTimeExample taskSubTimeExample = new ProTaskSubTimeExample(); @@ -329,13 +361,13 @@ public class TaskDeliverService implements ITaskDeliverService { * 获取任务下所有交付物的信息 */ @Override - public List selectTaskDeliver(Long currentUserId, Long taskId) throws Exception { + public List selectTaskDeliver(Long currentUserId, Long taskId,String token) throws Exception { Long subTimeId = isTaskOrSubTime(taskId); if (ObjectUtil.isNull(subTimeId)) { throw new BaseException(CodeEnum.NOT_TASK); } List deliverInfoList = new ArrayList<>(); - DeliverVo.DeliverInfo deliverInfo = null; + DeliverVo.DeliverInfo deliverInfo; ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(subTimeId); if (ObjectUtil.isNotNull(subTimeId)) { //获取角色负责人信息 @@ -347,7 +379,7 @@ public class TaskDeliverService implements ITaskDeliverService { if (CollectionUtil.isNotEmpty(taskDeliverList)) { for (ProTaskDeliver deliver : taskDeliverList) { if (deliver.getIsInput() == 0) { - deliverInfo = selectDeliverInfo(currentUserId, deliver.getId(), subTimeId); + deliverInfo = selectDeliverInfo(currentUserId, deliver.getId(), subTimeId,token); deliverInfoList.add(deliverInfo); } } @@ -360,7 +392,7 @@ public class TaskDeliverService implements ITaskDeliverService { * 查看单个交付物的信息 */ @Override - public DeliverVo.DeliverInfo selectDeliverInfo(Long currentUserId, Long deliverId, Long taskId) throws Exception { + public DeliverVo.DeliverInfo selectDeliverInfo(Long currentUserId, Long deliverId, Long taskId,String token) throws Exception { Long subTimeId = isTaskOrSubTime(taskId); if (ObjectUtil.isNull(subTimeId)) { throw new BaseException(CodeEnum.NOT_TASK); @@ -371,7 +403,7 @@ public class TaskDeliverService implements ITaskDeliverService { //获取此用户在这个项目中的角色 ProTaskDetail task = taskDetailDao.selectByPrimaryKey(deliver.getTaskDetailId()); - List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, task.getProjectId()); + List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, task.getProjectId(),null); if (ObjectUtil.isNotNull(deliver)) { deliverInfo.setDeliverId(deliver.getId()); @@ -379,7 +411,7 @@ public class TaskDeliverService implements ITaskDeliverService { } //负责人信息 List executorRoleList = new ArrayList<>(); - DeliverVo.DRole executorRole = null; + DeliverVo.DRole executorRole; ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskSubTimeDao.selectByPrimaryKey(subTimeId).getTaskDetailId()); if (ObjectUtil.isNotNull(taskDetail)) { ProRole role = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); @@ -405,9 +437,9 @@ public class TaskDeliverService implements ITaskDeliverService { } //检查人信息 - List checkerList = null; - Boolean isChecker = false; - DeliverVo.Checker checker = null; + List checkerList; + boolean isChecker = false; + DeliverVo.Checker checker; //交付物文件的信息按时间排序 List fileIds = taskDeliverDao.selectFileIdByDeliverId(deliver.getId(), subTimeId); if (CollectionUtil.isNotEmpty(fileIds)) { @@ -417,7 +449,9 @@ public class TaskDeliverService implements ITaskDeliverService { filePath.setDeleteTime(filePath.getUpdateTime().getTime()); } //修改文件路径为可下载路径 - filePath.setUrl(WebConstant.TEST_URL_BASE + filePath.getUrl()); + if(StrUtil.isNotEmpty(filePath.getUrl())) { + filePath.setUrl(WebConstant.TEST_URL_BASE + filePath.getUrl()); + } if (ObjectUtil.isNotNull(filePath.getUploaderId())) { //添加上传人的姓名信息 ProMember member = proMemberService.selectByUserId(filePath.getUploaderId(), task.getProjectId()); @@ -426,7 +460,7 @@ public class TaskDeliverService implements ITaskDeliverService { } //添加上传人所属的角色 List dRoleList = new ArrayList<>(); - List uploaderRoleList = proMemberService.selectRolesByUserIdAndProjectId(filePath.getUploaderId(), task.getProjectId()); + List uploaderRoleList = proMemberService.selectRolesByUserIdAndProjectId(filePath.getUploaderId(), task.getProjectId(),null); if (CollectionUtil.isNotEmpty(uploaderRoleList)) { for (ProRole role : uploaderRoleList) { DeliverVo.DRole dRole = new DeliverVo.DRole(); @@ -440,7 +474,7 @@ public class TaskDeliverService implements ITaskDeliverService { checkerList = new ArrayList<>(); ProTaskDeliverPostLogCheckerExample checkerExample = new ProTaskDeliverPostLogCheckerExample(); - checkerExample.createCriteria().andDeliverPostLogIdEqualTo(filePath.getPostLogId()); + checkerExample.createCriteria().andDeliverPostLogIdEqualTo(filePath.getDeliverLogId()); List postLogCheckerList = postLogCheckerDao.selectByExample(checkerExample); if (CollectionUtil.isNotEmpty(postLogCheckerList)) { for (ProTaskDeliverPostLogChecker postLogChecker : postLogCheckerList) { @@ -450,6 +484,7 @@ public class TaskDeliverService implements ITaskDeliverService { checker.setCheckerName(role.getName()); checker.setRemark(postLogChecker.getRemark()); checker.setCheckerStatus(postLogChecker.getCheckStatus()); + checker.setScore(postLogChecker.getScore()); checkerList.add(checker); if (CollectionUtil.isNotEmpty(roleList)) { for (ProRole proRole : roleList) { @@ -463,6 +498,8 @@ public class TaskDeliverService implements ITaskDeliverService { } filePath.setCheckerList(checkerList); filePath.setIsChecker(isChecker); + //获取wps里的文件路径 + filePath.setWpsFilePaths(wpsService.queryVisitUrls(filePath.getDeliverLogId(), (byte) 1,token,null)); } deliverInfo.setFileList(fileIds); } @@ -473,19 +510,23 @@ public class TaskDeliverService implements ITaskDeliverService { * 检查人检查交付物 */ @Override - public DeliverVo.DeliverInfo checkDeliver(Long currentUserId, DeliverDto.CheckDeliver checkDeliver) throws Exception { + public DeliverVo.DeliverInfo checkDeliver(Long currentUserId, DeliverDto.CheckDeliver checkDeliver,String token) throws Exception { Long subTimeId = isTaskOrSubTime(checkDeliver.getTaskId()); if (ObjectUtil.isNull(subTimeId)) { throw new BaseException(CodeEnum.NOT_TASK); } List messageUserList = new ArrayList<>(); - BaseMessageDto.MessageUser messageUser = null; + BaseMessageDto.MessageUser messageUser; ProRole checkRole = null; Set userIdSet = new HashSet<>(); Long uploadUserId = null; - - //查找该用户在此项目的角色 - ProTaskDeliver deliver = taskDeliverDao.selectByPrimaryKey(checkDeliver.getDeliverId()); + //获取交付物记录 + ProTaskDeliverPostLog deliverPostLog = deliverPostLogDao.selectByPrimaryKey(checkDeliver.getDeliverLogId()); + if(ObjectUtil.isNull(deliverPostLog)){ + throw new BaseException(CodeEnum.NOT_DELIVER); + } + //查找交付物信息 + ProTaskDeliver deliver = taskDeliverDao.selectByPrimaryKey(deliverPostLog.getDeliverId()); if(ObjectUtil.isNull(deliver)){ throw new BaseException(CodeEnum.NOT_DELIVER); } @@ -494,42 +535,36 @@ public class TaskDeliverService implements ITaskDeliverService { throw new BaseException(CodeEnum.NOT_TASK); } ProRole proRole = proRoleDao.selectByPrimaryKey(task.getExecutorRole()); - List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, task.getProjectId()); + List roleList = proMemberService.selectRolesByUserIdAndProjectId(currentUserId, task.getProjectId(),null); if (CollectionUtil.isNotEmpty(roleList)) { for (ProRole role : roleList) { - ProTaskDeliverPostLogExample logExample = new ProTaskDeliverPostLogExample(); - logExample.createCriteria().andDeliverIdEqualTo(checkDeliver.getDeliverId()).andTaskSubTimeIdEqualTo(subTimeId); - logExample.setOrderByClause("time DESC"); - List deliverPostLogList = deliverPostLogDao.selectByExample(logExample); - if (CollectionUtil.isNotEmpty(deliverPostLogList)) { - ProTaskDeliverPostLog postLog = deliverPostLogList.get(0); -// for (ProTaskDeliverPostLog postLog : deliverPostLogList) { - ProTaskDeliverPostLogCheckerExample checkerExample = new ProTaskDeliverPostLogCheckerExample(); - checkerExample.createCriteria().andDeliverPostLogIdEqualTo(postLog.getId()).andCheckerIdEqualTo(role.getId()); - List postLogCheckerList = postLogCheckerDao.selectByExample(checkerExample); - if (CollectionUtil.isNotEmpty(postLogCheckerList)) { - for (ProTaskDeliverPostLogChecker postLogChecker : postLogCheckerList) { - if (role.getId().longValue() == postLogChecker.getCheckerId().longValue()) { - postLogChecker.setRemark(checkDeliver.getText()); - if (checkDeliver.getCheckStatus()) { - postLogChecker.setCheckStatus(1); - } else { - postLogChecker.setCheckStatus(-1); - returnTask(subTimeId); - } - postLogCheckerDao.updateByPrimaryKeySelective(postLogChecker); + + ProTaskDeliverPostLogCheckerExample checkerExample = new ProTaskDeliverPostLogCheckerExample(); + checkerExample.createCriteria().andDeliverPostLogIdEqualTo(deliverPostLog.getId()).andCheckerIdEqualTo(role.getId()); + List postLogCheckerList = postLogCheckerDao.selectByExample(checkerExample); + if (CollectionUtil.isNotEmpty(postLogCheckerList)) { + for (ProTaskDeliverPostLogChecker postLogChecker : postLogCheckerList) { + if (role.getId().longValue() == postLogChecker.getCheckerId().longValue()) { + postLogChecker.setRemark(checkDeliver.getText()); + if (checkDeliver.getCheckStatus()) { + postLogChecker.setCheckStatus(1); + postLogChecker.setScore(checkDeliver.getScore()); + } else { + postLogChecker.setCheckStatus(2); + postLogChecker.setScore(0); + returnTask(subTimeId); } + postLogCheckerDao.updateByPrimaryKeySelective(postLogChecker); } } - userIdSet.add(postLog.getUserId().toString()); - uploadUserId = postLog.getUserId(); + userIdSet.add(deliverPostLog.getUserId().toString()); + uploadUserId = deliverPostLog.getUserId(); checkRole = role; -// } - } - if (ObjectUtil.isNull(checkRole)) { - throw new BaseException(CodeEnum.IS_NOT_CHECKER); } } + if (ObjectUtil.isNull(checkRole)) { + throw new BaseException(CodeEnum.IS_NOT_CHECKER); + } } //发送消息 Long checkTime = System.currentTimeMillis(); @@ -551,7 +586,16 @@ public class TaskDeliverService implements ITaskDeliverService { checkerDtoData.setCheckTime(checkTime); checkerDtoData.setIsChecker(checkDeliver.getCheckStatus()); checkerDto.setData(checkerDtoData); - + //接收者 + if(CollectionUtil.isNotEmpty(userIdSet)) { + for (String userId : userIdSet) { + messageUser = new BaseMessageDto.MessageUser(); + messageUser.setUserId(Long.valueOf(userId)); + messageUserList.add(messageUser); + } + } +// checkerDto.setReceivers(messageUserList); 旧消息系统的接收者列表 + log.info("检查交付物:{}",JacksonUtil.beanToJson(checkerDto)); MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User); String s = JacksonUtil.beanToJson(checkerDto); InMessage inMessage = InMessage.newToUserMessage(currentUserId.toString(),userIdSet,null,messageRule,s); @@ -559,8 +603,8 @@ public class TaskDeliverService implements ITaskDeliverService { messageService.sendDeliverMessageWithChecker(inMessage); //检查完,返回数据 - DeliverVo.DeliverInfo deliverInfo = selectDeliverInfo(currentUserId, deliver.getId(), checkDeliver.getTaskId()); - //用智能助手发送消息 + DeliverVo.DeliverInfo deliverInfo = selectDeliverInfo(currentUserId, deliver.getId(), checkDeliver.getTaskId(),token); + //用智能助手发送消息+ws/公众号发送 robotService.checkDeliverRobotSend(currentUserId,task,uploadUserId,deliver.getName()); return deliverInfo; } @@ -596,7 +640,7 @@ public class TaskDeliverService implements ITaskDeliverService { //获取日期的开始结束时间 Long startMillisTime = null; Long endMillisTime = null; - Map timeMap = null; + Map timeMap; if (StrUtil.isNotEmpty(start)) { timeMap = DateUtil.projectFormatDateTime(start); startMillisTime = timeMap.get("startMillisTime"); @@ -673,8 +717,13 @@ public class TaskDeliverService implements ITaskDeliverService { */ @Override public void deleteDeliver(Long currentUserId, Long deliverId, Long taskId) throws Exception { - ProTaskDeliver deliver = taskDeliverDao.selectByPrimaryKey(deliverId); - if(ObjectUtil.isNull(deliver)){ +// ProTaskDeliver deliver = taskDeliverDao.selectByPrimaryKey(deliverId); +// if(ObjectUtil.isNull(deliver)){ +// throw new BaseException(CodeEnum.NOT_DELIVER); +// } + + ProTaskDeliverPostLog deliverPostLog = deliverPostLogDao.selectByPrimaryKey(deliverId); + if(ObjectUtil.isNull(deliverPostLog)){ throw new BaseException(CodeEnum.NOT_DELIVER); } Long subTimeId = isTaskOrSubTime(taskId); @@ -684,13 +733,13 @@ public class TaskDeliverService implements ITaskDeliverService { List userIdList = new ArrayList<>(); //同步锁,防止多个用户同时操作该数据 synchronized (this) { - //查找此交付物与文件的中间表 - ProTaskDeliverPostLogExample deliverPostLogExample = new ProTaskDeliverPostLogExample(); - deliverPostLogExample.createCriteria().andDeliverIdEqualTo(deliverId).andTaskSubTimeIdEqualTo(subTimeId); - List deliverPostLogList = deliverPostLogDao.selectByExample(deliverPostLogExample); +// //查找此交付物与文件的中间表 +// ProTaskDeliverPostLogExample deliverPostLogExample = new ProTaskDeliverPostLogExample(); +// deliverPostLogExample.createCriteria().andDeliverIdEqualTo(deliverId).andTaskSubTimeIdEqualTo(subTimeId); +// List deliverPostLogList = deliverPostLogDao.selectByExample(deliverPostLogExample); - if (CollectionUtil.isNotEmpty(deliverPostLogList)) { - for (ProTaskDeliverPostLog deliverPostLog : deliverPostLogList) { +// if (ObjectUtil.isNotNull(deliverPostLog)) { +// for (ProTaskDeliverPostLog deliverPostLog : deliverPostLogList) { if (currentUserId.longValue() == deliverPostLog.getUserId().longValue()) { if (deliverPostLog.getIsHistory() == 0) { deliverPostLog.setIsHistory(1); @@ -708,8 +757,9 @@ public class TaskDeliverService implements ITaskDeliverService { } else { throw new BaseException("您无法删除别人上传的交付物"); } - } - } +// } +// } + ProTaskDeliver deliver = taskDeliverDao.selectByPrimaryKey(deliverPostLog.getDeliverId()); deliver.setIsUpload(0); taskDeliverDao.updateByPrimaryKeySelective(deliver); @@ -741,12 +791,14 @@ public class TaskDeliverService implements ITaskDeliverService { deleteMessageData.setDeleteTime(deleteTime); deleteMessageData.setUserId(currentUserId); deleteMessage.setData(deleteMessageData); + deleteMessage.setReceivers(messageUserList); - MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User); - String s = JacksonUtil.beanToJson(deleteMessage); - InMessage inMessage = InMessage.newToUserMessage(currentUserId.toString(),userIdSet,null,messageRule,s); - - messageService.sendDeliverMessageWithDelete(inMessage); + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(userIdSet); + inMessage.setData(JacksonUtil.beanToJson(deleteMessage)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, + JacksonUtil.beanToJson(inMessage)); //用智能助手发送消息 robotService.deleteDeliverRobotSend(currentUserId,deliver.getName(),subTimeId); @@ -757,7 +809,7 @@ public class TaskDeliverService implements ITaskDeliverService { /** * 删除任务下的交付物(彻底删除) - * @param taskId + * @param taskId 任务id */ @Override public void deleteDeliverByTaskId(Long taskId) { @@ -774,9 +826,10 @@ public class TaskDeliverService implements ITaskDeliverService { for(ProTaskDeliverPostLog deliverPostLog : postLogList){ //删除文件 SysCommitedFile file = commitedFileDao.selectByPrimaryKey(deliverPostLog.getFileId()); - file.setRecStatus((byte) 2); - commitedFileDao.updateByPrimaryKeySelective(file); - + if(ObjectUtil.isNotNull(file)) { + file.setRecStatus((byte) 2); + commitedFileDao.updateByPrimaryKeySelective(file); + } // deleteFile(file.getPath()); // commitedFileDao.deleteByPrimaryKey(deliverPostLog.getId()); //删除交付物和文件、检查人的关联信息 diff --git a/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java b/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java index c1f6048d..d02afdc8 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java @@ -1,55 +1,79 @@ package com.ccsens.tall.service; import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; import com.ccsens.tall.bean.dto.PluginDto; +import com.ccsens.tall.bean.dto.WpsDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.PluginVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.dao.*; import com.ccsens.util.CodeEnum; +import com.ccsens.util.PoiUtil; +import com.ccsens.util.PropUtil; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.eclipse.jetty.util.log.Log; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; -import java.util.List; +import javax.annotation.Resource; +import java.io.*; +import java.util.*; +import java.util.concurrent.atomic.AtomicReference; +/** + * @author 逗 + */ @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) public class TaskPluginService implements ITaskPluginService{ - @Autowired + @Resource private TaskPluginDao taskPluginDao; - @Autowired + @Resource + private ProPluginConfigDao proPluginConfigDao; + @Resource private TaskDetailDao taskDetailDao; - @Autowired + @Resource private TaskSubTimeDao taskSubTimeDao; - @Autowired + @Resource private SysPluginDao sysPluginDao; - @Autowired + @Resource private SysProjectDao sysProjectDao; - @Autowired + @Resource private ProRoleDao roleDao; - @Autowired + @Resource private IProMemberService proMemberService; - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private ProTaskCommentDao proTaskCommentDao; - @Autowired + @Resource private SysUserDao sysUserDao; - @Autowired + @Resource private SysAuthDao sysAuthDao; - @Autowired + @Resource private IProRoleService proRoleService; - @Autowired + @Resource private IRobotService robotService; + @Resource + private ProNotesDao proNotesDao; + @Resource + private IWpsService wpsService; + @Resource + private SysDomainDao sysDomainDao; + @Resource + private ProProjectFileDao proProjectFileDao; + @Resource + private WpsFileDao wpsFileDao; @Override public void savePlugin(ProTaskPlugin taskPlugin) { @@ -64,7 +88,7 @@ public class TaskPluginService implements ITaskPluginService{ List pluginList = new ArrayList<>(); //获取用户在此项目中的所有角色 ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskId); - List roleList = proMemberService.selectRolesByUserIdAndProjectId(userId,taskDetail.getProjectId()); + List roleList = proMemberService.selectRolesByUserIdAndProjectId(userId,taskDetail.getProjectId(),null); List pluginVoList = sysPluginDao.getPluginByTask(taskId); if(CollectionUtil.isNotEmpty(pluginVoList)){ @@ -103,18 +127,18 @@ public class TaskPluginService implements ITaskPluginService{ /** * 添加评论 - * @param addCommentPlugin - * @return + * @param addCommentPlugin 评论信息 + * @return 返回这条评论的内容 */ @Override public PluginVo.CommentInfo addComment(Long userId, PluginDto.AddCommentPlugin addCommentPlugin) throws Exception { - ProTaskDetail proTaskDetail = null; ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(addCommentPlugin.getTaskId()); - if(ObjectUtil.isNotNull(subTime)) { - proTaskDetail = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId()); - if (ObjectUtil.isNull(proTaskDetail)) { - throw new BaseException(CodeEnum.NOT_TASK); - } + if(ObjectUtil.isNull(subTime)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + ProTaskDetail proTaskDetail = taskDetailDao.selectByPrimaryKey(subTime.getTaskDetailId()); + if (ObjectUtil.isNull(proTaskDetail)) { + throw new BaseException(CodeEnum.NOT_TASK); } SysProject sysProject = sysProjectDao.selectByPrimaryKey(proTaskDetail.getProjectId()); if(ObjectUtil.isNull(sysProject)){ @@ -136,6 +160,7 @@ public class TaskPluginService implements ITaskPluginService{ commentInfo.setTaskId(proTaskComment.getTaskSubTimeId()); commentInfo.setCommentTime(proTaskComment.getTime()); commentInfo.setDescription(proTaskComment.getDescription()); + commentInfo.setMine(1); //查询用户头像和昵称 SysUser sysUser = sysUserDao.selectByPrimaryKey(userId); commentInfo.setAvatarUrl(sysUser.getAvatarUrl()); @@ -156,9 +181,22 @@ public class TaskPluginService implements ITaskPluginService{ return commentInfo; } + /** + * 查找评论 + * @param currentUserId userId + * @param taskId 任务id + * @return 返回任务下的所有评论 + */ @Override public List getComment(Long currentUserId, Long taskId) { - List commentInfoList = proTaskCommentDao.getCommentByTaskId(taskId); + List commentInfoList = proTaskCommentDao.getCommentByTaskId(currentUserId,taskId); + if(CollectionUtil.isNotEmpty(commentInfoList)){ + commentInfoList.forEach(commentInfo -> { + if(StrUtil.isEmpty(commentInfo.getAvatarUrl())){ + commentInfo.setAvatarUrl(PropUtil.notGatewayUrl + "staticrec/logo.png"); + } + }); + } return commentInfoList; } @@ -177,4 +215,584 @@ public class TaskPluginService implements ITaskPluginService{ throw new BaseException(CodeEnum.NOT_POWER); } } + + @Override + public PluginVo.NotesInfo saveNotes(Long currentUserId, PluginDto.SaveNotes saveNotes) { + //检查该角色是否是任务负责人 + ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(saveNotes.getTaskId()); + if(ObjectUtil.isNull(taskSubTime)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskSubTime.getTaskDetailId()); + if(ObjectUtil.isNull(taskDetail)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + if(taskDetail.getExecutorRole().longValue() != saveNotes.getRoleId()){ + throw new BaseException(CodeEnum.IS_NOT_EXECUTOR); + } + //添加笔记信息 + ProNotes proNotes = new ProNotes(); + proNotes.setId(snowflake.nextId()); + proNotes.setTaskId(taskSubTime.getId()); + proNotes.setRoleId(saveNotes.getRoleId()); + proNotes.setUserId(currentUserId); + proNotes.setPluginId(saveNotes.getPluginId()); + proNotes.setValue(saveNotes.getValue()); + if(ObjectUtil.isNotNull(saveNotes.getPublicity())) { + proNotes.setPublicity(saveNotes.getPublicity().byteValue()); + } + Long now = System.currentTimeMillis(); + proNotes.setTime(now); + proNotesDao.insertSelective(proNotes); + //返回 + PluginVo.NotesInfo notesInfo = new PluginVo.NotesInfo(); + notesInfo.setId(proNotes.getId()); + notesInfo.setTaskId(proNotes.getTaskId()); + notesInfo.setRoleId(proNotes.getRoleId()); + notesInfo.setPluginId(proNotes.getPluginId()); + notesInfo.setValue(proNotes.getValue()); + notesInfo.setNotesTime(proNotes.getTime()); + notesInfo.setPublicity(proNotes.getPublicity()); + return notesInfo; + } + + @Override + public List queryNotesInfo(Long currentUserId, Long taskId, Long pluginId) { + return proNotesDao.queryNotesInfo(currentUserId,taskId,pluginId); + } + + @Override + public void deleteNotes(Long currentUserId, Long notesId) { + ProNotes notes = proNotesDao.selectByPrimaryKey(notesId); + if(ObjectUtil.isNull(notes)){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } + ProTaskDetail proTaskDetail = taskDetailDao.selectByPrimaryKey(notes.getTaskId()); + if(ObjectUtil.isNotNull(proTaskDetail)){ + //只有管理员和发表评论的本人可以删除 + int power = proRoleService.selectPowerByRoleName(currentUserId, proTaskDetail.getProjectId()); + if (power > 1 || currentUserId.longValue() == notes.getUserId()) { + notes.setRecStatus((byte) 2); + proNotesDao.updateByPrimaryKeySelective(notes); + }else { + throw new BaseException(CodeEnum.NOT_POWER); + } + } + } + + @Override + public List saveMinutes(Long currentUserId,PluginDto.GetMinutes getMinutes,String token) throws Exception { + log.info("生成会议记录,项目id:{}",getMinutes.toString()); + //根据域名查找公司logo + String logo = "/home/staticrec/logo.png"; + if(StrUtil.isNotEmpty(getMinutes.getDomainName())) { + SysDomainExample domainExample = new SysDomainExample(); + domainExample.createCriteria().andDomainNameEqualTo(getMinutes.getDomainName()); + List sysDomainList = sysDomainDao.selectByExample(domainExample); + if (CollectionUtil.isNotEmpty(sysDomainList)) { + logo = sysDomainList.get(0).getLogoPath(); + } + } + //查找该任务的会议记录文件,有则直接返回 + List minutesInfoList = new ArrayList<>(); + List wpsPath = wpsService.queryVisitUrls(getMinutes.getTaskId(),(byte) 2,token,null); + if(CollectionUtil.isNotEmpty(wpsPath)){ + wpsPath.forEach(wps->{ + PluginVo.MinutesInfo minutesInfo = new PluginVo.MinutesInfo(); + minutesInfo.setWpsPath(wps); + //获取下载路径 + ProProjectFileExample projectFileExample = new ProProjectFileExample(); + projectFileExample.createCriteria().andBusinessIdEqualTo(getMinutes.getTaskId()).andBusinessTypeEqualTo((byte) 2); + List projectFileList = proProjectFileDao.selectByExample(projectFileExample); + if(CollectionUtil.isNotEmpty(projectFileList)){ + WpsFile wpsFile = wpsFileDao.selectByPrimaryKey(projectFileList.get(0).getWpsFileId()); + minutesInfo.setDownloadPath(wpsFile.getDownloadUrl()); + minutesInfo.setWpsFileId(wpsFile.getId()); + } + minutesInfoList.add(minutesInfo); + }); + return minutesInfoList; + } + //获取本周和上周的开始和结束时间 + long thisWeekStartTime = DateUtil.beginOfWeek(new Date()).getTime(); + long thisWeekEndTime = DateUtil.endOfWeek(new Date()).getTime(); + long lastWeekStartTime = DateUtil.beginOfWeek(new Date(thisWeekStartTime - 1)).getTime(); + long lastWeekEndTime = DateUtil.endOfWeek(new Date(thisWeekStartTime - 1)).getTime(); + //之前没有会议记录则重新生成 + Workbook wb = new XSSFWorkbook(); + //excel第一个sheet项目概览 + List> overviewMinutes = writeOverviewMinutes(getMinutes.getProjectIdList()); + PoiUtil.exportWB("会议记录", overviewMinutes, wb); + PoiUtil.setImg(wb,"会议记录", logo,0,1,0,1); + + if(CollectionUtil.isNotEmpty(getMinutes.getProjectIdList())){ + //每个项目一个sheet,循环添加进excel + String finalLogo = logo; + getMinutes.getProjectIdList().forEach(projectId ->{ + SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); + if(ObjectUtil.isNotNull(sysProject)){ + //查找上周任务 + List lastWeekTask = taskSubTimeDao.queryMinutesTaskByTime(projectId,lastWeekStartTime,lastWeekEndTime); + //查找本周任务 + List thisWeekTask = taskSubTimeDao.queryMinutesTaskByTime(projectId,thisWeekStartTime,thisWeekEndTime); + //查找项目经理名字和项目成员的名字 + String pmName = roleDao.getMemberNameByProjectId(projectId,"PM"); + //查找项目内的成员名用“,”分隔 + String memberName = roleDao.getMemberNameByProjectId(projectId,"Member"); + //生成excel写入的数据 + List> minutes = writeMinutes(lastWeekTask,thisWeekTask,sysProject.getName(),pmName,memberName); + PoiUtil.exportWB(sysProject.getName(), minutes, wb); + try { + PoiUtil.setImg(wb,sysProject.getName(), finalLogo,0,1,0,1); + } catch (IOException e) { + e.printStackTrace(); + } + } + }); + } +// SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); +// if(ObjectUtil.isNull(sysProject)){ +// throw new BaseException(CodeEnum.NOT_PROJECT); +// } +// //获取本周和上周的时间 +// long thisWeekStartTime = DateUtil.beginOfWeek(new Date()).getTime(); +// long thisWeekEndTime = DateUtil.endOfWeek(new Date()).getTime(); +// long lastWeekStartTime = DateUtil.beginOfWeek(new Date(thisWeekStartTime - 1)).getTime(); +// long lastWeekEndTime = DateUtil.endOfWeek(new Date(thisWeekStartTime - 1)).getTime(); +// //查找上周任务 +// List lastWeekTask = taskSubTimeDao.queryMinutesTaskByTime(projectId,lastWeekStartTime,lastWeekEndTime); +// //查找本周任务 +// List thisWeekTask = taskSubTimeDao.queryMinutesTaskByTime(projectId,thisWeekStartTime,thisWeekEndTime); +// //生成excel写入的数据 +// List> minutes = writeMinutes(lastWeekTask,thisWeekTask,sysProject.getName()); + //写入WBS +// ResourceLoader resourceLoader = new DefaultResourceLoader(); +// InputStream is = resourceLoader.getResource("classpath:template/regularMeetingTemplate.xlsx").getInputStream(); +// XSSFWorkbook wb = new XSSFWorkbook(is); + +// PoiUtil.exportWB("会议记录", minutes, wb); +// PoiUtil.setImg(wb,"会议记录",logo,0,1,0,1); + + //生成文件 + String name = "会议记录"+DateUtil.today() + ".xlsx"; + String fileName = "minutes/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = WebConstant.UPLOAD_PATH_BASE + File.separator + fileName; + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + tmpFile.getParentFile().mkdirs(); + } + OutputStream stream = new FileOutputStream(tmpFile); + wb.write(stream); + stream.close(); + //关联wps + WpsDto.Business business = new WpsDto.Business(); + business.setBusinessId(getMinutes.getTaskId()); + business.setBusinessType((byte) 2); + business.setUserId(currentUserId); + business.setFileName(name); + business.setFilePath(fileName); + business.setFileSize(tmpFile.length()); + business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); + business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_QUERY); + business.setPrivilegeQueryUrl(PropUtil.domain + "v1/3rd/wpsPower"); + wpsService.saveFile(business); + //获取wps文件的路径并返回 + wpsPath = wpsService.queryVisitUrls(getMinutes.getTaskId(),(byte) 2,token,null); + if(CollectionUtil.isNotEmpty(wpsPath)){ + wpsPath.forEach(wps->{ + PluginVo.MinutesInfo minutesInfo = new PluginVo.MinutesInfo(); + minutesInfo.setWpsPath(wps); + //获取下载路径 + ProProjectFileExample projectFileExample = new ProProjectFileExample(); + projectFileExample.createCriteria().andBusinessIdEqualTo(getMinutes.getTaskId()).andBusinessTypeEqualTo((byte) 2); + List projectFileList = proProjectFileDao.selectByExample(projectFileExample); + if(CollectionUtil.isNotEmpty(projectFileList)){ + WpsFile wpsFile = wpsFileDao.selectByPrimaryKey(projectFileList.get(0).getWpsFileId()); + minutesInfo.setDownloadPath(wpsFile.getDownloadUrl()); + minutesInfo.setWpsFileId(wpsFile.getId()); + } + minutesInfoList.add(minutesInfo); + }); + } + return minutesInfoList; + } + + @Override + public List updateMinutesProject(Long currentUserId, PluginDto.UpdateMinutes updateMinutes, String token) throws Exception { + //根据域名差logo + String logo = "/home/staticrec/logo.png"; + if(StrUtil.isNotEmpty(updateMinutes.getDomainName())) { + SysDomainExample domainExample = new SysDomainExample(); + domainExample.createCriteria().andDomainNameEqualTo(updateMinutes.getDomainName()); + List sysDomainList = sysDomainDao.selectByExample(domainExample); + if (CollectionUtil.isNotEmpty(sysDomainList)) { + logo = sysDomainList.get(0).getLogoPath(); + } + } + //查找到文件信息 + WpsFile wpsFile = wpsFileDao.selectByPrimaryKey(updateMinutes.getWpsFileId()); + //返回的文件路径信息 + List minutesInfoList = new ArrayList<>(); + List wpsPath = wpsService.queryVisitUrls(updateMinutes.getTaskId(),(byte) 2,token,null); + if(CollectionUtil.isNotEmpty(wpsPath)){ + wpsPath.forEach(wps->{ + PluginVo.MinutesInfo minutesInfo = new PluginVo.MinutesInfo(); + minutesInfo.setWpsPath(wps); + minutesInfo.setDownloadPath(wpsFile.getDownloadUrl()); + minutesInfo.setWpsFileId(wpsFile.getId()); + minutesInfoList.add(minutesInfo); + }); + } +// WpsFile wpsFile = new WpsFile(); +// wpsFile.setSaveUrl("F:\\home\\cloud\\tall\\uploads\\minutes\\2020-08-11\\1597117206328.xlsx"); + //获取本周和上周的开始和结束时间 + long thisWeekStartTime = DateUtil.beginOfWeek(new Date()).getTime(); + long thisWeekEndTime = DateUtil.endOfWeek(new Date()).getTime(); + long lastWeekStartTime = DateUtil.beginOfWeek(new Date(thisWeekStartTime - 1)).getTime(); + long lastWeekEndTime = DateUtil.endOfWeek(new Date(thisWeekStartTime - 1)).getTime(); + //修改文件 + if(ObjectUtil.isNotNull(wpsFile)){ + InputStream is = new FileInputStream(wpsFile.getSaveUrl()); + Workbook wb = new XSSFWorkbook(is); + if(ObjectUtil.isNotNull(wb)){ + if(CollectionUtil.isNotEmpty(updateMinutes.getProjectList())){ + String finalLogo = logo; + updateMinutes.getProjectList().forEach(project ->{ + SysProject sysProject = sysProjectDao.selectByPrimaryKey(project.getProjectId()); + if(ObjectUtil.isNotNull(sysProject)) { + if (project.getType() == 1) { + //删除sheet + if(wb.getSheetIndex(sysProject.getName()) != -1){ + wb.removeSheetAt(wb.getSheetIndex(sysProject.getName())); + } + }else { + //添加sheet + if(wb.getSheetIndex(sysProject.getName()) == -1){ + //查找上周任务 + List lastWeekTask = taskSubTimeDao.queryMinutesTaskByTime(project.getProjectId(),lastWeekStartTime,lastWeekEndTime); + //查找本周任务 + List thisWeekTask = taskSubTimeDao.queryMinutesTaskByTime(project.getProjectId(),thisWeekStartTime,thisWeekEndTime); + //查找项目经理名字和项目成员的名字 + String pmName = roleDao.getMemberNameByProjectId(project.getProjectId(),"PM"); + //查找项目内的成员名用“,”分隔 + String memberName = roleDao.getMemberNameByProjectId(project.getProjectId(),"Member"); + //生成excel写入的数据 + List> minutes = writeMinutes(lastWeekTask,thisWeekTask,sysProject.getName(),pmName,memberName); + PoiUtil.exportWB(sysProject.getName(), minutes, wb); + try { + PoiUtil.setImg(wb,sysProject.getName(), finalLogo,0,1,0,1); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + }); + } + } +// OutputStream stream = new FileOutputStream(wpsFile.getSaveUrl()); +// wb.write(stream); +// stream.close(); + + String name = "会议记录"+DateUtil.today() + ".xlsx"; + String fileName = "minutes/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx"; + String path = WebConstant.UPLOAD_PATH_BASE + File.separator + fileName; + File tmpFile = new File(path); + if (!tmpFile.getParentFile().exists()) { + tmpFile.getParentFile().mkdirs(); + } + OutputStream stream = new FileOutputStream(tmpFile); + wb.write(stream); + stream.close(); + //删除projectFile + ProProjectFileExample projectFileExample = new ProProjectFileExample(); + projectFileExample.createCriteria().andWpsFileIdEqualTo(wpsFile.getId()); + List projectFileList = proProjectFileDao.selectByExample(projectFileExample); + if(CollectionUtil.isNotEmpty(projectFileList)) { + projectFileList.forEach(proProjectFile -> { + proProjectFile.setRecStatus((byte) 2); + proProjectFileDao.updateByPrimaryKeySelective(proProjectFile); + }); + } + //重新保存wps + WpsDto.Business business = new WpsDto.Business(); + business.setBusinessId(updateMinutes.getTaskId()); + business.setBusinessType((byte) 2); + business.setUserId(currentUserId); + business.setFileName(name); + business.setFilePath(fileName); + business.setFileSize(tmpFile.length()); + business.setOperation(WebConstant.Wps.USER_OPERATION_NEW); + business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_QUERY); + business.setPrivilegeQueryUrl(PropUtil.domain + "v1/3rd/wpsPower"); + wpsService.saveFile(business); + + List minutesInfoList1 = new ArrayList<>(); + List wpsPath1 = wpsService.queryVisitUrls(updateMinutes.getTaskId(),(byte) 2,token,null); + if(CollectionUtil.isNotEmpty(wpsPath1)){ + wpsPath1.forEach(wps->{ + PluginVo.MinutesInfo minutesInfo = new PluginVo.MinutesInfo(); + minutesInfo.setWpsPath(wps); + minutesInfo.setDownloadPath(wpsFile.getDownloadUrl()); + minutesInfo.setWpsFileId(wpsFile.getId()); + minutesInfoList1.add(minutesInfo); + }); + } + return minutesInfoList1; + } + + return minutesInfoList; + } + + /** + * 生成excel的首页信息 + * @param projectIdList 项目id的集合 + * @return 范湖写入的数据 + */ + private List> writeOverviewMinutes(List projectIdList) { + List> sheet = new ArrayList<>(); + //logo 和标题 + List headerTitle = new ArrayList<>(); + headerTitle.add(new PoiUtil.PoiUtilCell("",1,1,1650,18)); + headerTitle.add(new PoiUtil.PoiUtilCell("周例会",7,1)); + sheet.add(headerTitle); + //会议时间和主持人 + List header1 = new ArrayList<>(); + header1.add(new PoiUtil.PoiUtilCell("会议时间")); + header1.add(new PoiUtil.PoiUtilCell("",3,1)); + header1.add(new PoiUtil.PoiUtilCell()); + header1.add(new PoiUtil.PoiUtilCell()); + header1.add(new PoiUtil.PoiUtilCell("主持人")); + header1.add(new PoiUtil.PoiUtilCell("",3,1)); + sheet.add(header1); + //参会人员 + List header2 = new ArrayList<>(); + header2.add(new PoiUtil.PoiUtilCell("参会人员",1,1)); + header2.add(new PoiUtil.PoiUtilCell("",7,1)); + sheet.add(header2); + //主题议题 + List header3 = new ArrayList<>(); + header3.add(new PoiUtil.PoiUtilCell("主题议题",1,1)); + header3.add(new PoiUtil.PoiUtilCell("",7,1)); + sheet.add(header3); + //再空一行 + List header4 = new ArrayList<>(); + header4.add(new PoiUtil.PoiUtilCell("",8,1)); + sheet.add(header4); + //会议记录内容 + List minutesValue = new ArrayList<>(); + minutesValue.add(new PoiUtil.PoiUtilCell("会议记录内容",8,1)); + sheet.add(minutesValue); + //上周任务表头 + List projectTitle = new ArrayList<>(); + projectTitle.add(new PoiUtil.PoiUtilCell("项目名",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("关键结果",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("计划开始时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("计划结束时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("实际开始时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("实际结束时间",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("PM",1,1)); + projectTitle.add(new PoiUtil.PoiUtilCell("进度",1,1)); + sheet.add(projectTitle); + if(CollectionUtil.isNotEmpty(projectIdList)){ + projectIdList.forEach(projectId ->{ + SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); + if(ObjectUtil.isNotNull(sysProject)){ + List project = new ArrayList<>(); + project.add(new PoiUtil.PoiUtilCell(sysProject.getName())); + sheet.add(project); + } + }); + } + //会议记录人和领导签字 + List end = new ArrayList<>(); + end.add(new PoiUtil.PoiUtilCell("会议记录人",1,1)); + end.add(new PoiUtil.PoiUtilCell("",3,1)); + end.add(new PoiUtil.PoiUtilCell()); + end.add(new PoiUtil.PoiUtilCell()); + end.add(new PoiUtil.PoiUtilCell("负责人签字",1,1)); + end.add(new PoiUtil.PoiUtilCell("",3,1)); + sheet.add(end); + //备注留白 + List remark = new ArrayList<>(); + remark.add(new PoiUtil.PoiUtilCell("",8,8)); + sheet.add(remark); + return sheet; + } + + /** + * 生成写入的数据格式 + * @param lastWeekTaskList 上周的任务 + * @param thisWeekTaskList 本周的任务 + * @return 返回写入excel的数据 + */ + private List> writeMinutes(List lastWeekTaskList, + List thisWeekTaskList, + String name,String pmName,String memberName) { + List> sheet = new ArrayList<>(); + //logo 和标题 + List headerTitle = new ArrayList<>(); + headerTitle.add(new PoiUtil.PoiUtilCell("",1,1,1650,18)); + headerTitle.add(new PoiUtil.PoiUtilCell(name+"周例会",7,1)); + sheet.add(headerTitle); + //会议时间和主持人 + List header1 = new ArrayList<>(); + header1.add(new PoiUtil.PoiUtilCell("会议时间")); + header1.add(new PoiUtil.PoiUtilCell("",3,1)); + header1.add(new PoiUtil.PoiUtilCell()); + header1.add(new PoiUtil.PoiUtilCell()); + header1.add(new PoiUtil.PoiUtilCell("PM")); + header1.add(new PoiUtil.PoiUtilCell(pmName,3,1)); + sheet.add(header1); + //参会人员 + List header2 = new ArrayList<>(); + header2.add(new PoiUtil.PoiUtilCell("项目成员",1,1)); + header2.add(new PoiUtil.PoiUtilCell(memberName,7,1)); + sheet.add(header2); + //主题议题 + List header3 = new ArrayList<>(); + header3.add(new PoiUtil.PoiUtilCell("关键结果KR",1,1)); + header3.add(new PoiUtil.PoiUtilCell("",7,1)); + sheet.add(header3); + //再空一行 + List header4 = new ArrayList<>(); + header4.add(new PoiUtil.PoiUtilCell("",8,1)); + sheet.add(header4); + //会议记录内容 + List minutesValue = new ArrayList<>(); + minutesValue.add(new PoiUtil.PoiUtilCell("会议记录内容",8,1)); + sheet.add(minutesValue); + + //上周任务 + List lastWeek = new ArrayList<>(); + lastWeek.add(new PoiUtil.PoiUtilCell("上周任务",8,1)); + sheet.add(lastWeek); + //上周任务内容 + generateExcelTask(lastWeekTaskList, sheet); + //本周任务 + List thisWeek = new ArrayList<>(); + thisWeek.add(new PoiUtil.PoiUtilCell("本周任务",8,1)); + sheet.add(thisWeek); + //本周任务内容 + generateExcelTask(thisWeekTaskList, sheet); + //会议记录人和领导签字 + List end = new ArrayList<>(); + end.add(new PoiUtil.PoiUtilCell("会议记录人",1,1)); + end.add(new PoiUtil.PoiUtilCell("",3,1)); + end.add(new PoiUtil.PoiUtilCell()); + end.add(new PoiUtil.PoiUtilCell()); + end.add(new PoiUtil.PoiUtilCell("负责人签字",1,1)); + end.add(new PoiUtil.PoiUtilCell("",3,1)); + sheet.add(end); + //备注留白 + List remark = new ArrayList<>(); + remark.add(new PoiUtil.PoiUtilCell("",8,8)); + sheet.add(remark); + + return sheet; + } + + private void generateExcelTask(List weekTaskList, List> sheet) { + //上周任务表头 + List taskWeek = new ArrayList<>(); + taskWeek.add(new PoiUtil.PoiUtilCell("角色名",1,1)); + taskWeek.add(new PoiUtil.PoiUtilCell("任务名",1,1)); + taskWeek.add(new PoiUtil.PoiUtilCell("计划开始时间",1,1)); + taskWeek.add(new PoiUtil.PoiUtilCell("计划结束时间",1,1)); + taskWeek.add(new PoiUtil.PoiUtilCell("实际开始时间",1,1)); + taskWeek.add(new PoiUtil.PoiUtilCell("实际结束时间",1,1)); + taskWeek.add(new PoiUtil.PoiUtilCell("交付物",1,1)); + taskWeek.add(new PoiUtil.PoiUtilCell("评论",1,1)); + sheet.add(taskWeek); + //循环获取任务内容 + if(CollectionUtil.isNotEmpty(weekTaskList)){ + weekTaskList.forEach(weekTask -> { + List lastWeekValue = new ArrayList<>(); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getExecutorRoleName(),1,1)); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getTaskName(),1,1)); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getBeginTime(),1,1)); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getEndTime(),1,1)); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getRealBeginTime(),1,1)); + lastWeekValue.add(new PoiUtil.PoiUtilCell(weekTask.getRealEndTime(),1,1)); + //获取交付物信息 + AtomicReference deliverName = new AtomicReference<>(""); + if(CollectionUtil.isNotEmpty(weekTask.getDeliverList())){ + weekTask.getDeliverList().forEach(deliverByMinutes -> deliverName.set(deliverName.get() + deliverByMinutes.getDeliverName() + "\n")); + } + lastWeekValue.add(new PoiUtil.PoiUtilCell(deliverName.get(),1,1)); + //获取评论信息 + AtomicReference comment = new AtomicReference<>(""); + if(CollectionUtil.isNotEmpty(weekTask.getComment())){ + weekTask.getComment().forEach(commentByMinutes -> comment.set( + comment.get() + commentByMinutes.getUserName() + ":" + commentByMinutes.getCommentValue() + "\n")); + } + lastWeekValue.add(new PoiUtil.PoiUtilCell(comment.get(),1,1)); + sheet.add(lastWeekValue); + }); + } + } + + + /** + * 修改插件配置 + * @param updatePluginConfig 插件配置 + */ + @Override + public void updatePluginConfig(PluginDto.UpdatePluginConfig updatePluginConfig) { + //获取任务详情id + Long taskDetailId = updatePluginConfig.getTaskId(); + ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(updatePluginConfig.getTaskId()); + if(ObjectUtil.isNotNull(taskSubTime)){ + taskDetailId = taskSubTime.getTaskDetailId(); + } + //获取插件id + Long sysPluginId = 0L; + ProTaskPlugin taskPlugin = taskPluginDao.selectByPrimaryKey(updatePluginConfig.getTaskPluginId()); + if(ObjectUtil.isNotNull(taskPlugin)){ + sysPluginId = taskPlugin.getPluginId(); + } + //查找原来的插件配置 + ProPluginConfigExample proPluginConfigExample = new ProPluginConfigExample(); + proPluginConfigExample.createCriteria().andTaskIdEqualTo(taskDetailId).andPluginIdEqualTo(sysPluginId); + List proPluginConfigList = proPluginConfigDao.selectByExample(proPluginConfigExample); + if(CollectionUtil.isNotEmpty(proPluginConfigList)){ + ProPluginConfig pluginConfig = proPluginConfigList.get(0); + //有则修改 + if(ObjectUtil.isNotNull(pluginConfig)){ + if(StrUtil.isNotEmpty(updatePluginConfig.getWebPath())) { + pluginConfig.setWebPath(updatePluginConfig.getWebPath()); + } + if(StrUtil.isNotEmpty(updatePluginConfig.getImportParam())) { + pluginConfig.setImportParam(updatePluginConfig.getImportParam()); + } + if(ObjectUtil.isNotNull(updatePluginConfig.getPlaceLocation())) { + pluginConfig.setPlaceLocation(updatePluginConfig.getPlaceLocation()); + } + if(ObjectUtil.isNotNull(updatePluginConfig.getRoutineLocation())) { + pluginConfig.setRoutineLocation(updatePluginConfig.getRoutineLocation()); + } + proPluginConfigDao.updateByPrimaryKeySelective(pluginConfig); + } + } else { + //没有则添加 + ProPluginConfig proPluginConfig = new ProPluginConfig(); + proPluginConfig.setId(snowflake.nextId()); + proPluginConfig.setTaskId(taskDetailId); + proPluginConfig.setPluginId(sysPluginId); + if(StrUtil.isNotEmpty(updatePluginConfig.getWebPath())) { + proPluginConfig.setWebPath(updatePluginConfig.getWebPath()); + } + if(StrUtil.isNotEmpty(updatePluginConfig.getImportParam())) { + proPluginConfig.setImportParam(updatePluginConfig.getImportParam()); + } + if(ObjectUtil.isNotNull(updatePluginConfig.getPlaceLocation())) { + proPluginConfig.setPlaceLocation(updatePluginConfig.getPlaceLocation()); + } + if(ObjectUtil.isNotNull(updatePluginConfig.getRoutineLocation())) { + proPluginConfig.setRoutineLocation(updatePluginConfig.getRoutineLocation()); + } + proPluginConfigDao.insertSelective(proPluginConfig); + } + + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java b/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java index 313df616..536d849a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java @@ -1,5 +1,6 @@ package com.ccsens.tall.service; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.lang.Snowflake; @@ -11,112 +12,142 @@ import com.ccsens.tall.bean.dto.message.SyncMessageWithStartDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.dao.*; - -import com.ccsens.tall.util.RobotUtil; +import com.ccsens.tall.util.TallConstant; import com.ccsens.util.CodeEnum; +import com.ccsens.util.JacksonUtil; import com.ccsens.util.WebConstant; +import com.ccsens.util.bean.message.common.InMessage; +import com.ccsens.util.bean.message.common.MessageConstant; +import com.ccsens.util.config.RabbitMQConfig; import com.ccsens.util.cron.CronConstant; import com.ccsens.util.cron.NatureToDate; import com.ccsens.util.exception.BaseException; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; +import org.springframework.amqp.core.AmqpTemplate; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.TransactionDefinition; +import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.support.DefaultTransactionDefinition; import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; +import java.util.*; +/** + * @author 逗 + */ @Slf4j @Service -@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class TaskSubTimeService implements ITaskSubTimeService { - @Autowired + @Resource private TaskSubTimeDao taskSubTimeDao; - @Autowired + @Resource private SysProjectDao sysProjectDao; - @Autowired + @Resource private TaskDeliverDao taskDeliverDao; - @Autowired + @Resource private TaskPluginDao taskPluginDao; - @Autowired + @Resource private ProSubTimeMemberDao proSubTimeMemberDao; - @Autowired - private IUserService userService; - @Autowired + @Resource private ProTaskDeliverPostLogDao proTaskDeliverPostLogDao; - @Autowired + @Resource private TaskDetailDao taskDetailDao; - @Autowired + @Resource private ProRoleDao proRoleDao; - @Autowired + @Resource private ProMemberDao proMemberDao; - @Autowired + @Resource private IProMemberService proMemberService; - @Autowired - private IProRoleService proRoleService; - @Autowired + @Resource private IProTaskDetailService taskDetailService; - @Autowired + @Resource private IMessageService messageService; - @Autowired + @Resource private IProLogService proLogService; - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private IRobotService robotService; + @Resource + private ProRemindDao proRemindDao; + @Autowired + private AmqpTemplate rabbitTemplate; + //定义事务对象 + @Resource + private PlatformTransactionManager transactionManager; @Override public void saveProTaskSubTask(ProTaskSubTime proTaskSubTime) { - taskSubTimeDao.insertSelective(proTaskSubTime); + //开启手动事务 + DefaultTransactionDefinition def = new DefaultTransactionDefinition(); + // 事务隔离级别,开启新事务 + def.setPropagationBehavior( TransactionDefinition.PROPAGATION_REQUIRES_NEW ); + //获取事务状态,并开启事务,相当于transation.begin(); + TransactionStatus status = transactionManager.getTransaction( def ); + try{ +// method();//执行方法 + taskSubTimeDao.insertSelective(proTaskSubTime); + transactionManager.commit( status ); //提交事务 + } catch(Exception e){ + transactionManager.rollback(status); + } + } /** * 完成任务 - * @param currentUserId - * @param subTimeId - * @throws Exception + * + * @param currentUserId userId + * @param subTimeId 任务日期id + * @throws Exception 任务详情 */ @Override public TaskVo.NormalTask finishTask(Long currentUserId, TaskDto.TaskSubTimeId subTimeId) throws Exception { int completedStatus = subTimeId.getCompletedStatus() == null ? 2 : subTimeId.getCompletedStatus(); + //获取当前时间 + Long now = System.currentTimeMillis(); //查找taskSubTime ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(subTimeId.getId()); - if(ObjectUtil.isNull(taskSubTime)){ - log.info("找不到此任务:subTimeId{}",subTimeId.getId()); + if (ObjectUtil.isNull(taskSubTime)) { + log.info("找不到此任务:subTimeId{}", subTimeId.getId()); throw new BaseException(CodeEnum.NOT_TASK); } //查找taskDetail ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskSubTime.getTaskDetailId()); - if(ObjectUtil.isNull(taskDetail)){ - log.info("找不到此任务:taskId{}",taskSubTime.getTaskDetailId()); + if (ObjectUtil.isNull(taskDetail)) { + log.info("找不到此任务:taskId{}", taskSubTime.getTaskDetailId()); throw new BaseException(CodeEnum.NOT_TASK); } //该用户是否是任务的负责人 ProRole role = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); - Boolean isBelongRole = proMemberService.userIsBelongRole(currentUserId, role.getId()); + Boolean isBelongRole = proMemberService.userIsBelongRole(currentUserId, role.getId(),null); if (!role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase) && !isBelongRole) { - log.info("此用户不是该任务的负责人:{}",role); + log.info("此用户不是该任务的负责人:{}", role); throw new BaseException(CodeEnum.IS_NOT_EXECUTOR); } //查找此用户在任务下的成员 - ProMember member = proMemberService.selectByUserId(currentUserId,taskDetail.getProjectId()); - //是否需要全部打卡完成 - if(taskDetail.getFinishNeedAll()==0) { + ProMember member = proMemberService.selectByUserId(currentUserId, taskDetail.getProjectId()); + if (ObjectUtil.isNull(member)) { + throw new BaseException(CodeEnum.NOT_MEMBER); + } + //如果是完成任务,判断子任务是否完成,交付物是否上传 + if (subTimeId.getCompletedStatus() == 2) { //是否有分组 if (taskDetail.getHasGroup() == 1) { //检查分组下的任务的完成状态 List subTimeList = taskDetailDao.selectSubTaskByGroupId(taskDetail.getId(), taskSubTime.getBeginTime(), taskSubTime.getEndTime()); - if(CollectionUtil.isNotEmpty(subTimeList)){ + if (CollectionUtil.isNotEmpty(subTimeList)) { for (ProTaskSubTime subTime : subTimeList) { ProSubTimeMember subTimeMember = taskDetailService.getProcessByUserIdAndTask(currentUserId, subTime.getId()); - if(ObjectUtil.isNull(subTimeMember) || subTimeMember.getComplatedStatus() != 2){ - log.info("分组下任务未全部完成:{}",subTime.getId()); + if (ObjectUtil.isNull(subTimeMember) || subTimeMember.getComplatedStatus() != 2) { + log.info("分组下任务未全部完成:{}", subTime.getId()); throw new BaseException(CodeEnum.SUB_TASK_IS_NOT_FINISH); } } @@ -139,149 +170,177 @@ public class TaskSubTimeService implements ITaskSubTimeService { } } - ProSubTimeMember subTimeMember = isFinishTask(member.getId(),subTimeId.getId()); - if(ObjectUtil.isNull(subTimeMember)){ + //添加成员完成记录 + ProSubTimeMember subTimeMember = isFinishTask(member.getId(), subTimeId.getId()); + if (ObjectUtil.isNull(subTimeMember)) { subTimeMember = new ProSubTimeMember(); subTimeMember.setId(snowflake.nextId()); subTimeMember.setComplatedStatus((byte) completedStatus); subTimeMember.setMemberId(member.getId()); subTimeMember.setTaskSubTimeId(subTimeId.getId()); - subTimeMember.setRealFinishTime(System.currentTimeMillis()); + subTimeMember.setRealFinishTime(now); proSubTimeMemberDao.insertSelective(subTimeMember); - }else { + } else { subTimeMember.setComplatedStatus((byte) completedStatus); - subTimeMember.setRealFinishTime(System.currentTimeMillis()); + subTimeMember.setRealFinishTime(now); proSubTimeMemberDao.updateByPrimaryKeySelective(subTimeMember); } - }else { - ProSubTimeMember subTimeMember = isFinishTask(member.getId(),subTimeId.getId()); - if(ObjectUtil.isNotNull(subTimeMember)){ - subTimeMember.setComplatedStatus((byte) completedStatus); - subTimeMember.setRealFinishTime(System.currentTimeMillis()); - proSubTimeMemberDao.updateByPrimaryKeySelective(subTimeMember); - }else { - subTimeMember = new ProSubTimeMember(); - subTimeMember.setId(snowflake.nextId()); - subTimeMember.setComplatedStatus((byte) completedStatus); - subTimeMember.setTaskSubTimeId(subTimeId.getId()); - subTimeMember.setMemberId(member.getId()); - subTimeMember.setRealFinishTime(System.currentTimeMillis()); - proSubTimeMemberDao.insertSelective(subTimeMember); + //不需要全部成员点完成,直接修改任务状态 + if (taskDetail.getFinishNeedAll() == 0) { + //完成任务时若任务没有开始时间则将计划开始时间设为实际开始时间 + if(taskSubTime.getRealBeginTime() == 0) { + taskSubTime.setRealBeginTime(taskSubTime.getBeginTime()); + } + taskSubTime.setRealEndTime(now); + taskSubTime.setComplatedStatus(subTimeId.getCompletedStatus()); + taskSubTimeDao.updateByPrimaryKeySelective(taskSubTime); + } + } else { + ProSubTimeMember proSubTimeMember = new ProSubTimeMember(); + proSubTimeMember.setRecStatus((byte) 2); + ProSubTimeMemberExample subTimeMemberExample = new ProSubTimeMemberExample(); + if (taskDetail.getFinishNeedAll() == 0) { + subTimeMemberExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId.getId()); + } else { + subTimeMemberExample.createCriteria().andTaskSubTimeIdEqualTo(subTimeId.getId()).andMemberIdEqualTo(member.getId()); } + proSubTimeMemberDao.updateByExampleSelective(proSubTimeMember, subTimeMemberExample); + //修改任务状态,删除完成时间 + taskSubTime.setRealEndTime((long) 0); + taskSubTime.setComplatedStatus(subTimeId.getCompletedStatus()); + taskSubTimeDao.updateByPrimaryKeySelective(taskSubTime); } + + //返回的任务详细信息 - TaskVo.NormalTask normalTask = taskDetailService.getTaskInfoByTaskId(currentUserId,taskDetail.getProjectId(),subTimeId.getId()); - //用智能助手发送消息 - robotService.finishTaskRobotSend(currentUserId,normalTask.getProjectId(),normalTask.getProjectName(),normalTask.getName(),normalTask.getExecutorRole(),completedStatus); + TaskVo.NormalTask normalTask = taskDetailService.getTaskInfoByTaskId(currentUserId, taskDetail.getProjectId(), subTimeId.getId(),null); + //用智能助手/ws/wx发送消息 + robotService.finishTaskRobotSend(currentUserId, normalTask.getProjectId(), normalTask.getProjectName(), normalTask.getName(), normalTask.getExecutorRole(), completedStatus); + return normalTask; } /** * 该成员是否完成了此任务(返回成员对任务的完成情况) */ - private ProSubTimeMember isFinishTask(Long memberId, Long subTimeId){ + private ProSubTimeMember isFinishTask(Long memberId, Long subTimeId) { ProSubTimeMember subTimeMember = null; ProSubTimeMemberExample subTimeMemberExample = new ProSubTimeMemberExample(); subTimeMemberExample.createCriteria().andMemberIdEqualTo(memberId) .andTaskSubTimeIdEqualTo(subTimeId); List subTimeMemberList = proSubTimeMemberDao.selectByExample(subTimeMemberExample); - if(CollectionUtil.isNotEmpty(subTimeMemberList)){ + if (CollectionUtil.isNotEmpty(subTimeMemberList)) { subTimeMember = subTimeMemberList.get(0); } return subTimeMember; } + /** * 开始任务 - * @param currentUserId - * @param startTaskDto - * @throws Exception + * + * @param currentUserId userid + * @param startTaskDto 开始任务 + * @throws Exception void */ @Override public void startTask(Long currentUserId, TaskDto.StartTask startTaskDto) throws Exception { - ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(startTaskDto.getId()); + ProTaskSubTime taskSubTime = taskSubTimeDao.selectByPrimaryKey(startTaskDto.getTaskId()); Long now = startTaskDto.getStartTime() == null ? System.currentTimeMillis() : startTaskDto.getStartTime(); - if(ObjectUtil.isNotNull(taskSubTime)){ - if(taskSubTime.getComplatedStatus() != 0){ - throw new BaseException(CodeEnum.TASK_PREPARATION); - } - //结束其他进行中的任务 - completeTask(startTaskDto.getId(),startTaskDto.getRoleId(),now); + if (ObjectUtil.isNotNull(taskSubTime)) { + //无论任务是什么状态,都可以重新开始 +// if (taskSubTime.getComplatedStatus() != 0) { +// throw new BaseException(CodeEnum.TASK_PREPARATION); +// } +// //结束其他进行中的任务 +// completeTask(startTaskDto.getId(), startTaskDto.getRoleId(), now); //开始指定的任务 taskSubTime.setRealBeginTime(now); + if(taskSubTime.getRealEndTime() != 0){ + taskSubTime.setRealEndTime(0L); + } taskSubTime.setComplatedStatus(1); taskSubTimeDao.updateByPrimaryKeySelective(taskSubTime); //查找任务的负责人名 String player = null; ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskSubTime.getTaskDetailId()); - if(ObjectUtil.isNotNull(taskDetail)){ + if (ObjectUtil.isNotNull(taskDetail)) { player = taskDetail.getDescription(); } - //发送消息 - SyncMessageWithStartDto syncMessage = new SyncMessageWithStartDto(); - SyncMessageWithStartDto.Data syncMessageData = new SyncMessageWithStartDto.Data(); - syncMessageData.setPlayer(player); - syncMessageData.setBeginTaskId(taskSubTime.getTaskDetailId()); - syncMessageData.setDuration(taskSubTime.getEndTime() - taskSubTime.getBeginTime()); - syncMessageData.setTime(now); +// //发送消息 +// SyncMessageWithStartDto syncMessage = new SyncMessageWithStartDto(); +// SyncMessageWithStartDto.Data syncMessageData = new SyncMessageWithStartDto.Data(); +// syncMessageData.setPlayer(player); +// syncMessageData.setBeginTaskId(taskSubTime.getTaskDetailId()); +// syncMessageData.setDuration(taskSubTime.getEndTime() - taskSubTime.getBeginTime()); +// syncMessageData.setTime(now); //接收者 List messageUserList = new ArrayList<>(); ProMemberExample memberExample = new ProMemberExample(); - memberExample.createCriteria().andProjectIdEqualTo(startTaskDto.getProjectId()); + memberExample.createCriteria().andProjectIdEqualTo(startTaskDto.getProjectId()).andUserIdNotEqualTo(0L); List memberList = proMemberDao.selectByExample(memberExample); - if(CollectionUtil.isNotEmpty(memberList)){ - for(ProMember member:memberList){ - if(ObjectUtil.isNotNull(member.getUserId())){ + Set userSet = new HashSet<>(); + if (CollectionUtil.isNotEmpty(memberList)) { + for (ProMember member : memberList) { + if (ObjectUtil.isNotNull(member.getUserId())) { BaseMessageDto.MessageUser messageUser = new BaseMessageDto.MessageUser(); messageUser.setUserId(member.getUserId()); messageUserList.add(messageUser); + userSet.add(member.getUserId().toString()); } } } BaseMessageDto.MessageUser messageUser1990 = new BaseMessageDto.MessageUser(); messageUser1990.setUserId(1990L); messageUserList.add(messageUser1990); + userSet.add("1990"); BaseMessageDto.MessageUser messageUser1991 = new BaseMessageDto.MessageUser(); messageUser1991.setUserId(1991L); messageUserList.add(messageUser1991); - BaseMessageDto.MessageUser messageUser1996 = new BaseMessageDto.MessageUser(); - messageUser1996.setUserId(1996L); - messageUserList.add(messageUser1996); + userSet.add("1991"); + BaseMessageDto.MessageUser messageUser1995 = new BaseMessageDto.MessageUser(); + messageUser1995.setUserId(1995L); + messageUserList.add(messageUser1995); + userSet.add("1995"); BaseMessageDto.MessageUser messageUser1998 = new BaseMessageDto.MessageUser(); messageUser1998.setUserId(1998L); messageUserList.add(messageUser1998); + userSet.add("1998"); - syncMessage.setData(syncMessageData); - syncMessage.setReceivers(messageUserList); - messageService.sendStartTaskMessage(syncMessage); + Long duration = taskSubTime.getEndTime() - taskSubTime.getBeginTime(); + SyncMessageWithStartDto syncMessage = new SyncMessageWithStartDto(startTaskDto.getProjectId(),null,null, + startTaskDto.getRoleId(),taskSubTime.getTaskDetailId(),null,now,duration,player); + +// messageService.sendStartTaskMessage(syncMessage); + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(userSet); + inMessage.setData(JacksonUtil.beanToJson(syncMessage)); + log.info("开始任务消息,{}",JacksonUtil.beanToJson(inMessage)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, + JacksonUtil.beanToJson(inMessage)); -// //发送同步消息 -// SysProject project = sysProjectDao.selectByPrimaryKey(startTaskDto.getProjectId()); -// //已发布的项目才同步 -// if (ObjectUtil.isNotNull(project.getPublished()) && project.getPublished() == 1) { -// messageService.sendSyncMessageWithStart(currentUserId, startTaskDto.getProjectId(), startTaskDto.getRoleId(), taskSubTime.getTaskDetailId(), now, -// taskSubTime.getEndTime() - taskSubTime.getBeginTime(),player); -// } //3.添加记录 proLogService.addNewProLog(now, taskSubTime.getId(), WebConstant.TASK_Execute_Type.Start.value, WebConstant.TASK_Execute_Type.Start.phase, currentUserId); - }else { + } else { throw new BaseException(CodeEnum.NOT_TASK); } } /** * 结束其他进行中的任务 - * @param roleId - * @param time + * + * @param roleId 角色id + * @param time 时间 */ - private void completeTask(Long subTaskId,Long roleId, Long time) { - List proTaskSubTimeList = taskSubTimeDao.getUnderwayTaskByRoleId(subTaskId,roleId); - if(CollectionUtil.isNotEmpty(proTaskSubTimeList)){ - for(ProTaskSubTime proTaskSubTime : proTaskSubTimeList){ + private void completeTask(Long subTaskId, Long roleId, Long time) { + List proTaskSubTimeList = taskSubTimeDao.getUnderwayTaskByRoleId(subTaskId, roleId); + if (CollectionUtil.isNotEmpty(proTaskSubTimeList)) { + for (ProTaskSubTime proTaskSubTime : proTaskSubTimeList) { proTaskSubTime.setRealEndTime(time); proTaskSubTime.setComplatedStatus(2); taskSubTimeDao.updateByPrimaryKeySelective(proTaskSubTime); @@ -301,49 +360,51 @@ public class TaskSubTimeService implements ITaskSubTimeService { detail.setCycle(addTask.getCycle()); detail.setParentId(addTask.getParentTaskId()); detail.setExecutorRole(addTask.getExecutorId()); - - SysProject project = null; - if(ObjectUtil.isNotNull(addTask.getProjectId())){ + //添加任务优先级 + if(ObjectUtil.isNotNull(addTask.getPriority())){ + detail.setPriority(addTask.getPriority()); + } + SysProject project; + if (ObjectUtil.isNotNull(addTask.getProjectId())) { project = sysProjectDao.selectByPrimaryKey(addTask.getProjectId()); if (ObjectUtil.isNotNull(project)) { detail.setProjectId(addTask.getProjectId()); detail.setBeginTime(project.getBeginTime()); detail.setEndTime(project.getEndTime()); detail.setLevel((byte) 2); - }else { + } else { throw new BaseException("项目信息不正确"); } + } else { + throw new BaseException(CodeEnum.PARAM_ERROR); } - if(ObjectUtil.isNotNull(addTask.getParentTaskId())){ -// ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(addTask.getParentTaskId()); -// if(ObjectUtil.isNotNull(subTime)) { - ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(addTask.getParentTaskId()); - if (ObjectUtil.isNotNull(taskDetail)) { - detail.setProjectId(taskDetail.getProjectId()); - detail.setParentId(taskDetail.getId()); - detail.setBeginTime(taskDetail.getBeginTime()); - detail.setEndTime(taskDetail.getEndTime()); - detail.setLevel((byte) (taskDetail.getLevel() + 1)); - if(taskDetail.getLevel() == 1){ - detail.setBeginTime(System.currentTimeMillis()); - detail.setEndTime(com.ccsens.util.DateUtil.getYMD(DateUtil.tomorrow()).getTime()); - } -// taskDetail.setHasGroup((byte) 1); -// taskDetailDao.updateByPrimaryKeySelective(taskDetail); - } else { - throw new BaseException("任务信息不正确"); - } -// } + if (ObjectUtil.isNotNull(addTask.getParentTaskId())) { + ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(addTask.getParentTaskId()); + if (ObjectUtil.isNotNull(taskDetail)) { + detail.setProjectId(taskDetail.getProjectId()); + detail.setParentId(taskDetail.getId()); + detail.setBeginTime(taskDetail.getBeginTime()); + detail.setEndTime(taskDetail.getEndTime()); + detail.setLevel((byte) (taskDetail.getLevel() + 1)); +// if (taskDetail.getLevel() == 1) { +// detail.setBeginTime(System.currentTimeMillis()); +// detail.setEndTime(com.ccsens.util.DateUtil.getYMD(DateUtil.tomorrow()).getTime()); +// } + } else { + throw new BaseException("任务信息不正确"); + } + } else { + detail.setLevel((byte) 1); } - if(ObjectUtil.isNotNull(addTask.getBeginTime())){ + if (ObjectUtil.isNotNull(addTask.getBeginTime())) { detail.setBeginTime(addTask.getBeginTime()); } - if(ObjectUtil.isNotNull(addTask.getEndTime())){ + if (ObjectUtil.isNotNull(addTask.getEndTime())) { detail.setEndTime(addTask.getEndTime()); } taskDetailDao.insertSelective(detail); - if(ObjectUtil.isNotNull(addTask.getProjectId())){ - if(ObjectUtil.isNotNull(project)) { + if (ObjectUtil.isNotNull(addTask.getProjectId())) { + if (ObjectUtil.isNotNull(project)) { if (detail.getBeginTime() < project.getBeginTime()) { project.setBeginTime(detail.getBeginTime()); } @@ -355,7 +416,7 @@ public class TaskSubTimeService implements ITaskSubTimeService { } //TaskSubTime List proTaskSubTimeList = new ArrayList<>(); - if(ObjectUtil.isNotNull(detail.getProjectId())){ + if (ObjectUtil.isNotNull(detail.getProjectId())) { //cycle为空,只加一条数据 if (StrUtil.isEmpty(detail.getCycle())) { ProTaskSubTime proTaskSubTime = new ProTaskSubTime(); @@ -384,16 +445,17 @@ public class TaskSubTimeService implements ITaskSubTimeService { } } //交付物 - if(StrUtil.isNotEmpty(addTask.getTaskDeliver())){ + if (StrUtil.isNotEmpty(addTask.getTaskDeliver())) { ProTaskDeliver deliver = new ProTaskDeliver(); deliver.setId(snowflake.nextId()); deliver.setTaskDetailId(detail.getId()); + deliver.setName(addTask.getTaskDeliver()); deliver.setIsInput(0); taskDeliverDao.insertSelective(deliver); } //插件 - if(CollectionUtil.isNotEmpty(addTask.getPluginList())){ - for(Long pluginId:addTask.getPluginList()){ + if (CollectionUtil.isNotEmpty(addTask.getPluginList())) { + for (Long pluginId : addTask.getPluginList()) { ProTaskPlugin plugin = new ProTaskPlugin(); plugin.setId(snowflake.nextId()); plugin.setTaskDetailId(detail.getId()); @@ -404,26 +466,276 @@ public class TaskSubTimeService implements ITaskSubTimeService { } //获取符合当前时间的subtimeId Long subTimeId = taskDetailDao.selectSubTimeByTaskIdAndTime(detail.getId(), System.currentTimeMillis()); - if(ObjectUtil.isNull(subTimeId) && CollectionUtil.isNotEmpty(proTaskSubTimeList)){ + if (ObjectUtil.isNull(subTimeId) && CollectionUtil.isNotEmpty(proTaskSubTimeList)) { subTimeId = proTaskSubTimeList.get(0).getId(); } + //添加任务提醒 + List remindInfoList = new ArrayList<>(); + if(ObjectUtil.isNotNull(addTask.getTaskRemind())){ + TaskDto.TaskRemind taskRemind = new TaskDto.TaskRemind(); + BeanUtil.copyProperties(addTask.getTaskRemind(),taskRemind); + taskRemind.setTaskId(subTimeId); + remindInfoList = saveRemind(currentUserId,taskRemind); + } + //返回 - TaskVo.NormalTask taskDetail = taskDetailDao.selectTaskByTaskId(subTimeId, detail.getId(),detail.getExecutorRole()); - if(ObjectUtil.isNotNull(taskDetail)) { - taskDetailService.managePlugin(currentUserId, detail.getExecutorRole(), taskDetail); + TaskVo.NormalTask taskDetail = taskDetailDao.selectTaskByTaskId(subTimeId, detail.getId(), detail.getExecutorRole()); + + if (ObjectUtil.isNotNull(taskDetail)) { + taskDetailService.managePlugin(currentUserId, detail.getExecutorRole(), taskDetail,null); + taskDetail.setRemindInfoList(remindInfoList); } //通过智能助手发送通知 - robotService.addTaskRobotSend(currentUserId,project,addTask.getTaskName(),addTask.getExecutorId()); + robotService.addTaskRobotSend(currentUserId, project, addTask.getTaskName(), addTask.getExecutorId()); + return taskDetail; } /** * 清空项目下所有任务的实际开始结束时间,和运行状态 - * @param projectId + * @param projectId 项目id */ @Override public void clearTaskRealTime(Long projectId) { taskSubTimeDao.clearTaskRealTime(projectId); } + + /** + * 看板上查找任务信息 + * + * @param currentUserId userId + * @param projectId 项目id + * @param roleId 角色id + * @param type 任务状态 0未开始 1进行中 2已完成 + * @param page 页数 + * @param pageSize 每页数量 + * @return 任务列表 + */ + @Override + public List getKanbanTake(Long currentUserId, Long projectId, Long roleId, Integer type, + Integer page, Integer pageSize, Integer orderType, Integer order) throws Exception { + //返回的list + List kanBans = new ArrayList<>(); + //查找此用户在任务下的成员 + ProMember member = proMemberService.selectByUserId(currentUserId, projectId); + if (ObjectUtil.isNull(member)) { + throw new BaseException(CodeEnum.NOT_MEMBER); + } + + //TODO 暂时确定三个状态 + Map typeMap = new HashMap<>(0); + typeMap.put(0, "未开始"); + typeMap.put(1, "进行中"); + typeMap.put(2, "已完成"); + + if (ObjectUtil.isNull(type)) { + for (Map.Entry entry : typeMap.entrySet()) { + log.info("key= " + entry.getKey() + " and value= " + entry.getValue()); + TaskVo.KanBan kanBan = new TaskVo.KanBan(); + kanBan.setCode(entry.getKey()); + kanBan.setTypeName(entry.getValue()); + PageHelper.startPage(page, pageSize); + if (kanBan.getCode() <= 2) { + List kanBanTaskList = taskSubTimeDao.getKanbanTake(currentUserId,projectId, roleId, kanBan.getCode(), member.getId(),orderType,order); + kanBan.setTaskList(new PageInfo<>(kanBanTaskList)); + } else { + List kanBanTaskList = taskSubTimeDao.getKanbanTakeByType(currentUserId,projectId, roleId, kanBan.getCode(),orderType,order); + kanBan.setTaskList(new PageInfo<>(kanBanTaskList)); + } + kanBans.add(kanBan); + } + } else { + TaskVo.KanBan kanBan = new TaskVo.KanBan(); + kanBan.setCode(type); + kanBan.setTypeName(typeMap.get(type)); + PageHelper.startPage(page, pageSize); + if (kanBan.getCode() <= 2) { + List kanBanTaskList = taskSubTimeDao.getKanbanTake(currentUserId,projectId, roleId, type, member.getId(),orderType,order); + kanBan.setTaskList(new PageInfo<>(kanBanTaskList)); + } else { + List kanBanTaskList = taskSubTimeDao.getKanbanTakeByType(currentUserId,projectId, roleId, type,orderType,order); + kanBan.setTaskList(new PageInfo<>(kanBanTaskList)); + } + kanBans.add(kanBan); + } + + return kanBans; + } + + /** + * 修改看板上的任务状态 + * + * @param currentUserId userId + * @param changeKanbanTask 任务状态 + */ + @Override + public void changeKanbanTake(Long currentUserId, TaskDto.ChangeKanbanTask changeKanbanTask) throws Exception { + //查找任务 + ProTaskSubTime proTaskSubTime = taskSubTimeDao.selectByPrimaryKey(changeKanbanTask.getId()); + if (ObjectUtil.isNull(proTaskSubTime)) { + throw new BaseException(CodeEnum.NOT_TASK); + } + if (changeKanbanTask.getType() <= 2) { + TaskDto.TaskSubTimeId subTimeId = new TaskDto.TaskSubTimeId(); + subTimeId.setId(changeKanbanTask.getId()); + subTimeId.setCompletedStatus(changeKanbanTask.getType()); + finishTask(currentUserId, subTimeId); + } else { + proTaskSubTime.setComplatedStatus(changeKanbanTask.getType()); + taskSubTimeDao.updateByPrimaryKeySelective(proTaskSubTime); + } + } + + + @Override + public List saveRemind(Long userId,TaskDto.TaskRemind taskRemind) { + ProTaskSubTime proTaskSubTime = taskSubTimeDao.selectByPrimaryKey(taskRemind.getTaskId()); + if(ObjectUtil.isNull(proTaskSubTime)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + ProTaskDetail proTaskDetail = taskDetailDao.selectByPrimaryKey(proTaskSubTime.getTaskDetailId()); + if(ObjectUtil.isNull(proTaskDetail)){ + throw new BaseException(CodeEnum.NOT_TASK); + } +// //判断用户是否是任务的负责人 +// ProRole role = proRoleDao.selectByPrimaryKey(proTaskDetail.getExecutorRole()); +// Boolean isBelongRole = proMemberService.userIsBelongRole(userId, role.getId()); +// if (!role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase) && !isBelongRole) { +// log.info("此用户不是该任务的负责人:{}", role); +// throw new BaseException(CodeEnum.IS_NOT_EXECUTOR); +// } + Long absoluteTime = 0L; + //计算提醒的绝对时间 + switch (taskRemind.getRemindTiming()) { + case TallConstant.TaskRemindTiming.REMIND_TASK_BEFORE_START: + absoluteTime = proTaskSubTime.getBeginTime() - taskRemind.getDuration(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_START: + absoluteTime = proTaskSubTime.getBeginTime(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_AFTER_START: + absoluteTime = proTaskSubTime.getBeginTime() + taskRemind.getDuration(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_BEFORE_END: + absoluteTime = proTaskSubTime.getEndTime() - taskRemind.getDuration(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_END: + absoluteTime = proTaskSubTime.getEndTime(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_AFTER_END: + absoluteTime = proTaskSubTime.getEndTime() + taskRemind.getDuration(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_USER_DEFINED: + absoluteTime = taskRemind.getDuration(); + break; + default: + } + //获取时长 + String unit = ""; + if(taskRemind.getRemindTiming() == 2 || taskRemind.getRemindTiming() == 5 || taskRemind.getRemindTiming() == 7){ + unit = DateUtil.format(new Date(absoluteTime),"MM月dd日HH时mm分"); + }else { + if(taskRemind.getUnit() == 0){ + unit = taskRemind.getDuration()/60/1000 + "分钟"; + }else if(taskRemind.getUnit() == 1){ + unit = taskRemind.getDuration()/60/60/1000 + "小时"; + }else if(taskRemind.getUnit() == 2){ + unit = taskRemind.getDuration()/24/60/60/1000 + "天"; + } + } + //添加提醒信息 + ProRemind remind = new ProRemind(); + remind.setId(snowflake.nextId()); + remind.setSubTaskId(taskRemind.getTaskId()); + remind.setRemindTiming(taskRemind.getRemindTiming()); + remind.setRemindAbsoluteTime(absoluteTime); + remind.setFinishStatus((byte) 0); + remind.setDuration(unit); + proRemindDao.insertSelective(remind); + //返回这个任务的所有提醒信息 + return proRemindDao.queryRemindByTask(taskRemind.getTaskId()); + } + + @Override + public List deleteRemind(Long currentUserId, TaskDto.DeleteTaskRemind deleteTaskRemind) { + ProRemind proRemind = proRemindDao.selectByPrimaryKey(deleteTaskRemind.getRemindId()); + if(ObjectUtil.isNull(proRemind)){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } + proRemind.setRecStatus((byte) 2); + proRemindDao.updateByPrimaryKeySelective(proRemind); + return proRemindDao.queryRemindByTask(proRemind.getSubTaskId()); + } + + @Override + public List updateRemind(Long currentUserId, TaskDto.UpdateTaskRemind updateTaskRemind) { + //查找提醒 + ProRemind proRemind = proRemindDao.selectByPrimaryKey(updateTaskRemind.getRemindId()); + if(ObjectUtil.isNull(proRemind)){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } + //查找任务 + ProTaskSubTime proTaskSubTime = taskSubTimeDao.selectByPrimaryKey(proRemind.getSubTaskId()); + if(ObjectUtil.isNull(proTaskSubTime)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + //修改提醒的时机 + Long absoluteTime = 0L; + if(updateTaskRemind.getRemindTiming() != null){ + proRemind.setRemindTiming(updateTaskRemind.getRemindTiming()); + switch (proRemind.getRemindTiming()) { + case TallConstant.TaskRemindTiming.REMIND_TASK_START: + absoluteTime = proTaskSubTime.getBeginTime(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_END: + absoluteTime = proTaskSubTime.getEndTime(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_USER_DEFINED: + absoluteTime = updateTaskRemind.getDuration(); + break; + default: + } + } + //修改时间和单位 + if(updateTaskRemind.getDuration() != null){ + if(updateTaskRemind.getUnit() == null){ + throw new BaseException(CodeEnum.NOT_UNIT); + } + switch (proRemind.getRemindTiming()) { + case TallConstant.TaskRemindTiming.REMIND_TASK_BEFORE_START: + absoluteTime = proTaskSubTime.getBeginTime() - updateTaskRemind.getDuration(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_AFTER_START: + absoluteTime = proTaskSubTime.getBeginTime() + updateTaskRemind.getDuration(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_BEFORE_END: + absoluteTime = proTaskSubTime.getEndTime() - updateTaskRemind.getDuration(); + break; + case TallConstant.TaskRemindTiming.REMIND_TASK_AFTER_END: + absoluteTime = proTaskSubTime.getEndTime() + updateTaskRemind.getDuration(); + break; + default: + } + //获取时长 + String unit = ""; + if(proRemind.getRemindTiming() == 2 || proRemind.getRemindTiming() == 5 || proRemind.getRemindTiming() == 7){ + unit = DateUtil.format(new Date(absoluteTime),"MM月dd日HH时mm分"); + }else { + if(updateTaskRemind.getUnit() == 0){ + unit = updateTaskRemind.getDuration()/60/1000 + "分钟"; + }else if(updateTaskRemind.getUnit() == 1){ + unit = updateTaskRemind.getDuration()/60/60/1000 + "小时"; + }else if(updateTaskRemind.getUnit() == 2){ + unit = updateTaskRemind.getDuration()/24/60/60/1000 + "天"; + } + } + proRemind.setDuration(unit); + } + if(absoluteTime != 0){ + proRemind.setRemindAbsoluteTime(absoluteTime); + } + proRemindDao.updateByPrimaryKeySelective(proRemind); + return proRemindDao.queryRemindByTask(proRemind.getSubTaskId()); + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/UserInfoService.java b/tall/src/main/java/com/ccsens/tall/service/UserInfoService.java new file mode 100644 index 00000000..d2e58728 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/UserInfoService.java @@ -0,0 +1,259 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.io.FileUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ImageUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.UserDto; +import com.ccsens.tall.bean.po.*; +import com.ccsens.tall.bean.vo.UserVo; +import com.ccsens.tall.persist.dao.SysAuthDao; +import com.ccsens.tall.persist.dao.SysLabelDao; +import com.ccsens.tall.persist.dao.SysUserDao; +import com.ccsens.tall.persist.dao.SysUserInfoDao; +import com.ccsens.tall.util.TallConstant; +import com.ccsens.util.*; +import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.FileUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import javax.servlet.http.Part; +import java.io.File; +import java.security.NoSuchAlgorithmException; +import java.security.spec.InvalidKeySpecException; +import java.util.Date; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class UserInfoService implements IUserInfoService{ + @Resource + private RedisUtil redisUtil; + @Resource + private SysAuthDao sysAuthDao; + @Resource + private SysUserDao sysUserDao; + @Resource + private SysLabelDao sysLabelDao; + @Resource + private SysUserInfoDao sysUserInfoDao; + @Resource + private Snowflake snowflake; + + @Override + public void updateAccount(Long userId, UserDto.UpdateAccount changeAccount) { + //判断验证码是否正确 + if (redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(changeAccount.getPhone()))) { + if (changeAccount.getSmsCode().equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(changeAccount.getPhone())).toString())) { + //查找redis该账号是否正在使用 + String accountKey = TallConstant.getUpdateAccount(changeAccount.getAccount()); + if(redisUtil.hasKey(accountKey)){ + throw new BaseException(CodeEnum.ALREADY_EXIST_ACCOUNT); + } + //未查到则存进redis时效一分钟 + redisUtil.set(accountKey,changeAccount.getAccount(),60); + //检查数据库内账号是否存在 + SysAuthExample sysAuthExample = new SysAuthExample(); + sysAuthExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) + .andIdentifierEqualTo(changeAccount.getAccount()); + List sysAuthList = sysAuthDao.selectByExample(sysAuthExample); + if(CollectionUtil.isNotEmpty(sysAuthList)){ + throw new BaseException(CodeEnum.ALREADY_EXIST_ACCOUNT); + } + //修改账号 + SysAuthExample authAccountExample = new SysAuthExample(); + authAccountExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value); + List authList = sysAuthDao.selectByExample(authAccountExample); + if(CollectionUtil.isNotEmpty(authList)){ + authList.forEach(sysAuth -> { + //验证密码 + try { + if (!ShiroKit.authenticate(changeAccount.getPassword(), sysAuth.getCredential(), sysAuth.getSalt())) { + throw new BaseException(CodeEnum.PASSWORD_ERROR); + } + sysAuth.setIdentifier(changeAccount.getAccount()); + sysAuthDao.updateByPrimaryKeySelective(sysAuth); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } catch (InvalidKeySpecException e) { + e.printStackTrace(); + } + }); + }else { + //不存在则添加账号 + SysAuth sysAuth = new SysAuth(); + sysAuth.setId(snowflake.nextId()); + sysAuth.setUserId(userId); + sysAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); + sysAuth.setIdentifier(changeAccount.getAccount()); + sysAuth.setSalt(ShiroKit.getRandomSalt(6)); + sysAuth.setCredential(ShiroKit.md5(changeAccount.getPassword(), sysAuth.getSalt())); + sysAuthDao.insertSelective(sysAuth); + } + //修改完删除redis + redisUtil.del(accountKey); + }else { + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); + } + }else { + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); + } + } + + @Override + public void updateNickname(Long userId, UserDto.UpdateNickname updateNickname) { + //查找redis该昵称是否正在使用 + String nicknameKey = TallConstant.getUpdateNickname(updateNickname.getNickname()); + if(redisUtil.hasKey(nicknameKey)){ + throw new BaseException(CodeEnum.NICKNAME_REPEAT); + } + //未查到则存进redis时效一分钟 + redisUtil.set(nicknameKey,updateNickname.getNickname(),60); + //查找数据库此昵称是否存在 + SysUserExample sysUserExample = new SysUserExample(); + sysUserExample.createCriteria().andNicknameEqualTo(updateNickname.getNickname()); + List userList = sysUserDao.selectByExample(sysUserExample); + if(CollectionUtil.isNotEmpty(userList)){ + throw new BaseException(CodeEnum.NICKNAME_REPEAT); + } + SysUser user = sysUserDao.selectByPrimaryKey(userId); + if(ObjectUtil.isNotNull(user)){ + user.setNickname(updateNickname.getNickname()); + sysUserDao.updateByPrimaryKeySelective(user); + } + redisUtil.del(nicknameKey); + } + + @Override + public void uploadAvatarUrl(Long currentUserId, Part file) throws Exception { + //获取文件大小 + float fileSize = (float) file.getSize(); + System.out.println(fileSize); + //计算出倍数 + float a = (float)(80 * 1024) / fileSize; + System.out.println(a); + //限制文件格式 + String allowedExts = "png,jpg,jpeg"; + String original = UploadFileUtil_Servlet3.getFileNameByPart(file); + String ext = FileUtil.extName(original); + if (StrUtil.isEmpty(ext) || !allowedExts.contains(ext)){ + throw new NotSupportedFileTypeException("不支持的格式类型: " + ext); + } + //创建文件目录及名字 + String extraPath = DateUtil.format(new Date(), "yyyyMMdd"); + //上传的文件 + String temporaryFilePath = File.separator + IdUtil.simpleUUID() + "." + ext; + File temporaryFile = new File(WebConstant.UPLOAD_AVATAR_URL + extraPath + temporaryFilePath); + FileUtils.copyInputStreamToFile(file.getInputStream(), temporaryFile); + //压缩后的文件 + String compressFilePath = File.separator + IdUtil.simpleUUID() + "." + ext; + File compressFile = new File(WebConstant.UPLOAD_AVATAR_URL+ extraPath + compressFilePath); + //文件大于80k则进行压缩,否则不压缩 + if(a < 1) { + ImageUtil.scale(temporaryFile, compressFile, a); + } + //获取文件的压缩前的文件名 + String fullPath = WebConstant.UPLOAD_PATH_AVATAR_URL + File.separator + extraPath + temporaryFilePath; + //压缩前和压缩后的文件都存在则删除压缩前的文件 + if(temporaryFile.exists() && compressFile.exists()){ + FileUtil.del(temporaryFile); + //压缩成功后获取压缩后的文件名 + fullPath = WebConstant.UPLOAD_PATH_AVATAR_URL + File.separator + extraPath + compressFilePath; + } + + //查找到当前的用户,修改头像路径信息 + SysUser sysUser = sysUserDao.selectByPrimaryKey(currentUserId); + + sysUser.setAvatarUrl(PropUtil.gatewayUrl + WebConstant.TALL_UPLOADS + fullPath); + sysUserDao.updateByPrimaryKeySelective(sysUser); + } + + @Override + public UserVo.SelectUserInfo selectUserInfo(Long currentUserId){ + UserVo.SelectUserInfo selectUserInfo = sysUserDao.selectUserInfo(currentUserId); + if(ObjectUtil.isNotNull(selectUserInfo)){ + //计算注册时长 + if(ObjectUtil.isNotNull(selectUserInfo.getCreatedAt())){ + long now = System.currentTimeMillis(); + selectUserInfo.setDayOfUseTall((int) ((now - selectUserInfo.getCreatedAt().getTime()) / 1000 / 3600 / 24)); + } + //获取标签信息 + selectUserInfo.setLabelList(sysLabelDao.selectLabelByUserId(currentUserId,null)); + //获取空间使用信息 + UserVo.Interspace interspace = sysUserDao.selectInterspace(currentUserId); + selectUserInfo.setInterspace(interspace); + } + + return selectUserInfo; + } + + @Override + public UserVo.SelectUserInfo updateUserInfo(Long currentUserId, UserDto.UpdateUserInfo updateUserInfo) { + //查找用户 + SysUser user = sysUserDao.selectByPrimaryKey(updateUserInfo.getId()); + if(ObjectUtil.isNull(user)){ + throw new BaseException(CodeEnum.NOT_USER); + } + //查找用户详细信息的记录 + SysUserInfo sysUserInfo; + SysUserInfoExample sysUserInfoExample = new SysUserInfoExample(); + sysUserInfoExample.createCriteria().andUserIdEqualTo(updateUserInfo.getId()); + List sysUserInfoList = sysUserInfoDao.selectByExample(sysUserInfoExample); + if(CollectionUtil.isNotEmpty(sysUserInfoList)){ + sysUserInfo = sysUserInfoList.get(0); + }else { + sysUserInfo = new SysUserInfo(); + sysUserInfo.setId(snowflake.nextId()); + sysUserInfo.setUserId(updateUserInfo.getId()); + sysUserInfoDao.insertSelective(sysUserInfo); + } + //修改昵称 + if(StrUtil.isNotEmpty(updateUserInfo.getNickname())){ + UserDto.UpdateNickname updateNickname = new UserDto.UpdateNickname(); + updateNickname.setNickname(updateUserInfo.getNickname()); + updateNickname(updateUserInfo.getId(),updateNickname); + } + //个人签名 + if(StrUtil.isNotEmpty(updateUserInfo.getSignature())){ + sysUserInfo.setSignature(updateUserInfo.getSignature()); + } + //个人简介 + if(StrUtil.isNotEmpty(updateUserInfo.getIntroduction())){ + sysUserInfo.setIntroduction(updateUserInfo.getIntroduction()); + } + //生日 + if(StrUtil.isNotEmpty(updateUserInfo.getBirthday())){ + sysUserInfo.setBirthday(updateUserInfo.getBirthday()); + } + //所在地 + if(StrUtil.isNotEmpty(updateUserInfo.getAddress())){ + sysUserInfo.setAddress(updateUserInfo.getAddress()); + } + //网页 + if(StrUtil.isNotEmpty(updateUserInfo.getWebPath())){ + sysUserInfo.setWebPath(updateUserInfo.getWebPath()); + } + //公司 + if(StrUtil.isNotEmpty(updateUserInfo.getCompany())){ + sysUserInfo.setCompany(updateUserInfo.getCompany()); + } + //职位 + if(StrUtil.isNotEmpty(updateUserInfo.getPosition())){ + sysUserInfo.setPosition(updateUserInfo.getPosition()); + } + sysUserInfoDao.updateByPrimaryKeySelective(sysUserInfo); + return selectUserInfo(updateUserInfo.getId()); + } +} diff --git a/tall/src/main/java/com/ccsens/tall/service/UserService.java b/tall/src/main/java/com/ccsens/tall/service/UserService.java index 7c6eba40..0ef03aa3 100644 --- a/tall/src/main/java/com/ccsens/tall/service/UserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/UserService.java @@ -14,6 +14,7 @@ import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.UserVo; import com.ccsens.tall.exception.SmsException; import com.ccsens.tall.persist.dao.*; +import com.ccsens.tall.util.TallConstant; import com.ccsens.util.*; import com.ccsens.util.bean.wx.po.WxOauth2UserInfo; import com.ccsens.util.enterprisewx.WeiXinConstant; @@ -21,46 +22,47 @@ import com.ccsens.util.enterprisewx.vo.WeiXinVo; import com.ccsens.util.exception.BaseException; import com.ccsens.util.wx.WxGzhUtil; import com.ccsens.util.wx.WxXcxUtil; -import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomStringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; +import javax.annotation.Resource; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + * @author 逗 + */ @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class UserService implements IUserService { - @Autowired + @Resource private SysUserDao userDao; - @Autowired + @Resource private SysAuthDao authDao; - @Autowired + @Resource private ProMemberDao memberDao; - @Autowired + @Resource + private ProRoleDao proRoleDao; + @Resource private ProMemberRoleDao memberRoleDao; - @Autowired + @Resource private SysBalanceLogDao sysBalanceLogDao; - @Autowired + @Resource private Snowflake snowflake; - @Autowired + @Resource private RedisUtil redisUtil; - @Autowired - private SysWxDao sysWxDao; - @Autowired + @Resource private SysProjectDao sysProjectDao; - @Autowired + @Resource private UserAttentionDao userAttentionDao; - @Autowired + @Resource private HealthFeignClient healthFeignClient; @@ -70,13 +72,13 @@ public class UserService implements IUserService { @Override public UserVo.UserSign signin(WebConstant.CLIENT_TYPE clientType, WebConstant.IDENTIFY_TYPE identifyType, String identifier, String credential, String clientIp, String redirect) throws Exception { - UserVo.UserSign userSignVo = null; + UserVo.UserSign userSignVo; //1.登陆 userSignVo = __signin(identifyType, identifier, credential, redirect); - if (ObjectUtil.isNotNull(userSignVo) && ObjectUtil.isNotNull(userSignVo.getAuthId())) { - //2.添加登陆记录 - __addSigninRecord(clientType, clientIp, userSignVo.getAuthId()); - } +// if (ObjectUtil.isNotNull(userSignVo) && ObjectUtil.isNotNull(userSignVo.getAuthId())) { +// //2.添加登陆记录 +// __addSigninRecord(clientType, clientIp, userSignVo.getAuthId()); +// } return userSignVo; } @@ -98,7 +100,7 @@ public class UserService implements IUserService { case Phone: return phoneLogin(identifier, credential); case Email: - return emailLogin(identifier, credential); +// return emailLogin(identifier, credential); case Account: return accountLogin(identifier, credential); default: @@ -109,10 +111,7 @@ public class UserService implements IUserService { /** * 企业登录 - * - * @param identifier - * @param credential - * @return + * @return 返回用户信息 */ private UserVo.UserSign wxEnterpriseLogin(String identifier, String credential, String redirect) { log.info("企业微信登录:{},{}, {}", identifier, credential, redirect); @@ -127,23 +126,24 @@ public class UserService implements IUserService { if (userInfo == null) { throw new BaseException(CodeEnum.PARAM_ERROR); } - UserVo.UserSign userSignVo = getUserSign(userInfo.getUserId(), userInfo.getCorpId(), (byte) WebConstant.IDENTIFY_TYPE.WxEnterprise.value, redirect); - - return userSignVo; + return getUserSign(userInfo.getUserId(), userInfo.getCorpId(), (byte) WebConstant.IDENTIFY_TYPE.WxEnterprise.value, redirect); } /** * 微信网页登陆 * - * @param code - * @return + * @param code 微信code + * @return 返回用户信息 */ private UserVo.UserSign wxH5Login(WebConstant.IDENTIFY_TYPE identifyType, String code) { - UserVo.UserSign userSignVo = null; + UserVo.UserSign userSignVo; //获取微信信息 + +// WxGzhUtil wxGzhUtil = new WxGzhUtil(); +// WxOauth2UserInfo wxOauth2UserInfo = wxGzhUtil.getOauth2UserInfo(identifyType, code); WxOauth2UserInfo wxOauth2UserInfo = WxGzhUtil.getOauth2UserInfo(identifyType, code); - SysAuth theAuth = null; + SysAuth theAuth; if (ObjectUtil.isNotNull(wxOauth2UserInfo)) { // //查找有无保存的信息 // SysWxExample sysWxExample = new SysWxExample(); @@ -202,15 +202,15 @@ public class UserService implements IUserService { theAuth.setIdentifier(wxOauth2UserInfo.getOpenId()); theAuth.setCredential(wxOauth2UserInfo.getUnionId()); authDao.insertSelective(theAuth); - //自动添加账号密码 - String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); - SysAuth accountAuth = new SysAuth(); - accountAuth.setId(snowflake.nextId()); - accountAuth.setUserId(user.getId()); - accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); - accountAuth.setIdentifier("USER_" + accountName); - accountAuth.setCredential("123456"); - authDao.insertSelective(accountAuth); +// //自动添加账号密码 +// String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); +// SysAuth accountAuth = new SysAuth(); +// accountAuth.setId(snowflake.nextId()); +// accountAuth.setUserId(user.getId()); +// accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); +// accountAuth.setIdentifier("USER_" + accountName); +// accountAuth.setCredential("123456"); +// authDao.insertSelective(accountAuth); } } } else { @@ -227,24 +227,27 @@ public class UserService implements IUserService { /** * 微信公众号登陆 * - * @param code - * @return - * @throws Exception + * @param code 微信code + * @return 返回用户信息 */ - private UserVo.UserSign wxLogin(WebConstant.IDENTIFY_TYPE identifyType, String code) throws Exception { - UserVo.UserSign userSignVo = null; + private UserVo.UserSign wxLogin(WebConstant.IDENTIFY_TYPE identifyType, String code) { + UserVo.UserSign userSignVo; //获取微信信息并保存 log.info("公众号登陆,{}", code); +// WxGzhUtil wxGzhUtil = new WxGzhUtil(); +// WxOauth2UserInfo wxOauth2UserInfo = wxGzhUtil.getOauth2UserInfo(identifyType, code); WxOauth2UserInfo wxOauth2UserInfo = WxGzhUtil.getOauth2UserInfo(identifyType, code); + log.info("获取用户的微信信息,{}", wxOauth2UserInfo); - SysAuth theAuth = null; + SysAuth theAuth; if (ObjectUtil.isNotNull(wxOauth2UserInfo)) { SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.OAUTH2_Wx.value) - .andIdentifierEqualTo(wxOauth2UserInfo.getOpenId()); + .andIdentifierEqualTo(wxOauth2UserInfo.getOpenId()).andCredentialEqualTo(wxOauth2UserInfo.getUnionId()); List authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { theAuth = authList.get(0); + log.info("该用户已有公众号登录的auth信息,{}", theAuth); } else { SysAuthExample sysAuthExample = new SysAuthExample(); sysAuthExample.createCriteria().andCredentialEqualTo(wxOauth2UserInfo.getUnionId()); @@ -279,16 +282,17 @@ public class UserService implements IUserService { theAuth.setIdentifier(wxOauth2UserInfo.getOpenId()); theAuth.setCredential(wxOauth2UserInfo.getUnionId()); authDao.insertSelective(theAuth); - //自动添加账号密码 - String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); - SysAuth accountAuth = new SysAuth(); - accountAuth.setId(snowflake.nextId()); - accountAuth.setUserId(user.getId()); - accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); - accountAuth.setIdentifier("USER_" + accountName); - accountAuth.setSalt(ShiroKit.getRandomSalt(6)); - accountAuth.setCredential(ShiroKit.md5("123456", accountAuth.getSalt())); - authDao.insertSelective(accountAuth); +// //自动添加账号密码 +// String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); +// SysAuth accountAuth = new SysAuth(); +// accountAuth.setId(snowflake.nextId()); +// accountAuth.setUserId(user.getId()); +// accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); +// accountAuth.setIdentifier("USER_" + accountName); +// accountAuth.setSalt(ShiroKit.getRandomSalt(6)); +// accountAuth.setCredential(ShiroKit.md5("123456", accountAuth.getSalt())); +// authDao.insertSelective(accountAuth); +// log.info("新建用户:{},新建auth:{}", user,theAuth); } } } else { @@ -299,33 +303,24 @@ public class UserService implements IUserService { userSignVo = new UserVo.UserSign(); userSignVo.setUserId(theAuth.getUserId()); userSignVo.setAuthId(theAuth.getId()); + log.info("认证成功返回:{}", userSignVo); return userSignVo; } - public void __addSigninRecord(WebConstant.CLIENT_TYPE clientType, String clientIp, Long authId) { -// SigninLog siginLog = new SigninLog(); -// siginLog.setId(snowflake.nextId()); -// siginLog.setAuthId(authId); -// siginLog.setClient((byte) clientType.value); -// siginLog.setSigninIp(clientIp); -// siginLog.setSigninTime(DateUtil.date()); -// signinLogDao.insertSelective(siginLog); - } /** * 手机号登陆 * - * @param phone - * @param smsVerifyCode - * @return - * @throws Exception + * @param phone 手机号 + * @param smsVerifyCode 验证码 + * @return 返回用户信息 */ - private UserVo.UserSign phoneLogin(String phone, String smsVerifyCode) throws Exception { - UserVo.UserSign userSignVo = null; + private UserVo.UserSign phoneLogin(String phone, String smsVerifyCode) { + UserVo.UserSign userSignVo; if (isSmsCodeCorrect(phone, smsVerifyCode)) { //1.查找对应账户,不存在则注册 - List authList = null; - SysAuth theAuth = null; + List authList; + SysAuth theAuth; SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) .andIdentifierEqualTo(phone); @@ -333,7 +328,6 @@ public class UserService implements IUserService { if (CollectionUtil.isNotEmpty(authList)) { theAuth = authList.get(0); } else { -// throw new BaseException(CodeEnum.NOT_REGISTER); theAuth = wxRegist(phone, null, WebConstant.IDENTIFY_TYPE.Phone); } userSignVo = new UserVo.UserSign(); @@ -345,22 +339,19 @@ public class UserService implements IUserService { return userSignVo; } - private UserVo.UserSign emailLogin(String phone, String emailVerifyCode) { - return null; - } + /** * 账号登录 */ private UserVo.UserSign accountLogin(String username, String password) throws Exception { - UserVo.UserSign userSignVo = null; - List authList = null; - SysAuth theAuth = null; - + long start = System.currentTimeMillis(); + UserVo.UserSign userSignVo; + List authList; + SysAuth theAuth; SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria() - .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) - .andIdentifierEqualTo(username); + .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value).andIdentifierEqualTo(username); authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { theAuth = authList.get(0); @@ -369,11 +360,13 @@ public class UserService implements IUserService { userSignVo.setUserId(theAuth.getUserId()); userSignVo.setAuthId(theAuth.getId()); } else { - throw new BaseException("密码错误"); + throw new BaseException(CodeEnum.PASSWORD_ERROR); } } else { - throw new BaseException("找不到该用户"); + throw new BaseException(CodeEnum.NOT_ACCOUNT); } + long end = System.currentTimeMillis(); + log.info("查询并验证账号用时:{}",end - start); return userSignVo; } @@ -382,45 +375,59 @@ public class UserService implements IUserService { */ private UserVo.UserSign wxmplogin(String code, String gameType) throws Exception { //0.获取openid + Long start = System.currentTimeMillis(); WxXcxUtil.WechatUser wechatUser = WxXcxUtil.getUserInfo(code, gameType); + Long end = System.currentTimeMillis(); + log.info("调用微信查询openId耗时:{}",end - start); String openId = wechatUser.openid; String unionId = wechatUser.unionid; log.info("小程序登录,openid:{} ,unionId:{}", openId, unionId); - UserVo.UserSign userSignVo = getUserSign(openId, unionId, (byte) WebConstant.IDENTIFY_TYPE.Wxmp.value, null); - return userSignVo; + return getUserSign(openId, unionId, (byte) WebConstant.IDENTIFY_TYPE.Wxmp.value, null); } - @Data - private static class WxEnterpriseParam { - private String suiteAccessToken; - private String userTicket; - private String redirect; - } +// @Data +// private static class WxEnterpriseParam { +// private String suiteAccessToken; +// private String userTicket; +// private String redirect; +// } /** - * @param openId - * @param unionId - * @return + * @param openId openId + * @param unionId unionId + * @return 返回认证信息 */ private UserVo.UserSign getUserSign(String openId, String unionId, byte identifyType, String redirect) { - UserVo.UserSign userSignVo;//1.查找对应账户,不存在则注册 - List authList = null; - SysAuth theAuth = null; - if (ObjectUtil.isNotNull(openId)) { - SysAuthExample authExample = new SysAuthExample(); - authExample.createCriteria().andIdentifyTypeEqualTo(identifyType) - .andIdentifierEqualTo(openId); - authList = authDao.selectByExample(authExample); + long start = System.currentTimeMillis(); + UserVo.UserSign userSignVo; + List authList; + SysAuth theAuth; + if (ObjectUtil.isNull(openId)) { + return null; } + String key = openId + TallConstant.LOGIN + identifyType; + Object o = redisUtil.get(key); + if(ObjectUtil.isNotNull(o)){ + return (UserVo.UserSign)o; + } + + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria().andIdentifyTypeEqualTo(identifyType).andIdentifierEqualTo(openId); + authList = authDao.selectByExample(authExample); + long end1 = System.currentTimeMillis(); + log.info("查auth表耗时:{}",end1 - start); if (CollectionUtil.isEmpty(authList)) { List sysAuthList = null; + long end2 = 0; if (ObjectUtil.isNotNull(unionId) && identifyType == WebConstant.IDENTIFY_TYPE.Wxmp.value) { SysAuthExample sysAuthExample = new SysAuthExample(); sysAuthExample.createCriteria().andCredentialEqualTo(unionId); sysAuthList = authDao.selectByExample(sysAuthExample); + end2 = System.currentTimeMillis(); + log.info("查找同平台其他登录方式耗时:{}",end2 - end1); } if (CollectionUtil.isNotEmpty(sysAuthList)) { //添加认证方式 @@ -431,8 +438,8 @@ public class UserService implements IUserService { theAuth.setIdentifier(openId); theAuth.setCredential(unionId); authDao.insertSelective(theAuth); - - + long end3 = System.currentTimeMillis(); + log.info("同平台有其他登录方式,添加小程序auth耗时:{}",end3 - (end2 == 0 ? end1 : end2)); } else { //新建用户并保存微信信息 SysUser user = new SysUser(); @@ -448,16 +455,18 @@ public class UserService implements IUserService { theAuth.setIdentifier(openId); theAuth.setCredential(unionId); authDao.insertSelective(theAuth); - //自动添加账号密码 - String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); - SysAuth accountAuth = new SysAuth(); - accountAuth.setId(snowflake.nextId()); - accountAuth.setUserId(user.getId()); - accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); - accountAuth.setIdentifier("USER_" + accountName); - accountAuth.setSalt(ShiroKit.getRandomSalt(6)); - accountAuth.setCredential(ShiroKit.md5("123456", accountAuth.getSalt())); - authDao.insertSelective(accountAuth); + long end4 = System.currentTimeMillis(); + log.info("同平台没有其他登录方式,添加user和小程序auth耗时:{}",end4 - (end2 == 0 ? end1 : end2)); +// //自动添加账号密码 +// String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); +// SysAuth accountAuth = new SysAuth(); +// accountAuth.setId(snowflake.nextId()); +// accountAuth.setUserId(user.getId()); +// accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); +// accountAuth.setIdentifier("USER_" + accountName); +// accountAuth.setSalt(ShiroKit.getRandomSalt(6)); +// accountAuth.setCredential(ShiroKit.md5("123456", accountAuth.getSalt())); +// authDao.insertSelective(accountAuth); } // theAuth = wxRegist(openid, unionId,WebConstant.IDENTIFY_TYPE.Wxmp); } else { @@ -468,16 +477,21 @@ public class UserService implements IUserService { userSignVo = new UserVo.UserSign(); userSignVo.setUserId(theAuth.getUserId()); userSignVo.setAuthId(theAuth.getId()); + + //存入redis + redisUtil.set(key,userSignVo,TallConstant.LOGIN_TIME); + long end2 = System.currentTimeMillis(); + log.info("方法结束总耗时:{}",end2 - end1); return userSignVo; } /** * 获取企业微信信息,并绑定用户 - * @param identifyType - * @param userid - * @param corpId - * @param redirect - * @param user + * @param identifyType 登录类型 + * @param userid userId + * @param corpId corpId + * @param redirect redirect + * @param user 用户信息 */ private void getUserDetail(byte identifyType, String userid, String corpId, String redirect, SysUser user) { if (identifyType == WebConstant.IDENTIFY_TYPE.WxEnterprise.value && StrUtil.isNotBlank(redirect)) { @@ -502,7 +516,7 @@ public class UserService implements IUserService { /** * 微信登陆后天添加用户和认证方式 * - * @return + * @return 认证信息 */ private SysAuth wxRegist(String identifier, String credential, WebConstant.IDENTIFY_TYPE identifyType) { //1.添加user @@ -518,15 +532,16 @@ public class UserService implements IUserService { auth.setIdentifier(identifier); auth.setCredential(credential); authDao.insertSelective(auth); - //自动添加账号密码 - String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); - SysAuth accountAuth = new SysAuth(); - accountAuth.setId(snowflake.nextId()); - accountAuth.setUserId(user.getId()); - accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); - accountAuth.setIdentifier("USER_" + accountName); - accountAuth.setCredential("123456"); - authDao.insertSelective(accountAuth); +// //自动添加账号密码 +// String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); +// SysAuth accountAuth = new SysAuth(); +// accountAuth.setId(snowflake.nextId()); +// accountAuth.setUserId(user.getId()); +// accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); +// accountAuth.setIdentifier("USER_" + accountName); +// accountAuth.setSalt(ShiroKit.getRandomSalt(6)); +// accountAuth.setCredential(ShiroKit.md5("123456", accountAuth.getSalt())); +// authDao.insertSelective(accountAuth); return auth; } @@ -535,55 +550,51 @@ public class UserService implements IUserService { * 获取token */ @Override - public UserVo.TokenBean generateToken(WebConstant.CLIENT_TYPE clientType, Object subject, Map payLoads) throws Exception { + public UserVo.TokenBean generateToken(WebConstant.CLIENT_TYPE clientType, Object subject, Map payLoads){ UserVo.TokenBean tokenBean = new UserVo.TokenBean(); Long tokenExpired = null; Long refreshTokenExpired = null; switch (clientType) { - case Wxmp: //token(2hours) refreshToken(null) + case Wxmp: + case WxEnterprise: + case H5: //tokenExpired = 3600 * 1000L * 2; tokenExpired = 3600 * 1000L * 24; break; - case H5: //token(2hours) refreshToken(null) -// tokenExpired = 3600 * 1000L * 2; - tokenExpired = 3600 * 1000L * 24; - break; - case Android: //token(2hours) refreshToken(30天) - tokenExpired = 3600 * 1000L * 2; - refreshTokenExpired = 3600 * 1000L * 24 * 30; - break; - case IOS: //token(2hours) refreshToken(30天) + case Android: + case IOS: tokenExpired = 3600 * 1000L * 2; refreshTokenExpired = 3600 * 1000L * 24 * 30; break; - case WxEnterprise: - tokenExpired = 3600 * 1000L * 24; - break; default: } //1.生成token并缓存 + long start = System.currentTimeMillis(); if (ObjectUtil.isNotNull(tokenExpired)) { String token = JwtUtil.createJWT(subject + "", payLoads, tokenExpired, WebConstant.JWT_ACCESS_TOKEN_SECERT); - redisUtil.set(RedisKeyManager.getTokenCachedKey((Long) subject), + redisUtil.set(RedisKeyManager.getTokenCachedKey(subject), token, tokenExpired / 1000); tokenBean.setToken(token); } + long end = System.currentTimeMillis(); + log.info("生成token并缓存到redis用时:{}",end - start); + if (ObjectUtil.isNotNull(refreshTokenExpired)) { - String refresh_token = + String refreshToken = JwtUtil.createJWT(subject + "", payLoads, refreshTokenExpired, WebConstant.JWT_ACCESS_TOKEN_SECERT); redisUtil.set(RedisKeyManager.getRefreshTokenCachedKey(subject), - refresh_token, refreshTokenExpired / 1000); - tokenBean.setRefresh_token(refresh_token); + refreshToken, refreshTokenExpired / 1000); + tokenBean.setRefresh_token(refreshToken); } //2.返回 @@ -594,14 +605,24 @@ public class UserService implements IUserService { * 发送验证码 */ @Override - public UserVo.SmsCode getSignInSmsCode(String phone, Integer client) throws Exception { + public UserVo.SmsCode getSignInSmsCode(String phone,String verificationCodeId, String verificationCodeValue) { //获取登陆客户端类型 - WebConstant.CLIENT_TYPE client_type = null; - if (ObjectUtil.isNotNull(client)) { - client_type = WebConstant.CLIENT_TYPE.valueOf(client); - } else { - client_type = WebConstant.CLIENT_TYPE.valueOf(1); +// WebConstant.CLIENT_TYPE client_type = null; +// if (ObjectUtil.isNotNull(client)) { +// client_type = WebConstant.CLIENT_TYPE.valueOf(client); +// } else { +// client_type = WebConstant.CLIENT_TYPE.valueOf(1); +// } + //检查图形验证码是否正确 + String codeKey = WebConstant.IMAGE_CODE + verificationCodeId; + if (!redisUtil.hasKey(codeKey)) { + throw new BaseException(CodeEnum.VERIFICATION_CODE_PAST); } + if (!verificationCodeValue.equals(String.valueOf(redisUtil.get(codeKey)))) { + throw new BaseException(CodeEnum.VERIFICATION_CODE_ERROR); + } + //验证一次,无论是否正确,都将缓存删除 + redisUtil.del(codeKey); //验证手机号的正确性 String regex = "[1]([3-9])[0-9]{9}$"; Pattern p = Pattern.compile(regex); @@ -611,25 +632,28 @@ public class UserService implements IUserService { throw new BaseException(CodeEnum.PHONE_ERR); } - UserVo.SmsCode smsCodeVo = null; + UserVo.SmsCode smsCodeVo; //1.验证发送间隔是否大于指定间隔 if (redisUtil.hasKey(RedisKeyManager.getSigninSmsExistKey(phone))) { throw new SmsException(SmsException.Error_SendTooFast); } - //2.生成随机验证码 - String verifyCode = RandomUtil.randomNumbers(4); -// String verifyCode = "1111"; + + String verifyCode = "1111"; + if("1".equalsIgnoreCase(PropUtil.smsCode)){ + verifyCode = RandomUtil.randomNumbers(4); + } //3.保存到redis中 Integer codeValidInSeconds = WebConstant.Expired_Verify_Code_In_Seconds; - Integer codeExistINSeconds = WebConstant.Exist_Verify_Code_In_Seconds; + Integer codeExistInSeconds = WebConstant.Exist_Verify_Code_In_Seconds; redisUtil.set(RedisKeyManager.getSigninSmsKey(phone), verifyCode, codeValidInSeconds); - redisUtil.set(RedisKeyManager.getSigninSmsExistKey(phone), verifyCode, codeExistINSeconds); + redisUtil.set(RedisKeyManager.getSigninSmsExistKey(phone), verifyCode, codeExistInSeconds); //5.发送验证码 - SmsUtil.sendSms(phone, verifyCode, client_type.phase, codeValidInSeconds); - + if("1".equalsIgnoreCase(PropUtil.smsCode)) { + SmsUtil.sendSms(phone, verifyCode,"", codeValidInSeconds); + } //6.返回 smsCodeVo = new UserVo.SmsCode(); smsCodeVo.setPhone(phone); @@ -642,8 +666,8 @@ public class UserService implements IUserService { * 通过id找用户 */ @Override - public SysUser getUserById(Long userId) throws Exception { - SysUser theUser = null; + public SysUser getUserById(Long userId) { + SysUser theUser; theUser = userDao.selectByPrimaryKey(userId); if (ObjectUtil.isNull(theUser)) { throw new BaseException(406, "找不到对应Id用户: " + userId); @@ -655,15 +679,14 @@ public class UserService implements IUserService { * 注册 */ @Override - public UserVo.UserSign registerUser(UserDto.UserSignup userSignup) throws Exception { - UserVo.UserSign userSignVo = null; + public UserVo.UserSign registerUser(UserDto.UserSignup userSignup){ + UserVo.UserSign userSignVo; //验证码是否合格 if (isSmsCodeCorrect(userSignup.getPhone(), userSignup.getSmsCode())) { //检查手机号是否已被注册 SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria() - .andIdentifierEqualTo(userSignup.getPhone()) - .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value).andIdentifierEqualTo(userSignup.getPhone()); List authList = authDao.selectByExample(authExample); if (CollectionUtil.isEmpty(authList)) { //验证账号是否被注册 @@ -691,6 +714,7 @@ public class UserService implements IUserService { SysUser user = new SysUser(); user.setId(snowflake.nextId()); user.setPhone(userSignup.getPhone()); + user.setAvatarUrl(PropUtil.notGatewayUrl + "staticrec/logo.png"); user.setSource(userSignup.getSource()); userDao.insertSelective(user); @@ -748,7 +772,6 @@ public class UserService implements IUserService { */ @Override public Boolean findAccount(String account) { - Boolean flag = false; SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) .andIdentifierEqualTo(account); @@ -771,7 +794,6 @@ public class UserService implements IUserService { throw new BaseException(CodeEnum.PHONE_ERR); } - Boolean flag = false; SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) .andIdentifierEqualTo(phone); @@ -801,20 +823,19 @@ public class UserService implements IUserService { } @Override - public boolean tokenNotExistInCache(Long authId) throws Exception { + public boolean tokenNotExistInCache(Long authId) { return !redisUtil.hasKey(RedisKeyManager.getTokenCachedKey(authId)); } /** * 微信绑定新手机号(没有账号,注册) * - * @param currentUserId - * @param wxPhone - * @return - * @throws Exception + * @param currentUserId userId + * @param wxPhone 手机号和验证码 + * @return 用户id和认证类型 */ @Override - public UserVo.UserSign bindingNewPhone(Long currentUserId, UserDto.WxBindingPhone wxPhone) throws Exception { + public UserVo.UserSign bindingNewPhone(Long currentUserId, UserDto.WxBindingPhone wxPhone) { if (isSmsCodeCorrect(wxPhone.getPhone(), wxPhone.getSmsCode())) { //查找该用户以前绑定的手机 SysAuthExample authExample = new SysAuthExample(); @@ -825,8 +846,7 @@ public class UserService implements IUserService { throw new BaseException(CodeEnum.ALREADY_BINDING_PHONE); } else { //改手机对应账户,如果有,提示 - List phoneList = null; - SysAuth theAuth = null; + List phoneList; SysAuthExample phoneExample = new SysAuthExample(); phoneExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) .andIdentifierEqualTo(wxPhone.getPhone()); @@ -834,7 +854,6 @@ public class UserService implements IUserService { if (CollectionUtil.isNotEmpty(phoneList)) { throw new BaseException(CodeEnum.MERGE_WX_PHONE); } else { -// throw new BaseException(CodeEnum.NOT_REGISTER); //绑定 添加auth SysAuth auth = new SysAuth(); auth.setId(snowflake.nextId()); @@ -912,8 +931,8 @@ public class UserService implements IUserService { /** * 判断验证码是否有效 */ - private Boolean isSmsCodeCorrect(String phone, String smsCode) throws Exception { - Boolean correct = false; + private Boolean isSmsCodeCorrect(String phone, String smsCode) { + boolean correct = false; if (redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(phone))) { if (smsCode.equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(phone)).toString())) { correct = true; @@ -942,25 +961,48 @@ public class UserService implements IUserService { auth.setCredential(ShiroKit.md5(passwordDto.getPassword(), auth.getSalt())); authDao.updateByPrimaryKeySelective(auth); } else { - throw new BaseException("新密码不能和旧密码相同"); + throw new BaseException(CodeEnum.NEW_PASSWORD_REPEAT_OLD); } } else { - throw new BaseException("该手机号未绑定账号"); + throw new BaseException(CodeEnum.PHONE_ERR); } } else { - throw new BaseException("该手机号未注册"); + throw new BaseException(CodeEnum.PHONE_ERR); } } else { - throw new BaseException("验证信息错误"); + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); } } } + @Override + public void updatePasswordByAccount(UserDto.UpdatePasswordByAccount passwordDto) throws Exception{ + if (passwordDto.getPasswordOld().equalsIgnoreCase(passwordDto.getPasswordNew())){ + throw new BaseException(CodeEnum.NEW_PASSWORD_REPEAT_OLD); + } + //检查账号和密码是否正确 + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria() + .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) + .andIdentifierEqualTo(passwordDto.getAccount()); + List authList = authDao.selectByExample(authExample); + if (CollectionUtil.isEmpty(authList)) { + throw new BaseException(CodeEnum.NOT_ACCOUNT); + } + SysAuth sysAuth = authList.get(0); + if (ShiroKit.authenticate(passwordDto.getPasswordOld(), sysAuth.getCredential(), sysAuth.getSalt())) { + //修改密码 + sysAuth.setCredential(ShiroKit.md5(passwordDto.getPasswordNew(), sysAuth.getSalt())); + authDao.updateByPrimaryKeySelective(sysAuth); + } else { + throw new BaseException(CodeEnum.PASSWORD_ERROR); + } + } + /** * 通过用户查找手机号 - * - * @param userId - * @return + * @param userId userId + * @return 手机号 */ @Override public String getPhone(Long userId) { @@ -981,8 +1023,8 @@ public class UserService implements IUserService { public Long selectUserIdByPhone(String phoneCell) { Long userId = null; SysAuthExample authExample = new SysAuthExample(); - authExample.createCriteria().andIdentifierEqualTo(phoneCell) - .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + authExample.createCriteria() + .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value).andIdentifierEqualTo(phoneCell); List authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { userId = authList.get(0).getUserId(); @@ -998,8 +1040,8 @@ public class UserService implements IUserService { String account = null; if (StrUtil.isNotEmpty(phone)) { SysAuthExample authExample = new SysAuthExample(); - authExample.createCriteria().andIdentifierEqualTo(phone) - .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + authExample.createCriteria() + .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value).andIdentifierEqualTo(phone); List authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { SysAuthExample authExample1 = new SysAuthExample(); @@ -1019,16 +1061,15 @@ public class UserService implements IUserService { */ @Override public List selectUserIdByRoleId(Long roleId) { - List userIdList = new ArrayList<>(); - ProMemberRoleExample proMemberRoleExample = new ProMemberRoleExample(); - proMemberRoleExample.createCriteria().andRoleIdEqualTo(roleId); - List memberRoleList = memberRoleDao.selectByExample(proMemberRoleExample); - if (CollectionUtil.isNotEmpty(memberRoleList)) { - for (ProMemberRole memberRole : memberRoleList) { - ProMember member = memberDao.selectByPrimaryKey(memberRole.getMemberId()); - Long userId = member.getUserId(); - userIdList.add(userId); - } + ProRole role = proRoleDao.selectByPrimaryKey(roleId); + if(ObjectUtil.isNull(role)){ + return null; + } + List userIdList; + if(role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)){ + userIdList = memberRoleDao.selectUserIdByProjectId(role.getProjectId()); + }else { + userIdList = memberRoleDao.selectUserIdByRoleId(roleId); } return userIdList; } @@ -1036,13 +1077,13 @@ public class UserService implements IUserService { /** * 查询用户是否关注此项目 * - * @param currentUserId - * @param projectId - * @return + * @param currentUserId userId + * @param projectId 项目id + * @return 是否关注此项目 */ @Override public Boolean getIsAttention(Long currentUserId, Long projectId) { - Boolean isAttention = false; + boolean isAttention = false; if (ObjectUtil.isNotNull(sysProjectDao.selectByPrimaryKey(projectId))) { UserAttentionExample attentionExample = new UserAttentionExample(); attentionExample.createCriteria().andProjectIdEqualTo(projectId).andUserIdEqualTo(currentUserId); @@ -1059,8 +1100,8 @@ public class UserService implements IUserService { /** * 用户关注某个项目 * - * @param currentUserId - * @param projectIdDto + * @param currentUserId userId + * @param projectIdDto 项目id */ @Override public void userAttentionProject(Long currentUserId, ProjectDto.ProjectIdDto projectIdDto) { @@ -1097,19 +1138,12 @@ public class UserService implements IUserService { //检查手机号是否已被注册 SysAuthExample authExample = new SysAuthExample(); authExample.createCriteria() - .andIdentifierEqualTo(signup.getPhone()) - .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value).andIdentifierEqualTo(signup.getPhone()); List authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { log.info("用户已存在,直接返回user"); return userDao.selectByPrimaryKey(authList.get(0).getUserId()).getId(); } -// int i = 0; -// 用户已存在 = true -// boolean userExist = userService.findAccount(signup.getAccount()); -// while (userExist) { -// userExist = userService.findAccount(signup.getAccount() + "_" + (++i)); -// } UserDto.UserSignup up = new UserDto.UserSignup(); up.setAccount(signup.getAccount()); up.setPassword(WebConstant.Regist.PASSWORD); @@ -1121,66 +1155,63 @@ public class UserService implements IUserService { } @Override - public UserVo.TokenBean getUserInfoAndToken(WebConstant.CLIENT_TYPE clientType, WebConstant.IDENTIFY_TYPE identifyType,UserVo.UserSign userSignVo, Map theMap) throws Exception { - - UserVo.TokenBean tokenBean = generateToken(clientType, userSignVo.getUserId(), theMap); - //获取手机号 - String phone = getPhoneByRegisterType(userSignVo.getUserId(),identifyType); - //获取账号 - String account = selectAccountByPhone(phone); - //获取用户的基本信息、 - UserVo.WxInfo wxInfo = null; - SysUser user = userDao.selectByPrimaryKey(userSignVo.getUserId()); - if (ObjectUtil.isNotNull(user)) { - wxInfo = new UserVo.WxInfo(); - BeanUtil.copyProperties(user, wxInfo); - wxInfo.setSex(user.getGender()); - wxInfo.setHeadImgUrl(user.getAvatarUrl()); + public UserVo.TokenBean getUserInfoAndToken(WebConstant.CLIENT_TYPE clientType, WebConstant.IDENTIFY_TYPE identifyType,UserVo.UserSign userSignVo, Map theMap) { + long start = System.currentTimeMillis(); + UserVo.TokenBean tokenBean = userDao.getTokenBeanByUserId(userSignVo.getUserId()); + //如果只有手机号没有账号信息,则将手机号脱敏当成账号 + if (StrUtil.isEmpty(tokenBean.getAccount()) && StrUtil.isNotEmpty(tokenBean.getPhone())){ + String phoneNumber = tokenBean.getPhone().substring(0, 3) + "****" + tokenBean.getPhone().substring(7, tokenBean.getPhone().length()); + tokenBean.setAccount(phoneNumber); } - tokenBean.setId(userSignVo.getUserId()); - tokenBean.setPhone(phone); - tokenBean.setAccount(account); - tokenBean.setWxInfo(wxInfo); + long end1 = System.currentTimeMillis(); + log.info("查询用户信息用了:{}",end1 - start); + UserVo.TokenBean tokenBean1 = generateToken(clientType, userSignVo.getUserId(), theMap); + tokenBean.setToken(tokenBean1.getToken()); + tokenBean.setRefresh_token(tokenBean1.getRefresh_token()); return tokenBean; } - private String getPhoneByRegisterType(Long userId, WebConstant.IDENTIFY_TYPE identifyType) { - SysAuthExample authExample = new SysAuthExample(); - authExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); - List sysAuthList = authDao.selectByExample(authExample); - if (CollectionUtil.isNotEmpty(sysAuthList)) { - return sysAuthList.get(0).getIdentifier(); - } else { - SysAuthExample authExampleType = new SysAuthExample(); - authExampleType.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) identifyType.value); - List sysAuthList1 = authDao.selectByExample(authExampleType); - if (CollectionUtil.isNotEmpty(sysAuthList1)){ - if(sysAuthList1.get(0).getRegisterType() == 1){ - return "1"; - } - } - return null; - } - } - - private SysWx getSysWx(String unionId) { - SysWx sysWx = null; - SysWxExample sysWxExample = new SysWxExample(); - sysWxExample.createCriteria().andUnionIdEqualTo(unionId); - List sysWxList = sysWxDao.selectByExample(sysWxExample); - if (CollectionUtil.isNotEmpty(sysWxList)) { - sysWx = sysWxList.get(0); - } - return sysWx; - } +// /** +// * 通过userId查找账号 +// * @param userId userId +// * @return 账号 +// */ +// private String selectAccountByUserId(Long userId) { +// String account = null; +// SysAuthExample sysAuthExample = new SysAuthExample(); +// sysAuthExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value); +// List authList = authDao.selectByExample(sysAuthExample); +// if(CollectionUtil.isNotEmpty(authList)){ +// account = authList.get(0).getIdentifier(); +// } +// return account; +// } +// +// private String getPhoneByRegisterType(Long userId, WebConstant.IDENTIFY_TYPE identifyType) { +// SysAuthExample authExample = new SysAuthExample(); +// authExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); +// List sysAuthList = authDao.selectByExample(authExample); +// if (CollectionUtil.isNotEmpty(sysAuthList)) { +// return sysAuthList.get(0).getIdentifier(); +// } else { +// SysAuthExample authExampleType = new SysAuthExample(); +// authExampleType.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) identifyType.value); +// List sysAuthList1 = authDao.selectByExample(authExampleType); +// if (CollectionUtil.isNotEmpty(sysAuthList1)){ +// if(sysAuthList1.get(0).getRegisterType() == 1){ +// return "1"; +// } +// } +// return null; +// } +// } /** * 合并账号 - * - * @param currentUserId - * @param wxPhone - * @return + * @param currentUserId userId + * @param wxPhone 手机号和合并方式 + * @return 用户id */ @Override public UserVo.UserSign mergeByPhone(Long currentUserId, UserDto.WxMergePhone wxPhone) { @@ -1203,15 +1234,16 @@ public class UserService implements IUserService { userDao.replaceAuth(userId, currentUserId); //查询所有关联userId的数据库表 auth表 attention表 balance表 project表 member表 DeliverPostLog表 proLog表 //依次将查出的数据的旧userId 替换成新的userId + userDao.replaceProject(userId, currentUserId); userDao.replaceAttention(userId, currentUserId); userDao.replaceBalance(userId, currentUserId); - userDao.replaceProject(userId, currentUserId); userDao.replaceMember(userId, currentUserId); userDao.replaceDeliverPostLog(userId, currentUserId); userDao.replaceProLog(userId, currentUserId); + userDao.replaceComment(userId, currentUserId); //将以前的余额添加至此账号 - SysUser oldUser = userDao.selectByPrimaryKey(userId); SysUser newUser = userDao.selectByPrimaryKey(currentUserId); + SysUser oldUser = userDao.selectByPrimaryKey(userId); if(ObjectUtil.isNotNull(oldUser) && ObjectUtil.isNotNull(newUser)) { updateBalance(oldUser, newUser); } @@ -1219,6 +1251,7 @@ public class UserService implements IUserService { oldUser.setRecStatus((byte) 2); userDao.updateByPrimaryKeySelective(oldUser); + } else { throw new BaseException(CodeEnum.PARAM_ERROR); } @@ -1230,8 +1263,25 @@ public class UserService implements IUserService { List authList = authDao.selectByExample(authExample); if (CollectionUtil.isNotEmpty(authList)) { SysAuth auth = authList.get(0); - auth.setUserId(currentUserId); + //查找这个手机号以前的用户,并删除 + SysUser user = userDao.selectByPrimaryKey(auth.getUserId()); + user.setRecStatus((byte) 2); + userDao.updateByPrimaryKeySelective(user); + //删除这个手机号的认证方式 + auth.setRecStatus((byte) 2); authDao.updateByPrimaryKeySelective(auth); + //将当前的用户手机号改为新的手机号 + SysAuthExample sysAuthExample = new SysAuthExample(); + sysAuthExample.createCriteria().andUserIdEqualTo(currentUserId) + .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + List sysAuthList = authDao.selectByExample(authExample); + if (CollectionUtil.isNotEmpty(sysAuthList)) { + SysAuth sysAuth = sysAuthList.get(0); + sysAuth.setIdentifier(wxPhone.getPhone()); + authDao.updateByPrimaryKeySelective(sysAuth); + } +// auth.setUserId(currentUserId); +// authDao.updateByPrimaryKeySelective(auth); } } @@ -1295,13 +1345,13 @@ public class UserService implements IUserService { /** * 修改用户信息(添加微信信息) - * - * @return + * @return 返回信息 */ @Override public UserVo.WxInfo updateUserInfo(Long currentUserId, UserDto.WxInfo userInfo) { - //通过userid查找到用户 + //通过userId查找到用户 SysUser user = userDao.selectByPrimaryKey(currentUserId); + log.info("查找到原来的user信息,{}",user); if (ObjectUtil.isNull(user)) { throw new BaseException(CodeEnum.NOT_LOGIN); } @@ -1328,7 +1378,7 @@ public class UserService implements IUserService { user.setLanguage(userInfo.getLanguage()); } userDao.updateByPrimaryKeySelective(user); - + log.info("修改后的user信息,{}",user); UserVo.WxInfo wxInfo = new UserVo.WxInfo(); BeanUtil.copyProperties(user, wxInfo); wxInfo.setHeadImgUrl(user.getAvatarUrl()); @@ -1340,29 +1390,33 @@ public class UserService implements IUserService { * 解除已绑定的手机号 */ @Override - public void relievePhone(Long userId, String phone) { - SysAuthExample authExample = new SysAuthExample(); - authExample.createCriteria().andUserIdEqualTo(userId) - .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) - .andIdentifierEqualTo(phone); - List authList = authDao.selectByExample(authExample); - if (CollectionUtil.isNotEmpty(authList)) { - SysAuth auth = authList.get(0); - auth.setRecStatus((byte) 2); - authDao.updateByPrimaryKeySelective(auth); + public void relievePhone(Long userId, UserDto.WxBindingPhone phoneInfo) { + if(isSmsCodeCorrect(phoneInfo.getPhone(),phoneInfo.getSmsCode())){ + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria().andUserIdEqualTo(userId) + .andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value) + .andIdentifierEqualTo(phoneInfo.getPhone()); + List authList = authDao.selectByExample(authExample); + if (CollectionUtil.isNotEmpty(authList)) { + SysAuth auth = authList.get(0); + auth.setRecStatus((byte) 2); + authDao.updateByPrimaryKeySelective(auth); + }else { + throw new BaseException(CodeEnum.PHONE_ERR); + } } + } /** * 更改绑定手机号(不要密码) * - * @param userId - * @param phoneInfo - * @throws Exception + * @param userId userId + * @param phoneInfo 手机号和验证码 */ @Override - public UserVo.UserSign changePhoneNotPassword(Long userId, UserDto.WxBindingPhone phoneInfo) throws Exception { - UserVo.UserSign userSign = null; + public UserVo.UserSign changePhoneNotPassword(Long userId, UserDto.WxBindingPhone phoneInfo) { + UserVo.UserSign userSign; if (isSmsCodeCorrect(phoneInfo.getPhone(), phoneInfo.getSmsCode())) { //查找新手机号的的绑定信息 Long newPhoneUserId = selectUserIdByPhone(phoneInfo.getPhone()); @@ -1410,8 +1464,8 @@ public class UserService implements IUserService { /** * 通过userId获取token * - * @param userId - * @return + * @param userId userId + * @return token */ @Override public UserVo.TokenBean getTokenByUserId(Long userId) { @@ -1420,7 +1474,7 @@ public class UserService implements IUserService { if (ObjectUtil.isNull(userId)) { throw new BaseException(CodeEnum.PARAM_ERROR); } - Object tokenR = redisUtil.get(RedisKeyManager.getTokenCachedKey(userId)); + Object tokenRe = redisUtil.get(RedisKeyManager.getTokenCachedKey(userId)); //获取认证信息 UserVo.UserSign userSignVo = null; SysAuthExample authExample = new SysAuthExample(); @@ -1453,23 +1507,23 @@ public class UserService implements IUserService { throw new BaseException(CodeEnum.PARAM_ERROR); } //如果token为空重新生成一份 - if (ObjectUtil.isNull(tokenR)) { + if (ObjectUtil.isNull(tokenRe)) { //3.生成token(access_token,refresh_token) if (ObjectUtil.isNotNull(userSignVo)) { Map theMap = CollectionUtil.newHashMap(); theMap.put("authId", String.valueOf(userSignVo.getAuthId())); - Long tokenExpired = 3600 * 1000L * 24 * 100; + long tokenExpired = 3600 * 1000L * 24 * 100; String token = JwtUtil.createJWT(userId + "", theMap, tokenExpired, - WebConstant.JWT_ACCESS_TOKEN_SECERT).toString(); - redisUtil.set(RedisKeyManager.getTokenCachedKey((Long) userId), + WebConstant.JWT_ACCESS_TOKEN_SECERT); + redisUtil.set(RedisKeyManager.getTokenCachedKey(userId), token, tokenExpired / 1000); - tokenR = token; + tokenRe = token; } } - tokenBean.setToken(tokenR.toString()); + tokenBean.setToken(tokenRe.toString()); return tokenBean; } @@ -1481,12 +1535,12 @@ public class UserService implements IUserService { user.setId(snowflake.nextId()); userDao.insertSelective(user); //自动添加账号密码 - String accountName = null; - String password = null; + String accountName; + String password; if(StrUtil.isNotEmpty(userSignup.getAccount())){ accountName = userSignup.getAccount(); SysAuthExample sysAuthExample = new SysAuthExample(); - sysAuthExample.createCriteria().andIdentifierEqualTo(accountName).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value); + sysAuthExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value).andIdentifierEqualTo(accountName); List authList = authDao.selectByExample(sysAuthExample); if(CollectionUtil.isNotEmpty(authList)){ throw new BaseException(CodeEnum.ALREADY_EXIST_ACCOUNT); @@ -1536,4 +1590,26 @@ public class UserService implements IUserService { public String getUserNameByUserId(Long userId) { return userDao.getUserNameByUserId(userId); } + + @Override + public List queryUserInfos(Long[] ids) { + return userDao.queryUserInfos(ids); + } + + @Override + public UserVo.VerificationCode getVertifyCode() { + Map codeMap = ImageCodeGeneratorUtil.generateCountCode(); + //生成一个id + long id = snowflake.nextId(); + //将两个数的和,存在redis内,key为新生成的id + String imageCodeKey = WebConstant.IMAGE_CODE + id; + redisUtil.set(imageCodeKey,codeMap.get("sum"),90); + String imageBase64 = "data:image/png;base64," + ImageCodeGeneratorUtil.generateCodeImage(null, (String) codeMap.get("imageCode"), 200, 70); + + UserVo.VerificationCode vertifyCode = new UserVo.VerificationCode(); + vertifyCode.setImageBase64(imageBase64); + vertifyCode.setVerificationCodeId(String.valueOf(id)); + + return vertifyCode; + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java b/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java index daecfc3f..81176756 100644 --- a/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java +++ b/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java @@ -12,23 +12,29 @@ import com.ccsens.util.ExcelUtil; import com.ccsens.util.StringUtil; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; import java.util.Map; - +@Slf4j @Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class WbsSubSheetService implements IWbsSubSheetService { @Autowired private Snowflake snowflake; @Autowired + private SysProjectDao sysProjectDao; + @Autowired private ITaskMemberService taskMemberService; @Autowired private IProTaskDetailService proTaskDetailService; @@ -54,6 +60,8 @@ public class WbsSubSheetService implements IWbsSubSheetService { private SysMessageTypeDao sysMessageTypeDao; @Autowired private SysProjectRobotMessageDao projectRobotMessageDao; + @Autowired + private SysRelevanceProjectDao relevanceProjectDao; /** * 读取子任务表 @@ -64,8 +72,14 @@ public class WbsSubSheetService implements IWbsSubSheetService { XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); Long startTime = parentTaskDetail.getBeginTime(); if (ObjectUtil.isNotNull(subTaskSheet)) { - String str = ExcelUtil.getCellValue(subTaskSheet.getRow(1).getCell(4)); + String str = ""; + if(ObjectUtil.isNotNull(subTaskSheet.getRow(1))){ + str = ExcelUtil.getCellValue(subTaskSheet.getRow(1).getCell(4)); + } for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { + if(ObjectUtil.isNull(subTaskSheet.getRow(a))){ + continue; + } String nameCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(1)); String beginCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(2)); String endCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(3)); @@ -121,7 +135,7 @@ public class WbsSubSheetService implements IWbsSubSheetService { if ("重复时间".equals(str)) { subTask.setCycle(repeatCell); } - if ("相对时间".equals(str)) { + if ("时间".equals(str)) { subTask.setBeginTime(startTime); Long relative = StringUtil.severalDay(repeatCell); if (ObjectUtil.isNotNull(relative)) { @@ -162,6 +176,9 @@ public class WbsSubSheetService implements IWbsSubSheetService { XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); if (ObjectUtil.isNotNull(subTaskSheet)) { for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { + if(ObjectUtil.isNull(subTaskSheet.getRow(a))){ + continue; + } String nameCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(1)); String beginCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(2)); String endCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(3)); @@ -263,6 +280,9 @@ public class WbsSubSheetService implements IWbsSubSheetService { String pluginName = null; List proPluginSigninList = new ArrayList<>(); for (int i = 2; i < fuzzyStart; i++) { + if(ObjectUtil.isNull(signSheet.getRow(i))){ + continue; + } if (StrUtil.isNotEmpty(ExcelUtil.getCellValue(signSheet.getRow(i).getCell(1)))) { taskName = ExcelUtil.getCellValue(signSheet.getRow(i).getCell(1)); } @@ -312,42 +332,44 @@ public class WbsSubSheetService implements IWbsSubSheetService { } //读取模糊查询的信息 XSSFRow fuzzy = signSheet.getRow(fuzzyStart); - for (int i = 0; i < fuzzy.getLastCellNum(); i++) { - String fieldCell = ExcelUtil.getCellValue(fuzzy.getCell(i)); - //获取字段的id - Long signFieldId = null; - if (StrUtil.isNotEmpty(fieldCell)) { - SigninFieldExample signinFieldExample = new SigninFieldExample(); - signinFieldExample.createCriteria().andDescriptionEqualTo(fieldCell); - List fieldList = signinFieldDao.selectByExample(signinFieldExample); - if (CollectionUtil.isNotEmpty(fieldList)) { - signFieldId = fieldList.get(0).getId(); - } - } else { - break; - } - //添加内容 - if (ObjectUtil.isNotNull(signFieldId)) { - //修改关联表,将是否模糊搜索改成“是” - for (ProPluginSignin pluginSignin : proPluginSigninList) { - if (signFieldId.longValue() == pluginSignin.getSigninFieldId().longValue()) { - pluginSignin.setIsFuzzy((byte) 1); - proPluginSigninDao.updateByPrimaryKeySelective(pluginSignin); - break; + if(ObjectUtil.isNotNull(fuzzy)) { + for (int i = 0; i < fuzzy.getLastCellNum(); i++) { + String fieldCell = ExcelUtil.getCellValue(fuzzy.getCell(i)); + //获取字段的id + Long signFieldId = null; + if (StrUtil.isNotEmpty(fieldCell)) { + SigninFieldExample signinFieldExample = new SigninFieldExample(); + signinFieldExample.createCriteria().andDescriptionEqualTo(fieldCell); + List fieldList = signinFieldDao.selectByExample(signinFieldExample); + if (CollectionUtil.isNotEmpty(fieldList)) { + signFieldId = fieldList.get(0).getId(); } + } else { + break; } - //添加模糊查询内容 - for (int j = fuzzyStart + 1; j < signSheet.getLastRowNum(); j++) { - String description = ExcelUtil.getCellValue(signSheet.getRow(j).getCell(i)); - if (StrUtil.isNotEmpty(description)) { - ProPluginSigninFuzzy signinFuzzy = new ProPluginSigninFuzzy(); - signinFuzzy.setId(snowflake.nextId()); - signinFuzzy.setProjectId(projectId); - signinFuzzy.setSigninFieldId(signFieldId); - signinFuzzy.setDescription(description); - pluginSigninFuzzyDao.insertSelective(signinFuzzy); - } else { - break; + //添加内容 + if (ObjectUtil.isNotNull(signFieldId)) { + //修改关联表,将是否模糊搜索改成“是” + for (ProPluginSignin pluginSignin : proPluginSigninList) { + if (signFieldId.longValue() == pluginSignin.getSigninFieldId().longValue()) { + pluginSignin.setIsFuzzy((byte) 1); + proPluginSigninDao.updateByPrimaryKeySelective(pluginSignin); + break; + } + } + //添加模糊查询内容 + for (int j = fuzzyStart + 1; j < signSheet.getLastRowNum(); j++) { + String description = ExcelUtil.getCellValue(signSheet.getRow(j).getCell(i)); + if (StrUtil.isNotEmpty(description)) { + ProPluginSigninFuzzy signinFuzzy = new ProPluginSigninFuzzy(); + signinFuzzy.setId(snowflake.nextId()); + signinFuzzy.setProjectId(projectId); + signinFuzzy.setSigninFieldId(signFieldId); + signinFuzzy.setDescription(description); + pluginSigninFuzzyDao.insertSelective(signinFuzzy); + } else { + break; + } } } } @@ -405,6 +427,9 @@ public class WbsSubSheetService implements IWbsSubSheetService { XSSFSheet pluginConfigSheet = xssfWorkbook.getSheet("插件配置"); if (ObjectUtil.isNotNull(pluginConfigSheet)) { for (int i = 2; i <= pluginConfigSheet.getLastRowNum(); i++) { + if(ObjectUtil.isNull(pluginConfigSheet.getRow(i))){ + continue; + } String taskName = ExcelUtil.getCellValue(pluginConfigSheet.getRow(i).getCell(1)); String webPath = ExcelUtil.getCellValue(pluginConfigSheet.getRow(i).getCell(2)); String pluginName = ExcelUtil.getCellValue(pluginConfigSheet.getRow(i).getCell(3)); @@ -422,7 +447,7 @@ public class WbsSubSheetService implements IWbsSubSheetService { } } if (taskId == null) { - throw new BaseException(CodeEnum.NOT_TASK); + throw new BaseException(CodeEnum.NOT_TASK + ":" + taskName); } //获取插件id Long pluginId = 0L; @@ -470,12 +495,16 @@ public class WbsSubSheetService implements IWbsSubSheetService { XSSFSheet robotSheet = xssfWorkbook.getSheet("智能助手"); if(ObjectUtil.isNotNull(robotSheet)){ for (int i = 1; i <= robotSheet.getLastRowNum(); i++) { + XSSFRow row = robotSheet.getRow(i); + if (ObjectUtil.isNull(row)){ + continue; + } //机器人与项目关联信息的id Long projectRobotId = null; - String robotName = ExcelUtil.getCellValue(robotSheet.getRow(i).getCell(0)); - String webHookPath = ExcelUtil.getCellValue(robotSheet.getRow(i).getCell(1)); - String messageType = ExcelUtil.getCellValue(robotSheet.getRow(i).getCell(2)); - String robotType = ExcelUtil.getCellValue(robotSheet.getRow(i).getCell(3)); + String robotName = ExcelUtil.getCellValue(row.getCell(0)); + String webHookPath = ExcelUtil.getCellValue(row.getCell(1)); + String messageType = ExcelUtil.getCellValue(row.getCell(2)); + String robotType = ExcelUtil.getCellValue(row.getCell(3)); if(StrUtil.isNotEmpty(webHookPath)){ //添加机器人并关联项目 SysRobotExample sysRobotExample = new SysRobotExample(); @@ -494,7 +523,9 @@ public class WbsSubSheetService implements IWbsSubSheetService { sysRobot.setId(snowflake.nextId()); sysRobot.setName(robotName); sysRobot.setWebHook(webHookPath); - sysRobot.setClientType(Byte.valueOf(robotType)); + if(StrUtil.isNotEmpty(robotType)) { + sysRobot.setClientType(Byte.valueOf(robotType)); + } sysRobotDao.insertSelective(sysRobot); SysProjectRobot sysProjectRobot = new SysProjectRobot(); sysProjectRobot.setId(snowflake.nextId()); @@ -536,4 +567,32 @@ public class WbsSubSheetService implements IWbsSubSheetService { } } } + + /** + * 读取关联项目表 + * @param projectId + * @param xssfWorkbook + */ + @Override + public void readRelevanceProject(Long projectId, XSSFWorkbook xssfWorkbook) { + XSSFSheet relevanceSheet = xssfWorkbook.getSheet("关联项目表"); + if(ObjectUtil.isNotNull(relevanceSheet)){ + for (int i = 1; i <= relevanceSheet.getLastRowNum(); i++) { + if (ObjectUtil.isNotNull(relevanceSheet.getRow(i))){ + String relevanceProjectId = ExcelUtil.getCellValue(relevanceSheet.getRow(i).getCell(2)); + if (StrUtil.isNotEmpty(relevanceProjectId)) { + SysProject sysProject = sysProjectDao.selectByPrimaryKey(Long.valueOf(relevanceProjectId)); + if (ObjectUtil.isNull(sysProject)) { + throw new BaseException(CodeEnum.NOT_PROJECT.addMsg("关联项目表" + i)); + } + SysRelevanceProject sysRelevanceProject = new SysRelevanceProject(); + sysRelevanceProject.setId(snowflake.nextId()); + sysRelevanceProject.setProjectId(projectId); + sysRelevanceProject.setRelevanceProjectId(Long.valueOf(relevanceProjectId)); + relevanceProjectDao.insertSelective(sysRelevanceProject); + } + } + } + } + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/WpsService.java b/tall/src/main/java/com/ccsens/tall/service/WpsService.java new file mode 100644 index 00000000..56ee8acc --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/WpsService.java @@ -0,0 +1,492 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.io.FileUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.tall.bean.dto.WpsDto; +import com.ccsens.tall.bean.po.*; +import com.ccsens.tall.bean.vo.UserVo; +import com.ccsens.tall.bean.vo.WpsVo; +import com.ccsens.tall.persist.dao.SysUserDao; +import com.ccsens.tall.persist.dao.TaskDetailDao; +import com.ccsens.tall.persist.dao.TaskSubTimeDao; +import com.ccsens.tall.persist.dao.WpsFileDao; +import com.ccsens.tall.persist.mapper.ProProjectFileMapper; +import com.ccsens.tall.persist.mapper.WpsFileUserMapper; +import com.ccsens.tall.persist.mapper.WpsFileVersionMapper; +import com.ccsens.tall.persist.mapper.WpsNotifyMapper; +import com.ccsens.util.*; +import com.ccsens.util.exception.BaseException; +import io.jsonwebtoken.Claims; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import javax.servlet.http.Part; +import java.io.File; +import java.util.*; + +/** + * wps文件 + * @author: whj + * @date: 2020/6/17 18:05 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class WpsService implements IWpsService { + + @Resource + private WpsFileDao wpsFileDao; + @Resource + private WpsFileVersionMapper wpsFileVersionMapper; + @Resource + private WpsFileUserMapper wpsFileUserMapper; + @Resource + private SysUserDao sysUserDao; + @Resource + private ProProjectFileMapper proProjectFileMapper; + @Resource + private WpsNotifyMapper wpsNotifyMapper; + @Resource + private RedisUtil redisUtil; + @Resource + private Snowflake snowflake; + @Resource + private IAsyncService asyncService; + @Resource + private IProRoleService proRoleService; + @Resource + private TaskSubTimeDao taskSubTimeDao; + @Resource + private TaskDetailDao taskDetailDao; + + @Override + public List queryVisitUrls(long businessId, byte businessType, String token, Map params) { + log.info("查询访问路径:{},{}", businessId, businessType); + List urls = new ArrayList<>(); + + List files = wpsFileDao.queryFileByBusiness(businessId, businessType); + files.forEach(file -> { + String name = file.getFileName(); + log.info("文件名:{}", name); + String url = getUrl(String.valueOf(file.getFileId()), name.substring(name.lastIndexOf(".") + 1), token, params); + if(StrUtil.isNotEmpty(url)){ + urls.add(url); + } + }); + log.info("访问路径返回结果:{}", urls); + return urls; + } + + @Override + public void saveFile(WpsDto.Business business) { + ProProjectFile proProjectFile = null; + if (business.getWpsFileId() != null) { + ProProjectFileExample example = new ProProjectFileExample(); + example.createCriteria().andBusinessIdEqualTo(business.getBusinessId()) + .andBusinessTypeEqualTo(business.getBusinessType()) + .andWpsFileIdEqualTo(business.getWpsFileId()); + List proProjectFiles = proProjectFileMapper.selectByExample(example); + if (CollectionUtil.isEmpty(proProjectFiles)) { + throw new BaseException(CodeEnum.PARAM_ERROR); + } + proProjectFile = proProjectFiles.get(0); + } + + // 保存文件版本信息 + WpsFile wpsFile = saveWpsFile(business.getWpsFileId() == null ? null : String.valueOf(business.getWpsFileId()), + business.getFileSize(), business.getUserId(), business.getFilePath(), + business.getFileName()); + // 更新文件记录 + WpsFileVersion version = saveVersion(wpsFile); + // 调用接口,更新数据项目接口(异步调用) + // 保存用户提交记录 + WpsFileUser wpsFileUser = initFileUser(business.getUserId(), version.getId()); + wpsFileUser.setOperation(business.getOperation()); + wpsFileUserMapper.insertSelective(wpsFileUser); + // 文件ID为空,保存文件和业务的关系 + if (proProjectFile == null) { + saveBusiness(business, wpsFile); + } + } + + /** + * 保存业务文件关联 + * @param business 业务信息 + * @param wpsFile 获取文件ID + */ + private void saveBusiness(WpsDto.Business business, WpsFile wpsFile) { + ProProjectFile proProjectFile; + proProjectFile = new ProProjectFile(); + proProjectFile.setId(snowflake.nextId()); + proProjectFile.setWpsFileId(wpsFile.getId()); + proProjectFile.setBusinessId(business.getBusinessId()); + proProjectFile.setBusinessType(business.getBusinessType()); + proProjectFile.setPrivilege(business.getPrivilege()); + proProjectFile.setPrivilegeQueryUrl(business.getPrivilegeQueryUrl()); + proProjectFileMapper.insertSelective(proProjectFile); + } + + @Override + public void notify(String token, WpsDto.NotifyBody body) throws Exception { + getUserId(token); + WpsNotify wpsNotify = new WpsNotify(); + wpsNotify.setId(snowflake.nextId()); + wpsNotify.setCmd(body.getCmd()); + wpsNotify.setBody(body.getBody().toJSONString()); + wpsNotifyMapper.insertSelective(wpsNotify); + } + + + @Override + public void fileRename(String token, long fileId, WpsDto.FileRenameBody renameBody) throws Exception { + Long userId = getUserId(token); + // 修改当前文件名 + WpsFile file = wpsFileDao.selectByPrimaryKey(fileId); + if (file == null) { + log.info("文件不存在"); + throw new BaseException(CodeEnum.FILE_NOT_FOUND); + } + WpsFile wpsFile = new WpsFile(); + wpsFile.setId(fileId); + wpsFile.setName(renameBody.getName()); + wpsFile.setModifier(userId); + wpsFileDao.updateByPrimaryKeySelective(wpsFile); + // 删除原来的文件版本记录 + WpsFileVersionExample wpsFileVersionExample = new WpsFileVersionExample(); + wpsFileVersionExample.createCriteria().andFileIdEqualTo(fileId) + .andVersionEqualTo(file.getCurrentVersion()) + .andRecStatusEqualTo(WebConstant.REC_STATUS.Normal.value); + WpsFileVersion updateVersion = new WpsFileVersion(); + updateVersion.setRecStatus(WebConstant.REC_STATUS.Deleted.value); + wpsFileVersionMapper.updateByExampleSelective(updateVersion, wpsFileVersionExample); + // 保存版本信息 + WpsFile newWpsFile = wpsFileDao.selectByPrimaryKey(fileId); + WpsFileVersion version = saveVersion(newWpsFile); + // 保存操作记录 + WpsFileUser fileUser = initFileUser(userId, version.getId()); + fileUser.setOperation(WebConstant.Wps.USER_OPERATION_RENAME); + wpsFileUserMapper.insertSelective(fileUser); + } + + @Override + public List queryFileHistory(String token, WpsDto.FileHistoryBody body) throws Exception { + getUserId(token); + return wpsFileDao.queryFileHistory(body); + } + + @Override + public WpsVo.FileBase fileVersion(String token, Long fileId, Integer version) throws Exception { + Long userId = getUserId(token); + // 查找指定版本version + Map map = wpsFileDao.getVersion(fileId, version); + if (map == null || map.isEmpty()) { + throw new BaseException(CodeEnum.FILE_NOT_FOUND); + } + WpsVo.FileBase base = JSONObject.parseObject(JSONObject.toJSONString(map), WpsVo.FileBase.class); + // 保存用户打开文件旧版本记录 + WpsFileUser wpsFileUser = initFileUser(userId, base.getFileVersionId()); + wpsFileUser.setOperation(WebConstant.Wps.USER_OPERATION_OLD); + wpsFileUserMapper.insertSelective(wpsFileUser); + return base; + } + + @Override + public WpsVo.FileNew fileNew(String token, String fileId, String name, Part file, WpsDto.FileNew fileNew) throws Exception { + WpsFile wpsFile = saveWpsFile(token, fileId, file,WebConstant.Wps.USER_OPERATION_NEW, fileNew.get_w_url()); + String fileName = UploadFileUtil_Servlet3.getFileNameByPart(file); + String ext = FileUtil.extName(fileName); + Map params = new HashMap<>(); + if (StrUtil.isNotEmpty(fileNew.get_w_url())) { + params.put(WebConstant.Wps._W_URL, fileNew.get_w_url()); + } + String url = getUrl(String.valueOf(wpsFile.getId()), ext, token, params); + WpsVo.FileNew fileNew2 = new WpsVo.FileNew(); + fileNew2.setRedirect_url(url); + fileNew2.setUser_id(String.valueOf(wpsFile.getCreator())); + return fileNew2; + } + + /** + * 返回WPS文件访问路径 + * @param fileId 文件ID + * @param ext 后缀 + * @param token token + * @param params 保存时回访的路径 + * @return wps访问路径 + */ + private String getUrl(String fileId, String ext, String token, Map params) { + if(!WebConstant.Wps.FILE_TYPE_ALL.contains(ext)){ + return null; + } + String fileType = WebConstant.Wps.getFileType(ext); + Map paramMap= new HashMap<>(); + paramMap.put("_w_appid", (String) redisUtil.get(WebConstant.Wps.APPID)); + paramMap.put("_w_token", token); + if (CollectionUtil.isNotEmpty(params)) { + paramMap.putAll(params); + } + + String newSignature = WpsSignature.getSignature(paramMap, (String) redisUtil.get(WebConstant.Wps.APPKEY)); + StringBuilder fileUrl = new StringBuilder("https://wwo.wps.cn/office/{}/{}?_w_appid=" + redisUtil.get(WebConstant.Wps.APPID) + "&_w_signature={}&_w_token={}"); + if (CollectionUtil.isNotEmpty(params)) { + params.forEach((k,v) -> fileUrl.append("&").append(k).append("=").append(v)); + } + return StrUtil.format(fileUrl, fileType, fileId, newSignature, token); + } + + @Override + public WpsVo.FileInfo getFileInfo(String fileId, String token) throws Exception { + + Long userId = getUserId(token); + // 查询文件信息 + WpsFile wpsFile = wpsFileDao.selectByPrimaryKey(Long.parseLong(fileId)); + log.info("文件信息:{}", wpsFile); + if (wpsFile == null) { + throw new BaseException(CodeEnum.FILE_NOT_FOUND); + } + + // 查询用户信息 + UserVo.UserInfo userInfo = sysUserDao.getUserInfoByUserId(userId); + log.info("用户信息:{}", userInfo); + if (userInfo == null) { + throw new BaseException(CodeEnum.NOT_LOGIN); + } + WpsVo.User user = WpsVo.User.getInstance(userInfo); + + // 记录用户操作信息 + WpsFileVersionExample versionExample = new WpsFileVersionExample(); + versionExample.createCriteria().andFileIdEqualTo(wpsFile.getId()).andVersionEqualTo(wpsFile.getCurrentVersion()); + List wpsFileVersions = wpsFileVersionMapper.selectByExample(versionExample); + if (CollectionUtil.isEmpty(wpsFileVersions)) { + log.info("未找到对应的版本信息:{},{}",wpsFile.getId(), wpsFile.getCurrentVersion()); + throw new BaseException(CodeEnum.PARAM_ERROR); + } + WpsFileUser wpsFileUser = initFileUser(userId, wpsFileVersions.get(0).getId()); + + //封装对象 + WpsVo.FileInfo fileInfo = new WpsVo.FileInfo(); + WpsVo.File file = WpsVo.File.beanToVo(wpsFile,userInfo.getNickname()); + fileInfo.setFile(file); + fileInfo.setUser(user); + + // 查询权限信息 + List proProjectFiles = getProProjectFiles(wpsFile.getId()); + log.info("文件项目关系:{}", proProjectFiles); + if (CollectionUtil.isEmpty(proProjectFiles)) { + wpsFileUser.setOperation(WebConstant.Wps.USER_OPERATION_READ); + wpsFileUserMapper.insertSelective(wpsFileUser); + return fileInfo; + } + + ProProjectFile projectFile = proProjectFiles.get(0); + byte privilege = projectFile.getPrivilege(); + switch (privilege) { + case WebConstant.Wps.PROJECT_PRIVILEGE_READ : + user.setPermission(WebConstant.Wps.PERMISSION_READ); + break; + case WebConstant.Wps.PROJECT_PRIVILEGE_WRITE: + user.setPermission(WebConstant.Wps.PERMISSION_WRITE); + break; + default: + JSONObject json = new JSONObject(); + json.put("id", projectFile.getBusinessId()); + json.put("type", projectFile.getBusinessType()); + json.put("fileId", projectFile.getWpsFileId()); + json.put("userId", userId ); + String result = RestTemplateUtil.postBody(projectFile.getPrivilegeQueryUrl(), json); + user.setPermission(result); + } + +// int power = proRoleService.selectPowerByRoleName(userId, proProjectFiles.get(0).getId()); +// log.info("权限:{}", power); +// if (power > 1) { +// user.setPermission(WebConstant.Wps.PERMISSION_WRITE); +// } + wpsFileUser.setOperation(WebConstant.Wps.PERMISSION_READ.equals(user.getPermission()) ? WebConstant.Wps.USER_OPERATION_READ : WebConstant.Wps.USER_OPERATION_WRITE); + wpsFileUserMapper.insertSelective(wpsFileUser); + return fileInfo; + } + + /** + * 初始化用户和文档(无操作类型) + * @param userId 用户id + * @param fileId 文件id + * @return 用户操作文件记录 + */ + private WpsFileUser initFileUser(Long userId, Long fileId) { + WpsFileUser wpsFileUser = new WpsFileUser(); + wpsFileUser.setId(snowflake.nextId()); + wpsFileUser.setVersionId(fileId); + wpsFileUser.setUserId(userId); + return wpsFileUser; + } + + private List getProProjectFiles(Long fileId) { + ProProjectFileExample projectFileExample = new ProProjectFileExample(); + projectFileExample.createCriteria().andWpsFileIdEqualTo(fileId); + return proProjectFileMapper.selectByExample(projectFileExample); + } + + @Override + public WpsVo.FileSave fileSave(String token, String fileId, WpsDto.FileSave fileSave, Part file) throws Exception { + WpsFile wpsFile = saveWpsFile(token, fileId, file,WebConstant.Wps.USER_OPERATION_SAVE, fileSave.get_w_url()); + + // 返回参数 + WpsVo.FileBase fileBase = new WpsVo.FileBase(wpsFile); + + return new WpsVo.FileSave(fileBase); + } + + private WpsFile saveWpsFile(String token, String fileId, Part file, Byte operation, String url) throws Exception { + Long userId = getUserId(token); + // 保存文件 + String allowedExt = WebConstant.Wps.FILE_TYPE_ALL; + String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_WPS; + String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExt, dir); + String filePath = WebConstant.UPLOAD_PATH_WPS + File.separator + path; + String name = UploadFileUtil_Servlet3.getFileNameByPart(file); + // 保存文件版本信息 + WpsFile wpsFile = saveWpsFile(fileId, file.getSize(), userId, filePath, name); + // 更新文件记录 + WpsFileVersion version = saveVersion(wpsFile); + // 调用接口,更新数据项目接口(异步调用) + if (StrUtil.isNotEmpty(url)) { + WpsDto.Async params = new WpsDto.Async(); + params.setFileId(wpsFile.getId()); + asyncService.postBody(url, params); + } + // 保存用户提交记录 + WpsFileUser wpsFileUser = initFileUser(userId, version.getId()); + wpsFileUser.setOperation( operation); + wpsFileUserMapper.insertSelective(wpsFileUser); + return wpsFile; + } + + private WpsFileVersion saveVersion(WpsFile wpsFile) { + WpsFileVersion version = new WpsFileVersion(); + version.setId(snowflake.nextId()); + version.setFileId(wpsFile.getId()); + version.setVersion(wpsFile.getCurrentVersion()); + version.setName(wpsFile.getName()); + version.setSize(wpsFile.getSize()); + version.setDownloadUrl(wpsFile.getDownloadUrl()); + version.setSaveUrl(wpsFile.getSaveUrl()); + version.setModifier(wpsFile.getModifier()); + wpsFileVersionMapper.insertSelective(version); + return version; + } + + /** + * 保存文件信息 + * @param fileId 文件ID,无则保存,有则修改 + * @param fileSize 文件大小 + * @param userId 用户id + * @param filePath 文件位置,默认在:WebConstant.UPLOAD_PATH_BASE 下 + * @param name 文件名字 + * @return wpsFile + */ + private WpsFile saveWpsFile(String fileId, Long fileSize, Long userId, String filePath, String name) { + WpsFile wpsFile; + if (StrUtil.isEmpty(fileId)) { + // 创建文件ID + wpsFile = new WpsFile(); + wpsFile.setId(snowflake.nextId()); + wpsFile.setCurrentVersion(1); + wpsFile.setCreator(userId); + } else { + wpsFile = wpsFileDao.selectByPrimaryKey(Long.parseLong(fileId)); + if (wpsFile == null) { + throw new BaseException(CodeEnum.FILE_NOT_FOUND); + } + wpsFile.setCurrentVersion(wpsFile.getCurrentVersion() + 1); + } + wpsFile.setCreatedAt(new Date()); + wpsFile.setUpdatedAt(new Date()); + wpsFile.setName(name); + wpsFile.setSize(fileSize); + wpsFile.setDownloadUrl(PropUtil.domain + "file/download/" + name + "?path=" + filePath); + wpsFile.setSaveUrl(WebConstant.UPLOAD_PATH_BASE + File.separator + filePath); + wpsFile.setModifier(userId); + + if (StrUtil.isEmpty(fileId)) { + wpsFileDao.insertSelective(wpsFile); + } else { + wpsFileDao.updateByPrimaryKeySelective(wpsFile); + } + return wpsFile; + } + + private Long getUserId(String token) throws Exception { + Claims claims = JwtUtil.parseJWT(token, WebConstant.JWT_ACCESS_TOKEN_SECERT); + long userId = Long.parseLong(claims.getSubject()); + String redisToken = (String)redisUtil.get(RedisKeyManager.getTokenCachedKey(userId)); + if (StrUtil.isEmpty(redisToken)) { + throw new BaseException(CodeEnum.NOT_LOGIN); + } + return userId; + } + + @Override + public WpsVo.BusinessFileIdAndPath getPathById(Long fileId) { + WpsVo.BusinessFileIdAndPath fileIdAndPath = new WpsVo.BusinessFileIdAndPath(); + if(fileId != null) { + WpsFile wpsFile = wpsFileDao.selectByPrimaryKey(fileId); + if (ObjectUtil.isNotNull(wpsFile)) { + fileIdAndPath.setFilePath(wpsFile.getSaveUrl()); + } + ProProjectFileExample proProjectFileExample = new ProProjectFileExample(); + proProjectFileExample.createCriteria().andWpsFileIdEqualTo(fileId); + List projectFileList = proProjectFileMapper.selectByExample(proProjectFileExample); + if(CollectionUtil.isNotEmpty(projectFileList)){ + fileIdAndPath.setBusinessId(projectFileList.get(0).getBusinessId()); + } + } + return fileIdAndPath; + } + + @Override + public String getWpsPower(WpsDto.WpsPower wpsPower) { + log.info("查看该用户的操作权限:{}",wpsPower.toString()); + Long projectId = wpsPower.getId(); + if(wpsPower.getType() == 2){ + ProTaskSubTime proTaskSubTime = taskSubTimeDao.selectByPrimaryKey(wpsPower.getId()); + if(ObjectUtil.isNotNull(proTaskSubTime)){ + ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(proTaskSubTime.getTaskDetailId()); + if(ObjectUtil.isNotNull(taskDetail)){ + projectId = taskDetail.getProjectId(); + } + } + } + int power = proRoleService.selectPowerByRoleName(wpsPower.getUserId(),projectId); + if (power > 1) { + log.info("权限为可写"); + return WebConstant.Wps.PERMISSION_WRITE; + } + log.info("权限为只读"); + return WebConstant.Wps.PERMISSION_READ; + } + + @Override + public String getFilePath(Long businessId,byte businessType) { + String filePath = null; + if(ObjectUtil.isNotNull(businessId) && ObjectUtil.isNotNull(businessType)){ + ProProjectFileExample projectFileExample = new ProProjectFileExample(); + projectFileExample.createCriteria().andBusinessIdEqualTo(businessId).andBusinessTypeEqualTo(businessType); + List projectFileList = proProjectFileMapper.selectByExample(projectFileExample); + if(CollectionUtil.isNotEmpty(projectFileList)){ + WpsFile wpsFile = wpsFileDao.selectByPrimaryKey(projectFileList.get(0).getWpsFileId()); + if(ObjectUtil.isNotNull(wpsFile)){ + filePath = wpsFile.getSaveUrl(); + } + } + } + return filePath; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/util/RobotUtil.java b/tall/src/main/java/com/ccsens/tall/util/RobotUtil.java index d8c799cb..db391727 100644 --- a/tall/src/main/java/com/ccsens/tall/util/RobotUtil.java +++ b/tall/src/main/java/com/ccsens/tall/util/RobotUtil.java @@ -1,5 +1,7 @@ package com.ccsens.tall.util; +import com.ccsens.tall.bean.vo.MessageVo; +import com.ccsens.util.wx.WxTemplateMessage; import lombok.Data; import java.util.ArrayList; @@ -8,6 +10,13 @@ import java.util.List; public class RobotUtil { + /** 机器人推送 */ + private static final ThreadLocal robotThreadLocal = new ThreadLocal(); + /** 消息推送(ws/公众号) */ + private static final ThreadLocal informThreadLocal = new ThreadLocal(); + private static final ThreadLocal wxMessageThreadLocal = new ThreadLocal<>(); + + @Data public static class Message{ private String msgType = "text"; @@ -15,7 +24,7 @@ public class RobotUtil { private List mentionedMobileList = new ArrayList<>(); private boolean isAtAll = false; private Long projectId; - private List params = new ArrayList<>(); + private List params = new ArrayList<>(); public Message(){ } @@ -43,7 +52,7 @@ public class RobotUtil { this.mentionedMobileList.addAll(Arrays.asList(mentionedMobileList)); } - public void appendParams(String... params){ + public void appendParams(MessageVo.Message... params){ if(params == null || params.length == 0){ return; } @@ -52,20 +61,45 @@ public class RobotUtil { } - static final ThreadLocal robotThreadLocal = new ThreadLocal(); - public static Message get() { + + public static Message getRobotMessage() { return robotThreadLocal.get(); } - public static void set(Message message) { + public static void setRobotMessage(Message message) { robotThreadLocal.set(message); } - public static void del() { + public static void delRobotMessage() { robotThreadLocal.remove(); } + public static MessageVo.Inform getInform() { + return informThreadLocal.get(); + } + + public static void setInform(MessageVo.Inform message) { + informThreadLocal.set(message); + } + + public static void delInform() { + informThreadLocal.remove(); + } + + public static WxTemplateMessage getWxTemplate() { + return wxMessageThreadLocal.get(); + } + + public static void setWxTemplate(WxTemplateMessage message) { + wxMessageThreadLocal.set(message); + } + + public static void delWxTemplate() { + wxMessageThreadLocal.remove(); + } + + } diff --git a/tall/src/main/java/com/ccsens/tall/util/TallConstant.java b/tall/src/main/java/com/ccsens/tall/util/TallConstant.java index 3d20a301..2d0d8543 100644 --- a/tall/src/main/java/com/ccsens/tall/util/TallConstant.java +++ b/tall/src/main/java/com/ccsens/tall/util/TallConstant.java @@ -5,6 +5,16 @@ package com.ccsens.tall.util; */ public class TallConstant { + /*** redis key: 修改账号*/ + public static final String UPDATE_ACCOUNT = "update_account_"; + /*** redis key: 修改账号*/ + public static final String UPDATE_NICKNAME = "update_nickname_"; + /*** redis key: 查找登陆用户 格式 identifier_login_identifyType 有效期一天*/ + public static final String LOGIN = "_login_"; + + /***一天 */ + public static final long LOGIN_TIME = 60 * 60 * 24; + /** * 接口发送的信息模板 * @param operateType 接口code @@ -14,4 +24,30 @@ public class TallConstant { return "operate_type_" + operateType; } + public static String getUpdateAccount(String account){ + return UPDATE_ACCOUNT + account; + } + + public static String getUpdateNickname(String nickname){ + return UPDATE_ACCOUNT + nickname; + } + + public static final class TaskRemindTiming { + /**不提醒*/ + public static final byte REMIND_NONE = 0; + /**开始前*/ + public static final byte REMIND_TASK_BEFORE_START = 1; + /**开始时*/ + public static final byte REMIND_TASK_START = 2; + /**开始后*/ + public static final byte REMIND_TASK_AFTER_START = 3; + /**结束前*/ + public static final byte REMIND_TASK_BEFORE_END = 4; + /**结束时*/ + public static final byte REMIND_TASK_END = 5; + /**结束后*/ + public static final byte REMIND_TASK_AFTER_END = 6; + /**自定义*/ + public static final byte REMIND_TASK_USER_DEFINED = 7; + } } diff --git a/tall/src/main/java/com/ccsens/tall/util/TaskUtil.java b/tall/src/main/java/com/ccsens/tall/util/TaskUtil.java index 981f8bf8..db9e0673 100644 --- a/tall/src/main/java/com/ccsens/tall/util/TaskUtil.java +++ b/tall/src/main/java/com/ccsens/tall/util/TaskUtil.java @@ -67,7 +67,7 @@ public class TaskUtil { } if (detail.getBeginTime() <= start && detail.getEndTime() > end) { globalTask.add(detail); - } else if (detail.getBeginTime() == start && detail.getEndTime() == end){ + } else if (detail.getBeginTime() == start && (detail.getEndTime() == end || detail.getEndTime() + 999 == end)){ globalTask.add(detail); }else if (detail.getBeginTime() >= start && detail.getEndTime()>end) { //开始的任务点 diff --git a/tall/src/main/java/com/ccsens/tall/util/WxTemplateUtil.java b/tall/src/main/java/com/ccsens/tall/util/WxTemplateUtil.java new file mode 100644 index 00000000..a1a37e2c --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/util/WxTemplateUtil.java @@ -0,0 +1,169 @@ +package com.ccsens.tall.util; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.util.WechatUtil; +import com.ccsens.util.wx.WxGzhUtil; +import com.ccsens.util.wx.WxTemplateMessage; + + +/** + * @description: 微信模板 + * @author: whj + * @time: 2020/6/9 11:07 + */ +public class WxTemplateUtil { + + /** + * 设置小程序跳转 + * @param projectId + * @return + */ + private static WxTemplateMessage getWxTemplateMessage(Long projectId) { + String url = String.format(WechatUtil.PROJECT_URL, projectId); + WxTemplateMessage.MiniProgram miniProgram = new WxTemplateMessage.MiniProgram(WechatUtil.appid,url); + + WxTemplateMessage message = new WxTemplateMessage(); + message.setMiniprogram(miniProgram); + return message; + } + + /** + * 完成任务提醒(备注是在切面处统一加的) + * @param projectId + * @param userName + * @param operation + * @param taskName + * @return + */ + public static WxTemplateMessage getFinishTask(Long projectId, String userName, String operation, String taskName){ + + WxTemplateMessage message = getWxTemplateMessage(projectId); + message.setTemplate_id(WxGzhUtil.Template.TASK_FINISH.templateId); + WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); + data.setFirst(new WxTemplateMessage.TemplateSettings(userName + operation + taskName)); + data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskName)); + data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); + message.setData(data); + return message; + } + + + /** + * 添加任务(备注是在切面处统一加的) + * @param projectId + * @param userName + * @param taskName + * @return + */ + public static WxTemplateMessage getAddTask(Long projectId, String userName, String taskName) { + WxTemplateMessage message = getWxTemplateMessage(projectId); + message.setTemplate_id(WxGzhUtil.Template.TASK_ADD.templateId); + WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); + data.setFirst(new WxTemplateMessage.TemplateSettings(StrUtil.format("{}添加了{}任务", userName, taskName))); + data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskName)); + data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); + message.setData(data); + return message; + } + + /** + * 删除任务 + * @param projectId + * @param userName + * @param taskName + * @return + */ + public static WxTemplateMessage getDeleteTask(Long projectId, String userName, String taskName) { + WxTemplateMessage message = getWxTemplateMessage(projectId); + message.setTemplate_id(WxGzhUtil.Template.TASK_DELETE.templateId); + WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); + data.setFirst(new WxTemplateMessage.TemplateSettings(StrUtil.format("{}删除了{}任务", userName, taskName))); + data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskName)); + data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); + data.setKeyword3(new WxTemplateMessage.TemplateSettings("")); + message.setData(data); + return message; + } + + /** + * 修改任务 + * @param projectId + * @param userName + * @param taskName + * @return + */ + public static WxTemplateMessage getChangeTask(Long projectId, String userName, String taskName) { + WxTemplateMessage message = getAddTask(projectId, userName, taskName); + message.getData().setFirst(new WxTemplateMessage.TemplateSettings(StrUtil.format("{}修改了{}任务", userName, taskName))); + return message; + } + + /** + * 上传交付物 + * @param projectId + * @param userName + * @param deliverName + * @return + */ + public static WxTemplateMessage getAddDeliver(Long projectId, String userName, String deliverName) { + WxTemplateMessage message = getWxTemplateMessage(projectId); + message.setTemplate_id(WxGzhUtil.Template.TASK_PROGRESS.templateId); + WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); + data.setFirst(new WxTemplateMessage.TemplateSettings("")); + data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName + "上传了" + deliverName)); + data.setKeyword2(new WxTemplateMessage.TemplateSettings("上传交付物")); + message.setData(data); + return message; + } + + /** + * 删除交付物 + * @param projectId + * @param userName + * @param deliverName + * @return + */ + public static WxTemplateMessage getDeleteDeliver(Long projectId, String userName, String deliverName) { + WxTemplateMessage message = getAddDeliver(projectId, userName, deliverName); + WxTemplateMessage.TemplateData data = message.getData(); + data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName + "删除了" + deliverName)); + data.setKeyword2(new WxTemplateMessage.TemplateSettings("删除交付物")); + message.setData(data); + return message; + } + + /** + * 检查交付物 + * @param projectId + * @param userName + * @param deliverName + * @return + */ + public static WxTemplateMessage getCheckDeliver(Long projectId, String userName, String deliverName) { + WxTemplateMessage message = getAddDeliver(projectId, userName, deliverName); + WxTemplateMessage.TemplateData data = message.getData(); + data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName + "检查了" + deliverName)); + data.setKeyword2(new WxTemplateMessage.TemplateSettings("检查交付物")); + message.setData(data); + return message; + } + + /** + * 发表评论 + * @param projectId + * @param userName + * @return + */ + public static WxTemplateMessage getAddComment(Long projectId, String userName) { + WxTemplateMessage message = getWxTemplateMessage(projectId); + message.setTemplate_id(WxGzhUtil.Template.TASK_PROGRESS.templateId); + WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); + data.setFirst(new WxTemplateMessage.TemplateSettings(userName + "进行了点评")); + data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName)); + data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); + message.setData(data); + return message; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/web/ChartController.java b/tall/src/main/java/com/ccsens/tall/web/ChartController.java new file mode 100644 index 00000000..e423c2fb --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/ChartController.java @@ -0,0 +1,124 @@ +package com.ccsens.tall.web; + +import com.ccsens.tall.bean.dto.ChartDto; +import com.ccsens.tall.bean.vo.ChartVo; +import com.ccsens.tall.service.IChartService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import io.jsonwebtoken.Claims; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Api(tags = "图表相关API", description = "") +@RestController +@RequestMapping("/charts") +public class ChartController { + @Autowired + private IChartService chartService; + + + @ApiOperation(value = "任务执行者分布图",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/executor", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getTasksByTaskId(HttpServletRequest request, + @Validated @RequestBody ChartDto.ChartsExecutorDto chartsExecutorDto) throws Exception{ + + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + ChartVo.ExecutorChart executorChart = chartService.getExecutorChart(currentUserId,chartsExecutorDto); + return JsonResponse.newInstance().ok(executorChart); + } + +// @ApiOperation(value = "任务执行者分布图",notes = "") +// @ApiImplicitParams({ +// @ApiImplicitParam(name = "type", value = "类型 0按任务数量返回 1按任务时长返回(分钟)", required = true, paramType = "query"), +// @ApiImplicitParam(name = "process", value = "完成状态 0全部,1完成,2未完成 默认0", required = false, paramType = "query"), +// }) +// @RequestMapping(value = "/executor", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse getTasksByTaskId(HttpServletRequest request, +// @RequestParam(required = true)Long projectId, +// @RequestParam(required = false)Integer type, +// @RequestParam(required = false)Integer process) throws Exception{ +// type = type == null ? 0 : type; +// process = process == null ? 0 : process; +// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); +// ChartVo.ExecutorChart executorChart = chartService.getExecutorChart(currentUserId,projectId,type,process); +// return JsonResponse.newInstance().ok(executorChart); +// } + @ApiOperation(value = "计划时间内完成任务",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/complete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getCompleteTaskByTime(HttpServletRequest request, + @Validated @RequestBody ChartDto.ChartsCompleteDto chartsCompleteDto){ + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List completeTaskNumList = chartService.getCompleteTaskByTime(currentUserId,chartsCompleteDto); + return JsonResponse.newInstance().ok(completeTaskNumList); + } +// @ApiOperation(value = "计划时间内完成任务",notes = "") +// @ApiImplicitParams({ +// @ApiImplicitParam(name = "process", value = "完成状态 1完成,2未完成 默认1", required = false, paramType = "query"), +// }) +// @RequestMapping(value = "/complete", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse> getCompleteTaskByTime(HttpServletRequest request, +// @RequestParam(required = true)Long projectId, +// @RequestParam(required = false)Integer process) throws Exception{ +// process = process == null ? 1 : process; +// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); +// List completeTaskNumList = chartService.getCompleteTaskByTime(currentUserId,projectId,process); +// return JsonResponse.newInstance().ok(completeTaskNumList); +// } + + + @ApiOperation(value = "项目进展趋势图",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/trend", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getProjectTrend(HttpServletRequest request, + @Validated @RequestBody ChartDto.ProjectTrendDto projectTrendDto) throws Exception{ + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List projectTrendVoList = chartService.getProjectTrend(currentUserId,projectTrendDto); + return JsonResponse.newInstance().ok(projectTrendVoList); + } + + + @ApiOperation(value = "概览报表",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/overview", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getOverview(HttpServletRequest request, + @Validated @RequestBody ChartDto.ChartsOverviewDto chartsOverviewDto) throws Exception{ + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + ChartVo.ProjectOverview projectOverview = chartService.getOverview(currentUserId,chartsOverviewDto); + return JsonResponse.newInstance().ok(projectOverview); + } +// @ApiOperation(value = "概览报表",notes = "") +// @ApiImplicitParams({ +// }) +// @RequestMapping(value = "/overview", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse getOverview(HttpServletRequest request, +// @RequestParam(required = true)Long projectId) throws Exception{ +// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); +// ChartVo.ProjectOverview projectOverview = chartService.getOverview(currentUserId,projectId); +// return JsonResponse.newInstance().ok(projectOverview); +// } + + @ApiOperation(value = "燃尽图",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/burnout", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getBurnoutFigure(HttpServletRequest request, + @Validated @RequestBody ChartDto.ProjectTrendDto projectTrendDto) throws Exception{ + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List burnoutFigure = chartService.getBurnoutFigure(currentUserId,projectTrendDto); + return JsonResponse.newInstance().ok(burnoutFigure); + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/web/DebugController.java b/tall/src/main/java/com/ccsens/tall/web/DebugController.java index a4488d81..8ce4801f 100644 --- a/tall/src/main/java/com/ccsens/tall/web/DebugController.java +++ b/tall/src/main/java/com/ccsens/tall/web/DebugController.java @@ -1,32 +1,41 @@ package com.ccsens.tall.web; +import com.ccsens.tall.bean.dto.message.SyncMessageWithStartDto; import com.ccsens.util.JacksonUtil; import com.ccsens.util.JsonResponse; -import com.ccsens.util.bean.message.client.AuthMessage; +import com.ccsens.util.RedisUtil; import com.ccsens.util.bean.message.common.InMessage; import com.ccsens.util.bean.message.common.MessageConstant; import com.ccsens.util.bean.message.common.MessageRule; -import com.ccsens.util.bean.message.common.ServerMessage; import com.ccsens.util.config.RabbitMQConfig; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.AmqpTemplate; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.PlatformTransactionManager; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.HashSet; import java.util.Set; - +@Slf4j @Api(tags = "DEBUG" , description = "DebugController | ") @RestController @RequestMapping("/debug") public class DebugController { @Autowired private AmqpTemplate rabbitTemplate; + @Resource + private RedisUtil redisUtil; + + @Resource + private PlatformTransactionManager transactionManager; @ApiOperation(value = "/测试",notes = "") @@ -34,8 +43,10 @@ public class DebugController { }) @RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) public JsonResponse getSmsCode(HttpServletRequest request) throws Exception { + redisUtil.set("wps_tall_appId","d12722a7d28e430c889309fa4754aaba"); + redisUtil.set("wps_tall_appKey","f273e717247947ba8942a2373b6896c7"); - return JsonResponse.newInstance().ok("测试"); + return JsonResponse.newInstance().ok(redisUtil.get("wps_tall_appId")); } @@ -59,11 +70,48 @@ public class DebugController { InMessage inMessage = InMessage.newToUserMessage("1175954520199532544",s,null,messageRule,l); String j = JacksonUtil.beanToJson(inMessage); - System.out.println(j); + log.info(j); //FixMe 发送到消息队列 - rabbitTemplate.convertAndSend(RabbitMQConfig.TALL_MESSAGE_1,j); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,j); return JsonResponse.newInstance().ok(); } + + @ApiOperation(value = "图片验证码") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/code", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public void vertifyCode(HttpServletRequest request, HttpServletResponse response) throws Exception { +// Map codeMap = ImageCodeGeneratorUtil.generateCountCode(); +// log.info(codeMap.get("sum")); +// ImageCodeGeneratorUtil.generateCodeImage(response.getOutputStream(), codeMap.get("imageCode"), 200, 70); + + } + + + + @ApiOperation(value = "测试开始任务发送消息") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/start", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public void startTask() throws Exception { + + SyncMessageWithStartDto syncMessage = new SyncMessageWithStartDto(1267279600455651328L,null,null, + 1267279601034465281L,1267279603261640704L,null, System.currentTimeMillis(),300000L,"测试"); + + Set userSet = new HashSet<>(); + userSet.add("1995"); + + InMessage inMessage = new InMessage(); + inMessage.setToDomain(MessageConstant.DomainType.User); + inMessage.setTos(userSet); + inMessage.setData(JacksonUtil.beanToJson(syncMessage)); + log.info("开始任务消息,{}",JacksonUtil.beanToJson(inMessage)); + rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME, + JacksonUtil.beanToJson(inMessage)); + + } + + } diff --git a/tall/src/main/java/com/ccsens/tall/web/DeliverController.java b/tall/src/main/java/com/ccsens/tall/web/DeliverController.java index 1af36fba..eceabb0b 100644 --- a/tall/src/main/java/com/ccsens/tall/web/DeliverController.java +++ b/tall/src/main/java/com/ccsens/tall/web/DeliverController.java @@ -11,6 +11,7 @@ import com.ccsens.util.annotation.OperateType; import io.jsonwebtoken.Claims; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; @@ -19,6 +20,9 @@ import javax.servlet.http.Part; import java.io.File; import java.util.List; +/** + * @author 逗 + */ @Api(tags = "交付物相关API", description = "DeliverController | 交付物操作控制器类") @RestController @RequestMapping("/delivers") @@ -33,7 +37,7 @@ public class DeliverController { public JsonResponse addFile(HttpServletRequest request, HttpServletResponse response, @RequestParam(required = true) Part file) throws Exception { //1.上传文件 - String allowedExts = "pdf,xls,xlsx,docx,txt,jpg,jpeg,doc,png,rar"; + String allowedExts = "pdf,xls,xlsx,docx,txt,jpg,jpeg,doc,png,rar,md"; String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_DELIVER1; String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir); String filePath = WebConstant.UPLOAD_PATH_DELIVER1 + File.separator + path; @@ -66,7 +70,9 @@ public class DeliverController { public JsonResponse> selectTaskDeliver(HttpServletRequest request, @RequestParam(required = true) Long taskId) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - List deliverInfo = deliverService.selectTaskDeliver(currentUserId, taskId); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + List deliverInfo = deliverService.selectTaskDeliver(currentUserId, taskId,token); return JsonResponse.newInstance().ok(deliverInfo); } @@ -79,7 +85,9 @@ public class DeliverController { public JsonResponse selectDeliver(HttpServletRequest request, @RequestParam(required = true)Long deliverId, Long taskId) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - DeliverVo.DeliverInfo deliverInfo = deliverService.selectDeliverInfo(currentUserId,deliverId,taskId); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + DeliverVo.DeliverInfo deliverInfo = deliverService.selectDeliverInfo(currentUserId,deliverId,taskId,token); return JsonResponse.newInstance().ok(deliverInfo); } @@ -92,7 +100,9 @@ public class DeliverController { public JsonResponse selectInput(HttpServletRequest request, @RequestParam(required = true)Long inputId, Long taskId) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - DeliverVo.DeliverInfo deliverInfo = deliverService.selectDeliverInfo(currentUserId,inputId,taskId); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + DeliverVo.DeliverInfo deliverInfo = deliverService.selectDeliverInfo(currentUserId,inputId,taskId,token); return JsonResponse.newInstance().ok(deliverInfo); } @@ -102,9 +112,11 @@ public class DeliverController { }) @RequestMapping(value = "/check", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse checkDeliver(HttpServletRequest request, - @ApiParam @RequestBody DeliverDto.CheckDeliver checker) throws Exception { + @Validated @ApiParam @RequestBody DeliverDto.CheckDeliver checker) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - DeliverVo.DeliverInfo deliverInfo = deliverService.checkDeliver(currentUserId,checker); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + DeliverVo.DeliverInfo deliverInfo = deliverService.checkDeliver(currentUserId,checker,token); return JsonResponse.newInstance().ok(deliverInfo); } @@ -133,14 +145,14 @@ public class DeliverController { @OperateType(value = 8) @ApiOperation(value = "删除交付物",notes = "") @ApiImplicitParams({ - @ApiImplicitParam(name="deliverId",value = "交付物Id",required = true,paramType = "query",dataType="String"), + @ApiImplicitParam(name="deliverId",value = "交付物上传Id",required = true,paramType = "query",dataType="String"), @ApiImplicitParam(name="taskId",value = "任务Id",required = true,paramType = "query",dataType="String") }) @RequestMapping(value = "", method = RequestMethod.DELETE, produces = {"application/json;charset=UTF-8"}) public JsonResponse deleteDeliver(HttpServletRequest request, - @RequestParam(required = true)Long deliverId, Long taskId) throws Exception { + @RequestParam(required = true)Long deliverLogId, Long taskId) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - deliverService.deleteDeliver(currentUserId,deliverId,taskId); + deliverService.deleteDeliver(currentUserId,deliverLogId,taskId); return JsonResponse.newInstance().ok(); } diff --git a/tall/src/main/java/com/ccsens/tall/web/DomainController.java b/tall/src/main/java/com/ccsens/tall/web/DomainController.java index da910790..1940aefb 100644 --- a/tall/src/main/java/com/ccsens/tall/web/DomainController.java +++ b/tall/src/main/java/com/ccsens/tall/web/DomainController.java @@ -1,20 +1,18 @@ package com.ccsens.tall.web; +import com.ccsens.tall.bean.dto.DomainDto; import com.ccsens.tall.bean.vo.DomainVo; -import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.service.ISysDomainService; import com.ccsens.util.JsonResponse; -import com.ccsens.util.WebConstant; -import io.jsonwebtoken.Claims; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; -import java.util.List; @Api(tags = "域相关API", description = "") @RestController @@ -33,4 +31,24 @@ public class DomainController { DomainVo.DomainInfo domainInfo = domainService.getDomainByName(domainName); return JsonResponse.newInstance().ok(domainInfo); } + + @ApiOperation(value = "添加域配置",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "saveDomain", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveDomain(HttpServletRequest request, + @Validated @RequestBody DomainDto.DomainInfo domainInfo) throws Exception { + DomainVo.DomainInfo domain = domainService.saveDomain(domainInfo); + return JsonResponse.newInstance().ok(domain); + } + + @ApiOperation(value = "修改域配置",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "updateDomain", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateDomain(HttpServletRequest request, + @Validated @RequestBody DomainDto.UpdateDomainInfo domainInfo) throws Exception { + DomainVo.DomainInfo domain = domainService.updateDomain(domainInfo); + return JsonResponse.newInstance().ok(domain); + } } diff --git a/tall/src/main/java/com/ccsens/tall/web/ExcelController.java b/tall/src/main/java/com/ccsens/tall/web/ExcelController.java index 1d03de32..9ecc7afe 100644 --- a/tall/src/main/java/com/ccsens/tall/web/ExcelController.java +++ b/tall/src/main/java/com/ccsens/tall/web/ExcelController.java @@ -1,7 +1,6 @@ package com.ccsens.tall.web; -import com.ccsens.tall.bean.vo.PluginVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.service.IExcelService; import com.ccsens.tall.service.IExportWbsService; @@ -13,22 +12,23 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.Part; import java.io.File; -import java.util.List; - +@Slf4j @Api(tags = "Excel" , description = "") @RestController @RequestMapping("/projects") public class ExcelController { - @Autowired + @Resource private IExcelService excelService; - @Autowired + @Resource private IExportWbsService exportWbsService; @ApiOperation(value = "导入WBS",notes = "文件大小不能超过20M,支持后缀:.xls|.xlsx") @@ -36,16 +36,23 @@ public class ExcelController { @ApiImplicitParam(name = "file", value = "WBS表", required = true, paramType = "form",dataType = "__file") }) @RequestMapping(value = "/wbs", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse btproImport(HttpServletRequest request, HttpServletResponse response, @RequestParam(required = true) Part file) throws Exception { + public JsonResponse btproImport(HttpServletRequest request, HttpServletResponse response, + @RequestParam(required = true) Part file, + @RequestParam(required = false) Long wpsFileId) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); //1.上传文件 String allowedExts = "xls,xlsx"; String dir = WebConstant.UPLOAD_PROJECT_WBS + File.separator; String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir); - System.out.println(dir+""+path); + log.info(dir+""+path); + //获取文件路径,文件名,和文件大小 + String filePath = WebConstant.UPLOAD_PATH_PROJECT + File.separator + path; + String name = UploadFileUtil_Servlet3.getFileNameByPart(file); //导入数据库 ProjectVo.ProjectInfo projectInfo = excelService.readXls(dir+""+path,currentUserId); + //保存文件信息、添加wps信息 + excelService.saveWbsExcelFile(currentUserId,projectInfo.getId(),filePath,name,file.getSize(),wpsFileId); return JsonResponse.newInstance().ok(projectInfo); } diff --git a/tall/src/main/java/com/ccsens/tall/web/FileController.java b/tall/src/main/java/com/ccsens/tall/web/FileController.java new file mode 100644 index 00000000..c61ac494 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/FileController.java @@ -0,0 +1,31 @@ +package com.ccsens.tall.web; + +import com.ccsens.util.UploadFileUtil_Servlet3; +import com.ccsens.util.WebConstant; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.File; + +/** + * 对文件操作 + * @author: whj + * @date : 2020/6/28 10:51 + */ +@Slf4j +@Api(tags = "文件操作") +@RestController +@RequestMapping("/file") +public class FileController { + + @ApiOperation(value = "文件下载") + @GetMapping(value = "download/{fileName}") + public void download(HttpServletResponse response, @PathVariable("fileName")String fileName, String path) throws Exception { + String parentPath = WebConstant.UPLOAD_PATH_BASE + File.separator + path; + UploadFileUtil_Servlet3.download(response, parentPath, fileName); + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/web/IndexController.java b/tall/src/main/java/com/ccsens/tall/web/IndexController.java index baa4beac..027f3158 100644 --- a/tall/src/main/java/com/ccsens/tall/web/IndexController.java +++ b/tall/src/main/java/com/ccsens/tall/web/IndexController.java @@ -2,6 +2,7 @@ package com.ccsens.tall.web; import com.ccsens.cloudutil.bean.QueryParam; import com.ccsens.tall.config.BusinessProps; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.PostMapping; @@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.RestController; * @author: wuHuiJuan * @create: 2019/11/26 15:06 */ +@Slf4j @RestController public class IndexController { @@ -25,7 +27,7 @@ public class IndexController { @RequestMapping({"","/","/index"}) public String index(){ - System.out.println("=============================: " + businessProps.getPacketRate()); + log.info("=============================: " + businessProps.getPacketRate()); return "hello world"; } diff --git a/tall/src/main/java/com/ccsens/tall/web/LabelController.java b/tall/src/main/java/com/ccsens/tall/web/LabelController.java new file mode 100644 index 00000000..5b6b95f1 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/LabelController.java @@ -0,0 +1,96 @@ +package com.ccsens.tall.web; + +import com.ccsens.tall.bean.dto.LabelDto; +import com.ccsens.tall.bean.dto.ProjectDto; +import com.ccsens.tall.bean.vo.DomainVo; +import com.ccsens.tall.bean.vo.LabelVo; +import com.ccsens.tall.bean.vo.ProjectVo; +import com.ccsens.tall.service.ILabelService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import io.jsonwebtoken.Claims; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Api(tags = "标签相关" , description = "") +@RestController +@RequestMapping("/labels") +public class LabelController { + @Autowired + private ILabelService labelService; + + @ApiOperation(value = "搜索标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> selectLabel(HttpServletRequest request, + @RequestParam(required = false)String key) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.selectLabel(currentUserId,key); + return JsonResponse.newInstance().ok(selectLabelList); + } + + @ApiOperation(value = "添加标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> addLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.AddLabel labelList ) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.addLabel(currentUserId,labelList); + return JsonResponse.newInstance().ok(selectLabelList); + } + + @ApiOperation(value = "删除标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse delLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.DelLabel delLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + labelService.delLabel(currentUserId,delLabel); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "修改标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/change", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse changeLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.ChangeLabel changeLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + labelService.changeLabel(currentUserId,changeLabel); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "给项目添加标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> projectAddLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.ProjectLabel projectLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.projectAddLabel(currentUserId,projectLabel); + return JsonResponse.newInstance().ok(selectLabelList); + } + + @ApiOperation(value = "删除项目关联的标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/project/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> projectRemoveLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.ProjectLabel projectLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.projectRemoveLabel(currentUserId,projectLabel); + return JsonResponse.newInstance().ok(selectLabelList); + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/web/MemberController.java b/tall/src/main/java/com/ccsens/tall/web/MemberController.java new file mode 100644 index 00000000..c9cbcc8a --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/MemberController.java @@ -0,0 +1,82 @@ +package com.ccsens.tall.web; + +import com.ccsens.tall.bean.dto.MemberDto; +import com.ccsens.tall.bean.dto.ProjectDto; +import com.ccsens.tall.bean.vo.ProjectVo; +import com.ccsens.tall.service.IProMemberService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import io.jsonwebtoken.Claims; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "成员操作相关api" ) +@RestController +@RequestMapping("/members") +public class MemberController { + @Resource + private IProMemberService proMemberService; + + + @ApiOperation(value = "添加成员",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/save", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveMember(HttpServletRequest request, + @ApiParam @Validated @RequestBody MemberDto.SaveMember saveMember) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + log.info("添加成员:{}",saveMember.toString()); + proMemberService.saveProMember(currentUserId,saveMember); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "删除成员",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse deleteMember(HttpServletRequest request, + @ApiParam @Validated @RequestBody MemberDto.DeleteMember deleteMember) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + proMemberService.deleteMember(currentUserId,deleteMember); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "修改成员信息",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateMemberInfo(HttpServletRequest request, + @ApiParam @Validated @RequestBody MemberDto.UpdateMemberInfo updateMemberInfo) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + ProjectVo.MembersByProject membersInfo = proMemberService.updateMemberInfo(currentUserId,updateMemberInfo); + return JsonResponse.newInstance().ok(membersInfo); + } + + @ApiOperation(value = "查找项目内的关注者(不包括成员)",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/attention", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryAttention(HttpServletRequest request, + @ApiParam @Validated @RequestBody ProjectDto.ProjectIdDto projectDto) throws Exception { +// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List attentionInfo = proMemberService.queryAttention(projectDto); + return JsonResponse.newInstance().ok(attentionInfo); + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/web/MemberRoleController.java b/tall/src/main/java/com/ccsens/tall/web/MemberRoleController.java index dca38ab9..d3cb35c2 100644 --- a/tall/src/main/java/com/ccsens/tall/web/MemberRoleController.java +++ b/tall/src/main/java/com/ccsens/tall/web/MemberRoleController.java @@ -2,6 +2,8 @@ package com.ccsens.tall.web; import com.ccsens.cloudutil.bean.tall.dto.MemberRoleDto; import com.ccsens.cloudutil.bean.tall.vo.UserVo; +import com.ccsens.tall.bean.dto.MemberDto; +import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.dto.UserDto; import com.ccsens.tall.service.IProMemberRoleService; import com.ccsens.tall.service.IProRoleService; @@ -32,8 +34,6 @@ public class MemberRoleController { @Autowired private IProMemberRoleService memberRoleService; @Autowired - private IProRoleService proRoleService; - @Autowired private IUserService userService; @ApiOperation(value = "默认注册",notes = "默认帮助用户注册") @@ -74,18 +74,5 @@ public class MemberRoleController { return JsonResponse.newInstance().ok(codeEnum); } - @ApiOperation(value = "删除角色",notes = "") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleId", value = "角色Id", required = true, paramType = "query") - }) - @RequestMapping(value = "", method = RequestMethod.DELETE, produces = {"application/json;charset=UTF-8"}) - public JsonResponse deleteTask(HttpServletRequest request, - @RequestParam(required = false)Long roleId) throws Exception { - Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - proRoleService.deleteRole(currentUserId,roleId); - return JsonResponse.newInstance().ok(); - } - - } diff --git a/tall/src/main/java/com/ccsens/tall/web/PimsController.java b/tall/src/main/java/com/ccsens/tall/web/PimsController.java new file mode 100644 index 00000000..b5353a67 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/PimsController.java @@ -0,0 +1,73 @@ +package com.ccsens.tall.web; + +import com.ccsens.tall.bean.dto.WpsDto; +import com.ccsens.tall.bean.vo.UserVo; +import com.ccsens.tall.bean.vo.WpsVo; +import com.ccsens.tall.service.IUserService; +import com.ccsens.tall.service.IWpsService; +import com.ccsens.util.JsonResponse; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "图表相关API", description = "") +@RestController +@RequestMapping("/wps") +public class PimsController { + @Resource + private IWpsService wpsService; + @Resource + private IUserService userService; + + @ApiOperation(value = "保存WPS业务和文件记录",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/saveWps", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveFile(HttpServletRequest request, + @Validated @RequestBody WpsDto.Business business) throws Exception{ + wpsService.saveFile(business); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "根据业务ID和类型返回文件预览",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/visitUrls", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public List queryVisitUrls(HttpServletRequest request, + @Validated @RequestBody WpsDto.VisitWpsUrl visitWpsUrl) throws Exception{ + UserVo.TokenBean tokenBean = userService.getTokenByUserId(visitWpsUrl.getUserId()); + List wpsPaths = wpsService.queryVisitUrls(visitWpsUrl.getBusinessId(),visitWpsUrl.getBusinessType(),tokenBean.getToken(),visitWpsUrl.getParams()); + return wpsPaths; + } + + + @ApiOperation(value = "通过wps文件id获取文件路径",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/wpsId", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getPathById(HttpServletRequest request, + @RequestParam(required = true) Long wpsId) throws Exception{ + WpsVo.BusinessFileIdAndPath wpsPath = wpsService.getPathById(wpsId); + return JsonResponse.newInstance().ok(wpsPath); + } + + @ApiOperation(value = "通过业务id和业务类型查找文件路径",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/getFilePath", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public String getFilePath(HttpServletRequest request, @RequestParam(required = true) Long businessId, byte businessType){ + return wpsService.getFilePath(businessId,businessType); + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/web/PluginController.java b/tall/src/main/java/com/ccsens/tall/web/PluginController.java index 50d3e3f0..899c6b5c 100644 --- a/tall/src/main/java/com/ccsens/tall/web/PluginController.java +++ b/tall/src/main/java/com/ccsens/tall/web/PluginController.java @@ -1,18 +1,14 @@ package com.ccsens.tall.web; import com.ccsens.tall.bean.dto.PluginDto; -import com.ccsens.tall.bean.dto.TaskDto; -import com.ccsens.tall.bean.vo.MemberVo; import com.ccsens.tall.bean.vo.PluginVo; import com.ccsens.tall.service.ISysPluginService; import com.ccsens.tall.service.ITaskPluginService; import com.ccsens.util.JsonResponse; import com.ccsens.util.WebConstant; +import com.ccsens.util.annotation.OperateType; import io.jsonwebtoken.Claims; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -75,7 +71,7 @@ public class PluginController { return taskDetailId; } - + @OperateType(13) @ApiOperation(value = "评论", notes = "") @ApiImplicitParams({ }) @@ -108,4 +104,91 @@ public class PluginController { taskPluginService.deleteComment(currentUserId,commentId); return JsonResponse.newInstance().ok(); } + + + @ApiOperation(value = "在任务上记笔记", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "notes", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveNotes(HttpServletRequest request, + @ApiParam @Validated @RequestBody PluginDto.SaveNotes saveNotes) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + PluginVo.NotesInfo notesInfo = taskPluginService.saveNotes(currentUserId,saveNotes); + return JsonResponse.newInstance().ok(notesInfo); + } + + @ApiOperation(value = "查找笔记", notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "taskId", value = "任务Id", required = true, paramType = "query"), + @ApiImplicitParam(name = "pluginId", value = "被查询的插件的id,不是笔记插件的id,只查询任务的笔记时不需要传参", required = true, paramType = "query") + }) + @RequestMapping(value = "notes", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getNotesInfo(HttpServletRequest request, + @RequestParam(required = true) Long taskId, + @RequestParam(required = false) Long pluginId) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List notesInfoList = taskPluginService.queryNotesInfo(currentUserId,taskId,pluginId); + return JsonResponse.newInstance().ok(notesInfoList); + } + + + @ApiOperation(value = "删除评论", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "delNotes", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse deleteNotes(HttpServletRequest request, + @RequestParam(required = true) Long notesId) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + taskPluginService.deleteNotes(currentUserId,notesId); + return JsonResponse.newInstance().ok(); + } + +// @ApiOperation(value = "会议纪要表", notes = "") +// @ApiImplicitParams({ +// }) +// @RequestMapping(value = "/minutes", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse> saveMinutes(HttpServletRequest request, +// @RequestParam(required = false)String domainName, @RequestParam(required = true)Long projectId,Long taskId) throws Exception { +// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); +// String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); +// String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); +// List wpsPath = taskPluginService.saveMinutes(currentUserId,domainName,projectId,taskId,token); +// return JsonResponse.newInstance().ok(wpsPath); +// } + + @ApiOperation(value = "会议纪要表", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/minutes", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> saveMinutes(HttpServletRequest request, + @ApiParam @Validated @RequestBody PluginDto.GetMinutes getMinutes) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + List wpsPath = taskPluginService.saveMinutes(currentUserId,getMinutes,token); + return JsonResponse.newInstance().ok(wpsPath); + } + + @ApiOperation(value = "修改周会表", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/minutes/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> updateMinutesProject(HttpServletRequest request, + @ApiParam @Validated @RequestBody PluginDto.UpdateMinutes updateMinutes) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + List wpsPath = taskPluginService.updateMinutesProject(currentUserId,updateMinutes,token); + return JsonResponse.newInstance().ok(wpsPath); + } + + + @ApiOperation(value = "修改插件配置信息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/config", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updatePluginConfig(@ApiParam @Validated @RequestBody PluginDto.UpdatePluginConfig updatePluginConfig) throws Exception { + taskPluginService.updatePluginConfig(updatePluginConfig); + return JsonResponse.newInstance().ok(); + } } diff --git a/tall/src/main/java/com/ccsens/tall/web/ProjectController.java b/tall/src/main/java/com/ccsens/tall/web/ProjectController.java index 6b954176..81790e45 100644 --- a/tall/src/main/java/com/ccsens/tall/web/ProjectController.java +++ b/tall/src/main/java/com/ccsens/tall/web/ProjectController.java @@ -1,6 +1,7 @@ package com.ccsens.tall.web; import com.ccsens.tall.bean.dto.ProjectDto; +import com.ccsens.tall.bean.dto.TaskDto; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.service.IProMemberService; @@ -14,27 +15,32 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; +import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.util.List; -@Api(tags = "项目相关API" , description = "") +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "项目相关API") @RestController @RequestMapping("/projects") public class ProjectController { - @Autowired + @Resource private IProjectService projectService; - @Autowired + @Resource private IProRoleService proRoleService; - @Autowired + @Resource private IProMemberService proMemberService; - @Autowired + @Resource private IProTaskDetailService taskDetailService; - @ApiOperation(value = "获取日历上哪天有小红点",notes = "按照优先级倒序+时间正序排序") + @ApiOperation(value = "获取日历上哪天有小红点",notes = "") @ApiImplicitParams({ @ApiImplicitParam(name = "date", value = "日期(格式:yy-[MM]-[dd])", required = true, paramType = "query",dataType = "string",example = "2019-02-13") }) @@ -47,35 +53,49 @@ public class ProjectController { @ApiOperation(value = "根据日期获取项目列表",notes = "按照优先级倒序+时间正序排序") @ApiImplicitParams({ - @ApiImplicitParam(name = "date", value = "日期(格式:yy-[MM]-[dd])", required = true, paramType = "query",dataType = "string",example = "2019-02-13") + @ApiImplicitParam(name = "date", value = "日期(格式:yy-[MM]-[dd])", required = true, paramType = "query",dataType = "string",example = "2019-02-13"), + @ApiImplicitParam(name = "orderType", value = "排序方式 0时间排序 1项目名称 2标签,没有则默认时间排序",paramType = "query",dataType = "string"), + @ApiImplicitParam(name = "order", value = "排序方式 0倒序 1正序 默认倒序",paramType = "query") }) @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> getProjectByDate(HttpServletRequest request, @RequestParam(required = true) String date) throws Exception { + public JsonResponse> getProjectByDate(HttpServletRequest request, + @RequestParam(required = true) String date, + @RequestParam(required = false) Integer orderType, + @RequestParam(required = false) Integer order) throws Exception { + orderType = orderType == null ? 0 : orderType; + order = order == null ? 0 : order; Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - List projectInfoList = projectService.getProjectInfo(currentUserId,date); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + log.info(token); + List projectInfoList = projectService.getProjectInfo(currentUserId,date,orderType,order,token); return JsonResponse.newInstance().ok(projectInfoList); } - @ApiOperation(value = "根据id获取项目",notes = "按照优先级倒序+时间正序排序") + @ApiOperation(value = "根据id获取项目",notes = "") @ApiImplicitParams({ @ApiImplicitParam(name = "projectId", value = "项目id", required = true, paramType = "query",dataType = "Long") }) @RequestMapping(value = "id", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse getProjectById(HttpServletRequest request, @RequestParam(required = true) Long projectId) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - ProjectVo.ProjectInfo projectInfo = projectService.getProjectInfoById(currentUserId,projectId); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + ProjectVo.ProjectInfo projectInfo = projectService.getProjectInfoById(currentUserId,projectId,token); return JsonResponse.newInstance().ok(projectInfo); } @ApiOperation(value = "根据项目id获取二级角色列表",notes = "PM,MVP,Mine,Others...") @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path") + @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"), + @ApiImplicitParam(name = "imitation", value = "是否是变身模式 0否 1是", required = true, paramType = "query") }) @RequestMapping(value = "/{id}/roles", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse> getRolesByProjectId(HttpServletRequest request, - @PathVariable("id") Long projectId) throws Exception { + @PathVariable("id") Long projectId, + @RequestParam(required = false) Integer imitation) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - List roleInfoList = proRoleService.getRolesByProjectIdAndUserId(projectId, currentUserId); + List roleInfoList = proRoleService.getRolesByProjectIdAndUserId(projectId, currentUserId,imitation); return JsonResponse.newInstance().ok(roleInfoList); } @@ -91,6 +111,31 @@ public class ProjectController { return JsonResponse.newInstance().ok(membersByProjects); } +// @ApiOperation(value = "根据角色id获取日程(任务列表 + 插件列表)",notes = "") +// @ApiImplicitParams({ +// @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"), +// @ApiImplicitParam(name = "roleId", value = "角色Id", required = true, paramType = "query"), +// @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, paramType = "query"), +// @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, paramType = "query"), +// @ApiImplicitParam(name = "process", value = "完成状态 0全部,1完成,2未完成", required = true, paramType = "query"), +// @ApiImplicitParam(name = "page", value = "页数", required = true, paramType = "query"), +// @ApiImplicitParam(name = "priority", value = "优先级排序 0无 1倒叙(优先级高的在前) 2正序", required = true, paramType = "query") +// }) +// @RequestMapping(value = "/{id}/tasks", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse getTasksByRoleId(HttpServletRequest request, +// @PathVariable("id") Long projectId, +// @RequestParam(required = true) Long roleId, Integer page, +// Long startTime, Long endTime, Integer process,Integer priority) throws Exception{ +// Integer pageSize = 10; +// page = page == null ? 1 : page; +// process = process == null ? 0 : process; +// priority = priority == null ? 0 :priority; +// +// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); +// Object proTaskInfo = taskDetailService.getTasksByRoleId(currentUserId,projectId,roleId,startTime,endTime,process,page,pageSize,priority); +// return JsonResponse.newInstance().ok(proTaskInfo); +// } + @ApiOperation(value = "根据角色id获取日程(任务列表 + 插件列表)",notes = "") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"), @@ -98,21 +143,32 @@ public class ProjectController { @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, paramType = "query"), @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, paramType = "query"), @ApiImplicitParam(name = "process", value = "完成状态 0全部,1完成,2未完成", required = true, paramType = "query"), - @ApiImplicitParam(name = "page", value = "页数", required = true, paramType = "query") + @ApiImplicitParam(name = "page", value = "页数", required = true, paramType = "query"), + @ApiImplicitParam(name = "priority", value = "优先级排序 0无 1倒叙(优先级高的在前) 2正序", required = true, paramType = "query") }) - @RequestMapping(value = "/{id}/tasks", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + @RequestMapping(value = "/{id}/tasks", method = {RequestMethod.POST}, produces = {"application/json;charset=UTF-8"}) public JsonResponse getTasksByRoleId(HttpServletRequest request, - @PathVariable("id") Long projectId, - @RequestParam(required = true) Long roleId, Integer page, - Long startTime, Long endTime, Integer process) throws Exception{ - Integer pageSize = 10; - page = page == null ? 1 : page; - process = process == null ? 0 : process; + @PathVariable("id") Long projectId, + @RequestBody TaskDto.QueryTaskInfoByRoleId taskInfoByRoleId) throws Exception{ + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - Object proTaskInfo = taskDetailService.getTasksByRoleId(currentUserId,projectId,roleId,startTime,endTime,process,page,pageSize); + Object proTaskInfo = taskDetailService.getTasksByRoleId(currentUserId,projectId,taskInfoByRoleId); return JsonResponse.newInstance().ok(proTaskInfo); } + @ApiOperation(value = "根据项目id获取mvp信息",notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path") + }) + @RequestMapping(value = "/{id}/mvp", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getMvpByProjectId(HttpServletRequest request, + @PathVariable("id") Long projectId) throws Exception{ + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List mvpByProjectId = taskDetailService.getTaskInfoByMvp(projectId); + return JsonResponse.newInstance().ok(mvpByProjectId); + } + + @ApiOperation(value = "根据任务id获取任务详细信息(包含插件)",notes = "") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"), @@ -121,9 +177,10 @@ public class ProjectController { @RequestMapping(value = "/{id}/tasks/{taskId}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse getTasksByTaskId(HttpServletRequest request, @PathVariable("id") Long projectId, - @PathVariable("taskId") Long taskId) throws Exception{ + @PathVariable("taskId") Long taskId, + @RequestParam(required = false) Integer imitation) throws Exception{ Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - TaskVo.NormalTask taskVo = taskDetailService.getTaskInfoByTaskId(currentUserId,projectId,taskId); + TaskVo.NormalTask taskVo = taskDetailService.getTaskInfoByTaskId(currentUserId,projectId,taskId,imitation); return JsonResponse.newInstance().ok(taskVo); } @@ -140,7 +197,8 @@ public class ProjectController { @ApiImplicitParams({ }) @RequestMapping(value = "forever", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> getForever(HttpServletRequest request, @RequestParam(required = false) String domainName) throws Exception { + public JsonResponse> getForever(HttpServletRequest request, + @RequestParam(required = false) String domainName) throws Exception { List forever = projectService.getForever(domainName); return JsonResponse.newInstance().ok(forever); @@ -180,6 +238,18 @@ public class ProjectController { return JsonResponse.newInstance().ok(projectByKeyList); } + @ApiOperation(value = "新建项目", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/create", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse createProject(HttpServletRequest request,@RequestBody ProjectDto.CreateProject createProject) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + ProjectVo.ProjectInfo projectInfo = projectService.createProject(currentUserId,createProject,token); + return JsonResponse.newInstance().ok(projectInfo); + } + //============================================================== @@ -198,22 +268,79 @@ public class ProjectController { @ApiOperation(value = "根据模板复制项目", notes = "") @ApiImplicitParams({ }) - @RequestMapping(value = "copy", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + @RequestMapping(value = "/copy", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse addProject(HttpServletRequest request, @Validated @RequestBody ProjectDto.ProjectIdDto projectDto) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - ProjectVo.ProjectInfo projectInfo = projectService.copyProject(currentUserId,projectDto); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + ProjectVo.ProjectInfo projectInfo = projectService.copyProject(currentUserId,projectDto,token); return JsonResponse.newInstance().ok(projectInfo); } @ApiOperation(value = "修改项目信息", notes = "") @ApiImplicitParams({ }) - @RequestMapping(value = "change", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + @RequestMapping(value = "/change", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse updateProject(HttpServletRequest request, @Validated @RequestBody ProjectDto.ProjectInfoDto projectInfoDto) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - ProjectVo.ProjectInfo projectInfo = projectService.changeProjectInfo(currentUserId,projectInfoDto); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + ProjectVo.ProjectInfo projectInfo = projectService.changeProjectInfo(currentUserId,projectInfoDto,token); return JsonResponse.newInstance().ok(projectInfo); } + + @ApiOperation(value = "根据标签查找项目",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/label", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse selectByLabelName(HttpServletRequest request, + @RequestParam(required = false) String labelName, + @RequestParam(required = false) Integer page ) throws Exception { + Integer pageSize = 10; + page = page == null ? 1 : page; + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + ProjectVo.ProjectAllDetailed projectInfoList = projectService.selectByLabelName(currentUserId,labelName,pageSize,page,token); + return JsonResponse.newInstance().ok(projectInfoList); + } + + @ApiOperation(value = "查找关联的项目",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/relevance", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> selectRelevanceProject(HttpServletRequest request, + @RequestParam(required = true) Long projectId) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List projectInfoList = projectService.selectRelevanceProject(currentUserId,projectId); + return JsonResponse.newInstance().ok(projectInfoList); + } + + + @ApiOperation(value = "修改项目配置信息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/config", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateProjectConfig(HttpServletRequest request, + @Validated @RequestBody ProjectDto.ProjectConfig projectConfig) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); + ProjectVo.ProjectInfo projectInfo = projectService.updateProjectConfig(currentUserId,projectConfig,token); + return JsonResponse.newInstance().ok(projectInfo); + } + + @ApiOperation(value = "变身", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/imitation", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse imitationRole(HttpServletRequest request, + @Validated @RequestBody ProjectDto.ImitationRole imitationRole) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + projectService.imitationRole(currentUserId,imitationRole); + return JsonResponse.newInstance().ok(); + } + } diff --git a/tall/src/main/java/com/ccsens/tall/web/ProjectMessageController.java b/tall/src/main/java/com/ccsens/tall/web/ProjectMessageController.java new file mode 100644 index 00000000..54022697 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/ProjectMessageController.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.web; + +import com.ccsens.cloudutil.annotation.MustLogin; +import com.ccsens.tall.bean.dto.ProjectMessageDto; +import com.ccsens.tall.bean.vo.ProjectMessageVo; +import com.ccsens.tall.service.IProjectMessageService; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.bean.dto.QueryDto; +import com.github.pagehelper.PageInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * @description: + * @author: whj + * @time: 2020/5/28 17:12 + */ +@Slf4j +@Api(tags = "项目消息通知" , description = "") +@RestController +@RequestMapping("/projectMessage") +public class ProjectMessageController { + @Resource + private IProjectMessageService projectMessageService; + + + @MustLogin + @ApiOperation(value = "获取未读消息数",notes = "获取未读消息数") + @RequestMapping(value = "queryUnreadNum", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryUnreadNum(@RequestBody QueryDto param) { + log.info("未读消息请求参数:{}", param); + ProjectMessageDto.UnreadNum unreadNum = param.getParam(); + ProjectMessageVo.UnreadNum num = projectMessageService.queryUnreadNum(unreadNum.getSendType(), param.getUserId()); + log.info("未读消息返回结果:{}", num); + return JsonResponse.newInstance().ok(num); + } + + + @MustLogin + @ApiOperation(value = "分页查询登录用户收到的消息",notes = "分页查询登录用户收到的消息") + @RequestMapping(value = "queryMsg", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryMsg(@RequestBody QueryDto param) { + log.info("未读消息请求参数:{}", param); + PageInfo messages = projectMessageService.queryMsg(param.getParam(), param.getUserId()); + log.info("未读消息返回结果:{}", messages); + return JsonResponse.newInstance().ok(messages); + } + + @MustLogin + @ApiOperation(value = "分页查询项目动态",notes = "分页查询项目动态") + @RequestMapping(value = "queryProjectMsg", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryProjectMsg(@RequestBody QueryDto param) { + log.info("未读消息请求参数:{}", param); + PageInfo messages = projectMessageService.queryProjectMsg(param.getParam(), param.getUserId()); + log.info("未读消息返回结果:{}", messages); + return JsonResponse.newInstance().ok(messages); + } + + @MustLogin + @ApiOperation(value = "标记某条消息已读",notes = "标记某条消息已读") + @RequestMapping(value = "markRead", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse markRead(@RequestBody QueryDto param) { + log.info("未读消息请求参数:{}", param); + CodeEnum codeEnum = projectMessageService.markRead(param.getParam(), param.getUserId()); + log.info("未读消息返回结果:{}", codeEnum); + return JsonResponse.newInstance().ok(codeEnum); + } + + @MustLogin + @ApiOperation(value = "标记全部消息已读",notes = "标记全部消息已读") + @RequestMapping(value = "markAllRead", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse markAllRead(@RequestBody QueryDto param) { + log.info("未读消息请求参数:{}", param); + CodeEnum codeEnum = projectMessageService.markAllRead(param.getParam(), param.getUserId()); + log.info("未读消息返回结果:{}", codeEnum); + return JsonResponse.newInstance().ok(codeEnum); + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/web/RingController.java b/tall/src/main/java/com/ccsens/tall/web/RingController.java new file mode 100644 index 00000000..a2bd590a --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/RingController.java @@ -0,0 +1,76 @@ +package com.ccsens.tall.web; + +import com.ccsens.tall.bean.dto.RingDto; +import com.ccsens.tall.bean.dto.TaskDto; +import com.ccsens.tall.bean.vo.RingVo; +import com.ccsens.tall.service.IRingService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import com.github.pagehelper.PageInfo; +import io.jsonwebtoken.Claims; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Api(tags = "Ring消息相关API" , description = "") +@RestController +@RequestMapping("/ring") +public class RingController { + @Autowired + private IRingService ringService; + + + @ApiOperation(value = "发送ring消息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/send", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse sendRingMsg(HttpServletRequest request, + @ApiParam @Validated @RequestBody RingDto.RingSendDto ringSendDto) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + RingVo.RingInfo ringInfo = ringService.sendRingMsg(currentUserId,ringSendDto); + return JsonResponse.newInstance().ok(ringInfo); + } + + + @ApiOperation(value = "查看ring消息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getRingInfo(HttpServletRequest request, + @ApiParam @Validated @RequestBody RingDto.GetRingDto getRingDto) throws Exception { + + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + PageInfo ringInfoList = ringService.getRingInfo(currentUserId,getRingDto); + return JsonResponse.newInstance().ok(ringInfoList); + } + + + @ApiOperation(value = "阅读消息(将消息设为已读)", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/read", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> readRingMsg(HttpServletRequest request, + @ApiParam @Validated @RequestBody RingDto.MessageId message) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List ringInfoList = ringService.readRingMsg(currentUserId,message); + return JsonResponse.newInstance().ok(ringInfoList); + } + + @ApiOperation(value = "将项目内的消息全部已读", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/read/projectId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse readRingMsgByProjectId(HttpServletRequest request, + @ApiParam @Validated @RequestBody RingDto.ReadMessageByProjectId projectId) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + ringService.readRingMsgByProjectId(currentUserId,projectId.getProjectId()); + return JsonResponse.newInstance().ok(); + } +} diff --git a/tall/src/main/java/com/ccsens/tall/web/RoleController.java b/tall/src/main/java/com/ccsens/tall/web/RoleController.java new file mode 100644 index 00000000..3cc31ce9 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/RoleController.java @@ -0,0 +1,94 @@ +package com.ccsens.tall.web; + +import com.ccsens.tall.bean.dto.RoleDto; +import com.ccsens.tall.bean.vo.RoleVo; +import com.ccsens.tall.service.IProRoleService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import io.jsonwebtoken.Claims; +import io.swagger.annotations.*; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +/** + * @author 逗 + */ +@Api(tags = "角色操作相关api" ) +@RestController +@RequestMapping("/roles") +public class RoleController { + + @Resource + private IProRoleService proRoleService; + + @ApiOperation(value = "删除角色",notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleId", value = "角色Id", required = true, paramType = "query") + }) + @RequestMapping(value = "/delete", method = RequestMethod.DELETE, produces = {"application/json;charset=UTF-8"}) + public JsonResponse deleteTask(HttpServletRequest request, + @RequestParam(required = false)Long roleId) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + proRoleService.deleteRole(currentUserId,roleId); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "添加角色",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/save", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveRole(HttpServletRequest request, + @ApiParam @Validated @RequestBody RoleDto.SaveRole saveRole) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + proRoleService.saveRole(currentUserId,saveRole); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "修改角色信息",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateRole(HttpServletRequest request, + @ApiParam @Validated @RequestBody RoleDto.UpdateRole updateRole) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + proRoleService.updateRole(currentUserId,updateRole); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "给角色添加成员",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/saveMember", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveMemberByRole(HttpServletRequest request, + @ApiParam @Validated @RequestBody RoleDto.SaveMember saveMember) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + proRoleService.saveMemberByRole(currentUserId,saveMember); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "删除角色下的成员",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/deleteMember", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse deleteMemberByRole(HttpServletRequest request, + @ApiParam @Validated @RequestBody RoleDto.SaveMember saveMember) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + proRoleService.deleteMemberByRole(currentUserId,saveMember); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "通过",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/deleteMember", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse queryRoleByProjectId(HttpServletRequest request, + @RequestParam(required = true)Long projectId) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + RoleVo.RoleByProjectId roleInfo = proRoleService.queryRoleByProjectId(projectId); + return JsonResponse.newInstance().ok(roleInfo); + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/web/TaskController.java b/tall/src/main/java/com/ccsens/tall/web/TaskController.java index 1177cf84..f6b90a93 100644 --- a/tall/src/main/java/com/ccsens/tall/web/TaskController.java +++ b/tall/src/main/java/com/ccsens/tall/web/TaskController.java @@ -48,6 +48,16 @@ public class TaskController { return JsonResponse.newInstance().ok(); } +// @ApiOperation(value = "结束任务",notes = "") +// @ApiImplicitParams({ +// }) +// @RequestMapping(value = "start", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse endTask(HttpServletRequest request, @Validated @RequestBody TaskDto.StartTask dto) throws Exception { +// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); +// subTimeService.startTask(currentUserId,dto); +// return JsonResponse.newInstance().ok(); +// } + @ApiOperation(value = "任务清单", notes = "") @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "页数", required = true, paramType = "query"), @@ -72,28 +82,42 @@ public class TaskController { return JsonResponse.newInstance().ok(taskCheckList); } +// @ApiOperation(value = "项目内任务清单", notes = "") +// @ApiImplicitParams({ +// @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"), +// @ApiImplicitParam(name = "page", value = "页数", required = true, paramType = "query"), +// @ApiImplicitParam(name = "key", value = "关键词", required = true, paramType = "query"), +// @ApiImplicitParam(name = "start", value = "开始时间", required = true, paramType = "query"), +// @ApiImplicitParam(name = "end", value = "结束时间", required = true, paramType = "query"), +// @ApiImplicitParam(name = "roleId", value = "角色Id", required = true, paramType = "query") +// }) +// @RequestMapping(value = "/{id}/list", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse getTask(HttpServletRequest request, +// @PathVariable("id") Long id, +// @RequestParam(required = false) Integer page, +// @RequestParam(required = false) String key, +// @RequestParam(required = false) String start, +// @RequestParam(required = false) String end, +// @RequestParam(required = false) Long roleId) throws Exception { +// Integer pageSize = 10; +// page = page == null ? 1 : page; +// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); +// TaskVo.TaskCheckList taskCheckList +// = taskDetailService.selectTaskListByProject(id,currentUserId,page,pageSize,key,start,end,roleId); +// return JsonResponse.newInstance().ok(taskCheckList); +// } + @ApiOperation(value = "项目内任务清单", notes = "") @ApiImplicitParams({ - @ApiImplicitParam(name = "id", value = "项目Id", required = true, paramType = "path"), - @ApiImplicitParam(name = "page", value = "页数", required = true, paramType = "query"), - @ApiImplicitParam(name = "key", value = "关键词", required = true, paramType = "query"), - @ApiImplicitParam(name = "start", value = "开始时间", required = true, paramType = "query"), - @ApiImplicitParam(name = "end", value = "结束时间", required = true, paramType = "query"), - @ApiImplicitParam(name = "roleId", value = "角色Id", required = true, paramType = "query") }) - @RequestMapping(value = "/{id}/list", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + @RequestMapping(value = "/project/list", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse getTask(HttpServletRequest request, - @PathVariable("id") Long id, - @RequestParam(required = false) Integer page, - @RequestParam(required = false) String key, - @RequestParam(required = false) String start, - @RequestParam(required = false) String end, - @RequestParam(required = false) Long roleId) throws Exception { - Integer pageSize = 10; - page = page == null ? 1 : page; +// @PathVariable("id") Long id, + @Validated @RequestBody TaskDto.SelectListByProject selectListByProject) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); TaskVo.TaskCheckList taskCheckList - = taskDetailService.selectTaskListByProject(id,currentUserId,page,pageSize,key,start,end,roleId); + = taskDetailService.selectTaskListByProject(currentUserId,selectListByProject); return JsonResponse.newInstance().ok(taskCheckList); } @@ -121,7 +145,75 @@ public class TaskController { return JsonResponse.newInstance().ok(); } + @ApiOperation(value = "看板上查找任务信息", notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectId", value = "项目id 必填", required = true, paramType = "query"), + @ApiImplicitParam(name = "type", value = "任务状态 0未开始 1进行中 2已完成", required = true, paramType = "query"), + @ApiImplicitParam(name = "roleId", value = "角色id 不传则查找全部", required = true, paramType = "query"), + @ApiImplicitParam(name = "orderType", value = "排序方式 0时间排序 1优先级排序 没有则默认时间排序",paramType = "query",dataType = "string"), + @ApiImplicitParam(name = "order", value = "排序方式 0倒序 1正序 默认倒序",paramType = "query") + }) + @RequestMapping(value = "kanban", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getKanbanTake(HttpServletRequest request, + @RequestParam(required = true)Long projectId, + @RequestParam(required = false)Long roleId, + @RequestParam(required = false)Integer type, + @RequestParam(required = false)Integer page, + @RequestParam(required = false)Integer pageSize, + @RequestParam(required = false)Integer orderType, + @RequestParam(required = false)Integer order) throws Exception { + page = page == null ? 1 : page; + pageSize = pageSize == null ? 10 : pageSize; + orderType = orderType == null ? 0 : orderType; + order = order == null ? 0 : order; + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List kanbanList = subTimeService.getKanbanTake(currentUserId,projectId,roleId,type,page,pageSize,orderType,order); + return JsonResponse.newInstance().ok(kanbanList); + } + + @ApiOperation(value = "看板上修改任务信息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "kanban/change", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse changeKanbanTake(HttpServletRequest request, + @ApiParam @Validated @RequestBody TaskDto.ChangeKanbanTask changeKanbanTask) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + subTimeService.changeKanbanTake(currentUserId,changeKanbanTask); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "给任务添加提醒", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/remind", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveRemind(HttpServletRequest request, + @ApiParam @Validated @RequestBody TaskDto.TaskRemind taskRemind) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List remindInfo = subTimeService.saveRemind(currentUserId,taskRemind); + return JsonResponse.newInstance().ok(remindInfo); + } + + @ApiOperation(value = "删除任务上的提醒", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/remind/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse deleteRemind(HttpServletRequest request, + @ApiParam @Validated @RequestBody TaskDto.DeleteTaskRemind deleteTaskRemind) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List remindInfo = subTimeService.deleteRemind(currentUserId,deleteTaskRemind); + return JsonResponse.newInstance().ok(remindInfo); + } + @ApiOperation(value = "修改任务上的提醒", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/remind/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateRemind(HttpServletRequest request, + @ApiParam @Validated @RequestBody TaskDto.UpdateTaskRemind updateTaskRemind) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List remindInfo = subTimeService.updateRemind(currentUserId,updateTaskRemind); + return JsonResponse.newInstance().ok(remindInfo); + } //============================================================== @OperateType(value = 3) @@ -163,6 +255,14 @@ public class TaskController { return JsonResponse.newInstance().ok(taskInfo); } + @ApiOperation(value = "查找项目下的所有任务",notes = "") + @RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryAllTaskByProjectId(HttpServletRequest request, + @Validated @RequestBody TaskDto.QueryAllTaskByProjectId projectIdDto) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List taskInfoList = taskDetailService.queryAllTaskByProjectId(currentUserId,projectIdDto); + return JsonResponse.newInstance().ok(taskInfoList); + } /** * 通过任务id查询项目id @@ -177,4 +277,17 @@ public class TaskController { TaskVo.TaskInfoWithFeign taskInfo= taskDetailService.getProjectIdByTaskId(taskId); return taskInfo; } + + + @ApiOperation(value = "修改任务配置信息",notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "taskId", value = "任务id", required = true, paramType = "query") + }) + @RequestMapping(value = "config", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateTaskConfig(HttpServletRequest request, + @Validated @RequestBody TaskDto.UpdateTaskConfig updateTaskConfig) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + TaskVo.NormalTask taskInfo = taskDetailService.updateTaskConfig(currentUserId,updateTaskConfig); + return JsonResponse.newInstance().ok(taskInfo); + } } diff --git a/tall/src/main/java/com/ccsens/tall/web/UserController.java b/tall/src/main/java/com/ccsens/tall/web/UserController.java index a7bcb5b1..8b1d24db 100644 --- a/tall/src/main/java/com/ccsens/tall/web/UserController.java +++ b/tall/src/main/java/com/ccsens/tall/web/UserController.java @@ -6,26 +6,30 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.extra.servlet.ServletUtil; import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.dto.UserDto; -import com.ccsens.tall.bean.po.SysUser; import com.ccsens.tall.bean.vo.MemberVo; import com.ccsens.tall.bean.vo.UserVo; import com.ccsens.tall.exception.UserLoginException; import com.ccsens.tall.service.IProMemberService; import com.ccsens.tall.service.IUserService; -import com.ccsens.util.*; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.JwtUtil; +import com.ccsens.util.WebConstant; import io.jsonwebtoken.Claims; import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.SignatureException; import io.swagger.annotations.*; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; - +@Slf4j @Api(tags = "用户相关操作API", description = "UserController | 用户操作控制器类") @RestController @RequestMapping("/users") @@ -43,6 +47,8 @@ public class UserController { @RequestMapping(value = "/signin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse userSignin(HttpServletRequest request, @ApiParam @Validated @RequestBody(required = true) UserDto.UserSginin dto) throws Exception { + log.info("开始登陆:{}",dto); + Long start = System.currentTimeMillis(); WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(dto.getClient()); WebConstant.IDENTIFY_TYPE identify_type = WebConstant.IDENTIFY_TYPE.valueOf(dto.getType()); String identifier = dto.getData().getIdentifier(); @@ -61,6 +67,7 @@ public class UserController { throw new UserLoginException(-1, String.format("Not supported client type: %1$d(%2$s)", clientType.value, clientType)); } + log.info("登录场景"); switch (identify_type) { case WxEnterprise: case Wxmp: @@ -83,7 +90,7 @@ public class UserController { identify_type.value, identify_type.phase)); } } - + log.info("登录方式"); //2.调用业务方法(注册/添加登陆记录) UserVo.UserSign userSignVo = userService.signin( clientType, identify_type, identifier, credential, @@ -95,6 +102,9 @@ public class UserController { theMap.put("authId", String.valueOf(userSignVo.getAuthId())); UserVo.TokenBean tokenBean = userService.getUserInfoAndToken(clientType, identify_type,userSignVo, theMap); + Long end = System.currentTimeMillis(); + log.info("本次登录使用了{}毫秒",end - start); + log.info("登录返回:{}",tokenBean); return JsonResponse.newInstance().ok(tokenBean); } else { return JsonResponse.newInstance().fail("登陆信息不正确."); @@ -107,8 +117,9 @@ public class UserController { @RequestMapping(value = "/smscode", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse getSmsCode(HttpServletRequest request, @ApiParam @RequestParam String phone, - @ApiParam Integer client) throws Exception { - UserVo.SmsCode smsCodeVo = userService.getSignInSmsCode(phone,client); +// @ApiParam Integer client, + @RequestParam(required = true) String verificationCodeId, String verificationCodeValue) throws Exception { + UserVo.SmsCode smsCodeVo = userService.getSignInSmsCode(phone,verificationCodeId,verificationCodeValue); return JsonResponse.newInstance().ok(smsCodeVo); } @@ -235,12 +246,13 @@ public class UserController { @RequestMapping(value = "/userInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse updateUserInfo(HttpServletRequest request, @ApiParam @RequestBody UserDto.WxInfo userInfo) throws Exception { + log.info("修改用户信息,{}",userInfo); Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); UserVo.WxInfo wxInfo = userService.updateUserInfo(currentUserId, userInfo); return JsonResponse.newInstance().ok(wxInfo); } - @ApiOperation(value = "修改密码", notes = "") + @ApiOperation(value = "通过手机号修改密码", notes = "") @ApiImplicitParams({ }) @RequestMapping(value = "/password", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @@ -250,14 +262,24 @@ public class UserController { return JsonResponse.newInstance().ok(); } + @ApiOperation(value = "通过账号密码修改密码", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/password/account", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updatePasswordByAccount(HttpServletRequest request, + @ApiParam @Validated @RequestBody UserDto.UpdatePasswordByAccount passwordDto) throws Exception { + userService.updatePasswordByAccount(passwordDto); + return JsonResponse.newInstance().ok(); + } + @ApiOperation(value = "解绑手机号", notes = "") @ApiImplicitParams({ }) - @RequestMapping(value = "/relievePhone", method = RequestMethod.DELETE, produces = {"application/json;charset=UTF-8"}) + @RequestMapping(value = "/relievePhone", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse relievePhone(HttpServletRequest request, - @RequestParam String phone) throws Exception { + @ApiParam @Validated @RequestBody UserDto.WxBindingPhone phoneInfo) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - userService.relievePhone(currentUserId,phone); + userService.relievePhone(currentUserId,phoneInfo); return JsonResponse.newInstance().ok(); } @@ -338,6 +360,7 @@ public class UserController { }) @RequestMapping(value = "claims",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) public String getNodeMessage(@RequestParam(required = true) String token) throws Exception { + log.info("根据token获取userId,token:{}",token); //验证token是否有效 String userId = null; Claims claims = null; @@ -368,7 +391,7 @@ public class UserController { }) @RequestMapping(value = "token",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) public JsonResponse getUserByToken(@RequestParam(required = true) String token) throws Exception { - + long start = System.currentTimeMillis(); UserVo.TokenToUserId tokenToUserId = new UserVo.TokenToUserId(); // 验证token是否存在 @@ -385,10 +408,10 @@ public class UserController { }catch(Exception e){ return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); } -// //验证用户存根 -// if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){ -// return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); -// } + //验证用户存根 + if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){ + return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); + } // //验证用户是否禁用 // SysUser user = userService.getUserById(Long.valueOf(claims.getSubject())); // if(user.getRecStatus() == WebConstant.REC_STATUS.Disabled.value){ @@ -396,7 +419,8 @@ public class UserController { // } tokenToUserId.setId(Long.valueOf(claims.getSubject())); - + long end = System.currentTimeMillis(); + log.info("根据token查找userId用时:{}",end - start); return JsonResponse.newInstance().ok(tokenToUserId); } @@ -411,11 +435,23 @@ public class UserController { return JsonResponse.newInstance().ok(memberInfo); } + + /** + * 查询user在项目中的member信息 + */ + @RequestMapping(value = "memberByTask", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getMemberByUserIdAndTaskId( Long userId,Long taskId) throws Exception { + log.info("根据任务ID和用户ID查询用户信息:{}-{}", userId, taskId); + MemberVo.MemberInfo memberInfo = proMemberService.getMemberByUserIdAndTaskId(userId,taskId); + log.info("用户信息:{}", memberInfo); + return JsonResponse.newInstance().ok(memberInfo); + } + /** * 查询user的信息 */ - @RequestMapping(value = "userInfo", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) - public JsonResponse getUserInfoByUserId( Long userId) throws Exception { + @RequestMapping(value = "getUserInfo", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getUserInfoByUserId(Long userId) throws Exception { MemberVo.MemberInfo memberInfo = proMemberService.getUserInfoByUserId(userId); return JsonResponse.newInstance().ok(memberInfo); @@ -431,7 +467,15 @@ public class UserController { return memberIdInfo; } - + @ApiOperation(value = "图片验证码") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/code", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse vertifyCode(HttpServletRequest request, HttpServletResponse response) throws Exception { + UserVo.VerificationCode vertifyCode = userService.getVertifyCode(); +// ImageCodeGeneratorUtil.generateCodeImage(response.getOutputStream(), (String) codeMap.get("imageCode"), 200, 70); + return JsonResponse.newInstance().ok(vertifyCode); + } } diff --git a/tall/src/main/java/com/ccsens/tall/web/UserInfoController.java b/tall/src/main/java/com/ccsens/tall/web/UserInfoController.java new file mode 100644 index 00000000..8dc223c4 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/UserInfoController.java @@ -0,0 +1,99 @@ +package com.ccsens.tall.web; + +import cn.hutool.core.io.FileUtil; +import cn.hutool.core.util.ImageUtil; +import cn.hutool.http.HttpResponse; +import com.ccsens.tall.bean.dto.UserDto; +import com.ccsens.tall.bean.vo.UserVo; +import com.ccsens.tall.service.IUserInfoService; +import com.ccsens.util.ImageCodeGeneratorUtil; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.UploadFileUtil_Servlet3; +import com.ccsens.util.WebConstant; +import io.jsonwebtoken.Claims; +import io.swagger.annotations.*; +import org.apache.commons.io.FileUtils; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.Part; +import java.awt.*; +import java.io.File; +import java.io.FileOutputStream; + +/** + * @author 逗 + */ +@Api(tags = "用户详细信息操作API") +@RestController +@RequestMapping("/users/info") +public class UserInfoController { + @Resource + private IUserInfoService userInfoService; + + @ApiOperation(value = "修改登录账号") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/account", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateAccount(HttpServletRequest request, + @ApiParam @Validated @RequestBody UserDto.UpdateAccount updateAccount) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + userInfoService.updateAccount(currentUserId, updateAccount); + return JsonResponse.newInstance().ok(); + } + + + @ApiOperation(value = "修改昵称") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/nickname", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateNickname(HttpServletRequest request, + @ApiParam @Validated @RequestBody UserDto.UpdateNickname updateNickname) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + userInfoService.updateNickname(currentUserId, updateNickname); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "上传头像") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/avatarUrl", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse uploadAvatarUrl(HttpServletRequest request, + @ApiParam @Validated @RequestBody Part file) throws Exception { + + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + userInfoService.uploadAvatarUrl(currentUserId,file); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "查找用户详细信息") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse selectUserInfo(HttpServletRequest request) throws Exception { + + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + UserVo.SelectUserInfo selectUserInfo = userInfoService.selectUserInfo(currentUserId); + return JsonResponse.newInstance().ok(selectUserInfo); + } + + @ApiOperation(value = "修改用户详细信息") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse updateUserInfo(HttpServletRequest request, + @ApiParam @Validated @RequestBody UserDto.UpdateUserInfo updateUserInfo) throws Exception { + + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + UserVo.SelectUserInfo selectUserInfo = userInfoService.updateUserInfo(currentUserId,updateUserInfo); + return JsonResponse.newInstance().ok(selectUserInfo); + } + + +} diff --git a/tall/src/main/java/com/ccsens/tall/web/WpsController.java b/tall/src/main/java/com/ccsens/tall/web/WpsController.java new file mode 100644 index 00000000..7eef3bb2 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/WpsController.java @@ -0,0 +1,264 @@ +package com.ccsens.tall.web; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.CharsetUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.WpsDto; +import com.ccsens.tall.bean.vo.UserVo; +import com.ccsens.tall.bean.vo.WpsVo; +import com.ccsens.tall.service.IUserService; +import com.ccsens.tall.service.IWpsService; +import com.ccsens.util.*; +import com.ccsens.util.exception.BaseException; +import io.swagger.annotations.*; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.Part; +import javax.validation.Valid; +import java.net.URLEncoder; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @description: + * @author: whj + * @time: 2020/6/17 10:07 + */ +@Slf4j +@Api(tags = "wps相关权限") +@RestController +@RequestMapping("/v1/3rd") +public class WpsController { + + @Resource + private IWpsService wpsService; + @Resource + private IUserService userService; + @Resource + private RedisUtil redisUtil; + + @InitBinder + public void initBinder(WebDataBinder binder) { + // 解决下划线开头参数无法映射到实体的问题 + binder.setFieldMarkerPrefix(null); + } + + @ApiOperation(value = "获取文件元数据", notes = "在预览或编辑的时候,通过接口校验权限并获取文件信息") + @ApiImplicitParams({ + }) + @GetMapping(value = "file/info", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileInfo fileInfo(HttpServletRequest request, WpsDto.FileInfo fileInfo) throws Exception { + log.info("获取文件元数据请求参数:{}", fileInfo); + WpsHeader header = checkSignature(request, fileInfo.get_w_signature()); + // 判断登录,查询userid + WpsVo.FileInfo fileInfoVo = wpsService.getFileInfo(header.getFileId(), header.getToken()); + log.info("获取文件元数据返回:{}", fileInfoVo); + + return fileInfoVo; + } + + + + @ApiOperation(value = "获取用户信息", notes = "在编辑的时候获取编辑过此文件的用户信息,展示在协作记录里面") + @ApiImplicitParams({ + }) + @PostMapping(value = "user/info", produces = {"application/json;charset=UTF-8"}) + public WpsVo.UserInfo userInfo(HttpServletRequest request, WpsDto.UserInfo userInfo, + @RequestBody WpsDto.UserInfoBody body) throws Exception { + log.info("获取用户信息请求参数:{}, ids:{}", userInfo, body); + if (body.getIds() == null || body.getIds().length <= 0) { + log.info("请求参数中没有用户ID"); + throw new BaseException(CodeEnum.PARAM_ERROR); + } + WpsHeader header = checkSignature(request, userInfo.get_w_signature()); + List infos = userService.queryUserInfos(body.getIds()); + log.info("获取用户信息:{}", infos); + return WpsVo.UserInfo.getInstance(infos); + } + + @ApiOperation(value = "上传文件新版本", notes = "编辑完保存回对应云盘") + @ApiImplicitParams({ + }) + @PostMapping(value = "file/save", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileSave fileSave(HttpServletRequest request, @Valid WpsDto.FileSave fileSave, @RequestBody Part file) throws Exception { + log.info("上传文件新版本请求参数:{}", fileSave); + WpsHeader header = checkSignature(request, fileSave.get_w_signature()); + + WpsVo.FileSave save = wpsService.fileSave(header.getToken(), header.getFileId(), fileSave, file); + log.info("上传文件新版本返回:{}", save); + return save; + } + + + + @ApiOperation(value = "通知文件有那些人在协作协作", notes = "通知此文件目前有那些人正在协作") + @ApiImplicitParams({ + }) + @PostMapping(value = "file/online", produces = {"application/json;charset=UTF-8"}) + public JsonResponse fileOnline(HttpServletRequest request, WpsDto.UserInfo userInfo, + @RequestBody WpsDto.UserInfoBody body){ + log.info("通知文件有那些人在协作协作请求参数:{}, ids:{}", userInfo, body); + /* + 当有用户加入或者退出协作的时候 ,上传当前文档协作者的用户信息,可以用作上下线通知。此接口可以根据需要实现,若不实现直接返回http响应码200。 + */ + // 不实现,直接返回成功 + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "获取特定版本的文件信息", notes = "在回滚版本的时候需要获取历史版本的文件信息") + @ApiImplicitParams({ + }) + @GetMapping(value = "file/version/{version}", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileBase fileVersion(HttpServletRequest request, @PathVariable("version") Integer version, WpsDto.FileVersion fileVersion) throws Exception { + log.info("上传文件新版本请求参数:{}", fileVersion); + WpsHeader header = checkSignature(request, fileVersion.get_w_signature()); + WpsVo.FileBase base = wpsService.fileVersion(header.getToken(), Long.parseLong(header.getFileId()), version); + log.info("版本{}的文件信息:{}", version, base); + return base; + } + + @ApiOperation(value = "文件重命名", notes = "当用户有重命名权限时,重命名时调用的接口") + @ApiImplicitParams({ + }) + @PutMapping(value = "file/rename", produces = {"application/json;charset=UTF-8"}) + public JsonResponse fileRename(HttpServletRequest request, WpsDto.FileRename fileRename, @RequestBody WpsDto.FileRenameBody renameBody) throws Exception { + + log.info("上传文件新版本请求参数:{}", fileRename); + WpsHeader header = checkSignature(request, fileRename.get_w_signature()); + wpsService.fileRename(header.getToken(), Long.parseLong(header.getFileId()), renameBody); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "获取所有历史版本文件信息", notes = "显示在历史版本列表中") + @ApiImplicitParams({ + }) + @PostMapping(value = "file/history", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileHistory fileHistory(HttpServletRequest request, WpsDto.FileHistory history, @RequestBody WpsDto.FileHistoryBody body) throws Exception { + log.info("获取所有历史版本文件信息请求参数:{}, {}", history, body); + WpsHeader header = checkSignature(request, history.get_w_signature()); + List histories = wpsService.queryFileHistory(header.getToken(), body); + log.info("所有历史版本返回信息:{}", histories); + return new WpsVo.FileHistory(histories); + } + @ApiOperation(value = "新建文件", notes = "通过模板新建需要提供的接口") + @ApiImplicitParams({ + }) + @PostMapping(value = "file/new", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileNew fileNew(HttpServletRequest request, WpsDto.FileNew fileNew, String name, Part file) throws Exception { + log.info("上传文件新版本请求参数:{}", fileNew); + WpsHeader header = checkSignature(request, fileNew.get_w_signature()); + WpsVo.FileNew fileNewVo = wpsService.fileNew(header.getToken(), header.getFileId(), name, file, fileNew); + log.info("文件新建返回:{}", fileNewVo); + return fileNewVo; + } + @ApiOperation(value = "通知", notes = "打开文件时返回通知的接口") + @ApiImplicitParams({ + }) + @PostMapping(value = "onnotify", produces = {"application/json;charset=UTF-8"}) + public JsonResponse onnotify(HttpServletRequest request, WpsDto.Notify notify, @RequestBody WpsDto.NotifyBody body) throws Exception { + log.info("wps通知请求参数:{},{}", notify, body); + WpsHeader header = checkSignature(request, notify.get_w_signature()); + wpsService.notify(header.getToken(), body); + log.info("wps通知完成"); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "查看wps时查询角色的读取权限",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/wpsPower", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public String getWpsPower(HttpServletRequest request, + @ApiParam @Validated @RequestBody WpsDto.WpsPower wpsPower){ + return wpsService.getWpsPower(wpsPower); + } + + @ApiOperation(value = "通过业务id和业务类型查找文件路径",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/getFilePath", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public String getFilePath(HttpServletRequest request,@ApiParam @RequestParam Long businessId,byte businessType){ + return wpsService.getFilePath(businessId,businessType); + } + + @Data + @ApiModel("wps通用请求头参数") + private static class WpsHeader{ + @ApiModelProperty("用户代理") + private String userAgent; + @ApiModelProperty("校验身份的token") + private String token; + @ApiModelProperty("文件id") + private String fileId; + + /** + * 获取请求头(由weboffice开放平台写入) + * @param request + * @return + */ + public static WpsHeader getHeader(HttpServletRequest request) { + WpsHeader header = new WpsHeader(); + header.setUserAgent(request.getHeader("User-Agent")); + String token = request.getHeader("x-wps-weboffice-token"); + if (StrUtil.isEmpty(token)) { + token = request.getParameter("_w_token"); + } + header.setToken(token); + header.setFileId(request.getHeader("x-weboffice-file-id")); + return header; + } + + } + + /** + * 初始化加签的map参数 + * @return + */ + private Map initMap(){ + Map paramMap= new HashMap<>(); + paramMap.put("_w_appid", (String) redisUtil.get(WebConstant.Wps.APPID)); + return paramMap; + } + + /** + * 签名验证 + * @param request + * @param signature + */ + private WpsHeader checkSignature(HttpServletRequest request, String signature) throws Exception { + WpsHeader header = WpsHeader.getHeader(request); + Map paramMap = initMap(); +// if (StrUtil.isNotEmpty(request.getParameter("_w_url"))) { +// paramMap.put("_w_url", request.getParameter("_w_url")); +// } else if (StrUtil.isNotEmpty(request.getParameter("_w_token"))) { +// paramMap.put("_w_token", request.getParameter("_w_token")); +// } + + Map parameterMap = request.getParameterMap(); + if (CollectionUtil.isNotEmpty(parameterMap)) { + for (Map.Entry param: parameterMap.entrySet()) { + String key = param.getKey(); + log.info("key:{}", key); + if (key.startsWith("_w_") && ! "_w_appid".equals(key) && !"_w_signature".equals(key)) { + String[] values = param.getValue(); + paramMap.put(key, values == null || values.length == 0 ? "" : values[0]); + } + } + } + + String newSignature = WpsSignature.getSignature(paramMap,(String) redisUtil.get(WebConstant.Wps.APPKEY)); + log.info("newSignature:{}", newSignature); + log.info("参数签名:{}---{}", signature, URLEncoder.encode(signature, CharsetUtil.UTF_8)); + if (!newSignature.equals(URLEncoder.encode(signature, CharsetUtil.UTF_8))) { + log.info("签名验证失败"); + throw new BaseException(CodeEnum.SIGNATURE_FAIL); + } + return header; + } +} diff --git a/tall/src/main/resources/application-dev.yml b/tall/src/main/resources/application-dev.yml index 97cb23b2..313d0c21 100644 --- a/tall/src/main/resources/application-dev.yml +++ b/tall/src/main/resources/application-dev.yml @@ -11,7 +11,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: - host: 49.233.89.188 + host: 192.168.0.99 password: 111111 port: 5672 username: admin @@ -30,3 +30,11 @@ spring: swagger: enable: true +gatewayUrl: https://test.tall.wiki/gateway/ +notGatewayUrl: /home/staticrec/logo.png +smsCode: 0 +wx: + prefixUrl: https://test.tall.wiki/wxconfigurer-api/ +file: + domain: http://localhost:7030/v1.0/ + imgDomain: http://localhost:7030/v1.0/uploads \ No newline at end of file diff --git a/tall/src/main/resources/application-prod.yml b/tall/src/main/resources/application-prod.yml index 38ccf4af..88b13a8c 100644 --- a/tall/src/main/resources/application-prod.yml +++ b/tall/src/main/resources/application-prod.yml @@ -24,7 +24,8 @@ spring: max-idle: 10 max-wait: -1ms min-idle: 0 - password: '' +# password: '' + password: port: 6379 timeout: 1000ms swagger: @@ -35,4 +36,11 @@ eureka: # ip-address: 140.143.228.3 ip-address: 81.70.54.64 -gatewayUrl: https://www.tall.wiki/gateway/ \ No newline at end of file +gatewayUrl: https://www.tall.wiki/gateway/ +notGatewayUrl: https://www.tall.wiki/ +smsCode: 1 +wx: + prefixUrl: https://www.tall.wiki/wxconfigurer-api/ +file: + domain: https://www.tall.wiki/gateway/tall/v1.0/ + imgDomain: https://www.tall.wiki/gateway/tall/v1.0/uploads \ No newline at end of file diff --git a/tall/src/main/resources/application-test.yml b/tall/src/main/resources/application-test.yml index a04dbabd..9965c9c7 100644 --- a/tall/src/main/resources/application-test.yml +++ b/tall/src/main/resources/application-test.yml @@ -1,35 +1,50 @@ -server: - port: 7030 - servlet: - context-path: /v1.0 -spring: - snowflake: - datacenterId: 1 - workerId: 1 - application: - name: tall - datasource: - type: com.alibaba.druid.pool.DruidDataSource - rabbitmq: - host: api.ccsens.com - password: 111111 - port: 5672 - username: admin - redis: - database: 0 - host: 127.0.0.1 - jedis: - pool: - max-active: 200 - max-idle: 10 - max-wait: -1ms - min-idle: 0 - password: '' - port: 6379 - timeout: 1000ms -swagger: - enable: true -eureka: - instance: - ip-address: 49.233.89.188 -gatewayUrl: https://test.tall.wiki/gateway/ \ No newline at end of file +server: + port: 7030 + servlet: + context-path: /v1.0 +spring: + snowflake: + datacenterId: 1 + workerId: 1 + application: + name: tall + datasource: + type: com.alibaba.druid.pool.DruidDataSource + rabbitmq: + host: 127.0.0.1 +# host: api.ccsens.com + password: 111111 + port: 5672 + username: admin + redis: + database: 0 + host: 127.0.0.1 + jedis: + pool: + max-active: 200 + max-idle: 10 + max-wait: -1ms + min-idle: 0 + password: '' + port: 6379 + timeout: 1000ms +swagger: + enable: true +eureka: + instance: + ip-address: 192.168.0.99 +# ip-address: 49.233.89.188 +#gatewayUrl: http://192.168.0.99/gateway/ +#notGatewayUrl: http://192.168.0.99/ +gatewayUrl: https://test.tall.wiki/gateway/ +notGatewayUrl: https://test.tall.wiki/ +smsCode: 0 +wx: + prefixUrl: https://www.tall.wiki/wxconfigurer-api/ +file: + domain: https://test.tall.wiki/gateway/tall/v1.0/ + imgDomain: https://test.tall.wiki/gateway/tall/v1.0/uploads + +#file: +# domain: http://192.168.0.99/gateway/tall/v1.0/ +# imgDomain: http://192.168.0.99/gateway/tall/v1.0/uploads \ No newline at end of file diff --git a/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index 4fc2efe4..b2acd365 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: prod - include: util-prod,common + active: dev + include: util-dev,common diff --git a/tall/src/main/resources/druid-test.yml b/tall/src/main/resources/druid-test.yml index 0452b17f..b52b019f 100644 --- a/tall/src/main/resources/druid-test.yml +++ b/tall/src/main/resources/druid-test.yml @@ -1,33 +1,35 @@ -spring: - datasource: - druid: - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 - driverClassName: com.mysql.cj.jdbc.Driver - dynamicUrl: jdbc:mysql://localhost:3306/${schema} - filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - filterName: druidFilter - filterProfileEnable: true - filterUrlPattern: /* - filters: stat,wall - initialSize: 5 - maxActive: 20 - maxPoolPreparedStatementPerConnectionSize: 20 - maxWait: 60000 - minEvictableIdleTimeMillis: 300000 - minIdle: 5 - password: - poolPreparedStatements: true - servletLogSlowSql: true - servletLoginPassword: 111111 - servletLoginUsername: druid - servletName: druidServlet - servletResetEnable: true - servletUrlMapping: /druid/* - testOnBorrow: false - testOnReturn: false - testWhileIdle: true - timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8 - username: root - validationQuery: SELECT 1 FROM DUAL +spring: + datasource: + druid: + connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + driverClassName: com.mysql.cj.jdbc.Driver + dynamicUrl: jdbc:mysql://localhost:3306/${schema} + filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + filterName: druidFilter + filterProfileEnable: true + filterUrlPattern: /* + filters: stat,wall + initialSize: 5 + maxActive: 20 + maxPoolPreparedStatementPerConnectionSize: 20 + maxWait: 60000 + minEvictableIdleTimeMillis: 300000 + minIdle: 5 +# password: + password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 + poolPreparedStatements: true + servletLogSlowSql: true + servletLoginPassword: 111111 + servletLoginUsername: druid + servletName: druidServlet + servletResetEnable: true + servletUrlMapping: /druid/* + testOnBorrow: false + testOnReturn: false + testWhileIdle: true + timeBetweenEvictionRunsMillis: 60000 +# url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://test.tall.wiki/tall?useUnicode=true&characterEncoding=UTF-8 + username: root + validationQuery: SELECT 1 FROM DUAL env: CCSENS_TALL \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/DeliverDao.xml b/tall/src/main/resources/mapper_dao/DeliverDao.xml index 5280ef5f..3b2d40e5 100644 --- a/tall/src/main/resources/mapper_dao/DeliverDao.xml +++ b/tall/src/main/resources/mapper_dao/DeliverDao.xml @@ -139,7 +139,7 @@ diff --git a/tall/src/main/resources/mapper_dao/ProMemberDao.xml b/tall/src/main/resources/mapper_dao/ProMemberDao.xml index c6040326..ac2771e7 100644 --- a/tall/src/main/resources/mapper_dao/ProMemberDao.xml +++ b/tall/src/main/resources/mapper_dao/ProMemberDao.xml @@ -14,6 +14,21 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/ProMemberRoleDao.xml b/tall/src/main/resources/mapper_dao/ProMemberRoleDao.xml index a7603b3f..4f54dcac 100644 --- a/tall/src/main/resources/mapper_dao/ProMemberRoleDao.xml +++ b/tall/src/main/resources/mapper_dao/ProMemberRoleDao.xml @@ -12,4 +12,32 @@ + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/ProNotesDao.xml b/tall/src/main/resources/mapper_dao/ProNotesDao.xml new file mode 100644 index 00000000..a86429af --- /dev/null +++ b/tall/src/main/resources/mapper_dao/ProNotesDao.xml @@ -0,0 +1,38 @@ + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/ProRemindDao.xml b/tall/src/main/resources/mapper_dao/ProRemindDao.xml new file mode 100644 index 00000000..feb5b9e6 --- /dev/null +++ b/tall/src/main/resources/mapper_dao/ProRemindDao.xml @@ -0,0 +1,48 @@ + + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/ProRoleDao.xml b/tall/src/main/resources/mapper_dao/ProRoleDao.xml index 3e2f1a57..0bb1cfa6 100644 --- a/tall/src/main/resources/mapper_dao/ProRoleDao.xml +++ b/tall/src/main/resources/mapper_dao/ProRoleDao.xml @@ -13,6 +13,7 @@ + @@ -55,7 +56,7 @@ + SELECT + if(name = 'PM',1,0) + FROM + t_pro_role + WHERE + id in ( + SELECT + parent_id as parentId + FROM + `t_pro_role` + WHERE + id = #{roleId} + ) + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/ProTaskCommentDao.xml b/tall/src/main/resources/mapper_dao/ProTaskCommentDao.xml index 06eac376..0d66b7d6 100644 --- a/tall/src/main/resources/mapper_dao/ProTaskCommentDao.xml +++ b/tall/src/main/resources/mapper_dao/ProTaskCommentDao.xml @@ -10,7 +10,8 @@ s.avatar_url as avatarUrl, c.task_sub_time_id as taskId, c.`time` as commentTime, - c.description as description + c.description as description, + if(c.user_id = #{userId},1,0) as mine FROM `t_pro_task_comment` c left join t_sys_user s on c.user_id = s.id left join t_sys_auth a on s.id = a.user_id and a.identify_type = 3 WHERE diff --git a/tall/src/main/resources/mapper_dao/SysAuthDao.xml b/tall/src/main/resources/mapper_dao/SysAuthDao.xml new file mode 100644 index 00000000..cca5aa60 --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysAuthDao.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysDomainDao.xml b/tall/src/main/resources/mapper_dao/SysDomainDao.xml new file mode 100644 index 00000000..722da8dc --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysDomainDao.xml @@ -0,0 +1,22 @@ + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysLabelDao.xml b/tall/src/main/resources/mapper_dao/SysLabelDao.xml new file mode 100644 index 00000000..27f92b6f --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysLabelDao.xml @@ -0,0 +1,37 @@ + + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysMessageSendDao.xml b/tall/src/main/resources/mapper_dao/SysMessageSendDao.xml new file mode 100644 index 00000000..eb7c621a --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysMessageSendDao.xml @@ -0,0 +1,40 @@ + + + + + + + UPDATE t_sys_message_send + SET read_status = 1, + init_read = 1 + WHERE + id = #{id} + AND rec_status = 0 + + + UPDATE t_sys_message_send + SET read_status = 1 + WHERE + operation_id = #{operationId} + AND receiver_id = #{receiverId} + AND read_status = 0 + AND rec_status = 0 + + + UPDATE t_sys_message_send + SET read_status = 1 , init_read = 1 + WHERE + receiver_id = #{receiverId} + AND send_type = #{sendType} + AND read_status = 0 + AND rec_status = 0 + + + UPDATE t_sys_message_send + SET read_status = 1 + WHERE + receiver_id = #{receiverId} + AND read_status = 0 + AND rec_status = 0 + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysOperationDao.xml b/tall/src/main/resources/mapper_dao/SysOperationDao.xml new file mode 100644 index 00000000..a0272c76 --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysOperationDao.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysPluginDao.xml b/tall/src/main/resources/mapper_dao/SysPluginDao.xml index 404a50c7..7d933b2c 100644 --- a/tall/src/main/resources/mapper_dao/SysPluginDao.xml +++ b/tall/src/main/resources/mapper_dao/SysPluginDao.xml @@ -95,4 +95,18 @@ )t GROUP BY t.taskId,t.roleId + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysProjectDao.xml b/tall/src/main/resources/mapper_dao/SysProjectDao.xml index bc1b984f..b271a3aa 100644 --- a/tall/src/main/resources/mapper_dao/SysProjectDao.xml +++ b/tall/src/main/resources/mapper_dao/SysProjectDao.xml @@ -11,6 +11,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -22,6 +55,15 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysRingMsgDao.xml b/tall/src/main/resources/mapper_dao/SysRingMsgDao.xml new file mode 100644 index 00000000..8861fdf4 --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysRingMsgDao.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysUserDao.xml b/tall/src/main/resources/mapper_dao/SysUserDao.xml index 2a575dcb..75854f37 100644 --- a/tall/src/main/resources/mapper_dao/SysUserDao.xml +++ b/tall/src/main/resources/mapper_dao/SysUserDao.xml @@ -1,7 +1,20 @@ - + + + + + + + + + + + + + + @@ -67,6 +80,15 @@ user_id = #{oldUserId} + + update + t_pro_task_comment + set + user_id = #{newUserId} + where + user_id = #{oldUserId} + + + + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml index b6b6f290..f2a33c9c 100644 --- a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml +++ b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml @@ -21,12 +21,15 @@ + + + @@ -34,10 +37,13 @@ + + + @@ -57,7 +63,8 @@ *, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, - GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription + GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription, + GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType FROM (SELECT d.id as tDetailId, @@ -72,6 +79,8 @@ s.real_begin_time as tRealBeginTime, s.real_end_time as tRealEndTime, s.complated_status as tProcess, + d.sub_project_id as tSubProjectId, + d.sub_project as tSubProjectName, d.money as tMoney, d.virtual as tVirtual, d.delay as tDelay, @@ -82,7 +91,10 @@ sp.name as spName, p.id as p_id, sp.description as spDescription, - sp.id as spid + sp.id as spid, + sp.show_type as spShowType, + d.priority as priority, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -110,7 +122,6 @@ AND s.end_time > #{startTime} - AND d.Level in (2,3) AND @@ -120,7 +131,15 @@ group by s.task_detail_id,sp.id )t GROUP BY t.tSubTimeId - order by t.tDetailId + order by + + t.priority DESC, + + + t.priority, + + t.tDetailId + @@ -130,7 +149,8 @@ *, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, - GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription + GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription, + GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType FROM (SELECT d.id as tDetailId, @@ -145,6 +165,8 @@ s.real_begin_time as tRealBeginTime, s.real_end_time as tRealEndTime, s.complated_status as tProcess, + d.sub_project_id as tSubProjectId, + d.sub_project as tSubProjectName, d.money as tMoney, d.virtual as tVirtual, d.delay as tDelay, @@ -155,7 +177,9 @@ sp.name as spName, p.id as p_id, sp.description as spDescription, - sp.id as spid + sp.id as spid, + sp.show_type as spShowType, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -200,7 +224,8 @@ *, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, - GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription + GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription, + GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType FROM (SELECT d.id as tDetailId, @@ -215,6 +240,8 @@ s.real_begin_time as tRealBeginTime, s.real_end_time as tRealEndTime, s.complated_status as tProcess, + d.sub_project_id as tSubProjectId, + d.sub_project as tSubProjectName, d.money as tMoney, d.virtual as tVirtual, d.delay as tDelay, @@ -222,7 +249,9 @@ sp.name as spName, p.id as p_id, sp.description as spDescription, - sp.id as spid + sp.id as spid, + sp.show_type as spShowType, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -251,7 +280,8 @@ *, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, - GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription + GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription, + GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType FROM (SELECT d.id as tDetailId, @@ -266,6 +296,8 @@ s.real_begin_time as tRealBeginTime, s.real_end_time as tRealEndTime, s.complated_status as tProcess, + d.sub_project_id as tSubProjectId, + d.sub_project as tSubProjectName, d.money as tMoney, d.virtual as tVirtual, d.delay as tDelay, @@ -273,7 +305,9 @@ sp.name as spName, p.id as p_id, sp.description as spDescription, - sp.id as spid + sp.id as spid, + sp.show_type as spShowType, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -329,7 +363,8 @@ *, GROUP_CONCAT(t.p_id ORDER BY t.p_id) as pId, GROUP_CONCAT(t.spName ORDER BY t.p_id) as pName, - GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription + GROUP_CONCAT(t.spDescription ORDER BY t.spid) as pDescription, + GROUP_CONCAT(t.spShowType ORDER BY t.spid) as pShowType FROM (SELECT d.id as tDetailId, @@ -344,6 +379,8 @@ s.real_begin_time as tRealBeginTime, s.real_end_time as tRealEndTime, s.complated_status as tProcess, + d.sub_project_id as tSubProjectId, + d.sub_project as tSubProjectName, d.money as tMoney, d.virtual as tVirtual, d.delay as tDelay, @@ -351,7 +388,9 @@ sp.name as spName, p.id as p_id, sp.description as spDescription, - sp.id as spid + sp.id as spid, + sp.show_type as spShowType, + d.milestone as milestone FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -479,5 +518,50 @@ s.end_time > #{startTime} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/TaskSubTimeDao.xml b/tall/src/main/resources/mapper_dao/TaskSubTimeDao.xml index 246eddad..1ad2a0f8 100644 --- a/tall/src/main/resources/mapper_dao/TaskSubTimeDao.xml +++ b/tall/src/main/resources/mapper_dao/TaskSubTimeDao.xml @@ -2,6 +2,26 @@ + + + + + + + + + + + + + + + + + + + + + SELECT + d.id as taskDetailId, + s.id as id, + d.name as taskName, + d.executor_role as roleId, + r.name as roleName, + s.begin_time as taskBegintime, + s.end_time as taskEndTime, + if(a.rId is not null or r.`name` = '全体成员',1,0) as mine + FROM + t_pro_task_detail d LEFT JOIN t_pro_task_sub_time s on d.id = s.task_detail_id + LEFT JOIN t_pro_role r on r.id = d.executor_role + LEFT JOIN + ( + SELECT + count(m.id) as mid, + s.id as sId + FROM + t_pro_sub_time_member m LEFT JOIN t_pro_task_sub_time s on m.task_sub_time_id = s.id + WHERE + m.member_id = #{memberId} + and + m.rec_status = 0 + )t on t.sId = s.id + LEFT JOIN + ( + SELECT + r.id as rId + FROM + t_pro_role r Left join t_pro_member_role mr on r.id = mr.role_id + LEFT JOIN t_pro_member m on mr.member_id = m.id + WHERE + m.user_id = #{userId} + and m.rec_status = 0 + and r.rec_status = 0 + ) a on a.rId = r.id + + WHERE + d.project_id = #{projectId} + and + d.rec_status = 0 + and + d.level != 0 + and + d.level != 1 + + and + r.id = #{roleId} + + and + s.complated_status = #{type} + and + FROM_UNIXTIME(s.begin_time/1000,'%Y-%m-%d %H:%m:%s') < NOW() + and + ( + ( + d.finish_need_all = 0 + ) + or + ( + d.finish_need_all = 1 + and + t.mid > 0 + ) + ) + ORDER BY + + s.begin_time DESC + + + d.priority DESC + ,s.begin_time DESC + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/WpsFileDao.xml b/tall/src/main/resources/mapper_dao/WpsFileDao.xml new file mode 100644 index 00000000..1ae71d7e --- /dev/null +++ b/tall/src/main/resources/mapper_dao/WpsFileDao.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE t_wps_file f, + t_wps_file_version v + SET f.NAME = #{fileName}, + v.NAME = #{fileName} + WHERE + f.id = v.file_id + AND f.current_version = v.version + AND f.id = #{fileId} + AND f.rec_status = 0 + AND v.rec_status = 0 + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ConstantMapper.xml b/tall/src/main/resources/mapper_raw/ConstantMapper.xml new file mode 100644 index 00000000..b26da6c7 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ConstantMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, t_key, t_value, description, created_at, updated_at, rec_status + + + + + delete from t_constant + where id = #{id,jdbcType=BIGINT} + + + delete from t_constant + + + + + + insert into t_constant (id, t_key, t_value, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{tKey,jdbcType=VARCHAR}, #{tValue,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_constant + + + id, + + + t_key, + + + t_value, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{tKey,jdbcType=VARCHAR}, + + + #{tValue,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_constant + + + id = #{record.id,jdbcType=BIGINT}, + + + t_key = #{record.tKey,jdbcType=VARCHAR}, + + + t_value = #{record.tValue,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_constant + set id = #{record.id,jdbcType=BIGINT}, + t_key = #{record.tKey,jdbcType=VARCHAR}, + t_value = #{record.tValue,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_constant + + + t_key = #{tKey,jdbcType=VARCHAR}, + + + t_value = #{tValue,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_constant + set t_key = #{tKey,jdbcType=VARCHAR}, + t_value = #{tValue,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/DomainNavMapper.xml b/tall/src/main/resources/mapper_raw/DomainNavMapper.xml new file mode 100644 index 00000000..b9061faa --- /dev/null +++ b/tall/src/main/resources/mapper_raw/DomainNavMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, domain_id, text, type, path, params, icon, position, created_at, updated_at, + rec_status + + + + + delete from t_sys_domain_navigation_bar + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_domain_navigation_bar + + + + + + insert into t_sys_domain_navigation_bar (id, domain_id, text, + type, path, params, + icon, position, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{domainId,jdbcType=BIGINT}, #{text,jdbcType=VARCHAR}, + #{type,jdbcType=TINYINT}, #{path,jdbcType=VARCHAR}, #{params,jdbcType=VARCHAR}, + #{icon,jdbcType=VARCHAR}, #{position,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_domain_navigation_bar + + + id, + + + domain_id, + + + text, + + + type, + + + path, + + + params, + + + icon, + + + position, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{domainId,jdbcType=BIGINT}, + + + #{text,jdbcType=VARCHAR}, + + + #{type,jdbcType=TINYINT}, + + + #{path,jdbcType=VARCHAR}, + + + #{params,jdbcType=VARCHAR}, + + + #{icon,jdbcType=VARCHAR}, + + + #{position,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_domain_navigation_bar + + + id = #{record.id,jdbcType=BIGINT}, + + + domain_id = #{record.domainId,jdbcType=BIGINT}, + + + text = #{record.text,jdbcType=VARCHAR}, + + + type = #{record.type,jdbcType=TINYINT}, + + + path = #{record.path,jdbcType=VARCHAR}, + + + params = #{record.params,jdbcType=VARCHAR}, + + + icon = #{record.icon,jdbcType=VARCHAR}, + + + position = #{record.position,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_domain_navigation_bar + set id = #{record.id,jdbcType=BIGINT}, + domain_id = #{record.domainId,jdbcType=BIGINT}, + text = #{record.text,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=TINYINT}, + path = #{record.path,jdbcType=VARCHAR}, + params = #{record.params,jdbcType=VARCHAR}, + icon = #{record.icon,jdbcType=VARCHAR}, + position = #{record.position,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_domain_navigation_bar + + + domain_id = #{domainId,jdbcType=BIGINT}, + + + text = #{text,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=TINYINT}, + + + path = #{path,jdbcType=VARCHAR}, + + + params = #{params,jdbcType=VARCHAR}, + + + icon = #{icon,jdbcType=VARCHAR}, + + + position = #{position,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_domain_navigation_bar + set domain_id = #{domainId,jdbcType=BIGINT}, + text = #{text,jdbcType=VARCHAR}, + type = #{type,jdbcType=TINYINT}, + path = #{path,jdbcType=VARCHAR}, + params = #{params,jdbcType=VARCHAR}, + icon = #{icon,jdbcType=VARCHAR}, + position = #{position,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProNotesMapper.xml b/tall/src/main/resources/mapper_raw/ProNotesMapper.xml new file mode 100644 index 00000000..10affb20 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProNotesMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, value, task_id, plugin_id, user_id, role_id, time, publicity, created_at, updated_at, + rec_status + + + + + delete from t_pro_notes + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_notes + + + + + + insert into t_pro_notes (id, value, task_id, + plugin_id, user_id, role_id, + time, publicity, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{value,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, + #{pluginId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, + #{time,jdbcType=BIGINT}, #{publicity,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_pro_notes + + + id, + + + value, + + + task_id, + + + plugin_id, + + + user_id, + + + role_id, + + + time, + + + publicity, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{value,jdbcType=VARCHAR}, + + + #{taskId,jdbcType=BIGINT}, + + + #{pluginId,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{roleId,jdbcType=BIGINT}, + + + #{time,jdbcType=BIGINT}, + + + #{publicity,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_notes + + + id = #{record.id,jdbcType=BIGINT}, + + + value = #{record.value,jdbcType=VARCHAR}, + + + task_id = #{record.taskId,jdbcType=BIGINT}, + + + plugin_id = #{record.pluginId,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + role_id = #{record.roleId,jdbcType=BIGINT}, + + + time = #{record.time,jdbcType=BIGINT}, + + + publicity = #{record.publicity,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_notes + set id = #{record.id,jdbcType=BIGINT}, + value = #{record.value,jdbcType=VARCHAR}, + task_id = #{record.taskId,jdbcType=BIGINT}, + plugin_id = #{record.pluginId,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + role_id = #{record.roleId,jdbcType=BIGINT}, + time = #{record.time,jdbcType=BIGINT}, + publicity = #{record.publicity,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_notes + + + value = #{value,jdbcType=VARCHAR}, + + + task_id = #{taskId,jdbcType=BIGINT}, + + + plugin_id = #{pluginId,jdbcType=BIGINT}, + + + user_id = #{userId,jdbcType=BIGINT}, + + + role_id = #{roleId,jdbcType=BIGINT}, + + + time = #{time,jdbcType=BIGINT}, + + + publicity = #{publicity,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_notes + set value = #{value,jdbcType=VARCHAR}, + task_id = #{taskId,jdbcType=BIGINT}, + plugin_id = #{pluginId,jdbcType=BIGINT}, + user_id = #{userId,jdbcType=BIGINT}, + role_id = #{roleId,jdbcType=BIGINT}, + time = #{time,jdbcType=BIGINT}, + publicity = #{publicity,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProProjectFileMapper.xml b/tall/src/main/resources/mapper_raw/ProProjectFileMapper.xml new file mode 100644 index 00000000..1c1c6d62 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProProjectFileMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, business_id, wps_file_id, business_type, privilege, privilege_query_url, created_at, + updated_at, rec_status + + + + + delete from t_pro_project_file + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_project_file + + + + + + insert into t_pro_project_file (id, business_id, wps_file_id, + business_type, privilege, privilege_query_url, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{businessId,jdbcType=BIGINT}, #{wpsFileId,jdbcType=BIGINT}, + #{businessType,jdbcType=TINYINT}, #{privilege,jdbcType=TINYINT}, #{privilegeQueryUrl,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_pro_project_file + + + id, + + + business_id, + + + wps_file_id, + + + business_type, + + + privilege, + + + privilege_query_url, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{businessId,jdbcType=BIGINT}, + + + #{wpsFileId,jdbcType=BIGINT}, + + + #{businessType,jdbcType=TINYINT}, + + + #{privilege,jdbcType=TINYINT}, + + + #{privilegeQueryUrl,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_project_file + + + id = #{record.id,jdbcType=BIGINT}, + + + business_id = #{record.businessId,jdbcType=BIGINT}, + + + wps_file_id = #{record.wpsFileId,jdbcType=BIGINT}, + + + business_type = #{record.businessType,jdbcType=TINYINT}, + + + privilege = #{record.privilege,jdbcType=TINYINT}, + + + privilege_query_url = #{record.privilegeQueryUrl,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_project_file + set id = #{record.id,jdbcType=BIGINT}, + business_id = #{record.businessId,jdbcType=BIGINT}, + wps_file_id = #{record.wpsFileId,jdbcType=BIGINT}, + business_type = #{record.businessType,jdbcType=TINYINT}, + privilege = #{record.privilege,jdbcType=TINYINT}, + privilege_query_url = #{record.privilegeQueryUrl,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_project_file + + + business_id = #{businessId,jdbcType=BIGINT}, + + + wps_file_id = #{wpsFileId,jdbcType=BIGINT}, + + + business_type = #{businessType,jdbcType=TINYINT}, + + + privilege = #{privilege,jdbcType=TINYINT}, + + + privilege_query_url = #{privilegeQueryUrl,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_project_file + set business_id = #{businessId,jdbcType=BIGINT}, + wps_file_id = #{wpsFileId,jdbcType=BIGINT}, + business_type = #{businessType,jdbcType=TINYINT}, + privilege = #{privilege,jdbcType=TINYINT}, + privilege_query_url = #{privilegeQueryUrl,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProRemindMapper.xml b/tall/src/main/resources/mapper_raw/ProRemindMapper.xml new file mode 100644 index 00000000..4975c3e9 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProRemindMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, sub_task_id, remind_timing, remind_absolute_time, finish_status, remind_times, + created_at, updated_at, rec_status, duration + + + + + delete from t_pro_remind + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_remind + + + + + + insert into t_pro_remind (id, sub_task_id, remind_timing, + remind_absolute_time, finish_status, remind_times, + created_at, updated_at, rec_status, + duration) + values (#{id,jdbcType=BIGINT}, #{subTaskId,jdbcType=BIGINT}, #{remindTiming,jdbcType=TINYINT}, + #{remindAbsoluteTime,jdbcType=BIGINT}, #{finishStatus,jdbcType=TINYINT}, #{remindTimes,jdbcType=INTEGER}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, + #{duration,jdbcType=VARCHAR}) + + + insert into t_pro_remind + + + id, + + + sub_task_id, + + + remind_timing, + + + remind_absolute_time, + + + finish_status, + + + remind_times, + + + created_at, + + + updated_at, + + + rec_status, + + + duration, + + + + + #{id,jdbcType=BIGINT}, + + + #{subTaskId,jdbcType=BIGINT}, + + + #{remindTiming,jdbcType=TINYINT}, + + + #{remindAbsoluteTime,jdbcType=BIGINT}, + + + #{finishStatus,jdbcType=TINYINT}, + + + #{remindTimes,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{duration,jdbcType=VARCHAR}, + + + + + + update t_pro_remind + + + id = #{record.id,jdbcType=BIGINT}, + + + sub_task_id = #{record.subTaskId,jdbcType=BIGINT}, + + + remind_timing = #{record.remindTiming,jdbcType=TINYINT}, + + + remind_absolute_time = #{record.remindAbsoluteTime,jdbcType=BIGINT}, + + + finish_status = #{record.finishStatus,jdbcType=TINYINT}, + + + remind_times = #{record.remindTimes,jdbcType=INTEGER}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + duration = #{record.duration,jdbcType=VARCHAR}, + + + + + + + + update t_pro_remind + set id = #{record.id,jdbcType=BIGINT}, + sub_task_id = #{record.subTaskId,jdbcType=BIGINT}, + remind_timing = #{record.remindTiming,jdbcType=TINYINT}, + remind_absolute_time = #{record.remindAbsoluteTime,jdbcType=BIGINT}, + finish_status = #{record.finishStatus,jdbcType=TINYINT}, + remind_times = #{record.remindTimes,jdbcType=INTEGER}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + duration = #{record.duration,jdbcType=VARCHAR} + + + + + + update t_pro_remind + + + sub_task_id = #{subTaskId,jdbcType=BIGINT}, + + + remind_timing = #{remindTiming,jdbcType=TINYINT}, + + + remind_absolute_time = #{remindAbsoluteTime,jdbcType=BIGINT}, + + + finish_status = #{finishStatus,jdbcType=TINYINT}, + + + remind_times = #{remindTimes,jdbcType=INTEGER}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + duration = #{duration,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_remind + set sub_task_id = #{subTaskId,jdbcType=BIGINT}, + remind_timing = #{remindTiming,jdbcType=TINYINT}, + remind_absolute_time = #{remindAbsoluteTime,jdbcType=BIGINT}, + finish_status = #{finishStatus,jdbcType=TINYINT}, + remind_times = #{remindTimes,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + duration = #{duration,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProRoleMapper.xml b/tall/src/main/resources/mapper_raw/ProRoleMapper.xml index c1903e02..489aa8c5 100644 --- a/tall/src/main/resources/mapper_raw/ProRoleMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProRoleMapper.xml @@ -1,275 +1,291 @@ - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, project_id, parent_id, name, description, sequence, created_at, updated_at, rec_status - - - - - delete from t_pro_role - where id = #{id,jdbcType=BIGINT} - - - delete from t_pro_role - - - - - - insert into t_pro_role (id, project_id, parent_id, - name, description, sequence, - created_at, updated_at, rec_status - ) - values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT}, - #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{sequence,jdbcType=INTEGER}, - #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} - ) - - - insert into t_pro_role - - - id, - - - project_id, - - - parent_id, - - - name, - - - description, - - - sequence, - - - created_at, - - - updated_at, - - - rec_status, - - - - - #{id,jdbcType=BIGINT}, - - - #{projectId,jdbcType=BIGINT}, - - - #{parentId,jdbcType=BIGINT}, - - - #{name,jdbcType=VARCHAR}, - - - #{description,jdbcType=VARCHAR}, - - - #{sequence,jdbcType=INTEGER}, - - - #{createdAt,jdbcType=TIMESTAMP}, - - - #{updatedAt,jdbcType=TIMESTAMP}, - - - #{recStatus,jdbcType=TINYINT}, - - - - - - update t_pro_role - - - id = #{record.id,jdbcType=BIGINT}, - - - project_id = #{record.projectId,jdbcType=BIGINT}, - - - parent_id = #{record.parentId,jdbcType=BIGINT}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - sequence = #{record.sequence,jdbcType=INTEGER}, - - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - - - - - - - - update t_pro_role - set id = #{record.id,jdbcType=BIGINT}, - project_id = #{record.projectId,jdbcType=BIGINT}, - parent_id = #{record.parentId,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - sequence = #{record.sequence,jdbcType=INTEGER}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} - - - - - - update t_pro_role - - - project_id = #{projectId,jdbcType=BIGINT}, - - - parent_id = #{parentId,jdbcType=BIGINT}, - - - name = #{name,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - sequence = #{sequence,jdbcType=INTEGER}, - - - created_at = #{createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{recStatus,jdbcType=TINYINT}, - - - where id = #{id,jdbcType=BIGINT} - - - update t_pro_role - set project_id = #{projectId,jdbcType=BIGINT}, - parent_id = #{parentId,jdbcType=BIGINT}, - name = #{name,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - sequence = #{sequence,jdbcType=INTEGER}, - created_at = #{createdAt,jdbcType=TIMESTAMP}, - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} - where id = #{id,jdbcType=BIGINT} - + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, parent_id, name, description, sequence, created_at, updated_at, rec_status, + relevance_project_id + + + + + delete from t_pro_role + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_role + + + + + + insert into t_pro_role (id, project_id, parent_id, + name, description, sequence, + created_at, updated_at, rec_status, + relevance_project_id) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{sequence,jdbcType=INTEGER}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, + #{relevanceProjectId,jdbcType=BIGINT}) + + + insert into t_pro_role + + + id, + + + project_id, + + + parent_id, + + + name, + + + description, + + + sequence, + + + created_at, + + + updated_at, + + + rec_status, + + + relevance_project_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{parentId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{sequence,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{relevanceProjectId,jdbcType=BIGINT}, + + + + + + update t_pro_role + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + sequence = #{record.sequence,jdbcType=INTEGER}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT}, + + + + + + + + update t_pro_role + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + sequence = #{record.sequence,jdbcType=INTEGER}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT} + + + + + + update t_pro_role + + + project_id = #{projectId,jdbcType=BIGINT}, + + + parent_id = #{parentId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + sequence = #{sequence,jdbcType=INTEGER}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_role + set project_id = #{projectId,jdbcType=BIGINT}, + parent_id = #{parentId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + sequence = #{sequence,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProShowMapper.xml b/tall/src/main/resources/mapper_raw/ProShowMapper.xml index f980e2b9..7177adff 100644 --- a/tall/src/main/resources/mapper_raw/ProShowMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProShowMapper.xml @@ -8,13 +8,17 @@ - - - + + + + + + + @@ -75,8 +79,9 @@ - id, project_id, slide, filter, is_show_mvp, create_task, created_at, updated_at, - rec_status, time_show, duration, show_shortcuts, select_task_type + id, project_id, slide, filter, is_show_mvp, create_task, time_show, duration, show_shortcuts, + select_task_type, detail_path, pims_nav_type, share_change, share_change_code, created_at, + updated_at, rec_status @@ -232,15 +263,6 @@ create_task = #{record.createTask,jdbcType=TINYINT}, - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - time_show = #{record.timeShow,jdbcType=VARCHAR}, @@ -253,6 +275,27 @@ select_task_type = #{record.selectTaskType,jdbcType=TINYINT}, + + detail_path = #{record.detailPath,jdbcType=VARCHAR}, + + + pims_nav_type = #{record.pimsNavType,jdbcType=TINYINT}, + + + share_change = #{record.shareChange,jdbcType=TINYINT}, + + + share_change_code = #{record.shareChangeCode,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + @@ -266,13 +309,17 @@ filter = #{record.filter,jdbcType=TINYINT}, is_show_mvp = #{record.isShowMvp,jdbcType=TINYINT}, create_task = #{record.createTask,jdbcType=TINYINT}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT}, time_show = #{record.timeShow,jdbcType=VARCHAR}, duration = #{record.duration,jdbcType=TINYINT}, show_shortcuts = #{record.showShortcuts,jdbcType=TINYINT}, - select_task_type = #{record.selectTaskType,jdbcType=TINYINT} + select_task_type = #{record.selectTaskType,jdbcType=TINYINT}, + detail_path = #{record.detailPath,jdbcType=VARCHAR}, + pims_nav_type = #{record.pimsNavType,jdbcType=TINYINT}, + share_change = #{record.shareChange,jdbcType=TINYINT}, + share_change_code = #{record.shareChangeCode,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} @@ -295,15 +342,6 @@ create_task = #{createTask,jdbcType=TINYINT}, - - created_at = #{createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{recStatus,jdbcType=TINYINT}, - time_show = #{timeShow,jdbcType=VARCHAR}, @@ -316,6 +354,27 @@ select_task_type = #{selectTaskType,jdbcType=TINYINT}, + + detail_path = #{detailPath,jdbcType=VARCHAR}, + + + pims_nav_type = #{pimsNavType,jdbcType=TINYINT}, + + + share_change = #{shareChange,jdbcType=TINYINT}, + + + share_change_code = #{shareChangeCode,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -326,13 +385,17 @@ filter = #{filter,jdbcType=TINYINT}, is_show_mvp = #{isShowMvp,jdbcType=TINYINT}, create_task = #{createTask,jdbcType=TINYINT}, - created_at = #{createdAt,jdbcType=TIMESTAMP}, - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT}, time_show = #{timeShow,jdbcType=VARCHAR}, duration = #{duration,jdbcType=TINYINT}, show_shortcuts = #{showShortcuts,jdbcType=TINYINT}, - select_task_type = #{selectTaskType,jdbcType=TINYINT} + select_task_type = #{selectTaskType,jdbcType=TINYINT}, + detail_path = #{detailPath,jdbcType=VARCHAR}, + pims_nav_type = #{pimsNavType,jdbcType=TINYINT}, + share_change = #{shareChange,jdbcType=TINYINT}, + share_change_code = #{shareChangeCode,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProTaskDeliverPostLogCheckerMapper.xml b/tall/src/main/resources/mapper_raw/ProTaskDeliverPostLogCheckerMapper.xml index cb2f12a7..fdb40fa1 100644 --- a/tall/src/main/resources/mapper_raw/ProTaskDeliverPostLogCheckerMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProTaskDeliverPostLogCheckerMapper.xml @@ -1,259 +1,276 @@ - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, deliver_post_log_id, checker_id, remark, check_status, created_at, updated_at, - rec_status - - - - - delete from t_pro_task_deliver_post_log_checker - where id = #{id,jdbcType=BIGINT} - - - delete from t_pro_task_deliver_post_log_checker - - - - - - insert into t_pro_task_deliver_post_log_checker (id, deliver_post_log_id, checker_id, - remark, check_status, created_at, - updated_at, rec_status) - values (#{id,jdbcType=BIGINT}, #{deliverPostLogId,jdbcType=BIGINT}, #{checkerId,jdbcType=BIGINT}, - #{remark,jdbcType=VARCHAR}, #{checkStatus,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, - #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) - - - insert into t_pro_task_deliver_post_log_checker - - - id, - - - deliver_post_log_id, - - - checker_id, - - - remark, - - - check_status, - - - created_at, - - - updated_at, - - - rec_status, - - - - - #{id,jdbcType=BIGINT}, - - - #{deliverPostLogId,jdbcType=BIGINT}, - - - #{checkerId,jdbcType=BIGINT}, - - - #{remark,jdbcType=VARCHAR}, - - - #{checkStatus,jdbcType=INTEGER}, - - - #{createdAt,jdbcType=TIMESTAMP}, - - - #{updatedAt,jdbcType=TIMESTAMP}, - - - #{recStatus,jdbcType=TINYINT}, - - - - - - update t_pro_task_deliver_post_log_checker - - - id = #{record.id,jdbcType=BIGINT}, - - - deliver_post_log_id = #{record.deliverPostLogId,jdbcType=BIGINT}, - - - checker_id = #{record.checkerId,jdbcType=BIGINT}, - - - remark = #{record.remark,jdbcType=VARCHAR}, - - - check_status = #{record.checkStatus,jdbcType=INTEGER}, - - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - - - - - - - - update t_pro_task_deliver_post_log_checker - set id = #{record.id,jdbcType=BIGINT}, - deliver_post_log_id = #{record.deliverPostLogId,jdbcType=BIGINT}, - checker_id = #{record.checkerId,jdbcType=BIGINT}, - remark = #{record.remark,jdbcType=VARCHAR}, - check_status = #{record.checkStatus,jdbcType=INTEGER}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} - - - - - - update t_pro_task_deliver_post_log_checker - - - deliver_post_log_id = #{deliverPostLogId,jdbcType=BIGINT}, - - - checker_id = #{checkerId,jdbcType=BIGINT}, - - - remark = #{remark,jdbcType=VARCHAR}, - - - check_status = #{checkStatus,jdbcType=INTEGER}, - - - created_at = #{createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{recStatus,jdbcType=TINYINT}, - - - where id = #{id,jdbcType=BIGINT} - - - update t_pro_task_deliver_post_log_checker - set deliver_post_log_id = #{deliverPostLogId,jdbcType=BIGINT}, - checker_id = #{checkerId,jdbcType=BIGINT}, - remark = #{remark,jdbcType=VARCHAR}, - check_status = #{checkStatus,jdbcType=INTEGER}, - created_at = #{createdAt,jdbcType=TIMESTAMP}, - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} - where id = #{id,jdbcType=BIGINT} - + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, deliver_post_log_id, checker_id, remark, check_status, score, created_at, updated_at, + rec_status + + + + + delete from t_pro_task_deliver_post_log_checker + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_task_deliver_post_log_checker + + + + + + insert into t_pro_task_deliver_post_log_checker (id, deliver_post_log_id, checker_id, + remark, check_status, score, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{deliverPostLogId,jdbcType=BIGINT}, #{checkerId,jdbcType=BIGINT}, + #{remark,jdbcType=VARCHAR}, #{checkStatus,jdbcType=INTEGER}, #{score,jdbcType=INTEGER}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_pro_task_deliver_post_log_checker + + + id, + + + deliver_post_log_id, + + + checker_id, + + + remark, + + + check_status, + + + score, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{deliverPostLogId,jdbcType=BIGINT}, + + + #{checkerId,jdbcType=BIGINT}, + + + #{remark,jdbcType=VARCHAR}, + + + #{checkStatus,jdbcType=INTEGER}, + + + #{score,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_task_deliver_post_log_checker + + + id = #{record.id,jdbcType=BIGINT}, + + + deliver_post_log_id = #{record.deliverPostLogId,jdbcType=BIGINT}, + + + checker_id = #{record.checkerId,jdbcType=BIGINT}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + check_status = #{record.checkStatus,jdbcType=INTEGER}, + + + score = #{record.score,jdbcType=INTEGER}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_task_deliver_post_log_checker + set id = #{record.id,jdbcType=BIGINT}, + deliver_post_log_id = #{record.deliverPostLogId,jdbcType=BIGINT}, + checker_id = #{record.checkerId,jdbcType=BIGINT}, + remark = #{record.remark,jdbcType=VARCHAR}, + check_status = #{record.checkStatus,jdbcType=INTEGER}, + score = #{record.score,jdbcType=INTEGER}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_task_deliver_post_log_checker + + + deliver_post_log_id = #{deliverPostLogId,jdbcType=BIGINT}, + + + checker_id = #{checkerId,jdbcType=BIGINT}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + check_status = #{checkStatus,jdbcType=INTEGER}, + + + score = #{score,jdbcType=INTEGER}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_task_deliver_post_log_checker + set deliver_post_log_id = #{deliverPostLogId,jdbcType=BIGINT}, + checker_id = #{checkerId,jdbcType=BIGINT}, + remark = #{remark,jdbcType=VARCHAR}, + check_status = #{checkStatus,jdbcType=INTEGER}, + score = #{score,jdbcType=INTEGER}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml b/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml index 93660639..c22d2b95 100644 --- a/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml @@ -28,6 +28,8 @@ + + @@ -91,7 +93,7 @@ id, project_id, name, description, begin_time, end_time, cycle, parent_id, sub_task, sub_project_id, sub_project, executor_role, checker_role, money, delay, delay_time, loop_to, loop_times, virtual, level, has_group, finish_need_all, all_member, created_at, - updated_at, rec_status + updated_at, rec_status, priority, milestone @@ -393,6 +409,12 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + priority = #{record.priority,jdbcType=TINYINT}, + + + milestone = #{record.milestone,jdbcType=TINYINT}, + @@ -425,7 +447,9 @@ all_member = #{record.allMember,jdbcType=TINYINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + priority = #{record.priority,jdbcType=TINYINT}, + milestone = #{record.milestone,jdbcType=TINYINT} @@ -508,6 +532,12 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + priority = #{priority,jdbcType=TINYINT}, + + + milestone = #{milestone,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -537,7 +567,9 @@ all_member = #{allMember,jdbcType=TINYINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + priority = #{priority,jdbcType=TINYINT}, + milestone = #{milestone,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysDomainMapper.xml b/tall/src/main/resources/mapper_raw/SysDomainMapper.xml index 568af1f2..7324a050 100644 --- a/tall/src/main/resources/mapper_raw/SysDomainMapper.xml +++ b/tall/src/main/resources/mapper_raw/SysDomainMapper.xml @@ -5,6 +5,7 @@ + @@ -16,6 +17,7 @@ + @@ -76,8 +78,9 @@ - id, domain_name, logo, company_name, system_name, backdrop_url, show_calendar, show_project_id, - caption, headline, created_at, updated_at, rec_status, forever_project_id + id, domain_name, logo, logo_path, company_name, system_name, backdrop_url, show_calendar, + show_project_id, caption, headline, created_at, updated_at, rec_status, forever_project_id, + navigation_bar @@ -230,6 +247,9 @@ logo = #{record.logo,jdbcType=VARCHAR}, + + logo_path = #{record.logoPath,jdbcType=VARCHAR}, + company_name = #{record.companyName,jdbcType=VARCHAR}, @@ -263,6 +283,9 @@ forever_project_id = #{record.foreverProjectId,jdbcType=VARCHAR}, + + navigation_bar = #{record.navigationBar,jdbcType=TINYINT}, + @@ -273,6 +296,7 @@ set id = #{record.id,jdbcType=BIGINT}, domain_name = #{record.domainName,jdbcType=VARCHAR}, logo = #{record.logo,jdbcType=VARCHAR}, + logo_path = #{record.logoPath,jdbcType=VARCHAR}, company_name = #{record.companyName,jdbcType=VARCHAR}, system_name = #{record.systemName,jdbcType=VARCHAR}, backdrop_url = #{record.backdropUrl,jdbcType=VARCHAR}, @@ -283,7 +307,8 @@ created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, rec_status = #{record.recStatus,jdbcType=TINYINT}, - forever_project_id = #{record.foreverProjectId,jdbcType=VARCHAR} + forever_project_id = #{record.foreverProjectId,jdbcType=VARCHAR}, + navigation_bar = #{record.navigationBar,jdbcType=TINYINT} @@ -297,6 +322,9 @@ logo = #{logo,jdbcType=VARCHAR}, + + logo_path = #{logoPath,jdbcType=VARCHAR}, + company_name = #{companyName,jdbcType=VARCHAR}, @@ -330,6 +358,9 @@ forever_project_id = #{foreverProjectId,jdbcType=VARCHAR}, + + navigation_bar = #{navigationBar,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -337,6 +368,7 @@ update t_sys_domain set domain_name = #{domainName,jdbcType=VARCHAR}, logo = #{logo,jdbcType=VARCHAR}, + logo_path = #{logoPath,jdbcType=VARCHAR}, company_name = #{companyName,jdbcType=VARCHAR}, system_name = #{systemName,jdbcType=VARCHAR}, backdrop_url = #{backdropUrl,jdbcType=VARCHAR}, @@ -347,7 +379,8 @@ created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, rec_status = #{recStatus,jdbcType=TINYINT}, - forever_project_id = #{foreverProjectId,jdbcType=VARCHAR} + forever_project_id = #{foreverProjectId,jdbcType=VARCHAR}, + navigation_bar = #{navigationBar,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysImitationMapper.xml b/tall/src/main/resources/mapper_raw/SysImitationMapper.xml new file mode 100644 index 00000000..45299910 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysImitationMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, project_id, role_id, created_at, updated_at, rec_status + + + + + delete from t_sys_imitation + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_imitation + + + + + + insert into t_sys_imitation (id, user_id, project_id, + role_id, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{roleId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_imitation + + + id, + + + user_id, + + + project_id, + + + role_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{roleId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_imitation + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + role_id = #{record.roleId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_imitation + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + role_id = #{record.roleId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_imitation + + + user_id = #{userId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + role_id = #{roleId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_imitation + set user_id = #{userId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + role_id = #{roleId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysLabelMapper.xml b/tall/src/main/resources/mapper_raw/SysLabelMapper.xml new file mode 100644 index 00000000..9885577b --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysLabelMapper.xml @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, code, color, description, level, user_id, created_at, updated_at, rec_status + + + + + delete from t_sys_label + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_label + + + + + + insert into t_sys_label (id, name, code, + color, description, level, + user_id, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, + #{color,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{level,jdbcType=TINYINT}, + #{userId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_label + + + id, + + + name, + + + code, + + + color, + + + description, + + + level, + + + user_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{code,jdbcType=VARCHAR}, + + + #{color,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{level,jdbcType=TINYINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_label + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + color = #{record.color,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + level = #{record.level,jdbcType=TINYINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_label + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + code = #{record.code,jdbcType=VARCHAR}, + color = #{record.color,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + level = #{record.level,jdbcType=TINYINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_label + + + name = #{name,jdbcType=VARCHAR}, + + + code = #{code,jdbcType=VARCHAR}, + + + color = #{color,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + level = #{level,jdbcType=TINYINT}, + + + user_id = #{userId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_label + set name = #{name,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR}, + color = #{color,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + level = #{level,jdbcType=TINYINT}, + user_id = #{userId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysMessageSendMapper.xml b/tall/src/main/resources/mapper_raw/SysMessageSendMapper.xml new file mode 100644 index 00000000..04da5564 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysMessageSendMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, operation_id, receiver_id, send_type, send_status, read_status, init_read, send_time, + complete, created_at, updated_at, rec_status + + + + + delete from t_sys_message_send + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_message_send + + + + + + insert into t_sys_message_send (id, operation_id, receiver_id, + send_type, send_status, read_status, + init_read, send_time, complete, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{operationId,jdbcType=BIGINT}, #{receiverId,jdbcType=BIGINT}, + #{sendType,jdbcType=TINYINT}, #{sendStatus,jdbcType=TINYINT}, #{readStatus,jdbcType=TINYINT}, + #{initRead,jdbcType=TINYINT}, #{sendTime,jdbcType=BIGINT}, #{complete,jdbcType=TINYINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_message_send + + + id, + + + operation_id, + + + receiver_id, + + + send_type, + + + send_status, + + + read_status, + + + init_read, + + + send_time, + + + complete, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{operationId,jdbcType=BIGINT}, + + + #{receiverId,jdbcType=BIGINT}, + + + #{sendType,jdbcType=TINYINT}, + + + #{sendStatus,jdbcType=TINYINT}, + + + #{readStatus,jdbcType=TINYINT}, + + + #{initRead,jdbcType=TINYINT}, + + + #{sendTime,jdbcType=BIGINT}, + + + #{complete,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_message_send + + + id = #{record.id,jdbcType=BIGINT}, + + + operation_id = #{record.operationId,jdbcType=BIGINT}, + + + receiver_id = #{record.receiverId,jdbcType=BIGINT}, + + + send_type = #{record.sendType,jdbcType=TINYINT}, + + + send_status = #{record.sendStatus,jdbcType=TINYINT}, + + + read_status = #{record.readStatus,jdbcType=TINYINT}, + + + init_read = #{record.initRead,jdbcType=TINYINT}, + + + send_time = #{record.sendTime,jdbcType=BIGINT}, + + + complete = #{record.complete,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_message_send + set id = #{record.id,jdbcType=BIGINT}, + operation_id = #{record.operationId,jdbcType=BIGINT}, + receiver_id = #{record.receiverId,jdbcType=BIGINT}, + send_type = #{record.sendType,jdbcType=TINYINT}, + send_status = #{record.sendStatus,jdbcType=TINYINT}, + read_status = #{record.readStatus,jdbcType=TINYINT}, + init_read = #{record.initRead,jdbcType=TINYINT}, + send_time = #{record.sendTime,jdbcType=BIGINT}, + complete = #{record.complete,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_message_send + + + operation_id = #{operationId,jdbcType=BIGINT}, + + + receiver_id = #{receiverId,jdbcType=BIGINT}, + + + send_type = #{sendType,jdbcType=TINYINT}, + + + send_status = #{sendStatus,jdbcType=TINYINT}, + + + read_status = #{readStatus,jdbcType=TINYINT}, + + + init_read = #{initRead,jdbcType=TINYINT}, + + + send_time = #{sendTime,jdbcType=BIGINT}, + + + complete = #{complete,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_message_send + set operation_id = #{operationId,jdbcType=BIGINT}, + receiver_id = #{receiverId,jdbcType=BIGINT}, + send_type = #{sendType,jdbcType=TINYINT}, + send_status = #{sendStatus,jdbcType=TINYINT}, + read_status = #{readStatus,jdbcType=TINYINT}, + init_read = #{initRead,jdbcType=TINYINT}, + send_time = #{sendTime,jdbcType=BIGINT}, + complete = #{complete,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysOperationMapper.xml b/tall/src/main/resources/mapper_raw/SysOperationMapper.xml new file mode 100644 index 00000000..bc28230a --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysOperationMapper.xml @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, operator_id, project_id, operate_type, operation_time, created_at, updated_at, + rec_status + + + + + delete from t_sys_operation + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_operation + + + + + + insert into t_sys_operation (id, operator_id, project_id, + operate_type, operation_time, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{operatorId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, + #{operateType,jdbcType=TINYINT}, #{operationTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_operation + + + id, + + + operator_id, + + + project_id, + + + operate_type, + + + operation_time, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{operatorId,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{operateType,jdbcType=TINYINT}, + + + #{operationTime,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_operation + + + id = #{record.id,jdbcType=BIGINT}, + + + operator_id = #{record.operatorId,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + operate_type = #{record.operateType,jdbcType=TINYINT}, + + + operation_time = #{record.operationTime,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_operation + set id = #{record.id,jdbcType=BIGINT}, + operator_id = #{record.operatorId,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + operate_type = #{record.operateType,jdbcType=TINYINT}, + operation_time = #{record.operationTime,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_operation + + + operator_id = #{operatorId,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + operate_type = #{operateType,jdbcType=TINYINT}, + + + operation_time = #{operationTime,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_operation + set operator_id = #{operatorId,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=BIGINT}, + operate_type = #{operateType,jdbcType=TINYINT}, + operation_time = #{operationTime,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysOperationMessageMapper.xml b/tall/src/main/resources/mapper_raw/SysOperationMessageMapper.xml new file mode 100644 index 00000000..9750fbaf --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysOperationMessageMapper.xml @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, operation_id, content, type, settings, sort, created_at, updated_at, rec_status + + + + + delete from t_sys_operation_message + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_operation_message + + + + + + insert into t_sys_operation_message (id, operation_id, content, + type, settings, sort, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{operationId,jdbcType=BIGINT}, #{content,jdbcType=VARCHAR}, + #{type,jdbcType=TINYINT}, #{settings,jdbcType=VARCHAR}, #{sort,jdbcType=TINYINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_operation_message + + + id, + + + operation_id, + + + content, + + + type, + + + settings, + + + sort, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{operationId,jdbcType=BIGINT}, + + + #{content,jdbcType=VARCHAR}, + + + #{type,jdbcType=TINYINT}, + + + #{settings,jdbcType=VARCHAR}, + + + #{sort,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_operation_message + + + id = #{record.id,jdbcType=BIGINT}, + + + operation_id = #{record.operationId,jdbcType=BIGINT}, + + + content = #{record.content,jdbcType=VARCHAR}, + + + type = #{record.type,jdbcType=TINYINT}, + + + settings = #{record.settings,jdbcType=VARCHAR}, + + + sort = #{record.sort,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_operation_message + set id = #{record.id,jdbcType=BIGINT}, + operation_id = #{record.operationId,jdbcType=BIGINT}, + content = #{record.content,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=TINYINT}, + settings = #{record.settings,jdbcType=VARCHAR}, + sort = #{record.sort,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_operation_message + + + operation_id = #{operationId,jdbcType=BIGINT}, + + + content = #{content,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=TINYINT}, + + + settings = #{settings,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_operation_message + set operation_id = #{operationId,jdbcType=BIGINT}, + content = #{content,jdbcType=VARCHAR}, + type = #{type,jdbcType=TINYINT}, + settings = #{settings,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysPluginMapper.xml b/tall/src/main/resources/mapper_raw/SysPluginMapper.xml index 69846018..d9e9f440 100644 --- a/tall/src/main/resources/mapper_raw/SysPluginMapper.xml +++ b/tall/src/main/resources/mapper_raw/SysPluginMapper.xml @@ -1,243 +1,258 @@ - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, name, description, scene, created_at, updated_at, rec_status - - - - - delete from t_sys_plugin - where id = #{id,jdbcType=BIGINT} - - - delete from t_sys_plugin - - - - - - insert into t_sys_plugin (id, name, description, - scene, created_at, updated_at, - rec_status) - values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, - #{scene,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, - #{recStatus,jdbcType=TINYINT}) - - - insert into t_sys_plugin - - - id, - - - name, - - - description, - - - scene, - - - created_at, - - - updated_at, - - - rec_status, - - - - - #{id,jdbcType=BIGINT}, - - - #{name,jdbcType=VARCHAR}, - - - #{description,jdbcType=VARCHAR}, - - - #{scene,jdbcType=TINYINT}, - - - #{createdAt,jdbcType=TIMESTAMP}, - - - #{updatedAt,jdbcType=TIMESTAMP}, - - - #{recStatus,jdbcType=TINYINT}, - - - - - - update t_sys_plugin - - - id = #{record.id,jdbcType=BIGINT}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - scene = #{record.scene,jdbcType=TINYINT}, - - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - - - - - - - - update t_sys_plugin - set id = #{record.id,jdbcType=BIGINT}, - name = #{record.name,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - scene = #{record.scene,jdbcType=TINYINT}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} - - - - - - update t_sys_plugin - - - name = #{name,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - scene = #{scene,jdbcType=TINYINT}, - - - created_at = #{createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{recStatus,jdbcType=TINYINT}, - - - where id = #{id,jdbcType=BIGINT} - - - update t_sys_plugin - set name = #{name,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - scene = #{scene,jdbcType=TINYINT}, - created_at = #{createdAt,jdbcType=TIMESTAMP}, - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} - where id = #{id,jdbcType=BIGINT} - + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, description, scene, created_at, updated_at, rec_status, show_type + + + + + delete from t_sys_plugin + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_plugin + + + + + + insert into t_sys_plugin (id, name, description, + scene, created_at, updated_at, + rec_status, show_type) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{scene,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}, #{showType,jdbcType=TINYINT}) + + + insert into t_sys_plugin + + + id, + + + name, + + + description, + + + scene, + + + created_at, + + + updated_at, + + + rec_status, + + + show_type, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{scene,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{showType,jdbcType=TINYINT}, + + + + + + update t_sys_plugin + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + scene = #{record.scene,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + show_type = #{record.showType,jdbcType=TINYINT}, + + + + + + + + update t_sys_plugin + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + scene = #{record.scene,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + show_type = #{record.showType,jdbcType=TINYINT} + + + + + + update t_sys_plugin + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + scene = #{scene,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + show_type = #{showType,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_plugin + set name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + scene = #{scene,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + show_type = #{showType,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysProjectLabelMapper.xml b/tall/src/main/resources/mapper_raw/SysProjectLabelMapper.xml new file mode 100644 index 00000000..720b9e27 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysProjectLabelMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, label_id, created_at, updated_at, rec_status + + + + + delete from t_sys_project_label + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_project_label + + + + + + insert into t_sys_project_label (id, project_id, label_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{labelId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_project_label + + + id, + + + project_id, + + + label_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{labelId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_project_label + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + label_id = #{record.labelId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_project_label + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + label_id = #{record.labelId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_project_label + + + project_id = #{projectId,jdbcType=BIGINT}, + + + label_id = #{labelId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_project_label + set project_id = #{projectId,jdbcType=BIGINT}, + label_id = #{labelId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysRelevanceProjectMapper.xml b/tall/src/main/resources/mapper_raw/SysRelevanceProjectMapper.xml new file mode 100644 index 00000000..5bc03772 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysRelevanceProjectMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, relevance_project_id, created_at, updated_at, rec_status + + + + + delete from t_sys_relevance_project + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_relevance_project + + + + + + insert into t_sys_relevance_project (id, project_id, relevance_project_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{relevanceProjectId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_relevance_project + + + id, + + + project_id, + + + relevance_project_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{relevanceProjectId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_relevance_project + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_relevance_project + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_relevance_project + + + project_id = #{projectId,jdbcType=BIGINT}, + + + relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_relevance_project + set project_id = #{projectId,jdbcType=BIGINT}, + relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysRingMsgMapper.xml b/tall/src/main/resources/mapper_raw/SysRingMsgMapper.xml new file mode 100644 index 00000000..62e5681d --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysRingMsgMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, value, sender_id, time, created_at, updated_at, rec_status + + + value_text + + + + + + delete from t_sys_ring_msg + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_ring_msg + + + + + + insert into t_sys_ring_msg (id, project_id, value, + sender_id, time, created_at, + updated_at, rec_status, value_text + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{value,jdbcType=VARCHAR}, + #{senderId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{valueText,jdbcType=LONGVARCHAR} + ) + + + insert into t_sys_ring_msg + + + id, + + + project_id, + + + value, + + + sender_id, + + + time, + + + created_at, + + + updated_at, + + + rec_status, + + + value_text, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{value,jdbcType=VARCHAR}, + + + #{senderId,jdbcType=BIGINT}, + + + #{time,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{valueText,jdbcType=LONGVARCHAR}, + + + + + + update t_sys_ring_msg + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + value = #{record.value,jdbcType=VARCHAR}, + + + sender_id = #{record.senderId,jdbcType=BIGINT}, + + + time = #{record.time,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + value_text = #{record.valueText,jdbcType=LONGVARCHAR}, + + + + + + + + update t_sys_ring_msg + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + value = #{record.value,jdbcType=VARCHAR}, + sender_id = #{record.senderId,jdbcType=BIGINT}, + time = #{record.time,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + value_text = #{record.valueText,jdbcType=LONGVARCHAR} + + + + + + update t_sys_ring_msg + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + value = #{record.value,jdbcType=VARCHAR}, + sender_id = #{record.senderId,jdbcType=BIGINT}, + time = #{record.time,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_ring_msg + + + project_id = #{projectId,jdbcType=BIGINT}, + + + value = #{value,jdbcType=VARCHAR}, + + + sender_id = #{senderId,jdbcType=BIGINT}, + + + time = #{time,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + value_text = #{valueText,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_ring_msg + set project_id = #{projectId,jdbcType=BIGINT}, + value = #{value,jdbcType=VARCHAR}, + sender_id = #{senderId,jdbcType=BIGINT}, + time = #{time,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + value_text = #{valueText,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=BIGINT} + + + update t_sys_ring_msg + set project_id = #{projectId,jdbcType=BIGINT}, + value = #{value,jdbcType=VARCHAR}, + sender_id = #{senderId,jdbcType=BIGINT}, + time = #{time,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysRingSendMapper.xml b/tall/src/main/resources/mapper_raw/SysRingSendMapper.xml new file mode 100644 index 00000000..b1aecccf --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysRingSendMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, ring_id, role_id, read_status, created_at, updated_at, rec_status, read_time + + + + + delete from t_sys_ring_send + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_ring_send + + + + + + insert into t_sys_ring_send (id, ring_id, role_id, + read_status, created_at, updated_at, + rec_status, read_time) + values (#{id,jdbcType=BIGINT}, #{ringId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, + #{readStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}, #{readTime,jdbcType=BIGINT}) + + + insert into t_sys_ring_send + + + id, + + + ring_id, + + + role_id, + + + read_status, + + + created_at, + + + updated_at, + + + rec_status, + + + read_time, + + + + + #{id,jdbcType=BIGINT}, + + + #{ringId,jdbcType=BIGINT}, + + + #{roleId,jdbcType=BIGINT}, + + + #{readStatus,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + #{readTime,jdbcType=BIGINT}, + + + + + + update t_sys_ring_send + + + id = #{record.id,jdbcType=BIGINT}, + + + ring_id = #{record.ringId,jdbcType=BIGINT}, + + + role_id = #{record.roleId,jdbcType=BIGINT}, + + + read_status = #{record.readStatus,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + read_time = #{record.readTime,jdbcType=BIGINT}, + + + + + + + + update t_sys_ring_send + set id = #{record.id,jdbcType=BIGINT}, + ring_id = #{record.ringId,jdbcType=BIGINT}, + role_id = #{record.roleId,jdbcType=BIGINT}, + read_status = #{record.readStatus,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT}, + read_time = #{record.readTime,jdbcType=BIGINT} + + + + + + update t_sys_ring_send + + + ring_id = #{ringId,jdbcType=BIGINT}, + + + role_id = #{roleId,jdbcType=BIGINT}, + + + read_status = #{readStatus,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + read_time = #{readTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_ring_send + set ring_id = #{ringId,jdbcType=BIGINT}, + role_id = #{roleId,jdbcType=BIGINT}, + read_status = #{readStatus,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT}, + read_time = #{readTime,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysUserInfoMapper.xml b/tall/src/main/resources/mapper_raw/SysUserInfoMapper.xml new file mode 100644 index 00000000..9cc0dd28 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysUserInfoMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, signature, introduction, birthday, address, web_path, company, position, + created_at, updated_at, rec_status + + + + + delete from t_sys_user_info + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_user_info + + + + + + insert into t_sys_user_info (id, user_id, signature, + introduction, birthday, address, + web_path, company, position, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{signature,jdbcType=VARCHAR}, + #{introduction,jdbcType=VARCHAR}, #{birthday,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, + #{webPath,jdbcType=VARCHAR}, #{company,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_user_info + + + id, + + + user_id, + + + signature, + + + introduction, + + + birthday, + + + address, + + + web_path, + + + company, + + + position, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{signature,jdbcType=VARCHAR}, + + + #{introduction,jdbcType=VARCHAR}, + + + #{birthday,jdbcType=VARCHAR}, + + + #{address,jdbcType=VARCHAR}, + + + #{webPath,jdbcType=VARCHAR}, + + + #{company,jdbcType=VARCHAR}, + + + #{position,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_user_info + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + signature = #{record.signature,jdbcType=VARCHAR}, + + + introduction = #{record.introduction,jdbcType=VARCHAR}, + + + birthday = #{record.birthday,jdbcType=VARCHAR}, + + + address = #{record.address,jdbcType=VARCHAR}, + + + web_path = #{record.webPath,jdbcType=VARCHAR}, + + + company = #{record.company,jdbcType=VARCHAR}, + + + position = #{record.position,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_user_info + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + signature = #{record.signature,jdbcType=VARCHAR}, + introduction = #{record.introduction,jdbcType=VARCHAR}, + birthday = #{record.birthday,jdbcType=VARCHAR}, + address = #{record.address,jdbcType=VARCHAR}, + web_path = #{record.webPath,jdbcType=VARCHAR}, + company = #{record.company,jdbcType=VARCHAR}, + position = #{record.position,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_user_info + + + user_id = #{userId,jdbcType=BIGINT}, + + + signature = #{signature,jdbcType=VARCHAR}, + + + introduction = #{introduction,jdbcType=VARCHAR}, + + + birthday = #{birthday,jdbcType=VARCHAR}, + + + address = #{address,jdbcType=VARCHAR}, + + + web_path = #{webPath,jdbcType=VARCHAR}, + + + company = #{company,jdbcType=VARCHAR}, + + + position = #{position,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_user_info + set user_id = #{userId,jdbcType=BIGINT}, + signature = #{signature,jdbcType=VARCHAR}, + introduction = #{introduction,jdbcType=VARCHAR}, + birthday = #{birthday,jdbcType=VARCHAR}, + address = #{address,jdbcType=VARCHAR}, + web_path = #{webPath,jdbcType=VARCHAR}, + company = #{company,jdbcType=VARCHAR}, + position = #{position,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/WpsFileMapper.xml b/tall/src/main/resources/mapper_raw/WpsFileMapper.xml new file mode 100644 index 00000000..8293225f --- /dev/null +++ b/tall/src/main/resources/mapper_raw/WpsFileMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, current_version, name, size, download_url, save_url, creator, modifier, created_at, + updated_at, rec_status + + + + + delete from t_wps_file + where id = #{id,jdbcType=BIGINT} + + + delete from t_wps_file + + + + + + insert into t_wps_file (id, current_version, name, + size, download_url, save_url, + creator, modifier, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{currentVersion,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, + #{size,jdbcType=BIGINT}, #{downloadUrl,jdbcType=VARCHAR}, #{saveUrl,jdbcType=VARCHAR}, + #{creator,jdbcType=BIGINT}, #{modifier,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_wps_file + + + id, + + + current_version, + + + name, + + + size, + + + download_url, + + + save_url, + + + creator, + + + modifier, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{currentVersion,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{size,jdbcType=BIGINT}, + + + #{downloadUrl,jdbcType=VARCHAR}, + + + #{saveUrl,jdbcType=VARCHAR}, + + + #{creator,jdbcType=BIGINT}, + + + #{modifier,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wps_file + + + id = #{record.id,jdbcType=BIGINT}, + + + current_version = #{record.currentVersion,jdbcType=INTEGER}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + size = #{record.size,jdbcType=BIGINT}, + + + download_url = #{record.downloadUrl,jdbcType=VARCHAR}, + + + save_url = #{record.saveUrl,jdbcType=VARCHAR}, + + + creator = #{record.creator,jdbcType=BIGINT}, + + + modifier = #{record.modifier,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_wps_file + set id = #{record.id,jdbcType=BIGINT}, + current_version = #{record.currentVersion,jdbcType=INTEGER}, + name = #{record.name,jdbcType=VARCHAR}, + size = #{record.size,jdbcType=BIGINT}, + download_url = #{record.downloadUrl,jdbcType=VARCHAR}, + save_url = #{record.saveUrl,jdbcType=VARCHAR}, + creator = #{record.creator,jdbcType=BIGINT}, + modifier = #{record.modifier,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_wps_file + + + current_version = #{currentVersion,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + size = #{size,jdbcType=BIGINT}, + + + download_url = #{downloadUrl,jdbcType=VARCHAR}, + + + save_url = #{saveUrl,jdbcType=VARCHAR}, + + + creator = #{creator,jdbcType=BIGINT}, + + + modifier = #{modifier,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_wps_file + set current_version = #{currentVersion,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + size = #{size,jdbcType=BIGINT}, + download_url = #{downloadUrl,jdbcType=VARCHAR}, + save_url = #{saveUrl,jdbcType=VARCHAR}, + creator = #{creator,jdbcType=BIGINT}, + modifier = #{modifier,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/WpsFileUserMapper.xml b/tall/src/main/resources/mapper_raw/WpsFileUserMapper.xml new file mode 100644 index 00000000..b2559f92 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/WpsFileUserMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, version_id, operation, created_at, updated_at, rec_status + + + + + delete from t_wps_file_user + where id = #{id,jdbcType=BIGINT} + + + delete from t_wps_file_user + + + + + + insert into t_wps_file_user (id, user_id, version_id, + operation, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{versionId,jdbcType=BIGINT}, + #{operation,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_wps_file_user + + + id, + + + user_id, + + + version_id, + + + operation, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{versionId,jdbcType=BIGINT}, + + + #{operation,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wps_file_user + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + version_id = #{record.versionId,jdbcType=BIGINT}, + + + operation = #{record.operation,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_wps_file_user + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + version_id = #{record.versionId,jdbcType=BIGINT}, + operation = #{record.operation,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_wps_file_user + + + user_id = #{userId,jdbcType=BIGINT}, + + + version_id = #{versionId,jdbcType=BIGINT}, + + + operation = #{operation,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_wps_file_user + set user_id = #{userId,jdbcType=BIGINT}, + version_id = #{versionId,jdbcType=BIGINT}, + operation = #{operation,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/WpsFileVersionMapper.xml b/tall/src/main/resources/mapper_raw/WpsFileVersionMapper.xml new file mode 100644 index 00000000..d9bc3a23 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/WpsFileVersionMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, file_id, version, name, size, download_url, save_url, modifier, created_at, updated_at, + rec_status + + + + + delete from t_wps_file_version + where id = #{id,jdbcType=BIGINT} + + + delete from t_wps_file_version + + + + + + insert into t_wps_file_version (id, file_id, version, + name, size, download_url, + save_url, modifier, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT}, #{version,jdbcType=INTEGER}, + #{name,jdbcType=VARCHAR}, #{size,jdbcType=BIGINT}, #{downloadUrl,jdbcType=VARCHAR}, + #{saveUrl,jdbcType=VARCHAR}, #{modifier,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_wps_file_version + + + id, + + + file_id, + + + version, + + + name, + + + size, + + + download_url, + + + save_url, + + + modifier, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{fileId,jdbcType=BIGINT}, + + + #{version,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{size,jdbcType=BIGINT}, + + + #{downloadUrl,jdbcType=VARCHAR}, + + + #{saveUrl,jdbcType=VARCHAR}, + + + #{modifier,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wps_file_version + + + id = #{record.id,jdbcType=BIGINT}, + + + file_id = #{record.fileId,jdbcType=BIGINT}, + + + version = #{record.version,jdbcType=INTEGER}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + size = #{record.size,jdbcType=BIGINT}, + + + download_url = #{record.downloadUrl,jdbcType=VARCHAR}, + + + save_url = #{record.saveUrl,jdbcType=VARCHAR}, + + + modifier = #{record.modifier,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_wps_file_version + set id = #{record.id,jdbcType=BIGINT}, + file_id = #{record.fileId,jdbcType=BIGINT}, + version = #{record.version,jdbcType=INTEGER}, + name = #{record.name,jdbcType=VARCHAR}, + size = #{record.size,jdbcType=BIGINT}, + download_url = #{record.downloadUrl,jdbcType=VARCHAR}, + save_url = #{record.saveUrl,jdbcType=VARCHAR}, + modifier = #{record.modifier,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_wps_file_version + + + file_id = #{fileId,jdbcType=BIGINT}, + + + version = #{version,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + size = #{size,jdbcType=BIGINT}, + + + download_url = #{downloadUrl,jdbcType=VARCHAR}, + + + save_url = #{saveUrl,jdbcType=VARCHAR}, + + + modifier = #{modifier,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_wps_file_version + set file_id = #{fileId,jdbcType=BIGINT}, + version = #{version,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + size = #{size,jdbcType=BIGINT}, + download_url = #{downloadUrl,jdbcType=VARCHAR}, + save_url = #{saveUrl,jdbcType=VARCHAR}, + modifier = #{modifier,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/WpsNotifyMapper.xml b/tall/src/main/resources/mapper_raw/WpsNotifyMapper.xml new file mode 100644 index 00000000..89f01ec9 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/WpsNotifyMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, cmd, body, created_at, updated_at, rec_status + + + + + delete from t_wps_notify + where id = #{id,jdbcType=BIGINT} + + + delete from t_wps_notify + + + + + + insert into t_wps_notify (id, cmd, body, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{cmd,jdbcType=VARCHAR}, #{body,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_wps_notify + + + id, + + + cmd, + + + body, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{cmd,jdbcType=VARCHAR}, + + + #{body,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wps_notify + + + id = #{record.id,jdbcType=BIGINT}, + + + cmd = #{record.cmd,jdbcType=VARCHAR}, + + + body = #{record.body,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_sta Internal Server Error - ccsenscloud - Gitea: Shan Xi Inference co.,ltd

500


Gitea Version: 1.15.6