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

Commit 8227b386 authored by jiangxiulong's avatar jiangxiulong

sweet_applet_sub_msg 增加字段 union_id

parent 2c7e4965
......@@ -18,7 +18,7 @@ public interface ISweetAppletSubMsgService extends IService<SweetAppletSubMsg> {
ResponseDto sendOfMid(String midList, String targetId, Integer timeType);
ResponseDto<Boolean> create(String openId, String templateId, String targetId, Integer appletType, Integer activityType);
ResponseDto<Boolean> create(String openId, String unionId, String templateId, String targetId, Integer appletType, Integer activityType);
ResponseDto<Integer> isSubPerform(String openId, String targetId);
}
......@@ -17,4 +17,6 @@ CREATE TABLE `sweet_applet_sub_msg`
) ENGINE = InnoDB
DEFAULT CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '小程序订阅消息记录表';
\ No newline at end of file
ROW_FORMAT = DYNAMIC COMMENT '小程序订阅消息记录表';
alter table sweet_applet_sub_msg add union_id varchar(255) NOT NULL DEFAULT '' COMMENT 'union_id' after open_id;
\ No newline at end of file
......@@ -66,6 +66,7 @@ public class SweetAppletSubMsgController {
@ApiOperation("添加订阅记录")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "String", name = "openId", value = "对应小程序的openId", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "unionId", value = "对应小程序的unionId"),
@ApiImplicitParam(type = "form", dataType = "String", name = "templateId", value = "模版消息ID,多个用英文逗号分割", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "targetId", value = "演出id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "appletType", value = "小程序类型 1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节", required = true),
......@@ -73,12 +74,13 @@ public class SweetAppletSubMsgController {
})
public ResponseDto<Boolean> create(
@RequestParam() String openId,
@RequestParam(defaultValue = "") String unionId,
@RequestParam() String templateId,
@RequestParam() String targetId,
@RequestParam() Integer appletType,
@RequestParam() Integer activityType
) {
return subMsgService.create(openId, templateId, targetId, appletType, activityType);
return subMsgService.create(openId, unionId, templateId, targetId, appletType, activityType);
}
@PostMapping("isSubPerform")
......
......@@ -160,7 +160,7 @@ public class SweetAppletSubMsgServiceImpl extends ServiceImpl<SweetAppletSubMsgM
}
@Override
public ResponseDto<Boolean> create(String openId, String templateId, String targetId, Integer appletType, Integer activityType) {
public ResponseDto<Boolean> create(String openId, String unionId, String templateId, String targetId, Integer appletType, Integer activityType) {
String[] templateIdArray = templateId.split(",");
LinkedList<String> sqls = CollectionUtil.linkedListString();
......@@ -168,7 +168,7 @@ public class SweetAppletSubMsgServiceImpl extends ServiceImpl<SweetAppletSubMsgM
sqls.add(SqlMapping.get("sweet_applet_sub_msg.insert"));
for (String id : templateIdArray) {
sqlsDataA.add(new Object[]{
IDGenerator.nextSnowId(), openId, id, targetId, appletType, activityType
IDGenerator.nextSnowId(), openId, unionId, id, targetId, appletType, activityType
});
}
queueUtils.sendMsgByRedis(MQConst.SweetQueue.SWEET_REMIND_INSERT.getKey(),
......
......@@ -30,7 +30,7 @@ sweet_luck_draw.insert=INSERT INTO sweet_luck_draw (mobile,union_id,luck_draw_nu
sweet_answer.insert=INSERT INTO sweet_answer (answer_id,phone,answer_json,img_url) VALUES (?,?,?,?)
# --------------------------提醒记录--------------------------
sweet_remind.insert=INSERT INTO sweet_remind (remind_id,openId,unionId,performancesId) VALUES (?,?,?,?)
sweet_applet_sub_msg.insert=INSERT INTO sweet_applet_sub_msg (msg_id,open_id,template_id,target_id,applet_type,activity_type) VALUES (?,?,?,?,?,?)
sweet_applet_sub_msg.insert=INSERT INTO sweet_applet_sub_msg (msg_id,open_id,union_id,template_id,target_id,applet_type,activity_type) VALUES (?,?,?,?,?,?,?)
# --------------------------用户投票记录--------------------------
sweet_city_vote.insert=INSERT INTO sweet_city_vote (vote_id,phone,openId,unionId,type,city_code,city_name,day_time) VALUES (?,?,?,?,?,?,?,?)
sweet_city_vote_stat.insert=INSERT INTO sweet_city_vote_stat (stat_id,city_code,city_name,vote_num,type) VALUES (?,?,?,?,?)
......
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