93 changed files with 8159 additions and 1314 deletions
@ -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; |
|||
} |
|||
} |
@ -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; |
|||
} |
|||
} |
@ -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<String> 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<String> activityRule; |
|||
@ApiModelProperty("活动奖品") |
|||
private List<String> activityPrize; |
|||
@ApiModelProperty("奖券使用说明") |
|||
private List<String> 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; |
|||
} |
|||
} |
@ -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{ |
|||
} |
@ -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{ |
|||
} |
@ -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{ |
|||
} |
@ -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{ |
|||
} |
@ -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{ |
|||
|
|||
} |
@ -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); |
|||
} |
@ -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<GameMember> 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<GameType> 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<GameTypeMember> 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<String> ruleList = null; |
|||
GameActivityRuleExample activityRuleExample = new GameActivityRuleExample(); |
|||
activityRuleExample.createCriteria().andGameIdEqualTo(gameType.getId()); |
|||
List<GameActivityRule> 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; |
|||
} |
|||
} |
@ -1,15 +0,0 @@ |
|||
package com.ccsens.game; |
|||
|
|||
|
|||
import org.junit.Test; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
|
|||
@SpringBootTest |
|||
class GameApplicationTests { |
|||
|
|||
@Test |
|||
void contextLoads() { |
|||
|
|||
} |
|||
|
|||
} |
@ -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(); |
|||
} |
|||
|
|||
} |
@ -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 |
@ -0,0 +1,75 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
|
|||
<parent> |
|||
<artifactId>ccsenscloud</artifactId> |
|||
<groupId>com.ccsens</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>mt</artifactId> |
|||
<properties> |
|||
<java.version>1.8</java.version> |
|||
</properties> |
|||
|
|||
<dependencies> |
|||
<!--cloud 工具类--> |
|||
<dependency> |
|||
<artifactId>cloudutil</artifactId> |
|||
<groupId>com.ccsens</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
<!--util 工具类--> |
|||
<dependency> |
|||
<artifactId>util</artifactId> |
|||
<groupId>com.ccsens</groupId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.alibaba</groupId> |
|||
<artifactId>fastjson</artifactId> |
|||
<version>1.2.62</version> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.mybatis.generator</groupId> |
|||
<artifactId>mybatis-generator-maven-plugin</artifactId> |
|||
<version>1.3.7</version> |
|||
<configuration> |
|||
<configurationFile>${basedir}/src/main/resources/mbg.xml</configurationFile> |
|||
<overwrite>true</overwrite> |
|||
</configuration> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>mysql</groupId> |
|||
<artifactId>mysql-connector-java</artifactId> |
|||
<version>5.1.34</version> |
|||
</dependency> |
|||
</dependencies> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<configuration> |
|||
<mainClass>com.ccsens.mt.MtApplication</mainClass> |
|||
<!--<skip>true</skip>--> |
|||
</configuration> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>repackage</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
|
|||
</plugins> |
|||
</build> |
|||
|
|||
</project> |
@ -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); |
|||
} |
|||
|
|||
} |
@ -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("测试"); |
|||
} |
|||
|
|||
|
|||
} |
@ -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<List<ScoreVo.ScoreInfo>> getScoreLog(HttpServletRequest request, |
|||
@RequestParam Long roleId, |
|||
@RequestParam(required = true) Long playerId) throws Exception { |
|||
//获取userId
|
|||
Long userId = userService.getUserIdByToken(request); |
|||
|
|||
List<ScoreVo.ScoreInfo> 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<List<ScoreVo.AdminScore>> adminScore(HttpServletRequest request, |
|||
@RequestParam(required = true) Long roleId, |
|||
@RequestParam(required = true) Long playerId) throws Exception { |
|||
//获取userId
|
|||
Long userId = userService.getUserIdByToken(request); |
|||
|
|||
List<ScoreVo.AdminScore> 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<List<ScoreVo.RankingScore>> getRankingScore(HttpServletRequest request, |
|||
@RequestParam(required = true) Long projectId) throws Exception { |
|||
List<ScoreVo.RankingScore> 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(); |
|||
} |
|||
|
|||
} |
@ -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<SigninVo.SigninVoInfo> 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<SigninVo.SigninVoInfo> 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); |
|||
} |
|||
} |
@ -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<ScoreInfo1> 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<BigDecimal> 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<ScoreLogVo> scoreLogList; |
|||
} |
|||
@Getter |
|||
@Setter |
|||
@ApiModel |
|||
public class ScoreLogVo { |
|||
@ApiModelProperty("名字") |
|||
private String name; |
|||
@ApiModelProperty("最大值") |
|||
private BigDecimal maxScore; |
|||
@ApiModelProperty("最小值") |
|||
private BigDecimal minScore; |
|||
} |
|||
} |
@ -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; |
|||
} |
|||
} |
@ -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<MessageUser> receivers; |
|||
// private Object data;
|
|||
} |
@ -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<Judge> 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()); |
|||
} |
|||
} |
@ -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(); |
|||
} |
|||
} |
@ -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<Criteria> oredCriteria; |
|||
|
|||
public MtJudgeExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
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<Criteria> 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<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> 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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("project_id in", values, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("user_id in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotIn(List<Long> 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<String> values) { |
|||
addCriterion("nickname in", values, "nickname"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNicknameNotIn(List<String> 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<String> values) { |
|||
addCriterion("avatar_url in", values, "avatarUrl"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAvatarUrlNotIn(List<String> 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<String> values) { |
|||
addCriterion("phone in", values, "phone"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPhoneNotIn(List<String> 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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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); |
|||
} |
|||
} |
|||
} |
@ -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(); |
|||
} |
|||
} |
@ -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<Criteria> oredCriteria; |
|||
|
|||
public MtScoreExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
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<Criteria> 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<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> 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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("judge_user_id in", values, "judgeUserId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andJudgeUserIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("score_log_id in", values, "scoreLogId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andScoreLogIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("task_id in", values, "taskId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTaskIdNotIn(List<Long> 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<String> values) { |
|||
addCriterion("task_name in", values, "taskName"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTaskNameNotIn(List<String> 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<BigDecimal> values) { |
|||
addCriterion("score in", values, "score"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andScoreNotIn(List<BigDecimal> 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<Integer> values) { |
|||
addCriterion("is_score in", values, "isScore"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIsScoreNotIn(List<Integer> 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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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); |
|||
} |
|||
} |
|||
} |
@ -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(); |
|||
} |
|||
} |
@ -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<Criteria> oredCriteria; |
|||
|
|||
public MtScoreLogExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
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<Criteria> 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<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> 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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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<String> values) { |
|||
addCriterion("name in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotIn(List<String> 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<BigDecimal> values) { |
|||
addCriterion("max_score in", values, "maxScore"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMaxScoreNotIn(List<BigDecimal> 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<BigDecimal> values) { |
|||
addCriterion("min_score in", values, "minScore"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andMinScoreNotIn(List<BigDecimal> 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<Long> values) { |
|||
addCriterion("project_id in", values, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdNotIn(List<Long> 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<Integer> values) { |
|||
addCriterion("sequence in", values, "sequence"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSequenceNotIn(List<Integer> 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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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); |
|||
} |
|||
} |
|||
} |
@ -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(); |
|||
} |
|||
} |
@ -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<Criteria> oredCriteria; |
|||
|
|||
public MtSigninExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
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<Criteria> 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<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> 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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("user_id in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("task_id in", values, "taskId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTaskIdNotIn(List<Long> 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<String> values) { |
|||
addCriterion("name in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotIn(List<String> 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<String> values) { |
|||
addCriterion("phone in", values, "phone"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andPhoneNotIn(List<String> 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<String> values) { |
|||
addCriterion("company in", values, "company"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCompanyNotIn(List<String> 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<Long> values) { |
|||
addCriterion("signin_time in", values, "signinTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSigninTimeNotIn(List<Long> 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<Integer> values) { |
|||
addCriterion("sequence in", values, "sequence"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSequenceNotIn(List<Integer> 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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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); |
|||
} |
|||
} |
|||
} |
@ -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<BigDecimal> 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<JudgeScore> 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<player> 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<ScoreExcel> 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<Judge> 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;
|
|||
// }
|
|||
} |
@ -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; |
|||
} |
|||
} |
@ -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; |
|||
} |
|||
} |
@ -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<String> responseStringConverter() { |
|||
StringHttpMessageConverter converter = new StringHttpMessageConverter( |
|||
Charset.forName("UTF-8")); |
|||
return converter; |
|||
} |
|||
|
|||
@Bean |
|||
public HttpMessageConverter<Object> responseJsonConverter(){ |
|||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); |
|||
List<MediaType> 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<HttpMessageConverter<?>> 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)); |
|||
} |
|||
} |
@ -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<Parameter> setHeaderToken() { |
|||
ParameterBuilder tokenPar = new ParameterBuilder(); |
|||
List<Parameter> 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; |
|||
} |
|||
} |
@ -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; |
|||
} |
|||
} |
|||
|
|||
} |
@ -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{ |
|||
} |
@ -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); |
|||
} |
@ -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{ |
|||
} |
@ -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{ |
|||
} |
@ -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<MtJudge> 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); |
|||
} |
@ -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<MtScoreLog> 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); |
|||
} |
@ -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<MtScore> 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); |
|||
} |
@ -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<MtSignin> 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); |
|||
} |
@ -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; |
|||
} |
@ -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<ScoreVo.ScoreInfo> getScoreLog(Long userId, Long playerId); |
|||
|
|||
void submitScore(Long userId, ScoreDto.SubmitScore submitScore); |
|||
|
|||
List<ScoreVo.AdminScore> adminScore(Long userId, Long roleId, Long playerId); |
|||
|
|||
List<ScoreVo.RankingScore> getRanking(Long projectId); |
|||
|
|||
void showScore(Long projectId, Long playerId) throws Exception; |
|||
} |
@ -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); |
|||
} |
@ -0,0 +1,8 @@ |
|||
package com.ccsens.mt.service; |
|||
|
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
|
|||
public interface IUserService { |
|||
Long getUserIdByToken(HttpServletRequest request); |
|||
} |
@ -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)); |
|||
} |
|||
|
|||
} |
@ -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<ScoreVo.ScoreInfo> getScoreLog(Long userId, Long playerId) { |
|||
List<ScoreVo.ScoreInfo> 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<MemberVo.MemberInfo> 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<MtScoreLog> 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<MtScore> 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<MemberVo.MemberInfo> 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<MtScore> 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<ScoreVo.AdminScore> adminScore(Long userId, Long roleId, Long playerId) { |
|||
List<ScoreVo.AdminScore> 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<MtJudge> 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<ScoreVo.RankingScore> getRanking(Long projectId) { |
|||
//获取所有参赛任务
|
|||
Set<Long> taskIdList = new HashSet<>(); |
|||
MtScoreLogExample scoreLogExample = new MtScoreLogExample(); |
|||
scoreLogExample.createCriteria().andProjectIdEqualTo(projectId); |
|||
List<MtScoreLog> scoreLogList = scoreLogDao.selectByExample(scoreLogExample); |
|||
if(CollectionUtil.isNotEmpty(scoreLogList)){ |
|||
for(MtScoreLog scoreLog : scoreLogList){ |
|||
MtScoreExample scoreExample = new MtScoreExample(); |
|||
scoreExample.createCriteria().andScoreLogIdEqualTo(scoreLog.getId()); |
|||
List<MtScore> scoreList = scoreDao.selectByExample(scoreExample); |
|||
if(CollectionUtil.isNotEmpty(scoreList)){ |
|||
for(MtScore score : scoreList){ |
|||
taskIdList.add(score.getTaskId()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
//查找每个任务的分数
|
|||
List<ScoreVo.RankingScore> 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<ScoreVo.JudgeScore> 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<ScoreVo.JudgeScore> findJudgeScore(Long projectId, Long taskId) { |
|||
List<ScoreVo.JudgeScore> judgeScoreList = new ArrayList<>(); |
|||
ScoreVo.JudgeScore judgeScore = null; |
|||
//查找项目下所有评委
|
|||
MtJudgeExample judgeExample = new MtJudgeExample(); |
|||
judgeExample.createCriteria().andProjectIdEqualTo(projectId); |
|||
List<MtJudge> 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<SyncMessageWithShowDto.Data.Judge> 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<ScoreVo.JudgeScore> 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<BaseMessageDto.MessageUser> 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); |
|||
} |
|||
} |
@ -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<MtSignin> 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<MtSignin> 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<MtSignin> 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; |
|||
} |
|||
} |
@ -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; |
|||
} |
|||
} |
@ -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 |
|||
|
@ -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 |
|||
|
@ -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 |
@ -0,0 +1,4 @@ |
|||
spring: |
|||
profiles: |
|||
active: dev |
|||
include: common, util-dev |
@ -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 |
@ -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 |
@ -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 |
@ -0,0 +1,196 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 --> |
|||
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true --> |
|||
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 --> |
|||
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 --> |
|||
<configuration scan="true" scanPeriod="10 seconds"> |
|||
|
|||
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />--> |
|||
|
|||
<contextName>logback</contextName> |
|||
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 --> |
|||
<property name="log.path" value="/home/cloud/mt/log/" /> |
|||
|
|||
<!-- 彩色日志 --> |
|||
<!-- 彩色日志依赖的渲染类 --> |
|||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> |
|||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> |
|||
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> |
|||
<!-- 彩色日志格式 --> |
|||
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
|||
|
|||
|
|||
<!--输出到控制台--> |
|||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息--> |
|||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
|||
<level>info</level> |
|||
</filter> |
|||
<encoder> |
|||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> |
|||
<!-- 设置字符集 --> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
|
|||
<!--输出到文件--> |
|||
|
|||
<!-- 时间滚动输出 level为 DEBUG 日志 --> |
|||
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文件的路径及文件名 --> |
|||
<file>${log.path}/log_debug.log</file> |
|||
<!--日志文件输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 日志归档 --> |
|||
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文件保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文件只记录debug级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>debug</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 时间滚动输出 level为 INFO 日志 --> |
|||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文件的路径及文件名 --> |
|||
<file>${log.path}/log_info.log</file> |
|||
<!--日志文件输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 每天日志归档路径以及格式 --> |
|||
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文件保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文件只记录info级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>info</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 时间滚动输出 level为 WARN 日志 --> |
|||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文件的路径及文件名 --> |
|||
<file>${log.path}/log_warn.log</file> |
|||
<!--日志文件输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文件保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文件只记录warn级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>warn</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
|
|||
<!-- 时间滚动输出 level为 ERROR 日志 --> |
|||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文件的路径及文件名 --> |
|||
<file>${log.path}/log_error.log</file> |
|||
<!--日志文件输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文件保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文件只记录ERROR级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>ERROR</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- |
|||
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、 |
|||
以及指定<appender>。<logger>仅有一个name属性, |
|||
一个可选的level和一个可选的addtivity属性。 |
|||
name:用来指定受此logger约束的某一个包或者具体的某一个类。 |
|||
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
|||
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。 |
|||
如果未设置此属性,那么当前logger将会继承上级的级别。 |
|||
addtivity:是否向上级logger传递打印信息。默认是true。 |
|||
--> |
|||
<!--<logger name="org.springframework.web" level="info"/>--> |
|||
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>--> |
|||
<!-- |
|||
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作: |
|||
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息 |
|||
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别: |
|||
--> |
|||
|
|||
|
|||
<!-- |
|||
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性 |
|||
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
|||
不能设置为INHERITED或者同义词NULL。默认是DEBUG |
|||
可以包含零个或多个元素,标识这个appender将会添加到这个logger。 |
|||
--> |
|||
|
|||
<!--开发环境:打印控制台--> |
|||
<springProfile name="dev"> |
|||
<logger name="com.ccsens.ptpro.persist.*" level="debug"/> |
|||
</springProfile> |
|||
|
|||
<root level="info"> |
|||
<appender-ref ref="CONSOLE" /> |
|||
<appender-ref ref="DEBUG_FILE" /> |
|||
<appender-ref ref="INFO_FILE" /> |
|||
<appender-ref ref="WARN_FILE" /> |
|||
<appender-ref ref="ERROR_FILE" /> |
|||
</root> |
|||
|
|||
<!--生产环境:输出到文件--> |
|||
<!--<springProfile name="pro">--> |
|||
<!--<root level="info">--> |
|||
<!--<appender-ref ref="CONSOLE" />--> |
|||
<!--<appender-ref ref="DEBUG_FILE" />--> |
|||
<!--<appender-ref ref="INFO_FILE" />--> |
|||
<!--<appender-ref ref="ERROR_FILE" />--> |
|||
<!--<appender-ref ref="WARN_FILE" />--> |
|||
<!--</root>--> |
|||
<!--</springProfile>--> |
|||
|
|||
</configuration> |
@ -0,0 +1,50 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.mt.persist.dao.MtScoreDao"> |
|||
|
|||
|
|||
<select id="sumScoreByJudgeId" parameterType="java.util.Map" resultType="java.math.BigDecimal"> |
|||
SELECT |
|||
SUM(score) |
|||
FROM |
|||
`t_score` |
|||
WHERE |
|||
player_id=#{playerId} |
|||
AND |
|||
role_id = #{judgeId} |
|||
</select> |
|||
|
|||
<select id="sumScore" parameterType="java.util.Map" resultType="java.math.BigDecimal"> |
|||
SELECT |
|||
SUM(score) |
|||
FROM |
|||
`t_score` |
|||
WHERE |
|||
player_id=#{playerId} |
|||
</select> |
|||
|
|||
<select id="maxScore" parameterType="java.util.Map" resultType="com.ccsens.mt.bean.po.MtScore"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
`t_score` |
|||
WHERE |
|||
score = (SELECT MAX(score) FROM `t_score` WHERE player_id=#{playerId}) |
|||
AND |
|||
player_id=#{playerId} |
|||
LIMIT 0,1 |
|||
</select> |
|||
|
|||
<select id="minScore" parameterType="java.util.Map" resultType="com.ccsens.mt.bean.po.MtScore"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
`t_score` |
|||
WHERE |
|||
score = (SELECT MIN(score) FROM `t_score` WHERE player_id=#{playerId}) |
|||
AND |
|||
player_id=#{playerId} |
|||
LIMIT 0,1 |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,275 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.mt.persist.mapper.MtJudgeMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.MtJudge"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="project_id" jdbcType="BIGINT" property="projectId" /> |
|||
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|||
<result column="nickname" jdbcType="VARCHAR" property="nickname" /> |
|||
<result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl" /> |
|||
<result column="phone" jdbcType="VARCHAR" property="phone" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, project_id, user_id, nickname, avatar_url, phone, created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.MtJudgeExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_mt_judge |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_mt_judge |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_mt_judge |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.MtJudgeExample"> |
|||
delete from t_mt_judge |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.mt.bean.po.MtJudge"> |
|||
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> |
|||
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.MtJudge"> |
|||
insert into t_mt_judge |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="projectId != null"> |
|||
project_id, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id, |
|||
</if> |
|||
<if test="nickname != null"> |
|||
nickname, |
|||
</if> |
|||
<if test="avatarUrl != null"> |
|||
avatar_url, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="projectId != null"> |
|||
#{projectId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
#{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="nickname != null"> |
|||
#{nickname,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="avatarUrl != null"> |
|||
#{avatarUrl,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
#{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.mt.bean.po.MtJudgeExample" resultType="java.lang.Long"> |
|||
select count(*) from t_mt_judge |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_mt_judge |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.projectId != null"> |
|||
project_id = #{record.projectId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.userId != null"> |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.nickname != null"> |
|||
nickname = #{record.nickname,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.avatarUrl != null"> |
|||
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.phone != null"> |
|||
phone = #{record.phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
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} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.MtJudge"> |
|||
update t_mt_judge |
|||
<set> |
|||
<if test="projectId != null"> |
|||
project_id = #{projectId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="nickname != null"> |
|||
nickname = #{nickname,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="avatarUrl != null"> |
|||
avatar_url = #{avatarUrl,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone = #{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.MtJudge"> |
|||
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} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,275 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.mt.persist.mapper.MtScoreLogMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.MtScoreLog"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="max_score" jdbcType="DECIMAL" property="maxScore" /> |
|||
<result column="min_score" jdbcType="DECIMAL" property="minScore" /> |
|||
<result column="project_id" jdbcType="BIGINT" property="projectId" /> |
|||
<result column="sequence" jdbcType="INTEGER" property="sequence" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, name, max_score, min_score, project_id, sequence, created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.MtScoreLogExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_mt_score_log |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_mt_score_log |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_mt_score_log |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.MtScoreLogExample"> |
|||
delete from t_mt_score_log |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.mt.bean.po.MtScoreLog"> |
|||
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> |
|||
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.MtScoreLog"> |
|||
insert into t_mt_score_log |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="maxScore != null"> |
|||
max_score, |
|||
</if> |
|||
<if test="minScore != null"> |
|||
min_score, |
|||
</if> |
|||
<if test="projectId != null"> |
|||
project_id, |
|||
</if> |
|||
<if test="sequence != null"> |
|||
sequence, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="maxScore != null"> |
|||
#{maxScore,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="minScore != null"> |
|||
#{minScore,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="projectId != null"> |
|||
#{projectId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="sequence != null"> |
|||
#{sequence,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.mt.bean.po.MtScoreLogExample" resultType="java.lang.Long"> |
|||
select count(*) from t_mt_score_log |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_mt_score_log |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.maxScore != null"> |
|||
max_score = #{record.maxScore,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.minScore != null"> |
|||
min_score = #{record.minScore,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.projectId != null"> |
|||
project_id = #{record.projectId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.sequence != null"> |
|||
sequence = #{record.sequence,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
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} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.MtScoreLog"> |
|||
update t_mt_score_log |
|||
<set> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="maxScore != null"> |
|||
max_score = #{maxScore,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="minScore != null"> |
|||
min_score = #{minScore,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="projectId != null"> |
|||
project_id = #{projectId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="sequence != null"> |
|||
sequence = #{sequence,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.MtScoreLog"> |
|||
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} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,291 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.mt.persist.mapper.MtScoreMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.MtScore"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="judge_user_id" jdbcType="BIGINT" property="judgeUserId" /> |
|||
<result column="score_log_id" jdbcType="BIGINT" property="scoreLogId" /> |
|||
<result column="task_id" jdbcType="BIGINT" property="taskId" /> |
|||
<result column="task_name" jdbcType="VARCHAR" property="taskName" /> |
|||
<result column="score" jdbcType="DECIMAL" property="score" /> |
|||
<result column="is_score" jdbcType="INTEGER" property="isScore" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, judge_user_id, score_log_id, task_id, task_name, score, is_score, created_at, |
|||
updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.MtScoreExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_mt_score |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_mt_score |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_mt_score |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.MtScoreExample"> |
|||
delete from t_mt_score |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.mt.bean.po.MtScore"> |
|||
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> |
|||
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.MtScore"> |
|||
insert into t_mt_score |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="judgeUserId != null"> |
|||
judge_user_id, |
|||
</if> |
|||
<if test="scoreLogId != null"> |
|||
score_log_id, |
|||
</if> |
|||
<if test="taskId != null"> |
|||
task_id, |
|||
</if> |
|||
<if test="taskName != null"> |
|||
task_name, |
|||
</if> |
|||
<if test="score != null"> |
|||
score, |
|||
</if> |
|||
<if test="isScore != null"> |
|||
is_score, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="judgeUserId != null"> |
|||
#{judgeUserId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="scoreLogId != null"> |
|||
#{scoreLogId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="taskId != null"> |
|||
#{taskId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="taskName != null"> |
|||
#{taskName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="score != null"> |
|||
#{score,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="isScore != null"> |
|||
#{isScore,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.mt.bean.po.MtScoreExample" resultType="java.lang.Long"> |
|||
select count(*) from t_mt_score |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_mt_score |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.judgeUserId != null"> |
|||
judge_user_id = #{record.judgeUserId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.scoreLogId != null"> |
|||
score_log_id = #{record.scoreLogId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.taskId != null"> |
|||
task_id = #{record.taskId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.taskName != null"> |
|||
task_name = #{record.taskName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.score != null"> |
|||
score = #{record.score,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="record.isScore != null"> |
|||
is_score = #{record.isScore,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
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} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.MtScore"> |
|||
update t_mt_score |
|||
<set> |
|||
<if test="judgeUserId != null"> |
|||
judge_user_id = #{judgeUserId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="scoreLogId != null"> |
|||
score_log_id = #{scoreLogId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="taskId != null"> |
|||
task_id = #{taskId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="taskName != null"> |
|||
task_name = #{taskName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="score != null"> |
|||
score = #{score,jdbcType=DECIMAL}, |
|||
</if> |
|||
<if test="isScore != null"> |
|||
is_score = #{isScore,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.MtScore"> |
|||
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} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,306 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.mt.persist.mapper.MtSigninMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.MtSignin"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|||
<result column="task_id" jdbcType="BIGINT" property="taskId" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="phone" jdbcType="VARCHAR" property="phone" /> |
|||
<result column="company" jdbcType="VARCHAR" property="company" /> |
|||
<result column="signin_time" jdbcType="BIGINT" property="signinTime" /> |
|||
<result column="sequence" jdbcType="INTEGER" property="sequence" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, user_id, task_id, name, phone, company, signin_time, sequence, created_at, updated_at, |
|||
rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.MtSigninExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_mt_signin |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_mt_signin |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_mt_signin |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.MtSigninExample"> |
|||
delete from t_mt_signin |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.mt.bean.po.MtSignin"> |
|||
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> |
|||
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.MtSignin"> |
|||
insert into t_mt_signin |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id, |
|||
</if> |
|||
<if test="taskId != null"> |
|||
task_id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone, |
|||
</if> |
|||
<if test="company != null"> |
|||
company, |
|||
</if> |
|||
<if test="signinTime != null"> |
|||
signin_time, |
|||
</if> |
|||
<if test="sequence != null"> |
|||
sequence, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
#{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="taskId != null"> |
|||
#{taskId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
#{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="company != null"> |
|||
#{company,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="signinTime != null"> |
|||
#{signinTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="sequence != null"> |
|||
#{sequence,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.mt.bean.po.MtSigninExample" resultType="java.lang.Long"> |
|||
select count(*) from t_mt_signin |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_mt_signin |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.userId != null"> |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.taskId != null"> |
|||
task_id = #{record.taskId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.phone != null"> |
|||
phone = #{record.phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.company != null"> |
|||
company = #{record.company,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.signinTime != null"> |
|||
signin_time = #{record.signinTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.sequence != null"> |
|||
sequence = #{record.sequence,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
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} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.MtSignin"> |
|||
update t_mt_signin |
|||
<set> |
|||
<if test="userId != null"> |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="taskId != null"> |
|||
task_id = #{taskId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone = #{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="company != null"> |
|||
company = #{company,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="signinTime != null"> |
|||
signin_time = #{signinTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="sequence != null"> |
|||
sequence = #{sequence,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.MtSignin"> |
|||
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} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,61 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE configuration |
|||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-config.dtd"> |
|||
|
|||
<configuration> |
|||
<!-- 全局参数 --> |
|||
<settings> |
|||
<!-- 打印SQL语句 --> |
|||
<setting name="logImpl" value="STDOUT_LOGGING" /> |
|||
<!-- 使全局的映射器启用或禁用缓存。 --> |
|||
<setting name="cacheEnabled" value="true"/> |
|||
<!-- 全局启用或禁用延迟加载。当禁用时,所有关联对象都会即时加载。 --> |
|||
<setting name="lazyLoadingEnabled" value="true"/> |
|||
<!-- 当启用时,有延迟加载属性的对象在被调用时将会完全加载任意属性。否则,每种属性将会按需要加载。 --> |
|||
<setting name="aggressiveLazyLoading" value="true"/> |
|||
<!-- 是否允许单条sql 返回多个数据集 (取决于驱动的兼容性) default:true --> |
|||
<setting name="multipleResultSetsEnabled" value="true"/> |
|||
<!-- 是否可以使用列的别名 (取决于驱动的兼容性) default:true --> |
|||
<setting name="useColumnLabel" value="true"/> |
|||
<!-- 允许JDBC 生成主键。需要驱动器支持。如果设为了true,这个设置将强制使用被生成的主键,有一些驱动器不兼容不过仍然可以执行。 default:false --> |
|||
<setting name="useGeneratedKeys" value="true"/> |
|||
<!-- 指定 MyBatis 如何自动映射 数据基表的列 NONE:不隐射 PARTIAL:部分 FULL:全部 --> |
|||
<setting name="autoMappingBehavior" value="PARTIAL"/> |
|||
<!-- 这是默认的执行类型 (SIMPLE: 简单; REUSE: 执行器可能重复使用prepared statements语句;BATCH: 执行器可以重复执行语句和批量更新) --> |
|||
<setting name="defaultExecutorType" value="SIMPLE"/> |
|||
<!-- 使用驼峰命名法转换字段。 --> |
|||
<setting name="mapUnderscoreToCamelCase" value="true"/> |
|||
<!-- 设置本地缓存范围 session:就会有数据的共享 statement:语句范围 (这样就不会有数据的共享 ) defalut:session --> |
|||
<setting name="localCacheScope" value="SESSION"/> |
|||
<!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER,插入空值时不需要指定类型 --> |
|||
<setting name="jdbcTypeForNull" value="NULL"/> |
|||
</settings> |
|||
|
|||
<typeAliases> |
|||
<typeAlias alias="Integer" type="java.lang.Integer" /> |
|||
<typeAlias alias="Long" type="java.lang.Long" /> |
|||
<typeAlias alias="HashMap" type="java.util.HashMap" /> |
|||
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap" /> |
|||
<typeAlias alias="ArrayList" type="java.util.ArrayList" /> |
|||
<typeAlias alias="LinkedList" type="java.util.LinkedList" /> |
|||
</typeAliases> |
|||
|
|||
<plugins> |
|||
<!-- com.github.pagehelper为PageHelper类所在包名 --> |
|||
<plugin interceptor="com.github.pagehelper.PageHelper"> |
|||
<property name="dialect" value="mysql"/> |
|||
<!-- 该参数默认为false --> |
|||
<!-- 设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用 --> |
|||
<!-- 和startPage中的pageNum效果一样--> |
|||
<property name="offsetAsPageNum" value="false"/> |
|||
<!-- 该参数默认为false --> |
|||
<!-- 设置为true时,使用RowBounds分页会进行count查询 --> |
|||
<property name="rowBoundsWithCount" value="false"/> |
|||
<property name="pageSizeZero" value="true"/> |
|||
<property name="reasonable" value="false"/> |
|||
<property name="supportMethodsArguments" value="false"/> |
|||
<property name="returnPageInfo" value="none"/> |
|||
</plugin> |
|||
</plugins> |
|||
</configuration> |
File diff suppressed because it is too large
@ -1,8 +0,0 @@ |
|||
package com.ccsens.tall.service; |
|||
|
|||
import com.ccsens.tall.bean.vo.ProjectVo; |
|||
|
|||
public interface IExcelMtService { |
|||
ProjectVo.ProjectInfo readXls(String path, Long currentUserId) throws Exception; |
|||
|
|||
} |
Loading…
Reference in new issue