From d564926a3701bc03b446739fbb13bafaa248dad8 Mon Sep 17 00:00:00 2001 From: zhangye <654600784@qq.com> Date: Tue, 24 Dec 2019 15:22:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0game=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/.mvn/wrapper/MavenWrapperDownloader.java | 117 ++ game/.mvn/wrapper/maven-wrapper.properties | 2 + game/pom.xml | 63 + .../java/com/ccsens/game/GameApplication.java | 19 + .../com/ccsens/game/api/ClientController.java | 12 + .../com/ccsens/game/api/DebugController.java | 28 + .../com/ccsens/game/api/ScreenController.java | 69 + .../com/ccsens/game/bean/dto/ScreenDto.java | 61 + .../game/bean/po/GameActivityPrize.java | 95 + .../bean/po/GameActivityPrizeExample.java | 631 +++++++ .../ccsens/game/bean/po/GameActivityRule.java | 95 + .../game/bean/po/GameActivityRuleExample.java | 631 +++++++ .../com/ccsens/game/bean/po/GameMember.java | 249 +++ .../game/bean/po/GameMemberExample.java | 1571 +++++++++++++++++ .../ccsens/game/bean/po/GameMemberJoin.java | 106 ++ .../game/bean/po/GameMemberJoinExample.java | 701 ++++++++ .../game/bean/po/GamePrizeInstructions.java | 95 + .../bean/po/GamePrizeInstructionsExample.java | 631 +++++++ .../com/ccsens/game/bean/po/GameRecord.java | 128 ++ .../game/bean/po/GameRecordExample.java | 821 +++++++++ .../com/ccsens/game/bean/po/GameScoreLog.java | 95 + .../game/bean/po/GameScoreLogExample.java | 621 +++++++ .../com/ccsens/game/bean/po/GameType.java | 106 ++ .../ccsens/game/bean/po/GameTypeExample.java | 721 ++++++++ .../ccsens/game/bean/po/GameTypeMember.java | 128 ++ .../game/bean/po/GameTypeMemberExample.java | 801 +++++++++ .../com/ccsens/game/config/BeanConfig.java | 34 + .../com/ccsens/game/config/SpringConfig.java | 164 ++ .../ccsens/game/config/SwaggerConfigure.java | 56 + .../ccsens/game/config/TokenInterceptor.java | 78 + .../game/intercept/MybatisInterceptor.java | 154 ++ .../mapper/GameActivityPrizeMapper.java | 30 + .../mapper/GameActivityRuleMapper.java | 30 + .../persist/mapper/GameMemberJoinMapper.java | 30 + .../game/persist/mapper/GameMemberMapper.java | 30 + .../mapper/GamePrizeInstructionsMapper.java | 30 + .../game/persist/mapper/GameRecordMapper.java | 30 + .../persist/mapper/GameScoreLogMapper.java | 30 + .../game/persist/mapper/GameTypeMapper.java | 30 + .../persist/mapper/GameTypeMemberMapper.java | 30 + .../src/main/resources/application-common.yml | 30 + game/src/main/resources/application-dev.yml | 29 + game/src/main/resources/application-test.yml | 28 + game/src/main/resources/application.yml | 4 + game/src/main/resources/druid-dev.yml | 33 + game/src/main/resources/druid-prod.yml | 33 + game/src/main/resources/druid-test.yml | 33 + game/src/main/resources/logback-spring.xml | 196 ++ .../mapper_raw/GameActivityPrizeMapper.xml | 243 +++ .../mapper_raw/GameActivityRuleMapper.xml | 243 +++ .../mapper_raw/GameMemberJoinMapper.xml | 258 +++ .../resources/mapper_raw/GameMemberMapper.xml | 465 +++++ .../GamePrizeInstructionsMapper.xml | 243 +++ .../resources/mapper_raw/GameRecordMapper.xml | 291 +++ .../mapper_raw/GameScoreLogMapper.xml | 243 +++ .../resources/mapper_raw/GameTypeMapper.xml | 258 +++ .../mapper_raw/GameTypeMemberMapper.xml | 291 +++ game/src/main/resources/mbg.xml | 73 + .../main/resources/mybatis/mybatis-config.xml | 61 + .../com/ccsens/game/GameApplicationTests.java | 15 + pom.xml | 1 + .../MasterStatusMessageWithReportDto.java | 2 +- .../com/ccsens/tall/bean/vo/ProjectVo.java | 2 + .../com/ccsens/tall/config/SpringConfig.java | 10 +- .../ccsens/tall/service/ExcelMtService.java | 1106 ++++++++++++ .../ccsens/tall/service/IExcelMtService.java | 8 + .../ccsens/tall/service/IExcelService.java | 1 - .../ccsens/tall/service/ProjectService.java | 4 + .../tall/service/TaskDeliverService.java | 12 +- .../tall/service/TaskSubTimeService.java | 1 + .../com/ccsens/tall/web/DebugController.java | 6 +- .../resources/mapper_dao/SysProjectDao.xml | 2 +- .../test/java/com/ccsens/util/KeyTest.java | 14 +- 73 files changed, 13572 insertions(+), 20 deletions(-) create mode 100644 game/.mvn/wrapper/MavenWrapperDownloader.java create mode 100644 game/.mvn/wrapper/maven-wrapper.properties create mode 100644 game/pom.xml create mode 100644 game/src/main/java/com/ccsens/game/GameApplication.java create mode 100644 game/src/main/java/com/ccsens/game/api/ClientController.java create mode 100644 game/src/main/java/com/ccsens/game/api/DebugController.java create mode 100644 game/src/main/java/com/ccsens/game/api/ScreenController.java create mode 100644 game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameActivityPrize.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameActivityPrizeExample.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameActivityRule.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameActivityRuleExample.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameMember.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameMemberExample.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameMemberJoin.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameMemberJoinExample.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GamePrizeInstructions.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GamePrizeInstructionsExample.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameRecord.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameScoreLog.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameScoreLogExample.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameType.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameTypeMember.java create mode 100644 game/src/main/java/com/ccsens/game/bean/po/GameTypeMemberExample.java create mode 100644 game/src/main/java/com/ccsens/game/config/BeanConfig.java create mode 100644 game/src/main/java/com/ccsens/game/config/SpringConfig.java create mode 100644 game/src/main/java/com/ccsens/game/config/SwaggerConfigure.java create mode 100644 game/src/main/java/com/ccsens/game/config/TokenInterceptor.java create mode 100644 game/src/main/java/com/ccsens/game/intercept/MybatisInterceptor.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameActivityPrizeMapper.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameActivityRuleMapper.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameMemberJoinMapper.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameMemberMapper.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GamePrizeInstructionsMapper.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameRecordMapper.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameScoreLogMapper.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMapper.java create mode 100644 game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMemberMapper.java create mode 100644 game/src/main/resources/application-common.yml create mode 100644 game/src/main/resources/application-dev.yml create mode 100644 game/src/main/resources/application-test.yml create mode 100644 game/src/main/resources/application.yml create mode 100644 game/src/main/resources/druid-dev.yml create mode 100644 game/src/main/resources/druid-prod.yml create mode 100644 game/src/main/resources/druid-test.yml create mode 100644 game/src/main/resources/logback-spring.xml create mode 100644 game/src/main/resources/mapper_raw/GameActivityPrizeMapper.xml create mode 100644 game/src/main/resources/mapper_raw/GameActivityRuleMapper.xml create mode 100644 game/src/main/resources/mapper_raw/GameMemberJoinMapper.xml create mode 100644 game/src/main/resources/mapper_raw/GameMemberMapper.xml create mode 100644 game/src/main/resources/mapper_raw/GamePrizeInstructionsMapper.xml create mode 100644 game/src/main/resources/mapper_raw/GameRecordMapper.xml create mode 100644 game/src/main/resources/mapper_raw/GameScoreLogMapper.xml create mode 100644 game/src/main/resources/mapper_raw/GameTypeMapper.xml create mode 100644 game/src/main/resources/mapper_raw/GameTypeMemberMapper.xml create mode 100644 game/src/main/resources/mbg.xml create mode 100644 game/src/main/resources/mybatis/mybatis-config.xml create mode 100644 game/src/test/java/com/ccsens/game/GameApplicationTests.java create mode 100644 tall/src/main/java/com/ccsens/tall/service/ExcelMtService.java create mode 100644 tall/src/main/java/com/ccsens/tall/service/IExcelMtService.java diff --git a/game/.mvn/wrapper/MavenWrapperDownloader.java b/game/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..22810754 --- /dev/null +++ b/game/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2012-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.5"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/game/.mvn/wrapper/maven-wrapper.properties b/game/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..7d59a01f --- /dev/null +++ b/game/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar diff --git a/game/pom.xml b/game/pom.xml new file mode 100644 index 00000000..bd46e353 --- /dev/null +++ b/game/pom.xml @@ -0,0 +1,63 @@ + + + + ccsenscloud + com.ccsens + 1.0-SNAPSHOT + + 4.0.0 + + game + + + 1.8 + + + + + + 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.ht.HtApplication + + + + + + repackage + + + + + + + + + diff --git a/game/src/main/java/com/ccsens/game/GameApplication.java b/game/src/main/java/com/ccsens/game/GameApplication.java new file mode 100644 index 00000000..393a6c1b --- /dev/null +++ b/game/src/main/java/com/ccsens/game/GameApplication.java @@ -0,0 +1,19 @@ +package com.ccsens.game; + +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.scheduling.annotation.EnableAsync; + +@MapperScan(basePackages = {"com.ccsens.game.persist.*"}) +@ServletComponentScan +@EnableAsync +@SpringBootApplication(scanBasePackages = "com.ccsens") +public class GameApplication { + + public static void main(String[] args) { + SpringApplication.run(GameApplication.class, args); + } + +} diff --git a/game/src/main/java/com/ccsens/game/api/ClientController.java b/game/src/main/java/com/ccsens/game/api/ClientController.java new file mode 100644 index 00000000..bc7914a7 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/api/ClientController.java @@ -0,0 +1,12 @@ +package com.ccsens.game.api; + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Api(tags = "客户端相关api" , description = "ClientController") +@RestController +@RequestMapping("/client") +public class ClientController { + +} diff --git a/game/src/main/java/com/ccsens/game/api/DebugController.java b/game/src/main/java/com/ccsens/game/api/DebugController.java new file mode 100644 index 00000000..aaf780dd --- /dev/null +++ b/game/src/main/java/com/ccsens/game/api/DebugController.java @@ -0,0 +1,28 @@ +package com.ccsens.game.api; + +import com.ccsens.util.JsonResponse; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +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; + +@Api(tags = "DEBUG" , description = "DebugController | ") +@RestController +@RequestMapping("/debug") +public class DebugController { + + @ApiOperation(value = "/测试",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) + public JsonResponse getSmsCode(HttpServletRequest request) throws Exception { + + return JsonResponse.newInstance().ok("测试"); + } + + +} diff --git a/game/src/main/java/com/ccsens/game/api/ScreenController.java b/game/src/main/java/com/ccsens/game/api/ScreenController.java new file mode 100644 index 00000000..c498fea9 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/api/ScreenController.java @@ -0,0 +1,69 @@ +package com.ccsens.game.api; + +import com.ccsens.game.bean.dto.ScreenDto; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import io.jsonwebtoken.Claims; +import io.swagger.annotations.*; +import lombok.extern.log4j.Log4j; +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; +import javax.validation.Valid; + +@Slf4j +@Api(tags = "大屏相关api" , description = "ScreenController") +@RestController +@RequestMapping("/screen") +public class ScreenController { + + + @ApiOperation(value = "获取大屏路径", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "url", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getScreenUrl(HttpServletRequest request, + @ApiParam @Validated @RequestBody ScreenDto.MemberGame memberGame) throws Exception { + log.info("获取大屏路径:{}",memberGame); + + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "获取游戏基本信息", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getGameInfo(HttpServletRequest request, + @ApiParam @Validated @RequestBody ScreenDto.MemberRecord memberRecord) throws Exception { + log.info("获取游戏基本信息:{}",memberRecord); + + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "获取游戏的状态", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getGameStatus(HttpServletRequest request, + @ApiParam @Validated @RequestBody ScreenDto.MemberRecord memberRecord) throws Exception { + log.info("获取游戏的状态:{}",memberRecord); + + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "开始游戏", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse startGame(HttpServletRequest request, + @ApiParam @Validated @RequestBody ScreenDto.MemberRecordAndTime memberRecordAndTime) throws Exception { + log.info("开始游戏:{}",memberRecordAndTime); + + return JsonResponse.newInstance().ok(); + } +} 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 new file mode 100644 index 00000000..99d8aa8d --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java @@ -0,0 +1,61 @@ +package com.ccsens.game.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class ScreenDto { + @Data + @ApiModel + public static class MemberGame{ + @ApiModelProperty("是否关注") + private Byte subscribe; + @ApiModelProperty("用户的标识,对当前公众号唯一") + private String openid; + @ApiModelProperty("只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段。") + private String unionid; + @ApiModelProperty("微信名") + private String nickname; + @ApiModelProperty("头像") + private String headimgurl; + @ApiModelProperty("性别") + private Byte sex; + @ApiModelProperty("语言") + private String language; + @ApiModelProperty("城市") + private String city; + @ApiModelProperty("省份") + private String province; + @ApiModelProperty("国家") + private String country; + @ApiModelProperty("用户关注的时间") + private Long subscribeTime; + @ApiModelProperty("对粉丝的备注") + private String remark; + @ApiModelProperty("所在分组的id") + private Long groupid; + @ApiModelProperty("用户关注的渠道来源") + private String subscribeScene; + @ApiModelProperty("二维码扫码场景") + private Long qrScene; + @ApiModelProperty("二维码扫码场景描述") + private String qrSceneStr; + } + + @Data + @ApiModel + public static class MemberRecord{ + @ApiModelProperty("创建的游戏记录的id") + private Long memberRecord; + } + + @Data + @ApiModel + public static class MemberRecordAndTime{ + @ApiModelProperty("创建的游戏记录的id") + private Long memberRecord; + @ApiModelProperty("本地时间") + private Long localTime; + } +} diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameActivityPrize.java b/game/src/main/java/com/ccsens/game/bean/po/GameActivityPrize.java new file mode 100644 index 00000000..4ce044b4 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameActivityPrize.java @@ -0,0 +1,95 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameActivityPrize implements Serializable { + private Long id; + + private Long gameId; + + private Integer sequence; + + 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 getGameId() { + return gameId; + } + + public void setGameId(Long gameId) { + this.gameId = gameId; + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + 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(", gameId=").append(gameId); + sb.append(", sequence=").append(sequence); + 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/game/src/main/java/com/ccsens/game/bean/po/GameActivityPrizeExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameActivityPrizeExample.java new file mode 100644 index 00000000..77fed8d0 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameActivityPrizeExample.java @@ -0,0 +1,631 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameActivityPrizeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameActivityPrizeExample() { + 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 andGameIdIsNull() { + addCriterion("game_id is null"); + return (Criteria) this; + } + + public Criteria andGameIdIsNotNull() { + addCriterion("game_id is not null"); + return (Criteria) this; + } + + public Criteria andGameIdEqualTo(Long value) { + addCriterion("game_id =", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdNotEqualTo(Long value) { + addCriterion("game_id <>", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdGreaterThan(Long value) { + addCriterion("game_id >", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdGreaterThanOrEqualTo(Long value) { + addCriterion("game_id >=", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdLessThan(Long value) { + addCriterion("game_id <", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdLessThanOrEqualTo(Long value) { + addCriterion("game_id <=", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdIn(List values) { + addCriterion("game_id in", values, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdNotIn(List values) { + addCriterion("game_id not in", values, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdBetween(Long value1, Long value2) { + addCriterion("game_id between", value1, value2, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdNotBetween(Long value1, Long value2) { + addCriterion("game_id not between", value1, value2, "gameId"); + 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 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/game/src/main/java/com/ccsens/game/bean/po/GameActivityRule.java b/game/src/main/java/com/ccsens/game/bean/po/GameActivityRule.java new file mode 100644 index 00000000..53860105 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameActivityRule.java @@ -0,0 +1,95 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameActivityRule implements Serializable { + private Long id; + + private Long gameId; + + private Integer sequence; + + 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 getGameId() { + return gameId; + } + + public void setGameId(Long gameId) { + this.gameId = gameId; + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + 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(", gameId=").append(gameId); + sb.append(", sequence=").append(sequence); + 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/game/src/main/java/com/ccsens/game/bean/po/GameActivityRuleExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameActivityRuleExample.java new file mode 100644 index 00000000..a14a2649 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameActivityRuleExample.java @@ -0,0 +1,631 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameActivityRuleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameActivityRuleExample() { + 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 andGameIdIsNull() { + addCriterion("game_id is null"); + return (Criteria) this; + } + + public Criteria andGameIdIsNotNull() { + addCriterion("game_id is not null"); + return (Criteria) this; + } + + public Criteria andGameIdEqualTo(Long value) { + addCriterion("game_id =", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdNotEqualTo(Long value) { + addCriterion("game_id <>", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdGreaterThan(Long value) { + addCriterion("game_id >", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdGreaterThanOrEqualTo(Long value) { + addCriterion("game_id >=", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdLessThan(Long value) { + addCriterion("game_id <", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdLessThanOrEqualTo(Long value) { + addCriterion("game_id <=", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdIn(List values) { + addCriterion("game_id in", values, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdNotIn(List values) { + addCriterion("game_id not in", values, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdBetween(Long value1, Long value2) { + addCriterion("game_id between", value1, value2, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdNotBetween(Long value1, Long value2) { + addCriterion("game_id not between", value1, value2, "gameId"); + 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 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/game/src/main/java/com/ccsens/game/bean/po/GameMember.java b/game/src/main/java/com/ccsens/game/bean/po/GameMember.java new file mode 100644 index 00000000..5de210c2 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameMember.java @@ -0,0 +1,249 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameMember implements Serializable { + private Long id; + + private Byte grade; + + private Byte subscribe; + + private String openid; + + private String unionid; + + private String nickname; + + private String headimgurl; + + private Byte sex; + + private String language; + + private String city; + + private String province; + + private String country; + + private Long subscribeTime; + + private String remark; + + private Long groupid; + + private String subscribeScene; + + private Long qrScene; + + private String qrSceneStr; + + 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 Byte getGrade() { + return grade; + } + + public void setGrade(Byte grade) { + this.grade = grade; + } + + public Byte getSubscribe() { + return subscribe; + } + + public void setSubscribe(Byte subscribe) { + this.subscribe = subscribe; + } + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid == null ? null : openid.trim(); + } + + public String getUnionid() { + return unionid; + } + + public void setUnionid(String unionid) { + this.unionid = unionid == null ? null : unionid.trim(); + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname == null ? null : nickname.trim(); + } + + public String getHeadimgurl() { + return headimgurl; + } + + public void setHeadimgurl(String headimgurl) { + this.headimgurl = headimgurl == null ? null : headimgurl.trim(); + } + + public Byte getSex() { + return sex; + } + + public void setSex(Byte sex) { + this.sex = sex; + } + + public String getLanguage() { + return language; + } + + public void setLanguage(String language) { + this.language = language == null ? null : language.trim(); + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city == null ? null : city.trim(); + } + + public String getProvince() { + return province; + } + + public void setProvince(String province) { + this.province = province == null ? null : province.trim(); + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country == null ? null : country.trim(); + } + + public Long getSubscribeTime() { + return subscribeTime; + } + + public void setSubscribeTime(Long subscribeTime) { + this.subscribeTime = subscribeTime; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Long getGroupid() { + return groupid; + } + + public void setGroupid(Long groupid) { + this.groupid = groupid; + } + + public String getSubscribeScene() { + return subscribeScene; + } + + public void setSubscribeScene(String subscribeScene) { + this.subscribeScene = subscribeScene == null ? null : subscribeScene.trim(); + } + + public Long getQrScene() { + return qrScene; + } + + public void setQrScene(Long qrScene) { + this.qrScene = qrScene; + } + + public String getQrSceneStr() { + return qrSceneStr; + } + + public void setQrSceneStr(String qrSceneStr) { + this.qrSceneStr = qrSceneStr == null ? null : qrSceneStr.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(", grade=").append(grade); + sb.append(", subscribe=").append(subscribe); + sb.append(", openid=").append(openid); + sb.append(", unionid=").append(unionid); + sb.append(", nickname=").append(nickname); + sb.append(", headimgurl=").append(headimgurl); + sb.append(", sex=").append(sex); + sb.append(", language=").append(language); + sb.append(", city=").append(city); + sb.append(", province=").append(province); + sb.append(", country=").append(country); + sb.append(", subscribeTime=").append(subscribeTime); + sb.append(", remark=").append(remark); + sb.append(", groupid=").append(groupid); + sb.append(", subscribeScene=").append(subscribeScene); + sb.append(", qrScene=").append(qrScene); + sb.append(", qrSceneStr=").append(qrSceneStr); + 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/game/src/main/java/com/ccsens/game/bean/po/GameMemberExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameMemberExample.java new file mode 100644 index 00000000..e5897f8d --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameMemberExample.java @@ -0,0 +1,1571 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameMemberExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameMemberExample() { + 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 andGradeIsNull() { + addCriterion("grade is null"); + return (Criteria) this; + } + + public Criteria andGradeIsNotNull() { + addCriterion("grade is not null"); + return (Criteria) this; + } + + public Criteria andGradeEqualTo(Byte value) { + addCriterion("grade =", value, "grade"); + return (Criteria) this; + } + + public Criteria andGradeNotEqualTo(Byte value) { + addCriterion("grade <>", value, "grade"); + return (Criteria) this; + } + + public Criteria andGradeGreaterThan(Byte value) { + addCriterion("grade >", value, "grade"); + return (Criteria) this; + } + + public Criteria andGradeGreaterThanOrEqualTo(Byte value) { + addCriterion("grade >=", value, "grade"); + return (Criteria) this; + } + + public Criteria andGradeLessThan(Byte value) { + addCriterion("grade <", value, "grade"); + return (Criteria) this; + } + + public Criteria andGradeLessThanOrEqualTo(Byte value) { + addCriterion("grade <=", value, "grade"); + return (Criteria) this; + } + + public Criteria andGradeIn(List values) { + addCriterion("grade in", values, "grade"); + return (Criteria) this; + } + + public Criteria andGradeNotIn(List values) { + addCriterion("grade not in", values, "grade"); + return (Criteria) this; + } + + public Criteria andGradeBetween(Byte value1, Byte value2) { + addCriterion("grade between", value1, value2, "grade"); + return (Criteria) this; + } + + public Criteria andGradeNotBetween(Byte value1, Byte value2) { + addCriterion("grade not between", value1, value2, "grade"); + return (Criteria) this; + } + + public Criteria andSubscribeIsNull() { + addCriterion("subscribe is null"); + return (Criteria) this; + } + + public Criteria andSubscribeIsNotNull() { + addCriterion("subscribe is not null"); + return (Criteria) this; + } + + public Criteria andSubscribeEqualTo(Byte value) { + addCriterion("subscribe =", value, "subscribe"); + return (Criteria) this; + } + + public Criteria andSubscribeNotEqualTo(Byte value) { + addCriterion("subscribe <>", value, "subscribe"); + return (Criteria) this; + } + + public Criteria andSubscribeGreaterThan(Byte value) { + addCriterion("subscribe >", value, "subscribe"); + return (Criteria) this; + } + + public Criteria andSubscribeGreaterThanOrEqualTo(Byte value) { + addCriterion("subscribe >=", value, "subscribe"); + return (Criteria) this; + } + + public Criteria andSubscribeLessThan(Byte value) { + addCriterion("subscribe <", value, "subscribe"); + return (Criteria) this; + } + + public Criteria andSubscribeLessThanOrEqualTo(Byte value) { + addCriterion("subscribe <=", value, "subscribe"); + return (Criteria) this; + } + + public Criteria andSubscribeIn(List values) { + addCriterion("subscribe in", values, "subscribe"); + return (Criteria) this; + } + + public Criteria andSubscribeNotIn(List values) { + addCriterion("subscribe not in", values, "subscribe"); + return (Criteria) this; + } + + public Criteria andSubscribeBetween(Byte value1, Byte value2) { + addCriterion("subscribe between", value1, value2, "subscribe"); + return (Criteria) this; + } + + public Criteria andSubscribeNotBetween(Byte value1, Byte value2) { + addCriterion("subscribe not between", value1, value2, "subscribe"); + return (Criteria) this; + } + + public Criteria andOpenidIsNull() { + addCriterion("openid is null"); + return (Criteria) this; + } + + public Criteria andOpenidIsNotNull() { + addCriterion("openid is not null"); + return (Criteria) this; + } + + public Criteria andOpenidEqualTo(String value) { + addCriterion("openid =", value, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidNotEqualTo(String value) { + addCriterion("openid <>", value, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidGreaterThan(String value) { + addCriterion("openid >", value, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidGreaterThanOrEqualTo(String value) { + addCriterion("openid >=", value, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidLessThan(String value) { + addCriterion("openid <", value, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidLessThanOrEqualTo(String value) { + addCriterion("openid <=", value, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidLike(String value) { + addCriterion("openid like", value, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidNotLike(String value) { + addCriterion("openid not like", value, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidIn(List values) { + addCriterion("openid in", values, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidNotIn(List values) { + addCriterion("openid not in", values, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidBetween(String value1, String value2) { + addCriterion("openid between", value1, value2, "openid"); + return (Criteria) this; + } + + public Criteria andOpenidNotBetween(String value1, String value2) { + addCriterion("openid not between", value1, value2, "openid"); + return (Criteria) this; + } + + public Criteria andUnionidIsNull() { + addCriterion("unionid is null"); + return (Criteria) this; + } + + public Criteria andUnionidIsNotNull() { + addCriterion("unionid is not null"); + return (Criteria) this; + } + + public Criteria andUnionidEqualTo(String value) { + addCriterion("unionid =", value, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidNotEqualTo(String value) { + addCriterion("unionid <>", value, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidGreaterThan(String value) { + addCriterion("unionid >", value, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidGreaterThanOrEqualTo(String value) { + addCriterion("unionid >=", value, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidLessThan(String value) { + addCriterion("unionid <", value, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidLessThanOrEqualTo(String value) { + addCriterion("unionid <=", value, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidLike(String value) { + addCriterion("unionid like", value, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidNotLike(String value) { + addCriterion("unionid not like", value, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidIn(List values) { + addCriterion("unionid in", values, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidNotIn(List values) { + addCriterion("unionid not in", values, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidBetween(String value1, String value2) { + addCriterion("unionid between", value1, value2, "unionid"); + return (Criteria) this; + } + + public Criteria andUnionidNotBetween(String value1, String value2) { + addCriterion("unionid not between", value1, value2, "unionid"); + return (Criteria) this; + } + + public Criteria andNicknameIsNull() { + addCriterion("nickname is null"); + return (Criteria) this; + } + + public Criteria andNicknameIsNotNull() { + addCriterion("nickname is not null"); + return (Criteria) this; + } + + public Criteria andNicknameEqualTo(String value) { + addCriterion("nickname =", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameNotEqualTo(String value) { + addCriterion("nickname <>", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameGreaterThan(String value) { + addCriterion("nickname >", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameGreaterThanOrEqualTo(String value) { + addCriterion("nickname >=", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameLessThan(String value) { + addCriterion("nickname <", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameLessThanOrEqualTo(String value) { + addCriterion("nickname <=", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameLike(String value) { + addCriterion("nickname like", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameNotLike(String value) { + addCriterion("nickname not like", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameIn(List values) { + addCriterion("nickname in", values, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameNotIn(List values) { + addCriterion("nickname not in", values, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameBetween(String value1, String value2) { + addCriterion("nickname between", value1, value2, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameNotBetween(String value1, String value2) { + addCriterion("nickname not between", value1, value2, "nickname"); + return (Criteria) this; + } + + public Criteria andHeadimgurlIsNull() { + addCriterion("headimgurl is null"); + return (Criteria) this; + } + + public Criteria andHeadimgurlIsNotNull() { + addCriterion("headimgurl is not null"); + return (Criteria) this; + } + + public Criteria andHeadimgurlEqualTo(String value) { + addCriterion("headimgurl =", value, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlNotEqualTo(String value) { + addCriterion("headimgurl <>", value, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlGreaterThan(String value) { + addCriterion("headimgurl >", value, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlGreaterThanOrEqualTo(String value) { + addCriterion("headimgurl >=", value, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlLessThan(String value) { + addCriterion("headimgurl <", value, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlLessThanOrEqualTo(String value) { + addCriterion("headimgurl <=", value, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlLike(String value) { + addCriterion("headimgurl like", value, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlNotLike(String value) { + addCriterion("headimgurl not like", value, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlIn(List values) { + addCriterion("headimgurl in", values, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlNotIn(List values) { + addCriterion("headimgurl not in", values, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlBetween(String value1, String value2) { + addCriterion("headimgurl between", value1, value2, "headimgurl"); + return (Criteria) this; + } + + public Criteria andHeadimgurlNotBetween(String value1, String value2) { + addCriterion("headimgurl not between", value1, value2, "headimgurl"); + return (Criteria) this; + } + + public Criteria andSexIsNull() { + addCriterion("sex is null"); + return (Criteria) this; + } + + public Criteria andSexIsNotNull() { + addCriterion("sex is not null"); + return (Criteria) this; + } + + public Criteria andSexEqualTo(Byte value) { + addCriterion("sex =", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexNotEqualTo(Byte value) { + addCriterion("sex <>", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexGreaterThan(Byte value) { + addCriterion("sex >", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexGreaterThanOrEqualTo(Byte value) { + addCriterion("sex >=", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexLessThan(Byte value) { + addCriterion("sex <", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexLessThanOrEqualTo(Byte value) { + addCriterion("sex <=", value, "sex"); + return (Criteria) this; + } + + public Criteria andSexIn(List values) { + addCriterion("sex in", values, "sex"); + return (Criteria) this; + } + + public Criteria andSexNotIn(List values) { + addCriterion("sex not in", values, "sex"); + return (Criteria) this; + } + + public Criteria andSexBetween(Byte value1, Byte value2) { + addCriterion("sex between", value1, value2, "sex"); + return (Criteria) this; + } + + public Criteria andSexNotBetween(Byte value1, Byte value2) { + addCriterion("sex not between", value1, value2, "sex"); + return (Criteria) this; + } + + public Criteria andLanguageIsNull() { + addCriterion("language is null"); + return (Criteria) this; + } + + public Criteria andLanguageIsNotNull() { + addCriterion("language is not null"); + return (Criteria) this; + } + + public Criteria andLanguageEqualTo(String value) { + addCriterion("language =", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageNotEqualTo(String value) { + addCriterion("language <>", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageGreaterThan(String value) { + addCriterion("language >", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageGreaterThanOrEqualTo(String value) { + addCriterion("language >=", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageLessThan(String value) { + addCriterion("language <", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageLessThanOrEqualTo(String value) { + addCriterion("language <=", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageLike(String value) { + addCriterion("language like", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageNotLike(String value) { + addCriterion("language not like", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageIn(List values) { + addCriterion("language in", values, "language"); + return (Criteria) this; + } + + public Criteria andLanguageNotIn(List values) { + addCriterion("language not in", values, "language"); + return (Criteria) this; + } + + public Criteria andLanguageBetween(String value1, String value2) { + addCriterion("language between", value1, value2, "language"); + return (Criteria) this; + } + + public Criteria andLanguageNotBetween(String value1, String value2) { + addCriterion("language not between", value1, value2, "language"); + return (Criteria) this; + } + + public Criteria andCityIsNull() { + addCriterion("city is null"); + return (Criteria) this; + } + + public Criteria andCityIsNotNull() { + addCriterion("city is not null"); + return (Criteria) this; + } + + public Criteria andCityEqualTo(String value) { + addCriterion("city =", value, "city"); + return (Criteria) this; + } + + public Criteria andCityNotEqualTo(String value) { + addCriterion("city <>", value, "city"); + return (Criteria) this; + } + + public Criteria andCityGreaterThan(String value) { + addCriterion("city >", value, "city"); + return (Criteria) this; + } + + public Criteria andCityGreaterThanOrEqualTo(String value) { + addCriterion("city >=", value, "city"); + return (Criteria) this; + } + + public Criteria andCityLessThan(String value) { + addCriterion("city <", value, "city"); + return (Criteria) this; + } + + public Criteria andCityLessThanOrEqualTo(String value) { + addCriterion("city <=", value, "city"); + return (Criteria) this; + } + + public Criteria andCityLike(String value) { + addCriterion("city like", value, "city"); + return (Criteria) this; + } + + public Criteria andCityNotLike(String value) { + addCriterion("city not like", value, "city"); + return (Criteria) this; + } + + public Criteria andCityIn(List values) { + addCriterion("city in", values, "city"); + return (Criteria) this; + } + + public Criteria andCityNotIn(List values) { + addCriterion("city not in", values, "city"); + return (Criteria) this; + } + + public Criteria andCityBetween(String value1, String value2) { + addCriterion("city between", value1, value2, "city"); + return (Criteria) this; + } + + public Criteria andCityNotBetween(String value1, String value2) { + addCriterion("city not between", value1, value2, "city"); + return (Criteria) this; + } + + public Criteria andProvinceIsNull() { + addCriterion("province is null"); + return (Criteria) this; + } + + public Criteria andProvinceIsNotNull() { + addCriterion("province is not null"); + return (Criteria) this; + } + + public Criteria andProvinceEqualTo(String value) { + addCriterion("province =", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotEqualTo(String value) { + addCriterion("province <>", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceGreaterThan(String value) { + addCriterion("province >", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceGreaterThanOrEqualTo(String value) { + addCriterion("province >=", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceLessThan(String value) { + addCriterion("province <", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceLessThanOrEqualTo(String value) { + addCriterion("province <=", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceLike(String value) { + addCriterion("province like", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotLike(String value) { + addCriterion("province not like", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceIn(List values) { + addCriterion("province in", values, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotIn(List values) { + addCriterion("province not in", values, "province"); + return (Criteria) this; + } + + public Criteria andProvinceBetween(String value1, String value2) { + addCriterion("province between", value1, value2, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotBetween(String value1, String value2) { + addCriterion("province not between", value1, value2, "province"); + return (Criteria) this; + } + + public Criteria andCountryIsNull() { + addCriterion("country is null"); + return (Criteria) this; + } + + public Criteria andCountryIsNotNull() { + addCriterion("country is not null"); + return (Criteria) this; + } + + public Criteria andCountryEqualTo(String value) { + addCriterion("country =", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotEqualTo(String value) { + addCriterion("country <>", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryGreaterThan(String value) { + addCriterion("country >", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryGreaterThanOrEqualTo(String value) { + addCriterion("country >=", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryLessThan(String value) { + addCriterion("country <", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryLessThanOrEqualTo(String value) { + addCriterion("country <=", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryLike(String value) { + addCriterion("country like", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotLike(String value) { + addCriterion("country not like", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryIn(List values) { + addCriterion("country in", values, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotIn(List values) { + addCriterion("country not in", values, "country"); + return (Criteria) this; + } + + public Criteria andCountryBetween(String value1, String value2) { + addCriterion("country between", value1, value2, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotBetween(String value1, String value2) { + addCriterion("country not between", value1, value2, "country"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeIsNull() { + addCriterion("subscribe_time is null"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeIsNotNull() { + addCriterion("subscribe_time is not null"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeEqualTo(Long value) { + addCriterion("subscribe_time =", value, "subscribeTime"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeNotEqualTo(Long value) { + addCriterion("subscribe_time <>", value, "subscribeTime"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeGreaterThan(Long value) { + addCriterion("subscribe_time >", value, "subscribeTime"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeGreaterThanOrEqualTo(Long value) { + addCriterion("subscribe_time >=", value, "subscribeTime"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeLessThan(Long value) { + addCriterion("subscribe_time <", value, "subscribeTime"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeLessThanOrEqualTo(Long value) { + addCriterion("subscribe_time <=", value, "subscribeTime"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeIn(List values) { + addCriterion("subscribe_time in", values, "subscribeTime"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeNotIn(List values) { + addCriterion("subscribe_time not in", values, "subscribeTime"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeBetween(Long value1, Long value2) { + addCriterion("subscribe_time between", value1, value2, "subscribeTime"); + return (Criteria) this; + } + + public Criteria andSubscribeTimeNotBetween(Long value1, Long value2) { + addCriterion("subscribe_time not between", value1, value2, "subscribeTime"); + 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 andGroupidIsNull() { + addCriterion("groupid is null"); + return (Criteria) this; + } + + public Criteria andGroupidIsNotNull() { + addCriterion("groupid is not null"); + return (Criteria) this; + } + + public Criteria andGroupidEqualTo(Long value) { + addCriterion("groupid =", value, "groupid"); + return (Criteria) this; + } + + public Criteria andGroupidNotEqualTo(Long value) { + addCriterion("groupid <>", value, "groupid"); + return (Criteria) this; + } + + public Criteria andGroupidGreaterThan(Long value) { + addCriterion("groupid >", value, "groupid"); + return (Criteria) this; + } + + public Criteria andGroupidGreaterThanOrEqualTo(Long value) { + addCriterion("groupid >=", value, "groupid"); + return (Criteria) this; + } + + public Criteria andGroupidLessThan(Long value) { + addCriterion("groupid <", value, "groupid"); + return (Criteria) this; + } + + public Criteria andGroupidLessThanOrEqualTo(Long value) { + addCriterion("groupid <=", value, "groupid"); + return (Criteria) this; + } + + public Criteria andGroupidIn(List values) { + addCriterion("groupid in", values, "groupid"); + return (Criteria) this; + } + + public Criteria andGroupidNotIn(List values) { + addCriterion("groupid not in", values, "groupid"); + return (Criteria) this; + } + + public Criteria andGroupidBetween(Long value1, Long value2) { + addCriterion("groupid between", value1, value2, "groupid"); + return (Criteria) this; + } + + public Criteria andGroupidNotBetween(Long value1, Long value2) { + addCriterion("groupid not between", value1, value2, "groupid"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneIsNull() { + addCriterion("subscribe_scene is null"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneIsNotNull() { + addCriterion("subscribe_scene is not null"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneEqualTo(String value) { + addCriterion("subscribe_scene =", value, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneNotEqualTo(String value) { + addCriterion("subscribe_scene <>", value, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneGreaterThan(String value) { + addCriterion("subscribe_scene >", value, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneGreaterThanOrEqualTo(String value) { + addCriterion("subscribe_scene >=", value, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneLessThan(String value) { + addCriterion("subscribe_scene <", value, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneLessThanOrEqualTo(String value) { + addCriterion("subscribe_scene <=", value, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneLike(String value) { + addCriterion("subscribe_scene like", value, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneNotLike(String value) { + addCriterion("subscribe_scene not like", value, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneIn(List values) { + addCriterion("subscribe_scene in", values, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneNotIn(List values) { + addCriterion("subscribe_scene not in", values, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneBetween(String value1, String value2) { + addCriterion("subscribe_scene between", value1, value2, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andSubscribeSceneNotBetween(String value1, String value2) { + addCriterion("subscribe_scene not between", value1, value2, "subscribeScene"); + return (Criteria) this; + } + + public Criteria andQrSceneIsNull() { + addCriterion("qr_scene is null"); + return (Criteria) this; + } + + public Criteria andQrSceneIsNotNull() { + addCriterion("qr_scene is not null"); + return (Criteria) this; + } + + public Criteria andQrSceneEqualTo(Long value) { + addCriterion("qr_scene =", value, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneNotEqualTo(Long value) { + addCriterion("qr_scene <>", value, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneGreaterThan(Long value) { + addCriterion("qr_scene >", value, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneGreaterThanOrEqualTo(Long value) { + addCriterion("qr_scene >=", value, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneLessThan(Long value) { + addCriterion("qr_scene <", value, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneLessThanOrEqualTo(Long value) { + addCriterion("qr_scene <=", value, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneIn(List values) { + addCriterion("qr_scene in", values, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneNotIn(List values) { + addCriterion("qr_scene not in", values, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneBetween(Long value1, Long value2) { + addCriterion("qr_scene between", value1, value2, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneNotBetween(Long value1, Long value2) { + addCriterion("qr_scene not between", value1, value2, "qrScene"); + return (Criteria) this; + } + + public Criteria andQrSceneStrIsNull() { + addCriterion("qr_scene_str is null"); + return (Criteria) this; + } + + public Criteria andQrSceneStrIsNotNull() { + addCriterion("qr_scene_str is not null"); + return (Criteria) this; + } + + public Criteria andQrSceneStrEqualTo(String value) { + addCriterion("qr_scene_str =", value, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrNotEqualTo(String value) { + addCriterion("qr_scene_str <>", value, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrGreaterThan(String value) { + addCriterion("qr_scene_str >", value, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrGreaterThanOrEqualTo(String value) { + addCriterion("qr_scene_str >=", value, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrLessThan(String value) { + addCriterion("qr_scene_str <", value, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrLessThanOrEqualTo(String value) { + addCriterion("qr_scene_str <=", value, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrLike(String value) { + addCriterion("qr_scene_str like", value, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrNotLike(String value) { + addCriterion("qr_scene_str not like", value, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrIn(List values) { + addCriterion("qr_scene_str in", values, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrNotIn(List values) { + addCriterion("qr_scene_str not in", values, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrBetween(String value1, String value2) { + addCriterion("qr_scene_str between", value1, value2, "qrSceneStr"); + return (Criteria) this; + } + + public Criteria andQrSceneStrNotBetween(String value1, String value2) { + addCriterion("qr_scene_str not between", value1, value2, "qrSceneStr"); + 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/game/src/main/java/com/ccsens/game/bean/po/GameMemberJoin.java b/game/src/main/java/com/ccsens/game/bean/po/GameMemberJoin.java new file mode 100644 index 00000000..554738fa --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameMemberJoin.java @@ -0,0 +1,106 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameMemberJoin implements Serializable { + private Long id; + + private Long memberId; + + private Long recordId; + + private String times; + + private String 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 getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public Long getRecordId() { + return recordId; + } + + public void setRecordId(Long recordId) { + this.recordId = recordId; + } + + public String getTimes() { + return times; + } + + public void setTimes(String times) { + this.times = times == null ? null : times.trim(); + } + + public String getScore() { + return score; + } + + public void setScore(String score) { + this.score = score == null ? null : score.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(", memberId=").append(memberId); + sb.append(", recordId=").append(recordId); + sb.append(", times=").append(times); + 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/game/src/main/java/com/ccsens/game/bean/po/GameMemberJoinExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameMemberJoinExample.java new file mode 100644 index 00000000..cdbad6db --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameMemberJoinExample.java @@ -0,0 +1,701 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameMemberJoinExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameMemberJoinExample() { + 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 andMemberIdIsNull() { + addCriterion("member_id is null"); + return (Criteria) this; + } + + public Criteria andMemberIdIsNotNull() { + addCriterion("member_id is not null"); + return (Criteria) this; + } + + public Criteria andMemberIdEqualTo(Long value) { + addCriterion("member_id =", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotEqualTo(Long value) { + addCriterion("member_id <>", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThan(Long value) { + addCriterion("member_id >", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThanOrEqualTo(Long value) { + addCriterion("member_id >=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThan(Long value) { + addCriterion("member_id <", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThanOrEqualTo(Long value) { + addCriterion("member_id <=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdIn(List values) { + addCriterion("member_id in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotIn(List values) { + addCriterion("member_id not in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdBetween(Long value1, Long value2) { + addCriterion("member_id between", value1, value2, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotBetween(Long value1, Long value2) { + addCriterion("member_id not between", value1, value2, "memberId"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNull() { + addCriterion("record_id is null"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNotNull() { + addCriterion("record_id is not null"); + return (Criteria) this; + } + + public Criteria andRecordIdEqualTo(Long value) { + addCriterion("record_id =", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotEqualTo(Long value) { + addCriterion("record_id <>", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThan(Long value) { + addCriterion("record_id >", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThanOrEqualTo(Long value) { + addCriterion("record_id >=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThan(Long value) { + addCriterion("record_id <", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThanOrEqualTo(Long value) { + addCriterion("record_id <=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdIn(List values) { + addCriterion("record_id in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotIn(List values) { + addCriterion("record_id not in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdBetween(Long value1, Long value2) { + addCriterion("record_id between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotBetween(Long value1, Long value2) { + addCriterion("record_id not between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andTimesIsNull() { + addCriterion("times is null"); + return (Criteria) this; + } + + public Criteria andTimesIsNotNull() { + addCriterion("times is not null"); + return (Criteria) this; + } + + public Criteria andTimesEqualTo(String value) { + addCriterion("times =", value, "times"); + return (Criteria) this; + } + + public Criteria andTimesNotEqualTo(String value) { + addCriterion("times <>", value, "times"); + return (Criteria) this; + } + + public Criteria andTimesGreaterThan(String value) { + addCriterion("times >", value, "times"); + return (Criteria) this; + } + + public Criteria andTimesGreaterThanOrEqualTo(String value) { + addCriterion("times >=", value, "times"); + return (Criteria) this; + } + + public Criteria andTimesLessThan(String value) { + addCriterion("times <", value, "times"); + return (Criteria) this; + } + + public Criteria andTimesLessThanOrEqualTo(String value) { + addCriterion("times <=", value, "times"); + return (Criteria) this; + } + + public Criteria andTimesLike(String value) { + addCriterion("times like", value, "times"); + return (Criteria) this; + } + + public Criteria andTimesNotLike(String value) { + addCriterion("times not like", value, "times"); + return (Criteria) this; + } + + public Criteria andTimesIn(List values) { + addCriterion("times in", values, "times"); + return (Criteria) this; + } + + public Criteria andTimesNotIn(List values) { + addCriterion("times not in", values, "times"); + return (Criteria) this; + } + + public Criteria andTimesBetween(String value1, String value2) { + addCriterion("times between", value1, value2, "times"); + return (Criteria) this; + } + + public Criteria andTimesNotBetween(String value1, String value2) { + addCriterion("times not between", value1, value2, "times"); + 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(String value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(String value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(String value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(String value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(String value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(String value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLike(String value) { + addCriterion("score like", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotLike(String value) { + addCriterion("score not like", 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(String value1, String value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(String value1, String 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/game/src/main/java/com/ccsens/game/bean/po/GamePrizeInstructions.java b/game/src/main/java/com/ccsens/game/bean/po/GamePrizeInstructions.java new file mode 100644 index 00000000..0d747e25 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GamePrizeInstructions.java @@ -0,0 +1,95 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GamePrizeInstructions implements Serializable { + private Long id; + + private Long gameId; + + private Integer sequence; + + 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 getGameId() { + return gameId; + } + + public void setGameId(Long gameId) { + this.gameId = gameId; + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + 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(", gameId=").append(gameId); + sb.append(", sequence=").append(sequence); + 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/game/src/main/java/com/ccsens/game/bean/po/GamePrizeInstructionsExample.java b/game/src/main/java/com/ccsens/game/bean/po/GamePrizeInstructionsExample.java new file mode 100644 index 00000000..56fb896e --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GamePrizeInstructionsExample.java @@ -0,0 +1,631 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GamePrizeInstructionsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GamePrizeInstructionsExample() { + 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 andGameIdIsNull() { + addCriterion("game_id is null"); + return (Criteria) this; + } + + public Criteria andGameIdIsNotNull() { + addCriterion("game_id is not null"); + return (Criteria) this; + } + + public Criteria andGameIdEqualTo(Long value) { + addCriterion("game_id =", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdNotEqualTo(Long value) { + addCriterion("game_id <>", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdGreaterThan(Long value) { + addCriterion("game_id >", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdGreaterThanOrEqualTo(Long value) { + addCriterion("game_id >=", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdLessThan(Long value) { + addCriterion("game_id <", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdLessThanOrEqualTo(Long value) { + addCriterion("game_id <=", value, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdIn(List values) { + addCriterion("game_id in", values, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdNotIn(List values) { + addCriterion("game_id not in", values, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdBetween(Long value1, Long value2) { + addCriterion("game_id between", value1, value2, "gameId"); + return (Criteria) this; + } + + public Criteria andGameIdNotBetween(Long value1, Long value2) { + addCriterion("game_id not between", value1, value2, "gameId"); + 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 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/game/src/main/java/com/ccsens/game/bean/po/GameRecord.java b/game/src/main/java/com/ccsens/game/bean/po/GameRecord.java new file mode 100644 index 00000000..fe2b9a92 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameRecord.java @@ -0,0 +1,128 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameRecord implements Serializable { + private Long id; + + private Long typeMemberId; + + private String url; + + private String qrCodeUrl; + + private Long startTime; + + private Long endTime; + + private Byte gameStatus; + + 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 getTypeMemberId() { + return typeMemberId; + } + + public void setTypeMemberId(Long typeMemberId) { + this.typeMemberId = typeMemberId; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url == null ? null : url.trim(); + } + + public String getQrCodeUrl() { + return qrCodeUrl; + } + + public void setQrCodeUrl(String qrCodeUrl) { + this.qrCodeUrl = qrCodeUrl == null ? null : qrCodeUrl.trim(); + } + + 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 Byte getGameStatus() { + return gameStatus; + } + + public void setGameStatus(Byte gameStatus) { + this.gameStatus = gameStatus; + } + + 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(", typeMemberId=").append(typeMemberId); + sb.append(", url=").append(url); + sb.append(", qrCodeUrl=").append(qrCodeUrl); + sb.append(", startTime=").append(startTime); + sb.append(", endTime=").append(endTime); + sb.append(", gameStatus=").append(gameStatus); + 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/game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java new file mode 100644 index 00000000..d7251758 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameRecordExample.java @@ -0,0 +1,821 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameRecordExample() { + 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 andTypeMemberIdIsNull() { + addCriterion("type_member_id is null"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdIsNotNull() { + addCriterion("type_member_id is not null"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdEqualTo(Long value) { + addCriterion("type_member_id =", value, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdNotEqualTo(Long value) { + addCriterion("type_member_id <>", value, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdGreaterThan(Long value) { + addCriterion("type_member_id >", value, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdGreaterThanOrEqualTo(Long value) { + addCriterion("type_member_id >=", value, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdLessThan(Long value) { + addCriterion("type_member_id <", value, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdLessThanOrEqualTo(Long value) { + addCriterion("type_member_id <=", value, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdIn(List values) { + addCriterion("type_member_id in", values, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdNotIn(List values) { + addCriterion("type_member_id not in", values, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdBetween(Long value1, Long value2) { + addCriterion("type_member_id between", value1, value2, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andTypeMemberIdNotBetween(Long value1, Long value2) { + addCriterion("type_member_id not between", value1, value2, "typeMemberId"); + return (Criteria) this; + } + + public Criteria andUrlIsNull() { + addCriterion("url is null"); + return (Criteria) this; + } + + public Criteria andUrlIsNotNull() { + addCriterion("url is not null"); + return (Criteria) this; + } + + public Criteria andUrlEqualTo(String value) { + addCriterion("url =", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotEqualTo(String value) { + addCriterion("url <>", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThan(String value) { + addCriterion("url >", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThanOrEqualTo(String value) { + addCriterion("url >=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThan(String value) { + addCriterion("url <", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThanOrEqualTo(String value) { + addCriterion("url <=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLike(String value) { + addCriterion("url like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotLike(String value) { + addCriterion("url not like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlIn(List values) { + addCriterion("url in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotIn(List values) { + addCriterion("url not in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlBetween(String value1, String value2) { + addCriterion("url between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotBetween(String value1, String value2) { + addCriterion("url not between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlIsNull() { + addCriterion("QR_code_url is null"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlIsNotNull() { + addCriterion("QR_code_url is not null"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlEqualTo(String value) { + addCriterion("QR_code_url =", value, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlNotEqualTo(String value) { + addCriterion("QR_code_url <>", value, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlGreaterThan(String value) { + addCriterion("QR_code_url >", value, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlGreaterThanOrEqualTo(String value) { + addCriterion("QR_code_url >=", value, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlLessThan(String value) { + addCriterion("QR_code_url <", value, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlLessThanOrEqualTo(String value) { + addCriterion("QR_code_url <=", value, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlLike(String value) { + addCriterion("QR_code_url like", value, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlNotLike(String value) { + addCriterion("QR_code_url not like", value, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlIn(List values) { + addCriterion("QR_code_url in", values, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlNotIn(List values) { + addCriterion("QR_code_url not in", values, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlBetween(String value1, String value2) { + addCriterion("QR_code_url between", value1, value2, "qrCodeUrl"); + return (Criteria) this; + } + + public Criteria andQrCodeUrlNotBetween(String value1, String value2) { + addCriterion("QR_code_url not between", value1, value2, "qrCodeUrl"); + 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 andGameStatusIsNull() { + addCriterion("game_status is null"); + return (Criteria) this; + } + + public Criteria andGameStatusIsNotNull() { + addCriterion("game_status is not null"); + return (Criteria) this; + } + + public Criteria andGameStatusEqualTo(Byte value) { + addCriterion("game_status =", value, "gameStatus"); + return (Criteria) this; + } + + public Criteria andGameStatusNotEqualTo(Byte value) { + addCriterion("game_status <>", value, "gameStatus"); + return (Criteria) this; + } + + public Criteria andGameStatusGreaterThan(Byte value) { + addCriterion("game_status >", value, "gameStatus"); + return (Criteria) this; + } + + public Criteria andGameStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("game_status >=", value, "gameStatus"); + return (Criteria) this; + } + + public Criteria andGameStatusLessThan(Byte value) { + addCriterion("game_status <", value, "gameStatus"); + return (Criteria) this; + } + + public Criteria andGameStatusLessThanOrEqualTo(Byte value) { + addCriterion("game_status <=", value, "gameStatus"); + return (Criteria) this; + } + + public Criteria andGameStatusIn(List values) { + addCriterion("game_status in", values, "gameStatus"); + return (Criteria) this; + } + + public Criteria andGameStatusNotIn(List values) { + addCriterion("game_status not in", values, "gameStatus"); + return (Criteria) this; + } + + public Criteria andGameStatusBetween(Byte value1, Byte value2) { + addCriterion("game_status between", value1, value2, "gameStatus"); + return (Criteria) this; + } + + public Criteria andGameStatusNotBetween(Byte value1, Byte value2) { + addCriterion("game_status not between", value1, value2, "gameStatus"); + 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/game/src/main/java/com/ccsens/game/bean/po/GameScoreLog.java b/game/src/main/java/com/ccsens/game/bean/po/GameScoreLog.java new file mode 100644 index 00000000..299c3477 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameScoreLog.java @@ -0,0 +1,95 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameScoreLog implements Serializable { + private Long id; + + private Long memberId; + + private Long recordId; + + private Byte operationType; + + 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 getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public Long getRecordId() { + return recordId; + } + + public void setRecordId(Long recordId) { + this.recordId = recordId; + } + + public Byte getOperationType() { + return operationType; + } + + public void setOperationType(Byte operationType) { + this.operationType = operationType; + } + + 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(", memberId=").append(memberId); + sb.append(", recordId=").append(recordId); + sb.append(", operationType=").append(operationType); + 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/game/src/main/java/com/ccsens/game/bean/po/GameScoreLogExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameScoreLogExample.java new file mode 100644 index 00000000..5f68c818 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameScoreLogExample.java @@ -0,0 +1,621 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameScoreLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameScoreLogExample() { + 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 andMemberIdIsNull() { + addCriterion("member_id is null"); + return (Criteria) this; + } + + public Criteria andMemberIdIsNotNull() { + addCriterion("member_id is not null"); + return (Criteria) this; + } + + public Criteria andMemberIdEqualTo(Long value) { + addCriterion("member_id =", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotEqualTo(Long value) { + addCriterion("member_id <>", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThan(Long value) { + addCriterion("member_id >", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThanOrEqualTo(Long value) { + addCriterion("member_id >=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThan(Long value) { + addCriterion("member_id <", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThanOrEqualTo(Long value) { + addCriterion("member_id <=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdIn(List values) { + addCriterion("member_id in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotIn(List values) { + addCriterion("member_id not in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdBetween(Long value1, Long value2) { + addCriterion("member_id between", value1, value2, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotBetween(Long value1, Long value2) { + addCriterion("member_id not between", value1, value2, "memberId"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNull() { + addCriterion("record_id is null"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNotNull() { + addCriterion("record_id is not null"); + return (Criteria) this; + } + + public Criteria andRecordIdEqualTo(Long value) { + addCriterion("record_id =", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotEqualTo(Long value) { + addCriterion("record_id <>", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThan(Long value) { + addCriterion("record_id >", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThanOrEqualTo(Long value) { + addCriterion("record_id >=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThan(Long value) { + addCriterion("record_id <", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThanOrEqualTo(Long value) { + addCriterion("record_id <=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdIn(List values) { + addCriterion("record_id in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotIn(List values) { + addCriterion("record_id not in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdBetween(Long value1, Long value2) { + addCriterion("record_id between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotBetween(Long value1, Long value2) { + addCriterion("record_id not between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andOperationTypeIsNull() { + addCriterion("operation_type is null"); + return (Criteria) this; + } + + public Criteria andOperationTypeIsNotNull() { + addCriterion("operation_type is not null"); + return (Criteria) this; + } + + public Criteria andOperationTypeEqualTo(Byte value) { + addCriterion("operation_type =", value, "operationType"); + return (Criteria) this; + } + + public Criteria andOperationTypeNotEqualTo(Byte value) { + addCriterion("operation_type <>", value, "operationType"); + return (Criteria) this; + } + + public Criteria andOperationTypeGreaterThan(Byte value) { + addCriterion("operation_type >", value, "operationType"); + return (Criteria) this; + } + + public Criteria andOperationTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("operation_type >=", value, "operationType"); + return (Criteria) this; + } + + public Criteria andOperationTypeLessThan(Byte value) { + addCriterion("operation_type <", value, "operationType"); + return (Criteria) this; + } + + public Criteria andOperationTypeLessThanOrEqualTo(Byte value) { + addCriterion("operation_type <=", value, "operationType"); + return (Criteria) this; + } + + public Criteria andOperationTypeIn(List values) { + addCriterion("operation_type in", values, "operationType"); + return (Criteria) this; + } + + public Criteria andOperationTypeNotIn(List values) { + addCriterion("operation_type not in", values, "operationType"); + return (Criteria) this; + } + + public Criteria andOperationTypeBetween(Byte value1, Byte value2) { + addCriterion("operation_type between", value1, value2, "operationType"); + return (Criteria) this; + } + + public Criteria andOperationTypeNotBetween(Byte value1, Byte value2) { + addCriterion("operation_type not between", value1, value2, "operationType"); + 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/game/src/main/java/com/ccsens/game/bean/po/GameType.java b/game/src/main/java/com/ccsens/game/bean/po/GameType.java new file mode 100644 index 00000000..6897272b --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameType.java @@ -0,0 +1,106 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameType implements Serializable { + private Long id; + + private String code; + + private String name; + + private String description; + + private String payType; + + 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 getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + 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 String getPayType() { + return payType; + } + + public void setPayType(String payType) { + this.payType = payType == null ? null : payType.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(", code=").append(code); + sb.append(", name=").append(name); + sb.append(", description=").append(description); + sb.append(", payType=").append(payType); + 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/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java new file mode 100644 index 00000000..88a84651 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java @@ -0,0 +1,721 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameTypeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameTypeExample() { + 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 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 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 andPayTypeIsNull() { + addCriterion("pay_type is null"); + return (Criteria) this; + } + + public Criteria andPayTypeIsNotNull() { + addCriterion("pay_type is not null"); + return (Criteria) this; + } + + public Criteria andPayTypeEqualTo(String value) { + addCriterion("pay_type =", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeNotEqualTo(String value) { + addCriterion("pay_type <>", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeGreaterThan(String value) { + addCriterion("pay_type >", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeGreaterThanOrEqualTo(String value) { + addCriterion("pay_type >=", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeLessThan(String value) { + addCriterion("pay_type <", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeLessThanOrEqualTo(String value) { + addCriterion("pay_type <=", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeLike(String value) { + addCriterion("pay_type like", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeNotLike(String value) { + addCriterion("pay_type not like", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeIn(List values) { + addCriterion("pay_type in", values, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeNotIn(List values) { + addCriterion("pay_type not in", values, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeBetween(String value1, String value2) { + addCriterion("pay_type between", value1, value2, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeNotBetween(String value1, String value2) { + addCriterion("pay_type not between", value1, value2, "payType"); + 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/game/src/main/java/com/ccsens/game/bean/po/GameTypeMember.java b/game/src/main/java/com/ccsens/game/bean/po/GameTypeMember.java new file mode 100644 index 00000000..372335a6 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameTypeMember.java @@ -0,0 +1,128 @@ +package com.ccsens.game.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class GameTypeMember implements Serializable { + private Long id; + + private Long memberId; + + private Long gameTypeId; + + private Integer totalCount; + + private Integer usedCount; + + private Long createdTime; + + private Long dueTime; + + 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 getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public Long getGameTypeId() { + return gameTypeId; + } + + public void setGameTypeId(Long gameTypeId) { + this.gameTypeId = gameTypeId; + } + + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + public Integer getUsedCount() { + return usedCount; + } + + public void setUsedCount(Integer usedCount) { + this.usedCount = usedCount; + } + + public Long getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(Long createdTime) { + this.createdTime = createdTime; + } + + public Long getDueTime() { + return dueTime; + } + + public void setDueTime(Long dueTime) { + this.dueTime = dueTime; + } + + 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(", memberId=").append(memberId); + sb.append(", gameTypeId=").append(gameTypeId); + sb.append(", totalCount=").append(totalCount); + sb.append(", usedCount=").append(usedCount); + sb.append(", createdTime=").append(createdTime); + sb.append(", dueTime=").append(dueTime); + 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/game/src/main/java/com/ccsens/game/bean/po/GameTypeMemberExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameTypeMemberExample.java new file mode 100644 index 00000000..7d5ff020 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameTypeMemberExample.java @@ -0,0 +1,801 @@ +package com.ccsens.game.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GameTypeMemberExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public GameTypeMemberExample() { + 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 andMemberIdIsNull() { + addCriterion("member_id is null"); + return (Criteria) this; + } + + public Criteria andMemberIdIsNotNull() { + addCriterion("member_id is not null"); + return (Criteria) this; + } + + public Criteria andMemberIdEqualTo(Long value) { + addCriterion("member_id =", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotEqualTo(Long value) { + addCriterion("member_id <>", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThan(Long value) { + addCriterion("member_id >", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThanOrEqualTo(Long value) { + addCriterion("member_id >=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThan(Long value) { + addCriterion("member_id <", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThanOrEqualTo(Long value) { + addCriterion("member_id <=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdIn(List values) { + addCriterion("member_id in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotIn(List values) { + addCriterion("member_id not in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdBetween(Long value1, Long value2) { + addCriterion("member_id between", value1, value2, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotBetween(Long value1, Long value2) { + addCriterion("member_id not between", value1, value2, "memberId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdIsNull() { + addCriterion("game_type_id is null"); + return (Criteria) this; + } + + public Criteria andGameTypeIdIsNotNull() { + addCriterion("game_type_id is not null"); + return (Criteria) this; + } + + public Criteria andGameTypeIdEqualTo(Long value) { + addCriterion("game_type_id =", value, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdNotEqualTo(Long value) { + addCriterion("game_type_id <>", value, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdGreaterThan(Long value) { + addCriterion("game_type_id >", value, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdGreaterThanOrEqualTo(Long value) { + addCriterion("game_type_id >=", value, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdLessThan(Long value) { + addCriterion("game_type_id <", value, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdLessThanOrEqualTo(Long value) { + addCriterion("game_type_id <=", value, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdIn(List values) { + addCriterion("game_type_id in", values, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdNotIn(List values) { + addCriterion("game_type_id not in", values, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdBetween(Long value1, Long value2) { + addCriterion("game_type_id between", value1, value2, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andGameTypeIdNotBetween(Long value1, Long value2) { + addCriterion("game_type_id not between", value1, value2, "gameTypeId"); + return (Criteria) this; + } + + public Criteria andTotalCountIsNull() { + addCriterion("total_count is null"); + return (Criteria) this; + } + + public Criteria andTotalCountIsNotNull() { + addCriterion("total_count is not null"); + return (Criteria) this; + } + + public Criteria andTotalCountEqualTo(Integer value) { + addCriterion("total_count =", value, "totalCount"); + return (Criteria) this; + } + + public Criteria andTotalCountNotEqualTo(Integer value) { + addCriterion("total_count <>", value, "totalCount"); + return (Criteria) this; + } + + public Criteria andTotalCountGreaterThan(Integer value) { + addCriterion("total_count >", value, "totalCount"); + return (Criteria) this; + } + + public Criteria andTotalCountGreaterThanOrEqualTo(Integer value) { + addCriterion("total_count >=", value, "totalCount"); + return (Criteria) this; + } + + public Criteria andTotalCountLessThan(Integer value) { + addCriterion("total_count <", value, "totalCount"); + return (Criteria) this; + } + + public Criteria andTotalCountLessThanOrEqualTo(Integer value) { + addCriterion("total_count <=", value, "totalCount"); + return (Criteria) this; + } + + public Criteria andTotalCountIn(List values) { + addCriterion("total_count in", values, "totalCount"); + return (Criteria) this; + } + + public Criteria andTotalCountNotIn(List values) { + addCriterion("total_count not in", values, "totalCount"); + return (Criteria) this; + } + + public Criteria andTotalCountBetween(Integer value1, Integer value2) { + addCriterion("total_count between", value1, value2, "totalCount"); + return (Criteria) this; + } + + public Criteria andTotalCountNotBetween(Integer value1, Integer value2) { + addCriterion("total_count not between", value1, value2, "totalCount"); + return (Criteria) this; + } + + public Criteria andUsedCountIsNull() { + addCriterion("used_count is null"); + return (Criteria) this; + } + + public Criteria andUsedCountIsNotNull() { + addCriterion("used_count is not null"); + return (Criteria) this; + } + + public Criteria andUsedCountEqualTo(Integer value) { + addCriterion("used_count =", value, "usedCount"); + return (Criteria) this; + } + + public Criteria andUsedCountNotEqualTo(Integer value) { + addCriterion("used_count <>", value, "usedCount"); + return (Criteria) this; + } + + public Criteria andUsedCountGreaterThan(Integer value) { + addCriterion("used_count >", value, "usedCount"); + return (Criteria) this; + } + + public Criteria andUsedCountGreaterThanOrEqualTo(Integer value) { + addCriterion("used_count >=", value, "usedCount"); + return (Criteria) this; + } + + public Criteria andUsedCountLessThan(Integer value) { + addCriterion("used_count <", value, "usedCount"); + return (Criteria) this; + } + + public Criteria andUsedCountLessThanOrEqualTo(Integer value) { + addCriterion("used_count <=", value, "usedCount"); + return (Criteria) this; + } + + public Criteria andUsedCountIn(List values) { + addCriterion("used_count in", values, "usedCount"); + return (Criteria) this; + } + + public Criteria andUsedCountNotIn(List values) { + addCriterion("used_count not in", values, "usedCount"); + return (Criteria) this; + } + + public Criteria andUsedCountBetween(Integer value1, Integer value2) { + addCriterion("used_count between", value1, value2, "usedCount"); + return (Criteria) this; + } + + public Criteria andUsedCountNotBetween(Integer value1, Integer value2) { + addCriterion("used_count not between", value1, value2, "usedCount"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIsNull() { + addCriterion("created_time is null"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIsNotNull() { + addCriterion("created_time is not null"); + return (Criteria) this; + } + + public Criteria andCreatedTimeEqualTo(Long value) { + addCriterion("created_time =", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotEqualTo(Long value) { + addCriterion("created_time <>", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeGreaterThan(Long value) { + addCriterion("created_time >", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeGreaterThanOrEqualTo(Long value) { + addCriterion("created_time >=", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeLessThan(Long value) { + addCriterion("created_time <", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeLessThanOrEqualTo(Long value) { + addCriterion("created_time <=", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIn(List values) { + addCriterion("created_time in", values, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotIn(List values) { + addCriterion("created_time not in", values, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeBetween(Long value1, Long value2) { + addCriterion("created_time between", value1, value2, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotBetween(Long value1, Long value2) { + addCriterion("created_time not between", value1, value2, "createdTime"); + return (Criteria) this; + } + + public Criteria andDueTimeIsNull() { + addCriterion("due_time is null"); + return (Criteria) this; + } + + public Criteria andDueTimeIsNotNull() { + addCriterion("due_time is not null"); + return (Criteria) this; + } + + public Criteria andDueTimeEqualTo(Long value) { + addCriterion("due_time =", value, "dueTime"); + return (Criteria) this; + } + + public Criteria andDueTimeNotEqualTo(Long value) { + addCriterion("due_time <>", value, "dueTime"); + return (Criteria) this; + } + + public Criteria andDueTimeGreaterThan(Long value) { + addCriterion("due_time >", value, "dueTime"); + return (Criteria) this; + } + + public Criteria andDueTimeGreaterThanOrEqualTo(Long value) { + addCriterion("due_time >=", value, "dueTime"); + return (Criteria) this; + } + + public Criteria andDueTimeLessThan(Long value) { + addCriterion("due_time <", value, "dueTime"); + return (Criteria) this; + } + + public Criteria andDueTimeLessThanOrEqualTo(Long value) { + addCriterion("due_time <=", value, "dueTime"); + return (Criteria) this; + } + + public Criteria andDueTimeIn(List values) { + addCriterion("due_time in", values, "dueTime"); + return (Criteria) this; + } + + public Criteria andDueTimeNotIn(List values) { + addCriterion("due_time not in", values, "dueTime"); + return (Criteria) this; + } + + public Criteria andDueTimeBetween(Long value1, Long value2) { + addCriterion("due_time between", value1, value2, "dueTime"); + return (Criteria) this; + } + + public Criteria andDueTimeNotBetween(Long value1, Long value2) { + addCriterion("due_time not between", value1, value2, "dueTime"); + 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/game/src/main/java/com/ccsens/game/config/BeanConfig.java b/game/src/main/java/com/ccsens/game/config/BeanConfig.java new file mode 100644 index 00000000..1e73d73d --- /dev/null +++ b/game/src/main/java/com/ccsens/game/config/BeanConfig.java @@ -0,0 +1,34 @@ +package com.ccsens.game.config; + +import com.ccsens.game.intercept.MybatisInterceptor; +import org.springframework.beans.factory.config.YamlPropertiesFactoryBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; +import org.springframework.core.io.ClassPathResource; + +/** + * @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/game/src/main/java/com/ccsens/game/config/SpringConfig.java b/game/src/main/java/com/ccsens/game/config/SpringConfig.java new file mode 100644 index 00000000..55fa3c48 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/config/SpringConfig.java @@ -0,0 +1,164 @@ +package com.ccsens.game.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/tall/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/game/src/main/java/com/ccsens/game/config/SwaggerConfigure.java b/game/src/main/java/com/ccsens/game/config/SwaggerConfigure.java new file mode 100644 index 00000000..88d9d999 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/config/SwaggerConfigure.java @@ -0,0 +1,56 @@ +package com.ccsens.game.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.game.web")) + .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/game/src/main/java/com/ccsens/game/config/TokenInterceptor.java b/game/src/main/java/com/ccsens/game/config/TokenInterceptor.java new file mode 100644 index 00000000..268e0d6d --- /dev/null +++ b/game/src/main/java/com/ccsens/game/config/TokenInterceptor.java @@ -0,0 +1,78 @@ +//package com.ccsens.game.config; +// +//import com.ccsens.tall.bean.po.SysUser; +//import com.ccsens.tall.service.IUserService; +//import com.ccsens.util.*; +//import io.jsonwebtoken.Claims; +//import io.jsonwebtoken.ExpiredJwtException; +//import io.jsonwebtoken.SignatureException; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.web.servlet.HandlerInterceptor; +//import org.springframework.web.servlet.ModelAndView; +// +//import javax.servlet.http.HttpServletRequest; +//import javax.servlet.http.HttpServletResponse; +// +//public class TokenInterceptor implements HandlerInterceptor { +// @Autowired +// private IUserService userService; +// +// @Override +// public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { +// // 验证token是否存在 +// final String authHeader = httpServletRequest.getHeader(WebConstant.HEADER_KEY_TOKEN); +// if (authHeader == null || !authHeader.startsWith(WebConstant.HEADER_KEY_TOKEN_PREFIX)) { +// HttpServletUtil.responseJson(httpServletResponse, +// JacksonUtil.beanToJson(JsonResponse.newInstance().tokenNotFound())); +// return false; +// } +// final String token = authHeader.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); +// +// //验证token是否有效 +// Claims claims = null; +// try { +// claims = JwtUtil.parseJWT(token, WebConstant.JWT_ACCESS_TOKEN_SECERT); +// }catch(SignatureException e){ +// HttpServletUtil.responseJson(httpServletResponse, +// JacksonUtil.beanToJson(JsonResponse.newInstance().tokenSignatureFail(e.getMessage()))); +// return false; +// }catch(ExpiredJwtException e){ +// HttpServletUtil.responseJson(httpServletResponse, +// JacksonUtil.beanToJson(JsonResponse.newInstance().tokenExpire(e.getMessage()))); +// return false; +// }catch(Exception e){ +// HttpServletUtil.responseJson(httpServletResponse, +// JacksonUtil.beanToJson(JsonResponse.newInstance().tokenFailed(e.getMessage()))); +// return false; +// } +// +// //验证用户存根 +// if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){ +// HttpServletUtil.responseJson(httpServletResponse, +// JacksonUtil.beanToJson(JsonResponse.newInstance().tokenStubNotFound())); +// return false; +// } +// +// //验证用户是否禁用 +// SysUser user = userService.getUserById(Long.valueOf(claims.getSubject())); +// if(user.getRecStatus() == WebConstant.REC_STATUS.Disabled.value){ +// HttpServletUtil.responseJson(httpServletResponse, +// JacksonUtil.beanToJson(JsonResponse.newInstance().userDisabled())); +// return false; +// } +// +// //在request中存放claims +// httpServletRequest.setAttribute(WebConstant.REQUEST_KEY_CLAIMS,claims); +// return true; +// } +// +// @Override +// public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { +// +// } +// +// @Override +// public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { +// +// } +//} diff --git a/game/src/main/java/com/ccsens/game/intercept/MybatisInterceptor.java b/game/src/main/java/com/ccsens/game/intercept/MybatisInterceptor.java new file mode 100644 index 00000000..f696cdd5 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/intercept/MybatisInterceptor.java @@ -0,0 +1,154 @@ +package com.ccsens.game.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/game/src/main/java/com/ccsens/game/persist/mapper/GameActivityPrizeMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameActivityPrizeMapper.java new file mode 100644 index 00000000..3cc91bc8 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameActivityPrizeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameActivityPrize; +import com.ccsens.game.bean.po.GameActivityPrizeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameActivityPrizeMapper { + long countByExample(GameActivityPrizeExample example); + + int deleteByExample(GameActivityPrizeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameActivityPrize record); + + int insertSelective(GameActivityPrize record); + + List selectByExample(GameActivityPrizeExample example); + + GameActivityPrize selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameActivityPrize record, @Param("example") GameActivityPrizeExample example); + + int updateByExample(@Param("record") GameActivityPrize record, @Param("example") GameActivityPrizeExample example); + + int updateByPrimaryKeySelective(GameActivityPrize record); + + int updateByPrimaryKey(GameActivityPrize record); +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/persist/mapper/GameActivityRuleMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameActivityRuleMapper.java new file mode 100644 index 00000000..a65e7913 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameActivityRuleMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameActivityRule; +import com.ccsens.game.bean.po.GameActivityRuleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameActivityRuleMapper { + long countByExample(GameActivityRuleExample example); + + int deleteByExample(GameActivityRuleExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameActivityRule record); + + int insertSelective(GameActivityRule record); + + List selectByExample(GameActivityRuleExample example); + + GameActivityRule selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameActivityRule record, @Param("example") GameActivityRuleExample example); + + int updateByExample(@Param("record") GameActivityRule record, @Param("example") GameActivityRuleExample example); + + int updateByPrimaryKeySelective(GameActivityRule record); + + int updateByPrimaryKey(GameActivityRule record); +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/persist/mapper/GameMemberJoinMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameMemberJoinMapper.java new file mode 100644 index 00000000..39e97643 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameMemberJoinMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameMemberJoin; +import com.ccsens.game.bean.po.GameMemberJoinExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameMemberJoinMapper { + long countByExample(GameMemberJoinExample example); + + int deleteByExample(GameMemberJoinExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameMemberJoin record); + + int insertSelective(GameMemberJoin record); + + List selectByExample(GameMemberJoinExample example); + + GameMemberJoin selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameMemberJoin record, @Param("example") GameMemberJoinExample example); + + int updateByExample(@Param("record") GameMemberJoin record, @Param("example") GameMemberJoinExample example); + + int updateByPrimaryKeySelective(GameMemberJoin record); + + int updateByPrimaryKey(GameMemberJoin record); +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/persist/mapper/GameMemberMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameMemberMapper.java new file mode 100644 index 00000000..a3d7c3f9 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameMemberMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameMember; +import com.ccsens.game.bean.po.GameMemberExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameMemberMapper { + long countByExample(GameMemberExample example); + + int deleteByExample(GameMemberExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameMember record); + + int insertSelective(GameMember record); + + List selectByExample(GameMemberExample example); + + GameMember selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameMember record, @Param("example") GameMemberExample example); + + int updateByExample(@Param("record") GameMember record, @Param("example") GameMemberExample example); + + int updateByPrimaryKeySelective(GameMember record); + + int updateByPrimaryKey(GameMember record); +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/persist/mapper/GamePrizeInstructionsMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GamePrizeInstructionsMapper.java new file mode 100644 index 00000000..2e710591 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GamePrizeInstructionsMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GamePrizeInstructions; +import com.ccsens.game.bean.po.GamePrizeInstructionsExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GamePrizeInstructionsMapper { + long countByExample(GamePrizeInstructionsExample example); + + int deleteByExample(GamePrizeInstructionsExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GamePrizeInstructions record); + + int insertSelective(GamePrizeInstructions record); + + List selectByExample(GamePrizeInstructionsExample example); + + GamePrizeInstructions selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GamePrizeInstructions record, @Param("example") GamePrizeInstructionsExample example); + + int updateByExample(@Param("record") GamePrizeInstructions record, @Param("example") GamePrizeInstructionsExample example); + + int updateByPrimaryKeySelective(GamePrizeInstructions record); + + int updateByPrimaryKey(GamePrizeInstructions record); +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/persist/mapper/GameRecordMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameRecordMapper.java new file mode 100644 index 00000000..b1201a77 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameRecordMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameRecord; +import com.ccsens.game.bean.po.GameRecordExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameRecordMapper { + long countByExample(GameRecordExample example); + + int deleteByExample(GameRecordExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameRecord record); + + int insertSelective(GameRecord record); + + List selectByExample(GameRecordExample example); + + GameRecord selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameRecord record, @Param("example") GameRecordExample example); + + int updateByExample(@Param("record") GameRecord record, @Param("example") GameRecordExample example); + + int updateByPrimaryKeySelective(GameRecord record); + + int updateByPrimaryKey(GameRecord record); +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/persist/mapper/GameScoreLogMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameScoreLogMapper.java new file mode 100644 index 00000000..70fb7ae3 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameScoreLogMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameScoreLog; +import com.ccsens.game.bean.po.GameScoreLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameScoreLogMapper { + long countByExample(GameScoreLogExample example); + + int deleteByExample(GameScoreLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameScoreLog record); + + int insertSelective(GameScoreLog record); + + List selectByExample(GameScoreLogExample example); + + GameScoreLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameScoreLog record, @Param("example") GameScoreLogExample example); + + int updateByExample(@Param("record") GameScoreLog record, @Param("example") GameScoreLogExample example); + + int updateByPrimaryKeySelective(GameScoreLog record); + + int updateByPrimaryKey(GameScoreLog record); +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMapper.java new file mode 100644 index 00000000..c518f59b --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameType; +import com.ccsens.game.bean.po.GameTypeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameTypeMapper { + long countByExample(GameTypeExample example); + + int deleteByExample(GameTypeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameType record); + + int insertSelective(GameType record); + + List selectByExample(GameTypeExample example); + + GameType selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameType record, @Param("example") GameTypeExample example); + + int updateByExample(@Param("record") GameType record, @Param("example") GameTypeExample example); + + int updateByPrimaryKeySelective(GameType record); + + int updateByPrimaryKey(GameType record); +} \ No newline at end of file diff --git a/game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMemberMapper.java b/game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMemberMapper.java new file mode 100644 index 00000000..9c0cfcf0 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/mapper/GameTypeMemberMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.game.persist.mapper; + +import com.ccsens.game.bean.po.GameTypeMember; +import com.ccsens.game.bean.po.GameTypeMemberExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface GameTypeMemberMapper { + long countByExample(GameTypeMemberExample example); + + int deleteByExample(GameTypeMemberExample example); + + int deleteByPrimaryKey(Long id); + + int insert(GameTypeMember record); + + int insertSelective(GameTypeMember record); + + List selectByExample(GameTypeMemberExample example); + + GameTypeMember selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") GameTypeMember record, @Param("example") GameTypeMemberExample example); + + int updateByExample(@Param("record") GameTypeMember record, @Param("example") GameTypeMemberExample example); + + int updateByPrimaryKeySelective(GameTypeMember record); + + int updateByPrimaryKey(GameTypeMember record); +} \ No newline at end of file diff --git a/game/src/main/resources/application-common.yml b/game/src/main/resources/application-common.yml new file mode 100644 index 00000000..40efee80 --- /dev/null +++ b/game/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/game/src/main/resources/application-dev.yml b/game/src/main/resources/application-dev.yml new file mode 100644 index 00000000..756d63a5 --- /dev/null +++ b/game/src/main/resources/application-dev.yml @@ -0,0 +1,29 @@ +server: + port: 7050 + servlet: + context-path: +spring: + application: + name: game + 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/game/src/main/resources/application-test.yml b/game/src/main/resources/application-test.yml new file mode 100644 index 00000000..c71c01cc --- /dev/null +++ b/game/src/main/resources/application-test.yml @@ -0,0 +1,28 @@ +server: + port: 7050 + servlet: + context-path: +spring: + application: + name: game + 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/game/src/main/resources/application.yml b/game/src/main/resources/application.yml new file mode 100644 index 00000000..5c2cd5c4 --- /dev/null +++ b/game/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/game/src/main/resources/druid-dev.yml b/game/src/main/resources/druid-dev.yml new file mode 100644 index 00000000..72e5a813 --- /dev/null +++ b/game/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/game?useUnicode=true&characterEncoding=UTF-8 + username: root + validationQuery: SELECT 1 FROM DUAL + env: CCSENS_GAME \ No newline at end of file diff --git a/game/src/main/resources/druid-prod.yml b/game/src/main/resources/druid-prod.yml new file mode 100644 index 00000000..bc9a6a82 --- /dev/null +++ b/game/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/game?useUnicode=true&characterEncoding=UTF-8 + username: root + validationQuery: SELECT 1 FROM DUAL + env: CCSENS_GAME \ No newline at end of file diff --git a/game/src/main/resources/druid-test.yml b/game/src/main/resources/druid-test.yml new file mode 100644 index 00000000..bc9a6a82 --- /dev/null +++ b/game/src/main/resources/druid-test.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/game?useUnicode=true&characterEncoding=UTF-8 + username: root + validationQuery: SELECT 1 FROM DUAL + env: CCSENS_GAME \ No newline at end of file diff --git a/game/src/main/resources/logback-spring.xml b/game/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..05caf6e3 --- /dev/null +++ b/game/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/game/src/main/resources/mapper_raw/GameActivityPrizeMapper.xml b/game/src/main/resources/mapper_raw/GameActivityPrizeMapper.xml new file mode 100644 index 00000000..7d250f60 --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameActivityPrizeMapper.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, game_id, sequence, description, created_at, updated_at, rec_status + + + + + delete from t_game_activity_prize + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_activity_prize + + + + + + insert into t_game_activity_prize (id, game_id, sequence, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{gameId,jdbcType=BIGINT}, #{sequence,jdbcType=INTEGER}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_game_activity_prize + + + id, + + + game_id, + + + sequence, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{gameId,jdbcType=BIGINT}, + + + #{sequence,jdbcType=INTEGER}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_activity_prize + + + id = #{record.id,jdbcType=BIGINT}, + + + game_id = #{record.gameId,jdbcType=BIGINT}, + + + sequence = #{record.sequence,jdbcType=INTEGER}, + + + 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_game_activity_prize + set id = #{record.id,jdbcType=BIGINT}, + game_id = #{record.gameId,jdbcType=BIGINT}, + sequence = #{record.sequence,jdbcType=INTEGER}, + 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_game_activity_prize + + + game_id = #{gameId,jdbcType=BIGINT}, + + + sequence = #{sequence,jdbcType=INTEGER}, + + + 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_game_activity_prize + set game_id = #{gameId,jdbcType=BIGINT}, + sequence = #{sequence,jdbcType=INTEGER}, + 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/game/src/main/resources/mapper_raw/GameActivityRuleMapper.xml b/game/src/main/resources/mapper_raw/GameActivityRuleMapper.xml new file mode 100644 index 00000000..12ca4471 --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameActivityRuleMapper.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, game_id, sequence, description, created_at, updated_at, rec_status + + + + + delete from t_game_activity_rule + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_activity_rule + + + + + + insert into t_game_activity_rule (id, game_id, sequence, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{gameId,jdbcType=BIGINT}, #{sequence,jdbcType=INTEGER}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_game_activity_rule + + + id, + + + game_id, + + + sequence, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{gameId,jdbcType=BIGINT}, + + + #{sequence,jdbcType=INTEGER}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_activity_rule + + + id = #{record.id,jdbcType=BIGINT}, + + + game_id = #{record.gameId,jdbcType=BIGINT}, + + + sequence = #{record.sequence,jdbcType=INTEGER}, + + + 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_game_activity_rule + set id = #{record.id,jdbcType=BIGINT}, + game_id = #{record.gameId,jdbcType=BIGINT}, + sequence = #{record.sequence,jdbcType=INTEGER}, + 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_game_activity_rule + + + game_id = #{gameId,jdbcType=BIGINT}, + + + sequence = #{sequence,jdbcType=INTEGER}, + + + 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_game_activity_rule + set game_id = #{gameId,jdbcType=BIGINT}, + sequence = #{sequence,jdbcType=INTEGER}, + 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/game/src/main/resources/mapper_raw/GameMemberJoinMapper.xml b/game/src/main/resources/mapper_raw/GameMemberJoinMapper.xml new file mode 100644 index 00000000..4c288a1d --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameMemberJoinMapper.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, member_id, record_id, times, score, created_at, updated_at, rec_status + + + + + delete from t_game_member_join + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_member_join + + + + + + insert into t_game_member_join (id, member_id, record_id, + times, score, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT}, + #{times,jdbcType=VARCHAR}, #{score,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_game_member_join + + + id, + + + member_id, + + + record_id, + + + times, + + + score, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{memberId,jdbcType=BIGINT}, + + + #{recordId,jdbcType=BIGINT}, + + + #{times,jdbcType=VARCHAR}, + + + #{score,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_member_join + + + id = #{record.id,jdbcType=BIGINT}, + + + member_id = #{record.memberId,jdbcType=BIGINT}, + + + record_id = #{record.recordId,jdbcType=BIGINT}, + + + times = #{record.times,jdbcType=VARCHAR}, + + + score = #{record.score,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_game_member_join + set id = #{record.id,jdbcType=BIGINT}, + member_id = #{record.memberId,jdbcType=BIGINT}, + record_id = #{record.recordId,jdbcType=BIGINT}, + times = #{record.times,jdbcType=VARCHAR}, + score = #{record.score,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_game_member_join + + + member_id = #{memberId,jdbcType=BIGINT}, + + + record_id = #{recordId,jdbcType=BIGINT}, + + + times = #{times,jdbcType=VARCHAR}, + + + score = #{score,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_game_member_join + set member_id = #{memberId,jdbcType=BIGINT}, + record_id = #{recordId,jdbcType=BIGINT}, + times = #{times,jdbcType=VARCHAR}, + score = #{score,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/game/src/main/resources/mapper_raw/GameMemberMapper.xml b/game/src/main/resources/mapper_raw/GameMemberMapper.xml new file mode 100644 index 00000000..6f3d1fb5 --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameMemberMapper.xml @@ -0,0 +1,465 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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, grade, subscribe, openid, unionid, nickname, headimgurl, sex, language, city, + province, country, subscribe_time, remark, groupid, subscribe_scene, qr_scene, qr_scene_str, + created_at, updated_at, rec_status + + + + + delete from t_game_member + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_member + + + + + + insert into t_game_member (id, grade, subscribe, + openid, unionid, nickname, + headimgurl, sex, language, + city, province, country, + subscribe_time, remark, groupid, + subscribe_scene, qr_scene, qr_scene_str, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{grade,jdbcType=TINYINT}, #{subscribe,jdbcType=TINYINT}, + #{openid,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, + #{headimgurl,jdbcType=VARCHAR}, #{sex,jdbcType=TINYINT}, #{language,jdbcType=VARCHAR}, + #{city,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR}, + #{subscribeTime,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR}, #{groupid,jdbcType=BIGINT}, + #{subscribeScene,jdbcType=VARCHAR}, #{qrScene,jdbcType=BIGINT}, #{qrSceneStr,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_game_member + + + id, + + + grade, + + + subscribe, + + + openid, + + + unionid, + + + nickname, + + + headimgurl, + + + sex, + + + language, + + + city, + + + province, + + + country, + + + subscribe_time, + + + remark, + + + groupid, + + + subscribe_scene, + + + qr_scene, + + + qr_scene_str, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{grade,jdbcType=TINYINT}, + + + #{subscribe,jdbcType=TINYINT}, + + + #{openid,jdbcType=VARCHAR}, + + + #{unionid,jdbcType=VARCHAR}, + + + #{nickname,jdbcType=VARCHAR}, + + + #{headimgurl,jdbcType=VARCHAR}, + + + #{sex,jdbcType=TINYINT}, + + + #{language,jdbcType=VARCHAR}, + + + #{city,jdbcType=VARCHAR}, + + + #{province,jdbcType=VARCHAR}, + + + #{country,jdbcType=VARCHAR}, + + + #{subscribeTime,jdbcType=BIGINT}, + + + #{remark,jdbcType=VARCHAR}, + + + #{groupid,jdbcType=BIGINT}, + + + #{subscribeScene,jdbcType=VARCHAR}, + + + #{qrScene,jdbcType=BIGINT}, + + + #{qrSceneStr,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_member + + + id = #{record.id,jdbcType=BIGINT}, + + + grade = #{record.grade,jdbcType=TINYINT}, + + + subscribe = #{record.subscribe,jdbcType=TINYINT}, + + + openid = #{record.openid,jdbcType=VARCHAR}, + + + unionid = #{record.unionid,jdbcType=VARCHAR}, + + + nickname = #{record.nickname,jdbcType=VARCHAR}, + + + headimgurl = #{record.headimgurl,jdbcType=VARCHAR}, + + + sex = #{record.sex,jdbcType=TINYINT}, + + + language = #{record.language,jdbcType=VARCHAR}, + + + city = #{record.city,jdbcType=VARCHAR}, + + + province = #{record.province,jdbcType=VARCHAR}, + + + country = #{record.country,jdbcType=VARCHAR}, + + + subscribe_time = #{record.subscribeTime,jdbcType=BIGINT}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + groupid = #{record.groupid,jdbcType=BIGINT}, + + + subscribe_scene = #{record.subscribeScene,jdbcType=VARCHAR}, + + + qr_scene = #{record.qrScene,jdbcType=BIGINT}, + + + qr_scene_str = #{record.qrSceneStr,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_game_member + set id = #{record.id,jdbcType=BIGINT}, + grade = #{record.grade,jdbcType=TINYINT}, + subscribe = #{record.subscribe,jdbcType=TINYINT}, + openid = #{record.openid,jdbcType=VARCHAR}, + unionid = #{record.unionid,jdbcType=VARCHAR}, + nickname = #{record.nickname,jdbcType=VARCHAR}, + headimgurl = #{record.headimgurl,jdbcType=VARCHAR}, + sex = #{record.sex,jdbcType=TINYINT}, + language = #{record.language,jdbcType=VARCHAR}, + city = #{record.city,jdbcType=VARCHAR}, + province = #{record.province,jdbcType=VARCHAR}, + country = #{record.country,jdbcType=VARCHAR}, + subscribe_time = #{record.subscribeTime,jdbcType=BIGINT}, + remark = #{record.remark,jdbcType=VARCHAR}, + groupid = #{record.groupid,jdbcType=BIGINT}, + subscribe_scene = #{record.subscribeScene,jdbcType=VARCHAR}, + qr_scene = #{record.qrScene,jdbcType=BIGINT}, + qr_scene_str = #{record.qrSceneStr,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_game_member + + + grade = #{grade,jdbcType=TINYINT}, + + + subscribe = #{subscribe,jdbcType=TINYINT}, + + + openid = #{openid,jdbcType=VARCHAR}, + + + unionid = #{unionid,jdbcType=VARCHAR}, + + + nickname = #{nickname,jdbcType=VARCHAR}, + + + headimgurl = #{headimgurl,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=TINYINT}, + + + language = #{language,jdbcType=VARCHAR}, + + + city = #{city,jdbcType=VARCHAR}, + + + province = #{province,jdbcType=VARCHAR}, + + + country = #{country,jdbcType=VARCHAR}, + + + subscribe_time = #{subscribeTime,jdbcType=BIGINT}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + groupid = #{groupid,jdbcType=BIGINT}, + + + subscribe_scene = #{subscribeScene,jdbcType=VARCHAR}, + + + qr_scene = #{qrScene,jdbcType=BIGINT}, + + + qr_scene_str = #{qrSceneStr,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_game_member + set grade = #{grade,jdbcType=TINYINT}, + subscribe = #{subscribe,jdbcType=TINYINT}, + openid = #{openid,jdbcType=VARCHAR}, + unionid = #{unionid,jdbcType=VARCHAR}, + nickname = #{nickname,jdbcType=VARCHAR}, + headimgurl = #{headimgurl,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=TINYINT}, + language = #{language,jdbcType=VARCHAR}, + city = #{city,jdbcType=VARCHAR}, + province = #{province,jdbcType=VARCHAR}, + country = #{country,jdbcType=VARCHAR}, + subscribe_time = #{subscribeTime,jdbcType=BIGINT}, + remark = #{remark,jdbcType=VARCHAR}, + groupid = #{groupid,jdbcType=BIGINT}, + subscribe_scene = #{subscribeScene,jdbcType=VARCHAR}, + qr_scene = #{qrScene,jdbcType=BIGINT}, + qr_scene_str = #{qrSceneStr,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/game/src/main/resources/mapper_raw/GamePrizeInstructionsMapper.xml b/game/src/main/resources/mapper_raw/GamePrizeInstructionsMapper.xml new file mode 100644 index 00000000..d2e73981 --- /dev/null +++ b/game/src/main/resources/mapper_raw/GamePrizeInstructionsMapper.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, game_id, sequence, description, created_at, updated_at, rec_status + + + + + delete from t_game_prize_instructions + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_prize_instructions + + + + + + insert into t_game_prize_instructions (id, game_id, sequence, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{gameId,jdbcType=BIGINT}, #{sequence,jdbcType=INTEGER}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_game_prize_instructions + + + id, + + + game_id, + + + sequence, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{gameId,jdbcType=BIGINT}, + + + #{sequence,jdbcType=INTEGER}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_prize_instructions + + + id = #{record.id,jdbcType=BIGINT}, + + + game_id = #{record.gameId,jdbcType=BIGINT}, + + + sequence = #{record.sequence,jdbcType=INTEGER}, + + + 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_game_prize_instructions + set id = #{record.id,jdbcType=BIGINT}, + game_id = #{record.gameId,jdbcType=BIGINT}, + sequence = #{record.sequence,jdbcType=INTEGER}, + 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_game_prize_instructions + + + game_id = #{gameId,jdbcType=BIGINT}, + + + sequence = #{sequence,jdbcType=INTEGER}, + + + 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_game_prize_instructions + set game_id = #{gameId,jdbcType=BIGINT}, + sequence = #{sequence,jdbcType=INTEGER}, + 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/game/src/main/resources/mapper_raw/GameRecordMapper.xml b/game/src/main/resources/mapper_raw/GameRecordMapper.xml new file mode 100644 index 00000000..b8172e61 --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameRecordMapper.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, type_member_id, url, QR_code_url, start_time, end_time, game_status, created_at, + updated_at, rec_status + + + + + delete from t_game_record + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_record + + + + + + insert into t_game_record (id, type_member_id, url, + QR_code_url, start_time, end_time, + game_status, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{typeMemberId,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR}, + #{qrCodeUrl,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, + #{gameStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_game_record + + + id, + + + type_member_id, + + + url, + + + QR_code_url, + + + start_time, + + + end_time, + + + game_status, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{typeMemberId,jdbcType=BIGINT}, + + + #{url,jdbcType=VARCHAR}, + + + #{qrCodeUrl,jdbcType=VARCHAR}, + + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + #{gameStatus,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_record + + + id = #{record.id,jdbcType=BIGINT}, + + + type_member_id = #{record.typeMemberId,jdbcType=BIGINT}, + + + url = #{record.url,jdbcType=VARCHAR}, + + + QR_code_url = #{record.qrCodeUrl,jdbcType=VARCHAR}, + + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + game_status = #{record.gameStatus,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_game_record + set id = #{record.id,jdbcType=BIGINT}, + type_member_id = #{record.typeMemberId,jdbcType=BIGINT}, + url = #{record.url,jdbcType=VARCHAR}, + QR_code_url = #{record.qrCodeUrl,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, + game_status = #{record.gameStatus,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_game_record + + + type_member_id = #{typeMemberId,jdbcType=BIGINT}, + + + url = #{url,jdbcType=VARCHAR}, + + + QR_code_url = #{qrCodeUrl,jdbcType=VARCHAR}, + + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + game_status = #{gameStatus,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_game_record + set type_member_id = #{typeMemberId,jdbcType=BIGINT}, + url = #{url,jdbcType=VARCHAR}, + QR_code_url = #{qrCodeUrl,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, + game_status = #{gameStatus,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/game/src/main/resources/mapper_raw/GameScoreLogMapper.xml b/game/src/main/resources/mapper_raw/GameScoreLogMapper.xml new file mode 100644 index 00000000..c61160b2 --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameScoreLogMapper.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, member_id, record_id, operation_type, created_at, updated_at, rec_status + + + + + delete from t_game_score_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_score_log + + + + + + insert into t_game_score_log (id, member_id, record_id, + operation_type, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{recordId,jdbcType=BIGINT}, + #{operationType,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_game_score_log + + + id, + + + member_id, + + + record_id, + + + operation_type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{memberId,jdbcType=BIGINT}, + + + #{recordId,jdbcType=BIGINT}, + + + #{operationType,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_score_log + + + id = #{record.id,jdbcType=BIGINT}, + + + member_id = #{record.memberId,jdbcType=BIGINT}, + + + record_id = #{record.recordId,jdbcType=BIGINT}, + + + operation_type = #{record.operationType,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_game_score_log + set id = #{record.id,jdbcType=BIGINT}, + member_id = #{record.memberId,jdbcType=BIGINT}, + record_id = #{record.recordId,jdbcType=BIGINT}, + operation_type = #{record.operationType,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_game_score_log + + + member_id = #{memberId,jdbcType=BIGINT}, + + + record_id = #{recordId,jdbcType=BIGINT}, + + + operation_type = #{operationType,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_game_score_log + set member_id = #{memberId,jdbcType=BIGINT}, + record_id = #{recordId,jdbcType=BIGINT}, + operation_type = #{operationType,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/game/src/main/resources/mapper_raw/GameTypeMapper.xml b/game/src/main/resources/mapper_raw/GameTypeMapper.xml new file mode 100644 index 00000000..db08eb0e --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameTypeMapper.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, code, name, description, pay_type, created_at, updated_at, rec_status + + + + + delete from t_game_type + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_type + + + + + + insert into t_game_type (id, code, name, + description, pay_type, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_game_type + + + id, + + + code, + + + name, + + + description, + + + pay_type, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{code,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{payType,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_type + + + id = #{record.id,jdbcType=BIGINT}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + pay_type = #{record.payType,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_game_type + set id = #{record.id,jdbcType=BIGINT}, + code = #{record.code,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + pay_type = #{record.payType,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_game_type + + + code = #{code,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + pay_type = #{payType,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_game_type + set code = #{code,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + pay_type = #{payType,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/game/src/main/resources/mapper_raw/GameTypeMemberMapper.xml b/game/src/main/resources/mapper_raw/GameTypeMemberMapper.xml new file mode 100644 index 00000000..686807de --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameTypeMemberMapper.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, member_id, game_type_id, total_count, used_count, created_time, due_time, created_at, + updated_at, rec_status + + + + + delete from t_game_type_member + where id = #{id,jdbcType=BIGINT} + + + delete from t_game_type_member + + + + + + insert into t_game_type_member (id, member_id, game_type_id, + total_count, used_count, created_time, + due_time, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{gameTypeId,jdbcType=BIGINT}, + #{totalCount,jdbcType=INTEGER}, #{usedCount,jdbcType=INTEGER}, #{createdTime,jdbcType=BIGINT}, + #{dueTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_game_type_member + + + id, + + + member_id, + + + game_type_id, + + + total_count, + + + used_count, + + + created_time, + + + due_time, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{memberId,jdbcType=BIGINT}, + + + #{gameTypeId,jdbcType=BIGINT}, + + + #{totalCount,jdbcType=INTEGER}, + + + #{usedCount,jdbcType=INTEGER}, + + + #{createdTime,jdbcType=BIGINT}, + + + #{dueTime,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_game_type_member + + + id = #{record.id,jdbcType=BIGINT}, + + + member_id = #{record.memberId,jdbcType=BIGINT}, + + + game_type_id = #{record.gameTypeId,jdbcType=BIGINT}, + + + total_count = #{record.totalCount,jdbcType=INTEGER}, + + + used_count = #{record.usedCount,jdbcType=INTEGER}, + + + created_time = #{record.createdTime,jdbcType=BIGINT}, + + + due_time = #{record.dueTime,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_game_type_member + set id = #{record.id,jdbcType=BIGINT}, + member_id = #{record.memberId,jdbcType=BIGINT}, + game_type_id = #{record.gameTypeId,jdbcType=BIGINT}, + total_count = #{record.totalCount,jdbcType=INTEGER}, + used_count = #{record.usedCount,jdbcType=INTEGER}, + created_time = #{record.createdTime,jdbcType=BIGINT}, + due_time = #{record.dueTime,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_game_type_member + + + member_id = #{memberId,jdbcType=BIGINT}, + + + game_type_id = #{gameTypeId,jdbcType=BIGINT}, + + + total_count = #{totalCount,jdbcType=INTEGER}, + + + used_count = #{usedCount,jdbcType=INTEGER}, + + + created_time = #{createdTime,jdbcType=BIGINT}, + + + due_time = #{dueTime,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_game_type_member + set member_id = #{memberId,jdbcType=BIGINT}, + game_type_id = #{gameTypeId,jdbcType=BIGINT}, + total_count = #{totalCount,jdbcType=INTEGER}, + used_count = #{usedCount,jdbcType=INTEGER}, + created_time = #{createdTime,jdbcType=BIGINT}, + due_time = #{dueTime,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/game/src/main/resources/mbg.xml b/game/src/main/resources/mbg.xml new file mode 100644 index 00000000..2c2d6ce8 --- /dev/null +++ b/game/src/main/resources/mbg.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+ + +
+
\ No newline at end of file diff --git a/game/src/main/resources/mybatis/mybatis-config.xml b/game/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 00000000..06ec6488 --- /dev/null +++ b/game/src/main/resources/mybatis/mybatis-config.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/game/src/test/java/com/ccsens/game/GameApplicationTests.java b/game/src/test/java/com/ccsens/game/GameApplicationTests.java new file mode 100644 index 00000000..df1da3eb --- /dev/null +++ b/game/src/test/java/com/ccsens/game/GameApplicationTests.java @@ -0,0 +1,15 @@ +package com.ccsens.game; + + +import org.junit.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class GameApplicationTests { + + @Test + void contextLoads() { + + } + +} diff --git a/pom.xml b/pom.xml index 4f599519..46ce8837 100644 --- a/pom.xml +++ b/pom.xml @@ -10,6 +10,7 @@ ht tall util + game com.ccsens diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/message/MasterStatusMessageWithReportDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/message/MasterStatusMessageWithReportDto.java index 4c9e2769..c0fb6d46 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/message/MasterStatusMessageWithReportDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/message/MasterStatusMessageWithReportDto.java @@ -12,7 +12,7 @@ package com.ccsens.tall.bean.dto.message;//package com.ccsens.ptpro.bean.dto.mes // @Setter // @Getter // public static class Data{ -//// private List motorStatuses; +// private List motorStatuses; //// private Long masterId; // } // 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 d3101eef..4c4cbcbb 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 @@ -88,6 +88,8 @@ public class ProjectVo { private int slide; @ApiModelProperty("筛选框显示 0:都显示 1:都不显示 2.只展示时间轴/清单") private int filter; + @ApiModelProperty("是否展示添加任务按钮 0:不展示 1:展示") + private int createTask; } @ApiModel 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 463bf2ea..01b57640 100644 --- a/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java +++ b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java @@ -16,10 +16,7 @@ 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.ContentNegotiationConfigurer; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.config.annotation.*; import javax.sql.DataSource; import java.nio.charset.Charset; @@ -80,6 +77,11 @@ public class SpringConfig implements WebMvcConfigurer { } + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS"); + } + /** * 配置视图解析器 SpringBoot建议使用Thymeleaf代替jsp,动态页面默认路径:resources/template,静态页面默认路径: resources/static * @return diff --git a/tall/src/main/java/com/ccsens/tall/service/ExcelMtService.java b/tall/src/main/java/com/ccsens/tall/service/ExcelMtService.java new file mode 100644 index 00000000..57759c8e --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/ExcelMtService.java @@ -0,0 +1,1106 @@ +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.po.*; +import com.ccsens.tall.bean.vo.ProjectVo; +import com.ccsens.tall.persist.dao.SysPluginDao; +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 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.io.FileInputStream; +import java.io.InputStream; +import java.util.*; + +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class ExcelMtService implements IExcelMtService { + @Autowired + private SysPluginDao sysPluginDao; + @Autowired + private IProjectService projectService; + @Autowired + private IProShowService proShowService; + @Autowired + private Snowflake snowflake; + @Autowired + private IProRoleService proRoleService; + @Autowired + private IProMemberRoleService proMemberRoleService; + @Autowired + private IExcludeRoleService excludeRoleService; + @Autowired + private IProMemberService proMemberService; + @Autowired + private IProTaskDetailService proTaskDetailService; + @Autowired + private ITaskSubTimeService taskSubTimeService; + @Autowired + private ITaskMemberService taskMemberService; + @Autowired + private ITaskDeliverService taskDeliverService; + @Autowired + private ITaskPluginService taskPluginService; + @Autowired + private IUserService userService; + @Autowired + private IUserAttentionService userAttentionService; + + + @Override + public ProjectVo.ProjectInfo readXls(String path, Long currentUserId) throws Exception { + InputStream is = new FileInputStream(path); + XSSFWorkbook xssfWorkbook = new XSSFWorkbook(is); + //读取WBS表 + SysProject sysProject = readWbs(xssfWorkbook, currentUserId); + ProjectVo.ProjectInfo projectInfo = selectByProjectId(currentUserId, sysProject); + return projectInfo; + } + + /** + * 读取Wbs + */ + public SysProject readWbs(XSSFWorkbook xssfWorkbook, Long currentUserId) throws Exception { + //项目 + SysProject sysProject = new SysProject(); + //角色 + List proRoles = new ArrayList<>(); + //成员 + List proMembers = new ArrayList<>(); + //任务 + List taskDetails = new ArrayList<>(); + + XSSFSheet memberSheet = xssfWorkbook.getSheet("项目成员表"); + XSSFSheet wbsSheet = xssfWorkbook.getSheetAt(0);//wbs + + int projectInfoStart = 0; + int projectInfoEnd = 0; + int memberStart = 0; + int memberEnd = 0; + int taskStart = 0; + int taskEnd = 0; + + taskEnd = wbsSheet.getLastRowNum(); + for (int i = 0; i <= wbsSheet.getLastRowNum(); i++) { + XSSFRow xssfRow = wbsSheet.getRow(i); + + if (xssfRow == null) { + continue; + } + XSSFCell xssfCell = xssfRow.getCell(0); + if (xssfCell == null) { + continue; + } + String s = ExcelUtil.getCellValue(xssfCell); + + if (s.indexOf("项目信息") == 0) { + projectInfoStart = i + 1; + } + if (s.indexOf("项目成员") == 0) { + projectInfoEnd = i - 1; + memberStart = i + 1; + } + if (s.indexOf("项目任务分解") == 0) { + memberEnd = i - 1; + taskStart = i + 1; + } + } + if (projectInfoStart == 0) { + throw new BaseException(CodeEnum.WSB_NOT_PROJECT_HEADER); + } + if (projectInfoStart == 0) { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER_HEADER); + } + if (projectInfoStart == 0) { + throw new BaseException(CodeEnum.WSB_NOT_TASK_HEADER); + } + readProject(wbsSheet, projectInfoStart, projectInfoEnd, currentUserId, sysProject); + readMember(xssfWorkbook, wbsSheet, memberSheet, memberStart, memberEnd, sysProject, proRoles, proMembers); + readTask(xssfWorkbook, wbsSheet, taskStart, taskEnd, currentUserId, sysProject, taskDetails, proRoles, proMembers); + saveProTaskSubTime(taskDetails); + //读取插件表 + readPlugin(xssfWorkbook, taskDetails, proRoles); + return sysProject; + } + + /** + * 添加项目 + */ + private void readProject(XSSFSheet wbsSheet, int projectInfoStart, int projectInfoEnd, Long currentUserId, SysProject sysProject) { + XSSFRow row = wbsSheet.getRow(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; + try { + beginTime = Long.parseLong(begin); + endTime = Long.parseLong(end); + } catch (Exception e) { + //日期格式错误 + throw new BaseException(CodeEnum.WBS_PROJECT_TIME_ERROR); + } + sysProject.setId(snowflake.nextId()); + sysProject.setName(projectName); + sysProject.setDescription(ExcelUtil.getCellValue(row.getCell(1))); + sysProject.setAddress(ExcelUtil.getCellValue(row.getCell(2))); + sysProject.setBeginTime(beginTime); + sysProject.setEndTime(endTime); + sysProject.setCreatorId(currentUserId); + //是否发布,默认是1发布的 + sysProject.setPublished((byte) 1); + //是否是模板,新加的不是模板 0 + sysProject.setTemplate((byte) 0); + projectService.saveProject(sysProject); + System.out.println(sysProject); + //TODO 添加项目的展示配置 暂时全是默认 + ProShow proShow = new ProShow(); + proShow.setId(snowflake.nextId()); + proShow.setProjectId(sysProject.getId()); + proShowService.saveProShow(proShow); + } else { + //没有开始结束时间 + throw new BaseException(CodeEnum.WBS_NOT_PROJECT_TIME); + } + } else { + //没有项目名 + throw new BaseException(CodeEnum.WBS_NOT_PROJECT_NAME); + } + } + + /** + * 读取成员相关 + */ + private void readMember(XSSFWorkbook xssfWorkbook, XSSFSheet wbsSheet, XSSFSheet memberSheet, int memberStart, int memberEnd, + SysProject sysProject, List proRoles, List proMembers) throws Exception { + + //添加奖惩干系人角色(一级角色) + 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); + proRoles.add(stakeholderRole); + //添加奖惩干系人角色(二级角色) + ProRole stakeholderProRole = new ProRole(); + stakeholderProRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.value); + stakeholderProRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.phase); + stakeholderProRole.setParentId(stakeholderRole.getId()); + stakeholderProRole.setProjectId(sysProject.getId()); + stakeholderProRole.setId(snowflake.nextId()); + proRoleService.saveProRole(stakeholderProRole); + proRoles.add(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); + proRoles.add(creator); + //添加创建者角色(二级角色) + ProRole creatorRole = new ProRole(); + creatorRole.setName(WebConstant.ROLE_NAME.Creator.value); + creatorRole.setDescription(WebConstant.ROLE_NAME.Creator.phase); + creatorRole.setParentId(creator.getId()); + creatorRole.setProjectId(sysProject.getId()); + creatorRole.setId(snowflake.nextId()); + proRoleService.saveProRole(creatorRole); + proRoles.add(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); + proRoles.add(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); + proRoles.add(attentionRole); + + //添加成员和奖惩干系人 + memberWhitStakeholder(xssfWorkbook, memberSheet, stakeholderProRole.getId(), sysProject, proMembers); + + Long firstRoleId = null; + Long secondRoleId = null; + for (int i = memberStart + 1; i <= memberEnd; i++) { + XSSFRow row = wbsSheet.getRow(i); + String proRoleCell = ExcelUtil.getCellValue(row.getCell(1)); + String secondRoleCell = ExcelUtil.getCellValue(row.getCell(2)); + String memberCell = ExcelUtil.getCellValue(row.getCell(3)); + //添加一级角色 + if (StrUtil.isNotEmpty(proRoleCell)) { + ProRole role = new ProRole(); + role.setId(snowflake.nextId()); + role.setProjectId(sysProject.getId()); + if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.God.phase)) { + role.setName(WebConstant.ROLE_NAME.God.value); + role.setDescription(WebConstant.ROLE_NAME.God.phase); + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.ManageRepresent.phase)) { + role.setName(WebConstant.ROLE_NAME.ManageRepresent.value); + role.setDescription(WebConstant.ROLE_NAME.ManageRepresent.phase); + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Stakeholder.phase)) { + role.setName(WebConstant.ROLE_NAME.Stakeholder.value); + role.setDescription(WebConstant.ROLE_NAME.Stakeholder.phase); + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.PM.phase)) { + role.setName(WebConstant.ROLE_NAME.PM.value); + role.setDescription(WebConstant.ROLE_NAME.PM.phase); + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Member.phase)) { + role.setName(WebConstant.ROLE_NAME.Member.value); + role.setDescription(WebConstant.ROLE_NAME.Member.phase); + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Attention.phase)) { + role.setName(WebConstant.ROLE_NAME.Attention.value); + role.setDescription(WebConstant.ROLE_NAME.Attention.phase); + } else { + throw new BaseException(CodeEnum.WBS_NOT_FIRST_ROLE.addMsg(wbsSheet.getSheetName() + i)); + } + proRoleService.saveProRole(role); + proRoles.add(role); + firstRoleId = role.getId(); + + } + if (ObjectUtil.isNull(firstRoleId)) { + throw new BaseException("找不到系统角色[" + i + "]"); + } + //二级角色 + if (StrUtil.isNotEmpty(secondRoleCell)) { + if (!proMemberRoleExist(secondRoleCell, proRoles)) { + ProRole proRole = new ProRole(); + proRole.setName(secondRoleCell); + proRole.setParentId(firstRoleId); + proRole.setProjectId(sysProject.getId()); + proRole.setId(snowflake.nextId()); + proRoleService.saveProRole(proRole); + proRoles.add(proRole); + secondRoleId = proRole.getId(); + } else { + throw new BaseException(CodeEnum.WBS_REPEAT_ROLE_NAME.addMsg(wbsSheet.getSheetName() + i)); + } + } + if (ObjectUtil.isNull(secondRoleId)) { + throw new BaseException("找不到二级角色[" + i + "]"); + } + + if (StrUtil.isNotEmpty(memberCell)) { + ProMemberRole memberRole = null; + for (ProMember member : proMembers) { + if (memberCell.equalsIgnoreCase(member.getNickname())) { + memberRole = new ProMemberRole(); + memberRole.setId(snowflake.nextId()); + memberRole.setMemberId(member.getId()); + memberRole.setRoleId(secondRoleId); + proMemberRoleService.saveMemberRole(memberRole); + } + } + if (ObjectUtil.isNull(memberRole)) { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(wbsSheet.getSheetName() + i)); + } + } + } + //角色对谁不可见 + String[] excludeRoleCells; + for (int i = memberStart + 1; i <= memberEnd; i++) { + XSSFRow row = wbsSheet.getRow(i); + String secondRoleCell = ExcelUtil.getCellValue(row.getCell(2)); + String excludeRoleCell = StringUtil.replaceComma(ExcelUtil.getCellValue(row.getCell(4))); + //获取角色对谁不可见 + if (StrUtil.isNotEmpty(excludeRoleCell)) { + excludeRoleCells = excludeRoleCell.split(","); + + Long proRoleId = null; + if (StrUtil.isNotEmpty(secondRoleCell)) { + for (ProRole role : proRoles) { + if (secondRoleCell.equalsIgnoreCase(role.getName())) { + proRoleId = role.getId(); + break; + } + } + } + + if (ObjectUtil.isNotNull(excludeRoleCells)) { + for (int a = 0; a < excludeRoleCells.length; a++) { + ProRoleExclude excludeRole = new ProRoleExclude(); + excludeRole.setId(snowflake.nextId()); + excludeRole.setRoleId(proRoleId); + if (CollectionUtil.isNotEmpty(proRoles)) { + Long roleId = null; + for (ProRole memberRole : proRoles) { + if (excludeRoleCells[a].equals(memberRole.getName())) { + roleId = memberRole.getId(); + excludeRole.setOtherRoleId(roleId); + break; + } + } + if (ObjectUtil.isNull(roleId)) { + throw new BaseException(CodeEnum.WBS_NOT_FIND_ROLE.addMsg(wbsSheet.getSheetName() + i)); + } + } + excludeRoleService.saveExcludeRole(excludeRole); + } + } + } + } + + //TODO 添加mvp角色 + ProRole proMemberRole = new ProRole(); + proMemberRole.setName(WebConstant.ROLE_NAME.MVP.phase); + proMemberRole.setParentId(firstRoleId); + proMemberRole.setProjectId(sysProject.getId()); + proMemberRole.setId(snowflake.nextId()); + proRoleService.saveProRole(proMemberRole); + proRoles.add(proMemberRole); + } + + /** + * 判断集合是否为空,有没有相同内容 + */ + private boolean proMemberRoleExist(String memberRoleName, List proRoles) { + if (CollectionUtil.isNotEmpty(proRoles)) { + for (ProRole proMemberRole : proRoles) { + if (proMemberRole.getName().equals(memberRoleName)) { + return true; + } + } + } + return false; + } + + /** + * 添加成员与奖惩干系人 + */ + private void memberWhitStakeholder(XSSFWorkbook xssfWorkbook, XSSFSheet memberSheet, Long stakeholderId, SysProject sysProject, List proMembers) throws Exception { + List stakeholderList = new ArrayList<>(); + if (ObjectUtil.isNotNull(memberSheet)) { + 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)); + ProMember stakeholder = null; + ProMember member = null; + //手机号不能为空 + if (StrUtil.isNotEmpty(memberCell) && StrUtil.isEmpty(phoneCell)) { + XSSFSheet sheet = xssfWorkbook.getSheet(memberCell); + if (ObjectUtil.isNull(sheet)) { + throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(memberSheet.getSheetName() + i)); + }else { + if("评委表".equalsIgnoreCase(sheet.getSheetName())){ + judgeSheet(sheet,sysProject,proMembers); + }else if("选手信息表".equalsIgnoreCase(sheet.getSheetName())){ + companySheet(sheet,sysProject,proMembers); + } + } + + } + + if ((StrUtil.isNotEmpty(stakeholderCell) && StrUtil.isEmpty(stakeholderPhoneCell))) { + throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(memberSheet.getSheetName() + i)); + } + //TODO 判断手机号格式 + + //添加奖惩干系人 + if (StrUtil.isNotEmpty(stakeholderCell)) { + if (!stakeholderWithPhone(stakeholderList, stakeholderCell, stakeholderPhoneCell)) { + Long userId = userService.selectUserIdByPhone(stakeholderPhoneCell); + if (ObjectUtil.isNotNull(userId)) { + userIdSet.add(userId); + } + stakeholder = new ProMember(); + stakeholder.setId(snowflake.nextId()); + stakeholder.setProjectId(sysProject.getId()); + stakeholder.setUserId(userId); + stakeholder.setNickname(stakeholderCell); + stakeholder.setPhone(stakeholderPhoneCell); + proMemberService.saveMember(stakeholder); + stakeholderList.add(stakeholder); + + ProMemberRole proMemberRole = new ProMemberRole(); + proMemberRole.setId(snowflake.nextId()); + proMemberRole.setMemberId(stakeholder.getId()); + proMemberRole.setRoleId(stakeholderId); + proMemberRoleService.saveMemberRole(proMemberRole); + } else { + throw new BaseException(CodeEnum.WBS_STAKEHOLDER_PHONE.addMsg(memberSheet.getSheetName() + i)); + } + } + //成员 + if (StrUtil.isNotEmpty(memberCell)) { + if (!memberAndPhoneRepeat(proMembers, memberCell, phoneCell)) { + Long userId = userService.selectUserIdByPhone(phoneCell); + if (ObjectUtil.isNotNull(userId)) { + userIdSet.add(userId); + } + member = new ProMember(); + member.setId(snowflake.nextId()); + member.setProjectId(sysProject.getId()); + member.setUserId(userId); + member.setNickname(memberCell); + member.setPhone(phoneCell); + if (ObjectUtil.isNotNull(stakeholder)) { + member.setStakeholderId(stakeholder.getId()); + } + proMemberService.saveMember(member); + proMembers.add(member); +// //创建者依据project的creatorId判断,不需要添加成员 + } else { + throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE.addMsg(memberSheet.getSheetName() + i)); + } + } + } + //TODO 每个成员都关注此项目(暂时) + addUserAttention(userIdSet, sysProject); + } else { + throw new BaseException(CodeEnum.WBS_NOT_MEMBER_SHEET); + } + } + /** + * 导入评委表 + */ + private void judgeSheet(XSSFSheet judgeSheet, SysProject sysProject, List proMembers) throws Exception { + Set userIdSet = new HashSet<>(); + for (int i = 3; i <= judgeSheet.getLastRowNum(); i++) { + ProMember member = null; + String memberCell = ExcelUtil.getCellValue(judgeSheet.getRow(i).getCell(1)); + String phoneCell = ExcelUtil.getCellValue(judgeSheet.getRow(i).getCell(2)); + if (StrUtil.isNotEmpty(memberCell) && StrUtil.isEmpty(phoneCell)) { + throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(judgeSheet.getSheetName() + i)); + } + //成员 + if (StrUtil.isNotEmpty(memberCell)) { + if (!memberAndPhoneRepeat(proMembers, memberCell, phoneCell)) { + Long userId = userService.selectUserIdByPhone(phoneCell); + if (ObjectUtil.isNotNull(userId)) { + userIdSet.add(userId); + } + member = new ProMember(); + member.setId(snowflake.nextId()); + member.setProjectId(sysProject.getId()); + member.setUserId(userId); + member.setNickname(memberCell); + member.setPhone(phoneCell); + proMemberService.saveMember(member); + proMembers.add(member); +// //创建者依据project的creatorId判断,不需要添加成员 + } else { + throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE.addMsg(judgeSheet.getSheetName() + i)); + } + } + } + //TODO 每个成员都关注此项目(暂时) + addUserAttention(userIdSet, sysProject); + } + private void companySheet(XSSFSheet companySheet, SysProject sysProject, List proMembers) throws Exception { + Set userIdSet = new HashSet<>(); + for (int i = 3; i <= companySheet.getLastRowNum(); i++) { + ProMember member = null; + String memberCell = ExcelUtil.getCellValue(companySheet.getRow(i).getCell(1)); + String phoneCell = ExcelUtil.getCellValue(companySheet.getRow(i).getCell(2)); + if (StrUtil.isNotEmpty(memberCell) && StrUtil.isEmpty(phoneCell)) { + throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(companySheet.getSheetName() + i)); + } + //成员 + if (StrUtil.isNotEmpty(memberCell)) { + if (!memberAndPhoneRepeat(proMembers, memberCell, phoneCell)) { + Long userId = userService.selectUserIdByPhone(phoneCell); + if (ObjectUtil.isNotNull(userId)) { + userIdSet.add(userId); + } + member = new ProMember(); + member.setId(snowflake.nextId()); + member.setProjectId(sysProject.getId()); + member.setUserId(userId); + member.setNickname(memberCell); + member.setPhone(phoneCell); + proMemberService.saveMember(member); + proMembers.add(member); +// //创建者依据project的creatorId判断,不需要添加成员 + } else { + throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE.addMsg(companySheet.getSheetName() + i)); + } + } + } + //TODO 每个成员都关注此项目(暂时) + addUserAttention(userIdSet, sysProject); + } + + + /** + * 项目成员表内的每个人都关注此项目(暂时,当前版本) + */ + private void addUserAttention(Set userIdList, SysProject sysProject) { + if (CollectionUtil.isNotEmpty(userIdList)) { + for (Long userId : userIdList) { + UserAttention userAttention = new UserAttention(); + userAttention.setId(snowflake.nextId()); + userAttention.setUserId(userId); + userAttention.setProjectId(sysProject.getId()); + userAttentionService.saveAttention(userAttention); + } + } + } + + /** + * 判断奖惩干系人与手机号对应是否正确 + * 奖惩干系人可以重复,一个人只能对应一个手机号 + */ + private boolean stakeholderWithPhone(List stakeholderList, String stakeholderName, String phone) { + if (CollectionUtil.isNotEmpty(stakeholderList)) { + for (ProMember proMember : stakeholderList) { + if (stakeholderName.equalsIgnoreCase(proMember.getNickname())) { + if (!proMember.getPhone().equalsIgnoreCase(phone)) { + return true; + } + } else { + if (proMember.getPhone().equalsIgnoreCase(phone)) { + return true; + } + } + } + } + return false; + } + + /** + * 判断成员和手机号是否重复 + */ + private boolean memberAndPhoneRepeat(List proMembers, String memberName, String phone) { + if (CollectionUtil.isNotEmpty(proMembers)) { + for (ProMember proMember : proMembers) { + if (proMember.getNickname().equalsIgnoreCase(memberName)) { + return true; + } + if (proMember.getPhone().equalsIgnoreCase(phone)) { + return true; + } + } + } + return false; + } + + /** + * 读取任务 + */ + private void readTask(XSSFWorkbook xssfWorkbook, XSSFSheet wbsSheet, int taskStart, int taskEnd, + Long currentUserId, SysProject sysProject, List taskDetails, + List proRoles, List proMembers) throws Exception { + Long pmRoleId = null; + //获取项目经理的id(一级角色) + for (ProRole role : proRoles) { + if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { + pmRoleId = role.getId(); + break; + } + } + //获取项目经理的id(二级角色) + if (ObjectUtil.isNotNull(pmRoleId)) { + for (ProRole secondRole : proRoles) { + if (ObjectUtil.isNotNull(secondRole.getParentId()) && + secondRole.getParentId().longValue() == pmRoleId.longValue()) { + pmRoleId = secondRole.getId(); + break; + } + } + } + //TODO 添加一个开始虚拟节点 + ProTaskDetail beginTask = new ProTaskDetail(); + beginTask.setId(snowflake.nextId()); + beginTask.setProjectId(sysProject.getId()); + beginTask.setName("开始"); + beginTask.setVirtual((byte) WebConstant.TASK_VIRTUAL.Virtual.value); + beginTask.setLevel((byte) WebConstant.TASK_LEVEL.Virtual.value); + beginTask.setExecutorRole(pmRoleId); + proTaskDetailService.saveTaskDetail(beginTask); + taskDetails.add(beginTask); + //一级任务id + Long firstTaskDetailId = null; + + for (int i = taskStart + 1; i <= taskEnd; i++) { + XSSFRow row = wbsSheet.getRow(i); + //一级任务名称 + 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 repeat = ExcelUtil.getCellValue(row.getCell(7)); + String subTaskCell = ExcelUtil.getCellValue(row.getCell(8)); + String subProject = ExcelUtil.getCellValue(row.getCell(9)); + String deliver = ExcelUtil.getCellValue(row.getCell(10)); + String executorRole = ExcelUtil.getCellValue(row.getCell(11)); + String checkerRole = ExcelUtil.getCellValue(row.getCell(12)); + String money = ExcelUtil.getCellValue(row.getCell(13)); + String delay = ExcelUtil.getCellValue(row.getCell(14)); + String delayTime = ExcelUtil.getCellValue(row.getCell(15)); + String loopTo = ExcelUtil.getCellValue(row.getCell(16)); + String loopTimes = ExcelUtil.getCellValue(row.getCell(17)); + String input = ExcelUtil.getCellValue(row.getCell(18)); + //二级任务名不能为空 +// if(StrUtil.isEmpty(task2)){ +// throw new BaseException(CodeEnum.WBS_NOT_TASK_NAME.addMsg(wbsSheet.getSheetName()+i)); +// } + //TODO 一级任务(时间暂时为空) + if (StrUtil.isNotEmpty(task1)) { + ProTaskDetail firstTaskDetail = new ProTaskDetail(); + firstTaskDetail.setId(snowflake.nextId()); + firstTaskDetail.setName(task1); + firstTaskDetail.setProjectId(sysProject.getId()); + 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); + + firstTaskDetailId = firstTaskDetail.getId(); + + } + if (ObjectUtil.isNull(firstTaskDetailId)) { + throw new BaseException("找不到任务[" + i + "]"); + } + + //二级任务 + if (StrUtil.isNotEmpty(task2)) { + ProTaskDetail taskDetail = new ProTaskDetail(); + taskDetail.setId(snowflake.nextId()); + taskDetail.setProjectId(sysProject.getId()); + taskDetail.setParentId(firstTaskDetailId); + taskDetail.setName(task2); + taskDetail.setDescription(description); + taskDetail.setVirtual((byte) WebConstant.TASK_VIRTUAL.Normal.value); + taskDetail.setLevel((byte) WebConstant.TASK_LEVEL.SecondTask.value); + taskDetail.setHasGroup((byte) 0); + 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); + } + } + //负责人 + if (CollectionUtil.isNotEmpty(proRoles)) { + Long executorRoleId = null; + for (ProRole proRole : proRoles) { + if (ObjectUtil.isNotNull(proRole.getParentId()) && proRole.getName().equals(executorRole)) { + executorRoleId = proRole.getId(); + taskDetail.setExecutorRole(executorRoleId); + break; + } + } + if (ObjectUtil.isNull(executorRoleId)) { + throw new BaseException(CodeEnum.WBS_NOT_FIND_EXECUTOR_ROLE.addMsg(wbsSheet.getSheetName() + i)); + } + } + //检查人 + if (CollectionUtil.isNotEmpty(proRoles)) { + Long checkerRoleId = null; + for (ProRole proRole : proRoles) { + if (ObjectUtil.isNotNull(proRole.getParentId()) && proRole.getName().equals(checkerRole)) { + checkerRoleId = proRole.getId(); + taskDetail.setCheckerRole(checkerRoleId); + break; + } + } + if (ObjectUtil.isNull(checkerRoleId)) { + throw new BaseException(CodeEnum.WBS_NOT_FIND_CHECKER_ROLE.addMsg(wbsSheet.getSheetName() + i)); + } + } + //奖惩金额 + if (StrUtil.isNotEmpty(money)) { + taskDetail.setMoney(Long.parseLong(money) * 100); + } + //切换模式 + if (delay.equals(WebConstant.TASK_DELAY.SelfMotion.phase)) { + taskDetail.setDelay((byte) WebConstant.TASK_DELAY.SelfMotion.value); + } else if (delay.equals(WebConstant.TASK_DELAY.DelayManual.phase)) { + taskDetail.setDelay((byte) WebConstant.TASK_DELAY.DelayManual.value); + } else if (delay.equals(WebConstant.TASK_DELAY.Manual.phase)) { + taskDetail.setDelay((byte) WebConstant.TASK_DELAY.Manual.value); + } else { + throw new BaseException(CodeEnum.WBS_DELAY_ERROR.addMsg(wbsSheet.getSheetName() + i)); + } + //延迟时间 + if (StrUtil.isNotEmpty(delayTime)) { + taskDetail.setDelayTime(DateUtil.str2MillSeconds(delayTime)); + } + //TODO 跳转任务(应该在循环外处理) + + //跳转次数 + + //输入文档 + if (StrUtil.isNotEmpty(input)) { + ProTaskDeliver taskDeliver = new ProTaskDeliver(); + taskDeliver.setId(snowflake.nextId()); + taskDeliver.setTaskDetailId(taskDetail.getId()); + taskDeliver.setName(input); + taskDeliver.setIsInput(1); + taskDeliver.setIsFinal(0); + taskDeliverService.saveDeliver(taskDeliver); + } + //TODO 设备挂载暂不处理 + + //没有开始时间默认项目开始时间 + if (StrUtil.isNotEmpty(beginTime)) { + taskDetail.setBeginTime(Long.valueOf(beginTime)); + } else { + taskDetail.setBeginTime(sysProject.getBeginTime()); + } + //没有结束时间默认项目结束时间 + if (StrUtil.isNotEmpty(endTime)) { + taskDetail.setEndTime(Long.valueOf(endTime)); + } else { + taskDetail.setEndTime(sysProject.getEndTime()); + } + //重复频率 + if (StrUtil.isNotEmpty(repeat)) { + taskDetail.setCycle(repeat); + } + //子任务 + if (StrUtil.isNotEmpty(subTaskCell)) { + taskDetail.setHasGroup((byte) 1); + switch (subTaskCell) { + case "值日表": + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); + break; + case "运动计划表": + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); + break; + case "前端学习计划表": + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); + break; + case "后台学习计划表": + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); + break; + case "硬件学习计划表": + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); + break; + case "方圆学习计划表": + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); + break; + case "全体学习计划表": + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); + break; + default: + throw new BaseException(CodeEnum.WBS_SUB_TASK_ANALYSIS.addMsg(wbsSheet.getSheetName() + i)); + } + } else { + //不是分组任务,直接添加交付物 + readDeliverSheet(deliver, xssfWorkbook, taskDetail.getId()); + } + //添加任务 + proTaskDetailService.saveTaskDetail(taskDetail); + taskDetails.add(taskDetail); + } + } + //添加一个结束虚拟节点 + ProTaskDetail endTask = new ProTaskDetail(); + endTask.setId(snowflake.nextId()); + endTask.setProjectId(sysProject.getId()); + endTask.setName("结束"); + endTask.setVirtual((byte) WebConstant.TASK_VIRTUAL.Virtual.value); + endTask.setLevel((byte) WebConstant.TASK_LEVEL.Virtual.value); + endTask.setExecutorRole(pmRoleId); + proTaskDetailService.saveTaskDetail(endTask); + taskDetails.add(endTask); + } + + /** + * 读取子任务表 + */ + public void getSubTask(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, + List taskDetails, List proMembers, String deliverCell) { + XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); + Long startTime = parentTaskDetail.getBeginTime(); + if (ObjectUtil.isNotNull(subTaskSheet)) { + String str = ExcelUtil.getCellValue(subTaskSheet.getRow(1).getCell(4)); + for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { + 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)); + //重复时间、相对时间 + String repeatCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(4)); + String memberCell = StringUtil.replaceComma(ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(6))); + //备注 + String descriptionCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(8)); + if (StrUtil.isNotEmpty(nameCell)) { + ProTaskDetail subTask = new ProTaskDetail(); + BeanUtil.copyProperties(parentTaskDetail, subTask); + subTask.setId(snowflake.nextId()); + subTask.setName(nameCell); + subTask.setDescription(descriptionCell); + subTask.setLevel((byte) 3); + subTask.setHasGroup((byte) 0); + subTask.setParentId(parentTaskDetail.getId()); + if (StrUtil.isNotEmpty(memberCell)) { + if (memberCell.equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { + parentTaskDetail.setAllMember((byte) 1); + subTask.setAllMember((byte) 1); + } else { + parentTaskDetail.setAllMember((byte) 0); + subTask.setAllMember((byte) 0); + List memberList = StringUtil.extractMessage(memberCell); + if (CollectionUtil.isNotEmpty(memberList)) { + for (String memberName : memberList) { + if (CollectionUtil.isNotEmpty(proMembers)) { + Long proMemberId = null; + for (ProMember proMember : proMembers) { + if (memberName.equalsIgnoreCase(proMember.getNickname())) { + proMemberId = proMember.getId(); + ProTaskMember proTaskMember = new ProTaskMember(); + proTaskMember.setId(snowflake.nextId()); + proTaskMember.setTaskDetailId(subTask.getId()); + proTaskMember.setMemberId(proMemberId); + taskMemberService.saveTaskMember(proTaskMember); + break; + } + } + if (ObjectUtil.isNull(proMemberId)) { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); + } + } + } + } else { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); + } + } + } + + if (StrUtil.isNotEmpty(repeatCell)) { + if ("重复时间".equals(str)) { + subTask.setCycle(repeatCell); + } + if ("相对时间".equals(str)) { + subTask.setBeginTime(startTime); + Long relative = StringUtil.severalDay(repeatCell); + if (ObjectUtil.isNotNull(relative)) { + subTask.setEndTime(startTime + relative); + } + } + } else { + if (ObjectUtil.isNotNull(beginCell)) { + subTask.setBeginTime(Long.valueOf(beginCell)); + } + if (ObjectUtil.isNotNull(endCell)) { + subTask.setEndTime(Long.valueOf(endCell)); + } + parentTaskDetail.setBeginTime(subTask.getBeginTime()); + } + startTime = subTask.getEndTime(); + //给每个子任务添加交付物 + readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); + + proTaskDetailService.saveTaskDetail(subTask); + taskDetails.add(subTask); + } + } + } else { + throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); + } + parentTaskDetail.setEndTime(startTime); + } + + /** + * 分解任务时间 + * + * @param taskDetails + * @throws Exception + */ + public void saveProTaskSubTime(List taskDetails) throws Exception { + if (CollectionUtil.isNotEmpty(taskDetails)) { + for (ProTaskDetail taskDetail : taskDetails) { + //虚拟任务或一级任务不拆分 + if (taskDetail.getVirtual() == WebConstant.TASK_VIRTUAL.Virtual.value || taskDetail.getLevel() == 1) { + continue; + } + //cycle为空或者组任务,只加一条数据 + if (StrUtil.isEmpty(taskDetail.getCycle()) || taskDetail.getHasGroup() == 1) { + ProTaskSubTime proTaskSubTime = new ProTaskSubTime(); + proTaskSubTime.setId(snowflake.nextId()); + proTaskSubTime.setTaskDetailId(taskDetail.getId()); + proTaskSubTime.setBeginTime(taskDetail.getBeginTime()); + proTaskSubTime.setEndTime(taskDetail.getEndTime()); + taskSubTimeService.saveProTaskSubTask(proTaskSubTime); + } else { + Date startDate = new Date(taskDetail.getBeginTime()); + Date endDate = new Date(taskDetail.getEndTime()); + List taskDateList = + NatureToDate.generateDates(taskDetail.getCycle(), startDate, endDate); + if (CollectionUtil.isEmpty(taskDateList)) { + 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); + } + } + } + } + } + + /** + * 读取交付物表 + */ + private 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)) { + String subStr = deliverCell.substring(4); + XSSFSheet subSheet = xssfWorkbook.getSheet(subStr); + for (int i = 2; i <= subSheet.getLastRowNum(); i++) { + String deliver = ExcelUtil.getCellValue(subSheet.getRow(i).getCell(1)); + if (StrUtil.isNotEmpty(deliver)) { + ProTaskDeliver taskDeliver = new ProTaskDeliver(); + taskDeliver.setId(snowflake.nextId()); + taskDeliver.setName(deliver); + taskDeliver.setTaskDetailId(taskId); + taskDeliver.setIsInput(0); + taskDeliver.setIsFinal(0); + if (i == subSheet.getLastRowNum()) { + taskDeliver.setIsFinal(1); + } + taskDeliverService.saveDeliver(taskDeliver); + } + } + } else { + ProTaskDeliver taskDeliver = new ProTaskDeliver(); + taskDeliver.setId(snowflake.nextId()); + taskDeliver.setTaskDetailId(taskId); + taskDeliver.setName(deliverCell); + taskDeliver.setIsInput(0); + taskDeliver.setIsFinal(1); + taskDeliverService.saveDeliver(taskDeliver); + } + } + } + + /** + * 读取插件 + * + * @param xssfWorkbook + * @param taskDetails + * @param proRoles + */ + private void readPlugin(XSSFWorkbook xssfWorkbook, List taskDetails, List proRoles) { + SysPluginExample pluginExample = new SysPluginExample(); + pluginExample.clear(); + List sysPluginList = sysPluginDao.selectByExample(pluginExample); + if (CollectionUtil.isNotEmpty(sysPluginList)) { + XSSFSheet sheet = xssfWorkbook.getSheet("插件"); + if (ObjectUtil.isNotNull(sheet)) { + Long taskId = null; + Long memberRoleId = null; + XSSFRow roleRow = sheet.getRow(2); + + for (int i = 3; i < sheet.getLastRowNum(); i++) { + XSSFRow pluginRow = sheet.getRow(i); + String task = ExcelUtil.getCellValue(pluginRow.getCell(1)); + //获取任务Id + if (StrUtil.isNotEmpty(task)) { + for (ProTaskDetail proTask : taskDetails) { + if (task.equals(proTask.getName())) { + taskId = proTask.getId(); + break; + } + } + } + + for (int a = 2; a < roleRow.getLastCellNum(); a++) { + //获取memberRoleId + String roleCell = ExcelUtil.getCellValue(roleRow.getCell(a)); + if (StrUtil.isNotEmpty(roleCell) && CollectionUtil.isNotEmpty(proRoles)) { + for (ProRole role : proRoles) { + if (roleCell.equals(role.getName())) { + memberRoleId = role.getId(); + break; + } + } + } + String plugin = ExcelUtil.getCellValue(pluginRow.getCell(a)); + if (StrUtil.isNotEmpty(plugin)) { + Long sysPluginId = null; + for (SysPlugin sysPlugin : sysPluginList) { + if (plugin.equalsIgnoreCase(sysPlugin.getName())) { + sysPluginId = sysPlugin.getId(); + } + } + if (ObjectUtil.isNull(sysPluginId)) { + throw new BaseException(CodeEnum.WBS_NOT_PLUGIN.addMsg(sheet.getSheetName() + i)); + } + ProTaskPlugin taskPlugin = new ProTaskPlugin(); + taskPlugin.setId(snowflake.nextId()); + taskPlugin.setTaskDetailId(taskId); + taskPlugin.setPluginId(sysPluginId); + taskPlugin.setMemberRoleId(memberRoleId); + taskPluginService.savePlugin(taskPlugin); + } + } + } + } else { + throw new BaseException(CodeEnum.WBS_NOT_PLUGIN_SHEET); + } + } + } + + /** + * 返回信息 + * + * @param currentUserId + * @param sysProject + * @return + * @throws Exception + */ + public ProjectVo.ProjectInfo selectByProjectId(Long currentUserId, SysProject sysProject) throws Exception { + //返回参数 + ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); + projectInfo.setId(sysProject.getId()); + projectInfo.setName(sysProject.getName()); + projectInfo.setAddress(sysProject.getAddress()); + projectInfo.setBeginTime(sysProject.getBeginTime()); + projectInfo.setEndTime(sysProject.getEndTime()); + projectInfo.setTotalDuration(sysProject.getEndTime() - sysProject.getBeginTime()); + if (ObjectUtil.isNotNull(projectInfo)) { + projectInfo.setCreator(true); + } + return projectInfo; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/service/IExcelMtService.java b/tall/src/main/java/com/ccsens/tall/service/IExcelMtService.java new file mode 100644 index 00000000..788b12dc --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/IExcelMtService.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.vo.ProjectVo; + +public interface IExcelMtService { + ProjectVo.ProjectInfo readXls(String path, Long currentUserId) throws Exception; + +} 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 6b6b95e4..8040a079 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IExcelService.java @@ -6,5 +6,4 @@ import com.ccsens.tall.bean.vo.ProjectVo; public interface IExcelService { ProjectVo.ProjectInfo readXls(String path, Long currentUserId) throws Exception; - } 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 f5f10094..0c1c1bd5 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java @@ -185,12 +185,14 @@ public class ProjectService implements IProjectService { 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()); projectInfo.setProjectConfig(projectConfig); }else { ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); projectConfig.setFilter(0); projectConfig.setSlide(0); + projectConfig.setCreateTask(1); projectInfo.setProjectConfig(projectConfig); } @@ -240,11 +242,13 @@ public class ProjectService implements IProjectService { ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); projectConfig.setSlide(proShowList.get(0).getSlide()); projectConfig.setFilter(proShowList.get(0).getFilter()); + projectConfig.setCreateTask(proShowList.get(0).getCreateTask()); projectInfo.setProjectConfig(projectConfig); }else { ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); projectConfig.setSlide(0); projectConfig.setFilter(0); + projectConfig.setCreateTask(1); projectInfo.setProjectConfig(projectConfig); } 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 f2fdae70..12fad84c 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java @@ -16,6 +16,8 @@ import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.persist.dao.*; import com.ccsens.util.*; 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.config.RabbitMQConfig; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; @@ -271,9 +273,9 @@ public class TaskDeliverService implements ITaskDeliverService { 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,null,s); + InMessage inMessage = InMessage.newToUserMessage(currentUserId.toString(),userIdSet,null,messageRule,s); String j = JacksonUtil.beanToJson(inMessage); System.out.println(j); messageService.sendDeliverMessageWithUpload(inMessage); @@ -587,8 +589,9 @@ public class TaskDeliverService implements ITaskDeliverService { checkerDtoData.setIsChecker(checkDeliver.getCheckStatus()); checkerDto.setData(checkerDtoData); + MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User); String s = JacksonUtil.beanToJson(checkerDto); - InMessage inMessage = InMessage.newToUserMessage(currentUserId.toString(),userIdSet,null,null,s); + InMessage inMessage = InMessage.newToUserMessage(currentUserId.toString(),userIdSet,null,messageRule,s); messageService.sendDeliverMessageWithChecker(inMessage); @@ -776,8 +779,9 @@ public class TaskDeliverService implements ITaskDeliverService { deleteMessageData.setUserId(currentUserId); deleteMessage.setData(deleteMessageData); + MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User); String s = JacksonUtil.beanToJson(deleteMessage); - InMessage inMessage = InMessage.newToUserMessage(currentUserId.toString(),userIdSet,null,null,s); + InMessage inMessage = InMessage.newToUserMessage(currentUserId.toString(),userIdSet,null,messageRule,s); messageService.sendDeliverMessageWithDelete(inMessage); } 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 5e05b334..40409185 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java @@ -185,6 +185,7 @@ public class TaskSubTimeService implements ITaskSubTimeService { taskSubTime.setComplatedStatus(1); taskSubTimeDao.updateByPrimaryKeySelective(taskSubTime); + //发送同步消息 SysProject project = sysProjectDao.selectByPrimaryKey(startTaskDto.getProjectId()); //已发布的项目才同步 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 a801cf94..a4488d81 100644 --- a/tall/src/main/java/com/ccsens/tall/web/DebugController.java +++ b/tall/src/main/java/com/ccsens/tall/web/DebugController.java @@ -5,6 +5,7 @@ import com.ccsens.util.JsonResponse; import com.ccsens.util.bean.message.client.AuthMessage; 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; @@ -49,13 +50,14 @@ public class DebugController { // String j = JacksonUtil.beanToJson(inMessage); // System.out.println(j); - String l = "测试222"; + String l = "测试225"; String to = "1175954520199532544"; Set s = new HashSet<>(); s.add(to); + MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User); - InMessage inMessage = InMessage.newToUserMessage("1175954520199532544",s,null,null,l); + InMessage inMessage = InMessage.newToUserMessage("1175954520199532544",s,null,messageRule,l); String j = JacksonUtil.beanToJson(inMessage); System.out.println(j); diff --git a/tall/src/main/resources/mapper_dao/SysProjectDao.xml b/tall/src/main/resources/mapper_dao/SysProjectDao.xml index 1e416f51..993d2e4f 100644 --- a/tall/src/main/resources/mapper_dao/SysProjectDao.xml +++ b/tall/src/main/resources/mapper_dao/SysProjectDao.xml @@ -77,7 +77,7 @@ AND s.name like concat('%',#{key},'%') AND - rec_status = 0 + s.rec_status = 0 diff --git a/util/src/test/java/com/ccsens/util/KeyTest.java b/util/src/test/java/com/ccsens/util/KeyTest.java index e8f4952b..104d3b35 100644 --- a/util/src/test/java/com/ccsens/util/KeyTest.java +++ b/util/src/test/java/com/ccsens/util/KeyTest.java @@ -21,21 +21,21 @@ public class KeyTest { Console.log(Base64.encode(key)); } /**加密*/ -// @Test + @Test public void test3(){ - String key = "key"; - String string = "str"; + String key = "a6RlI/GctLgENUvF6DOY7w=="; + String string = "po3OynBO[M3579p6L7)o"; SymmetricCrypto aes = new SymmetricCrypto(SymmetricAlgorithm.AES, Base64.decode(key)); String encryptHex = aes.encryptHex(string); Console.log("{}",encryptHex); } /**解密*/ -// @Test + @Test public void test4(){ - //String key = "YmipVlKParz7ehnEv2K4Dw=="; - String key = System.getenv("CCSENS_TALL_TEST"); - String encryptString = "68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473"; +// String key = ""; + String key = System.getenv("CCSENS_GAME"); + String encryptString = "37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9"; SymmetricCrypto aes = new SymmetricCrypto(SymmetricAlgorithm.AES, Base64.decode(key)); //解密为字符串 From cfa9abb3cbc0e409f85aa83358af02f4294c2cd8 Mon Sep 17 00:00:00 2001 From: zhangye <654600784@qq.com> Date: Thu, 26 Dec 2019 11:33:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AF=84=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cloudutil/bean/tall/vo/MemberVo.java | 21 + .../ccsens/cloudutil/bean/tall/vo/TaskVo.java | 14 + .../cloudutil/feign/TallFeignClient.java | 28 + .../com/ccsens/game/api/ScreenController.java | 16 +- .../com/ccsens/game/bean/dto/ScreenDto.java | 4 +- .../com/ccsens/game/bean/po/GameType.java | 30 +- .../ccsens/game/bean/po/GameTypeExample.java | 166 ++- .../com/ccsens/game/bean/vo/ScreenVo.java | 81 ++ .../ccsens/game/config/SwaggerConfigure.java | 2 +- .../game/persist/dao/GameActivityRuleDao.java | 8 + .../game/persist/dao/GameMemberDao.java | 8 + .../game/persist/dao/GameRecordDao.java | 8 + .../ccsens/game/persist/dao/GameTypeDao.java | 8 + .../game/persist/dao/GameTypeMemberDao.java | 9 + .../ccsens/game/service/IScreenService.java | 8 + .../ccsens/game/service/ScreenService.java | 110 ++ .../resources/mapper_raw/GameTypeMapper.xml | 55 +- game/src/main/resources/mbg.xml | 16 +- .../com/ccsens/game/GameApplicationTests.java | 15 - mt/.mvn/wrapper/MavenWrapperDownloader.java | 117 ++ mt/.mvn/wrapper/maven-wrapper.properties | 2 + mt/pom.xml | 75 ++ .../java/com/ccsens/mt/MtApplication.java | 24 + .../com/ccsens/mt/api/DebugController.java | 28 + .../com/ccsens/mt/api/ScoreController.java | 124 ++ .../com/ccsens/mt/api/SigninController.java | 56 + .../java/com/ccsens/mt/bean/dto/ScoreDto.java | 83 ++ .../com/ccsens/mt/bean/dto/SigninDto.java | 19 + .../mt/bean/dto/message/BaseMessageDto.java | 35 + .../dto/message/SyncMessageWithShowDto.java | 39 + .../java/com/ccsens/mt/bean/po/MtJudge.java | 117 ++ .../com/ccsens/mt/bean/po/MtJudgeExample.java | 771 ++++++++++++ .../java/com/ccsens/mt/bean/po/MtScore.java | 129 ++ .../com/ccsens/mt/bean/po/MtScoreExample.java | 812 ++++++++++++ .../com/ccsens/mt/bean/po/MtScoreLog.java | 118 ++ .../ccsens/mt/bean/po/MtScoreLogExample.java | 752 +++++++++++ .../java/com/ccsens/mt/bean/po/MtSignin.java | 139 +++ .../ccsens/mt/bean/po/MtSigninExample.java | 891 +++++++++++++ .../java/com/ccsens/mt/bean/vo/ScoreVo.java | 172 +++ .../java/com/ccsens/mt/bean/vo/SigninVo.java | 21 + .../java/com/ccsens/mt/config/BeanConfig.java | 31 + .../com/ccsens/mt/config/SpringConfig.java | 164 +++ .../ccsens/mt/config/SwaggerConfigure.java | 56 + .../mt/intercept/MybatisInterceptor.java | 154 +++ .../com/ccsens/mt/persist/dao/MtJudgeDao.java | 8 + .../com/ccsens/mt/persist/dao/MtScoreDao.java | 12 + .../ccsens/mt/persist/dao/MtScoreLogDao.java | 8 + .../ccsens/mt/persist/dao/MtSigninDao.java | 8 + .../mt/persist/mapper/MtJudgeMapper.java | 30 + .../mt/persist/mapper/MtScoreLogMapper.java | 30 + .../mt/persist/mapper/MtScoreMapper.java | 30 + .../mt/persist/mapper/MtSigninMapper.java | 30 + .../ccsens/mt/service/IMessageService.java | 9 + .../com/ccsens/mt/service/IScoreService.java | 18 + .../com/ccsens/mt/service/ISigninService.java | 10 + .../com/ccsens/mt/service/IUserService.java | 8 + .../ccsens/mt/service/MessageServicer.java | 22 + .../com/ccsens/mt/service/ScoreService.java | 324 +++++ .../com/ccsens/mt/service/SigninService.java | 75 ++ .../com/ccsens/mt/service/UserService.java | 41 + mt/src/main/resources/application-common.yml | 30 + mt/src/main/resources/application-dev.yml | 29 + mt/src/main/resources/application-test.yml | 28 + mt/src/main/resources/application.yml | 4 + mt/src/main/resources/druid-dev.yml | 33 + mt/src/main/resources/druid-prod.yml | 33 + mt/src/main/resources/druid-test.yml | 33 + mt/src/main/resources/logback-spring.xml | 196 +++ mt/src/main/resources/mapper_dao/ScoreDao.xml | 50 + .../resources/mapper_raw/MtJudgeMapper.xml | 275 ++++ .../resources/mapper_raw/MtScoreLogMapper.xml | 275 ++++ .../resources/mapper_raw/MtScoreMapper.xml | 291 +++++ .../resources/mapper_raw/MtSigninMapper.xml | 306 +++++ .../main/resources/mybatis/mybatis-config.xml | 61 + pom.xml | 1 + .../com/ccsens/tall/bean/vo/MemberVo.java | 4 +- .../java/com/ccsens/tall/bean/vo/TaskVo.java | 9 +- .../com/ccsens/tall/config/SpringConfig.java | 2 + .../tall/persist/dao/TaskDetailDao.java | 3 +- .../ccsens/tall/service/ExcelMtService.java | 1106 ----------------- .../com/ccsens/tall/service/ExcelService.java | 326 +++-- .../ccsens/tall/service/IExcelMtService.java | 8 - .../tall/service/IProMemberService.java | 1 + .../tall/service/IProTaskDetailService.java | 2 + .../ccsens/tall/service/ProMemberService.java | 14 + .../tall/service/ProTaskDetailService.java | 59 +- .../ccsens/tall/web/MemberRoleController.java | 3 + .../com/ccsens/tall/web/TaskController.java | 14 + .../com/ccsens/tall/web/UserController.java | 17 + .../resources/mapper_dao/TaskDetailDao.xml | 38 +- .../main/java/com/ccsens/util/CodeEnum.java | 5 + .../java/com/ccsens/util/WebConstant.java | 11 +- .../ccsens/util/config/RabbitMQConfig.java | 7 +- 93 files changed, 8159 insertions(+), 1314 deletions(-) create mode 100644 cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/MemberVo.java create mode 100644 cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/TaskVo.java create mode 100644 game/src/main/java/com/ccsens/game/bean/vo/ScreenVo.java create mode 100644 game/src/main/java/com/ccsens/game/persist/dao/GameActivityRuleDao.java create mode 100644 game/src/main/java/com/ccsens/game/persist/dao/GameMemberDao.java create mode 100644 game/src/main/java/com/ccsens/game/persist/dao/GameRecordDao.java create mode 100644 game/src/main/java/com/ccsens/game/persist/dao/GameTypeDao.java create mode 100644 game/src/main/java/com/ccsens/game/persist/dao/GameTypeMemberDao.java create mode 100644 game/src/main/java/com/ccsens/game/service/IScreenService.java create mode 100644 game/src/main/java/com/ccsens/game/service/ScreenService.java delete mode 100644 game/src/test/java/com/ccsens/game/GameApplicationTests.java create mode 100644 mt/.mvn/wrapper/MavenWrapperDownloader.java create mode 100644 mt/.mvn/wrapper/maven-wrapper.properties create mode 100644 mt/pom.xml create mode 100644 mt/src/main/java/com/ccsens/mt/MtApplication.java create mode 100644 mt/src/main/java/com/ccsens/mt/api/DebugController.java create mode 100644 mt/src/main/java/com/ccsens/mt/api/ScoreController.java create mode 100644 mt/src/main/java/com/ccsens/mt/api/SigninController.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/dto/SigninDto.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/dto/message/BaseMessageDto.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/dto/message/SyncMessageWithShowDto.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtJudge.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtJudgeExample.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtScore.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtScoreExample.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtScoreLog.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtScoreLogExample.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtSignin.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/po/MtSigninExample.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/vo/ScoreVo.java create mode 100644 mt/src/main/java/com/ccsens/mt/bean/vo/SigninVo.java create mode 100644 mt/src/main/java/com/ccsens/mt/config/BeanConfig.java create mode 100644 mt/src/main/java/com/ccsens/mt/config/SpringConfig.java create mode 100644 mt/src/main/java/com/ccsens/mt/config/SwaggerConfigure.java create mode 100644 mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/dao/MtJudgeDao.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/dao/MtScoreDao.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/dao/MtScoreLogDao.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/dao/MtSigninDao.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/mapper/MtJudgeMapper.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/mapper/MtScoreLogMapper.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/mapper/MtScoreMapper.java create mode 100644 mt/src/main/java/com/ccsens/mt/persist/mapper/MtSigninMapper.java create mode 100644 mt/src/main/java/com/ccsens/mt/service/IMessageService.java create mode 100644 mt/src/main/java/com/ccsens/mt/service/IScoreService.java create mode 100644 mt/src/main/java/com/ccsens/mt/service/ISigninService.java create mode 100644 mt/src/main/java/com/ccsens/mt/service/IUserService.java create mode 100644 mt/src/main/java/com/ccsens/mt/service/MessageServicer.java create mode 100644 mt/src/main/java/com/ccsens/mt/service/ScoreService.java create mode 100644 mt/src/main/java/com/ccsens/mt/service/SigninService.java create mode 100644 mt/src/main/java/com/ccsens/mt/service/UserService.java create mode 100644 mt/src/main/resources/application-common.yml create mode 100644 mt/src/main/resources/application-dev.yml create mode 100644 mt/src/main/resources/application-test.yml create mode 100644 mt/src/main/resources/application.yml create mode 100644 mt/src/main/resources/druid-dev.yml create mode 100644 mt/src/main/resources/druid-prod.yml create mode 100644 mt/src/main/resources/druid-test.yml create mode 100644 mt/src/main/resources/logback-spring.xml create mode 100644 mt/src/main/resources/mapper_dao/ScoreDao.xml create mode 100644 mt/src/main/resources/mapper_raw/MtJudgeMapper.xml create mode 100644 mt/src/main/resources/mapper_raw/MtScoreLogMapper.xml create mode 100644 mt/src/main/resources/mapper_raw/MtScoreMapper.xml create mode 100644 mt/src/main/resources/mapper_raw/MtSigninMapper.xml create mode 100644 mt/src/main/resources/mybatis/mybatis-config.xml delete mode 100644 tall/src/main/java/com/ccsens/tall/service/ExcelMtService.java delete mode 100644 tall/src/main/java/com/ccsens/tall/service/IExcelMtService.java diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/MemberVo.java b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/MemberVo.java new file mode 100644 index 00000000..3abf2bda --- /dev/null +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/MemberVo.java @@ -0,0 +1,21 @@ +package com.ccsens.cloudutil.bean.tall.vo; + +import lombok.Data; + +@Data +public class MemberVo { + + @Data + public static class MemberInfo{ + private Long id; + private Long userId; + private Long projectId; + private String nickname; + private String avatarUrl; + private Integer no; + private String phone; + private String description; + private Long joinTime; + private Long stakeholderId; + } +} diff --git a/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/TaskVo.java b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/TaskVo.java new file mode 100644 index 00000000..bc5f3205 --- /dev/null +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/vo/TaskVo.java @@ -0,0 +1,14 @@ +package com.ccsens.cloudutil.bean.tall.vo; + +import lombok.Data; + +@Data +public class TaskVo { + @Data + public static class TaskInfoWithFeign{ + private Long id; + private String name; + private Long projectId; + private String projectName; + } +} 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 882c8d86..c06d0e17 100644 --- a/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java +++ b/cloudutil/src/main/java/com/ccsens/cloudutil/feign/TallFeignClient.java @@ -4,8 +4,11 @@ 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.TaskVo; import com.ccsens.cloudutil.bean.tall.vo.UserVo; import com.ccsens.util.JsonResponse; +import feign.Param; import feign.hystrix.FallbackFactory; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.configurationprocessor.json.JSONObject; @@ -72,6 +75,21 @@ public interface TallFeignClient { */ @RequestMapping("/log/operation") JsonResponse log(LogDto logDto); + + /** + * 通过任务id获得项目id + * @param taskId + * @return + */ + @GetMapping("/tasks/projectId") + TaskVo.TaskInfoWithFeign getProjectId(@RequestParam( name = "taskId")Long taskId); + + /** + * 查询该用户在项目中的member信息 + * @return + */ + @GetMapping("/users/member") + JsonResponse getMemberByUserId(@RequestParam( name = "userId") Long userId,@RequestParam( name = "projectId") Long projectId); } @Slf4j @@ -114,6 +132,16 @@ class TallFeignClientFallBack implements FallbackFactory { public JsonResponse log(LogDto logDto) { return JsonResponse.newInstance().fail(); } + + @Override + public TaskVo.TaskInfoWithFeign getProjectId(Long taskId) { + return null; + } + + @Override + public JsonResponse getMemberByUserId(Long userId,Long projectId) { + return JsonResponse.newInstance().fail(); + } }; } 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 c498fea9..09ba91a9 100644 --- a/game/src/main/java/com/ccsens/game/api/ScreenController.java +++ b/game/src/main/java/com/ccsens/game/api/ScreenController.java @@ -1,12 +1,12 @@ package com.ccsens.game.api; import com.ccsens.game.bean.dto.ScreenDto; +import com.ccsens.game.bean.vo.ScreenVo; +import com.ccsens.game.service.IScreenService; import com.ccsens.util.JsonResponse; -import com.ccsens.util.WebConstant; -import io.jsonwebtoken.Claims; import io.swagger.annotations.*; -import lombok.extern.log4j.Log4j; 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; @@ -14,23 +14,23 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; @Slf4j @Api(tags = "大屏相关api" , description = "ScreenController") @RestController @RequestMapping("/screen") public class ScreenController { - + @Autowired + private IScreenService screenService; @ApiOperation(value = "获取大屏路径", notes = "") @ApiImplicitParams({ }) @RequestMapping(value = "url", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse getScreenUrl(HttpServletRequest request, + public JsonResponse getScreenUrl(HttpServletRequest request, @ApiParam @Validated @RequestBody ScreenDto.MemberGame memberGame) throws Exception { log.info("获取大屏路径:{}",memberGame); - + ScreenVo.UrlVo urlVo = screenService.getScreenUrl(memberGame); return JsonResponse.newInstance().ok(); } @@ -38,7 +38,7 @@ public class ScreenController { @ApiImplicitParams({ }) @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse getGameInfo(HttpServletRequest request, + public JsonResponse getGameInfo(HttpServletRequest request, @ApiParam @Validated @RequestBody ScreenDto.MemberRecord memberRecord) throws Exception { log.info("获取游戏基本信息:{}",memberRecord); 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 99d8aa8d..fa490be0 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 @@ -9,7 +9,9 @@ public class ScreenDto { @Data @ApiModel public static class MemberGame{ - @ApiModelProperty("是否关注") + @ApiModelProperty("要创建的小游戏的类型 例如:SQ 代表数钱小游戏") + private String gameType; + @ApiModelProperty("是否关注了公众号") private Byte subscribe; @ApiModelProperty("用户的标识,对当前公众号唯一") private String openid; diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameType.java b/game/src/main/java/com/ccsens/game/bean/po/GameType.java index 6897272b..fb7e0b3c 100644 --- a/game/src/main/java/com/ccsens/game/bean/po/GameType.java +++ b/game/src/main/java/com/ccsens/game/bean/po/GameType.java @@ -12,7 +12,11 @@ public class GameType implements Serializable { private String description; - private String payType; + private Byte payType; + + private String screenUrl; + + private String clientUrl; private Date createdAt; @@ -54,12 +58,28 @@ public class GameType implements Serializable { this.description = description == null ? null : description.trim(); } - public String getPayType() { + public Byte getPayType() { return payType; } - public void setPayType(String payType) { - this.payType = payType == null ? null : payType.trim(); + public void setPayType(Byte payType) { + this.payType = payType; + } + + public String getScreenUrl() { + return screenUrl; + } + + public void setScreenUrl(String screenUrl) { + this.screenUrl = screenUrl == null ? null : screenUrl.trim(); + } + + public String getClientUrl() { + return clientUrl; + } + + public void setClientUrl(String clientUrl) { + this.clientUrl = clientUrl == null ? null : clientUrl.trim(); } public Date getCreatedAt() { @@ -97,6 +117,8 @@ public class GameType implements Serializable { sb.append(", name=").append(name); sb.append(", description=").append(description); sb.append(", payType=").append(payType); + sb.append(", screenUrl=").append(screenUrl); + sb.append(", clientUrl=").append(clientUrl); sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); diff --git a/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java b/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java index 88a84651..4e4012da 100644 --- a/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java +++ b/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java @@ -385,63 +385,193 @@ public class GameTypeExample { return (Criteria) this; } - public Criteria andPayTypeEqualTo(String value) { + public Criteria andPayTypeEqualTo(Byte value) { addCriterion("pay_type =", value, "payType"); return (Criteria) this; } - public Criteria andPayTypeNotEqualTo(String value) { + public Criteria andPayTypeNotEqualTo(Byte value) { addCriterion("pay_type <>", value, "payType"); return (Criteria) this; } - public Criteria andPayTypeGreaterThan(String value) { + public Criteria andPayTypeGreaterThan(Byte value) { addCriterion("pay_type >", value, "payType"); return (Criteria) this; } - public Criteria andPayTypeGreaterThanOrEqualTo(String value) { + public Criteria andPayTypeGreaterThanOrEqualTo(Byte value) { addCriterion("pay_type >=", value, "payType"); return (Criteria) this; } - public Criteria andPayTypeLessThan(String value) { + public Criteria andPayTypeLessThan(Byte value) { addCriterion("pay_type <", value, "payType"); return (Criteria) this; } - public Criteria andPayTypeLessThanOrEqualTo(String value) { + public Criteria andPayTypeLessThanOrEqualTo(Byte value) { addCriterion("pay_type <=", value, "payType"); return (Criteria) this; } - public Criteria andPayTypeLike(String value) { - addCriterion("pay_type like", value, "payType"); + public Criteria andPayTypeIn(List values) { + addCriterion("pay_type in", values, "payType"); return (Criteria) this; } - public Criteria andPayTypeNotLike(String value) { - addCriterion("pay_type not like", value, "payType"); + public Criteria andPayTypeNotIn(List values) { + addCriterion("pay_type not in", values, "payType"); return (Criteria) this; } - public Criteria andPayTypeIn(List values) { - addCriterion("pay_type in", values, "payType"); + public Criteria andPayTypeBetween(Byte value1, Byte value2) { + addCriterion("pay_type between", value1, value2, "payType"); return (Criteria) this; } - public Criteria andPayTypeNotIn(List values) { - addCriterion("pay_type not in", values, "payType"); + public Criteria andPayTypeNotBetween(Byte value1, Byte value2) { + addCriterion("pay_type not between", value1, value2, "payType"); return (Criteria) this; } - public Criteria andPayTypeBetween(String value1, String value2) { - addCriterion("pay_type between", value1, value2, "payType"); + public Criteria andScreenUrlIsNull() { + addCriterion("screen_url is null"); return (Criteria) this; } - public Criteria andPayTypeNotBetween(String value1, String value2) { - addCriterion("pay_type not between", value1, value2, "payType"); + public Criteria andScreenUrlIsNotNull() { + addCriterion("screen_url is not null"); + return (Criteria) this; + } + + public Criteria andScreenUrlEqualTo(String value) { + addCriterion("screen_url =", value, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlNotEqualTo(String value) { + addCriterion("screen_url <>", value, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlGreaterThan(String value) { + addCriterion("screen_url >", value, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlGreaterThanOrEqualTo(String value) { + addCriterion("screen_url >=", value, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlLessThan(String value) { + addCriterion("screen_url <", value, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlLessThanOrEqualTo(String value) { + addCriterion("screen_url <=", value, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlLike(String value) { + addCriterion("screen_url like", value, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlNotLike(String value) { + addCriterion("screen_url not like", value, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlIn(List values) { + addCriterion("screen_url in", values, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlNotIn(List values) { + addCriterion("screen_url not in", values, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlBetween(String value1, String value2) { + addCriterion("screen_url between", value1, value2, "screenUrl"); + return (Criteria) this; + } + + public Criteria andScreenUrlNotBetween(String value1, String value2) { + addCriterion("screen_url not between", value1, value2, "screenUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlIsNull() { + addCriterion("client_url is null"); + return (Criteria) this; + } + + public Criteria andClientUrlIsNotNull() { + addCriterion("client_url is not null"); + return (Criteria) this; + } + + public Criteria andClientUrlEqualTo(String value) { + addCriterion("client_url =", value, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlNotEqualTo(String value) { + addCriterion("client_url <>", value, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlGreaterThan(String value) { + addCriterion("client_url >", value, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlGreaterThanOrEqualTo(String value) { + addCriterion("client_url >=", value, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlLessThan(String value) { + addCriterion("client_url <", value, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlLessThanOrEqualTo(String value) { + addCriterion("client_url <=", value, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlLike(String value) { + addCriterion("client_url like", value, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlNotLike(String value) { + addCriterion("client_url not like", value, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlIn(List values) { + addCriterion("client_url in", values, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlNotIn(List values) { + addCriterion("client_url not in", values, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlBetween(String value1, String value2) { + addCriterion("client_url between", value1, value2, "clientUrl"); + return (Criteria) this; + } + + public Criteria andClientUrlNotBetween(String value1, String value2) { + addCriterion("client_url not between", value1, value2, "clientUrl"); return (Criteria) this; } 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 new file mode 100644 index 00000000..c22cb195 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/vo/ScreenVo.java @@ -0,0 +1,81 @@ +package com.ccsens.game.bean.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class ScreenVo { + @Data + @ApiModel + public static class UrlVo{ + @ApiModelProperty("大屏的路径") + private String url; + @ApiModelProperty("游戏路径") + private List ruleList; + } + + @Data + @ApiModel + public static class GameInfoVo{ + @ApiModelProperty("二维码路径") + private String QRCodeUrl; + @ApiModelProperty("游戏状态") + private Byte gameStatus; + @ApiModelProperty("可玩总次数") + private int totalCount; + @ApiModelProperty("已用次数") + private int usedCount ; + @ApiModelProperty("总人数") + private int totalMembers ; + + @ApiModelProperty("未开始") + private PendingData pendingData; + @ApiModelProperty("未开始") + private PreparingData preparingData; + @ApiModelProperty("未开始") + private ProcessingData processingData; + @ApiModelProperty("未开始") + private CompletedData completedData; + + } + + @Data + @ApiModel("未开始") + public static class PendingData{ + @ApiModelProperty("活动规则") + private List activityRule; + @ApiModelProperty("活动奖品") + private List activityPrize; + @ApiModelProperty("奖券使用说明") + private List instructions; + } + + @Data + @ApiModel("准备中") + public static class PreparingData{ + @ApiModelProperty("本地开始时间") + private Long startLocalTime ; + } + + @Data + @ApiModel("进行中") + public static class ProcessingData{ + + } + + @Data + @ApiModel("已结束") + public static class CompletedData{ + @ApiModelProperty("总次数") + private int totalTimes; + @ApiModelProperty("总分数") + private int totalScore; + @ApiModelProperty("平均每人多少分") + private int averageTimes; + @ApiModelProperty("平均次数超过百分之多少人") + private int over; + } +} diff --git a/game/src/main/java/com/ccsens/game/config/SwaggerConfigure.java b/game/src/main/java/com/ccsens/game/config/SwaggerConfigure.java index 88d9d999..379c0666 100644 --- a/game/src/main/java/com/ccsens/game/config/SwaggerConfigure.java +++ b/game/src/main/java/com/ccsens/game/config/SwaggerConfigure.java @@ -28,7 +28,7 @@ public class SwaggerConfigure /*implements WebMvcConfigurer*/ { .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors - .basePackage("com.ccsens.game.web")) + .basePackage("com.ccsens.game.api")) .build() .globalOperationParameters(setHeaderToken()); } diff --git a/game/src/main/java/com/ccsens/game/persist/dao/GameActivityRuleDao.java b/game/src/main/java/com/ccsens/game/persist/dao/GameActivityRuleDao.java new file mode 100644 index 00000000..9fa14055 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/dao/GameActivityRuleDao.java @@ -0,0 +1,8 @@ +package com.ccsens.game.persist.dao; + +import com.ccsens.game.persist.mapper.GameActivityRuleMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface GameActivityRuleDao extends GameActivityRuleMapper{ +} diff --git a/game/src/main/java/com/ccsens/game/persist/dao/GameMemberDao.java b/game/src/main/java/com/ccsens/game/persist/dao/GameMemberDao.java new file mode 100644 index 00000000..1432758a --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/dao/GameMemberDao.java @@ -0,0 +1,8 @@ +package com.ccsens.game.persist.dao; + +import com.ccsens.game.persist.mapper.GameMemberMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface GameMemberDao extends GameMemberMapper{ +} diff --git a/game/src/main/java/com/ccsens/game/persist/dao/GameRecordDao.java b/game/src/main/java/com/ccsens/game/persist/dao/GameRecordDao.java new file mode 100644 index 00000000..03b7f107 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/dao/GameRecordDao.java @@ -0,0 +1,8 @@ +package com.ccsens.game.persist.dao; + +import com.ccsens.game.persist.mapper.GameRecordMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface GameRecordDao extends GameRecordMapper{ +} diff --git a/game/src/main/java/com/ccsens/game/persist/dao/GameTypeDao.java b/game/src/main/java/com/ccsens/game/persist/dao/GameTypeDao.java new file mode 100644 index 00000000..07a5e733 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/dao/GameTypeDao.java @@ -0,0 +1,8 @@ +package com.ccsens.game.persist.dao; + +import com.ccsens.game.persist.mapper.GameTypeMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface GameTypeDao extends GameTypeMapper{ +} diff --git a/game/src/main/java/com/ccsens/game/persist/dao/GameTypeMemberDao.java b/game/src/main/java/com/ccsens/game/persist/dao/GameTypeMemberDao.java new file mode 100644 index 00000000..44bd8c75 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/persist/dao/GameTypeMemberDao.java @@ -0,0 +1,9 @@ +package com.ccsens.game.persist.dao; + +import com.ccsens.game.persist.mapper.GameTypeMemberMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface GameTypeMemberDao extends GameTypeMemberMapper{ + +} diff --git a/game/src/main/java/com/ccsens/game/service/IScreenService.java b/game/src/main/java/com/ccsens/game/service/IScreenService.java new file mode 100644 index 00000000..834f265e --- /dev/null +++ b/game/src/main/java/com/ccsens/game/service/IScreenService.java @@ -0,0 +1,8 @@ +package com.ccsens.game.service; + +import com.ccsens.game.bean.dto.ScreenDto; +import com.ccsens.game.bean.vo.ScreenVo; + +public interface IScreenService { + ScreenVo.UrlVo getScreenUrl(ScreenDto.MemberGame memberGame); +} diff --git a/game/src/main/java/com/ccsens/game/service/ScreenService.java b/game/src/main/java/com/ccsens/game/service/ScreenService.java new file mode 100644 index 00000000..dde69d95 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/service/ScreenService.java @@ -0,0 +1,110 @@ +package com.ccsens.game.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.game.bean.dto.ScreenDto; +import com.ccsens.game.bean.po.*; +import com.ccsens.game.bean.vo.ScreenVo; +import com.ccsens.game.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 java.io.File; +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class ScreenService implements IScreenService{ + @Autowired + private GameMemberDao memberDao; + @Autowired + private GameTypeMemberDao typeMemberDao; + @Autowired + private GameTypeDao gameTypeDao; + @Autowired + private GameRecordDao gameRecordDao; + @Autowired + private GameActivityRuleDao activityRuleDao; + @Autowired + private Snowflake snowflake; + + @Override + public ScreenVo.UrlVo getScreenUrl(ScreenDto.MemberGame memberGame) { + //1、查询此用户,若没有则保存用户信息 + GameMember member = null; + GameMemberExample memberExample = new GameMemberExample(); + memberExample.createCriteria().andOpenidEqualTo(memberGame.getOpenid()); + List memberList = memberDao.selectByExample(memberExample); + if(CollectionUtil.isNotEmpty(memberList)){ + member = memberList.get(0); + }else { + member = new GameMember(); + BeanUtil.copyProperties(memberGame,member); + member.setId(snowflake.nextId()); + memberDao.insertSelective(member); + } + //查找游戏 + 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次 + GameTypeMember gameTypeMember = null; + GameTypeMemberExample typeMemberExample = new GameTypeMemberExample(); + typeMemberExample.createCriteria().andMemberIdEqualTo(member.getId()).andGameTypeIdEqualTo(gameType.getId()); + List gameTypeMemberList = typeMemberDao.selectByExample(typeMemberExample); + if(CollectionUtil.isNotEmpty(gameTypeMemberList)){ + gameTypeMember = gameTypeMemberList.get(0); + }else { + gameTypeMember = new GameTypeMember(); + gameTypeMember.setId(snowflake.nextId()); + gameTypeMember.setMemberId(member.getId()); + gameTypeMember.setGameTypeId(gameType.getId()); + gameTypeMember.setTotalCount(10); + gameTypeMember.setUsedCount(0); + gameTypeMember.setCreatedTime(System.currentTimeMillis()); + gameTypeMember.setDueTime(gameTypeMember.getCreatedTime() + (3600*24*30)); + typeMemberDao.insertSelective(gameTypeMember); + } + + //3、根据用户购买的记录,添加一场新的游戏记录 + GameRecord gameRecord = new GameRecord(); + gameRecord.setId(snowflake.nextId()); + gameRecord.setTypeMemberId(gameTypeMember.getId()); + gameRecord.setUrl(WebConstant.TEST_URL_GAME + gameRecord.getId() + File.separator + gameType.getScreenUrl()); + gameRecord.setQrCodeUrl(WebConstant.TEST_URL_GAME + gameRecord.getId() + File.separator + gameType.getClientUrl()); + gameRecordDao.insertSelective(gameRecord); + //5、查询该游戏的规则 + List ruleList = null; + GameActivityRuleExample activityRuleExample = new GameActivityRuleExample(); + activityRuleExample.createCriteria().andGameIdEqualTo(gameType.getId()); + List gameActivityRuleList = activityRuleDao.selectByExample(activityRuleExample); + if(CollectionUtil.isNotEmpty(gameActivityRuleList)){ + ruleList = new ArrayList<>(); + for(GameActivityRule activityRule : gameActivityRuleList){ + ruleList.add(activityRule.getDescription()); + } + } + //6、返回 + ScreenVo.UrlVo urlVo = new ScreenVo.UrlVo(); + urlVo.setUrl(gameRecord.getUrl()); + urlVo.setRuleList(ruleList); + return urlVo; + } +} diff --git a/game/src/main/resources/mapper_raw/GameTypeMapper.xml b/game/src/main/resources/mapper_raw/GameTypeMapper.xml index db08eb0e..d9241b8d 100644 --- a/game/src/main/resources/mapper_raw/GameTypeMapper.xml +++ b/game/src/main/resources/mapper_raw/GameTypeMapper.xml @@ -6,7 +6,9 @@ - + + + @@ -70,7 +72,8 @@ - id, code, name, description, pay_type, created_at, updated_at, rec_status + id, code, name, description, pay_type, screen_url, client_url, created_at, updated_at, + rec_status + SELECT + SUM(score) + FROM + `t_score` + WHERE + player_id=#{playerId} + AND + role_id = #{judgeId} + + + + + + + + + \ No newline at end of file diff --git a/mt/src/main/resources/mapper_raw/MtJudgeMapper.xml b/mt/src/main/resources/mapper_raw/MtJudgeMapper.xml new file mode 100644 index 00000000..d7d3afce --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtJudgeMapper.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, user_id, nickname, avatar_url, phone, created_at, updated_at, rec_status + + + + + delete from t_mt_judge + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_judge + + + + + + insert into t_mt_judge (id, project_id, user_id, + nickname, avatar_url, phone, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, + #{nickname,jdbcType=VARCHAR}, #{avatarUrl,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_mt_judge + + + id, + + + project_id, + + + user_id, + + + nickname, + + + avatar_url, + + + phone, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{nickname,jdbcType=VARCHAR}, + + + #{avatarUrl,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_judge + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + nickname = #{record.nickname,jdbcType=VARCHAR}, + + + avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_mt_judge + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + nickname = #{record.nickname,jdbcType=VARCHAR}, + avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, + phone = #{record.phone,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_mt_judge + + + project_id = #{projectId,jdbcType=BIGINT}, + + + user_id = #{userId,jdbcType=BIGINT}, + + + nickname = #{nickname,jdbcType=VARCHAR}, + + + avatar_url = #{avatarUrl,jdbcType=VARCHAR}, + + + phone = #{phone,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_judge + set project_id = #{projectId,jdbcType=BIGINT}, + user_id = #{userId,jdbcType=BIGINT}, + nickname = #{nickname,jdbcType=VARCHAR}, + avatar_url = #{avatarUrl,jdbcType=VARCHAR}, + phone = #{phone,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/MtScoreLogMapper.xml b/mt/src/main/resources/mapper_raw/MtScoreLogMapper.xml new file mode 100644 index 00000000..97efadd3 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtScoreLogMapper.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, name, max_score, min_score, project_id, sequence, created_at, updated_at, rec_status + + + + + delete from t_mt_score_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_score_log + + + + + + insert into t_mt_score_log (id, name, max_score, + min_score, project_id, sequence, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{maxScore,jdbcType=DECIMAL}, + #{minScore,jdbcType=DECIMAL}, #{projectId,jdbcType=BIGINT}, #{sequence,jdbcType=INTEGER}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_mt_score_log + + + id, + + + name, + + + max_score, + + + min_score, + + + project_id, + + + sequence, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{maxScore,jdbcType=DECIMAL}, + + + #{minScore,jdbcType=DECIMAL}, + + + #{projectId,jdbcType=BIGINT}, + + + #{sequence,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_score_log + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + max_score = #{record.maxScore,jdbcType=DECIMAL}, + + + min_score = #{record.minScore,jdbcType=DECIMAL}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + 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_mt_score_log + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + max_score = #{record.maxScore,jdbcType=DECIMAL}, + min_score = #{record.minScore,jdbcType=DECIMAL}, + project_id = #{record.projectId,jdbcType=BIGINT}, + 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_mt_score_log + + + name = #{name,jdbcType=VARCHAR}, + + + max_score = #{maxScore,jdbcType=DECIMAL}, + + + min_score = #{minScore,jdbcType=DECIMAL}, + + + project_id = #{projectId,jdbcType=BIGINT}, + + + 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_mt_score_log + set name = #{name,jdbcType=VARCHAR}, + max_score = #{maxScore,jdbcType=DECIMAL}, + min_score = #{minScore,jdbcType=DECIMAL}, + project_id = #{projectId,jdbcType=BIGINT}, + sequence = #{sequence,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/MtScoreMapper.xml b/mt/src/main/resources/mapper_raw/MtScoreMapper.xml new file mode 100644 index 00000000..d7e81d43 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtScoreMapper.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, judge_user_id, score_log_id, task_id, task_name, score, is_score, created_at, + updated_at, rec_status + + + + + delete from t_mt_score + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_score + + + + + + insert into t_mt_score (id, judge_user_id, score_log_id, + task_id, task_name, score, + is_score, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{judgeUserId,jdbcType=BIGINT}, #{scoreLogId,jdbcType=BIGINT}, + #{taskId,jdbcType=BIGINT}, #{taskName,jdbcType=VARCHAR}, #{score,jdbcType=DECIMAL}, + #{isScore,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_mt_score + + + id, + + + judge_user_id, + + + score_log_id, + + + task_id, + + + task_name, + + + score, + + + is_score, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{judgeUserId,jdbcType=BIGINT}, + + + #{scoreLogId,jdbcType=BIGINT}, + + + #{taskId,jdbcType=BIGINT}, + + + #{taskName,jdbcType=VARCHAR}, + + + #{score,jdbcType=DECIMAL}, + + + #{isScore,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_score + + + id = #{record.id,jdbcType=BIGINT}, + + + judge_user_id = #{record.judgeUserId,jdbcType=BIGINT}, + + + score_log_id = #{record.scoreLogId,jdbcType=BIGINT}, + + + task_id = #{record.taskId,jdbcType=BIGINT}, + + + task_name = #{record.taskName,jdbcType=VARCHAR}, + + + score = #{record.score,jdbcType=DECIMAL}, + + + is_score = #{record.isScore,jdbcType=INTEGER}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_mt_score + set id = #{record.id,jdbcType=BIGINT}, + judge_user_id = #{record.judgeUserId,jdbcType=BIGINT}, + score_log_id = #{record.scoreLogId,jdbcType=BIGINT}, + task_id = #{record.taskId,jdbcType=BIGINT}, + task_name = #{record.taskName,jdbcType=VARCHAR}, + score = #{record.score,jdbcType=DECIMAL}, + is_score = #{record.isScore,jdbcType=INTEGER}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_mt_score + + + judge_user_id = #{judgeUserId,jdbcType=BIGINT}, + + + score_log_id = #{scoreLogId,jdbcType=BIGINT}, + + + task_id = #{taskId,jdbcType=BIGINT}, + + + task_name = #{taskName,jdbcType=VARCHAR}, + + + score = #{score,jdbcType=DECIMAL}, + + + is_score = #{isScore,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_score + set judge_user_id = #{judgeUserId,jdbcType=BIGINT}, + score_log_id = #{scoreLogId,jdbcType=BIGINT}, + task_id = #{taskId,jdbcType=BIGINT}, + task_name = #{taskName,jdbcType=VARCHAR}, + score = #{score,jdbcType=DECIMAL}, + is_score = #{isScore,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/MtSigninMapper.xml b/mt/src/main/resources/mapper_raw/MtSigninMapper.xml new file mode 100644 index 00000000..a867c753 --- /dev/null +++ b/mt/src/main/resources/mapper_raw/MtSigninMapper.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, user_id, task_id, name, phone, company, signin_time, sequence, created_at, updated_at, + rec_status + + + + + delete from t_mt_signin + where id = #{id,jdbcType=BIGINT} + + + delete from t_mt_signin + + + + + + insert into t_mt_signin (id, user_id, task_id, + name, phone, company, + signin_time, sequence, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{taskId,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{company,jdbcType=VARCHAR}, + #{signinTime,jdbcType=BIGINT}, #{sequence,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_mt_signin + + + id, + + + user_id, + + + task_id, + + + name, + + + phone, + + + company, + + + signin_time, + + + sequence, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{taskId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{company,jdbcType=VARCHAR}, + + + #{signinTime,jdbcType=BIGINT}, + + + #{sequence,jdbcType=INTEGER}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_mt_signin + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + task_id = #{record.taskId,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + company = #{record.company,jdbcType=VARCHAR}, + + + signin_time = #{record.signinTime,jdbcType=BIGINT}, + + + 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_mt_signin + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + task_id = #{record.taskId,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + phone = #{record.phone,jdbcType=VARCHAR}, + company = #{record.company,jdbcType=VARCHAR}, + signin_time = #{record.signinTime,jdbcType=BIGINT}, + 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_mt_signin + + + user_id = #{userId,jdbcType=BIGINT}, + + + task_id = #{taskId,jdbcType=BIGINT}, + + + name = #{name,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + company = #{company,jdbcType=VARCHAR}, + + + signin_time = #{signinTime,jdbcType=BIGINT}, + + + 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_mt_signin + set user_id = #{userId,jdbcType=BIGINT}, + task_id = #{taskId,jdbcType=BIGINT}, + name = #{name,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + company = #{company,jdbcType=VARCHAR}, + signin_time = #{signinTime,jdbcType=BIGINT}, + sequence = #{sequence,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/mybatis/mybatis-config.xml b/mt/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 00000000..06ec6488 --- /dev/null +++ b/mt/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 46ce8837..c9d15fa3 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,7 @@ tall util game + mt com.ccsens 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 420a7c81..bca4fc8d 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 @@ -5,16 +5,18 @@ import lombok.Getter; import lombok.Setter; @Data public class MemberVo { + @Data public static class MemberInfo{ private Long id; private Long userId; -// private Long memberRoleId; + private Long projectId; private String nickname; private String avatarUrl; private Integer no; private String phone; private String description; private Long joinTime; + private Long stakeholderId; } } 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 dd0663d6..aa9ad857 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 @@ -140,7 +140,7 @@ public class TaskVo { @Data public static class PluginVo{ @ApiModelProperty("插件id") - private Long id; + private String id; @ApiModelProperty("插件名") private String name; @JsonIgnore @@ -240,4 +240,11 @@ public class TaskVo { private Long subTimeId; } + @Data + public static class TaskInfoWithFeign{ + private Long id; + private String name; + private Long projectId; + private String projectName; + } } 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 01b57640..72055bd7 100644 --- a/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java +++ b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java @@ -134,9 +134,11 @@ public class SpringConfig implements WebMvcConfigurer { .excludePathPatterns("/users/account") .excludePathPatterns("/users/token") .excludePathPatterns("/users/claims") + .excludePathPatterns("/users/member") .addPathPatterns("/plugins/**") .addPathPatterns("/delivers/**") .addPathPatterns("/tasks/**") + .excludePathPatterns("/tasks/projectId") .addPathPatterns("/members/**") .addPathPatterns("/templates/**") .addPathPatterns("/hardware/**"); 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 83e77360..fefb5a92 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 @@ -11,7 +11,8 @@ import java.util.List; @Repository public interface TaskDetailDao extends ProTaskDetailMapper { - List selectNormalTaskListByPM(@Param("projectId") Long projectId, @Param("parentId") Long parentId, @Param("startTime") Long startTime, @Param("endTime") Long endTime); + List selectNormalTaskListByPM(@Param("projectId") Long projectId, @Param("parentId") Long parentId, + @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("roleId") Long roleId); List selectTaskByRoleAndAllMembers(@Param("projectId") Long projectId, @Param("roleId") Long roleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime); diff --git a/tall/src/main/java/com/ccsens/tall/service/ExcelMtService.java b/tall/src/main/java/com/ccsens/tall/service/ExcelMtService.java deleted file mode 100644 index 57759c8e..00000000 --- a/tall/src/main/java/com/ccsens/tall/service/ExcelMtService.java +++ /dev/null @@ -1,1106 +0,0 @@ -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.po.*; -import com.ccsens.tall.bean.vo.ProjectVo; -import com.ccsens.tall.persist.dao.SysPluginDao; -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 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.io.FileInputStream; -import java.io.InputStream; -import java.util.*; - -@Slf4j -@Service -@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) -public class ExcelMtService implements IExcelMtService { - @Autowired - private SysPluginDao sysPluginDao; - @Autowired - private IProjectService projectService; - @Autowired - private IProShowService proShowService; - @Autowired - private Snowflake snowflake; - @Autowired - private IProRoleService proRoleService; - @Autowired - private IProMemberRoleService proMemberRoleService; - @Autowired - private IExcludeRoleService excludeRoleService; - @Autowired - private IProMemberService proMemberService; - @Autowired - private IProTaskDetailService proTaskDetailService; - @Autowired - private ITaskSubTimeService taskSubTimeService; - @Autowired - private ITaskMemberService taskMemberService; - @Autowired - private ITaskDeliverService taskDeliverService; - @Autowired - private ITaskPluginService taskPluginService; - @Autowired - private IUserService userService; - @Autowired - private IUserAttentionService userAttentionService; - - - @Override - public ProjectVo.ProjectInfo readXls(String path, Long currentUserId) throws Exception { - InputStream is = new FileInputStream(path); - XSSFWorkbook xssfWorkbook = new XSSFWorkbook(is); - //读取WBS表 - SysProject sysProject = readWbs(xssfWorkbook, currentUserId); - ProjectVo.ProjectInfo projectInfo = selectByProjectId(currentUserId, sysProject); - return projectInfo; - } - - /** - * 读取Wbs - */ - public SysProject readWbs(XSSFWorkbook xssfWorkbook, Long currentUserId) throws Exception { - //项目 - SysProject sysProject = new SysProject(); - //角色 - List proRoles = new ArrayList<>(); - //成员 - List proMembers = new ArrayList<>(); - //任务 - List taskDetails = new ArrayList<>(); - - XSSFSheet memberSheet = xssfWorkbook.getSheet("项目成员表"); - XSSFSheet wbsSheet = xssfWorkbook.getSheetAt(0);//wbs - - int projectInfoStart = 0; - int projectInfoEnd = 0; - int memberStart = 0; - int memberEnd = 0; - int taskStart = 0; - int taskEnd = 0; - - taskEnd = wbsSheet.getLastRowNum(); - for (int i = 0; i <= wbsSheet.getLastRowNum(); i++) { - XSSFRow xssfRow = wbsSheet.getRow(i); - - if (xssfRow == null) { - continue; - } - XSSFCell xssfCell = xssfRow.getCell(0); - if (xssfCell == null) { - continue; - } - String s = ExcelUtil.getCellValue(xssfCell); - - if (s.indexOf("项目信息") == 0) { - projectInfoStart = i + 1; - } - if (s.indexOf("项目成员") == 0) { - projectInfoEnd = i - 1; - memberStart = i + 1; - } - if (s.indexOf("项目任务分解") == 0) { - memberEnd = i - 1; - taskStart = i + 1; - } - } - if (projectInfoStart == 0) { - throw new BaseException(CodeEnum.WSB_NOT_PROJECT_HEADER); - } - if (projectInfoStart == 0) { - throw new BaseException(CodeEnum.WSB_NOT_MEMBER_HEADER); - } - if (projectInfoStart == 0) { - throw new BaseException(CodeEnum.WSB_NOT_TASK_HEADER); - } - readProject(wbsSheet, projectInfoStart, projectInfoEnd, currentUserId, sysProject); - readMember(xssfWorkbook, wbsSheet, memberSheet, memberStart, memberEnd, sysProject, proRoles, proMembers); - readTask(xssfWorkbook, wbsSheet, taskStart, taskEnd, currentUserId, sysProject, taskDetails, proRoles, proMembers); - saveProTaskSubTime(taskDetails); - //读取插件表 - readPlugin(xssfWorkbook, taskDetails, proRoles); - return sysProject; - } - - /** - * 添加项目 - */ - private void readProject(XSSFSheet wbsSheet, int projectInfoStart, int projectInfoEnd, Long currentUserId, SysProject sysProject) { - XSSFRow row = wbsSheet.getRow(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; - try { - beginTime = Long.parseLong(begin); - endTime = Long.parseLong(end); - } catch (Exception e) { - //日期格式错误 - throw new BaseException(CodeEnum.WBS_PROJECT_TIME_ERROR); - } - sysProject.setId(snowflake.nextId()); - sysProject.setName(projectName); - sysProject.setDescription(ExcelUtil.getCellValue(row.getCell(1))); - sysProject.setAddress(ExcelUtil.getCellValue(row.getCell(2))); - sysProject.setBeginTime(beginTime); - sysProject.setEndTime(endTime); - sysProject.setCreatorId(currentUserId); - //是否发布,默认是1发布的 - sysProject.setPublished((byte) 1); - //是否是模板,新加的不是模板 0 - sysProject.setTemplate((byte) 0); - projectService.saveProject(sysProject); - System.out.println(sysProject); - //TODO 添加项目的展示配置 暂时全是默认 - ProShow proShow = new ProShow(); - proShow.setId(snowflake.nextId()); - proShow.setProjectId(sysProject.getId()); - proShowService.saveProShow(proShow); - } else { - //没有开始结束时间 - throw new BaseException(CodeEnum.WBS_NOT_PROJECT_TIME); - } - } else { - //没有项目名 - throw new BaseException(CodeEnum.WBS_NOT_PROJECT_NAME); - } - } - - /** - * 读取成员相关 - */ - private void readMember(XSSFWorkbook xssfWorkbook, XSSFSheet wbsSheet, XSSFSheet memberSheet, int memberStart, int memberEnd, - SysProject sysProject, List proRoles, List proMembers) throws Exception { - - //添加奖惩干系人角色(一级角色) - 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); - proRoles.add(stakeholderRole); - //添加奖惩干系人角色(二级角色) - ProRole stakeholderProRole = new ProRole(); - stakeholderProRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.value); - stakeholderProRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.phase); - stakeholderProRole.setParentId(stakeholderRole.getId()); - stakeholderProRole.setProjectId(sysProject.getId()); - stakeholderProRole.setId(snowflake.nextId()); - proRoleService.saveProRole(stakeholderProRole); - proRoles.add(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); - proRoles.add(creator); - //添加创建者角色(二级角色) - ProRole creatorRole = new ProRole(); - creatorRole.setName(WebConstant.ROLE_NAME.Creator.value); - creatorRole.setDescription(WebConstant.ROLE_NAME.Creator.phase); - creatorRole.setParentId(creator.getId()); - creatorRole.setProjectId(sysProject.getId()); - creatorRole.setId(snowflake.nextId()); - proRoleService.saveProRole(creatorRole); - proRoles.add(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); - proRoles.add(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); - proRoles.add(attentionRole); - - //添加成员和奖惩干系人 - memberWhitStakeholder(xssfWorkbook, memberSheet, stakeholderProRole.getId(), sysProject, proMembers); - - Long firstRoleId = null; - Long secondRoleId = null; - for (int i = memberStart + 1; i <= memberEnd; i++) { - XSSFRow row = wbsSheet.getRow(i); - String proRoleCell = ExcelUtil.getCellValue(row.getCell(1)); - String secondRoleCell = ExcelUtil.getCellValue(row.getCell(2)); - String memberCell = ExcelUtil.getCellValue(row.getCell(3)); - //添加一级角色 - if (StrUtil.isNotEmpty(proRoleCell)) { - ProRole role = new ProRole(); - role.setId(snowflake.nextId()); - role.setProjectId(sysProject.getId()); - if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.God.phase)) { - role.setName(WebConstant.ROLE_NAME.God.value); - role.setDescription(WebConstant.ROLE_NAME.God.phase); - } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.ManageRepresent.phase)) { - role.setName(WebConstant.ROLE_NAME.ManageRepresent.value); - role.setDescription(WebConstant.ROLE_NAME.ManageRepresent.phase); - } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Stakeholder.phase)) { - role.setName(WebConstant.ROLE_NAME.Stakeholder.value); - role.setDescription(WebConstant.ROLE_NAME.Stakeholder.phase); - } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.PM.phase)) { - role.setName(WebConstant.ROLE_NAME.PM.value); - role.setDescription(WebConstant.ROLE_NAME.PM.phase); - } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Member.phase)) { - role.setName(WebConstant.ROLE_NAME.Member.value); - role.setDescription(WebConstant.ROLE_NAME.Member.phase); - } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Attention.phase)) { - role.setName(WebConstant.ROLE_NAME.Attention.value); - role.setDescription(WebConstant.ROLE_NAME.Attention.phase); - } else { - throw new BaseException(CodeEnum.WBS_NOT_FIRST_ROLE.addMsg(wbsSheet.getSheetName() + i)); - } - proRoleService.saveProRole(role); - proRoles.add(role); - firstRoleId = role.getId(); - - } - if (ObjectUtil.isNull(firstRoleId)) { - throw new BaseException("找不到系统角色[" + i + "]"); - } - //二级角色 - if (StrUtil.isNotEmpty(secondRoleCell)) { - if (!proMemberRoleExist(secondRoleCell, proRoles)) { - ProRole proRole = new ProRole(); - proRole.setName(secondRoleCell); - proRole.setParentId(firstRoleId); - proRole.setProjectId(sysProject.getId()); - proRole.setId(snowflake.nextId()); - proRoleService.saveProRole(proRole); - proRoles.add(proRole); - secondRoleId = proRole.getId(); - } else { - throw new BaseException(CodeEnum.WBS_REPEAT_ROLE_NAME.addMsg(wbsSheet.getSheetName() + i)); - } - } - if (ObjectUtil.isNull(secondRoleId)) { - throw new BaseException("找不到二级角色[" + i + "]"); - } - - if (StrUtil.isNotEmpty(memberCell)) { - ProMemberRole memberRole = null; - for (ProMember member : proMembers) { - if (memberCell.equalsIgnoreCase(member.getNickname())) { - memberRole = new ProMemberRole(); - memberRole.setId(snowflake.nextId()); - memberRole.setMemberId(member.getId()); - memberRole.setRoleId(secondRoleId); - proMemberRoleService.saveMemberRole(memberRole); - } - } - if (ObjectUtil.isNull(memberRole)) { - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(wbsSheet.getSheetName() + i)); - } - } - } - //角色对谁不可见 - String[] excludeRoleCells; - for (int i = memberStart + 1; i <= memberEnd; i++) { - XSSFRow row = wbsSheet.getRow(i); - String secondRoleCell = ExcelUtil.getCellValue(row.getCell(2)); - String excludeRoleCell = StringUtil.replaceComma(ExcelUtil.getCellValue(row.getCell(4))); - //获取角色对谁不可见 - if (StrUtil.isNotEmpty(excludeRoleCell)) { - excludeRoleCells = excludeRoleCell.split(","); - - Long proRoleId = null; - if (StrUtil.isNotEmpty(secondRoleCell)) { - for (ProRole role : proRoles) { - if (secondRoleCell.equalsIgnoreCase(role.getName())) { - proRoleId = role.getId(); - break; - } - } - } - - if (ObjectUtil.isNotNull(excludeRoleCells)) { - for (int a = 0; a < excludeRoleCells.length; a++) { - ProRoleExclude excludeRole = new ProRoleExclude(); - excludeRole.setId(snowflake.nextId()); - excludeRole.setRoleId(proRoleId); - if (CollectionUtil.isNotEmpty(proRoles)) { - Long roleId = null; - for (ProRole memberRole : proRoles) { - if (excludeRoleCells[a].equals(memberRole.getName())) { - roleId = memberRole.getId(); - excludeRole.setOtherRoleId(roleId); - break; - } - } - if (ObjectUtil.isNull(roleId)) { - throw new BaseException(CodeEnum.WBS_NOT_FIND_ROLE.addMsg(wbsSheet.getSheetName() + i)); - } - } - excludeRoleService.saveExcludeRole(excludeRole); - } - } - } - } - - //TODO 添加mvp角色 - ProRole proMemberRole = new ProRole(); - proMemberRole.setName(WebConstant.ROLE_NAME.MVP.phase); - proMemberRole.setParentId(firstRoleId); - proMemberRole.setProjectId(sysProject.getId()); - proMemberRole.setId(snowflake.nextId()); - proRoleService.saveProRole(proMemberRole); - proRoles.add(proMemberRole); - } - - /** - * 判断集合是否为空,有没有相同内容 - */ - private boolean proMemberRoleExist(String memberRoleName, List proRoles) { - if (CollectionUtil.isNotEmpty(proRoles)) { - for (ProRole proMemberRole : proRoles) { - if (proMemberRole.getName().equals(memberRoleName)) { - return true; - } - } - } - return false; - } - - /** - * 添加成员与奖惩干系人 - */ - private void memberWhitStakeholder(XSSFWorkbook xssfWorkbook, XSSFSheet memberSheet, Long stakeholderId, SysProject sysProject, List proMembers) throws Exception { - List stakeholderList = new ArrayList<>(); - if (ObjectUtil.isNotNull(memberSheet)) { - 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)); - ProMember stakeholder = null; - ProMember member = null; - //手机号不能为空 - if (StrUtil.isNotEmpty(memberCell) && StrUtil.isEmpty(phoneCell)) { - XSSFSheet sheet = xssfWorkbook.getSheet(memberCell); - if (ObjectUtil.isNull(sheet)) { - throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(memberSheet.getSheetName() + i)); - }else { - if("评委表".equalsIgnoreCase(sheet.getSheetName())){ - judgeSheet(sheet,sysProject,proMembers); - }else if("选手信息表".equalsIgnoreCase(sheet.getSheetName())){ - companySheet(sheet,sysProject,proMembers); - } - } - - } - - if ((StrUtil.isNotEmpty(stakeholderCell) && StrUtil.isEmpty(stakeholderPhoneCell))) { - throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(memberSheet.getSheetName() + i)); - } - //TODO 判断手机号格式 - - //添加奖惩干系人 - if (StrUtil.isNotEmpty(stakeholderCell)) { - if (!stakeholderWithPhone(stakeholderList, stakeholderCell, stakeholderPhoneCell)) { - Long userId = userService.selectUserIdByPhone(stakeholderPhoneCell); - if (ObjectUtil.isNotNull(userId)) { - userIdSet.add(userId); - } - stakeholder = new ProMember(); - stakeholder.setId(snowflake.nextId()); - stakeholder.setProjectId(sysProject.getId()); - stakeholder.setUserId(userId); - stakeholder.setNickname(stakeholderCell); - stakeholder.setPhone(stakeholderPhoneCell); - proMemberService.saveMember(stakeholder); - stakeholderList.add(stakeholder); - - ProMemberRole proMemberRole = new ProMemberRole(); - proMemberRole.setId(snowflake.nextId()); - proMemberRole.setMemberId(stakeholder.getId()); - proMemberRole.setRoleId(stakeholderId); - proMemberRoleService.saveMemberRole(proMemberRole); - } else { - throw new BaseException(CodeEnum.WBS_STAKEHOLDER_PHONE.addMsg(memberSheet.getSheetName() + i)); - } - } - //成员 - if (StrUtil.isNotEmpty(memberCell)) { - if (!memberAndPhoneRepeat(proMembers, memberCell, phoneCell)) { - Long userId = userService.selectUserIdByPhone(phoneCell); - if (ObjectUtil.isNotNull(userId)) { - userIdSet.add(userId); - } - member = new ProMember(); - member.setId(snowflake.nextId()); - member.setProjectId(sysProject.getId()); - member.setUserId(userId); - member.setNickname(memberCell); - member.setPhone(phoneCell); - if (ObjectUtil.isNotNull(stakeholder)) { - member.setStakeholderId(stakeholder.getId()); - } - proMemberService.saveMember(member); - proMembers.add(member); -// //创建者依据project的creatorId判断,不需要添加成员 - } else { - throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE.addMsg(memberSheet.getSheetName() + i)); - } - } - } - //TODO 每个成员都关注此项目(暂时) - addUserAttention(userIdSet, sysProject); - } else { - throw new BaseException(CodeEnum.WBS_NOT_MEMBER_SHEET); - } - } - /** - * 导入评委表 - */ - private void judgeSheet(XSSFSheet judgeSheet, SysProject sysProject, List proMembers) throws Exception { - Set userIdSet = new HashSet<>(); - for (int i = 3; i <= judgeSheet.getLastRowNum(); i++) { - ProMember member = null; - String memberCell = ExcelUtil.getCellValue(judgeSheet.getRow(i).getCell(1)); - String phoneCell = ExcelUtil.getCellValue(judgeSheet.getRow(i).getCell(2)); - if (StrUtil.isNotEmpty(memberCell) && StrUtil.isEmpty(phoneCell)) { - throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(judgeSheet.getSheetName() + i)); - } - //成员 - if (StrUtil.isNotEmpty(memberCell)) { - if (!memberAndPhoneRepeat(proMembers, memberCell, phoneCell)) { - Long userId = userService.selectUserIdByPhone(phoneCell); - if (ObjectUtil.isNotNull(userId)) { - userIdSet.add(userId); - } - member = new ProMember(); - member.setId(snowflake.nextId()); - member.setProjectId(sysProject.getId()); - member.setUserId(userId); - member.setNickname(memberCell); - member.setPhone(phoneCell); - proMemberService.saveMember(member); - proMembers.add(member); -// //创建者依据project的creatorId判断,不需要添加成员 - } else { - throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE.addMsg(judgeSheet.getSheetName() + i)); - } - } - } - //TODO 每个成员都关注此项目(暂时) - addUserAttention(userIdSet, sysProject); - } - private void companySheet(XSSFSheet companySheet, SysProject sysProject, List proMembers) throws Exception { - Set userIdSet = new HashSet<>(); - for (int i = 3; i <= companySheet.getLastRowNum(); i++) { - ProMember member = null; - String memberCell = ExcelUtil.getCellValue(companySheet.getRow(i).getCell(1)); - String phoneCell = ExcelUtil.getCellValue(companySheet.getRow(i).getCell(2)); - if (StrUtil.isNotEmpty(memberCell) && StrUtil.isEmpty(phoneCell)) { - throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(companySheet.getSheetName() + i)); - } - //成员 - if (StrUtil.isNotEmpty(memberCell)) { - if (!memberAndPhoneRepeat(proMembers, memberCell, phoneCell)) { - Long userId = userService.selectUserIdByPhone(phoneCell); - if (ObjectUtil.isNotNull(userId)) { - userIdSet.add(userId); - } - member = new ProMember(); - member.setId(snowflake.nextId()); - member.setProjectId(sysProject.getId()); - member.setUserId(userId); - member.setNickname(memberCell); - member.setPhone(phoneCell); - proMemberService.saveMember(member); - proMembers.add(member); -// //创建者依据project的creatorId判断,不需要添加成员 - } else { - throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE.addMsg(companySheet.getSheetName() + i)); - } - } - } - //TODO 每个成员都关注此项目(暂时) - addUserAttention(userIdSet, sysProject); - } - - - /** - * 项目成员表内的每个人都关注此项目(暂时,当前版本) - */ - private void addUserAttention(Set userIdList, SysProject sysProject) { - if (CollectionUtil.isNotEmpty(userIdList)) { - for (Long userId : userIdList) { - UserAttention userAttention = new UserAttention(); - userAttention.setId(snowflake.nextId()); - userAttention.setUserId(userId); - userAttention.setProjectId(sysProject.getId()); - userAttentionService.saveAttention(userAttention); - } - } - } - - /** - * 判断奖惩干系人与手机号对应是否正确 - * 奖惩干系人可以重复,一个人只能对应一个手机号 - */ - private boolean stakeholderWithPhone(List stakeholderList, String stakeholderName, String phone) { - if (CollectionUtil.isNotEmpty(stakeholderList)) { - for (ProMember proMember : stakeholderList) { - if (stakeholderName.equalsIgnoreCase(proMember.getNickname())) { - if (!proMember.getPhone().equalsIgnoreCase(phone)) { - return true; - } - } else { - if (proMember.getPhone().equalsIgnoreCase(phone)) { - return true; - } - } - } - } - return false; - } - - /** - * 判断成员和手机号是否重复 - */ - private boolean memberAndPhoneRepeat(List proMembers, String memberName, String phone) { - if (CollectionUtil.isNotEmpty(proMembers)) { - for (ProMember proMember : proMembers) { - if (proMember.getNickname().equalsIgnoreCase(memberName)) { - return true; - } - if (proMember.getPhone().equalsIgnoreCase(phone)) { - return true; - } - } - } - return false; - } - - /** - * 读取任务 - */ - private void readTask(XSSFWorkbook xssfWorkbook, XSSFSheet wbsSheet, int taskStart, int taskEnd, - Long currentUserId, SysProject sysProject, List taskDetails, - List proRoles, List proMembers) throws Exception { - Long pmRoleId = null; - //获取项目经理的id(一级角色) - for (ProRole role : proRoles) { - if (role.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.PM.value)) { - pmRoleId = role.getId(); - break; - } - } - //获取项目经理的id(二级角色) - if (ObjectUtil.isNotNull(pmRoleId)) { - for (ProRole secondRole : proRoles) { - if (ObjectUtil.isNotNull(secondRole.getParentId()) && - secondRole.getParentId().longValue() == pmRoleId.longValue()) { - pmRoleId = secondRole.getId(); - break; - } - } - } - //TODO 添加一个开始虚拟节点 - ProTaskDetail beginTask = new ProTaskDetail(); - beginTask.setId(snowflake.nextId()); - beginTask.setProjectId(sysProject.getId()); - beginTask.setName("开始"); - beginTask.setVirtual((byte) WebConstant.TASK_VIRTUAL.Virtual.value); - beginTask.setLevel((byte) WebConstant.TASK_LEVEL.Virtual.value); - beginTask.setExecutorRole(pmRoleId); - proTaskDetailService.saveTaskDetail(beginTask); - taskDetails.add(beginTask); - //一级任务id - Long firstTaskDetailId = null; - - for (int i = taskStart + 1; i <= taskEnd; i++) { - XSSFRow row = wbsSheet.getRow(i); - //一级任务名称 - 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 repeat = ExcelUtil.getCellValue(row.getCell(7)); - String subTaskCell = ExcelUtil.getCellValue(row.getCell(8)); - String subProject = ExcelUtil.getCellValue(row.getCell(9)); - String deliver = ExcelUtil.getCellValue(row.getCell(10)); - String executorRole = ExcelUtil.getCellValue(row.getCell(11)); - String checkerRole = ExcelUtil.getCellValue(row.getCell(12)); - String money = ExcelUtil.getCellValue(row.getCell(13)); - String delay = ExcelUtil.getCellValue(row.getCell(14)); - String delayTime = ExcelUtil.getCellValue(row.getCell(15)); - String loopTo = ExcelUtil.getCellValue(row.getCell(16)); - String loopTimes = ExcelUtil.getCellValue(row.getCell(17)); - String input = ExcelUtil.getCellValue(row.getCell(18)); - //二级任务名不能为空 -// if(StrUtil.isEmpty(task2)){ -// throw new BaseException(CodeEnum.WBS_NOT_TASK_NAME.addMsg(wbsSheet.getSheetName()+i)); -// } - //TODO 一级任务(时间暂时为空) - if (StrUtil.isNotEmpty(task1)) { - ProTaskDetail firstTaskDetail = new ProTaskDetail(); - firstTaskDetail.setId(snowflake.nextId()); - firstTaskDetail.setName(task1); - firstTaskDetail.setProjectId(sysProject.getId()); - 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); - - firstTaskDetailId = firstTaskDetail.getId(); - - } - if (ObjectUtil.isNull(firstTaskDetailId)) { - throw new BaseException("找不到任务[" + i + "]"); - } - - //二级任务 - if (StrUtil.isNotEmpty(task2)) { - ProTaskDetail taskDetail = new ProTaskDetail(); - taskDetail.setId(snowflake.nextId()); - taskDetail.setProjectId(sysProject.getId()); - taskDetail.setParentId(firstTaskDetailId); - taskDetail.setName(task2); - taskDetail.setDescription(description); - taskDetail.setVirtual((byte) WebConstant.TASK_VIRTUAL.Normal.value); - taskDetail.setLevel((byte) WebConstant.TASK_LEVEL.SecondTask.value); - taskDetail.setHasGroup((byte) 0); - 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); - } - } - //负责人 - if (CollectionUtil.isNotEmpty(proRoles)) { - Long executorRoleId = null; - for (ProRole proRole : proRoles) { - if (ObjectUtil.isNotNull(proRole.getParentId()) && proRole.getName().equals(executorRole)) { - executorRoleId = proRole.getId(); - taskDetail.setExecutorRole(executorRoleId); - break; - } - } - if (ObjectUtil.isNull(executorRoleId)) { - throw new BaseException(CodeEnum.WBS_NOT_FIND_EXECUTOR_ROLE.addMsg(wbsSheet.getSheetName() + i)); - } - } - //检查人 - if (CollectionUtil.isNotEmpty(proRoles)) { - Long checkerRoleId = null; - for (ProRole proRole : proRoles) { - if (ObjectUtil.isNotNull(proRole.getParentId()) && proRole.getName().equals(checkerRole)) { - checkerRoleId = proRole.getId(); - taskDetail.setCheckerRole(checkerRoleId); - break; - } - } - if (ObjectUtil.isNull(checkerRoleId)) { - throw new BaseException(CodeEnum.WBS_NOT_FIND_CHECKER_ROLE.addMsg(wbsSheet.getSheetName() + i)); - } - } - //奖惩金额 - if (StrUtil.isNotEmpty(money)) { - taskDetail.setMoney(Long.parseLong(money) * 100); - } - //切换模式 - if (delay.equals(WebConstant.TASK_DELAY.SelfMotion.phase)) { - taskDetail.setDelay((byte) WebConstant.TASK_DELAY.SelfMotion.value); - } else if (delay.equals(WebConstant.TASK_DELAY.DelayManual.phase)) { - taskDetail.setDelay((byte) WebConstant.TASK_DELAY.DelayManual.value); - } else if (delay.equals(WebConstant.TASK_DELAY.Manual.phase)) { - taskDetail.setDelay((byte) WebConstant.TASK_DELAY.Manual.value); - } else { - throw new BaseException(CodeEnum.WBS_DELAY_ERROR.addMsg(wbsSheet.getSheetName() + i)); - } - //延迟时间 - if (StrUtil.isNotEmpty(delayTime)) { - taskDetail.setDelayTime(DateUtil.str2MillSeconds(delayTime)); - } - //TODO 跳转任务(应该在循环外处理) - - //跳转次数 - - //输入文档 - if (StrUtil.isNotEmpty(input)) { - ProTaskDeliver taskDeliver = new ProTaskDeliver(); - taskDeliver.setId(snowflake.nextId()); - taskDeliver.setTaskDetailId(taskDetail.getId()); - taskDeliver.setName(input); - taskDeliver.setIsInput(1); - taskDeliver.setIsFinal(0); - taskDeliverService.saveDeliver(taskDeliver); - } - //TODO 设备挂载暂不处理 - - //没有开始时间默认项目开始时间 - if (StrUtil.isNotEmpty(beginTime)) { - taskDetail.setBeginTime(Long.valueOf(beginTime)); - } else { - taskDetail.setBeginTime(sysProject.getBeginTime()); - } - //没有结束时间默认项目结束时间 - if (StrUtil.isNotEmpty(endTime)) { - taskDetail.setEndTime(Long.valueOf(endTime)); - } else { - taskDetail.setEndTime(sysProject.getEndTime()); - } - //重复频率 - if (StrUtil.isNotEmpty(repeat)) { - taskDetail.setCycle(repeat); - } - //子任务 - if (StrUtil.isNotEmpty(subTaskCell)) { - taskDetail.setHasGroup((byte) 1); - switch (subTaskCell) { - case "值日表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); - break; - case "运动计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); - break; - case "前端学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); - break; - case "后台学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); - break; - case "硬件学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); - break; - case "方圆学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); - break; - case "全体学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver); - break; - default: - throw new BaseException(CodeEnum.WBS_SUB_TASK_ANALYSIS.addMsg(wbsSheet.getSheetName() + i)); - } - } else { - //不是分组任务,直接添加交付物 - readDeliverSheet(deliver, xssfWorkbook, taskDetail.getId()); - } - //添加任务 - proTaskDetailService.saveTaskDetail(taskDetail); - taskDetails.add(taskDetail); - } - } - //添加一个结束虚拟节点 - ProTaskDetail endTask = new ProTaskDetail(); - endTask.setId(snowflake.nextId()); - endTask.setProjectId(sysProject.getId()); - endTask.setName("结束"); - endTask.setVirtual((byte) WebConstant.TASK_VIRTUAL.Virtual.value); - endTask.setLevel((byte) WebConstant.TASK_LEVEL.Virtual.value); - endTask.setExecutorRole(pmRoleId); - proTaskDetailService.saveTaskDetail(endTask); - taskDetails.add(endTask); - } - - /** - * 读取子任务表 - */ - public void getSubTask(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, - List taskDetails, List proMembers, String deliverCell) { - XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); - Long startTime = parentTaskDetail.getBeginTime(); - if (ObjectUtil.isNotNull(subTaskSheet)) { - String str = ExcelUtil.getCellValue(subTaskSheet.getRow(1).getCell(4)); - for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { - 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)); - //重复时间、相对时间 - String repeatCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(4)); - String memberCell = StringUtil.replaceComma(ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(6))); - //备注 - String descriptionCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(8)); - if (StrUtil.isNotEmpty(nameCell)) { - ProTaskDetail subTask = new ProTaskDetail(); - BeanUtil.copyProperties(parentTaskDetail, subTask); - subTask.setId(snowflake.nextId()); - subTask.setName(nameCell); - subTask.setDescription(descriptionCell); - subTask.setLevel((byte) 3); - subTask.setHasGroup((byte) 0); - subTask.setParentId(parentTaskDetail.getId()); - if (StrUtil.isNotEmpty(memberCell)) { - if (memberCell.equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { - parentTaskDetail.setAllMember((byte) 1); - subTask.setAllMember((byte) 1); - } else { - parentTaskDetail.setAllMember((byte) 0); - subTask.setAllMember((byte) 0); - List memberList = StringUtil.extractMessage(memberCell); - if (CollectionUtil.isNotEmpty(memberList)) { - for (String memberName : memberList) { - if (CollectionUtil.isNotEmpty(proMembers)) { - Long proMemberId = null; - for (ProMember proMember : proMembers) { - if (memberName.equalsIgnoreCase(proMember.getNickname())) { - proMemberId = proMember.getId(); - ProTaskMember proTaskMember = new ProTaskMember(); - proTaskMember.setId(snowflake.nextId()); - proTaskMember.setTaskDetailId(subTask.getId()); - proTaskMember.setMemberId(proMemberId); - taskMemberService.saveTaskMember(proTaskMember); - break; - } - } - if (ObjectUtil.isNull(proMemberId)) { - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); - } - } - } - } else { - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); - } - } - } - - if (StrUtil.isNotEmpty(repeatCell)) { - if ("重复时间".equals(str)) { - subTask.setCycle(repeatCell); - } - if ("相对时间".equals(str)) { - subTask.setBeginTime(startTime); - Long relative = StringUtil.severalDay(repeatCell); - if (ObjectUtil.isNotNull(relative)) { - subTask.setEndTime(startTime + relative); - } - } - } else { - if (ObjectUtil.isNotNull(beginCell)) { - subTask.setBeginTime(Long.valueOf(beginCell)); - } - if (ObjectUtil.isNotNull(endCell)) { - subTask.setEndTime(Long.valueOf(endCell)); - } - parentTaskDetail.setBeginTime(subTask.getBeginTime()); - } - startTime = subTask.getEndTime(); - //给每个子任务添加交付物 - readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); - - proTaskDetailService.saveTaskDetail(subTask); - taskDetails.add(subTask); - } - } - } else { - throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); - } - parentTaskDetail.setEndTime(startTime); - } - - /** - * 分解任务时间 - * - * @param taskDetails - * @throws Exception - */ - public void saveProTaskSubTime(List taskDetails) throws Exception { - if (CollectionUtil.isNotEmpty(taskDetails)) { - for (ProTaskDetail taskDetail : taskDetails) { - //虚拟任务或一级任务不拆分 - if (taskDetail.getVirtual() == WebConstant.TASK_VIRTUAL.Virtual.value || taskDetail.getLevel() == 1) { - continue; - } - //cycle为空或者组任务,只加一条数据 - if (StrUtil.isEmpty(taskDetail.getCycle()) || taskDetail.getHasGroup() == 1) { - ProTaskSubTime proTaskSubTime = new ProTaskSubTime(); - proTaskSubTime.setId(snowflake.nextId()); - proTaskSubTime.setTaskDetailId(taskDetail.getId()); - proTaskSubTime.setBeginTime(taskDetail.getBeginTime()); - proTaskSubTime.setEndTime(taskDetail.getEndTime()); - taskSubTimeService.saveProTaskSubTask(proTaskSubTime); - } else { - Date startDate = new Date(taskDetail.getBeginTime()); - Date endDate = new Date(taskDetail.getEndTime()); - List taskDateList = - NatureToDate.generateDates(taskDetail.getCycle(), startDate, endDate); - if (CollectionUtil.isEmpty(taskDateList)) { - 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); - } - } - } - } - } - - /** - * 读取交付物表 - */ - private 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)) { - String subStr = deliverCell.substring(4); - XSSFSheet subSheet = xssfWorkbook.getSheet(subStr); - for (int i = 2; i <= subSheet.getLastRowNum(); i++) { - String deliver = ExcelUtil.getCellValue(subSheet.getRow(i).getCell(1)); - if (StrUtil.isNotEmpty(deliver)) { - ProTaskDeliver taskDeliver = new ProTaskDeliver(); - taskDeliver.setId(snowflake.nextId()); - taskDeliver.setName(deliver); - taskDeliver.setTaskDetailId(taskId); - taskDeliver.setIsInput(0); - taskDeliver.setIsFinal(0); - if (i == subSheet.getLastRowNum()) { - taskDeliver.setIsFinal(1); - } - taskDeliverService.saveDeliver(taskDeliver); - } - } - } else { - ProTaskDeliver taskDeliver = new ProTaskDeliver(); - taskDeliver.setId(snowflake.nextId()); - taskDeliver.setTaskDetailId(taskId); - taskDeliver.setName(deliverCell); - taskDeliver.setIsInput(0); - taskDeliver.setIsFinal(1); - taskDeliverService.saveDeliver(taskDeliver); - } - } - } - - /** - * 读取插件 - * - * @param xssfWorkbook - * @param taskDetails - * @param proRoles - */ - private void readPlugin(XSSFWorkbook xssfWorkbook, List taskDetails, List proRoles) { - SysPluginExample pluginExample = new SysPluginExample(); - pluginExample.clear(); - List sysPluginList = sysPluginDao.selectByExample(pluginExample); - if (CollectionUtil.isNotEmpty(sysPluginList)) { - XSSFSheet sheet = xssfWorkbook.getSheet("插件"); - if (ObjectUtil.isNotNull(sheet)) { - Long taskId = null; - Long memberRoleId = null; - XSSFRow roleRow = sheet.getRow(2); - - for (int i = 3; i < sheet.getLastRowNum(); i++) { - XSSFRow pluginRow = sheet.getRow(i); - String task = ExcelUtil.getCellValue(pluginRow.getCell(1)); - //获取任务Id - if (StrUtil.isNotEmpty(task)) { - for (ProTaskDetail proTask : taskDetails) { - if (task.equals(proTask.getName())) { - taskId = proTask.getId(); - break; - } - } - } - - for (int a = 2; a < roleRow.getLastCellNum(); a++) { - //获取memberRoleId - String roleCell = ExcelUtil.getCellValue(roleRow.getCell(a)); - if (StrUtil.isNotEmpty(roleCell) && CollectionUtil.isNotEmpty(proRoles)) { - for (ProRole role : proRoles) { - if (roleCell.equals(role.getName())) { - memberRoleId = role.getId(); - break; - } - } - } - String plugin = ExcelUtil.getCellValue(pluginRow.getCell(a)); - if (StrUtil.isNotEmpty(plugin)) { - Long sysPluginId = null; - for (SysPlugin sysPlugin : sysPluginList) { - if (plugin.equalsIgnoreCase(sysPlugin.getName())) { - sysPluginId = sysPlugin.getId(); - } - } - if (ObjectUtil.isNull(sysPluginId)) { - throw new BaseException(CodeEnum.WBS_NOT_PLUGIN.addMsg(sheet.getSheetName() + i)); - } - ProTaskPlugin taskPlugin = new ProTaskPlugin(); - taskPlugin.setId(snowflake.nextId()); - taskPlugin.setTaskDetailId(taskId); - taskPlugin.setPluginId(sysPluginId); - taskPlugin.setMemberRoleId(memberRoleId); - taskPluginService.savePlugin(taskPlugin); - } - } - } - } else { - throw new BaseException(CodeEnum.WBS_NOT_PLUGIN_SHEET); - } - } - } - - /** - * 返回信息 - * - * @param currentUserId - * @param sysProject - * @return - * @throws Exception - */ - public ProjectVo.ProjectInfo selectByProjectId(Long currentUserId, SysProject sysProject) throws Exception { - //返回参数 - ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); - projectInfo.setId(sysProject.getId()); - projectInfo.setName(sysProject.getName()); - projectInfo.setAddress(sysProject.getAddress()); - projectInfo.setBeginTime(sysProject.getBeginTime()); - projectInfo.setEndTime(sysProject.getEndTime()); - projectInfo.setTotalDuration(sysProject.getEndTime() - sysProject.getBeginTime()); - if (ObjectUtil.isNotNull(projectInfo)) { - projectInfo.setCreator(true); - } - return projectInfo; - } -} 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 3292dc93..8470d90a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java @@ -28,7 +28,7 @@ import java.util.*; @Slf4j @Service -@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class ExcelService implements IExcelService { @Autowired private SysPluginDao sysPluginDao; @@ -68,7 +68,7 @@ public class ExcelService implements IExcelService { XSSFWorkbook xssfWorkbook = new XSSFWorkbook(is); //读取WBS表 SysProject sysProject = readWbs(xssfWorkbook, currentUserId); - ProjectVo.ProjectInfo projectInfo = selectByProjectId(currentUserId,sysProject); + ProjectVo.ProjectInfo projectInfo = selectByProjectId(currentUserId, sysProject); return projectInfo; } @@ -76,6 +76,7 @@ public class ExcelService implements IExcelService { * 读取Wbs */ public SysProject readWbs(XSSFWorkbook xssfWorkbook, Long currentUserId) throws Exception { + Map> hasGroupMap = new HashMap<>(); //项目 SysProject sysProject = new SysProject(); //角色 @@ -120,39 +121,40 @@ public class ExcelService implements IExcelService { taskStart = i + 1; } } - if(projectInfoStart==0){ + if (projectInfoStart == 0) { throw new BaseException(CodeEnum.WSB_NOT_PROJECT_HEADER); } - if(projectInfoStart==0){ + if (projectInfoStart == 0) { throw new BaseException(CodeEnum.WSB_NOT_MEMBER_HEADER); } - if(projectInfoStart==0){ + if (projectInfoStart == 0) { throw new BaseException(CodeEnum.WSB_NOT_TASK_HEADER); } - readProject(wbsSheet, projectInfoStart, projectInfoEnd, currentUserId,sysProject); - readMember(wbsSheet, memberSheet,memberStart, memberEnd,sysProject, proRoles,proMembers); - readTask(xssfWorkbook, wbsSheet, taskStart, taskEnd, currentUserId,sysProject,taskDetails,proRoles,proMembers); + 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); + readPlugin(xssfWorkbook, taskDetails, proRoles, hasGroupMap); return sysProject; } + /** * 添加项目 */ - private void readProject(XSSFSheet wbsSheet, int projectInfoStart, int projectInfoEnd, Long currentUserId,SysProject sysProject) { + private void readProject(XSSFSheet wbsSheet, int projectInfoStart, int projectInfoEnd, Long currentUserId, SysProject sysProject) { XSSFRow row = wbsSheet.getRow(projectInfoStart + 1); String projectName = ExcelUtil.getCellValue(row.getCell(0)); - if(StrUtil.isNotEmpty(projectName)){ + 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)){ + if (StrUtil.isNotEmpty(begin) && StrUtil.isNotEmpty(end)) { Long beginTime = null; Long endTime = null; try { beginTime = Long.parseLong(begin); endTime = Long.parseLong(end); - }catch (Exception e){ + } catch (Exception e) { //日期格式错误 throw new BaseException(CodeEnum.WBS_PROJECT_TIME_ERROR); } @@ -174,11 +176,11 @@ public class ExcelService implements IExcelService { proShow.setId(snowflake.nextId()); proShow.setProjectId(sysProject.getId()); proShowService.saveProShow(proShow); - }else { + } else { //没有开始结束时间 throw new BaseException(CodeEnum.WBS_NOT_PROJECT_TIME); } - }else { + } else { //没有项目名 throw new BaseException(CodeEnum.WBS_NOT_PROJECT_NAME); } @@ -245,7 +247,7 @@ public class ExcelService implements IExcelService { proRoles.add(attentionRole); //添加成员和奖惩干系人 - memberWhitStakeholder(memberSheet, stakeholderProRole.getId(),sysProject,proMembers); + memberWhitStakeholder(memberSheet, stakeholderProRole.getId(), sysProject, proMembers); Long firstRoleId = null; Long secondRoleId = null; @@ -267,28 +269,23 @@ public class ExcelService implements IExcelService { if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.God.phase)) { role.setName(WebConstant.ROLE_NAME.God.value); role.setDescription(WebConstant.ROLE_NAME.God.phase); - }else - if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.ManageRepresent.phase)) { + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.ManageRepresent.phase)) { role.setName(WebConstant.ROLE_NAME.ManageRepresent.value); role.setDescription(WebConstant.ROLE_NAME.ManageRepresent.phase); - }else - if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Stakeholder.phase)) { + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Stakeholder.phase)) { role.setName(WebConstant.ROLE_NAME.Stakeholder.value); role.setDescription(WebConstant.ROLE_NAME.Stakeholder.phase); - }else - if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.PM.phase)) { + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.PM.phase)) { role.setName(WebConstant.ROLE_NAME.PM.value); role.setDescription(WebConstant.ROLE_NAME.PM.phase); - }else - if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Member.phase)) { + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Member.phase)) { role.setName(WebConstant.ROLE_NAME.Member.value); role.setDescription(WebConstant.ROLE_NAME.Member.phase); - }else - if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Attention.phase)) { + } else if (proRoleCell.equalsIgnoreCase(WebConstant.ROLE_NAME.Attention.phase)) { role.setName(WebConstant.ROLE_NAME.Attention.value); role.setDescription(WebConstant.ROLE_NAME.Attention.phase); - }else{ - throw new BaseException(CodeEnum.WBS_NOT_FIRST_ROLE.addMsg(wbsSheet.getSheetName()+i)); + } else { + throw new BaseException(CodeEnum.WBS_NOT_FIRST_ROLE.addMsg(wbsSheet.getSheetName() + i)); } proRoleService.saveProRole(role); proRoles.add(role); @@ -309,7 +306,7 @@ public class ExcelService implements IExcelService { } //二级角色 if (StrUtil.isNotEmpty(secondRoleCell)) { - if (!proMemberRoleExist(secondRoleCell,proRoles)) { + if (!proMemberRoleExist(secondRoleCell, proRoles)) { ProRole proRole = new ProRole(); proRole.setName(secondRoleCell); proRole.setParentId(firstRoleId); @@ -318,8 +315,8 @@ public class ExcelService implements IExcelService { proRoleService.saveProRole(proRole); proRoles.add(proRole); secondRoleId = proRole.getId(); - }else { - throw new BaseException(CodeEnum.WBS_REPEAT_ROLE_NAME.addMsg(wbsSheet.getSheetName()+i)); + } else { + throw new BaseException(CodeEnum.WBS_REPEAT_ROLE_NAME.addMsg(wbsSheet.getSheetName() + i)); } } if (ObjectUtil.isNull(secondRoleId)) { @@ -337,8 +334,8 @@ public class ExcelService implements IExcelService { proMemberRoleService.saveMemberRole(memberRole); } } - if(ObjectUtil.isNull(memberRole)){ - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(wbsSheet.getSheetName()+i)); + if (ObjectUtil.isNull(memberRole)) { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(wbsSheet.getSheetName() + i)); } } } @@ -376,8 +373,8 @@ public class ExcelService implements IExcelService { break; } } - if(ObjectUtil.isNull(roleId)){ - throw new BaseException(CodeEnum.WBS_NOT_FIND_ROLE.addMsg(wbsSheet.getSheetName()+i)); + if (ObjectUtil.isNull(roleId)) { + throw new BaseException(CodeEnum.WBS_NOT_FIND_ROLE.addMsg(wbsSheet.getSheetName() + i)); } } excludeRoleService.saveExcludeRole(excludeRole); @@ -399,7 +396,7 @@ public class ExcelService implements IExcelService { /** * 判断集合是否为空,有没有相同内容 */ - private boolean proMemberRoleExist(String memberRoleName,List proRoles) { + private boolean proMemberRoleExist(String memberRoleName, List proRoles) { if (CollectionUtil.isNotEmpty(proRoles)) { for (ProRole proMemberRole : proRoles) { if (proMemberRole.getName().equals(memberRoleName)) { @@ -426,17 +423,17 @@ public class ExcelService implements IExcelService { ProMember stakeholder = null; ProMember member = null; //手机号不能为空 - if((StrUtil.isNotEmpty(memberCell)&&StrUtil.isEmpty(phoneCell)) || - (StrUtil.isNotEmpty(stakeholderCell)&&StrUtil.isEmpty(stakeholderPhoneCell))){ - throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(memberSheet.getSheetName()+i)); + if ((StrUtil.isNotEmpty(memberCell) && StrUtil.isEmpty(phoneCell)) || + (StrUtil.isNotEmpty(stakeholderCell) && StrUtil.isEmpty(stakeholderPhoneCell))) { + throw new BaseException(CodeEnum.WBS_NOT_PHONE.addMsg(memberSheet.getSheetName() + i)); } //TODO 判断手机号格式 //添加奖惩干系人 if (StrUtil.isNotEmpty(stakeholderCell)) { - if(!stakeholderWithPhone(stakeholderList,stakeholderCell,stakeholderPhoneCell)) { + if (!stakeholderWithPhone(stakeholderList, stakeholderCell, stakeholderPhoneCell)) { Long userId = userService.selectUserIdByPhone(stakeholderPhoneCell); - if(ObjectUtil.isNotNull(userId)){ + if (ObjectUtil.isNotNull(userId)) { userIdSet.add(userId); } stakeholder = new ProMember(); @@ -453,15 +450,15 @@ public class ExcelService implements IExcelService { proMemberRole.setMemberId(stakeholder.getId()); proMemberRole.setRoleId(stakeholderId); proMemberRoleService.saveMemberRole(proMemberRole); - }else { - throw new BaseException(CodeEnum.WBS_STAKEHOLDER_PHONE.addMsg(memberSheet.getSheetName()+i)); + } else { + throw new BaseException(CodeEnum.WBS_STAKEHOLDER_PHONE.addMsg(memberSheet.getSheetName() + i)); } } //成员 if (StrUtil.isNotEmpty(memberCell)) { if (!memberAndPhoneRepeat(proMembers, memberCell, phoneCell)) { Long userId = userService.selectUserIdByPhone(phoneCell); - if(ObjectUtil.isNotNull(userId)){ + if (ObjectUtil.isNotNull(userId)) { userIdSet.add(userId); } member = new ProMember(); @@ -476,23 +473,24 @@ public class ExcelService implements IExcelService { proMemberService.saveMember(member); proMembers.add(member); // //创建者依据project的creatorId判断,不需要添加成员 - }else { - throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE.addMsg(memberSheet.getSheetName()+i)); + } else { + throw new BaseException(CodeEnum.WBS_REPEAT_MEMBER_PHONE.addMsg(memberSheet.getSheetName() + i)); } } } //TODO 每个成员都关注此项目(暂时) - addUserAttention(userIdSet,sysProject); + addUserAttention(userIdSet, sysProject); } else { throw new BaseException(CodeEnum.WBS_NOT_MEMBER_SHEET); } } + /** * 项目成员表内的每个人都关注此项目(暂时,当前版本) */ - private void addUserAttention(Set userIdList,SysProject sysProject){ - if(CollectionUtil.isNotEmpty(userIdList)){ - for(Long userId:userIdList){ + private void addUserAttention(Set userIdList, SysProject sysProject) { + if (CollectionUtil.isNotEmpty(userIdList)) { + for (Long userId : userIdList) { UserAttention userAttention = new UserAttention(); userAttention.setId(snowflake.nextId()); userAttention.setUserId(userId); @@ -501,19 +499,20 @@ public class ExcelService implements IExcelService { } } } + /** * 判断奖惩干系人与手机号对应是否正确 * 奖惩干系人可以重复,一个人只能对应一个手机号 */ - private boolean stakeholderWithPhone(List stakeholderList, String stakeholderName, String phone){ - if(CollectionUtil.isNotEmpty(stakeholderList)){ - for(ProMember proMember:stakeholderList){ - if(stakeholderName.equalsIgnoreCase(proMember.getNickname())){ - if(!proMember.getPhone().equalsIgnoreCase(phone)){ + private boolean stakeholderWithPhone(List stakeholderList, String stakeholderName, String phone) { + if (CollectionUtil.isNotEmpty(stakeholderList)) { + for (ProMember proMember : stakeholderList) { + if (stakeholderName.equalsIgnoreCase(proMember.getNickname())) { + if (!proMember.getPhone().equalsIgnoreCase(phone)) { return true; } - }else { - if(proMember.getPhone().equalsIgnoreCase(phone)){ + } else { + if (proMember.getPhone().equalsIgnoreCase(phone)) { return true; } } @@ -521,16 +520,17 @@ public class ExcelService implements IExcelService { } return false; } + /** - *判断成员和手机号是否重复 + * 判断成员和手机号是否重复 */ - private boolean memberAndPhoneRepeat(List proMembers, String memberName, String phone){ - if(CollectionUtil.isNotEmpty(proMembers)){ - for(ProMember proMember:proMembers){ - if(proMember.getNickname().equalsIgnoreCase(memberName)){ + private boolean memberAndPhoneRepeat(List proMembers, String memberName, String phone) { + if (CollectionUtil.isNotEmpty(proMembers)) { + for (ProMember proMember : proMembers) { + if (proMember.getNickname().equalsIgnoreCase(memberName)) { return true; } - if(proMember.getPhone().equalsIgnoreCase(phone)){ + if (proMember.getPhone().equalsIgnoreCase(phone)) { return true; } } @@ -543,7 +543,7 @@ public class ExcelService implements IExcelService { */ private void readTask(XSSFWorkbook xssfWorkbook, XSSFSheet wbsSheet, int taskStart, int taskEnd, Long currentUserId, SysProject sysProject, List taskDetails, - List proRoles, List proMembers) throws Exception { + List proRoles, List proMembers, Map> hasGroupMap) throws Exception { Long pmRoleId = null; //获取项目经理的id(一级角色) for (ProRole role : proRoles) { @@ -659,8 +659,8 @@ public class ExcelService implements IExcelService { break; } } - if(ObjectUtil.isNull(executorRoleId)){ - throw new BaseException(CodeEnum.WBS_NOT_FIND_EXECUTOR_ROLE.addMsg(wbsSheet.getSheetName()+i)); + if (ObjectUtil.isNull(executorRoleId)) { + throw new BaseException(CodeEnum.WBS_NOT_FIND_EXECUTOR_ROLE.addMsg(wbsSheet.getSheetName() + i)); } } //检查人 @@ -673,8 +673,8 @@ public class ExcelService implements IExcelService { break; } } - if(ObjectUtil.isNull(checkerRoleId)){ - throw new BaseException(CodeEnum.WBS_NOT_FIND_CHECKER_ROLE.addMsg(wbsSheet.getSheetName()+i)); + if (ObjectUtil.isNull(checkerRoleId)) { + throw new BaseException(CodeEnum.WBS_NOT_FIND_CHECKER_ROLE.addMsg(wbsSheet.getSheetName() + i)); } } //奖惩金额 @@ -688,8 +688,8 @@ public class ExcelService implements IExcelService { taskDetail.setDelay((byte) WebConstant.TASK_DELAY.DelayManual.value); } else if (delay.equals(WebConstant.TASK_DELAY.Manual.phase)) { taskDetail.setDelay((byte) WebConstant.TASK_DELAY.Manual.value); - }else { - throw new BaseException(CodeEnum.WBS_DELAY_ERROR.addMsg(wbsSheet.getSheetName()+i)); + } else { + throw new BaseException(CodeEnum.WBS_DELAY_ERROR.addMsg(wbsSheet.getSheetName() + i)); } //延迟时间 if (StrUtil.isNotEmpty(delayTime)) { @@ -730,34 +730,37 @@ public class ExcelService implements IExcelService { //子任务 if (StrUtil.isNotEmpty(subTaskCell)) { taskDetail.setHasGroup((byte) 1); - switch (subTaskCell){ + switch (subTaskCell) { case "值日表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail,taskDetails,proMembers,deliver); + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "运动计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail,taskDetails,proMembers,deliver); + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "前端学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail,taskDetails,proMembers,deliver); + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "后台学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail,taskDetails,proMembers,deliver); + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "硬件学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail,taskDetails,proMembers,deliver); + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "方圆学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail,taskDetails,proMembers,deliver); + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; case "全体学习计划表": - getSubTask(xssfWorkbook, subTaskCell, taskDetail,taskDetails,proMembers,deliver); + getSubTask(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); + break; + case "年终总结": + getSubTaskMt(xssfWorkbook, subTaskCell, taskDetail, taskDetails, proMembers, deliver, hasGroupMap); break; default: - throw new BaseException(CodeEnum.WBS_SUB_TASK_ANALYSIS.addMsg(wbsSheet.getSheetName()+i)); + throw new BaseException(CodeEnum.WBS_SUB_TASK_ANALYSIS.addMsg(wbsSheet.getSheetName() + i)); } - }else{ + } else { //不是分组任务,直接添加交付物 - readDeliverSheet(deliver,xssfWorkbook,taskDetail.getId()); + readDeliverSheet(deliver, xssfWorkbook, taskDetail.getId()); } //添加任务 proTaskDetailService.saveTaskDetail(taskDetail); @@ -776,11 +779,84 @@ public class ExcelService implements IExcelService { taskDetails.add(endTask); } + /** + * 读取年终总结子表 + */ + public void getSubTaskMt(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, + List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap) { + List taskNameList = new ArrayList<>(); + + XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); + if (ObjectUtil.isNotNull(subTaskSheet)) { + for (int a = 2; a < subTaskSheet.getLastRowNum(); a++) { + 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)); + //重复时间、相对时间 + String repeatCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(4)); + String memberCell = StringUtil.replaceComma(ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(6))); + //备注 + String descriptionCell = ExcelUtil.getCellValue(subTaskSheet.getRow(a).getCell(8)); + if (StrUtil.isNotEmpty(nameCell)) { + ProTaskDetail subTask = new ProTaskDetail(); + BeanUtil.copyProperties(parentTaskDetail, subTask); + subTask.setId(snowflake.nextId()); + subTask.setName(nameCell); + subTask.setDescription(descriptionCell); + if (StrUtil.isNotEmpty(beginCell)) { + subTask.setBeginTime(Long.valueOf(beginCell)); + } + if (StrUtil.isNotEmpty(endCell)) { + subTask.setEndTime(Long.valueOf(endCell)); + } + subTask.setLevel((byte) 2); + subTask.setHasGroup((byte) 0); + if (StrUtil.isNotEmpty(memberCell)) { + if (memberCell.equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { + subTask.setAllMember((byte) 1); + } else { + subTask.setAllMember((byte) 0); + if (CollectionUtil.isNotEmpty(proMembers)) { + Long proMemberId = null; + for (ProMember proMember : proMembers) { + if (memberCell.equalsIgnoreCase(proMember.getNickname())) { + proMemberId = proMember.getId(); + ProTaskMember proTaskMember = new ProTaskMember(); + proTaskMember.setId(snowflake.nextId()); + proTaskMember.setMemberId(proMemberId); + proTaskMember.setTaskDetailId(subTask.getId()); + taskMemberService.saveTaskMember(proTaskMember); + break; + } + } + if (ObjectUtil.isNull(proMemberId)) { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); + } + } + } + } else { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); + } + + //给每个子任务添加交付物 + readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); + + proTaskDetailService.saveTaskDetail(subTask); + taskDetails.add(subTask); + taskNameList.add(subTask); + } + } + hasGroupMap.put(parentTaskDetail.getName(), taskNameList); + } else { + throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); + } + } + /** * 读取子任务表 */ public void getSubTask(XSSFWorkbook xssfWorkbook, String sheetName, ProTaskDetail parentTaskDetail, - List taskDetails, List proMembers,String deliverCell) { + List taskDetails, List proMembers, String deliverCell, Map> hasGroupMap) { XSSFSheet subTaskSheet = xssfWorkbook.getSheet(sheetName); Long startTime = parentTaskDetail.getBeginTime(); if (ObjectUtil.isNotNull(subTaskSheet)) { @@ -826,13 +902,13 @@ public class ExcelService implements IExcelService { break; } } - if(ObjectUtil.isNull(proMemberId)){ - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName()+a)); + if (ObjectUtil.isNull(proMemberId)) { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); } } } - }else { - throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName()+a)); + } else { + throw new BaseException(CodeEnum.WSB_NOT_MEMBER.addMsg(subTaskSheet.getSheetName() + a)); } } } @@ -859,7 +935,7 @@ public class ExcelService implements IExcelService { } startTime = subTask.getEndTime(); //给每个子任务添加交付物 - readDeliverSheet(deliverCell,xssfWorkbook,subTask.getId()); + readDeliverSheet(deliverCell, xssfWorkbook, subTask.getId()); proTaskDetailService.saveTaskDetail(subTask); taskDetails.add(subTask); @@ -868,11 +944,12 @@ public class ExcelService implements IExcelService { } else { throw new BaseException(CodeEnum.WBS_NOT_SUB_TASK); } - parentTaskDetail.setEndTime(startTime); + parentTaskDetail.setRecStatus((byte) 2); } /** * 分解任务时间 + * * @param taskDetails * @throws Exception */ @@ -915,7 +992,7 @@ public class ExcelService implements IExcelService { /** * 读取交付物表 */ - private void readDeliverSheet(String deliverCell,XSSFWorkbook xssfWorkbook, Long taskId) { + private void readDeliverSheet(String deliverCell, XSSFWorkbook xssfWorkbook, Long taskId) { if (StrUtil.isNotEmpty(deliverCell)) { String str = ""; if (deliverCell.length() > 4) { @@ -953,15 +1030,16 @@ public class ExcelService implements IExcelService { /** * 读取插件 + * * @param xssfWorkbook * @param taskDetails * @param proRoles */ - private void readPlugin(XSSFWorkbook xssfWorkbook, List taskDetails, List proRoles) { + private void readPlugin(XSSFWorkbook xssfWorkbook, List taskDetails, List proRoles, Map> hasGroupMap) { SysPluginExample pluginExample = new SysPluginExample(); pluginExample.clear(); List sysPluginList = sysPluginDao.selectByExample(pluginExample); - if(CollectionUtil.isNotEmpty(sysPluginList)) { + if (CollectionUtil.isNotEmpty(sysPluginList)) { XSSFSheet sheet = xssfWorkbook.getSheet("插件"); if (ObjectUtil.isNotNull(sheet)) { Long taskId = null; @@ -969,50 +1047,69 @@ public class ExcelService implements IExcelService { XSSFRow roleRow = sheet.getRow(2); for (int i = 3; i < sheet.getLastRowNum(); i++) { + List taskNameList = null; XSSFRow pluginRow = sheet.getRow(i); String task = ExcelUtil.getCellValue(pluginRow.getCell(1)); //获取任务Id if (StrUtil.isNotEmpty(task)) { for (ProTaskDetail proTask : taskDetails) { if (task.equals(proTask.getName())) { - taskId = proTask.getId(); - break; + if (proTask.getHasGroup() == 1) { + taskNameList = hasGroupMap.get(proTask.getName()); + break; + } else { + taskId = proTask.getId(); + break; + } } } } for (int a = 2; a < roleRow.getLastCellNum(); a++) { - //获取memberRoleId - String roleCell = ExcelUtil.getCellValue(roleRow.getCell(a)); - if (StrUtil.isNotEmpty(roleCell) && CollectionUtil.isNotEmpty(proRoles)) { - for (ProRole role : proRoles) { - if (roleCell.equals(role.getName())) { - memberRoleId = role.getId(); - break; - } - } - } String plugin = ExcelUtil.getCellValue(pluginRow.getCell(a)); if (StrUtil.isNotEmpty(plugin)) { + //获取memberRoleId + String roleCell = ExcelUtil.getCellValue(roleRow.getCell(a)); + if (StrUtil.isNotEmpty(roleCell) && CollectionUtil.isNotEmpty(proRoles)) { + for (ProRole role : proRoles) { + if (roleCell.equals(role.getName())) { + memberRoleId = role.getId(); + break; + } + } + } + Long sysPluginId = null; - for(SysPlugin sysPlugin:sysPluginList){ - if(plugin.equalsIgnoreCase(sysPlugin.getName())){ + for (SysPlugin sysPlugin : sysPluginList) { + if (plugin.equalsIgnoreCase(sysPlugin.getName())) { sysPluginId = sysPlugin.getId(); + break; } } - if(ObjectUtil.isNull(sysPluginId)){ - throw new BaseException(CodeEnum.WBS_NOT_PLUGIN.addMsg(sheet.getSheetName()+i)); + if (ObjectUtil.isNull(sysPluginId)) { + throw new BaseException(CodeEnum.WBS_NOT_PLUGIN.addMsg(sheet.getSheetName() + i)); + } + if (CollectionUtil.isNotEmpty(taskNameList)) { + for (ProTaskDetail taskName : taskNameList) { + ProTaskPlugin taskPlugin = new ProTaskPlugin(); + taskPlugin.setId(snowflake.nextId()); + taskPlugin.setTaskDetailId(taskName.getId()); + taskPlugin.setPluginId(sysPluginId); + taskPlugin.setMemberRoleId(memberRoleId); + taskPluginService.savePlugin(taskPlugin); + } + } else { + ProTaskPlugin taskPlugin = new ProTaskPlugin(); + taskPlugin.setId(snowflake.nextId()); + taskPlugin.setTaskDetailId(taskId); + taskPlugin.setPluginId(sysPluginId); + taskPlugin.setMemberRoleId(memberRoleId); + taskPluginService.savePlugin(taskPlugin); } - ProTaskPlugin taskPlugin = new ProTaskPlugin(); - taskPlugin.setId(snowflake.nextId()); - taskPlugin.setTaskDetailId(taskId); - taskPlugin.setPluginId(sysPluginId); - taskPlugin.setMemberRoleId(memberRoleId); - taskPluginService.savePlugin(taskPlugin); } } } - }else{ + } else { throw new BaseException(CodeEnum.WBS_NOT_PLUGIN_SHEET); } } @@ -1020,6 +1117,7 @@ public class ExcelService implements IExcelService { /** * 返回信息 + * * @param currentUserId * @param sysProject * @return diff --git a/tall/src/main/java/com/ccsens/tall/service/IExcelMtService.java b/tall/src/main/java/com/ccsens/tall/service/IExcelMtService.java deleted file mode 100644 index 788b12dc..00000000 --- a/tall/src/main/java/com/ccsens/tall/service/IExcelMtService.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ccsens.tall.service; - -import com.ccsens.tall.bean.vo.ProjectVo; - -public interface IExcelMtService { - ProjectVo.ProjectInfo readXls(String path, Long currentUserId) throws Exception; - -} 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 f13cfe05..749b8e77 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProMemberService.java @@ -24,4 +24,5 @@ public interface IProMemberService { List selectByRole(Long roleId)throws Exception; + MemberVo.MemberInfo getMemberByUserIdAndProjectId(Long userId, 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 b4d1b106..fd9ecec6 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java @@ -29,4 +29,6 @@ public interface IProTaskDetailService { void deleteTaskByRoleId(Long taskId) throws Exception; TaskVo.NormalTask updateTaskInfo(Long currentUserId, TaskDto.UpdateTaskInfo updateTaskInfo) throws Exception; + + TaskVo.TaskInfoWithFeign getProjectIdByTaskId(Long taskId); } 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 69b654a7..6b79dea7 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProMemberService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProMemberService.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.util.ObjectUtil; import com.ccsens.tall.bean.po.*; @@ -15,6 +16,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import java.lang.reflect.Member; import java.util.ArrayList; import java.util.List; @@ -194,4 +196,16 @@ public class ProMemberService implements IProMemberService { return memberList; } + @Override + public MemberVo.MemberInfo getMemberByUserIdAndProjectId(Long userId, Long projectId) { + MemberVo.MemberInfo memberInfo = null; + ProMemberExample memberExample = new ProMemberExample(); + memberExample.createCriteria().andProjectIdEqualTo(projectId).andUserIdEqualTo(userId); + List proMemberList = proMemberDao.selectByExample(memberExample); + if(CollectionUtil.isNotEmpty(proMemberList)){ + memberInfo = new MemberVo.MemberInfo(); + BeanUtil.copyProperties(proMemberList.get(0),memberInfo); + } + return memberInfo; + } } 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 7cdbfeea..906bfc68 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java @@ -93,7 +93,7 @@ public class ProTaskDetailService implements IProTaskDetailService { 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, startTime, endTime, process, page, pageSize); + obj = getTaskInfoByProjectIdAndPM(currentUserId, projectId, roleId, startTime, endTime, process, page, pageSize); } else if (parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.Member.value)) { obj = getTaskInfoByProjectIdAndRoleId(currentUserId, projectId, roleId, startTime, endTime, process, page, pageSize); } @@ -106,7 +106,7 @@ public class ProTaskDetailService implements IProTaskDetailService { /** * 查看任务 项目经理 */ - private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndPM(Long currentUserId, Long projectId, 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) throws Exception { ProShow proShow = proShowService.selectByProjectId(projectId); TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo(); @@ -131,9 +131,12 @@ public class ProTaskDetailService implements IProTaskDetailService { normalTask.setId(null); normalTask.setSequence(sequence); //查找一级任务下的二级任务 - List secondNormalTaskList = taskDetailDao.selectNormalTaskListByPM(projectId, firstTaskDetail.getId(), startTime, endTime); + List secondNormalTaskList = taskDetailDao.selectNormalTaskListByPM(projectId, firstTaskDetail.getId(), startTime, endTime,roleId); if (CollectionUtil.isNotEmpty(secondNormalTaskList)) { for (TaskVo.NormalTask task : secondNormalTaskList) { + //处理插件 + managePlugin(currentUserId,roleId,task); + ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, task.getId()); if (ObjectUtil.isNotNull(subTimeMember)) { task.setRealEndTime(subTimeMember.getRealFinishTime()); @@ -197,8 +200,11 @@ public class ProTaskDetailService implements IProTaskDetailService { List secondTaskVoList = taskDetailDao.selectTaskByRoleAndAllMembers(projectId, roleId, startTime, endTime); List secondTaskVoList2 = taskDetailDao.selectTaskByRoleAndAllMembers(projectId, allMemberId, startTime, endTime); secondTaskVoList.addAll(secondTaskVoList2); + if (CollectionUtil.isNotEmpty(secondTaskVoList)) { for (TaskVo.NormalTask normalTask : secondTaskVoList) { + //处理插件 + managePlugin(currentUserId,roleId,normalTask); ProSubTimeMember subTimeMember = getProcessByUserIdAndTask(currentUserId, normalTask.getId()); if (ObjectUtil.isNotNull(subTimeMember)) { normalTask.setProcess(subTimeMember.getComplatedStatus()); @@ -351,6 +357,34 @@ public class ProTaskDetailService implements IProTaskDetailService { return normalTaskList; } + /** + * 处理任务的插件 + */ + private void managePlugin(Long userId,Long roleId,TaskVo.NormalTask normalTask) throws Exception { + Boolean isMain = proMemberService.userIsBelongRole(userId,roleId); + if(!isMain){ + normalTask.setPlugins(null); + }else { + if(CollectionUtil.isNotEmpty(normalTask.getPlugins())){ + List pluginVoList = new ArrayList<>(); + for(TaskVo.PluginVo pluginVo : normalTask.getPlugins()){ + String[] pluginIds = pluginVo.getId().split(","); + String[] pluginNames = pluginVo.getName().split(","); + + TaskVo.PluginVo plugin = null; + for(int i = 0;i getMemberByUserIdAndProjectId( Long userId,Long projectId) throws Exception { + + MemberVo.MemberInfo memberInfo = proMemberService.getMemberByUserIdAndProjectId(userId,projectId); + return JsonResponse.newInstance().ok(memberInfo); + } } diff --git a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml index 0f25b165..d2f6b7fa 100644 --- a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml +++ b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml @@ -61,11 +61,17 @@ d.virtual as tVirtual, d.delay as tDelay, d.has_group as tHasGroup, - p.id as pId, - sp.name as pName + GROUP_CONCAT(p.id) as pId, + GROUP_CONCAT(sp.name) as pName 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 + AND + ( + p.member_role_id = #{roleId} + OR + p.id IS NULL + ) LEFT JOIN t_sys_plugin sp ON sp.id = p.plugin_id WHERE d.rec_status = 0 @@ -81,8 +87,11 @@ AND s.end_time >= #{startTime} + AND - Level = 2 + d.Level in (2,3) + AND + d.has_group = 0 group by s.task_detail_id @@ -105,11 +114,17 @@ d.virtual as tVirtual, d.delay as tDelay, d.has_group as tHasGroup, - p.id as pId, - sp.name as pName + GROUP_CONCAT(p.id) as pId, + GROUP_CONCAT(sp.name) as pName 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 + AND + ( + p.member_role_id = #{roleId} + OR + p.id IS NULL + ) LEFT JOIN t_sys_plugin sp ON sp.id = p.plugin_id WHERE d.rec_status = 0 @@ -121,8 +136,11 @@ s.begin_time < #{endTime} AND s.end_time >= #{startTime} + + AND + d.Level in (2,3) AND - level = 2 + d.has_group = 0 group by s.task_detail_id @@ -173,8 +191,8 @@ d.virtual as tVirtual, d.delay as tDelay, d.has_group as tHasGroup, - p.id as pId, - sp.name as pName + GROUP_CONCAT(p.id) as pId, + GROUP_CONCAT(sp.name) as pName 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 @@ -239,8 +257,8 @@ d.virtual as tVirtual, d.delay as tDelay, d.has_group as tHasGroup, - p.id as pId, - sp.name as pName + GROUP_CONCAT(p.id) as pId, + GROUP_CONCAT(sp.name) as pName 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 diff --git a/util/src/main/java/com/ccsens/util/CodeEnum.java b/util/src/main/java/com/ccsens/util/CodeEnum.java index 0bd8fd2e..c49c6770 100644 --- a/util/src/main/java/com/ccsens/util/CodeEnum.java +++ b/util/src/main/java/com/ccsens/util/CodeEnum.java @@ -70,6 +70,11 @@ public enum CodeEnum { DOCTOR_NOT_SUBMIT(55,"尚未进行资格认证",true), REPORT_NOT_FOUND(56,"对不起,没有找到您查询的报告单,请确认报告单是否存在。",true), PATIENT_NOT_CHOICE(57,"没有选择病人,不进行保存答案。", true), + + NOT_GAME_TYPE(58,"对不起,未找到对应的游戏",true), + SIGNIN_REPEAT(59,"请勿重复签到",true), + SCORE_REPEAT(60,"您已经评分,请勿重复提交",true), + NOT_MEMBER(61,"对不起,找不到对应的成员信息",true) ; public CodeEnum addMsg(String msg){ diff --git a/util/src/main/java/com/ccsens/util/WebConstant.java b/util/src/main/java/com/ccsens/util/WebConstant.java index 931aad87..b98c27cf 100644 --- a/util/src/main/java/com/ccsens/util/WebConstant.java +++ b/util/src/main/java/com/ccsens/util/WebConstant.java @@ -69,10 +69,11 @@ public class WebConstant { public static final String UPLOAD_PATH_BASE = "/home/cloud/tall/uploads"; public static final String UPLOAD_PATH_DELIVER = UPLOAD_PATH_BASE + File.separator + "delivers"; public static final String UPLOAD_PATH_DELIVER1 ="delivers"; - public static final String UPLOAD_PATH_PREVIEW ="preview"; public static final String UPLOAD_PROJECT_WBS = UPLOAD_PATH_BASE + File.separator + "project"; public static final String URL_BASE = "https://api.ccsens.com/ptpro/uploads/"; - public static final String TEST_URL_BASE = "https://test.tall.wiki/gateway/tall/v1.0/uploads/"; + public static final String TEST_URL = "https://test.tall.wiki/"; + public static final String TEST_URL_GAME = TEST_URL + "game/"; + public static final String TEST_URL_BASE = TEST_URL + "gateway/tall/v1.0/uploads/"; public static final Integer Expired_Verify_Code_In_Seconds = 120; public static final Integer Exist_Verify_Code_In_Seconds = 60; @@ -452,7 +453,7 @@ public class WebConstant { public enum Message_Sync_Event{ ChangeDuration(0,"ChangeDuration"),Move(1,"Move"), - Remove(2,"Remove"),Add(3,"Add"),Start(4,"Start"),ChangeBeginTime(5,"ChangeBeginTime"); + Remove(2,"Remove"),Add(3,"Add"),Start(4,"Start"),ChangeBeginTime(5,"ChangeBeginTime"),Show(6,"Show"); public int value; public String phase; Message_Sync_Event(int value,String thePhase){ @@ -467,6 +468,7 @@ public class WebConstant { case 3: return Add; case 4: return Start; case 5: return ChangeBeginTime; + case 6: return Show; default: return null; } } @@ -488,6 +490,9 @@ public class WebConstant { } if(phase.equalsIgnoreCase("ChangeBeginTime")) { return ChangeBeginTime; + } + if(phase.equalsIgnoreCase("Show")) { + return Show; } else { return null; } diff --git a/util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java b/util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java index 7234f8e1..d79c315f 100644 --- a/util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java +++ b/util/src/main/java/com/ccsens/util/config/RabbitMQConfig.java @@ -8,6 +8,8 @@ import org.springframework.context.annotation.Configuration; public class RabbitMQConfig { public static final String TALL_MESSAGE_1 = "tall_message_1"; public static final String TALL_MESSAGE_2 = "tall_message_2"; + public static final String RabbitMQ_QUEUE_NAME = "Queue_Anyring"; + @Bean public Queue queue(){ return new Queue(TALL_MESSAGE_1); @@ -16,6 +18,9 @@ public class RabbitMQConfig { public Queue queue1(){ return new Queue(TALL_MESSAGE_2); } - + @Bean + public Queue queue2(){ + return new Queue(RabbitMQ_QUEUE_NAME); + } }