Browse Source

20200903_修改表写错的单词

master
zy_Java 5 years ago
parent
commit
47d363e91a
  1. 12
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeam.java
  2. 48
      mt/src/main/java/com/ccsens/mt/bean/po/CompeteTeamExample.java
  3. 17
      mt/src/main/java/com/ccsens/mt/service/CompeteService.java
  4. 5
      mt/src/main/java/com/ccsens/mt/util/Constant.java
  5. 28
      mt/src/main/resources/mapper_raw/CompeteTeamMapper.xml

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

@ -8,7 +8,7 @@ public class CompeteTeam implements Serializable {
private Long creator; private Long creator;
private Long porjectId; private Long projectId;
private Long competeTimeId; private Long competeTimeId;
@ -42,12 +42,12 @@ public class CompeteTeam implements Serializable {
this.creator = creator; this.creator = creator;
} }
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() {
@ -114,7 +114,7 @@ public class CompeteTeam implements Serializable {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", creator=").append(creator); sb.append(", creator=").append(creator);
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/CompeteTeamExample.java

@ -225,63 +225,63 @@ public class CompeteTeamExample {
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;
} }

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

@ -1,8 +1,12 @@
package com.ccsens.mt.service; package com.ccsens.mt.service;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.mt.bean.dto.CompeteDto; import com.ccsens.mt.bean.dto.CompeteDto;
import com.ccsens.mt.bean.po.CompeteCompany;
import com.ccsens.mt.bean.po.CompeteCompanyExample;
import com.ccsens.mt.bean.vo.CompeteVo; import com.ccsens.mt.bean.vo.CompeteVo;
import com.ccsens.mt.persist.dao.CompeteTimeDao; import com.ccsens.mt.persist.dao.CompeteTimeDao;
import com.ccsens.mt.persist.mapper.CompeteCompanyMapper;
import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.util.bean.dto.QueryDto;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -16,6 +20,8 @@ import java.util.List;
public class CompeteService implements ICompeteService{ public class CompeteService implements ICompeteService{
@Resource @Resource
private CompeteTimeDao competeTimeDao; private CompeteTimeDao competeTimeDao;
@Resource
private CompeteCompanyMapper competeCompanyMapper;
/** /**
* 查看第几届 * 查看第几届
@ -49,8 +55,17 @@ public class CompeteService implements ICompeteService{
*/ */
@Override @Override
public void syncCompeteCompany(QueryDto<CompeteDto.CompeteType> params) { public void syncCompeteCompany(QueryDto<CompeteDto.CompeteType> params) {
CompeteDto.CompeteType competeType = params.getParam();
//根据type查找数据库内所有参赛单位 //根据type查找数据库内所有参赛单位
//将单位信息存入redis CompeteCompanyExample competeCompanyExample = new CompeteCompanyExample();
competeCompanyExample.createCriteria().andTypeEqualTo((byte) competeType.getType());
List<CompeteCompany> competeCompanyList = competeCompanyMapper.selectByExample(competeCompanyExample);
if(CollectionUtil.isNotEmpty(competeCompanyList)){
competeCompanyList.forEach(competeCompany -> {
//将单位信息存入redis
// String companyKey = Constant.
});
}
} }
/** /**

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

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

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

@ -4,7 +4,7 @@
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteTeam"> <resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteTeam">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="creator" jdbcType="BIGINT" property="creator" /> <result column="creator" jdbcType="BIGINT" property="creator" />
<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" />
@ -72,7 +72,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, creator, porject_id, compete_time_id, gender_group, certificate, qr_code, created_at, id, creator, project_id, compete_time_id, gender_group, certificate, qr_code, created_at,
updated_at, rec_status updated_at, rec_status
</sql> </sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteTeamExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteTeamExample" resultMap="BaseResultMap">
@ -106,11 +106,11 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteTeam"> <insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteTeam">
insert into t_compete_team (id, creator, porject_id, insert into t_compete_team (id, creator, project_id,
compete_time_id, gender_group, certificate, compete_time_id, gender_group, certificate,
qr_code, created_at, updated_at, qr_code, created_at, updated_at,
rec_status) rec_status)
values (#{id,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{porjectId,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{competeTimeId,jdbcType=BIGINT}, #{genderGroup,jdbcType=TINYINT}, #{certificate,jdbcType=TINYINT}, #{competeTimeId,jdbcType=BIGINT}, #{genderGroup,jdbcType=TINYINT}, #{certificate,jdbcType=TINYINT},
#{qrCode,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{qrCode,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT}) #{recStatus,jdbcType=TINYINT})
@ -124,8 +124,8 @@
<if test="creator != null"> <if test="creator != null">
creator, creator,
</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,
@ -156,8 +156,8 @@
<if test="creator != null"> <if test="creator != null">
#{creator,jdbcType=BIGINT}, #{creator,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},
@ -197,8 +197,8 @@
<if test="record.creator != null"> <if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT}, creator = #{record.creator,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},
@ -230,7 +230,7 @@
update t_compete_team update t_compete_team
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=BIGINT}, creator = #{record.creator,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},
@ -248,8 +248,8 @@
<if test="creator != null"> <if test="creator != null">
creator = #{creator,jdbcType=BIGINT}, creator = #{creator,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},
@ -278,7 +278,7 @@
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteTeam"> <update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteTeam">
update t_compete_team update t_compete_team
set creator = #{creator,jdbcType=BIGINT}, set creator = #{creator,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