Commit 771078ff by 张新旗

代码永远在路上

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