| @@ -0,0 +1,8 @@ | |||||
| ALTER TABLE `mallink`.`wx_appinfo` | |||||
| ADD COLUMN `sort_url` varchar(255) COMMENT '小程序链接' AFTER `plat`; | |||||
| INSERT INTO `mallink`.`wx_msg_validationcode_model`(`id`, `tenant_id`, `parent_tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `open`, `msg_type`, `role_type`, `model_code`) VALUES (666429058236550321, '1028', NULL, 33, '抖音退款通知', '富茂', '您购买的[${name}]已发起全部退款申请,预计1-3个自然日商家处理完成,请耐心等待。', '2022-03-28 17:57:59', 1, 0, NULL, NULL, 0, 1, 0, 'SMS_236550321'); | |||||
| INSERT INTO `mallink`.`wx_msg_validationcode_model`(`id`, `tenant_id`, `parent_tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `open`, `msg_type`, `role_type`, `model_code`) VALUES (666429058236560256, '1028', NULL, 32, '抖音购买成功通知', '富茂', '您已成功购买[${name}],可在“抖音app>我>右上角≡>我的订单>查看全部”,务必到店之后进行核销,谨防上当受骗。', '2022-03-28 17:57:59', 1, 0, NULL, NULL, 0, 1, 0, 'SMS_236560256'); | |||||
| @@ -46,6 +46,8 @@ public class WxAppinfo extends BaseTenantEntity { | |||||
| private Integer enable; | private Integer enable; | ||||
| @io.swagger.annotations.ApiModelProperty(value="app平台 EnumAppPlat ",name="plat") | @io.swagger.annotations.ApiModelProperty(value="app平台 EnumAppPlat ",name="plat") | ||||
| private Integer plat; | private Integer plat; | ||||
| @io.swagger.annotations.ApiModelProperty(value="小程序链接",name="sortUrl") | |||||
| private String sortUrl; | |||||
| public WxAppinfo(){} | public WxAppinfo(){} | ||||
| public WxAppinfo(Integer mouldType){ | public WxAppinfo(Integer mouldType){ | ||||
| @@ -1877,14 +1877,16 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| private void sendMsgAfterCouponOrderSuccess(WxOrder order,WxCoupon coupon, WxCUserBasicInfo user) { | private void sendMsgAfterCouponOrderSuccess(WxOrder order,WxCoupon coupon, WxCUserBasicInfo user) { | ||||
| // 发送短信 | // 发送短信 | ||||
| // if(EnumPayWay.PAY_WAY_TT.getCode().equals(order.getPayVendor())){ | |||||
| if(EnumPayWay.PAY_WAY_TT.getCode().equals(order.getPayVendor())){ | |||||
| logger.info("订单成功短信通知start"); | logger.info("订单成功短信通知start"); | ||||
| WxAppinfo cAppInfo = wxAppinfoService.getCAppInfo(order, EnumPayWay.PAY_WAY_TT.getPlat()); | |||||
| //券名 | //券名 | ||||
| String name = coupon.getTitle(); | String name = coupon.getTitle(); | ||||
| //找出用户手机号 | //找出用户手机号 | ||||
| String phone = user.getPhone(); | String phone = user.getPhone(); | ||||
| Map<String, String> msgReplaceMap = new HashMap(); | Map<String, String> msgReplaceMap = new HashMap(); | ||||
| msgReplaceMap.put("name", name); | msgReplaceMap.put("name", name); | ||||
| msgReplaceMap.put("sortUrl",cAppInfo.getSortUrl()); | |||||
| WxMsgRecord wxMsgRecord = new WxMsgRecord(); | WxMsgRecord wxMsgRecord = new WxMsgRecord(); | ||||
| wxMsgRecord.updateTenantInfo(order); | wxMsgRecord.updateTenantInfo(order); | ||||
| @@ -1894,7 +1896,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| wxMsgRecord.setDynamicContentMap(msgReplaceMap); | wxMsgRecord.setDynamicContentMap(msgReplaceMap); | ||||
| mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | ||||
| logger.info("订单成功短信通知end"); | logger.info("订单成功短信通知end"); | ||||
| // } | |||||
| } | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -757,24 +757,24 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||||
| @Override | @Override | ||||
| public void actionAfterCouponOrder(WxCouponOrder couponOrder, WxOrder rOrder, WxCoupon coupon, WxCUserBasicInfo user) { | public void actionAfterCouponOrder(WxCouponOrder couponOrder, WxOrder rOrder, WxCoupon coupon, WxCUserBasicInfo user) { | ||||
| // 发送短信 | // 发送短信 | ||||
| // if(EnumPayWay.PAY_WAY_TT.getCode().equals(couponOrder.getPayVendor())){ | |||||
| logger.info("订单成功短信通知start"); | |||||
| //券名 | |||||
| String name = coupon.getTitle(); | |||||
| //找出用户手机号 | |||||
| String phone = user.getPhone(); | |||||
| Map<String, String> msgReplaceMap = new HashMap(); | |||||
| msgReplaceMap.put("name", name); | |||||
| WxMsgRecord wxMsgRecord = new WxMsgRecord(); | |||||
| wxMsgRecord.updateTenantInfo(couponOrder); | |||||
| wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); | |||||
| wxMsgRecord.setModelType(EnumMsgModel.COUPON_ORDER_REFUND.getCode()); | |||||
| wxMsgRecord.setReceiver(phone); | |||||
| wxMsgRecord.setDynamicContentMap(msgReplaceMap); | |||||
| mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||||
| logger.info("订单成功短信通知end"); | |||||
| // } | |||||
| if(EnumPayWay.PAY_WAY_TT.getCode().equals(couponOrder.getPayVendor())){ | |||||
| logger.info("订单成功短信通知start"); | |||||
| //券名 | |||||
| String name = coupon.getTitle(); | |||||
| //找出用户手机号 | |||||
| String phone = user.getPhone(); | |||||
| Map<String, String> msgReplaceMap = new HashMap(); | |||||
| msgReplaceMap.put("name", name); | |||||
| WxMsgRecord wxMsgRecord = new WxMsgRecord(); | |||||
| wxMsgRecord.updateTenantInfo(couponOrder); | |||||
| wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); | |||||
| wxMsgRecord.setModelType(EnumMsgModel.COUPON_ORDER_REFUND.getCode()); | |||||
| wxMsgRecord.setReceiver(phone); | |||||
| wxMsgRecord.setDynamicContentMap(msgReplaceMap); | |||||
| mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||||
| logger.info("订单成功短信通知end"); | |||||
| } | |||||
| } | } | ||||
| @@ -20,6 +20,7 @@ | |||||
| <result column="pay_bill_id" jdbcType="BIGINT" property="payBillId"/> | <result column="pay_bill_id" jdbcType="BIGINT" property="payBillId"/> | ||||
| <result column="enable" jdbcType="INTEGER" property="enable"/> | <result column="enable" jdbcType="INTEGER" property="enable"/> | ||||
| <result column="plat" jdbcType="INTEGER" property="plat"/> | <result column="plat" jdbcType="INTEGER" property="plat"/> | ||||
| <result column="sort_url" jdbcType="INTEGER" property="sortUrl"/> | |||||
| <!-- <result column="group_support" jdbcType="INTEGER" property="groupSupport"/>--> | <!-- <result column="group_support" jdbcType="INTEGER" property="groupSupport"/>--> | ||||
| </resultMap> | </resultMap> | ||||
| @@ -27,7 +28,7 @@ | |||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`app_id`,`parent_app_id`,`name`, | `id`,`tenant_id`,`app_id`,`parent_app_id`,`name`, | ||||
| `secret`,`token`,`aes_key`,`msg_data_format`,`access_token`,`last_token_time`,`expires_in`, | `secret`,`token`,`aes_key`,`msg_data_format`,`access_token`,`last_token_time`,`expires_in`, | ||||
| `pay_id`,`type`,`mould_type`,`pay_bill_id`,`enable`,`plat` | |||||
| `pay_id`,`type`,`mould_type`,`pay_bill_id`,`enable`,`plat`,`sort_url` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||