Browse Source

bug

release_toaliyun_real
xhxu 4 years ago
parent
commit
f0d8365ac5
2 changed files with 16 additions and 9 deletions
  1. +14
    -7
      mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql
  2. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java

+ 14
- 7
mallinkAdmin/src/main/resources/db/migration/V202107120001__sendMSG.sql View File

@@ -1,11 +1,18 @@


INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`)
select CEILING(RAND()*90000000000+10000000000) ,tenant_id,parent_tenant_id,'',51,'{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}',now(),now()
from wx_mall
where id != 1 and id != 10011 and id != 10071 and id != 10141 ;
--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`)
--select CEILING(RAND()*90000000000+10000000000) ,tenant_id,parent_tenant_id,'',51,'{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}',now(),now()
--from wx_mall
--where id != 1 and id != 10011 and id != 10071 and id != 10141 ;


INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1001', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0);
INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1007', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0);
INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1014', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0);
--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1001', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0);
--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1007', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0);
--INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1014', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0);


--因微信限制一次最多订阅3条订阅消息
--需要发卷订阅消息 废除直播开播提醒订阅消息EnumTemplateType
INSERT INTO `wx_template_msg`(`id`, `tenant_id`, `parent_tenant_id`, `template_id`, `type`, `custom_param`, `create_date`, `update_date`, `on_off`) VALUES (CEILING(RAND()*90000000000+10000000000), '1003', NULL, '', 51, '{\"index\": [\"character_string1\", \"character_string2\", \"time4\", \"thing3\"], \"emphasis\": \"\"}', '2021-07-12 17:00:00', '2021-07-12 17:00:00', 0);

delete from `wx_template_msg` where `tenant_id` = '1003' and `type` = 5;

+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java View File

@@ -488,7 +488,7 @@ public class WxCouponSendServiceImpl implements WxCouponSendService {
temp.setType(EnumTemplateType.SEND_COUPON_REMIND.getCode());
temp = wxTemplateMsgService.getByObj(temp);
if(temp.getId() != null){
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
WxMsg msg = new WxMsg();
msg.updateTenantInfo(send);
msg.setPhones(cuser.getOpenId());
@@ -510,7 +510,7 @@ public class WxCouponSendServiceImpl implements WxCouponSendService {

private boolean sendMpMsgForSendCoupon(WxCouponSend send, WxCouponOrder couponOrder, WxCUser user) {
// 发送 公众号 模板消息
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String gotopage = Constant.mainPageUrl + "?type=mc";
// 7. 公众号消息
if (StringUtils.isNotBlank(user.getMpAppId()) &&


Loading…
Cancel
Save