Browse Source

confict

master
zhizhi wu 5 years ago
parent
commit
bc749746d8
  1. 3
      mt/src/main/java/com/ccsens/mt/api/CompeteController.java
  2. 12
      mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayer.java
  3. 58
      mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerExample.java
  4. 12
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayer.java
  5. 48
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayerExample.java
  6. 41
      mt/src/main/java/com/ccsens/mt/service/CompeteService.java
  7. 2
      mt/src/main/java/com/ccsens/mt/util/Constant.java
  8. 28
      mt/src/main/resources/mapper_raw/CompetePlayerMapper.xml
  9. 28
      mt/src/main/resources/mapper_raw/CompeteProjectPlayerMapper.xml

3
mt/src/main/java/com/ccsens/mt/api/CompeteController.java

@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException;
import java.util.List; import java.util.List;
/** /**
@ -88,7 +89,7 @@ public class CompeteController {
@MustLogin @MustLogin
@ApiOperation(value = "提交选择的比赛项目", notes = "") @ApiOperation(value = "提交选择的比赛项目", notes = "")
@RequestMapping(value = "/save/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/save/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<CompeteVo.CompetePlayerInfo> saveCompeteProject(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteProject> params) { public JsonResponse<CompeteVo.CompetePlayerInfo> saveCompeteProject(@ApiParam @Validated @RequestBody QueryDto<CompeteDto.CompeteProject> params) throws IOException {
log.info("提交选择的比赛项目:{}",params); log.info("提交选择的比赛项目:{}",params);
CompeteVo.CompetePlayerInfo competePlayerInfo = competeService.saveCompeteProject(params); CompeteVo.CompetePlayerInfo competePlayerInfo = competeService.saveCompeteProject(params);
return JsonResponse.newInstance().ok(competePlayerInfo); return JsonResponse.newInstance().ok(competePlayerInfo);

12
mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayer.java

@ -24,7 +24,7 @@ public class CompetePlayer implements Serializable {
private Long competeGroupId; private Long competeGroupId;
private String companyName; private Long companyId;
private Byte authorization; private Byte authorization;
@ -116,12 +116,12 @@ public class CompetePlayer implements Serializable {
this.competeGroupId = competeGroupId; this.competeGroupId = competeGroupId;
} }
public String getCompanyName() { public Long getCompanyId() {
return companyName; return companyId;
} }
public void setCompanyName(String companyName) { public void setCompanyId(Long companyId) {
this.companyName = companyName == null ? null : companyName.trim(); this.companyId = companyId;
} }
public Byte getAuthorization() { public Byte getAuthorization() {
@ -172,7 +172,7 @@ public class CompetePlayer implements Serializable {
sb.append(", idCardBack=").append(idCardBack); sb.append(", idCardBack=").append(idCardBack);
sb.append(", proveImg=").append(proveImg); sb.append(", proveImg=").append(proveImg);
sb.append(", competeGroupId=").append(competeGroupId); sb.append(", competeGroupId=").append(competeGroupId);
sb.append(", companyName=").append(companyName); sb.append(", companyId=").append(companyId);
sb.append(", authorization=").append(authorization); sb.append(", authorization=").append(authorization);
sb.append(", createdAt=").append(createdAt); sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt); sb.append(", updatedAt=").append(updatedAt);

58
mt/src/main/java/com/ccsens/mt/bean/po/CompetePlayerExample.java

@ -765,73 +765,63 @@ public class CompetePlayerExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameIsNull() { public Criteria andCompanyIdIsNull() {
addCriterion("company_name is null"); addCriterion("company_id is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameIsNotNull() { public Criteria andCompanyIdIsNotNull() {
addCriterion("company_name is not null"); addCriterion("company_id is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameEqualTo(String value) { public Criteria andCompanyIdEqualTo(Long value) {
addCriterion("company_name =", value, "companyName"); addCriterion("company_id =", value, "companyId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameNotEqualTo(String value) { public Criteria andCompanyIdNotEqualTo(Long value) {
addCriterion("company_name <>", value, "companyName"); addCriterion("company_id <>", value, "companyId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameGreaterThan(String value) { public Criteria andCompanyIdGreaterThan(Long value) {
addCriterion("company_name >", value, "companyName"); addCriterion("company_id >", value, "companyId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameGreaterThanOrEqualTo(String value) { public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) {
addCriterion("company_name >=", value, "companyName"); addCriterion("company_id >=", value, "companyId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameLessThan(String value) { public Criteria andCompanyIdLessThan(Long value) {
addCriterion("company_name <", value, "companyName"); addCriterion("company_id <", value, "companyId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameLessThanOrEqualTo(String value) { public Criteria andCompanyIdLessThanOrEqualTo(Long value) {
addCriterion("company_name <=", value, "companyName"); addCriterion("company_id <=", value, "companyId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameLike(String value) { public Criteria andCompanyIdIn(List<Long> values) {
addCriterion("company_name like", value, "companyName"); addCriterion("company_id in", values, "companyId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameNotLike(String value) { public Criteria andCompanyIdNotIn(List<Long> values) {
addCriterion("company_name not like", value, "companyName"); addCriterion("company_id not in", values, "companyId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameIn(List<String> values) { public Criteria andCompanyIdBetween(Long value1, Long value2) {
addCriterion("company_name in", values, "companyName"); addCriterion("company_id between", value1, value2, "companyId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCompanyNameNotIn(List<String> values) { public Criteria andCompanyIdNotBetween(Long value1, Long value2) {
addCriterion("company_name not in", values, "companyName"); addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCompanyNameBetween(String value1, String value2) {
addCriterion("company_name between", value1, value2, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameNotBetween(String value1, String value2) {
addCriterion("company_name not between", value1, value2, "companyName");
return (Criteria) this; return (Criteria) this;
} }

12
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayer.java

@ -8,7 +8,7 @@ public class CompeteProjectPlayer implements Serializable {
private Long playerId; private Long playerId;
private Long porjectId; private Long projectId;
private Long competeTimeId; private Long competeTimeId;
@ -40,12 +40,12 @@ public class CompeteProjectPlayer implements Serializable {
this.playerId = playerId; this.playerId = playerId;
} }
public Long getPorjectId() { public Long getProjectId() {
return porjectId; return projectId;
} }
public void setPorjectId(Long porjectId) { public void setProjectId(Long projectId) {
this.porjectId = porjectId; this.projectId = projectId;
} }
public Long getCompeteTimeId() { public Long getCompeteTimeId() {
@ -104,7 +104,7 @@ public class CompeteProjectPlayer implements Serializable {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", playerId=").append(playerId); sb.append(", playerId=").append(playerId);
sb.append(", porjectId=").append(porjectId); sb.append(", projectId=").append(projectId);
sb.append(", competeTimeId=").append(competeTimeId); sb.append(", competeTimeId=").append(competeTimeId);
sb.append(", genderGroup=").append(genderGroup); sb.append(", genderGroup=").append(genderGroup);
sb.append(", certificate=").append(certificate); sb.append(", certificate=").append(certificate);

48
mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectPlayerExample.java

@ -225,63 +225,63 @@ public class CompeteProjectPlayerExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdIsNull() { public Criteria andProjectIdIsNull() {
addCriterion("porject_id is null"); addCriterion("project_id is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdIsNotNull() { public Criteria andProjectIdIsNotNull() {
addCriterion("porject_id is not null"); addCriterion("project_id is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdEqualTo(Long value) { public Criteria andProjectIdEqualTo(Long value) {
addCriterion("porject_id =", value, "porjectId"); addCriterion("project_id =", value, "projectId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdNotEqualTo(Long value) { public Criteria andProjectIdNotEqualTo(Long value) {
addCriterion("porject_id <>", value, "porjectId"); addCriterion("project_id <>", value, "projectId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdGreaterThan(Long value) { public Criteria andProjectIdGreaterThan(Long value) {
addCriterion("porject_id >", value, "porjectId"); addCriterion("project_id >", value, "projectId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdGreaterThanOrEqualTo(Long value) { public Criteria andProjectIdGreaterThanOrEqualTo(Long value) {
addCriterion("porject_id >=", value, "porjectId"); addCriterion("project_id >=", value, "projectId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdLessThan(Long value) { public Criteria andProjectIdLessThan(Long value) {
addCriterion("porject_id <", value, "porjectId"); addCriterion("project_id <", value, "projectId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdLessThanOrEqualTo(Long value) { public Criteria andProjectIdLessThanOrEqualTo(Long value) {
addCriterion("porject_id <=", value, "porjectId"); addCriterion("project_id <=", value, "projectId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdIn(List<Long> values) { public Criteria andProjectIdIn(List<Long> values) {
addCriterion("porject_id in", values, "porjectId"); addCriterion("project_id in", values, "projectId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdNotIn(List<Long> values) { public Criteria andProjectIdNotIn(List<Long> values) {
addCriterion("porject_id not in", values, "porjectId"); addCriterion("project_id not in", values, "projectId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdBetween(Long value1, Long value2) { public Criteria andProjectIdBetween(Long value1, Long value2) {
addCriterion("porject_id between", value1, value2, "porjectId"); addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPorjectIdNotBetween(Long value1, Long value2) { public Criteria andProjectIdNotBetween(Long value1, Long value2) {
addCriterion("porject_id not between", value1, value2, "porjectId"); addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this; return (Criteria) this;
} }

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

@ -13,6 +13,9 @@ import com.ccsens.util.CodeEnum;
import com.ccsens.mt.persist.dao.CompeteTimeDao; import com.ccsens.mt.persist.dao.CompeteTimeDao;
import com.ccsens.util.PropUtil; import com.ccsens.util.PropUtil;
import com.ccsens.util.QrCodeUtil; import com.ccsens.util.QrCodeUtil;
import com.ccsens.mt.persist.mapper.CompeteCompanyMapper;
import com.ccsens.mt.util.Constant;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException; import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -22,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -35,6 +39,8 @@ public class CompeteService implements ICompeteService{
private CompeteTimeDao competeTimeDao; private CompeteTimeDao competeTimeDao;
@Resource @Resource
private CompeteCompanyMapper competeCompanyMapper; private CompeteCompanyMapper competeCompanyMapper;
@Resource
private RedisUtil redisUtil;
@Resource @Resource
private CompeteTeamDao competeTeamDao; private CompeteTeamDao competeTeamDao;
@ -75,8 +81,21 @@ public class CompeteService implements ICompeteService{
*/ */
@Override @Override
public List<CompeteVo.CompeteCompany> queryCompeteCompany(QueryDto<CompeteDto.CompeteTypeAndKey> params) { public List<CompeteVo.CompeteCompany> queryCompeteCompany(QueryDto<CompeteDto.CompeteTypeAndKey> params) {
CompeteDto.CompeteTypeAndKey competeTypeAndKey = params.getParam();
return null; String key = competeTypeAndKey.getType() + Constant.Redis.COMPETE_COMPANY;
Object list = redisUtil.lGet(key,0,-1);
List<CompeteCompany> competeCompanyList = (List<CompeteCompany>) list;
List<CompeteVo.CompeteCompany> companyList = new ArrayList<>();
System.out.println(competeCompanyList);
competeCompanyList.forEach(competeCompany -> {
if(competeCompany.getName().contains(competeTypeAndKey.getKey())){
CompeteVo.CompeteCompany company = new CompeteVo.CompeteCompany();
company.setGroupId(competeCompany.getId());
company.setGroupName(competeCompany.getName());
companyList.add(company);
}
});
return companyList;
} }
/** /**
@ -90,10 +109,8 @@ public class CompeteService implements ICompeteService{
competeCompanyExample.createCriteria().andTypeEqualTo((byte) competeType.getType()); competeCompanyExample.createCriteria().andTypeEqualTo((byte) competeType.getType());
List<CompeteCompany> competeCompanyList = competeCompanyMapper.selectByExample(competeCompanyExample); List<CompeteCompany> competeCompanyList = competeCompanyMapper.selectByExample(competeCompanyExample);
if(CollectionUtil.isNotEmpty(competeCompanyList)){ if(CollectionUtil.isNotEmpty(competeCompanyList)){
competeCompanyList.forEach(competeCompany -> { String key = competeType.getType() + Constant.Redis.COMPETE_COMPANY;
//将单位信息存入redis redisUtil.lSet(key,competeCompanyList,Constant.Redis.COMPETE_COMPANY_TIME);
// String companyKey = Constant.
});
} }
} }
@ -137,7 +154,7 @@ public class CompeteService implements ICompeteService{
CompeteProjectPlayer projectPlayer = new CompeteProjectPlayer(); CompeteProjectPlayer projectPlayer = new CompeteProjectPlayer();
projectPlayer.setId(snowflake.nextId()); projectPlayer.setId(snowflake.nextId());
projectPlayer.setPlayerId(player.getId()); projectPlayer.setPlayerId(player.getId());
projectPlayer.setPorjectId(project.getId()); projectPlayer.setProjectId(project.getId());
projectPlayer.setCompeteTimeId(params.getParam().getCompeteTimeId()); projectPlayer.setCompeteTimeId(params.getParam().getCompeteTimeId());
projectPlayer.setGenderGroup(player.getGender()); projectPlayer.setGenderGroup(player.getGender());
projectPlayer.setCertificate(params.getParam().getCertificate()); projectPlayer.setCertificate(params.getParam().getCertificate());
@ -299,12 +316,12 @@ public class CompeteService implements ICompeteService{
// 同单位同组别 // 同单位同组别
// 1.与队长同单位且同组别 // 1.与队长同单位且同组别
if (pageLeader) { if (pageLeader) {
if (!player.getCompanyName().equals(creator.getCompanyName())) { if (!player.getCompanyId().equals(creator.getCompanyId())) {
log.info("单位不一样:{},{}",player.getCompanyName(), creator.getCompanyName()); log.info("单位不一样:{},{}",player.getCompanyId(), creator.getCompanyId());
throw new BaseException(CodeEnum.TEAM_COMPANY_NOT_SAME); throw new BaseException(CodeEnum.TEAM_COMPANY_NOT_SAME);
} }
if (player.getCompeteGroupId().longValue() != creator.getCompeteGroupId().longValue()) { if (player.getCompeteGroupId().longValue() != creator.getCompeteGroupId().longValue()) {
log.info("组别不一样:{},{}",player.getCompanyName(), creator.getCompanyName()); log.info("组别不一样:{},{}",player.getCompanyId(), creator.getCompanyId());
throw new BaseException(CodeEnum.TEAM_GROUP_NOT_SAME); throw new BaseException(CodeEnum.TEAM_GROUP_NOT_SAME);
} }
} }
@ -317,8 +334,8 @@ public class CompeteService implements ICompeteService{
// 同单位不限组别 // 同单位不限组别
// 1.用户与队长同单位 // 1.用户与队长同单位
if (pageLeader) { if (pageLeader) {
if (!player.getCompanyName().equals(creator.getCompanyName())) { if (!player.getCompanyId().equals(creator.getCompanyId())) {
log.info("单位不一样:{},{}", player.getCompanyName(), creator.getCompanyName()); log.info("单位不一样:{},{}", player.getCompanyId(), creator.getCompanyId());
throw new BaseException(CodeEnum.TEAM_COMPANY_NOT_SAME); throw new BaseException(CodeEnum.TEAM_COMPANY_NOT_SAME);
} }
} }

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

@ -24,7 +24,7 @@ public class Constant {
//投票已结束 //投票已结束
public final static int VOTE_START = 1; public final static int VOTE_START = 1;
// 远程比赛参赛单位 // 远程比赛参赛单位
public final static String COMPETE_COMPANY = "_compete_company_"; public final static String COMPETE_COMPANY = "_compete_company";
// 远程比赛参赛单位存在时间10天 // 远程比赛参赛单位存在时间10天
public final static long COMPETE_COMPANY_TIME = 10 * 24 * 60 * 60; public final static long COMPETE_COMPANY_TIME = 10 * 24 * 60 * 60;
} }

28
mt/src/main/resources/mapper_raw/CompetePlayerMapper.xml

@ -12,7 +12,7 @@
<result column="id_card_back" jdbcType="VARCHAR" property="idCardBack" /> <result column="id_card_back" jdbcType="VARCHAR" property="idCardBack" />
<result column="prove_img" jdbcType="VARCHAR" property="proveImg" /> <result column="prove_img" jdbcType="VARCHAR" property="proveImg" />
<result column="compete_group_id" jdbcType="BIGINT" property="competeGroupId" /> <result column="compete_group_id" jdbcType="BIGINT" property="competeGroupId" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" /> <result column="company_id" jdbcType="BIGINT" property="companyId" />
<result column="authorization" jdbcType="TINYINT" property="authorization" /> <result column="authorization" jdbcType="TINYINT" property="authorization" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
@ -78,7 +78,7 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, user_id, name, id_card, phone, gender, id_card_front, id_card_back, prove_img, id, user_id, name, id_card, phone, gender, id_card_front, id_card_back, prove_img,
compete_group_id, company_name, authorization, created_at, updated_at, rec_status compete_group_id, company_id, authorization, created_at, updated_at, rec_status
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompetePlayerExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompetePlayerExample" resultMap="BaseResultMap">
select select
@ -114,13 +114,13 @@
insert into t_compete_player (id, user_id, name, insert into t_compete_player (id, user_id, name,
id_card, phone, gender, id_card, phone, gender,
id_card_front, id_card_back, prove_img, id_card_front, id_card_back, prove_img,
compete_group_id, company_name, authorization, compete_group_id, company_id, authorization,
created_at, updated_at, rec_status created_at, updated_at, rec_status
) )
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{idCard,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, #{idCard,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT},
#{idCardFront,jdbcType=VARCHAR}, #{idCardBack,jdbcType=VARCHAR}, #{proveImg,jdbcType=VARCHAR}, #{idCardFront,jdbcType=VARCHAR}, #{idCardBack,jdbcType=VARCHAR}, #{proveImg,jdbcType=VARCHAR},
#{competeGroupId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{authorization,jdbcType=TINYINT}, #{competeGroupId,jdbcType=BIGINT}, #{companyId,jdbcType=BIGINT}, #{authorization,jdbcType=TINYINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
) )
</insert> </insert>
@ -157,8 +157,8 @@
<if test="competeGroupId != null"> <if test="competeGroupId != null">
compete_group_id, compete_group_id,
</if> </if>
<if test="companyName != null"> <if test="companyId != null">
company_name, company_id,
</if> </if>
<if test="authorization != null"> <if test="authorization != null">
authorization, authorization,
@ -204,8 +204,8 @@
<if test="competeGroupId != null"> <if test="competeGroupId != null">
#{competeGroupId,jdbcType=BIGINT}, #{competeGroupId,jdbcType=BIGINT},
</if> </if>
<if test="companyName != null"> <if test="companyId != null">
#{companyName,jdbcType=VARCHAR}, #{companyId,jdbcType=BIGINT},
</if> </if>
<if test="authorization != null"> <if test="authorization != null">
#{authorization,jdbcType=TINYINT}, #{authorization,jdbcType=TINYINT},
@ -260,8 +260,8 @@
<if test="record.competeGroupId != null"> <if test="record.competeGroupId != null">
compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, compete_group_id = #{record.competeGroupId,jdbcType=BIGINT},
</if> </if>
<if test="record.companyName != null"> <if test="record.companyId != null">
company_name = #{record.companyName,jdbcType=VARCHAR}, company_id = #{record.companyId,jdbcType=BIGINT},
</if> </if>
<if test="record.authorization != null"> <if test="record.authorization != null">
authorization = #{record.authorization,jdbcType=TINYINT}, authorization = #{record.authorization,jdbcType=TINYINT},
@ -292,7 +292,7 @@
id_card_back = #{record.idCardBack,jdbcType=VARCHAR}, id_card_back = #{record.idCardBack,jdbcType=VARCHAR},
prove_img = #{record.proveImg,jdbcType=VARCHAR}, prove_img = #{record.proveImg,jdbcType=VARCHAR},
compete_group_id = #{record.competeGroupId,jdbcType=BIGINT}, compete_group_id = #{record.competeGroupId,jdbcType=BIGINT},
company_name = #{record.companyName,jdbcType=VARCHAR}, company_id = #{record.companyId,jdbcType=BIGINT},
authorization = #{record.authorization,jdbcType=TINYINT}, authorization = #{record.authorization,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
@ -331,8 +331,8 @@
<if test="competeGroupId != null"> <if test="competeGroupId != null">
compete_group_id = #{competeGroupId,jdbcType=BIGINT}, compete_group_id = #{competeGroupId,jdbcType=BIGINT},
</if> </if>
<if test="companyName != null"> <if test="companyId != null">
company_name = #{companyName,jdbcType=VARCHAR}, company_id = #{companyId,jdbcType=BIGINT},
</if> </if>
<if test="authorization != null"> <if test="authorization != null">
authorization = #{authorization,jdbcType=TINYINT}, authorization = #{authorization,jdbcType=TINYINT},
@ -360,7 +360,7 @@
id_card_back = #{idCardBack,jdbcType=VARCHAR}, id_card_back = #{idCardBack,jdbcType=VARCHAR},
prove_img = #{proveImg,jdbcType=VARCHAR}, prove_img = #{proveImg,jdbcType=VARCHAR},
compete_group_id = #{competeGroupId,jdbcType=BIGINT}, compete_group_id = #{competeGroupId,jdbcType=BIGINT},
company_name = #{companyName,jdbcType=VARCHAR}, company_id = #{companyId,jdbcType=BIGINT},
authorization = #{authorization,jdbcType=TINYINT}, authorization = #{authorization,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP}, created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP},

28
mt/src/main/resources/mapper_raw/CompeteProjectPlayerMapper.xml

@ -4,7 +4,7 @@
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteProjectPlayer"> <resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteProjectPlayer">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="player_id" jdbcType="BIGINT" property="playerId" /> <result column="player_id" jdbcType="BIGINT" property="playerId" />
<result column="porject_id" jdbcType="BIGINT" property="porjectId" /> <result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="compete_time_id" jdbcType="BIGINT" property="competeTimeId" /> <result column="compete_time_id" jdbcType="BIGINT" property="competeTimeId" />
<result column="gender_group" jdbcType="TINYINT" property="genderGroup" /> <result column="gender_group" jdbcType="TINYINT" property="genderGroup" />
<result column="certificate" jdbcType="TINYINT" property="certificate" /> <result column="certificate" jdbcType="TINYINT" property="certificate" />
@ -71,7 +71,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, player_id, porject_id, compete_time_id, gender_group, certificate, created_at, id, player_id, project_id, compete_time_id, gender_group, certificate, created_at,
updated_at, rec_status updated_at, rec_status
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteProjectPlayerExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteProjectPlayerExample" resultMap="BaseResultMap">
@ -105,11 +105,11 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteProjectPlayer"> <insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteProjectPlayer">
insert into t_compete_project_player (id, player_id, porject_id, insert into t_compete_project_player (id, player_id, project_id,
compete_time_id, gender_group, certificate, compete_time_id, gender_group, certificate,
created_at, updated_at, rec_status created_at, updated_at, rec_status
) )
values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{porjectId,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{competeTimeId,jdbcType=BIGINT}, #{genderGroup,jdbcType=TINYINT}, #{certificate,jdbcType=TINYINT}, #{competeTimeId,jdbcType=BIGINT}, #{genderGroup,jdbcType=TINYINT}, #{certificate,jdbcType=TINYINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
) )
@ -123,8 +123,8 @@
<if test="playerId != null"> <if test="playerId != null">
player_id, player_id,
</if> </if>
<if test="porjectId != null"> <if test="projectId != null">
porject_id, project_id,
</if> </if>
<if test="competeTimeId != null"> <if test="competeTimeId != null">
compete_time_id, compete_time_id,
@ -152,8 +152,8 @@
<if test="playerId != null"> <if test="playerId != null">
#{playerId,jdbcType=BIGINT}, #{playerId,jdbcType=BIGINT},
</if> </if>
<if test="porjectId != null"> <if test="projectId != null">
#{porjectId,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
</if> </if>
<if test="competeTimeId != null"> <if test="competeTimeId != null">
#{competeTimeId,jdbcType=BIGINT}, #{competeTimeId,jdbcType=BIGINT},
@ -190,8 +190,8 @@
<if test="record.playerId != null"> <if test="record.playerId != null">
player_id = #{record.playerId,jdbcType=BIGINT}, player_id = #{record.playerId,jdbcType=BIGINT},
</if> </if>
<if test="record.porjectId != null"> <if test="record.projectId != null">
porject_id = #{record.porjectId,jdbcType=BIGINT}, project_id = #{record.projectId,jdbcType=BIGINT},
</if> </if>
<if test="record.competeTimeId != null"> <if test="record.competeTimeId != null">
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
@ -220,7 +220,7 @@
update t_compete_project_player update t_compete_project_player
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
player_id = #{record.playerId,jdbcType=BIGINT}, player_id = #{record.playerId,jdbcType=BIGINT},
porject_id = #{record.porjectId,jdbcType=BIGINT}, project_id = #{record.projectId,jdbcType=BIGINT},
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT}, compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
gender_group = #{record.genderGroup,jdbcType=TINYINT}, gender_group = #{record.genderGroup,jdbcType=TINYINT},
certificate = #{record.certificate,jdbcType=TINYINT}, certificate = #{record.certificate,jdbcType=TINYINT},
@ -237,8 +237,8 @@
<if test="playerId != null"> <if test="playerId != null">
player_id = #{playerId,jdbcType=BIGINT}, player_id = #{playerId,jdbcType=BIGINT},
</if> </if>
<if test="porjectId != null"> <if test="projectId != null">
porject_id = #{porjectId,jdbcType=BIGINT}, project_id = #{projectId,jdbcType=BIGINT},
</if> </if>
<if test="competeTimeId != null"> <if test="competeTimeId != null">
compete_time_id = #{competeTimeId,jdbcType=BIGINT}, compete_time_id = #{competeTimeId,jdbcType=BIGINT},
@ -264,7 +264,7 @@
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteProjectPlayer"> <update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteProjectPlayer">
update t_compete_project_player update t_compete_project_player
set player_id = #{playerId,jdbcType=BIGINT}, set player_id = #{playerId,jdbcType=BIGINT},
porject_id = #{porjectId,jdbcType=BIGINT}, project_id = #{projectId,jdbcType=BIGINT},
compete_time_id = #{competeTimeId,jdbcType=BIGINT}, compete_time_id = #{competeTimeId,jdbcType=BIGINT},
gender_group = #{genderGroup,jdbcType=TINYINT}, gender_group = #{genderGroup,jdbcType=TINYINT},
certificate = #{certificate,jdbcType=TINYINT}, certificate = #{certificate,jdbcType=TINYINT},

Loading…
Cancel
Save