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 porjectId;
private Long projectId;
private Long competeTimeId;
@ -42,12 +42,12 @@ public class CompeteTeam implements Serializable {
this.creator = creator;
}
public Long getPorjectId() {
return porjectId;
public Long getProjectId() {
return projectId;
}
public void setPorjectId(Long porjectId) {
this.porjectId = porjectId;
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public Long getCompeteTimeId() {
@ -114,7 +114,7 @@ public class CompeteTeam implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", creator=").append(creator);
sb.append(", porjectId=").append(porjectId);
sb.append(", projectId=").append(projectId);
sb.append(", competeTimeId=").append(competeTimeId);
sb.append(", genderGroup=").append(genderGroup);
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;
}
public Criteria andPorjectIdIsNull() {
addCriterion("porject_id is null");
public Criteria andProjectIdIsNull() {
addCriterion("project_id is null");
return (Criteria) this;
}
public Criteria andPorjectIdIsNotNull() {
addCriterion("porject_id is not null");
public Criteria andProjectIdIsNotNull() {
addCriterion("project_id is not null");
return (Criteria) this;
}
public Criteria andPorjectIdEqualTo(Long value) {
addCriterion("porject_id =", value, "porjectId");
public Criteria andProjectIdEqualTo(Long value) {
addCriterion("project_id =", value, "projectId");
return (Criteria) this;
}
public Criteria andPorjectIdNotEqualTo(Long value) {
addCriterion("porject_id <>", value, "porjectId");
public Criteria andProjectIdNotEqualTo(Long value) {
addCriterion("project_id <>", value, "projectId");
return (Criteria) this;
}
public Criteria andPorjectIdGreaterThan(Long value) {
addCriterion("porject_id >", value, "porjectId");
public Criteria andProjectIdGreaterThan(Long value) {
addCriterion("project_id >", value, "projectId");
return (Criteria) this;
}
public Criteria andPorjectIdGreaterThanOrEqualTo(Long value) {
addCriterion("porject_id >=", value, "porjectId");
public Criteria andProjectIdGreaterThanOrEqualTo(Long value) {
addCriterion("project_id >=", value, "projectId");
return (Criteria) this;
}
public Criteria andPorjectIdLessThan(Long value) {
addCriterion("porject_id <", value, "porjectId");
public Criteria andProjectIdLessThan(Long value) {
addCriterion("project_id <", value, "projectId");
return (Criteria) this;
}
public Criteria andPorjectIdLessThanOrEqualTo(Long value) {
addCriterion("porject_id <=", value, "porjectId");
public Criteria andProjectIdLessThanOrEqualTo(Long value) {
addCriterion("project_id <=", value, "projectId");
return (Criteria) this;
}
public Criteria andPorjectIdIn(List<Long> values) {
addCriterion("porject_id in", values, "porjectId");
public Criteria andProjectIdIn(List<Long> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andPorjectIdNotIn(List<Long> values) {
addCriterion("porject_id not in", values, "porjectId");
public Criteria andProjectIdNotIn(List<Long> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andPorjectIdBetween(Long value1, Long value2) {
addCriterion("porject_id between", value1, value2, "porjectId");
public Criteria andProjectIdBetween(Long value1, Long value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andPorjectIdNotBetween(Long value1, Long value2) {
addCriterion("porject_id not between", value1, value2, "porjectId");
public Criteria andProjectIdNotBetween(Long value1, Long value2) {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}

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

@ -1,8 +1,12 @@
package com.ccsens.mt.service;
import cn.hutool.core.collection.CollectionUtil;
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.persist.dao.CompeteTimeDao;
import com.ccsens.mt.persist.mapper.CompeteCompanyMapper;
import com.ccsens.util.bean.dto.QueryDto;
import org.springframework.stereotype.Service;
@ -16,6 +20,8 @@ import java.util.List;
public class CompeteService implements ICompeteService{
@Resource
private CompeteTimeDao competeTimeDao;
@Resource
private CompeteCompanyMapper competeCompanyMapper;
/**
* 查看第几届
@ -49,8 +55,17 @@ public class CompeteService implements ICompeteService{
*/
@Override
public void syncCompeteCompany(QueryDto<CompeteDto.CompeteType> params) {
CompeteDto.CompeteType competeType = params.getParam();
//根据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_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;

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

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

Loading…
Cancel
Save