Commit 771078ff by 张新旗

代码永远在路上

parent d0b660cd
......@@ -95,6 +95,7 @@ public class OrderController extends BaseController
int amount = order.getAmount().movePointRight(2).intValue();
Map payInfo = weixinService.pay(request, "hooloo", order.getOrderNo(), order.getUserId(), amount);
if(payInfo !=null){
payInfo.put("orderId",order.getId());
return AjaxResult.success(payInfo);
}else{
throw new ServiceException("微信支付发生异常");
......
......@@ -89,7 +89,8 @@ weixin:
cert-path: classpath:apiclient_cert.p12
refund-url: https://hooloo-api.gdatac.com/weixin/refundNotify
templateId: Fu_CPIXa0cnJ4EDdVKqFQ4T3qTxBqv8vXMU7-sQgerg
pagePath: /cs
pagePath: orderSubPackage/pages/orderInfo/index?orderId=
program: trial
#mqtt:
# url: tcp://iot-06z00dhgql5j8bw.mqtt.iothub.aliyuncs.com:1883
# clientId: h5kgirX6kNQ.XQ_000001A|securemode=2,signmethod=hmacsha256,timestamp=1651746531320|
......
......@@ -246,6 +246,7 @@ public class OrderServiceImpl implements IOrderService
orderOperationLogService.insertOrderOperationLog(order);
jiGuangPushService.pushOrderState(order);
Customer customer = customerMapper.selectCustomerById(order.getUserId());
sendMessageUtils.sendWxMsg(order);
if(!"1".equals(customer.getAllow())){
}
......
......@@ -381,11 +381,9 @@ public class ShopServiceImpl implements IShopService
jsonObject.put("state",shopGoodsSku1.getState());
Goods goods = goodsMapper.selectGoodsById(String.valueOf(shopGoodsSku1.getGoodsId()));
jsonObject.put("goods",getGoodsVo(goods,shopGoodsSku1.getShopId()));
AjaxResult.success(jsonObject);
return AjaxResult.success(jsonObject);
}
return AjaxResult.success();
}
......
......@@ -31,6 +31,8 @@ public class SendMessageUtils {
private String templateId;
@Value("${weixin.pagePath}")
private String pagePath;
@Value("${weixin.program}")
private String program;
@Autowired
private ShopMapper shopMapper;
......@@ -62,6 +64,15 @@ public class SendMessageUtils {
"\"time6\": \"now\"," +
"\"thing11\": \"您的订单制作完成了,现在可以去取餐啦!\"" +
"}" +
"},{" +
"\"status\": \"6\"," +
"\"templateId\": \"Oq_zfRWRXijvXenRmfD2PARgpvdYlbkjR4laxKmBqb0\"," +
"\"param\": {" +
"\"character_string10.DATA\": \"$.orderNum\"," +
"\"thing1.DATA\": \"$.shop.name\"," +
"\"date7.DATA\": \"now\"," +
"\"thing11\": \"您的订单制作完成了,现在可以去取餐啦!\"" +
"}" +
"}]";
/**
* 设置会议订阅消息
......@@ -114,7 +125,8 @@ public class SendMessageUtils {
//消息主体
builder.data((List<WxMaSubscribeMessage.MsgData>) tempalte.get("dataList"));
//点击订阅消息的跳转链接(默认是正式发布的小程序页面,当然也可以通过参数进行控制)
builder.page(pagePath);
builder.page(pagePath+order.getId());
builder.miniprogramState(program);
WxMaSubscribeMessage msg = builder.build();
wxMaService.getMsgService().sendSubscribeMsg(msg);
} catch (WxErrorException e) {
......
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