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/.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..09ba91a9 --- /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.game.bean.vo.ScreenVo; +import com.ccsens.game.service.IScreenService; +import com.ccsens.util.JsonResponse; +import io.swagger.annotations.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; + +@Slf4j +@Api(tags = "大屏相关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, + @ApiParam @Validated @RequestBody ScreenDto.MemberGame memberGame) throws Exception { + log.info("获取大屏路径:{}",memberGame); + ScreenVo.UrlVo urlVo = screenService.getScreenUrl(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..fa490be0 --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/dto/ScreenDto.java @@ -0,0 +1,63 @@ +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("要创建的小游戏的类型 例如:SQ 代表数钱小游戏") + private String gameType; + @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..fb7e0b3c --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameType.java @@ -0,0 +1,128 @@ +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 Byte payType; + + private String screenUrl; + + private String clientUrl; + + 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 Byte getPayType() { + return payType; + } + + 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() { + 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(", screenUrl=").append(screenUrl); + sb.append(", clientUrl=").append(clientUrl); + 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..4e4012da --- /dev/null +++ b/game/src/main/java/com/ccsens/game/bean/po/GameTypeExample.java @@ -0,0 +1,851 @@ +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(Byte value) { + addCriterion("pay_type =", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeNotEqualTo(Byte value) { + addCriterion("pay_type <>", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeGreaterThan(Byte value) { + addCriterion("pay_type >", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("pay_type >=", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeLessThan(Byte value) { + addCriterion("pay_type <", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeLessThanOrEqualTo(Byte value) { + addCriterion("pay_type <=", 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(Byte value1, Byte value2) { + addCriterion("pay_type between", value1, value2, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeNotBetween(Byte value1, Byte value2) { + addCriterion("pay_type not between", value1, value2, "payType"); + return (Criteria) this; + } + + public Criteria andScreenUrlIsNull() { + addCriterion("screen_url is null"); + return (Criteria) this; + } + + 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; + } + + 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/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/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..379c0666 --- /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.api")) + .build() + .globalOperationParameters(setHeaderToken()); + } + + private ApiInfo apiInfo() { + return new ApiInfo("Swagger Tall-game",//大标题 title + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",//小标题 + "1.0.0",//版本 + "http://swagger.io/terms/",//termsOfServiceUrl + "zhangsan",//作者 + "Apache 2.0",//链接显示文字 + "http://www.apache.org/licenses/LICENSE-2.0.html"//网站链接 + ); + } + + private List setHeaderToken() { + ParameterBuilder tokenPar = new ParameterBuilder(); + List pars = new ArrayList<>(); + tokenPar.name(WebConstant.HEADER_KEY_TOKEN).description("token") + .defaultValue(WebConstant.HEADER_KEY_TOKEN_PREFIX) + .modelRef(new ModelRef("string")).parameterType("header").required(false).build(); + pars.add(tokenPar.build()); + return pars; + } +} diff --git a/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/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/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/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/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..d9241b8d --- /dev/null +++ b/game/src/main/resources/mapper_raw/GameTypeMapper.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, code, name, description, pay_type, screen_url, client_url, 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, screen_url, + client_url, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{payType,jdbcType=TINYINT}, #{screenUrl,jdbcType=VARCHAR}, + #{clientUrl,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_game_type + + + id, + + + code, + + + name, + + + description, + + + pay_type, + + + screen_url, + + + client_url, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{code,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{payType,jdbcType=TINYINT}, + + + #{screenUrl,jdbcType=VARCHAR}, + + + #{clientUrl,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=TINYINT}, + + + screen_url = #{record.screenUrl,jdbcType=VARCHAR}, + + + client_url = #{record.clientUrl,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=TINYINT}, + screen_url = #{record.screenUrl,jdbcType=VARCHAR}, + client_url = #{record.clientUrl,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=TINYINT}, + + + screen_url = #{screenUrl,jdbcType=VARCHAR}, + + + client_url = #{clientUrl,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=TINYINT}, + screen_url = #{screenUrl,jdbcType=VARCHAR}, + client_url = #{clientUrl,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..49bb00ef --- /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/mt/.mvn/wrapper/MavenWrapperDownloader.java b/mt/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..22810754 --- /dev/null +++ b/mt/.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/mt/.mvn/wrapper/maven-wrapper.properties b/mt/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..7d59a01f --- /dev/null +++ b/mt/.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/mt/pom.xml b/mt/pom.xml new file mode 100644 index 00000000..86f9803a --- /dev/null +++ b/mt/pom.xml @@ -0,0 +1,75 @@ + + + + + ccsenscloud + com.ccsens + 1.0-SNAPSHOT + + 4.0.0 + + mt + + 1.8 + + + + + + cloudutil + com.ccsens + 1.0-SNAPSHOT + + + + util + com.ccsens + 1.0-SNAPSHOT + + + + com.alibaba + fastjson + 1.2.62 + + + + + + + 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.mt.MtApplication + + + + + + repackage + + + + + + + + + diff --git a/mt/src/main/java/com/ccsens/mt/MtApplication.java b/mt/src/main/java/com/ccsens/mt/MtApplication.java new file mode 100644 index 00000000..e89e4e6c --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/MtApplication.java @@ -0,0 +1,24 @@ +package com.ccsens.mt; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.ServletComponentScan; +import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.scheduling.annotation.EnableAsync; + +@MapperScan(basePackages = {"com.ccsens.mt.persist.*"}) +@ServletComponentScan +@EnableAsync +//开启断路器功能 +@EnableCircuitBreaker +@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign") +@SpringBootApplication(scanBasePackages = "com.ccsens") +public class MtApplication { + + public static void main(String[] args) { + SpringApplication.run(MtApplication.class, args); + } + +} diff --git a/mt/src/main/java/com/ccsens/mt/api/DebugController.java b/mt/src/main/java/com/ccsens/mt/api/DebugController.java new file mode 100644 index 00000000..2a5da862 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/DebugController.java @@ -0,0 +1,28 @@ +package com.ccsens.mt.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/mt/src/main/java/com/ccsens/mt/api/ScoreController.java b/mt/src/main/java/com/ccsens/mt/api/ScoreController.java new file mode 100644 index 00000000..48db769c --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/ScoreController.java @@ -0,0 +1,124 @@ +package com.ccsens.mt.api; + +import com.ccsens.mt.bean.dto.ScoreDto; +import com.ccsens.mt.bean.vo.ScoreVo; +import com.ccsens.mt.service.IScoreService; +import com.ccsens.mt.service.IUserService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import io.jsonwebtoken.Claims; +import io.swagger.annotations.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Api(tags = "评分插件相关" , description = "") +@RestController +@RequestMapping("/plugins") +@Slf4j +public class ScoreController { + @Autowired + private IUserService userService; + @Autowired + private IScoreService scoreService; + + @ApiOperation(value = "评委获取评分项",notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleId", value = "评委id", required = true, paramType = "path"), + @ApiImplicitParam(name = "playerId", value = "参赛项目id", required = true, paramType = "path"), + }) + @RequestMapping(value = "/score", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getScoreLog(HttpServletRequest request, + @RequestParam Long roleId, + @RequestParam(required = true) Long playerId) throws Exception { + //获取userId + Long userId = userService.getUserIdByToken(request); + + List scoreInfoList = scoreService.getScoreLog(userId,playerId); + return JsonResponse.newInstance().ok(scoreInfoList); + } + + @ApiOperation(value = "提交评分",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/score", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse submitScore(HttpServletRequest request, + @ApiParam @RequestBody ScoreDto.SubmitScore submitScore) throws Exception { + //获取userId + Long userId = userService.getUserIdByToken(request); + + scoreService.submitScore(userId,submitScore); + return JsonResponse.newInstance().ok(); + } + + + @ApiOperation(value = "获取评分",notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "roleId", value = "评委id", required = true, paramType = "path"), + @ApiImplicitParam(name = "playerId", value = "任务id", required = true, paramType = "path"), + }) + @RequestMapping(value = "/scores", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> adminScore(HttpServletRequest request, + @RequestParam(required = true) Long roleId, + @RequestParam(required = true) Long playerId) throws Exception { + //获取userId + Long userId = userService.getUserIdByToken(request); + + List adminScoreList = scoreService.adminScore(userId,roleId,playerId); + return JsonResponse.newInstance().ok(adminScoreList); + } + + + // +// @ApiOperation(value = "退回单个评委的评分",notes = "") +// @ApiImplicitParams({ +// @ApiImplicitParam(name = "roleId", value = "评委id", required = true, paramType = "path"), +// @ApiImplicitParam(name = "playerId", value = "参赛项目id", required = true, paramType = "path"), +// }) +// @RequestMapping(value = "/back", method = RequestMethod.DELETE, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse backScore(HttpServletRequest request, +// @RequestParam(required = true) Long roleId, +// @RequestParam(required = true) Long playerId) throws Exception { +// scoreService.backScore(roleId,playerId); +// return JsonResponse.newInstance().ok(); +// } +// +// @ApiOperation(value = "退回所有评委的评分",notes = "") +// @ApiImplicitParams({ +// @ApiImplicitParam(name = "playerId", value = "参赛项目id", required = true, paramType = "path"), +// }) +// @RequestMapping(value = "/backAll", method = RequestMethod.DELETE, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse backScoreAll(HttpServletRequest request, +// @RequestParam(required = true) Long playerId) throws Exception { +// scoreService.backScoreAll(playerId); +// return JsonResponse.newInstance().ok(); +// } + + @ApiOperation(value = "查看项目排名及详细分数",notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectId", value = "项目组id", required = true, paramType = "path"), + }) + @RequestMapping(value = "/rankingScore", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> getRankingScore(HttpServletRequest request, + @RequestParam(required = true) Long projectId) throws Exception { + List bankingList = scoreService.getRanking(projectId); + return JsonResponse.newInstance().ok(bankingList); + } + + + @ApiOperation(value = "亮分环节",notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectId", value = "项目id", required = true, paramType = "path"), + @ApiImplicitParam(name = "playerId", value = "参赛公司id", required = true, paramType = "path") + }) + @RequestMapping(value = "/show", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse showScore(HttpServletRequest request, + @RequestParam(required = true)Long projectId,Long playerId) throws Exception { + scoreService.showScore(projectId,playerId); + return JsonResponse.newInstance().ok(); + } + +} diff --git a/mt/src/main/java/com/ccsens/mt/api/SigninController.java b/mt/src/main/java/com/ccsens/mt/api/SigninController.java new file mode 100644 index 00000000..41ea1368 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/api/SigninController.java @@ -0,0 +1,56 @@ +package com.ccsens.mt.api; + +import com.ccsens.cloudutil.feign.TallFeignClient; +import com.ccsens.mt.bean.dto.SigninDto; +import com.ccsens.mt.bean.vo.SigninVo; +import com.ccsens.mt.service.ISigninService; +import com.ccsens.mt.service.IUserService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import io.swagger.annotations.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; + +@Api(tags = "签到" , description = "") +@RestController +@RequestMapping("/signin") +@Slf4j +public class SigninController { + @Autowired + private IUserService userService; + @Autowired + private ISigninService signinService; + + @ApiOperation(value = "签到", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse signin(HttpServletRequest request, + @ApiParam @Validated @RequestBody SigninDto.SigninInfo signinInfo) throws Exception { + log.info("{}:签到"); + //获取userId + Long userId = userService.getUserIdByToken(request); + SigninVo.SigninVoInfo signinVoInfo = signinService.signin(signinInfo,userId); + + return JsonResponse.newInstance().ok(signinVoInfo); + } + + @ApiOperation(value = "查看自己的签到信息", notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(name = "taskId", value = "签到任务的id", required = true, paramType = ""), + }) + @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getSignByTaskId(HttpServletRequest request, + @RequestParam(required = true) Long taskId) throws Exception { + log.info("查看自己的签到信息"); + //获取userId + Long userId = userService.getUserIdByToken(request); + SigninVo.SigninVoInfo signinVoInfo = signinService.getSignByTaskId(taskId,userId); + + return JsonResponse.newInstance().ok(signinVoInfo); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java new file mode 100644 index 00000000..6e2d04ac --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/ScoreDto.java @@ -0,0 +1,83 @@ +package com.ccsens.mt.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.Getter; +import lombok.Setter; + +import java.math.BigDecimal; +import java.util.List; + +@Data +public class ScoreDto { + @Getter + @Setter + @ApiModel + public static class Judge{ + @ApiModelProperty("评委id") + private Long roleId; + @ApiModelProperty("公司项目Id") + private Long playerId; + } + @Getter + @Setter + @ApiModel + public static class SubmitScore{ + @ApiModelProperty("评委id") + private Long roleId; + @ApiModelProperty("公司项目Id") + private Long playerId; + @ApiModelProperty("评分信息") + private List data; + } + @Getter + @Setter + @ApiModel + public static class SubmitScoreTable{ + @ApiModelProperty("评委id") + private Long roleId; + @ApiModelProperty("公司项目Id") + private Long playerId; + @ApiModelProperty("行业") + private String industry; + @ApiModelProperty("是否推荐 1、是 0、否") + private Integer isRecommend; + @ApiModelProperty("意见") + private String opinion; + @ApiModelProperty("评委姓名") + private String judge; + @ApiModelProperty("分数信息") + private List scores; + } + + @Getter + @Setter + @ApiModel + public static class ScoreInfo1{ + @ApiModelProperty("评分项Id") + private Long id; + @ApiModelProperty("评分") + private BigDecimal score; + } + + + @Getter + @Setter + @ApiModel + public class ScoreLogs{ + @ApiModelProperty("评分项") + private List scoreLogList; + } + @Getter + @Setter + @ApiModel + public class ScoreLogVo { + @ApiModelProperty("名字") + private String name; + @ApiModelProperty("最大值") + private BigDecimal maxScore; + @ApiModelProperty("最小值") + private BigDecimal minScore; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/SigninDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/SigninDto.java new file mode 100644 index 00000000..6b4e0b0d --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/SigninDto.java @@ -0,0 +1,19 @@ +package com.ccsens.mt.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class SigninDto { + @Data + @ApiModel + public static class SigninInfo{ + @ApiModelProperty("任务id") + private Long taskId; + @ApiModelProperty("姓名") + private String name; + @ApiModelProperty("手机号") + private String phone; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/message/BaseMessageDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/message/BaseMessageDto.java new file mode 100644 index 00000000..0365779a --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/message/BaseMessageDto.java @@ -0,0 +1,35 @@ +package com.ccsens.mt.bean.dto.message; + +import lombok.Data; + +import java.util.List; + +@Data +public class BaseMessageDto { + @Data + public static class MessageUser { + private Long id; + private Long userId; //本质上是authId //20190507 本质上是userId + private String nickname; + private String avatarUrl; + private boolean hasRead; + public MessageUser(){ + hasRead = false; + } + public MessageUser(Long id,Long userId,String nickname,String avatarUrl){ + this(); + this.id = id; + this.userId = userId; + this.nickname = nickname; + this.avatarUrl = avatarUrl; + } + } + + private Long time; + private String type; + private String event; + private Long projectId; + private MessageUser sender; + private List receivers; +// private Object data; +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/dto/message/SyncMessageWithShowDto.java b/mt/src/main/java/com/ccsens/mt/bean/dto/message/SyncMessageWithShowDto.java new file mode 100644 index 00000000..2f224ef8 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/dto/message/SyncMessageWithShowDto.java @@ -0,0 +1,39 @@ +package com.ccsens.mt.bean.dto.message; + +import com.ccsens.util.WebConstant; +import lombok.Data; +import lombok.Getter; +import lombok.Setter; + +import java.math.BigDecimal; +import java.util.List; + +@Data +public class SyncMessageWithShowDto extends BaseMessageDto{ + @Setter + @Getter + public static class Data{ + private Long projectId; + private String projectName; + private Long playerId; + private String playerName; + private BigDecimal averageScore; + private List scoreList; + @Setter + @Getter + public static class Judge{ + private Integer isMaxOrMin;//0正常的分数 1最高分 2最低分 + private String avatarUrl;//头像 + private String judgeName; + private BigDecimal score; + } + } + + private Data data; + + public SyncMessageWithShowDto(){ + setType(WebConstant.Message_Type.Sync.phase); + setEvent(WebConstant.Message_Sync_Event.Show.phase); + setTime(System.currentTimeMillis()); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtJudge.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtJudge.java new file mode 100644 index 00000000..fd8a6005 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtJudge.java @@ -0,0 +1,117 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MtJudge implements Serializable { + private Long id; + + private Long projectId; + + private Long userId; + + private String nickname; + + private String avatarUrl; + + private String phone; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname == null ? null : nickname.trim(); + } + + public String getAvatarUrl() { + return avatarUrl; + } + + public void setAvatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl == null ? null : avatarUrl.trim(); + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone == null ? null : phone.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", userId=").append(userId); + sb.append(", nickname=").append(nickname); + sb.append(", avatarUrl=").append(avatarUrl); + sb.append(", phone=").append(phone); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtJudgeExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtJudgeExample.java new file mode 100644 index 00000000..200b2640 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtJudgeExample.java @@ -0,0 +1,771 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtJudgeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtJudgeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria 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 andAvatarUrlIsNull() { + addCriterion("avatar_url is null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIsNotNull() { + addCriterion("avatar_url is not null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlEqualTo(String value) { + addCriterion("avatar_url =", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotEqualTo(String value) { + addCriterion("avatar_url <>", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThan(String value) { + addCriterion("avatar_url >", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThanOrEqualTo(String value) { + addCriterion("avatar_url >=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThan(String value) { + addCriterion("avatar_url <", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThanOrEqualTo(String value) { + addCriterion("avatar_url <=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLike(String value) { + addCriterion("avatar_url like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotLike(String value) { + addCriterion("avatar_url not like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIn(List values) { + addCriterion("avatar_url in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotIn(List values) { + addCriterion("avatar_url not in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlBetween(String value1, String value2) { + addCriterion("avatar_url between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotBetween(String value1, String value2) { + addCriterion("avatar_url not between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtScore.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtScore.java new file mode 100644 index 00000000..0c1d39b7 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtScore.java @@ -0,0 +1,129 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +public class MtScore implements Serializable { + private Long id; + + private Long judgeUserId; + + private Long scoreLogId; + + private Long taskId; + + private String taskName; + + private BigDecimal score; + + private Integer isScore; + + 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 getJudgeUserId() { + return judgeUserId; + } + + public void setJudgeUserId(Long judgeUserId) { + this.judgeUserId = judgeUserId; + } + + public Long getScoreLogId() { + return scoreLogId; + } + + public void setScoreLogId(Long scoreLogId) { + this.scoreLogId = scoreLogId; + } + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public String getTaskName() { + return taskName; + } + + public void setTaskName(String taskName) { + this.taskName = taskName == null ? null : taskName.trim(); + } + + public BigDecimal getScore() { + return score; + } + + public void setScore(BigDecimal score) { + this.score = score; + } + + public Integer getIsScore() { + return isScore; + } + + public void setIsScore(Integer isScore) { + this.isScore = isScore; + } + + 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(", judgeUserId=").append(judgeUserId); + sb.append(", scoreLogId=").append(scoreLogId); + sb.append(", taskId=").append(taskId); + sb.append(", taskName=").append(taskName); + sb.append(", score=").append(score); + sb.append(", isScore=").append(isScore); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtScoreExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtScoreExample.java new file mode 100644 index 00000000..62b6ca12 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtScoreExample.java @@ -0,0 +1,812 @@ +package com.ccsens.mt.bean.po; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtScoreExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtScoreExample() { + 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 andJudgeUserIdIsNull() { + addCriterion("judge_user_id is null"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdIsNotNull() { + addCriterion("judge_user_id is not null"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdEqualTo(Long value) { + addCriterion("judge_user_id =", value, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdNotEqualTo(Long value) { + addCriterion("judge_user_id <>", value, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdGreaterThan(Long value) { + addCriterion("judge_user_id >", value, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("judge_user_id >=", value, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdLessThan(Long value) { + addCriterion("judge_user_id <", value, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdLessThanOrEqualTo(Long value) { + addCriterion("judge_user_id <=", value, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdIn(List values) { + addCriterion("judge_user_id in", values, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdNotIn(List values) { + addCriterion("judge_user_id not in", values, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdBetween(Long value1, Long value2) { + addCriterion("judge_user_id between", value1, value2, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andJudgeUserIdNotBetween(Long value1, Long value2) { + addCriterion("judge_user_id not between", value1, value2, "judgeUserId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdIsNull() { + addCriterion("score_log_id is null"); + return (Criteria) this; + } + + public Criteria andScoreLogIdIsNotNull() { + addCriterion("score_log_id is not null"); + return (Criteria) this; + } + + public Criteria andScoreLogIdEqualTo(Long value) { + addCriterion("score_log_id =", value, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdNotEqualTo(Long value) { + addCriterion("score_log_id <>", value, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdGreaterThan(Long value) { + addCriterion("score_log_id >", value, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdGreaterThanOrEqualTo(Long value) { + addCriterion("score_log_id >=", value, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdLessThan(Long value) { + addCriterion("score_log_id <", value, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdLessThanOrEqualTo(Long value) { + addCriterion("score_log_id <=", value, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdIn(List values) { + addCriterion("score_log_id in", values, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdNotIn(List values) { + addCriterion("score_log_id not in", values, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdBetween(Long value1, Long value2) { + addCriterion("score_log_id between", value1, value2, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andScoreLogIdNotBetween(Long value1, Long value2) { + addCriterion("score_log_id not between", value1, value2, "scoreLogId"); + return (Criteria) this; + } + + public Criteria andTaskIdIsNull() { + addCriterion("task_id is null"); + return (Criteria) this; + } + + public Criteria andTaskIdIsNotNull() { + addCriterion("task_id is not null"); + return (Criteria) this; + } + + public Criteria andTaskIdEqualTo(Long value) { + addCriterion("task_id =", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotEqualTo(Long value) { + addCriterion("task_id <>", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdGreaterThan(Long value) { + addCriterion("task_id >", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdGreaterThanOrEqualTo(Long value) { + addCriterion("task_id >=", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdLessThan(Long value) { + addCriterion("task_id <", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdLessThanOrEqualTo(Long value) { + addCriterion("task_id <=", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdIn(List values) { + addCriterion("task_id in", values, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotIn(List values) { + addCriterion("task_id not in", values, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdBetween(Long value1, Long value2) { + addCriterion("task_id between", value1, value2, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotBetween(Long value1, Long value2) { + addCriterion("task_id not between", value1, value2, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskNameIsNull() { + addCriterion("task_name is null"); + return (Criteria) this; + } + + public Criteria andTaskNameIsNotNull() { + addCriterion("task_name is not null"); + return (Criteria) this; + } + + public Criteria andTaskNameEqualTo(String value) { + addCriterion("task_name =", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameNotEqualTo(String value) { + addCriterion("task_name <>", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameGreaterThan(String value) { + addCriterion("task_name >", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameGreaterThanOrEqualTo(String value) { + addCriterion("task_name >=", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameLessThan(String value) { + addCriterion("task_name <", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameLessThanOrEqualTo(String value) { + addCriterion("task_name <=", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameLike(String value) { + addCriterion("task_name like", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameNotLike(String value) { + addCriterion("task_name not like", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameIn(List values) { + addCriterion("task_name in", values, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameNotIn(List values) { + addCriterion("task_name not in", values, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameBetween(String value1, String value2) { + addCriterion("task_name between", value1, value2, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameNotBetween(String value1, String value2) { + addCriterion("task_name not between", value1, value2, "taskName"); + 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(BigDecimal value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(BigDecimal value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(BigDecimal value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(BigDecimal value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(BigDecimal value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andIsScoreIsNull() { + addCriterion("is_score is null"); + return (Criteria) this; + } + + public Criteria andIsScoreIsNotNull() { + addCriterion("is_score is not null"); + return (Criteria) this; + } + + public Criteria andIsScoreEqualTo(Integer value) { + addCriterion("is_score =", value, "isScore"); + return (Criteria) this; + } + + public Criteria andIsScoreNotEqualTo(Integer value) { + addCriterion("is_score <>", value, "isScore"); + return (Criteria) this; + } + + public Criteria andIsScoreGreaterThan(Integer value) { + addCriterion("is_score >", value, "isScore"); + return (Criteria) this; + } + + public Criteria andIsScoreGreaterThanOrEqualTo(Integer value) { + addCriterion("is_score >=", value, "isScore"); + return (Criteria) this; + } + + public Criteria andIsScoreLessThan(Integer value) { + addCriterion("is_score <", value, "isScore"); + return (Criteria) this; + } + + public Criteria andIsScoreLessThanOrEqualTo(Integer value) { + addCriterion("is_score <=", value, "isScore"); + return (Criteria) this; + } + + public Criteria andIsScoreIn(List values) { + addCriterion("is_score in", values, "isScore"); + return (Criteria) this; + } + + public Criteria andIsScoreNotIn(List values) { + addCriterion("is_score not in", values, "isScore"); + return (Criteria) this; + } + + public Criteria andIsScoreBetween(Integer value1, Integer value2) { + addCriterion("is_score between", value1, value2, "isScore"); + return (Criteria) this; + } + + public Criteria andIsScoreNotBetween(Integer value1, Integer value2) { + addCriterion("is_score not between", value1, value2, "isScore"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtScoreLog.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtScoreLog.java new file mode 100644 index 00000000..5c00e237 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtScoreLog.java @@ -0,0 +1,118 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +public class MtScoreLog implements Serializable { + private Long id; + + private String name; + + private BigDecimal maxScore; + + private BigDecimal minScore; + + private Long projectId; + + private Integer sequence; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public BigDecimal getMaxScore() { + return maxScore; + } + + public void setMaxScore(BigDecimal maxScore) { + this.maxScore = maxScore; + } + + public BigDecimal getMinScore() { + return minScore; + } + + public void setMinScore(BigDecimal minScore) { + this.minScore = minScore; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", maxScore=").append(maxScore); + sb.append(", minScore=").append(minScore); + sb.append(", projectId=").append(projectId); + sb.append(", sequence=").append(sequence); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtScoreLogExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtScoreLogExample.java new file mode 100644 index 00000000..bcb65969 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtScoreLogExample.java @@ -0,0 +1,752 @@ +package com.ccsens.mt.bean.po; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtScoreLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtScoreLogExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andMaxScoreIsNull() { + addCriterion("max_score is null"); + return (Criteria) this; + } + + public Criteria andMaxScoreIsNotNull() { + addCriterion("max_score is not null"); + return (Criteria) this; + } + + public Criteria andMaxScoreEqualTo(BigDecimal value) { + addCriterion("max_score =", value, "maxScore"); + return (Criteria) this; + } + + public Criteria andMaxScoreNotEqualTo(BigDecimal value) { + addCriterion("max_score <>", value, "maxScore"); + return (Criteria) this; + } + + public Criteria andMaxScoreGreaterThan(BigDecimal value) { + addCriterion("max_score >", value, "maxScore"); + return (Criteria) this; + } + + public Criteria andMaxScoreGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("max_score >=", value, "maxScore"); + return (Criteria) this; + } + + public Criteria andMaxScoreLessThan(BigDecimal value) { + addCriterion("max_score <", value, "maxScore"); + return (Criteria) this; + } + + public Criteria andMaxScoreLessThanOrEqualTo(BigDecimal value) { + addCriterion("max_score <=", value, "maxScore"); + return (Criteria) this; + } + + public Criteria andMaxScoreIn(List values) { + addCriterion("max_score in", values, "maxScore"); + return (Criteria) this; + } + + public Criteria andMaxScoreNotIn(List values) { + addCriterion("max_score not in", values, "maxScore"); + return (Criteria) this; + } + + public Criteria andMaxScoreBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("max_score between", value1, value2, "maxScore"); + return (Criteria) this; + } + + public Criteria andMaxScoreNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("max_score not between", value1, value2, "maxScore"); + return (Criteria) this; + } + + public Criteria andMinScoreIsNull() { + addCriterion("min_score is null"); + return (Criteria) this; + } + + public Criteria andMinScoreIsNotNull() { + addCriterion("min_score is not null"); + return (Criteria) this; + } + + public Criteria andMinScoreEqualTo(BigDecimal value) { + addCriterion("min_score =", value, "minScore"); + return (Criteria) this; + } + + public Criteria andMinScoreNotEqualTo(BigDecimal value) { + addCriterion("min_score <>", value, "minScore"); + return (Criteria) this; + } + + public Criteria andMinScoreGreaterThan(BigDecimal value) { + addCriterion("min_score >", value, "minScore"); + return (Criteria) this; + } + + public Criteria andMinScoreGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("min_score >=", value, "minScore"); + return (Criteria) this; + } + + public Criteria andMinScoreLessThan(BigDecimal value) { + addCriterion("min_score <", value, "minScore"); + return (Criteria) this; + } + + public Criteria andMinScoreLessThanOrEqualTo(BigDecimal value) { + addCriterion("min_score <=", value, "minScore"); + return (Criteria) this; + } + + public Criteria andMinScoreIn(List values) { + addCriterion("min_score in", values, "minScore"); + return (Criteria) this; + } + + public Criteria andMinScoreNotIn(List values) { + addCriterion("min_score not in", values, "minScore"); + return (Criteria) this; + } + + public Criteria andMinScoreBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("min_score between", value1, value2, "minScore"); + return (Criteria) this; + } + + public Criteria andMinScoreNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("min_score not between", value1, value2, "minScore"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andSequenceIsNull() { + addCriterion("sequence is null"); + return (Criteria) this; + } + + public Criteria andSequenceIsNotNull() { + addCriterion("sequence is not null"); + return (Criteria) this; + } + + public Criteria andSequenceEqualTo(Integer value) { + addCriterion("sequence =", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotEqualTo(Integer value) { + addCriterion("sequence <>", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThan(Integer value) { + addCriterion("sequence >", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThanOrEqualTo(Integer value) { + addCriterion("sequence >=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThan(Integer value) { + addCriterion("sequence <", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThanOrEqualTo(Integer value) { + addCriterion("sequence <=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceIn(List values) { + addCriterion("sequence in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotIn(List values) { + addCriterion("sequence not in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceBetween(Integer value1, Integer value2) { + addCriterion("sequence between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotBetween(Integer value1, Integer value2) { + addCriterion("sequence not between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtSignin.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtSignin.java new file mode 100644 index 00000000..8ac20c76 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtSignin.java @@ -0,0 +1,139 @@ +package com.ccsens.mt.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class MtSignin implements Serializable { + private Long id; + + private Long userId; + + private Long taskId; + + private String name; + + private String phone; + + private String company; + + private Long signinTime; + + private Integer sequence; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getTaskId() { + return taskId; + } + + public void setTaskId(Long taskId) { + this.taskId = taskId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone == null ? null : phone.trim(); + } + + public String getCompany() { + return company; + } + + public void setCompany(String company) { + this.company = company == null ? null : company.trim(); + } + + public Long getSigninTime() { + return signinTime; + } + + public void setSigninTime(Long signinTime) { + this.signinTime = signinTime; + } + + public Integer getSequence() { + return sequence; + } + + public void setSequence(Integer sequence) { + this.sequence = sequence; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", taskId=").append(taskId); + sb.append(", name=").append(name); + sb.append(", phone=").append(phone); + sb.append(", company=").append(company); + sb.append(", signinTime=").append(signinTime); + sb.append(", sequence=").append(sequence); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/MtSigninExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/MtSigninExample.java new file mode 100644 index 00000000..081cbfbe --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/po/MtSigninExample.java @@ -0,0 +1,891 @@ +package com.ccsens.mt.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MtSigninExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MtSigninExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andTaskIdIsNull() { + addCriterion("task_id is null"); + return (Criteria) this; + } + + public Criteria andTaskIdIsNotNull() { + addCriterion("task_id is not null"); + return (Criteria) this; + } + + public Criteria andTaskIdEqualTo(Long value) { + addCriterion("task_id =", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotEqualTo(Long value) { + addCriterion("task_id <>", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdGreaterThan(Long value) { + addCriterion("task_id >", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdGreaterThanOrEqualTo(Long value) { + addCriterion("task_id >=", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdLessThan(Long value) { + addCriterion("task_id <", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdLessThanOrEqualTo(Long value) { + addCriterion("task_id <=", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdIn(List values) { + addCriterion("task_id in", values, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotIn(List values) { + addCriterion("task_id not in", values, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdBetween(Long value1, Long value2) { + addCriterion("task_id between", value1, value2, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotBetween(Long value1, Long value2) { + addCriterion("task_id not between", value1, value2, "taskId"); + return (Criteria) this; + } + + public Criteria 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 andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andCompanyIsNull() { + addCriterion("company is null"); + return (Criteria) this; + } + + public Criteria andCompanyIsNotNull() { + addCriterion("company is not null"); + return (Criteria) this; + } + + public Criteria andCompanyEqualTo(String value) { + addCriterion("company =", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyNotEqualTo(String value) { + addCriterion("company <>", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyGreaterThan(String value) { + addCriterion("company >", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyGreaterThanOrEqualTo(String value) { + addCriterion("company >=", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyLessThan(String value) { + addCriterion("company <", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyLessThanOrEqualTo(String value) { + addCriterion("company <=", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyLike(String value) { + addCriterion("company like", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyNotLike(String value) { + addCriterion("company not like", value, "company"); + return (Criteria) this; + } + + public Criteria andCompanyIn(List values) { + addCriterion("company in", values, "company"); + return (Criteria) this; + } + + public Criteria andCompanyNotIn(List values) { + addCriterion("company not in", values, "company"); + return (Criteria) this; + } + + public Criteria andCompanyBetween(String value1, String value2) { + addCriterion("company between", value1, value2, "company"); + return (Criteria) this; + } + + public Criteria andCompanyNotBetween(String value1, String value2) { + addCriterion("company not between", value1, value2, "company"); + return (Criteria) this; + } + + public Criteria andSigninTimeIsNull() { + addCriterion("signin_time is null"); + return (Criteria) this; + } + + public Criteria andSigninTimeIsNotNull() { + addCriterion("signin_time is not null"); + return (Criteria) this; + } + + public Criteria andSigninTimeEqualTo(Long value) { + addCriterion("signin_time =", value, "signinTime"); + return (Criteria) this; + } + + public Criteria andSigninTimeNotEqualTo(Long value) { + addCriterion("signin_time <>", value, "signinTime"); + return (Criteria) this; + } + + public Criteria andSigninTimeGreaterThan(Long value) { + addCriterion("signin_time >", value, "signinTime"); + return (Criteria) this; + } + + public Criteria andSigninTimeGreaterThanOrEqualTo(Long value) { + addCriterion("signin_time >=", value, "signinTime"); + return (Criteria) this; + } + + public Criteria andSigninTimeLessThan(Long value) { + addCriterion("signin_time <", value, "signinTime"); + return (Criteria) this; + } + + public Criteria andSigninTimeLessThanOrEqualTo(Long value) { + addCriterion("signin_time <=", value, "signinTime"); + return (Criteria) this; + } + + public Criteria andSigninTimeIn(List values) { + addCriterion("signin_time in", values, "signinTime"); + return (Criteria) this; + } + + public Criteria andSigninTimeNotIn(List values) { + addCriterion("signin_time not in", values, "signinTime"); + return (Criteria) this; + } + + public Criteria andSigninTimeBetween(Long value1, Long value2) { + addCriterion("signin_time between", value1, value2, "signinTime"); + return (Criteria) this; + } + + public Criteria andSigninTimeNotBetween(Long value1, Long value2) { + addCriterion("signin_time not between", value1, value2, "signinTime"); + return (Criteria) this; + } + + public Criteria andSequenceIsNull() { + addCriterion("sequence is null"); + return (Criteria) this; + } + + public Criteria andSequenceIsNotNull() { + addCriterion("sequence is not null"); + return (Criteria) this; + } + + public Criteria andSequenceEqualTo(Integer value) { + addCriterion("sequence =", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotEqualTo(Integer value) { + addCriterion("sequence <>", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThan(Integer value) { + addCriterion("sequence >", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceGreaterThanOrEqualTo(Integer value) { + addCriterion("sequence >=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThan(Integer value) { + addCriterion("sequence <", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceLessThanOrEqualTo(Integer value) { + addCriterion("sequence <=", value, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceIn(List values) { + addCriterion("sequence in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotIn(List values) { + addCriterion("sequence not in", values, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceBetween(Integer value1, Integer value2) { + addCriterion("sequence between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andSequenceNotBetween(Integer value1, Integer value2) { + addCriterion("sequence not between", value1, value2, "sequence"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/ScoreVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/ScoreVo.java new file mode 100644 index 00000000..0f32b1ab --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/ScoreVo.java @@ -0,0 +1,172 @@ +package com.ccsens.mt.bean.vo; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.Getter; +import lombok.Setter; + +import java.math.BigDecimal; +import java.util.List; + +@Data +public class ScoreVo { + //评委获取评分 + @Getter + @Setter + @ApiModel + public static class ScoreInfo{ + @ApiModelProperty("评分项id") + private Long id; + @ApiModelProperty("评分项名") + private String name; + @ApiModelProperty("满分") + private BigDecimal max; + @ApiModelProperty("最低分") + private BigDecimal min; + @ApiModelProperty("分数") + private BigDecimal score; + @ApiModelProperty("是否可以打分 1可以 0不可以") + private int valid; + } + + @Getter + @Setter + @ApiModel + public static class ScoreTableVo{ + @ApiModelProperty("行业") + private String industry; + @ApiModelProperty("是否推荐 1、是 0、否") + private Integer isRecommend; + @ApiModelProperty("意见") + private String opinion; + @ApiModelProperty("评委名称") + private String judge; + @JsonIgnore + private Long time; + @ApiModelProperty("评分信息") + private List scores; + } + + //管理员获取参赛项目评分 + @Getter + @Setter + @ApiModel + public static class AdminScore{ + @ApiModelProperty("评委id") + private Long judge; + @ApiModelProperty("是否是最高最低分 0普通 1最高 2最低") + private Integer isMaxOrMin; + @ApiModelProperty("评委名字") + private String judgeName; + @ApiModelProperty("分数") + private BigDecimal score; + } + + //管理员查看排名(详细信息。有每个评委的打分) + @Getter + @Setter + @ApiModel + public static class RankingScore{ + @ApiModelProperty("参赛任务id") + private Long playerId; + @ApiModelProperty("任务名") + private String company; + @ApiModelProperty("分组") + private String group; + @ApiModelProperty("平均分得分") + private BigDecimal aveScore; + @ApiModelProperty("每个评委的分数") + private List judgeScoreList; + } + @Getter + @Setter + @ApiModel + public static class JudgeScore{ + @ApiModelProperty("评委Id") + private Long judgeId; + @ApiModelProperty("评委姓名") + private String judgeName; + @ApiModelProperty("分数") + private BigDecimal score; + } + //管理员查看排名 + @Getter + @Setter + @ApiModel + public static class ranking{ + @JsonIgnore//任务id + private Long id; + @JsonIgnore//评委id + private Long roleId; + @ApiModelProperty("分组") + private String group; + @ApiModelProperty("行业") + private String industry; + @ApiModelProperty("行业内公司") + private List playerList; + } + @Getter + @Setter + @ApiModel + public static class player{ + @ApiModelProperty("公司参赛项目Id") + private Long playerId; + @ApiModelProperty("行业") + private String industry; + @ApiModelProperty("参赛项目名称") + private String playerName; + @ApiModelProperty("参赛公司名称") + private String company; + @ApiModelProperty("参赛项目得分") + private BigDecimal score; + } + + //签字表的数据 + @Getter + @Setter + public static class ExportExcel{ + private Long id;//参赛项目Id + private String playerName;//参赛项目名 + private String company;//参赛公司名 + private List scoreList; + @Getter + @Setter + public static class ScoreExcel { + private Long scoreLogId;//评分项的id + private BigDecimal score; + } + } + //总分表 + @Getter + @Setter + public static class ExportExcelAll{ + private String company;//参赛公司名 + private String playerName;//项目名 + private String industry;//行业 + private String group;//分组 + private List judgeList; + @Getter + @Setter + public static class Judge{ + private BigDecimal score1; + private BigDecimal score2; + private BigDecimal score3; + private BigDecimal score4; + private BigDecimal score5; + } + } + +// @Getter +// @Setter +// @ApiModel +// public static class MaxAndMinScore{ +// @ApiModelProperty("最高分") +// private Score scoreMax; +// @ApiModelProperty("最低分") +// private Score scoreMin; +// @ApiModelProperty("平均分") +// private BigDecimal aveScore; +// } +} diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/SigninVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/SigninVo.java new file mode 100644 index 00000000..3d511f07 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/SigninVo.java @@ -0,0 +1,21 @@ +package com.ccsens.mt.bean.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class SigninVo { + @Data + @ApiModel + public static class SigninVoInfo{ + @ApiModelProperty("姓名") + private String name; + @ApiModelProperty("手机号") + private String phone; + @ApiModelProperty("序号") + private int sequence; + @ApiModelProperty("签到时间") + private Long signTime; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/config/BeanConfig.java b/mt/src/main/java/com/ccsens/mt/config/BeanConfig.java new file mode 100644 index 00000000..3008909d --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/config/BeanConfig.java @@ -0,0 +1,31 @@ +package com.ccsens.mt.config; + +import com.ccsens.mt.intercept.MybatisInterceptor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @description: + * @author: wuHuiJuan + * @create: 2019/12/03 18:01 + */ +@Configuration +public class BeanConfig { +// @Bean +// public static PropertySourcesPlaceholderConfigurer properties(){ +// PropertySourcesPlaceholderConfigurer conf = new PropertySourcesPlaceholderConfigurer(); +// YamlPropertiesFactoryBean yml = new YamlPropertiesFactoryBean(); +// yml.setResources(new ClassPathResource("business.yml")); +// conf.setProperties(yml.getObject()); +// return conf; +// } + + /** + * 注册拦截器 + */ + @Bean + public MybatisInterceptor mybatisInterceptor() { + MybatisInterceptor interceptor = new MybatisInterceptor(); + return interceptor; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/config/SpringConfig.java b/mt/src/main/java/com/ccsens/mt/config/SpringConfig.java new file mode 100644 index 00000000..c477f308 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/config/SpringConfig.java @@ -0,0 +1,164 @@ +package com.ccsens.mt.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/mt/src/main/java/com/ccsens/mt/config/SwaggerConfigure.java b/mt/src/main/java/com/ccsens/mt/config/SwaggerConfigure.java new file mode 100644 index 00000000..a02fe9a7 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/config/SwaggerConfigure.java @@ -0,0 +1,56 @@ +package com.ccsens.mt.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.mt.api")) + .build() + .globalOperationParameters(setHeaderToken()); + } + + private ApiInfo apiInfo() { + return new ApiInfo("Swagger Tall-game",//大标题 title + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",//小标题 + "1.0.0",//版本 + "http://swagger.io/terms/",//termsOfServiceUrl + "zhangsan",//作者 + "Apache 2.0",//链接显示文字 + "http://www.apache.org/licenses/LICENSE-2.0.html"//网站链接 + ); + } + + private List setHeaderToken() { + ParameterBuilder tokenPar = new ParameterBuilder(); + List pars = new ArrayList<>(); + tokenPar.name(WebConstant.HEADER_KEY_TOKEN).description("token") + .defaultValue(WebConstant.HEADER_KEY_TOKEN_PREFIX) + .modelRef(new ModelRef("string")).parameterType("header").required(false).build(); + pars.add(tokenPar.build()); + return pars; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java b/mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java new file mode 100644 index 00000000..09a10b09 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java @@ -0,0 +1,154 @@ +package com.ccsens.mt.intercept; + +import cn.hutool.core.collection.CollectionUtil; +import com.ccsens.util.WebConstant; +import org.apache.ibatis.executor.Executor; +import org.apache.ibatis.mapping.*; +import org.apache.ibatis.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/mt/src/main/java/com/ccsens/mt/persist/dao/MtJudgeDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/MtJudgeDao.java new file mode 100644 index 00000000..6e91db0b --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/MtJudgeDao.java @@ -0,0 +1,8 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.persist.mapper.MtJudgeMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface MtJudgeDao extends MtJudgeMapper{ +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/MtScoreDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/MtScoreDao.java new file mode 100644 index 00000000..a415db16 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/MtScoreDao.java @@ -0,0 +1,12 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.persist.mapper.MtScoreMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.math.BigDecimal; + +@Repository +public interface MtScoreDao extends MtScoreMapper{ + BigDecimal sumScoreByJudgeId(@Param("judgeId")Long judgeId, @Param("playerId")Long playerId); +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/MtScoreLogDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/MtScoreLogDao.java new file mode 100644 index 00000000..4612b442 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/MtScoreLogDao.java @@ -0,0 +1,8 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.persist.mapper.MtScoreLogMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface MtScoreLogDao extends MtScoreLogMapper{ +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/MtSigninDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/MtSigninDao.java new file mode 100644 index 00000000..dd9baa70 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/MtSigninDao.java @@ -0,0 +1,8 @@ +package com.ccsens.mt.persist.dao; + +import com.ccsens.mt.persist.mapper.MtSigninMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface MtSigninDao extends MtSigninMapper{ +} diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtJudgeMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtJudgeMapper.java new file mode 100644 index 00000000..33a87600 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtJudgeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtJudge; +import com.ccsens.mt.bean.po.MtJudgeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtJudgeMapper { + long countByExample(MtJudgeExample example); + + int deleteByExample(MtJudgeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtJudge record); + + int insertSelective(MtJudge record); + + List selectByExample(MtJudgeExample example); + + MtJudge selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtJudge record, @Param("example") MtJudgeExample example); + + int updateByExample(@Param("record") MtJudge record, @Param("example") MtJudgeExample example); + + int updateByPrimaryKeySelective(MtJudge record); + + int updateByPrimaryKey(MtJudge record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtScoreLogMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtScoreLogMapper.java new file mode 100644 index 00000000..db96865d --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtScoreLogMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtScoreLog; +import com.ccsens.mt.bean.po.MtScoreLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtScoreLogMapper { + long countByExample(MtScoreLogExample example); + + int deleteByExample(MtScoreLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtScoreLog record); + + int insertSelective(MtScoreLog record); + + List selectByExample(MtScoreLogExample example); + + MtScoreLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtScoreLog record, @Param("example") MtScoreLogExample example); + + int updateByExample(@Param("record") MtScoreLog record, @Param("example") MtScoreLogExample example); + + int updateByPrimaryKeySelective(MtScoreLog record); + + int updateByPrimaryKey(MtScoreLog record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtScoreMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtScoreMapper.java new file mode 100644 index 00000000..48e02353 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtScoreMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtScore; +import com.ccsens.mt.bean.po.MtScoreExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtScoreMapper { + long countByExample(MtScoreExample example); + + int deleteByExample(MtScoreExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtScore record); + + int insertSelective(MtScore record); + + List selectByExample(MtScoreExample example); + + MtScore selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtScore record, @Param("example") MtScoreExample example); + + int updateByExample(@Param("record") MtScore record, @Param("example") MtScoreExample example); + + int updateByPrimaryKeySelective(MtScore record); + + int updateByPrimaryKey(MtScore record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/persist/mapper/MtSigninMapper.java b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtSigninMapper.java new file mode 100644 index 00000000..ffe8f8c2 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/persist/mapper/MtSigninMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.mt.persist.mapper; + +import com.ccsens.mt.bean.po.MtSignin; +import com.ccsens.mt.bean.po.MtSigninExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MtSigninMapper { + long countByExample(MtSigninExample example); + + int deleteByExample(MtSigninExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MtSignin record); + + int insertSelective(MtSignin record); + + List selectByExample(MtSigninExample example); + + MtSignin selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MtSignin record, @Param("example") MtSigninExample example); + + int updateByExample(@Param("record") MtSignin record, @Param("example") MtSigninExample example); + + int updateByPrimaryKeySelective(MtSignin record); + + int updateByPrimaryKey(MtSignin record); +} \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/service/IMessageService.java b/mt/src/main/java/com/ccsens/mt/service/IMessageService.java new file mode 100644 index 00000000..1f6214e4 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/IMessageService.java @@ -0,0 +1,9 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.message.SyncMessageWithShowDto; +import com.fasterxml.jackson.core.JsonProcessingException; + +public interface IMessageService { + //发送亮分消息至树莓派 + void sendSyncMessageWithShow(SyncMessageWithShowDto scoreShow) throws Exception; +} diff --git a/mt/src/main/java/com/ccsens/mt/service/IScoreService.java b/mt/src/main/java/com/ccsens/mt/service/IScoreService.java new file mode 100644 index 00000000..7fe2412d --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/IScoreService.java @@ -0,0 +1,18 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.ScoreDto; +import com.ccsens.mt.bean.vo.ScoreVo; + +import java.util.List; + +public interface IScoreService { + List getScoreLog(Long userId, Long playerId); + + void submitScore(Long userId, ScoreDto.SubmitScore submitScore); + + List adminScore(Long userId, Long roleId, Long playerId); + + List getRanking(Long projectId); + + void showScore(Long projectId, Long playerId) throws Exception; +} diff --git a/mt/src/main/java/com/ccsens/mt/service/ISigninService.java b/mt/src/main/java/com/ccsens/mt/service/ISigninService.java new file mode 100644 index 00000000..5d995966 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/ISigninService.java @@ -0,0 +1,10 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.SigninDto; +import com.ccsens.mt.bean.vo.SigninVo; + +public interface ISigninService { + SigninVo.SigninVoInfo signin(SigninDto.SigninInfo signinInfo, Long userId); + + SigninVo.SigninVoInfo getSignByTaskId(Long taskId, Long userId); +} diff --git a/mt/src/main/java/com/ccsens/mt/service/IUserService.java b/mt/src/main/java/com/ccsens/mt/service/IUserService.java new file mode 100644 index 00000000..abb02d85 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/IUserService.java @@ -0,0 +1,8 @@ +package com.ccsens.mt.service; + + +import javax.servlet.http.HttpServletRequest; + +public interface IUserService { + Long getUserIdByToken(HttpServletRequest request); +} diff --git a/mt/src/main/java/com/ccsens/mt/service/MessageServicer.java b/mt/src/main/java/com/ccsens/mt/service/MessageServicer.java new file mode 100644 index 00000000..942a7e98 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/MessageServicer.java @@ -0,0 +1,22 @@ +package com.ccsens.mt.service; + +import com.ccsens.mt.bean.dto.message.SyncMessageWithShowDto; +import com.ccsens.util.JacksonUtil; +import com.ccsens.util.config.RabbitMQConfig; +import org.springframework.amqp.core.AmqpTemplate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class MessageServicer implements IMessageService{ + @Autowired + private AmqpTemplate rabbitTemplate; + + @Override + public void sendSyncMessageWithShow(SyncMessageWithShowDto message) throws Exception { + System.out.println(JacksonUtil.beanToJson(message)); + rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, + JacksonUtil.beanToJson(message)); + } + +} diff --git a/mt/src/main/java/com/ccsens/mt/service/ScoreService.java b/mt/src/main/java/com/ccsens/mt/service/ScoreService.java new file mode 100644 index 00000000..0dd14ae7 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/ScoreService.java @@ -0,0 +1,324 @@ +package com.ccsens.mt.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.cloudutil.bean.tall.vo.MemberVo; +import com.ccsens.cloudutil.bean.tall.vo.TaskVo; +import com.ccsens.cloudutil.feign.TallFeignClient; +import com.ccsens.mt.bean.dto.ScoreDto; +import com.ccsens.mt.bean.dto.message.BaseMessageDto; +import com.ccsens.mt.bean.dto.message.SyncMessageWithShowDto; +import com.ccsens.mt.bean.po.*; +import com.ccsens.mt.bean.vo.ScoreVo; +import com.ccsens.mt.persist.dao.MtJudgeDao; +import com.ccsens.mt.persist.dao.MtScoreDao; +import com.ccsens.mt.persist.dao.MtScoreLogDao; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import com.ccsens.util.exception.BaseException; +import lombok.Data; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import static java.math.BigDecimal.ROUND_HALF_UP; + +@Service +public class ScoreService implements IScoreService{ + @Autowired + private TallFeignClient tallFeignClient; + @Autowired + private MtScoreDao scoreDao; + @Autowired + private MtScoreLogDao scoreLogDao; + @Autowired + private MtJudgeDao judgeDao; + @Autowired + private IMessageService messageService; + @Autowired + private Snowflake snowflake; + + /** + * 获取评分项 + * @param userId + * @param playerId + * @return + */ + @Override + public List getScoreLog(Long userId, Long playerId) { + List scoreInfoList = new ArrayList<>(); + if(ObjectUtil.isNull(userId)){ + throw new BaseException(CodeEnum.NOT_LOGIN); + } + TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(playerId); + if(ObjectUtil.isNull(taskInfo)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + JsonResponse jMemberInfo = tallFeignClient.getMemberByUserId(userId,taskInfo.getProjectId()); + if(ObjectUtil.isNull(jMemberInfo)){ + throw new BaseException(CodeEnum.NOT_MEMBER); + } + MemberVo.MemberInfo memberInfo = jMemberInfo.getData(); + if(ObjectUtil.isNull(memberInfo)){ + throw new BaseException(CodeEnum.NOT_MEMBER); + } + + MtScoreLogExample scoreLogExample = new MtScoreLogExample(); + scoreLogExample.createCriteria().andProjectIdEqualTo(taskInfo.getProjectId()); + List scoreLogList = scoreLogDao.selectByExample(scoreLogExample); + if(CollectionUtil.isNotEmpty(scoreLogList)){ + ScoreVo.ScoreInfo scoreInfo = null; + for(MtScoreLog mtScoreLog : scoreLogList){ + scoreInfo = new ScoreVo.ScoreInfo(); + scoreInfo.setId(mtScoreLog.getId()); + scoreInfo.setMax(mtScoreLog.getMaxScore()); + scoreInfo.setMin(mtScoreLog.getMinScore()); + scoreInfo.setName(mtScoreLog.getName()); + scoreInfo.setValid(1); + scoreInfo.setScore(new BigDecimal(0)); + //查找评分 + MtScoreExample scoreExample = new MtScoreExample(); + scoreExample.createCriteria().andScoreLogIdEqualTo(mtScoreLog.getId()) + .andJudgeUserIdEqualTo(memberInfo.getId()).andTaskIdEqualTo(playerId); + List scoreList = scoreDao.selectByExample(scoreExample); + if (CollectionUtil.isNotEmpty(scoreList)) { + scoreInfo.setScore(scoreList.get(0).getScore()); + scoreInfo.setValid(0); + } + scoreInfoList.add(scoreInfo); + } + } + return scoreInfoList; + } + + /** + * 提交评分 + * @param userId + * @param submitScore + */ + @Override + public void submitScore(Long userId, ScoreDto.SubmitScore submitScore) { + if(ObjectUtil.isNull(userId)){ + throw new BaseException(CodeEnum.NOT_LOGIN); + } + TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(submitScore.getPlayerId()); + if(ObjectUtil.isNull(taskInfo)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + JsonResponse jMemberInfo = tallFeignClient.getMemberByUserId(userId,taskInfo.getProjectId()); + if(ObjectUtil.isNull(jMemberInfo)){ + throw new BaseException(CodeEnum.NOT_MEMBER); + } + MemberVo.MemberInfo memberInfo = jMemberInfo.getData(); + if(ObjectUtil.isNull(memberInfo)){ + throw new BaseException(CodeEnum.NOT_MEMBER); + } + //添加评委 + addJudge(memberInfo); + + MtScoreExample scoreExample = new MtScoreExample(); + scoreExample.createCriteria().andTaskIdEqualTo(submitScore.getPlayerId()).andJudgeUserIdEqualTo(memberInfo.getId()); + List scoreList = scoreDao.selectByExample(scoreExample); + if (CollectionUtil.isEmpty(scoreList)) { + if (CollectionUtil.isNotEmpty(submitScore.getData())) { + for (ScoreDto.ScoreInfo1 data : submitScore.getData()) { + MtScore score = new MtScore(); + score.setId(snowflake.nextId()); + score.setJudgeUserId(memberInfo.getId()); + score.setTaskId(submitScore.getPlayerId()); + score.setTaskName(null); + score.setScoreLogId(data.getId()); + score.setScore(data.getScore()); + //0已评分,1被退回 + score.setIsScore(0); + scoreDao.insert(score); + } + } + } else { + throw new BaseException(CodeEnum.SCORE_REPEAT); + } + } + private void addJudge(MemberVo.MemberInfo memberInfo){ + MtJudge judge = judgeDao.selectByPrimaryKey(memberInfo.getId()); + if(ObjectUtil.isNull(judge)){ + judge = new MtJudge(); + BeanUtil.copyProperties(memberInfo,judge); + judgeDao.insertSelective(judge); + } + } + + /** + * 查看评分 + * @param userId + * @param roleId + * @param playerId + * @return + */ + @Override + public List adminScore(Long userId, Long roleId, Long playerId) { + List adminScoreList = new ArrayList<>(); + ScoreVo.AdminScore adminScore = null; +// +// Score scoreMax = scoreDao.maxScore(playerId);//最高分 +// Score scoreMin = scoreDao.minScore(playerId);//最低分 + TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(playerId); + if(ObjectUtil.isNull(taskInfo)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + MtJudgeExample judgeExample = new MtJudgeExample(); + judgeExample.createCriteria().andProjectIdEqualTo(taskInfo.getProjectId()); + List judgeList = judgeDao.selectByExample(judgeExample); + if(CollectionUtil.isNotEmpty(judgeList)){ + for(MtJudge mtJudge:judgeList){ + BigDecimal score = scoreDao.sumScoreByJudgeId(mtJudge.getId(),playerId); + adminScore = new ScoreVo.AdminScore(); + + adminScore.setJudge(mtJudge.getId()); + adminScore.setScore(score); + adminScore.setJudgeName(mtJudge.getNickname()); + adminScoreList.add(adminScore); + } + } + return adminScoreList; + } + + /** + * 查看排名 + */ + @Override + public List getRanking(Long projectId) { + //获取所有参赛任务 + Set taskIdList = new HashSet<>(); + MtScoreLogExample scoreLogExample = new MtScoreLogExample(); + scoreLogExample.createCriteria().andProjectIdEqualTo(projectId); + List scoreLogList = scoreLogDao.selectByExample(scoreLogExample); + if(CollectionUtil.isNotEmpty(scoreLogList)){ + for(MtScoreLog scoreLog : scoreLogList){ + MtScoreExample scoreExample = new MtScoreExample(); + scoreExample.createCriteria().andScoreLogIdEqualTo(scoreLog.getId()); + List scoreList = scoreDao.selectByExample(scoreExample); + if(CollectionUtil.isNotEmpty(scoreList)){ + for(MtScore score : scoreList){ + taskIdList.add(score.getTaskId()); + } + } + } + } + //查找每个任务的分数 + List rankingScoreList = new ArrayList<>(); + ScoreVo.RankingScore rankingScore = null; + if(CollectionUtil.isNotEmpty(taskIdList)){ + for(Long taskId : taskIdList){ + rankingScore = new ScoreVo.RankingScore(); + TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(taskId); + if(ObjectUtil.isNull(taskInfo)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + rankingScore.setPlayerId(taskInfo.getId()); + rankingScore.setCompany(taskInfo.getName()); + //获取每个评委对此任务的评分 + List judgeScoreList = findJudgeScore(projectId,taskId); + rankingScore.setJudgeScoreList(judgeScoreList); + //获取此任务的平均分 + BigDecimal aveScore = BigDecimal.valueOf(0); + if(CollectionUtil.isNotEmpty(judgeScoreList)){ + for(ScoreVo.JudgeScore judgeScore : judgeScoreList){ + aveScore = aveScore.subtract(judgeScore.getScore()); + } + aveScore = aveScore.divide(BigDecimal.valueOf(judgeScoreList.size()), 2, ROUND_HALF_UP); + } + rankingScore.setAveScore(aveScore); + + rankingScoreList.add(rankingScore); + } + } + return null; + } + + /** + * 获取每个评委对此任务的评分 + */ + private List findJudgeScore(Long projectId, Long taskId) { + List judgeScoreList = new ArrayList<>(); + ScoreVo.JudgeScore judgeScore = null; + //查找项目下所有评委 + MtJudgeExample judgeExample = new MtJudgeExample(); + judgeExample.createCriteria().andProjectIdEqualTo(projectId); + List judgeList = judgeDao.selectByExample(judgeExample); + if (CollectionUtil.isNotEmpty(judgeList)) { + for (MtJudge judge : judgeList) { + BigDecimal scoreSUM = scoreDao.sumScoreByJudgeId(judge.getId(), taskId); + judgeScore = new ScoreVo.JudgeScore(); + judgeScore.setJudgeId(judge.getId()); + judgeScore.setJudgeName(judge.getNickname()); + judgeScore.setScore(scoreSUM); + + judgeScoreList.add(judgeScore); + } + } + return judgeScoreList; + } + + /** + * 亮分 + */ + @Override + public void showScore(Long projectId, Long taskId) throws Exception { + SyncMessageWithShowDto scoreShow = new SyncMessageWithShowDto(); + SyncMessageWithShowDto.Data data = new SyncMessageWithShowDto.Data(); + SyncMessageWithShowDto.Data.Judge judge = null; + List judgeList = new ArrayList<>(); + + //项目 + TaskVo.TaskInfoWithFeign taskInfo = tallFeignClient.getProjectId(taskId); + if(ObjectUtil.isNull(taskInfo)){ + throw new BaseException(CodeEnum.NOT_TASK); + } + data.setProjectId(taskInfo.getProjectId()); + data.setPlayerName(taskInfo.getProjectName()); + data.setPlayerId(taskInfo.getId()); + data.setPlayerName(taskInfo.getName()); + //获取每个评委对此任务的评分 + List judgeScoreList = findJudgeScore(projectId,taskId); + BigDecimal aveScore = BigDecimal.valueOf(0); + if(CollectionUtil.isNotEmpty(judgeScoreList)){ + for(ScoreVo.JudgeScore judgeScore : judgeScoreList){ + MtJudge mtJudge = judgeDao.selectByPrimaryKey(judgeScore.getJudgeId()); + + judge = new SyncMessageWithShowDto.Data.Judge(); + judge.setJudgeName(mtJudge.getNickname()); +// judge.setAvatarUrl(WebConstant.URL_BASE + mtJudge.getAvatarUrl()); + judge.setScore(judgeScore.getScore()); + judgeList.add(judge); + //获取此任务的总分 + aveScore = aveScore.subtract(judgeScore.getScore()); + } + //平均分 + aveScore = aveScore.divide(BigDecimal.valueOf(judgeScoreList.size()), 2, ROUND_HALF_UP); + } + data.setAverageScore(aveScore); + data.setScoreList(judgeList); + + //接收者id + List messageUserList = new ArrayList<>(); + BaseMessageDto.MessageUser messageUser1 = new BaseMessageDto.MessageUser(); + BaseMessageDto.MessageUser messageUser2 = new BaseMessageDto.MessageUser(); + messageUser1.setUserId(1990L); + messageUser2.setUserId(1991L); + messageUserList.add(messageUser1); + messageUserList.add(messageUser2); + + scoreShow.setData(data); + scoreShow.setReceivers(messageUserList); + //发送消息 + messageService.sendSyncMessageWithShow(scoreShow); + } +} diff --git a/mt/src/main/java/com/ccsens/mt/service/SigninService.java b/mt/src/main/java/com/ccsens/mt/service/SigninService.java new file mode 100644 index 00000000..9eb5aae8 --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/SigninService.java @@ -0,0 +1,75 @@ +package com.ccsens.mt.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import com.ccsens.mt.bean.dto.SigninDto; +import com.ccsens.mt.bean.po.MtSignin; +import com.ccsens.mt.bean.po.MtSigninExample; +import com.ccsens.mt.bean.vo.SigninVo; +import com.ccsens.mt.persist.dao.MtSigninDao; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.exception.BaseException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class SigninService implements ISigninService{ + @Autowired + private MtSigninDao mtSigninDao; + @Autowired + private Snowflake snowflake; + + @Override + public SigninVo.SigninVoInfo signin(SigninDto.SigninInfo signinInfo, Long userId) { + MtSigninExample signinExample = new MtSigninExample(); + signinExample.createCriteria().andTaskIdEqualTo(signinInfo.getTaskId()).andUserIdEqualTo(userId); + List signinList = mtSigninDao.selectByExample(signinExample); + if(CollectionUtil.isNotEmpty(signinList)){ + throw new BaseException(CodeEnum.SIGNIN_REPEAT); + } + + MtSignin mtSignin = new MtSignin(); + mtSignin.setId(snowflake.nextId()); + mtSignin.setUserId(userId); + mtSignin.setTaskId(signinInfo.getTaskId()); + mtSignin.setName(signinInfo.getName()); + mtSignin.setPhone(signinInfo.getPhone()); + mtSignin.setSigninTime(System.currentTimeMillis()); + + MtSigninExample mtSigninExample = new MtSigninExample(); + mtSigninExample.createCriteria().andTaskIdEqualTo(signinInfo.getTaskId()); + List mtSigninList = mtSigninDao.selectByExample(mtSigninExample); + if(CollectionUtil.isNotEmpty(mtSigninList)){ + mtSignin.setSequence(mtSigninList.size() + 1); + }else { + mtSignin.setSequence(1); + } + mtSigninDao.insertSelective(mtSignin); + + SigninVo.SigninVoInfo signinVoInfo = new SigninVo.SigninVoInfo(); + signinVoInfo.setName(mtSignin.getName()); + signinVoInfo.setPhone(mtSignin.getPhone()); + signinVoInfo.setSequence(mtSignin.getSequence()); + signinVoInfo.setSignTime(mtSignin.getSigninTime()); + return signinVoInfo; + } + + + @Override + public SigninVo.SigninVoInfo getSignByTaskId(Long taskId, Long userId) { + SigninVo.SigninVoInfo signinVoInfo = new SigninVo.SigninVoInfo(); + MtSigninExample signinExample = new MtSigninExample(); + signinExample.createCriteria().andTaskIdEqualTo(taskId).andUserIdEqualTo(userId); + List signinList = mtSigninDao.selectByExample(signinExample); + if(CollectionUtil.isNotEmpty(signinList)){ + MtSignin mtSignin = signinList.get(0); + signinVoInfo.setName(mtSignin.getName()); + signinVoInfo.setPhone(mtSignin.getPhone()); + signinVoInfo.setSequence(mtSignin.getSequence()); + signinVoInfo.setSignTime(mtSignin.getSigninTime()); + } + return signinVoInfo; + } +} diff --git a/mt/src/main/java/com/ccsens/mt/service/UserService.java b/mt/src/main/java/com/ccsens/mt/service/UserService.java new file mode 100644 index 00000000..28ba0c3a --- /dev/null +++ b/mt/src/main/java/com/ccsens/mt/service/UserService.java @@ -0,0 +1,41 @@ +package com.ccsens.mt.service; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.cloudutil.feign.TallFeignClient; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.JsonResponse; +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 javax.servlet.http.HttpServletRequest; + +@Slf4j +@Service +public class UserService implements IUserService{ + @Autowired + private TallFeignClient tallFeignClient; + + @Override + public Long getUserIdByToken(HttpServletRequest request){ + final String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); + + JsonResponse response = tallFeignClient.getUserIdByToken(authHeader); + log.info("{}获取userId:{}", authHeader, response); + if (response.getCode().intValue() != CodeEnum.SUCCESS.getCode().intValue()) { + throw new BaseException(CodeEnum.NOT_LOGIN); + } + if (response.getData() == null) { + throw new BaseException(CodeEnum.NOT_LOGIN); + } + JSONObject json = JSONObject.parseObject(JSON.toJSONString(response.getData())); + Long userId = json.getLong("id"); + if (userId == null || userId == 0) { + throw new BaseException(CodeEnum.NOT_LOGIN); + } + return userId; + } +} diff --git a/mt/src/main/resources/application-common.yml b/mt/src/main/resources/application-common.yml new file mode 100644 index 00000000..40efee80 --- /dev/null +++ b/mt/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/mt/src/main/resources/application-dev.yml b/mt/src/main/resources/application-dev.yml new file mode 100644 index 00000000..096c3432 --- /dev/null +++ b/mt/src/main/resources/application-dev.yml @@ -0,0 +1,29 @@ +server: + port: 7060 + servlet: + context-path: +spring: + application: + name: mt + 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/mt/src/main/resources/application-test.yml b/mt/src/main/resources/application-test.yml new file mode 100644 index 00000000..0b1e47da --- /dev/null +++ b/mt/src/main/resources/application-test.yml @@ -0,0 +1,28 @@ +server: + port: 7060 + servlet: + context-path: +spring: + application: + name: mt + 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/mt/src/main/resources/application.yml b/mt/src/main/resources/application.yml new file mode 100644 index 00000000..5c2cd5c4 --- /dev/null +++ b/mt/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/mt/src/main/resources/druid-dev.yml b/mt/src/main/resources/druid-dev.yml new file mode 100644 index 00000000..78308b7f --- /dev/null +++ b/mt/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/mt?useUnicode=true&characterEncoding=UTF-8 + username: root + validationQuery: SELECT 1 FROM DUAL + env: CCSENS_GAME \ No newline at end of file diff --git a/mt/src/main/resources/druid-prod.yml b/mt/src/main/resources/druid-prod.yml new file mode 100644 index 00000000..56cd9c56 --- /dev/null +++ b/mt/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/mt?useUnicode=true&characterEncoding=UTF-8 + username: root + validationQuery: SELECT 1 FROM DUAL + env: CCSENS_GAME \ No newline at end of file diff --git a/mt/src/main/resources/druid-test.yml b/mt/src/main/resources/druid-test.yml new file mode 100644 index 00000000..56cd9c56 --- /dev/null +++ b/mt/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/mt?useUnicode=true&characterEncoding=UTF-8 + username: root + validationQuery: SELECT 1 FROM DUAL + env: CCSENS_GAME \ No newline at end of file diff --git a/mt/src/main/resources/logback-spring.xml b/mt/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..da37f156 --- /dev/null +++ b/mt/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/mt/src/main/resources/mapper_dao/ScoreDao.xml b/mt/src/main/resources/mapper_dao/ScoreDao.xml new file mode 100644 index 00000000..de12280e --- /dev/null +++ b/mt/src/main/resources/mapper_dao/ScoreDao.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + \ 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 4f599519..c9d15fa3 100644 --- a/pom.xml +++ b/pom.xml @@ -10,6 +10,8 @@ ht tall util + game + mt 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/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/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/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 463bf2ea..72055bd7 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 @@ -132,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/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/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/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 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/java/com/ccsens/tall/web/MemberRoleController.java b/tall/src/main/java/com/ccsens/tall/web/MemberRoleController.java index 33647de3..dca38ab9 100644 --- a/tall/src/main/java/com/ccsens/tall/web/MemberRoleController.java +++ b/tall/src/main/java/com/ccsens/tall/web/MemberRoleController.java @@ -85,4 +85,7 @@ public class MemberRoleController { proRoleService.deleteRole(currentUserId,roleId); return JsonResponse.newInstance().ok(); } + + + } diff --git a/tall/src/main/java/com/ccsens/tall/web/TaskController.java b/tall/src/main/java/com/ccsens/tall/web/TaskController.java index 7202f8fb..0d994247 100644 --- a/tall/src/main/java/com/ccsens/tall/web/TaskController.java +++ b/tall/src/main/java/com/ccsens/tall/web/TaskController.java @@ -146,4 +146,18 @@ public class TaskController { return JsonResponse.newInstance().ok(taskInfo); } + + /** + * 通过任务id查询项目id + * @param request + * @param taskId + * @return + * @throws Exception + */ + @RequestMapping(value = "projectId", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public TaskVo.TaskInfoWithFeign getProjectIdByTaskId(HttpServletRequest request, @RequestParam(required = false)Long taskId) throws Exception { + + TaskVo.TaskInfoWithFeign taskInfo= taskDetailService.getProjectIdByTaskId(taskId); + return taskInfo; + } } diff --git a/tall/src/main/java/com/ccsens/tall/web/UserController.java b/tall/src/main/java/com/ccsens/tall/web/UserController.java index fc01067a..526f80ab 100644 --- a/tall/src/main/java/com/ccsens/tall/web/UserController.java +++ b/tall/src/main/java/com/ccsens/tall/web/UserController.java @@ -6,11 +6,14 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.extra.servlet.ServletUtil; import com.ccsens.tall.bean.dto.UserDto; import com.ccsens.tall.bean.po.SysUser; +import com.ccsens.tall.bean.vo.MemberVo; import com.ccsens.tall.bean.vo.UserVo; import com.ccsens.tall.exception.UserLoginException; +import com.ccsens.tall.service.IProMemberService; import com.ccsens.tall.service.IUserService; import com.ccsens.util.*; import com.ccsens.util.exception.BaseException; +import feign.Param; import io.jsonwebtoken.Claims; import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.SignatureException; @@ -31,6 +34,9 @@ public class UserController { @Autowired private IUserService userService; + @Autowired + private IProMemberService proMemberService; + @ApiOperation(value = "/用户登录", notes = "") @ApiImplicitParams({ @@ -255,6 +261,17 @@ public class UserController { return JsonResponse.newInstance().ok(tokenToUserId); } + + + /** + * 查询user在项目中的member信息 + */ + @RequestMapping(value = "member", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse 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/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/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); + } } 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)); //解密为字符串