Browse Source

Merge branch 'pt' of https://gitee.com/ccsens_s/ccsenscloud into pt

tiaosheng
zhizhi wu 5 years ago
parent
commit
eb9d740986
  1. 2
      ct/src/main/java/com/ccsens/ct/config/SpringConfig.java
  2. 2
      game/src/main/java/com/ccsens/game/config/SpringConfig.java
  3. 26
      game/src/main/java/com/ccsens/game/service/ScreenService.java
  4. 2
      health/src/main/java/com/ccsens/health/config/SpringConfig.java
  5. 2
      mt/src/main/java/com/ccsens/mt/api/FileController.java
  6. 51
      mt/src/main/java/com/ccsens/mt/api/LevelController.java
  7. 90
      mt/src/main/java/com/ccsens/mt/bean/dto/LevelDto.java
  8. 139
      mt/src/main/java/com/ccsens/mt/bean/po/LevelRule.java
  9. 881
      mt/src/main/java/com/ccsens/mt/bean/po/LevelRuleExample.java
  10. 139
      mt/src/main/java/com/ccsens/mt/bean/po/LevelUp.java
  11. 871
      mt/src/main/java/com/ccsens/mt/bean/po/LevelUpExample.java
  12. 106
      mt/src/main/java/com/ccsens/mt/bean/po/LevelUser.java
  13. 701
      mt/src/main/java/com/ccsens/mt/bean/po/LevelUserExample.java
  14. 17
      mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java
  15. 23
      mt/src/main/java/com/ccsens/mt/bean/vo/LevelVo.java
  16. 2
      mt/src/main/java/com/ccsens/mt/config/SpringConfig.java
  17. 103
      mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java
  18. 19
      mt/src/main/java/com/ccsens/mt/persist/dao/LevelUpDao.java
  19. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/LevelRuleMapper.java
  20. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUpMapper.java
  21. 30
      mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUserMapper.java
  22. 17
      mt/src/main/java/com/ccsens/mt/service/CompeteService.java
  23. 4
      mt/src/main/java/com/ccsens/mt/service/FileService.java
  24. 44
      mt/src/main/java/com/ccsens/mt/service/ILevelUpService.java
  25. 159
      mt/src/main/java/com/ccsens/mt/service/LevelUpService.java
  26. 16
      mt/src/main/java/com/ccsens/mt/util/Constant.java
  27. 4
      mt/src/main/resources/application-dev.yml
  28. 4
      mt/src/main/resources/application-prod.yml
  29. 4
      mt/src/main/resources/application-test.yml
  30. 12
      mt/src/main/resources/mapper_dao/CompetePlayerDao.xml
  31. 2
      mt/src/main/resources/mapper_dao/CompeteTeamDao.xml
  32. 9
      mt/src/main/resources/mapper_dao/LevelUpDao.xml
  33. 306
      mt/src/main/resources/mapper_raw/LevelRuleMapper.xml
  34. 306
      mt/src/main/resources/mapper_raw/LevelUpMapper.xml
  35. 258
      mt/src/main/resources/mapper_raw/LevelUserMapper.xml
  36. 2
      pims/src/main/java/com/ccsens/pims/config/SpringConfig.java
  37. 11
      tall/src/main/java/com/ccsens/tall/bean/po/SysDomain.java
  38. 70
      tall/src/main/java/com/ccsens/tall/bean/po/SysDomainExample.java
  39. 103
      tall/src/main/java/com/ccsens/tall/intercept/MybatisInterceptor.java
  40. 6
      tall/src/main/java/com/ccsens/tall/scheduled/ScheduledService.java
  41. 8
      tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java
  42. 52
      tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java
  43. 8
      tall/src/main/java/com/ccsens/tall/service/WpsService.java
  44. 8
      tall/src/main/java/com/ccsens/tall/web/DebugController.java
  45. 11
      tall/src/main/java/com/ccsens/tall/web/WpsController.java
  46. 40
      tall/src/main/resources/mapper_raw/SysDomainMapper.xml
  47. 2
      util/src/main/java/com/ccsens/util/CodeEnum.java
  48. 8
      util/src/main/java/com/ccsens/util/WebConstant.java
  49. 14
      util/src/main/java/com/ccsens/util/WpsSignature.java
  50. 3
      util/src/test/java/com/ccsens/util/Base64Test.java
  51. 6
      util/src/test/java/com/ccsens/util/TestQrCord.java

2
ct/src/main/java/com/ccsens/ct/config/SpringConfig.java

@ -111,7 +111,7 @@ public class SpringConfig implements WebMvcConfigurer {
.addResourceLocations("classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:///home/cloud/tall/uploads/");
.addResourceLocations("file:///home/cloud/ct/uploads/");
//super.addResourceHandlers(registry);
}

2
game/src/main/java/com/ccsens/game/config/SpringConfig.java

@ -116,7 +116,7 @@ public class SpringConfig implements WebMvcConfigurer {
.addResourceLocations("classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:///home/cloud/tall/uploads/");
.addResourceLocations("file:///home/cloud/game/uploads/");
//super.addResourceHandlers(registry);
}

26
game/src/main/java/com/ccsens/game/service/ScreenService.java

@ -102,6 +102,17 @@ public class ScreenService implements IScreenService {
if (ObjectUtil.isNotNull(memberGame.getTaskId())) {
selectOldRecord(memberGame.getTaskId());
}
//验证购买时间是否到期
if (gameUserPay.getDueTime() < System.currentTimeMillis()) {
throw new BaseException(CodeEnum.GAME_TIME_DUE);
}
//验证游戏次数
if (gameUserPay.getUsedCount() >= gameUserPay.getTotalCount()) {
throw new BaseException(CodeEnum.GAME_NOT_TIMES);
}
//修改购买的游戏的使用次数
gameUserPay.setUsedCount(gameUserPay.getUsedCount() + 1);
gameUserPayDao.updateByPrimaryKeySelective(gameUserPay);
//3、根据用户购买的记录,添加一场新的游戏记录
GameRecord gameRecord = new GameRecord();
@ -321,7 +332,8 @@ public class ScreenService implements IScreenService {
gameUserPay.setTotalCount(10);
gameUserPay.setUsedCount(0);
gameUserPay.setCreatedTime(System.currentTimeMillis());
gameUserPay.setDueTime(gameUserPay.getCreatedTime() + (3600 * 24 * 30));
// gameUserPay.setDueTime(gameUserPay.getCreatedTime() + (3600 * 24 * 30));
gameUserPay.setDueTime(gameUserPay.getCreatedTime() + (3600 * 24 * 7));
gameUserPayDao.insertSelective(gameUserPay);
}
return gameUserPay;
@ -952,10 +964,14 @@ public class ScreenService implements IScreenService {
if (ObjectUtil.isNull(gameType)) {
throw new BaseException(CodeEnum.NOT_GAME_TYPE);
}
// if (gameUserPay.getUsedCount() >= gameUserPay.getTotalCount()) {
// throw new BaseException(CodeEnum.GAME_NOT_TIMES);
// }
//验证购买时间是否到期
if (gameUserPay.getDueTime() < System.currentTimeMillis()) {
throw new BaseException(CodeEnum.GAME_TIME_DUE);
}
//验证游戏可玩次数
if (gameUserPay.getUsedCount() >= gameUserPay.getTotalCount()) {
throw new BaseException(CodeEnum.GAME_NOT_TIMES);
}
//之前的游戏若是准备中或进行中,则返回提示
if(gameRecord.getGameStatus() == GameConstant.GAME_PREPARATION ||
gameRecord.getGameStatus() == GameConstant.GAME_PROCESSING){

2
health/src/main/java/com/ccsens/health/config/SpringConfig.java

@ -111,7 +111,7 @@ public class SpringConfig implements WebMvcConfigurer {
.addResourceLocations("classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:///home/cloud/tall/uploads/");
.addResourceLocations("file:///home/cloud/health/uploads/");
//super.addResourceHandlers(registry);
}

2
mt/src/main/java/com/ccsens/mt/api/FileController.java

@ -38,7 +38,7 @@ public class FileController {
private TallFeignClient tallFeignClient;
@ApiOperation(value = "上传交付物文件")
@ApiOperation(value = "上传文件")
@ApiImplicitParams({
})
@RequestMapping(value = "upload", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})

51
mt/src/main/java/com/ccsens/mt/api/LevelController.java

@ -0,0 +1,51 @@
package com.ccsens.mt.api;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.mt.bean.dto.LevelDto;
import com.ccsens.mt.bean.vo.LevelVo;
import com.ccsens.mt.service.ILevelUpService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author
*/
@Slf4j
@Api(tags = "线上体育竞技比赛", description = "")
@RestController
@RequestMapping("/level")
public class LevelController {
@Resource
private ILevelUpService levelUpService;
@MustLogin
@ApiOperation(value = "手动晋级", notes = "")
@RequestMapping(value = "/manual", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse manualLevelUpPlayer(@ApiParam @Validated @RequestBody QueryDto<LevelDto.ManualLevelUpDto> params) {
log.info("手动晋级:{}",params);
levelUpService.manualLevelUpPlayer(params);
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "查找晋级选手信息", notes = "")
@RequestMapping(value = "/userInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<LevelVo.QueryLevelUserInfo>> queryLevelUserInfo(@ApiParam @Validated @RequestBody QueryDto<LevelDto.ManualLevelUpDto> params) {
log.info("手动晋级:{}",params);
List<LevelVo.QueryLevelUserInfo> levelUserInfoList = levelUpService.queryLevelUserInfo(params);
return JsonResponse.newInstance().ok(levelUserInfoList);
}
}

90
mt/src/main/java/com/ccsens/mt/bean/dto/LevelDto.java

@ -0,0 +1,90 @@
package com.ccsens.mt.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author
*/
@Data
public class LevelDto {
@Data
@ApiModel("添加选手信息")
public static class LevelUserDto{
@ApiModelProperty("报名比赛的选手的id")
private Long playerId;
@ApiModelProperty("头像")
private String avatarUrl;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("团队id")
private Long teamId;
}
@Data
@ApiModel("添加晋级表信息")
public static class LevelUpDto{
@ApiModelProperty("大赛id")
private Long competeTimeId;
@ApiModelProperty("比赛code")
private String competeCode;
@ApiModelProperty("选手id")
private Long playerId;
@ApiModelProperty("分数")
private int score;
@ApiModelProperty("附加分数")
private int additionScore;
@ApiModelProperty("名次")
private int ranking;
}
@Data
@ApiModel("自动晋级")
public static class AutoLevelUpDto{
@ApiModelProperty("大赛id")
private Long competeTimeId;
@ApiModelProperty("比赛code")
private String competeCode;
}
@Data
@ApiModel("手动晋级")
public static class ManualLevelUpDto{
@ApiModelProperty("大赛id")
private Long competeTimeId;
@ApiModelProperty("比赛code")
private String competeCode;
@ApiModelProperty("手动晋级的选手信息")
private List<ManualLevelUpPlayer> manualLevelUpPlayers;
}
@Data
@ApiModel("手动晋级的选手信息")
public static class ManualLevelUpPlayer{
@ApiModelProperty("选手id")
private Long playerId;
// @ApiModelProperty("分数")
// private int score;
// @ApiModelProperty("附加分数")
// private int additionScore;
// @ApiModelProperty("名次")
// private int ranking;
}
@Data
@ApiModel("查询晋级信息")
public static class QueryLevelUserInfo{
@ApiModelProperty("大赛id")
private Long competeTimeId;
@ApiModelProperty("比赛code")
private String competeCode;
@ApiModelProperty("页码 -1表示不分页 默认-1")
private int page = -1;
@ApiModelProperty("每页数量 默认10")
private int pageSize = 10;
}
}

139
mt/src/main/java/com/ccsens/mt/bean/po/LevelRule.java

@ -0,0 +1,139 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.util.Date;
public class LevelRule implements Serializable {
private Long id;
private Long competeTimeId;
private String competeCodeNow;
private String competeCodeLevelUp;
private Byte rule;
private Integer levelCondition;
private Byte autoLevel;
private Byte competeOrder;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompeteTimeId() {
return competeTimeId;
}
public void setCompeteTimeId(Long competeTimeId) {
this.competeTimeId = competeTimeId;
}
public String getCompeteCodeNow() {
return competeCodeNow;
}
public void setCompeteCodeNow(String competeCodeNow) {
this.competeCodeNow = competeCodeNow == null ? null : competeCodeNow.trim();
}
public String getCompeteCodeLevelUp() {
return competeCodeLevelUp;
}
public void setCompeteCodeLevelUp(String competeCodeLevelUp) {
this.competeCodeLevelUp = competeCodeLevelUp == null ? null : competeCodeLevelUp.trim();
}
public Byte getRule() {
return rule;
}
public void setRule(Byte rule) {
this.rule = rule;
}
public Integer getLevelCondition() {
return levelCondition;
}
public void setLevelCondition(Integer levelCondition) {
this.levelCondition = levelCondition;
}
public Byte getAutoLevel() {
return autoLevel;
}
public void setAutoLevel(Byte autoLevel) {
this.autoLevel = autoLevel;
}
public Byte getCompeteOrder() {
return competeOrder;
}
public void setCompeteOrder(Byte competeOrder) {
this.competeOrder = competeOrder;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", competeTimeId=").append(competeTimeId);
sb.append(", competeCodeNow=").append(competeCodeNow);
sb.append(", competeCodeLevelUp=").append(competeCodeLevelUp);
sb.append(", rule=").append(rule);
sb.append(", levelCondition=").append(levelCondition);
sb.append(", autoLevel=").append(autoLevel);
sb.append(", competeOrder=").append(competeOrder);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

881
mt/src/main/java/com/ccsens/mt/bean/po/LevelRuleExample.java

@ -0,0 +1,881 @@
package com.ccsens.mt.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LevelRuleExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public LevelRuleExample() {
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 andCompeteTimeIdIsNull() {
addCriterion("compete_time_id is null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNotNull() {
addCriterion("compete_time_id is not null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdEqualTo(Long value) {
addCriterion("compete_time_id =", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotEqualTo(Long value) {
addCriterion("compete_time_id <>", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThan(Long value) {
addCriterion("compete_time_id >", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) {
addCriterion("compete_time_id >=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThan(Long value) {
addCriterion("compete_time_id <", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) {
addCriterion("compete_time_id <=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIn(List<Long> values) {
addCriterion("compete_time_id in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotIn(List<Long> values) {
addCriterion("compete_time_id not in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdBetween(Long value1, Long value2) {
addCriterion("compete_time_id between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) {
addCriterion("compete_time_id not between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteCodeNowIsNull() {
addCriterion("compete_code_now is null");
return (Criteria) this;
}
public Criteria andCompeteCodeNowIsNotNull() {
addCriterion("compete_code_now is not null");
return (Criteria) this;
}
public Criteria andCompeteCodeNowEqualTo(String value) {
addCriterion("compete_code_now =", value, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowNotEqualTo(String value) {
addCriterion("compete_code_now <>", value, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowGreaterThan(String value) {
addCriterion("compete_code_now >", value, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowGreaterThanOrEqualTo(String value) {
addCriterion("compete_code_now >=", value, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowLessThan(String value) {
addCriterion("compete_code_now <", value, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowLessThanOrEqualTo(String value) {
addCriterion("compete_code_now <=", value, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowLike(String value) {
addCriterion("compete_code_now like", value, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowNotLike(String value) {
addCriterion("compete_code_now not like", value, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowIn(List<String> values) {
addCriterion("compete_code_now in", values, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowNotIn(List<String> values) {
addCriterion("compete_code_now not in", values, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowBetween(String value1, String value2) {
addCriterion("compete_code_now between", value1, value2, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeNowNotBetween(String value1, String value2) {
addCriterion("compete_code_now not between", value1, value2, "competeCodeNow");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpIsNull() {
addCriterion("compete_code_level_up is null");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpIsNotNull() {
addCriterion("compete_code_level_up is not null");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpEqualTo(String value) {
addCriterion("compete_code_level_up =", value, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpNotEqualTo(String value) {
addCriterion("compete_code_level_up <>", value, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpGreaterThan(String value) {
addCriterion("compete_code_level_up >", value, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpGreaterThanOrEqualTo(String value) {
addCriterion("compete_code_level_up >=", value, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpLessThan(String value) {
addCriterion("compete_code_level_up <", value, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpLessThanOrEqualTo(String value) {
addCriterion("compete_code_level_up <=", value, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpLike(String value) {
addCriterion("compete_code_level_up like", value, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpNotLike(String value) {
addCriterion("compete_code_level_up not like", value, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpIn(List<String> values) {
addCriterion("compete_code_level_up in", values, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpNotIn(List<String> values) {
addCriterion("compete_code_level_up not in", values, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpBetween(String value1, String value2) {
addCriterion("compete_code_level_up between", value1, value2, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andCompeteCodeLevelUpNotBetween(String value1, String value2) {
addCriterion("compete_code_level_up not between", value1, value2, "competeCodeLevelUp");
return (Criteria) this;
}
public Criteria andRuleIsNull() {
addCriterion("rule is null");
return (Criteria) this;
}
public Criteria andRuleIsNotNull() {
addCriterion("rule is not null");
return (Criteria) this;
}
public Criteria andRuleEqualTo(Byte value) {
addCriterion("rule =", value, "rule");
return (Criteria) this;
}
public Criteria andRuleNotEqualTo(Byte value) {
addCriterion("rule <>", value, "rule");
return (Criteria) this;
}
public Criteria andRuleGreaterThan(Byte value) {
addCriterion("rule >", value, "rule");
return (Criteria) this;
}
public Criteria andRuleGreaterThanOrEqualTo(Byte value) {
addCriterion("rule >=", value, "rule");
return (Criteria) this;
}
public Criteria andRuleLessThan(Byte value) {
addCriterion("rule <", value, "rule");
return (Criteria) this;
}
public Criteria andRuleLessThanOrEqualTo(Byte value) {
addCriterion("rule <=", value, "rule");
return (Criteria) this;
}
public Criteria andRuleIn(List<Byte> values) {
addCriterion("rule in", values, "rule");
return (Criteria) this;
}
public Criteria andRuleNotIn(List<Byte> values) {
addCriterion("rule not in", values, "rule");
return (Criteria) this;
}
public Criteria andRuleBetween(Byte value1, Byte value2) {
addCriterion("rule between", value1, value2, "rule");
return (Criteria) this;
}
public Criteria andRuleNotBetween(Byte value1, Byte value2) {
addCriterion("rule not between", value1, value2, "rule");
return (Criteria) this;
}
public Criteria andLevelConditionIsNull() {
addCriterion("level_condition is null");
return (Criteria) this;
}
public Criteria andLevelConditionIsNotNull() {
addCriterion("level_condition is not null");
return (Criteria) this;
}
public Criteria andLevelConditionEqualTo(Integer value) {
addCriterion("level_condition =", value, "levelCondition");
return (Criteria) this;
}
public Criteria andLevelConditionNotEqualTo(Integer value) {
addCriterion("level_condition <>", value, "levelCondition");
return (Criteria) this;
}
public Criteria andLevelConditionGreaterThan(Integer value) {
addCriterion("level_condition >", value, "levelCondition");
return (Criteria) this;
}
public Criteria andLevelConditionGreaterThanOrEqualTo(Integer value) {
addCriterion("level_condition >=", value, "levelCondition");
return (Criteria) this;
}
public Criteria andLevelConditionLessThan(Integer value) {
addCriterion("level_condition <", value, "levelCondition");
return (Criteria) this;
}
public Criteria andLevelConditionLessThanOrEqualTo(Integer value) {
addCriterion("level_condition <=", value, "levelCondition");
return (Criteria) this;
}
public Criteria andLevelConditionIn(List<Integer> values) {
addCriterion("level_condition in", values, "levelCondition");
return (Criteria) this;
}
public Criteria andLevelConditionNotIn(List<Integer> values) {
addCriterion("level_condition not in", values, "levelCondition");
return (Criteria) this;
}
public Criteria andLevelConditionBetween(Integer value1, Integer value2) {
addCriterion("level_condition between", value1, value2, "levelCondition");
return (Criteria) this;
}
public Criteria andLevelConditionNotBetween(Integer value1, Integer value2) {
addCriterion("level_condition not between", value1, value2, "levelCondition");
return (Criteria) this;
}
public Criteria andAutoLevelIsNull() {
addCriterion("auto_level is null");
return (Criteria) this;
}
public Criteria andAutoLevelIsNotNull() {
addCriterion("auto_level is not null");
return (Criteria) this;
}
public Criteria andAutoLevelEqualTo(Byte value) {
addCriterion("auto_level =", value, "autoLevel");
return (Criteria) this;
}
public Criteria andAutoLevelNotEqualTo(Byte value) {
addCriterion("auto_level <>", value, "autoLevel");
return (Criteria) this;
}
public Criteria andAutoLevelGreaterThan(Byte value) {
addCriterion("auto_level >", value, "autoLevel");
return (Criteria) this;
}
public Criteria andAutoLevelGreaterThanOrEqualTo(Byte value) {
addCriterion("auto_level >=", value, "autoLevel");
return (Criteria) this;
}
public Criteria andAutoLevelLessThan(Byte value) {
addCriterion("auto_level <", value, "autoLevel");
return (Criteria) this;
}
public Criteria andAutoLevelLessThanOrEqualTo(Byte value) {
addCriterion("auto_level <=", value, "autoLevel");
return (Criteria) this;
}
public Criteria andAutoLevelIn(List<Byte> values) {
addCriterion("auto_level in", values, "autoLevel");
return (Criteria) this;
}
public Criteria andAutoLevelNotIn(List<Byte> values) {
addCriterion("auto_level not in", values, "autoLevel");
return (Criteria) this;
}
public Criteria andAutoLevelBetween(Byte value1, Byte value2) {
addCriterion("auto_level between", value1, value2, "autoLevel");
return (Criteria) this;
}
public Criteria andAutoLevelNotBetween(Byte value1, Byte value2) {
addCriterion("auto_level not between", value1, value2, "autoLevel");
return (Criteria) this;
}
public Criteria andCompeteOrderIsNull() {
addCriterion("compete_order is null");
return (Criteria) this;
}
public Criteria andCompeteOrderIsNotNull() {
addCriterion("compete_order is not null");
return (Criteria) this;
}
public Criteria andCompeteOrderEqualTo(Byte value) {
addCriterion("compete_order =", value, "competeOrder");
return (Criteria) this;
}
public Criteria andCompeteOrderNotEqualTo(Byte value) {
addCriterion("compete_order <>", value, "competeOrder");
return (Criteria) this;
}
public Criteria andCompeteOrderGreaterThan(Byte value) {
addCriterion("compete_order >", value, "competeOrder");
return (Criteria) this;
}
public Criteria andCompeteOrderGreaterThanOrEqualTo(Byte value) {
addCriterion("compete_order >=", value, "competeOrder");
return (Criteria) this;
}
public Criteria andCompeteOrderLessThan(Byte value) {
addCriterion("compete_order <", value, "competeOrder");
return (Criteria) this;
}
public Criteria andCompeteOrderLessThanOrEqualTo(Byte value) {
addCriterion("compete_order <=", value, "competeOrder");
return (Criteria) this;
}
public Criteria andCompeteOrderIn(List<Byte> values) {
addCriterion("compete_order in", values, "competeOrder");
return (Criteria) this;
}
public Criteria andCompeteOrderNotIn(List<Byte> values) {
addCriterion("compete_order not in", values, "competeOrder");
return (Criteria) this;
}
public Criteria andCompeteOrderBetween(Byte value1, Byte value2) {
addCriterion("compete_order between", value1, value2, "competeOrder");
return (Criteria) this;
}
public Criteria andCompeteOrderNotBetween(Byte value1, Byte value2) {
addCriterion("compete_order not between", value1, value2, "competeOrder");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<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);
}
}
}

139
mt/src/main/java/com/ccsens/mt/bean/po/LevelUp.java

@ -0,0 +1,139 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.util.Date;
public class LevelUp implements Serializable {
private Long id;
private Long competeTimeId;
private String competeCode;
private Long levelUserId;
private Integer score;
private Integer additionScore;
private Integer ranking;
private Byte levelUpType;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompeteTimeId() {
return competeTimeId;
}
public void setCompeteTimeId(Long competeTimeId) {
this.competeTimeId = competeTimeId;
}
public String getCompeteCode() {
return competeCode;
}
public void setCompeteCode(String competeCode) {
this.competeCode = competeCode == null ? null : competeCode.trim();
}
public Long getLevelUserId() {
return levelUserId;
}
public void setLevelUserId(Long levelUserId) {
this.levelUserId = levelUserId;
}
public Integer getScore() {
return score;
}
public void setScore(Integer score) {
this.score = score;
}
public Integer getAdditionScore() {
return additionScore;
}
public void setAdditionScore(Integer additionScore) {
this.additionScore = additionScore;
}
public Integer getRanking() {
return ranking;
}
public void setRanking(Integer ranking) {
this.ranking = ranking;
}
public Byte getLevelUpType() {
return levelUpType;
}
public void setLevelUpType(Byte levelUpType) {
this.levelUpType = levelUpType;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", competeTimeId=").append(competeTimeId);
sb.append(", competeCode=").append(competeCode);
sb.append(", levelUserId=").append(levelUserId);
sb.append(", score=").append(score);
sb.append(", additionScore=").append(additionScore);
sb.append(", ranking=").append(ranking);
sb.append(", levelUpType=").append(levelUpType);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

871
mt/src/main/java/com/ccsens/mt/bean/po/LevelUpExample.java

@ -0,0 +1,871 @@
package com.ccsens.mt.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LevelUpExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public LevelUpExample() {
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 andCompeteTimeIdIsNull() {
addCriterion("compete_time_id is null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIsNotNull() {
addCriterion("compete_time_id is not null");
return (Criteria) this;
}
public Criteria andCompeteTimeIdEqualTo(Long value) {
addCriterion("compete_time_id =", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotEqualTo(Long value) {
addCriterion("compete_time_id <>", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThan(Long value) {
addCriterion("compete_time_id >", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdGreaterThanOrEqualTo(Long value) {
addCriterion("compete_time_id >=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThan(Long value) {
addCriterion("compete_time_id <", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdLessThanOrEqualTo(Long value) {
addCriterion("compete_time_id <=", value, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdIn(List<Long> values) {
addCriterion("compete_time_id in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotIn(List<Long> values) {
addCriterion("compete_time_id not in", values, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdBetween(Long value1, Long value2) {
addCriterion("compete_time_id between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteTimeIdNotBetween(Long value1, Long value2) {
addCriterion("compete_time_id not between", value1, value2, "competeTimeId");
return (Criteria) this;
}
public Criteria andCompeteCodeIsNull() {
addCriterion("compete_code is null");
return (Criteria) this;
}
public Criteria andCompeteCodeIsNotNull() {
addCriterion("compete_code is not null");
return (Criteria) this;
}
public Criteria andCompeteCodeEqualTo(String value) {
addCriterion("compete_code =", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeNotEqualTo(String value) {
addCriterion("compete_code <>", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeGreaterThan(String value) {
addCriterion("compete_code >", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeGreaterThanOrEqualTo(String value) {
addCriterion("compete_code >=", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeLessThan(String value) {
addCriterion("compete_code <", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeLessThanOrEqualTo(String value) {
addCriterion("compete_code <=", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeLike(String value) {
addCriterion("compete_code like", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeNotLike(String value) {
addCriterion("compete_code not like", value, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeIn(List<String> values) {
addCriterion("compete_code in", values, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeNotIn(List<String> values) {
addCriterion("compete_code not in", values, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeBetween(String value1, String value2) {
addCriterion("compete_code between", value1, value2, "competeCode");
return (Criteria) this;
}
public Criteria andCompeteCodeNotBetween(String value1, String value2) {
addCriterion("compete_code not between", value1, value2, "competeCode");
return (Criteria) this;
}
public Criteria andLevelUserIdIsNull() {
addCriterion("level_user_id is null");
return (Criteria) this;
}
public Criteria andLevelUserIdIsNotNull() {
addCriterion("level_user_id is not null");
return (Criteria) this;
}
public Criteria andLevelUserIdEqualTo(Long value) {
addCriterion("level_user_id =", value, "levelUserId");
return (Criteria) this;
}
public Criteria andLevelUserIdNotEqualTo(Long value) {
addCriterion("level_user_id <>", value, "levelUserId");
return (Criteria) this;
}
public Criteria andLevelUserIdGreaterThan(Long value) {
addCriterion("level_user_id >", value, "levelUserId");
return (Criteria) this;
}
public Criteria andLevelUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("level_user_id >=", value, "levelUserId");
return (Criteria) this;
}
public Criteria andLevelUserIdLessThan(Long value) {
addCriterion("level_user_id <", value, "levelUserId");
return (Criteria) this;
}
public Criteria andLevelUserIdLessThanOrEqualTo(Long value) {
addCriterion("level_user_id <=", value, "levelUserId");
return (Criteria) this;
}
public Criteria andLevelUserIdIn(List<Long> values) {
addCriterion("level_user_id in", values, "levelUserId");
return (Criteria) this;
}
public Criteria andLevelUserIdNotIn(List<Long> values) {
addCriterion("level_user_id not in", values, "levelUserId");
return (Criteria) this;
}
public Criteria andLevelUserIdBetween(Long value1, Long value2) {
addCriterion("level_user_id between", value1, value2, "levelUserId");
return (Criteria) this;
}
public Criteria andLevelUserIdNotBetween(Long value1, Long value2) {
addCriterion("level_user_id not between", value1, value2, "levelUserId");
return (Criteria) this;
}
public Criteria andScoreIsNull() {
addCriterion("score is null");
return (Criteria) this;
}
public Criteria andScoreIsNotNull() {
addCriterion("score is not null");
return (Criteria) this;
}
public Criteria andScoreEqualTo(Integer value) {
addCriterion("score =", value, "score");
return (Criteria) this;
}
public Criteria andScoreNotEqualTo(Integer value) {
addCriterion("score <>", value, "score");
return (Criteria) this;
}
public Criteria andScoreGreaterThan(Integer value) {
addCriterion("score >", value, "score");
return (Criteria) this;
}
public Criteria andScoreGreaterThanOrEqualTo(Integer value) {
addCriterion("score >=", value, "score");
return (Criteria) this;
}
public Criteria andScoreLessThan(Integer value) {
addCriterion("score <", value, "score");
return (Criteria) this;
}
public Criteria andScoreLessThanOrEqualTo(Integer value) {
addCriterion("score <=", value, "score");
return (Criteria) this;
}
public Criteria andScoreIn(List<Integer> values) {
addCriterion("score in", values, "score");
return (Criteria) this;
}
public Criteria andScoreNotIn(List<Integer> values) {
addCriterion("score not in", values, "score");
return (Criteria) this;
}
public Criteria andScoreBetween(Integer value1, Integer value2) {
addCriterion("score between", value1, value2, "score");
return (Criteria) this;
}
public Criteria andScoreNotBetween(Integer value1, Integer value2) {
addCriterion("score not between", value1, value2, "score");
return (Criteria) this;
}
public Criteria andAdditionScoreIsNull() {
addCriterion("addition_score is null");
return (Criteria) this;
}
public Criteria andAdditionScoreIsNotNull() {
addCriterion("addition_score is not null");
return (Criteria) this;
}
public Criteria andAdditionScoreEqualTo(Integer value) {
addCriterion("addition_score =", value, "additionScore");
return (Criteria) this;
}
public Criteria andAdditionScoreNotEqualTo(Integer value) {
addCriterion("addition_score <>", value, "additionScore");
return (Criteria) this;
}
public Criteria andAdditionScoreGreaterThan(Integer value) {
addCriterion("addition_score >", value, "additionScore");
return (Criteria) this;
}
public Criteria andAdditionScoreGreaterThanOrEqualTo(Integer value) {
addCriterion("addition_score >=", value, "additionScore");
return (Criteria) this;
}
public Criteria andAdditionScoreLessThan(Integer value) {
addCriterion("addition_score <", value, "additionScore");
return (Criteria) this;
}
public Criteria andAdditionScoreLessThanOrEqualTo(Integer value) {
addCriterion("addition_score <=", value, "additionScore");
return (Criteria) this;
}
public Criteria andAdditionScoreIn(List<Integer> values) {
addCriterion("addition_score in", values, "additionScore");
return (Criteria) this;
}
public Criteria andAdditionScoreNotIn(List<Integer> values) {
addCriterion("addition_score not in", values, "additionScore");
return (Criteria) this;
}
public Criteria andAdditionScoreBetween(Integer value1, Integer value2) {
addCriterion("addition_score between", value1, value2, "additionScore");
return (Criteria) this;
}
public Criteria andAdditionScoreNotBetween(Integer value1, Integer value2) {
addCriterion("addition_score not between", value1, value2, "additionScore");
return (Criteria) this;
}
public Criteria andRankingIsNull() {
addCriterion("ranking is null");
return (Criteria) this;
}
public Criteria andRankingIsNotNull() {
addCriterion("ranking is not null");
return (Criteria) this;
}
public Criteria andRankingEqualTo(Integer value) {
addCriterion("ranking =", value, "ranking");
return (Criteria) this;
}
public Criteria andRankingNotEqualTo(Integer value) {
addCriterion("ranking <>", value, "ranking");
return (Criteria) this;
}
public Criteria andRankingGreaterThan(Integer value) {
addCriterion("ranking >", value, "ranking");
return (Criteria) this;
}
public Criteria andRankingGreaterThanOrEqualTo(Integer value) {
addCriterion("ranking >=", value, "ranking");
return (Criteria) this;
}
public Criteria andRankingLessThan(Integer value) {
addCriterion("ranking <", value, "ranking");
return (Criteria) this;
}
public Criteria andRankingLessThanOrEqualTo(Integer value) {
addCriterion("ranking <=", value, "ranking");
return (Criteria) this;
}
public Criteria andRankingIn(List<Integer> values) {
addCriterion("ranking in", values, "ranking");
return (Criteria) this;
}
public Criteria andRankingNotIn(List<Integer> values) {
addCriterion("ranking not in", values, "ranking");
return (Criteria) this;
}
public Criteria andRankingBetween(Integer value1, Integer value2) {
addCriterion("ranking between", value1, value2, "ranking");
return (Criteria) this;
}
public Criteria andRankingNotBetween(Integer value1, Integer value2) {
addCriterion("ranking not between", value1, value2, "ranking");
return (Criteria) this;
}
public Criteria andLevelUpTypeIsNull() {
addCriterion("level_up_type is null");
return (Criteria) this;
}
public Criteria andLevelUpTypeIsNotNull() {
addCriterion("level_up_type is not null");
return (Criteria) this;
}
public Criteria andLevelUpTypeEqualTo(Byte value) {
addCriterion("level_up_type =", value, "levelUpType");
return (Criteria) this;
}
public Criteria andLevelUpTypeNotEqualTo(Byte value) {
addCriterion("level_up_type <>", value, "levelUpType");
return (Criteria) this;
}
public Criteria andLevelUpTypeGreaterThan(Byte value) {
addCriterion("level_up_type >", value, "levelUpType");
return (Criteria) this;
}
public Criteria andLevelUpTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("level_up_type >=", value, "levelUpType");
return (Criteria) this;
}
public Criteria andLevelUpTypeLessThan(Byte value) {
addCriterion("level_up_type <", value, "levelUpType");
return (Criteria) this;
}
public Criteria andLevelUpTypeLessThanOrEqualTo(Byte value) {
addCriterion("level_up_type <=", value, "levelUpType");
return (Criteria) this;
}
public Criteria andLevelUpTypeIn(List<Byte> values) {
addCriterion("level_up_type in", values, "levelUpType");
return (Criteria) this;
}
public Criteria andLevelUpTypeNotIn(List<Byte> values) {
addCriterion("level_up_type not in", values, "levelUpType");
return (Criteria) this;
}
public Criteria andLevelUpTypeBetween(Byte value1, Byte value2) {
addCriterion("level_up_type between", value1, value2, "levelUpType");
return (Criteria) this;
}
public Criteria andLevelUpTypeNotBetween(Byte value1, Byte value2) {
addCriterion("level_up_type not between", value1, value2, "levelUpType");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<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);
}
}
}

106
mt/src/main/java/com/ccsens/mt/bean/po/LevelUser.java

@ -0,0 +1,106 @@
package com.ccsens.mt.bean.po;
import java.io.Serializable;
import java.util.Date;
public class LevelUser implements Serializable {
private Long id;
private Long playerId;
private String avatarUrl;
private String name;
private Long teamId;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPlayerId() {
return playerId;
}
public void setPlayerId(Long playerId) {
this.playerId = playerId;
}
public String getAvatarUrl() {
return avatarUrl;
}
public void setAvatarUrl(String avatarUrl) {
this.avatarUrl = avatarUrl == null ? null : avatarUrl.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Long getTeamId() {
return teamId;
}
public void setTeamId(Long teamId) {
this.teamId = teamId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", playerId=").append(playerId);
sb.append(", avatarUrl=").append(avatarUrl);
sb.append(", name=").append(name);
sb.append(", teamId=").append(teamId);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

701
mt/src/main/java/com/ccsens/mt/bean/po/LevelUserExample.java

@ -0,0 +1,701 @@
package com.ccsens.mt.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LevelUserExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public LevelUserExample() {
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 andPlayerIdIsNull() {
addCriterion("player_id is null");
return (Criteria) this;
}
public Criteria andPlayerIdIsNotNull() {
addCriterion("player_id is not null");
return (Criteria) this;
}
public Criteria andPlayerIdEqualTo(Long value) {
addCriterion("player_id =", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotEqualTo(Long value) {
addCriterion("player_id <>", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdGreaterThan(Long value) {
addCriterion("player_id >", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdGreaterThanOrEqualTo(Long value) {
addCriterion("player_id >=", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdLessThan(Long value) {
addCriterion("player_id <", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdLessThanOrEqualTo(Long value) {
addCriterion("player_id <=", value, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdIn(List<Long> values) {
addCriterion("player_id in", values, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotIn(List<Long> values) {
addCriterion("player_id not in", values, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdBetween(Long value1, Long value2) {
addCriterion("player_id between", value1, value2, "playerId");
return (Criteria) this;
}
public Criteria andPlayerIdNotBetween(Long value1, Long value2) {
addCriterion("player_id not between", value1, value2, "playerId");
return (Criteria) this;
}
public Criteria andAvatarUrlIsNull() {
addCriterion("avatar_url is null");
return (Criteria) this;
}
public Criteria andAvatarUrlIsNotNull() {
addCriterion("avatar_url is not null");
return (Criteria) this;
}
public Criteria andAvatarUrlEqualTo(String value) {
addCriterion("avatar_url =", value, "avatarUrl");
return (Criteria) this;
}
public Criteria andAvatarUrlNotEqualTo(String value) {
addCriterion("avatar_url <>", value, "avatarUrl");
return (Criteria) this;
}
public Criteria andAvatarUrlGreaterThan(String value) {
addCriterion("avatar_url >", value, "avatarUrl");
return (Criteria) this;
}
public Criteria andAvatarUrlGreaterThanOrEqualTo(String value) {
addCriterion("avatar_url >=", value, "avatarUrl");
return (Criteria) this;
}
public Criteria andAvatarUrlLessThan(String value) {
addCriterion("avatar_url <", value, "avatarUrl");
return (Criteria) this;
}
public Criteria andAvatarUrlLessThanOrEqualTo(String value) {
addCriterion("avatar_url <=", value, "avatarUrl");
return (Criteria) this;
}
public Criteria andAvatarUrlLike(String value) {
addCriterion("avatar_url like", value, "avatarUrl");
return (Criteria) this;
}
public Criteria andAvatarUrlNotLike(String value) {
addCriterion("avatar_url not like", value, "avatarUrl");
return (Criteria) this;
}
public Criteria andAvatarUrlIn(List<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 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 andTeamIdIsNull() {
addCriterion("team_id is null");
return (Criteria) this;
}
public Criteria andTeamIdIsNotNull() {
addCriterion("team_id is not null");
return (Criteria) this;
}
public Criteria andTeamIdEqualTo(Long value) {
addCriterion("team_id =", value, "teamId");
return (Criteria) this;
}
public Criteria andTeamIdNotEqualTo(Long value) {
addCriterion("team_id <>", value, "teamId");
return (Criteria) this;
}
public Criteria andTeamIdGreaterThan(Long value) {
addCriterion("team_id >", value, "teamId");
return (Criteria) this;
}
public Criteria andTeamIdGreaterThanOrEqualTo(Long value) {
addCriterion("team_id >=", value, "teamId");
return (Criteria) this;
}
public Criteria andTeamIdLessThan(Long value) {
addCriterion("team_id <", value, "teamId");
return (Criteria) this;
}
public Criteria andTeamIdLessThanOrEqualTo(Long value) {
addCriterion("team_id <=", value, "teamId");
return (Criteria) this;
}
public Criteria andTeamIdIn(List<Long> values) {
addCriterion("team_id in", values, "teamId");
return (Criteria) this;
}
public Criteria andTeamIdNotIn(List<Long> values) {
addCriterion("team_id not in", values, "teamId");
return (Criteria) this;
}
public Criteria andTeamIdBetween(Long value1, Long value2) {
addCriterion("team_id between", value1, value2, "teamId");
return (Criteria) this;
}
public Criteria andTeamIdNotBetween(Long value1, Long value2) {
addCriterion("team_id not between", value1, value2, "teamId");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<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);
}
}
}

17
mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java

@ -142,6 +142,21 @@ public class CompeteVo {
private String qrCode;
@ApiModelProperty("团队内的成员")
private List<CompeteTeamProjectMember> members;
//
// public CompeteTeamProject(Long teamId, byte type, String parentProjectName, String secondProjectName, byte certificate, byte creator, int memberMin, int memberMax, String qrCode) {
// this.teamId = teamId;
// this.type = type;
// this.parentProjectName = parentProjectName;
// this.secondProjectName = secondProjectName;
// this.certificate = certificate;
// this.creator = creator;
// this.memberMin = memberMin;
// this.memberMax = memberMax;
// this.qrCode = qrCode;
// }
public CompeteTeamProject() {
}
public CompeteTeamProject(CompeteTeam team, byte isCreator, com.ccsens.mt.bean.po.CompeteProject project, String parentProjectName, List<CompeteTeamProjectMember> members) {
this.teamId = team.getId();
@ -212,7 +227,7 @@ public class CompeteVo {
}
@Data
@ApiModel("返回当前选手所有报名信息")
@ApiModel("当前选手的基本报名信息")
public static class GetPlayerInfo {
@ApiModelProperty("id")
private Long playerId;

23
mt/src/main/java/com/ccsens/mt/bean/vo/LevelVo.java

@ -0,0 +1,23 @@
package com.ccsens.mt.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author
*/
public class LevelVo {
@Data
@ApiModel("返回查询到的晋级选手信息")
public static class QueryLevelUserInfo{
@ApiModelProperty("选手id")
private Long levelUserId;
@ApiModelProperty("头像")
private String avatarUrl;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("团队id")
private Long teamId;
}
}

2
mt/src/main/java/com/ccsens/mt/config/SpringConfig.java

@ -111,7 +111,7 @@ public class SpringConfig implements WebMvcConfigurer {
.addResourceLocations("classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:///home/cloud/tall/uploads/");
.addResourceLocations("file:///home/cloud/mt/uploads/");
//super.addResourceHandlers(registry);
}

103
mt/src/main/java/com/ccsens/mt/intercept/MybatisInterceptor.java

@ -3,7 +3,10 @@ package com.ccsens.mt.intercept;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.util.WebConstant;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.mapping.*;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.ResultMap;
import org.apache.ibatis.mapping.SqlSource;
import org.apache.ibatis.plugin.*;
import org.apache.ibatis.reflection.DefaultReflectorFactory;
import org.apache.ibatis.reflection.MetaObject;
@ -12,8 +15,10 @@ import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
import java.util.Properties;
/**
@ -34,43 +39,21 @@ public class MybatisInterceptor implements Interceptor {
String selectByExample = "selectByExample";
String countByExample = "countByExample";
String countByExample2 = "selectByExample_COUNT";
String selectByPrimaryKey = "selectByPrimaryKey";
Object[] args = invocation.getArgs();
MappedStatement statement = (MappedStatement) args[0];
if (statement.getId().endsWith(selectByExample)) {
if (statement.getId().endsWith(selectByExample)
|| statement.getId().endsWith(countByExample)
|| statement.getId().endsWith(countByExample2)) {
//XXXExample
Object example = args[1];
Method method = example.getClass().getMethod("getOredCriteria", null);
//获取到条件数组,第一个是Criteria
List list = (List)method.invoke(example);
if (CollectionUtil.isEmpty(list)) {
Class clazz = ((ResultMap)statement.getResultMaps().get(0)).getType();
String exampleName = clazz.getName() + "Example";
Object paramExample = Class.forName(exampleName).newInstance();
Method createCriteria = paramExample.getClass().getMethod("createCriteria");
Object criteria = createCriteria.invoke(paramExample);
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
list.add(criteria);
} else {
Object criteria = list.get(0);
Method getCriteria = criteria.getClass().getMethod("getCriteria");
List params = (List)getCriteria.invoke(criteria);
boolean hasDel = false;
for(Object param: params) {
Method getCondition = param.getClass().getMethod("getCondition");
Object condition = getCondition.invoke(param);
if ("iis_del =".equals(condition)) {
hasDel = true;
}
}
if (!hasDel) {
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
}
}
addCondition(statement, example);
} else if (statement.getId().endsWith(selectByPrimaryKey)) {
@ -85,6 +68,45 @@ public class MybatisInterceptor implements Interceptor {
return invocation.proceed();
}
private void addCondition(MappedStatement statement, Object example) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException {
if (example instanceof Map) {
example = ((Map) example).get("_ORIGINAL_PARAMETER_OBJECT");
}
Method method = example.getClass().getMethod("getOredCriteria", null);
//获取到条件数组,第一个是Criteria
List list = (List) method.invoke(example);
if (CollectionUtil.isEmpty(list)) {
Class clazz = ((ResultMap) statement.getResultMaps().get(0)).getType();
String exampleName = clazz.getName() + "Example";
Object paramExample = Class.forName(exampleName).newInstance();
Method createCriteria = paramExample.getClass().getMethod("createCriteria");
Object criteria = createCriteria.invoke(paramExample);
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
list.add(criteria);
} else {
Object criteria = list.get(0);
Method getCriteria = criteria.getClass().getMethod("getCriteria");
List params = (List) getCriteria.invoke(criteria);
boolean hasDel = false;
for (Object param : params) {
Method getCondition = param.getClass().getMethod("getCondition");
Object condition = getCondition.invoke(param);
if ("rec_status =".equals(condition)) {
hasDel = true;
}
}
if (!hasDel) {
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
}
}
}
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
@ -121,24 +143,7 @@ public class MybatisInterceptor implements Interceptor {
return builder.build();
}
private String getOperateType(Invocation invocation) {
final Object[] args = invocation.getArgs();
MappedStatement ms = (MappedStatement) args[0];
SqlCommandType commondType = ms.getSqlCommandType();
if (commondType.compareTo(SqlCommandType.SELECT) == 0) {
return "select";
}
if (commondType.compareTo(SqlCommandType.INSERT) == 0) {
return "insert";
}
if (commondType.compareTo(SqlCommandType.UPDATE) == 0) {
return "update";
}
if (commondType.compareTo(SqlCommandType.DELETE) == 0) {
return "delete";
}
return null;
}
// 定义一个内部辅助类,作用是包装sq
class BoundSqlSqlSource implements SqlSource {
private BoundSql boundSql;

19
mt/src/main/java/com/ccsens/mt/persist/dao/LevelUpDao.java

@ -0,0 +1,19 @@
package com.ccsens.mt.persist.dao;
import com.ccsens.mt.persist.mapper.LevelUpMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
* @author
*/
@Repository
public interface LevelUpDao extends LevelUpMapper{
/**
* 通过levelUserId和比赛code查看晋级信息
* @param levelUserId levelUserId
* @param competeCode 比赛code
* @return 返回晋级信息id
*/
Long getByLevelUserIdAndCode(@Param("levelUserId") Long levelUserId, @Param("competeCode")String competeCode);
}

30
mt/src/main/java/com/ccsens/mt/persist/mapper/LevelRuleMapper.java

@ -0,0 +1,30 @@
package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.LevelRule;
import com.ccsens.mt.bean.po.LevelRuleExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface LevelRuleMapper {
long countByExample(LevelRuleExample example);
int deleteByExample(LevelRuleExample example);
int deleteByPrimaryKey(Long id);
int insert(LevelRule record);
int insertSelective(LevelRule record);
List<LevelRule> selectByExample(LevelRuleExample example);
LevelRule selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") LevelRule record, @Param("example") LevelRuleExample example);
int updateByExample(@Param("record") LevelRule record, @Param("example") LevelRuleExample example);
int updateByPrimaryKeySelective(LevelRule record);
int updateByPrimaryKey(LevelRule record);
}

30
mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUpMapper.java

@ -0,0 +1,30 @@
package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.LevelUp;
import com.ccsens.mt.bean.po.LevelUpExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface LevelUpMapper {
long countByExample(LevelUpExample example);
int deleteByExample(LevelUpExample example);
int deleteByPrimaryKey(Long id);
int insert(LevelUp record);
int insertSelective(LevelUp record);
List<LevelUp> selectByExample(LevelUpExample example);
LevelUp selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") LevelUp record, @Param("example") LevelUpExample example);
int updateByExample(@Param("record") LevelUp record, @Param("example") LevelUpExample example);
int updateByPrimaryKeySelective(LevelUp record);
int updateByPrimaryKey(LevelUp record);
}

30
mt/src/main/java/com/ccsens/mt/persist/mapper/LevelUserMapper.java

@ -0,0 +1,30 @@
package com.ccsens.mt.persist.mapper;
import com.ccsens.mt.bean.po.LevelUser;
import com.ccsens.mt.bean.po.LevelUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface LevelUserMapper {
long countByExample(LevelUserExample example);
int deleteByExample(LevelUserExample example);
int deleteByPrimaryKey(Long id);
int insert(LevelUser record);
int insertSelective(LevelUser record);
List<LevelUser> selectByExample(LevelUserExample example);
LevelUser selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") LevelUser record, @Param("example") LevelUserExample example);
int updateByExample(@Param("record") LevelUser record, @Param("example") LevelUserExample example);
int updateByPrimaryKeySelective(LevelUser record);
int updateByPrimaryKey(LevelUser record);
}

17
mt/src/main/java/com/ccsens/mt/service/CompeteService.java

@ -116,12 +116,12 @@ public class CompeteService implements ICompeteService{
Long userId = params.getUserId();
//检查验证码是否正确
// if (!redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(competePlayerInfo.getPhone()))) {
// throw new BaseException(CodeEnum.SMS_CODE_CORRECT);
// }
// if (!competePlayerInfo.getSmsCode().equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(competePlayerInfo.getPhone())).toString())) {
// throw new BaseException(CodeEnum.SMS_CODE_CORRECT);
// }
if (!redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(competePlayerInfo.getPhone()))) {
throw new BaseException(CodeEnum.SMS_CODE_CORRECT);
}
if (!competePlayerInfo.getSmsCode().equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(competePlayerInfo.getPhone())).toString())) {
throw new BaseException(CodeEnum.SMS_CODE_CORRECT);
}
//检查此用户是否已经报名
CompetePlayerExample playerExample = new CompetePlayerExample();
playerExample.createCriteria().andUserIdEqualTo(userId);
@ -215,8 +215,8 @@ public class CompeteService implements ICompeteService{
team.setCompeteTimeId(params.getParam().getCompeteTimeId());
team.setCertificate(params.getParam().getCertificate());
team.setGenderGroup(player.getGender());
String qrCode = PropUtil.signUpUrl + "home&teamId=" + team.getId();
String qrCodeVisit = QrCodeUtil.urlToQRCode(qrCode, PropUtil.path + "qrCode");
String qrCode = PropUtil.signUpUrl + "home?teamId=" + team.getId();
String qrCodeVisit = QrCodeUtil.urlToQRCode(qrCode, PropUtil.path);
team.setQrCode(qrCodeVisit);
competeTeamDao.insertSelective(team);
// 加入团队
@ -263,6 +263,7 @@ public class CompeteService implements ICompeteService{
List<CompeteVo.CompeteTeamProject> competeTeamProjects = competeTeamDao.queryTeam(userId, competeTimeId);
//封装队员信息和总队员数
competeTeamProjects.forEach(team -> {
team.setQrCode(PropUtil.imgDomain + team.getQrCode());
List<CompeteVo.CompeteTeamProjectMember> members = competeTeamDao.queryMembers(team.getTeamId());
team.setMembers(members);
team.setMemberNums(members.size());

4
mt/src/main/java/com/ccsens/mt/service/FileService.java

@ -3,6 +3,7 @@ package com.ccsens.mt.service;
import cn.hutool.core.lang.Snowflake;
import com.ccsens.mt.bean.po.CommonFile;
import com.ccsens.mt.persist.mapper.CommonFileMapper;
import com.ccsens.mt.util.Constant;
import com.ccsens.util.NotSupportedFileTypeException;
import com.ccsens.util.PropUtil;
import com.ccsens.util.UploadFileUtil_Servlet3;
@ -14,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.Part;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@ -48,7 +50,7 @@ public class FileService implements IFileService {
fileDo.setLocation(dir + java.io.File.separator + path);
fileDo.setUserId(userId);
if (WebConstant.IMG_TYPE.contains(name.substring(name.lastIndexOf(".") + 1))) {
fileDo.setVisitLocation(PropUtil.imgDomain + path);
fileDo.setVisitLocation(PropUtil.imgDomain + Constant.File.UPLOAD_URL + File.separator + path);
} else {
fileDo.setVisitLocation(PropUtil.domain + "file/download/"+fileDo.getId());
}

44
mt/src/main/java/com/ccsens/mt/service/ILevelUpService.java

@ -0,0 +1,44 @@
package com.ccsens.mt.service;
import com.ccsens.mt.bean.dto.LevelDto;
import com.ccsens.mt.bean.vo.LevelVo;
import com.ccsens.util.bean.dto.QueryDto;
import java.util.List;
/**
* @author
*/
public interface ILevelUpService {
/**
* 添加选手信息
* @param levelUserDto 选手信息
*/
void saveLevelUser(LevelDto.LevelUserDto levelUserDto);
/**
* 参加比赛时添加晋级表信息
* @param levelUpDto 选手和比赛信息
*/
void joinCompete(LevelDto.LevelUpDto levelUpDto);
/**
* 自动晋级
* @param autoLevelUpDto 大赛id和比赛code
*/
void autoLevelUp(LevelDto.AutoLevelUpDto autoLevelUpDto);
/**
* 手动晋级
* @param params 比赛信息和晋级的选手信息
*/
void manualLevelUpPlayer(QueryDto<LevelDto.ManualLevelUpDto> params);
/**
* 查询比赛内晋级的选手信息
* @param params 比赛id和分页信息
* @return 返回查到的比赛下所有晋级的选手的信息
*/
List<LevelVo.QueryLevelUserInfo> queryLevelUserInfo(QueryDto<LevelDto.ManualLevelUpDto> params);
}

159
mt/src/main/java/com/ccsens/mt/service/LevelUpService.java

@ -0,0 +1,159 @@
package com.ccsens.mt.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import com.ccsens.mt.bean.dto.LevelDto;
import com.ccsens.mt.bean.po.*;
import com.ccsens.mt.bean.vo.LevelVo;
import com.ccsens.mt.persist.dao.LevelUpDao;
import com.ccsens.mt.persist.mapper.LevelRuleMapper;
import com.ccsens.mt.persist.mapper.LevelUserMapper;
import com.ccsens.mt.util.Constant;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.bean.dto.QueryDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.ZSetOperations;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
/**
* @author
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class LevelUpService implements ILevelUpService{
@Resource
private Snowflake snowflake;
@Resource
private LevelUserMapper levelUserMapper;
@Resource
private LevelUpDao levelUpDao;
@Resource
private LevelRuleMapper levelRuleMapper;
@Resource
private RedisUtil redisUtil;
/**
* 选手报名时将信息存入选手表
* @param levelUserDto 选手信息
*/
@Override
public void saveLevelUser(LevelDto.LevelUserDto levelUserDto) {
log.info("将参加比赛的选手信息存入数据库:{}",levelUserDto);
LevelUser levelUser = new LevelUser();
BeanUtil.copyProperties(levelUserDto,levelUser);
levelUser.setId(snowflake.nextId());
levelUserMapper.insertSelective(levelUser);
}
/**
* 参加比赛时存入将选手和比赛的关联信息存入晋级表同时存入redis
* @param levelUpDto 选手和比赛信息
*/
@Override
public void joinCompete(LevelDto.LevelUpDto levelUpDto) {
log.info("参加比赛时储存晋级表:{}",levelUpDto);
//根据playerId查找的选手表id
LevelUser levelUser = null;
LevelUserExample levelUserExample = new LevelUserExample();
levelUserExample.createCriteria().andPlayerIdEqualTo(levelUpDto.getPlayerId());
List<LevelUser> levelUserList = levelUserMapper.selectByExample(levelUserExample);
if (CollectionUtil.isNotEmpty(levelUserList)){
log.info("查找到的用户的选手信息:{}",levelUserList);
levelUser = levelUserList.get(0);
}
//添加晋级表
LevelUpExample levelUpExample = new LevelUpExample();
levelUpExample.createCriteria().andLevelUserIdEqualTo(levelUser.getId()).andCompeteCodeEqualTo(levelUpDto.getCompeteCode());
if(levelUpDao.countByExample(levelUpExample) == 0) {
LevelUp levelUp = new LevelUp();
BeanUtil.copyProperties(levelUpDto, levelUp);
levelUp.setId(snowflake.nextId());
levelUp.setLevelUserId(levelUser.getId());
levelUpDao.insertSelective(levelUp);
//存入redis
String key = Constant.Redis.COMPETE_LEVEL + levelUpDto.getCompeteTimeId() + "_" + levelUpDto.getCompeteCode();
redisUtil.zsSet(key, levelUser, 0);
}
}
/**
* 自动晋级
* @param autoLevelUpDto 大赛id和比赛code
*/
@Override
public void autoLevelUp(LevelDto.AutoLevelUpDto autoLevelUpDto) {
//查找晋级规则,
LevelRule levelRule = new LevelRule();
LevelRuleExample levelRuleExample = new LevelRuleExample();
levelRuleExample.createCriteria().andCompeteCodeNowEqualTo(autoLevelUpDto.getCompeteCode())
.andCompeteTimeIdEqualTo(autoLevelUpDto.getCompeteTimeId());
List<LevelRule> ruleList = levelRuleMapper.selectByExample(levelRuleExample);
if(CollectionUtil.isNotEmpty(ruleList)){
levelRule = ruleList.get(0);
}
log.info("查找到的比赛晋级规则:{}",levelRule);
String key = Constant.Redis.COMPETE_LEVEL + autoLevelUpDto.getCompeteTimeId() + "_" + autoLevelUpDto.getCompeteCode();
switch (levelRule.getRule()){
case Constant.LevelUp.RULE_RANK_NO_REPEAT :
log.info("根据排名(不重复)晋级");
Set<ZSetOperations.TypedTuple<Object>> typedTuples = redisUtil.zsRevGetWithScore(key, 0, -1);
AtomicInteger index = new AtomicInteger(0);
typedTuples.forEach(type ->{
index.set(index.get() + 1);
// 更新数据库分数
LevelUser levelUser = (LevelUser) type.getValue();
Long levelUpId = levelUpDao.getByLevelUserIdAndCode(levelUser.getId(),autoLevelUpDto.getCompeteCode());
LevelUp levelUp = new LevelUp();
levelUp.setId(levelUpId);
levelUp.setScore(Objects.requireNonNull(type.getScore()).intValue());
// levelUp.setRanking();
});
break;
case Constant.LevelUp.RULE_RANK_REPEAT :
log.info("根据排名(可以重复)晋级");
break;
case Constant.LevelUp.RULE_SCORE :
log.info("根据分数晋级");
break;
case Constant.LevelUp.RULE_APPOINT :
case Constant.LevelUp.RULE_TEAM_RANK :
case Constant.LevelUp.RULE_NO :
default:
break;
}
//在redis中查找需要晋级的人
//将选手和晋级信息添加至数据库
}
/**
* 手动晋级
* @param params 比赛信息和晋级的选手信息
*/
@Override
public void manualLevelUpPlayer(QueryDto<LevelDto.ManualLevelUpDto> params) {
}
/**
* 查询比赛内晋级的选手信息
* @param params 比赛id和分页信息
* @return 返回查到的比赛下所有晋级的选手的信息
*/
@Override
public List<LevelVo.QueryLevelUserInfo> queryLevelUserInfo(QueryDto<LevelDto.ManualLevelUpDto> params) {
return null;
}
}

16
mt/src/main/java/com/ccsens/mt/util/Constant.java

@ -27,6 +27,8 @@ public class Constant {
public final static String COMPETE_COMPANY = "_compete_company";
// 远程比赛参赛单位存在时间10天
public final static long COMPETE_COMPANY_TIME = 10 * 24 * 60 * 60;
// 远程比赛参赛单位
public final static String COMPETE_LEVEL = "compete_";
}
public static final int VOTE_TOTAL = 2;
@ -47,4 +49,18 @@ public class Constant {
public static class File{
public static final String UPLOAD_URL = "upload";
}
public final static class LevelUp{
//不晋级
public final static byte RULE_NO = 0;
//根据名次晋级(不重复)
public final static byte RULE_RANK_NO_REPEAT = 1;
//根据名次晋级(可以重复)
public final static byte RULE_RANK_REPEAT = 2;
//根据分数晋级
public final static byte RULE_SCORE = 3;
//指定晋级人员
public final static byte RULE_APPOINT = 4;
//团体赛按名次
public final static byte RULE_TEAM_RANK = 5;
}
}

4
mt/src/main/resources/application-dev.yml

@ -28,4 +28,6 @@ swagger:
enable: true
file:
path: /home/cloud/mt/uploads/
signUpUrl: https://test.tall.wiki/signup/
signUpUrl: https://test.tall.wiki/compete/
domain: https://test.tall.wiki/gateway/mt/
imgDomain: https://test.tall.wiki/gateway/mt/uploads/

4
mt/src/main/resources/application-prod.yml

@ -34,4 +34,6 @@ gatewayUrl: https://www.tall.wiki/gateway/
notGatewayUrl: https://www.tall.wiki/
file:
path: /home/cloud/mt/uploads/
signUpUrl: https://www.tall.wiki/signup/
signUpUrl: https://www.tall.wiki/compete/
domain: https://test.tall.wiki/gateway/mt/
imgDomain: https://test.tall.wiki/gateway/mt/uploads/

4
mt/src/main/resources/application-test.yml

@ -31,4 +31,6 @@ eureka:
ip-address: 192.168.0.99
file:
path: /home/cloud/mt/uploads/
signUpUrl: https://test.tall.wiki/signup/
signUpUrl: https://test.tall.wiki/compete/
domain: https://test.tall.wiki/gateway/mt/
imgDomain: https://test.tall.wiki/gateway/mt/uploads/

12
mt/src/main/resources/mapper_dao/CompetePlayerDao.xml

@ -4,7 +4,7 @@
<select id="getInfo" resultType="com.ccsens.mt.bean.vo.CompeteVo$GetPlayerInfo">
SELECT
SELECT
p.id AS playerId,
p.NAME,
p.gender,
@ -12,16 +12,16 @@
p.id_card AS idCard,
p.compete_group_id AS groupId,
g.group_name AS groupName,
p.company_name AS companyName,
c.`name` AS companyName,
p.id_card_front AS idCardFront,
p.id_card_back AS idCardBack,
p.prove_img AS proveImg
FROM
t_compete_player p,
t_compete_group g
t_compete_player p LEFT JOIN
t_compete_group g on p.compete_group_id = g.id LEFT JOIN
t_compete_company c on p.company_id = c.id
WHERE
p.compete_group_id = g.id
AND p.user_id = #{userId}
p.user_id = #{userId}
AND p.rec_status = 0
AND g.rec_status = 0
LIMIT 1

2
mt/src/main/resources/mapper_dao/CompeteTeamDao.xml

@ -92,7 +92,7 @@
</select>
<select id="queryTeam" resultType="com.ccsens.mt.bean.vo.CompeteVo$CompeteTeamProject">
SELECT
m.id as teamId,
t.id as teamId,
p2.type,
p2.name as secondProjectName,
p1.name as parentProjectName,

9
mt/src/main/resources/mapper_dao/LevelUpDao.xml

@ -0,0 +1,9 @@
<?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.LevelUpDao">
<select id="getByLevelUserIdAndCode" parameterMap="java.util.Map" resultType="Long">
SELECT id FROM `t_level_up` WHERE level_user_id = #{levelUserId} and compete_code = #{competeCode}
</select>
</mapper>

306
mt/src/main/resources/mapper_raw/LevelRuleMapper.xml

@ -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.LevelRuleMapper">
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.LevelRule">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="compete_time_id" jdbcType="BIGINT" property="competeTimeId" />
<result column="compete_code_now" jdbcType="VARCHAR" property="competeCodeNow" />
<result column="compete_code_level_up" jdbcType="VARCHAR" property="competeCodeLevelUp" />
<result column="rule" jdbcType="TINYINT" property="rule" />
<result column="level_condition" jdbcType="INTEGER" property="levelCondition" />
<result column="auto_level" jdbcType="TINYINT" property="autoLevel" />
<result column="compete_order" jdbcType="TINYINT" property="competeOrder" />
<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, compete_time_id, compete_code_now, compete_code_level_up, rule, level_condition,
auto_level, compete_order, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.LevelRuleExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_level_rule
<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_level_rule
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_level_rule
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.LevelRuleExample">
delete from t_level_rule
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.mt.bean.po.LevelRule">
insert into t_level_rule (id, compete_time_id, compete_code_now,
compete_code_level_up, rule, level_condition,
auto_level, compete_order, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT}, #{competeCodeNow,jdbcType=VARCHAR},
#{competeCodeLevelUp,jdbcType=VARCHAR}, #{rule,jdbcType=TINYINT}, #{levelCondition,jdbcType=INTEGER},
#{autoLevel,jdbcType=TINYINT}, #{competeOrder,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.LevelRule">
insert into t_level_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="competeTimeId != null">
compete_time_id,
</if>
<if test="competeCodeNow != null">
compete_code_now,
</if>
<if test="competeCodeLevelUp != null">
compete_code_level_up,
</if>
<if test="rule != null">
rule,
</if>
<if test="levelCondition != null">
level_condition,
</if>
<if test="autoLevel != null">
auto_level,
</if>
<if test="competeOrder != null">
compete_order,
</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="competeTimeId != null">
#{competeTimeId,jdbcType=BIGINT},
</if>
<if test="competeCodeNow != null">
#{competeCodeNow,jdbcType=VARCHAR},
</if>
<if test="competeCodeLevelUp != null">
#{competeCodeLevelUp,jdbcType=VARCHAR},
</if>
<if test="rule != null">
#{rule,jdbcType=TINYINT},
</if>
<if test="levelCondition != null">
#{levelCondition,jdbcType=INTEGER},
</if>
<if test="autoLevel != null">
#{autoLevel,jdbcType=TINYINT},
</if>
<if test="competeOrder != null">
#{competeOrder,jdbcType=TINYINT},
</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.LevelRuleExample" resultType="java.lang.Long">
select count(*) from t_level_rule
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_level_rule
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.competeTimeId != null">
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
</if>
<if test="record.competeCodeNow != null">
compete_code_now = #{record.competeCodeNow,jdbcType=VARCHAR},
</if>
<if test="record.competeCodeLevelUp != null">
compete_code_level_up = #{record.competeCodeLevelUp,jdbcType=VARCHAR},
</if>
<if test="record.rule != null">
rule = #{record.rule,jdbcType=TINYINT},
</if>
<if test="record.levelCondition != null">
level_condition = #{record.levelCondition,jdbcType=INTEGER},
</if>
<if test="record.autoLevel != null">
auto_level = #{record.autoLevel,jdbcType=TINYINT},
</if>
<if test="record.competeOrder != null">
compete_order = #{record.competeOrder,jdbcType=TINYINT},
</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_level_rule
set id = #{record.id,jdbcType=BIGINT},
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
compete_code_now = #{record.competeCodeNow,jdbcType=VARCHAR},
compete_code_level_up = #{record.competeCodeLevelUp,jdbcType=VARCHAR},
rule = #{record.rule,jdbcType=TINYINT},
level_condition = #{record.levelCondition,jdbcType=INTEGER},
auto_level = #{record.autoLevel,jdbcType=TINYINT},
compete_order = #{record.competeOrder,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.LevelRule">
update t_level_rule
<set>
<if test="competeTimeId != null">
compete_time_id = #{competeTimeId,jdbcType=BIGINT},
</if>
<if test="competeCodeNow != null">
compete_code_now = #{competeCodeNow,jdbcType=VARCHAR},
</if>
<if test="competeCodeLevelUp != null">
compete_code_level_up = #{competeCodeLevelUp,jdbcType=VARCHAR},
</if>
<if test="rule != null">
rule = #{rule,jdbcType=TINYINT},
</if>
<if test="levelCondition != null">
level_condition = #{levelCondition,jdbcType=INTEGER},
</if>
<if test="autoLevel != null">
auto_level = #{autoLevel,jdbcType=TINYINT},
</if>
<if test="competeOrder != null">
compete_order = #{competeOrder,jdbcType=TINYINT},
</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.LevelRule">
update t_level_rule
set compete_time_id = #{competeTimeId,jdbcType=BIGINT},
compete_code_now = #{competeCodeNow,jdbcType=VARCHAR},
compete_code_level_up = #{competeCodeLevelUp,jdbcType=VARCHAR},
rule = #{rule,jdbcType=TINYINT},
level_condition = #{levelCondition,jdbcType=INTEGER},
auto_level = #{autoLevel,jdbcType=TINYINT},
compete_order = #{competeOrder,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

306
mt/src/main/resources/mapper_raw/LevelUpMapper.xml

@ -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.LevelUpMapper">
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.LevelUp">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="compete_time_id" jdbcType="BIGINT" property="competeTimeId" />
<result column="compete_code" jdbcType="VARCHAR" property="competeCode" />
<result column="level_user_id" jdbcType="BIGINT" property="levelUserId" />
<result column="score" jdbcType="INTEGER" property="score" />
<result column="addition_score" jdbcType="INTEGER" property="additionScore" />
<result column="ranking" jdbcType="INTEGER" property="ranking" />
<result column="level_up_type" jdbcType="TINYINT" property="levelUpType" />
<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, compete_time_id, compete_code, level_user_id, score, addition_score, ranking,
level_up_type, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.LevelUpExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_level_up
<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_level_up
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_level_up
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.LevelUpExample">
delete from t_level_up
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.mt.bean.po.LevelUp">
insert into t_level_up (id, compete_time_id, compete_code,
level_user_id, score, addition_score,
ranking, level_up_type, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT}, #{competeCode,jdbcType=VARCHAR},
#{levelUserId,jdbcType=BIGINT}, #{score,jdbcType=INTEGER}, #{additionScore,jdbcType=INTEGER},
#{ranking,jdbcType=INTEGER}, #{levelUpType,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.LevelUp">
insert into t_level_up
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="competeTimeId != null">
compete_time_id,
</if>
<if test="competeCode != null">
compete_code,
</if>
<if test="levelUserId != null">
level_user_id,
</if>
<if test="score != null">
score,
</if>
<if test="additionScore != null">
addition_score,
</if>
<if test="ranking != null">
ranking,
</if>
<if test="levelUpType != null">
level_up_type,
</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="competeTimeId != null">
#{competeTimeId,jdbcType=BIGINT},
</if>
<if test="competeCode != null">
#{competeCode,jdbcType=VARCHAR},
</if>
<if test="levelUserId != null">
#{levelUserId,jdbcType=BIGINT},
</if>
<if test="score != null">
#{score,jdbcType=INTEGER},
</if>
<if test="additionScore != null">
#{additionScore,jdbcType=INTEGER},
</if>
<if test="ranking != null">
#{ranking,jdbcType=INTEGER},
</if>
<if test="levelUpType != null">
#{levelUpType,jdbcType=TINYINT},
</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.LevelUpExample" resultType="java.lang.Long">
select count(*) from t_level_up
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_level_up
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.competeTimeId != null">
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
</if>
<if test="record.competeCode != null">
compete_code = #{record.competeCode,jdbcType=VARCHAR},
</if>
<if test="record.levelUserId != null">
level_user_id = #{record.levelUserId,jdbcType=BIGINT},
</if>
<if test="record.score != null">
score = #{record.score,jdbcType=INTEGER},
</if>
<if test="record.additionScore != null">
addition_score = #{record.additionScore,jdbcType=INTEGER},
</if>
<if test="record.ranking != null">
ranking = #{record.ranking,jdbcType=INTEGER},
</if>
<if test="record.levelUpType != null">
level_up_type = #{record.levelUpType,jdbcType=TINYINT},
</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_level_up
set id = #{record.id,jdbcType=BIGINT},
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
compete_code = #{record.competeCode,jdbcType=VARCHAR},
level_user_id = #{record.levelUserId,jdbcType=BIGINT},
score = #{record.score,jdbcType=INTEGER},
addition_score = #{record.additionScore,jdbcType=INTEGER},
ranking = #{record.ranking,jdbcType=INTEGER},
level_up_type = #{record.levelUpType,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.LevelUp">
update t_level_up
<set>
<if test="competeTimeId != null">
compete_time_id = #{competeTimeId,jdbcType=BIGINT},
</if>
<if test="competeCode != null">
compete_code = #{competeCode,jdbcType=VARCHAR},
</if>
<if test="levelUserId != null">
level_user_id = #{levelUserId,jdbcType=BIGINT},
</if>
<if test="score != null">
score = #{score,jdbcType=INTEGER},
</if>
<if test="additionScore != null">
addition_score = #{additionScore,jdbcType=INTEGER},
</if>
<if test="ranking != null">
ranking = #{ranking,jdbcType=INTEGER},
</if>
<if test="levelUpType != null">
level_up_type = #{levelUpType,jdbcType=TINYINT},
</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.LevelUp">
update t_level_up
set compete_time_id = #{competeTimeId,jdbcType=BIGINT},
compete_code = #{competeCode,jdbcType=VARCHAR},
level_user_id = #{levelUserId,jdbcType=BIGINT},
score = #{score,jdbcType=INTEGER},
addition_score = #{additionScore,jdbcType=INTEGER},
ranking = #{ranking,jdbcType=INTEGER},
level_up_type = #{levelUpType,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

258
mt/src/main/resources/mapper_raw/LevelUserMapper.xml

@ -0,0 +1,258 @@
<?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.LevelUserMapper">
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.LevelUser">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="player_id" jdbcType="BIGINT" property="playerId" />
<result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="team_id" jdbcType="BIGINT" property="teamId" />
<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, player_id, avatar_url, name, team_id, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.LevelUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_level_user
<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_level_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_level_user
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.LevelUserExample">
delete from t_level_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.mt.bean.po.LevelUser">
insert into t_level_user (id, player_id, avatar_url,
name, team_id, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{avatarUrl,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{teamId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.LevelUser">
insert into t_level_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="playerId != null">
player_id,
</if>
<if test="avatarUrl != null">
avatar_url,
</if>
<if test="name != null">
name,
</if>
<if test="teamId != null">
team_id,
</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="playerId != null">
#{playerId,jdbcType=BIGINT},
</if>
<if test="avatarUrl != null">
#{avatarUrl,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="teamId != null">
#{teamId,jdbcType=BIGINT},
</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.LevelUserExample" resultType="java.lang.Long">
select count(*) from t_level_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_level_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.playerId != null">
player_id = #{record.playerId,jdbcType=BIGINT},
</if>
<if test="record.avatarUrl != null">
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.teamId != null">
team_id = #{record.teamId,jdbcType=BIGINT},
</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_level_user
set id = #{record.id,jdbcType=BIGINT},
player_id = #{record.playerId,jdbcType=BIGINT},
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
team_id = #{record.teamId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.LevelUser">
update t_level_user
<set>
<if test="playerId != null">
player_id = #{playerId,jdbcType=BIGINT},
</if>
<if test="avatarUrl != null">
avatar_url = #{avatarUrl,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="teamId != null">
team_id = #{teamId,jdbcType=BIGINT},
</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.LevelUser">
update t_level_user
set player_id = #{playerId,jdbcType=BIGINT},
avatar_url = #{avatarUrl,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
team_id = #{teamId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

2
pims/src/main/java/com/ccsens/pims/config/SpringConfig.java

@ -111,7 +111,7 @@ public class SpringConfig implements WebMvcConfigurer {
.addResourceLocations("classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:///home/cloud/tall/uploads/");
.addResourceLocations("file:///home/cloud/pims/uploads/");
//super.addResourceHandlers(registry);
}

11
tall/src/main/java/com/ccsens/tall/bean/po/SysDomain.java

@ -10,6 +10,8 @@ public class SysDomain implements Serializable {
private String logo;
private String logoPath;
private String companyName;
private String systemName;
@ -60,6 +62,14 @@ public class SysDomain implements Serializable {
this.logo = logo == null ? null : logo.trim();
}
public String getLogoPath() {
return logoPath;
}
public void setLogoPath(String logoPath) {
this.logoPath = logoPath == null ? null : logoPath.trim();
}
public String getCompanyName() {
return companyName;
}
@ -165,6 +175,7 @@ public class SysDomain implements Serializable {
sb.append(", id=").append(id);
sb.append(", domainName=").append(domainName);
sb.append(", logo=").append(logo);
sb.append(", logoPath=").append(logoPath);
sb.append(", companyName=").append(companyName);
sb.append(", systemName=").append(systemName);
sb.append(", backdropUrl=").append(backdropUrl);

70
tall/src/main/java/com/ccsens/tall/bean/po/SysDomainExample.java

@ -305,6 +305,76 @@ public class SysDomainExample {
return (Criteria) this;
}
public Criteria andLogoPathIsNull() {
addCriterion("logo_path is null");
return (Criteria) this;
}
public Criteria andLogoPathIsNotNull() {
addCriterion("logo_path is not null");
return (Criteria) this;
}
public Criteria andLogoPathEqualTo(String value) {
addCriterion("logo_path =", value, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathNotEqualTo(String value) {
addCriterion("logo_path <>", value, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathGreaterThan(String value) {
addCriterion("logo_path >", value, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathGreaterThanOrEqualTo(String value) {
addCriterion("logo_path >=", value, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathLessThan(String value) {
addCriterion("logo_path <", value, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathLessThanOrEqualTo(String value) {
addCriterion("logo_path <=", value, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathLike(String value) {
addCriterion("logo_path like", value, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathNotLike(String value) {
addCriterion("logo_path not like", value, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathIn(List<String> values) {
addCriterion("logo_path in", values, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathNotIn(List<String> values) {
addCriterion("logo_path not in", values, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathBetween(String value1, String value2) {
addCriterion("logo_path between", value1, value2, "logoPath");
return (Criteria) this;
}
public Criteria andLogoPathNotBetween(String value1, String value2) {
addCriterion("logo_path not between", value1, value2, "logoPath");
return (Criteria) this;
}
public Criteria andCompanyNameIsNull() {
addCriterion("company_name is null");
return (Criteria) this;

103
tall/src/main/java/com/ccsens/tall/intercept/MybatisInterceptor.java

@ -3,7 +3,10 @@ package com.ccsens.tall.intercept;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.util.WebConstant;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.mapping.*;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.ResultMap;
import org.apache.ibatis.mapping.SqlSource;
import org.apache.ibatis.plugin.*;
import org.apache.ibatis.reflection.DefaultReflectorFactory;
import org.apache.ibatis.reflection.MetaObject;
@ -12,8 +15,10 @@ import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
import java.util.Properties;
/**
@ -34,43 +39,21 @@ public class MybatisInterceptor implements Interceptor {
String selectByExample = "selectByExample";
String countByExample = "countByExample";
String countByExample2 = "selectByExample_COUNT";
String selectByPrimaryKey = "selectByPrimaryKey";
Object[] args = invocation.getArgs();
MappedStatement statement = (MappedStatement) args[0];
if (statement.getId().endsWith(selectByExample)) {
if (statement.getId().endsWith(selectByExample)
|| statement.getId().endsWith(countByExample)
|| statement.getId().endsWith(countByExample2)) {
//XXXExample
Object example = args[1];
Method method = example.getClass().getMethod("getOredCriteria", null);
//获取到条件数组,第一个是Criteria
List list = (List)method.invoke(example);
if (CollectionUtil.isEmpty(list)) {
Class clazz = ((ResultMap)statement.getResultMaps().get(0)).getType();
String exampleName = clazz.getName() + "Example";
Object paramExample = Class.forName(exampleName).newInstance();
Method createCriteria = paramExample.getClass().getMethod("createCriteria");
Object criteria = createCriteria.invoke(paramExample);
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
list.add(criteria);
} else {
Object criteria = list.get(0);
Method getCriteria = criteria.getClass().getMethod("getCriteria");
List params = (List)getCriteria.invoke(criteria);
boolean hasDel = false;
for(Object param: params) {
Method getCondition = param.getClass().getMethod("getCondition");
Object condition = getCondition.invoke(param);
if ("iis_del =".equals(condition)) {
hasDel = true;
}
}
if (!hasDel) {
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
}
}
addCondition(statement, example);
} else if (statement.getId().endsWith(selectByPrimaryKey)) {
@ -85,6 +68,45 @@ public class MybatisInterceptor implements Interceptor {
return invocation.proceed();
}
private void addCondition(MappedStatement statement, Object example) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException {
if (example instanceof Map) {
example = ((Map) example).get("_ORIGINAL_PARAMETER_OBJECT");
}
Method method = example.getClass().getMethod("getOredCriteria", null);
//获取到条件数组,第一个是Criteria
List list = (List) method.invoke(example);
if (CollectionUtil.isEmpty(list)) {
Class clazz = ((ResultMap) statement.getResultMaps().get(0)).getType();
String exampleName = clazz.getName() + "Example";
Object paramExample = Class.forName(exampleName).newInstance();
Method createCriteria = paramExample.getClass().getMethod("createCriteria");
Object criteria = createCriteria.invoke(paramExample);
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
list.add(criteria);
} else {
Object criteria = list.get(0);
Method getCriteria = criteria.getClass().getMethod("getCriteria");
List params = (List) getCriteria.invoke(criteria);
boolean hasDel = false;
for (Object param : params) {
Method getCondition = param.getClass().getMethod("getCondition");
Object condition = getCondition.invoke(param);
if ("rec_status =".equals(condition)) {
hasDel = true;
}
}
if (!hasDel) {
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
}
}
}
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
@ -121,24 +143,7 @@ public class MybatisInterceptor implements Interceptor {
return builder.build();
}
private String getOperateType(Invocation invocation) {
final Object[] args = invocation.getArgs();
MappedStatement ms = (MappedStatement) args[0];
SqlCommandType commondType = ms.getSqlCommandType();
if (commondType.compareTo(SqlCommandType.SELECT) == 0) {
return "select";
}
if (commondType.compareTo(SqlCommandType.INSERT) == 0) {
return "insert";
}
if (commondType.compareTo(SqlCommandType.UPDATE) == 0) {
return "update";
}
if (commondType.compareTo(SqlCommandType.DELETE) == 0) {
return "delete";
}
return null;
}
// 定义一个内部辅助类,作用是包装sq
class BoundSqlSqlSource implements SqlSource {
private BoundSql boundSql;

6
tall/src/main/java/com/ccsens/tall/scheduled/ScheduledService.java

@ -2,16 +2,12 @@ package com.ccsens.tall.scheduled;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.tall.bean.po.ProRemind;
import com.ccsens.tall.bean.po.SysProjectRobot;
import com.ccsens.tall.bean.po.SysProjectRobotExample;
import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.persist.dao.ProRemindDao;
import com.ccsens.tall.service.IProjectMessageService;
import com.ccsens.tall.service.IRobotService;
import com.ccsens.tall.util.TallConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -42,7 +38,7 @@ public class ScheduledService {
public static final String AFTER_END = "您在项目's'中的任务's'已经在's'结束了";
public static final String USER_DEFINED = "来自项目's'中的任务's'的提醒";
@Scheduled(cron = "*/60 * * * * ?")
// @Scheduled(cron = "*/60 * * * * ?")
public void runfirst(){
long now = System.currentTimeMillis();
// long now = 1594611047000L;

8
tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java

@ -765,11 +765,15 @@ public class ProTaskDetailService implements IProTaskDetailService {
List<TaskVo.NormalTask> normalTaskList = new ArrayList<>();
//获取用户的角色
if(CollectionUtil.isEmpty(roleList)){
roleList = new HashSet<>();
//查询此用户在项目中的的所有角色的任务
List<ProRole> roles = proMemberService.selectRolesByUserIdAndProjectId(userId, project.getId());
roles.forEach(role->{
for (ProRole role : roles){
roleList.add(role.getId());
});
}
// roles.forEach(role->{
// roleList.add(role.getId());
// });
}
//获取“全体成员”角色

52
tall/src/main/java/com/ccsens/tall/service/TaskPluginService.java

@ -287,7 +287,7 @@ public class TaskPluginService implements ITaskPluginService{
domainExample.createCriteria().andDomainNameEqualTo(getMinutes.getDomainName());
List<SysDomain> sysDomainList = sysDomainDao.selectByExample(domainExample);
if (CollectionUtil.isNotEmpty(sysDomainList)) {
logo = sysDomainList.get(0).getLogo();
logo = sysDomainList.get(0).getLogoPath();
}
}
//查找该任务的会议记录文件,有则直接返回
@ -423,7 +423,7 @@ public class TaskPluginService implements ITaskPluginService{
domainExample.createCriteria().andDomainNameEqualTo(updateMinutes.getDomainName());
List<SysDomain> sysDomainList = sysDomainDao.selectByExample(domainExample);
if (CollectionUtil.isNotEmpty(sysDomainList)) {
logo = sysDomainList.get(0).getLogo();
logo = sysDomainList.get(0).getLogoPath();
}
}
//查找到文件信息
@ -487,9 +487,55 @@ public class TaskPluginService implements ITaskPluginService{
});
}
}
OutputStream stream = new FileOutputStream(wpsFile.getSaveUrl());
// OutputStream stream = new FileOutputStream(wpsFile.getSaveUrl());
// wb.write(stream);
// stream.close();
String name = "会议记录"+DateUtil.today() + ".xlsx";
String fileName = "minutes/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".xlsx";
String path = WebConstant.UPLOAD_PATH_BASE + File.separator + fileName;
File tmpFile = new File(path);
if (!tmpFile.getParentFile().exists()) {
tmpFile.getParentFile().mkdirs();
}
OutputStream stream = new FileOutputStream(tmpFile);
wb.write(stream);
stream.close();
//删除projectFile
ProProjectFileExample projectFileExample = new ProProjectFileExample();
projectFileExample.createCriteria().andWpsFileIdEqualTo(wpsFile.getId());
List<ProProjectFile> projectFileList = proProjectFileDao.selectByExample(projectFileExample);
if(CollectionUtil.isNotEmpty(projectFileList)) {
projectFileList.forEach(proProjectFile -> {
proProjectFile.setRecStatus((byte) 2);
proProjectFileDao.updateByPrimaryKeySelective(proProjectFile);
});
}
//重新保存wps
WpsDto.Business business = new WpsDto.Business();
business.setBusinessId(updateMinutes.getTaskId());
business.setBusinessType((byte) 2);
business.setUserId(currentUserId);
business.setFileName(name);
business.setFilePath(fileName);
business.setFileSize(tmpFile.length());
business.setOperation(WebConstant.Wps.USER_OPERATION_NEW);
business.setPrivilege(WebConstant.Wps.PROJECT_PRIVILEGE_QUERY);
business.setPrivilegeQueryUrl(PropUtil.domain + "v1/3rd/wpsPower");
wpsService.saveFile(business);
List<PluginVo.MinutesInfo> minutesInfoList1 = new ArrayList<>();
List<String> wpsPath1 = wpsService.queryVisitUrls(updateMinutes.getTaskId(),(byte) 2,token,null);
if(CollectionUtil.isNotEmpty(wpsPath1)){
wpsPath1.forEach(wps->{
PluginVo.MinutesInfo minutesInfo = new PluginVo.MinutesInfo();
minutesInfo.setWpsPath(wps);
minutesInfo.setDownloadPath(wpsFile.getDownloadUrl());
minutesInfo.setWpsFileId(wpsFile.getId());
minutesInfoList1.add(minutesInfo);
});
}
return minutesInfoList1;
}
return minutesInfoList;

8
tall/src/main/java/com/ccsens/tall/service/WpsService.java

@ -227,18 +227,16 @@ public class WpsService implements IWpsService {
}
String fileType = WebConstant.Wps.getFileType(ext);
Map<String, String> paramMap= new HashMap<>();
paramMap.put("_w_appid", WebConstant.Wps.APPID);
paramMap.put("_w_appid", (String) redisUtil.get(WebConstant.Wps.APPID));
paramMap.put("_w_token", token);
if (CollectionUtil.isNotEmpty(params)) {
paramMap.putAll(params);
}
String newSignature = WpsSignature.getSignature(paramMap, WebConstant.Wps.APPKEY);
StringBuilder fileUrl = new StringBuilder("https://wwo.wps.cn/office/{}/{}?_w_appid=" + WebConstant.Wps.APPID + "&_w_signature={}&_w_token={}");
String newSignature = WpsSignature.getSignature(paramMap, (String) redisUtil.get(WebConstant.Wps.APPKEY));
StringBuilder fileUrl = new StringBuilder("https://wwo.wps.cn/office/{}/{}?_w_appid=" + redisUtil.get(WebConstant.Wps.APPID) + "&_w_signature={}&_w_token={}");
if (CollectionUtil.isNotEmpty(params)) {
params.forEach((k,v) -> fileUrl.append("&").append(k).append("=").append(v));
}
return StrUtil.format(fileUrl, fileType, fileId, newSignature, token);
}

8
tall/src/main/java/com/ccsens/tall/web/DebugController.java

@ -3,6 +3,7 @@ package com.ccsens.tall.web;
import com.ccsens.tall.bean.dto.message.SyncMessageWithStartDto;
import com.ccsens.util.JacksonUtil;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.bean.message.common.InMessage;
import com.ccsens.util.bean.message.common.MessageConstant;
import com.ccsens.util.bean.message.common.MessageRule;
@ -30,6 +31,8 @@ import java.util.Set;
public class DebugController {
@Autowired
private AmqpTemplate rabbitTemplate;
@Resource
private RedisUtil redisUtil;
@Resource
private PlatformTransactionManager transactionManager;
@ -40,7 +43,10 @@ public class DebugController {
})
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public JsonResponse getSmsCode(HttpServletRequest request) throws Exception {
return JsonResponse.newInstance().ok("测试");
redisUtil.set("wps_tall_appId","d12722a7d28e430c889309fa4754aaba");
redisUtil.set("wps_tall_appKey","f273e717247947ba8942a2373b6896c7");
return JsonResponse.newInstance().ok(redisUtil.get("wps_tall_appId"));
}

11
tall/src/main/java/com/ccsens/tall/web/WpsController.java

@ -8,10 +8,7 @@ import com.ccsens.tall.bean.vo.UserVo;
import com.ccsens.tall.bean.vo.WpsVo;
import com.ccsens.tall.service.IUserService;
import com.ccsens.tall.service.IWpsService;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.WebConstant;
import com.ccsens.util.WpsSignature;
import com.ccsens.util.*;
import com.ccsens.util.exception.BaseException;
import io.swagger.annotations.*;
import lombok.Data;
@ -44,6 +41,8 @@ public class WpsController {
private IWpsService wpsService;
@Resource
private IUserService userService;
@Resource
private RedisUtil redisUtil;
@InitBinder
public void initBinder(WebDataBinder binder) {
@ -223,7 +222,7 @@ public class WpsController {
*/
private Map<String, String> initMap(){
Map<String, String> paramMap= new HashMap<>();
paramMap.put("_w_appid", WebConstant.Wps.APPID);
paramMap.put("_w_appid", (String) redisUtil.get(WebConstant.Wps.APPID));
return paramMap;
}
@ -253,7 +252,7 @@ public class WpsController {
}
}
String newSignature = WpsSignature.getSignature(paramMap, WebConstant.Wps.APPKEY);
String newSignature = WpsSignature.getSignature(paramMap,(String) redisUtil.get(WebConstant.Wps.APPKEY));
log.info("newSignature:{}", newSignature);
log.info("参数签名:{}---{}", signature, URLEncoder.encode(signature, CharsetUtil.UTF_8));
if (!newSignature.equals(URLEncoder.encode(signature, CharsetUtil.UTF_8))) {

40
tall/src/main/resources/mapper_raw/SysDomainMapper.xml

@ -5,6 +5,7 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="domain_name" jdbcType="VARCHAR" property="domainName" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="logo_path" jdbcType="VARCHAR" property="logoPath" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="system_name" jdbcType="VARCHAR" property="systemName" />
<result column="backdrop_url" jdbcType="VARCHAR" property="backdropUrl" />
@ -77,8 +78,9 @@
</where>
</sql>
<sql id="Base_Column_List">
id, domain_name, logo, company_name, system_name, backdrop_url, show_calendar, show_project_id,
caption, headline, created_at, updated_at, rec_status, forever_project_id, navigation_bar
id, domain_name, logo, logo_path, company_name, system_name, backdrop_url, show_calendar,
show_project_id, caption, headline, created_at, updated_at, rec_status, forever_project_id,
navigation_bar
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysDomainExample" resultMap="BaseResultMap">
select
@ -112,17 +114,17 @@
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysDomain">
insert into t_sys_domain (id, domain_name, logo,
company_name, system_name, backdrop_url,
show_calendar, show_project_id, caption,
headline, created_at, updated_at,
rec_status, forever_project_id, navigation_bar
)
logo_path, company_name, system_name,
backdrop_url, show_calendar, show_project_id,
caption, headline, created_at,
updated_at, rec_status, forever_project_id,
navigation_bar)
values (#{id,jdbcType=BIGINT}, #{domainName,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR},
#{companyName,jdbcType=VARCHAR}, #{systemName,jdbcType=VARCHAR}, #{backdropUrl,jdbcType=VARCHAR},
#{showCalendar,jdbcType=TINYINT}, #{showProjectId,jdbcType=BIGINT}, #{caption,jdbcType=VARCHAR},
#{headline,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT}, #{foreverProjectId,jdbcType=VARCHAR}, #{navigationBar,jdbcType=TINYINT}
)
#{logoPath,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{systemName,jdbcType=VARCHAR},
#{backdropUrl,jdbcType=VARCHAR}, #{showCalendar,jdbcType=TINYINT}, #{showProjectId,jdbcType=BIGINT},
#{caption,jdbcType=VARCHAR}, #{headline,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{foreverProjectId,jdbcType=VARCHAR},
#{navigationBar,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysDomain">
insert into t_sys_domain
@ -136,6 +138,9 @@
<if test="logo != null">
logo,
</if>
<if test="logoPath != null">
logo_path,
</if>
<if test="companyName != null">
company_name,
</if>
@ -183,6 +188,9 @@
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="logoPath != null">
#{logoPath,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
#{companyName,jdbcType=VARCHAR},
</if>
@ -239,6 +247,9 @@
<if test="record.logo != null">
logo = #{record.logo,jdbcType=VARCHAR},
</if>
<if test="record.logoPath != null">
logo_path = #{record.logoPath,jdbcType=VARCHAR},
</if>
<if test="record.companyName != null">
company_name = #{record.companyName,jdbcType=VARCHAR},
</if>
@ -285,6 +296,7 @@
set id = #{record.id,jdbcType=BIGINT},
domain_name = #{record.domainName,jdbcType=VARCHAR},
logo = #{record.logo,jdbcType=VARCHAR},
logo_path = #{record.logoPath,jdbcType=VARCHAR},
company_name = #{record.companyName,jdbcType=VARCHAR},
system_name = #{record.systemName,jdbcType=VARCHAR},
backdrop_url = #{record.backdropUrl,jdbcType=VARCHAR},
@ -310,6 +322,9 @@
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="logoPath != null">
logo_path = #{logoPath,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
company_name = #{companyName,jdbcType=VARCHAR},
</if>
@ -353,6 +368,7 @@
update t_sys_domain
set domain_name = #{domainName,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
logo_path = #{logoPath,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
system_name = #{systemName,jdbcType=VARCHAR},
backdrop_url = #{backdropUrl,jdbcType=VARCHAR},

2
util/src/main/java/com/ccsens/util/CodeEnum.java

@ -149,6 +149,8 @@ public enum CodeEnum {
JOINED_SAME(127,"您已经参加同类型的比赛了,不能再重复参加参赛", true),
PLAYER_INFO_ALREADY(127,"您已经有了报名信息,请不要重复提交", true),
GAME_TIME_DUE(128,"您的游戏已到期,请重新购买", true),
;
public CodeEnum addMsg(String msg){

8
util/src/main/java/com/ccsens/util/WebConstant.java

@ -11,7 +11,7 @@ public class WebConstant {
public static final byte STATUS_EXIT = 0;
/**数据已删除*/
public static final byte STATUS_DELETE = 1;
public static final String IMG_TYPE = "bmp,jpg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp";
public static final String IMG_TYPE = "bmp,jpg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp,jpeg";
/**属性名*/
public static class Field{
@ -39,8 +39,10 @@ public class WebConstant {
}
public static final class Wps{
public static final String APPID = "09d77d2eb919438e8ae4f2a9ec6ec8dd";
public static final String APPKEY = "1b52d9ef8b1c4019be49f211b84c4f90";
// public static final String APPID = "09d77d2eb919438e8ae4f2a9ec6ec8dd";
// public static final String APPKEY = "1b52d9ef8b1c4019be49f211b84c4f90";
public static final String APPID = "wps_tall_appId";
public static final String APPKEY = "wps_tall_appKey";
public static final String PERMISSION_READ = "read";
public static final String PERMISSION_WRITE = "write";
public static final String FILE_TYPE_ALL = "doc, dot, wps, wpt, docx, dotx, docm, dotm, xls, xlt, et, xlsx, xltx, csv, xlsm, xltm, ppt,pptx,pptm,ppsx,ppsm,pps,potx,potm,dpt,dps, pdf";

14
util/src/main/java/com/ccsens/util/WpsSignature.java

@ -18,15 +18,6 @@ import java.util.*;
*/
public class WpsSignature {
public static void main(String args[]) throws UnsupportedEncodingException {
Map<String, String> paramMap= new HashMap<>();
paramMap.put("_w_appid", WebConstant.Wps.APPID);
// paramMap.put("_w_fname", "222.docx");
// paramMap.put("_w_userid", "id1000");
String signature = getSignature(paramMap,WebConstant.Wps.APPKEY);
System.out.println(getUrlParam(paramMap) + "&_w_signature=" + signature);
}
public static String getUrlParam(Map<String, String> params) throws UnsupportedEncodingException {
@ -57,11 +48,10 @@ public class WpsSignature {
// 构造签名的源字符串
StringBuilder contents=new StringBuilder("");
for (String key : keys) {
if (key=="_w_signature"){
if ("_w_signature".equals(key)){
continue;
}
contents.append(key+"=").append(params.get(key));
System.out.println("key:"+key+",value:"+params.get(key));
contents.append(key).append("=").append(params.get(key));
}
contents.append("_w_secretkey=").append(appSecret);

3
util/src/test/java/com/ccsens/util/Base64Test.java

@ -33,8 +33,7 @@ public class Base64Test {
@Test
public void test02() throws Exception {
String s = "aassccxx";
System.out.println(s.substring(s.length() - 4));
}

6
util/src/test/java/com/ccsens/util/TestQrCord.java

@ -1,6 +1,5 @@
package com.ccsens.util;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ZipUtil;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
@ -29,8 +28,9 @@ public class TestQrCord {
// String fileName = "zzz/" + DateUtil.today() + "/" + i+"组" + ".png";
// String text = "https://www.tall.wiki/pt-dev/respond?groupId="+i+"&groupName="+i+"组";
String text = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7af1bf1e14facf82&redirect_uri=http://www.tall.wiki/pt-dev/vote&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
String fileName = "zzz/" + DateUtil.today() + "/投票.png";
// String text = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7af1bf1e14facf82&redirect_uri=http://www.tall.wiki/pt-dev/vote&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
String text = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7af1bf1e14facf82&redirect_uri=http://www.tall.wiki/compete&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
String fileName = "zzz/" + "远程比赛.png";
QRCodeWriter qrCodeWriter = new QRCodeWriter();

Loading…
Cancel
Save