记得上下班打卡 | git大法好,push需谨慎

Commit 06b3b100 authored by jiangxiulong's avatar jiangxiulong

keywprd转中文 增加type

parent c8693a85
......@@ -13,6 +13,10 @@ public class SweetAntigenicQuestionParam implements Serializable {
private static final long serialVersionUID = 9038992103808199663L;
@ApiModelProperty(position = 10, required = true, value = "type 1MDSK防疫答题 2草莓防疫答题", example = "1")
@NotNull(message = "type不能为空") @Min(value = 1, message = "type无效") @Max(value = 2, message = "type无效")
private Integer type;
@ApiModelProperty(position = 10, required = true, value = "openId", example = "openId")
@NotBlank(message = "openId不能为空")
private String openId;
......@@ -38,31 +42,31 @@ public class SweetAntigenicQuestionParam implements Serializable {
private String urgentPhone;
@ApiModelProperty(position = 10, required = true, value = "keyword1", example = "1")
@NotNull(message = "keyword1不能为空") @Min(value = 1, message = "keyword1无效") @Max(value = 2, message = "keyword1无效")
private Integer keyword1;
@NotBlank(message = "keyword1不能为空")
private String keyword1;
@ApiModelProperty(position = 10, required = true, value = "keyword2", example = "1")
@NotNull(message = "keyword2不能为空") @Min(value = 1, message = "keyword2无效") @Max(value = 2, message = "keyword2无效")
private Integer keyword2;
@NotBlank(message = "keyword2不能为空")
private String keyword2;
@ApiModelProperty(position = 10, required = true, value = "keyword3", example = "1")
@NotNull(message = "keyword3不能为空") @Min(value = 1, message = "keyword3无效") @Max(value = 2, message = "keyword3无效")
private Integer keyword3;
@NotBlank(message = "keyword3不能为空")
private String keyword3;
@ApiModelProperty(position = 10, required = true, value = "keyword4", example = "1")
@NotNull(message = "keyword4不能为空") @Min(value = 1, message = "keyword4无效") @Max(value = 2, message = "keyword4无效")
private Integer keyword4;
@NotBlank(message = "keyword4不能为空")
private String keyword4;
@ApiModelProperty(position = 10, required = true, value = "keyword5", example = "1")
@NotNull(message = "keyword5不能为空") @Min(value = 1, message = "keyword5无效") @Max(value = 2, message = "keyword5无效")
private Integer keyword5;
@NotBlank(message = "keyword5不能为空")
private String keyword5;
@ApiModelProperty(position = 10, required = true, value = "keyword6", example = "1")
@NotNull(message = "keyword6不能为空") @Min(value = 1, message = "keyword6无效") @Max(value = 2, message = "keyword6无效")
private Integer keyword6;
@NotBlank(message = "keyword6不能为空")
private String keyword6;
@ApiModelProperty(position = 10, required = true, value = "keyword7", example = "1")
@NotNull(message = "keyword7不能为空") @Min(value = 1, message = "keyword7无效") @Max(value = 3, message = "keyword7无效")
private Integer keyword7;
@NotBlank(message = "keyword7不能为空")
private String keyword7;
}
......@@ -14,13 +14,13 @@ import lombok.EqualsAndHashCode;
* </p>
*
* @author jiangxiulong
* @since 2021-09-28
* @since 2021-09-29
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class SweetAntigenicQuestion implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1268639425174449151L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
......@@ -30,6 +30,11 @@ public class SweetAntigenicQuestion implements Serializable {
*/
private String questionId;
/**
* 活动类型 1MDSK防疫答题 2草莓防疫答题
*/
private Integer type;
/**
* openId
*/
......@@ -63,39 +68,39 @@ public class SweetAntigenicQuestion implements Serializable {
private String urgentPhone;
/**
* 1有 2没有
* 答案
*/
private Integer keyword1;
private String keyword1;
/**
* 1是 2否
* 答案
*/
private Integer keyword2;
private String keyword2;
/**
* 1是 2否
* 答案
*/
private Integer keyword3;
private String keyword3;
/**
* 1是 2否
* 答案
*/
private Integer keyword4;
private String keyword4;
/**
* 1是 2否
* 答案
*/
private Integer keyword5;
private String keyword5;
/**
* 1是 2否
* 答案
*/
private Integer keyword6;
private String keyword6;
/**
* 1两针均已接种 2已接种一针 3未接种
* 答案
*/
private Integer keyword7;
private String keyword7;
/**
* 创建时间
......
package com.liquidnet.service.sweet.mapper;
import com.liquidnet.service.sweet.entity.SweetAntigenicQuestion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.sweet.entity.SweetAntigenicQuestion;
/**
* <p>
......
......@@ -545,19 +545,20 @@ CREATE TABLE `sweet_antigenic_question`
(
`mid` bigint unsigned NOT NULL AUTO_INCREMENT,
`question_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'question_id',
`type` tinyint NOT NULL DEFAULT 0 COMMENT '活动类型 1MDSK防疫答题 2草莓防疫答题',
`openId` varchar(255) NOT NULL DEFAULT '' COMMENT 'openId',
`unionId` varchar(255) NOT NULL DEFAULT '' COMMENT 'unionId',
`nickname` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名',
`address` varchar(255) NOT NULL DEFAULT '' COMMENT '居住地址',
`phone` varchar(11) NOT NULL DEFAULT '' COMMENT '联系电话',
`urgent_phone` varchar(11) NOT NULL DEFAULT '' COMMENT '紧急联系人电话',
`keyword1` tinyint NOT NULL DEFAULT 0 COMMENT '1有 2没有',
`keyword2` tinyint NOT NULL DEFAULT 0 COMMENT '1是 2否',
`keyword3` tinyint NOT NULL DEFAULT 0 COMMENT '1是 2否',
`keyword4` tinyint NOT NULL DEFAULT 0 COMMENT '1是 2否',
`keyword5` tinyint NOT NULL DEFAULT 0 COMMENT '1是 2否',
`keyword6` tinyint NOT NULL DEFAULT 0 COMMENT '1是 2否',
`keyword7` tinyint NOT NULL DEFAULT 0 COMMENT '1两针均已接种 2已接种一针 3未接种',
`phone` varchar(255) NOT NULL DEFAULT '' COMMENT '联系电话',
`urgent_phone` varchar(255) NOT NULL DEFAULT '' COMMENT '紧急联系人电话',
`keyword1` varchar(255) NOT NULL DEFAULT '' COMMENT '答案',
`keyword2` varchar(255) NOT NULL DEFAULT '' COMMENT '答案',
`keyword3` varchar(255) NOT NULL DEFAULT '' COMMENT '答案',
`keyword4` varchar(255) NOT NULL DEFAULT '' COMMENT '答案',
`keyword5` varchar(255) NOT NULL DEFAULT '' COMMENT '答案',
`keyword6` varchar(255) NOT NULL DEFAULT '' COMMENT '答案',
`keyword7` varchar(255) NOT NULL DEFAULT '' COMMENT '答案',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
......
......@@ -2,7 +2,6 @@ package com.liquidnet.service.sweet.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.DateUtil;
import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.base.SqlMapping;
......@@ -15,7 +14,6 @@ import com.liquidnet.service.sweet.utils.QueueUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.LinkedList;
/**
......@@ -38,7 +36,7 @@ public class SweetAntigenicQuestionServiceImpl extends ServiceImpl<SweetAntigeni
LinkedList<Object[]> sqlsDataA = CollectionUtil.linkedListObjectArr();
sqls.add(SqlMapping.get("sweet_antigenic_question.insert"));
sqlsDataA.add(new Object[]{
IDGenerator.nextSnowId(), param.getOpenId(), param.getUnionId(), param.getNickname(), param.getAddress(), param.getPhone(),
IDGenerator.nextSnowId(), param.getType(), param.getOpenId(), param.getUnionId(), param.getNickname(), param.getAddress(), param.getPhone(),
param.getUrgentPhone(), param.getKeyword1(), param.getKeyword2(), param.getKeyword3(), param.getKeyword4(), param.getKeyword5(),
param.getKeyword6(), param.getKeyword7()
});
......
......@@ -54,4 +54,4 @@ sweet_city_vote.insert=INSERT INTO sweet_city_vote (vote_id,phone,openId,unionId
sweet_city_vote_stat.insert=INSERT INTO sweet_city_vote_stat (stat_id,city_code,city_name,vote_num) VALUES (?,?,?,?)
sweet_city_vote_stat.update=UPDATE sweet_city_vote_stat SET vote_num = IFNULL(vote_num, 0) + 1, updated_at = ? WHERE city_code = ?
# --------------------------防疫答题--------------------------
sweet_antigenic_question.insert=INSERT INTO sweet_antigenic_question (question_id,openId,unionId,nickname,address,phone,urgent_phone,keyword1,keyword2,keyword3,keyword4,keyword5,keyword6,keyword7) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
\ No newline at end of file
sweet_antigenic_question.insert=INSERT INTO sweet_antigenic_question (question_id,type,openId,unionId,nickname,address,phone,urgent_phone,keyword1,keyword2,keyword3,keyword4,keyword5,keyword6,keyword7) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment