|
@@ -617,7 +617,8 @@ public class TOrderController {
|
|
return JsonMessage.error("申请支付失败");
|
|
return JsonMessage.error("申请支付失败");
|
|
}
|
|
}
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
- if(resultJson.getString("ra_Code").equals("100")){
|
|
|
|
|
|
+ String raCode = resultJson.getString("ra_Code");
|
|
|
|
+ if(raCode.equals("100") || raCode.equals("102")){
|
|
orderService.save(order);
|
|
orderService.save(order);
|
|
orderDetailsService.save(orderDetails);
|
|
orderDetailsService.save(orderDetails);
|
|
JSONObject kindData = new JSONObject();
|
|
JSONObject kindData = new JSONObject();
|
|
@@ -1910,7 +1911,47 @@ public class TOrderController {
|
|
kindData.put("productName", order.getProductName());
|
|
kindData.put("productName", order.getProductName());
|
|
|
|
|
|
TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(order.getClientId()));
|
|
TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(order.getClientId()));
|
|
- equipmentService.sentMessage(equipment.getClientId(), PushUtils.buildJson("pay_success", kindData.toString()).toString());
|
|
|
|
|
|
+ if(order.getFrpCode().equals("WEIXIN_XCX")){
|
|
|
|
+ JSONObject kindData1 = new JSONObject();
|
|
|
|
+ kindData1.put("sn", order.getSn());
|
|
|
|
+ kindData1.put("productDesc", order.getProductDesc());
|
|
|
|
+ String s = order.getId().toString();
|
|
|
|
+ if(s.length()>6){
|
|
|
|
+ s = s.substring(s.length()-6,s.length());
|
|
|
|
+ }
|
|
|
|
+ kindData1.put("mealCode", s);
|
|
|
|
+ order.setOrderStatus("-1");
|
|
|
|
+ equipmentService.sentMessage(equipment.getClientId(), PushUtils.buildJson("cardPayXCX", kindData1.toString()).toString());
|
|
|
|
+ if(StringUtils.isNotEmpty(equipment.getApkVersion())){
|
|
|
|
+ //发送两次mq
|
|
|
|
+ if(equipment.getApkVersion().equals("1.0.131-jz11")||equipment.getApkVersion().equals("1.0.131-jz12")||equipment.getApkVersion().equals("1.0.131-jz13")||equipment.getApkVersion().equals("1.0.131-jz14")||equipment.getApkVersion().equals("1.0.131-jz15")){
|
|
|
|
+ sendMqTwo(equipment.getClientId(),kindData1.toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ TSzsmWx szsmWx = szsmWxService.getById(order.getWxId());
|
|
|
|
+ BigDecimal integral = szsmWx.getIntegral();
|
|
|
|
+ if(integral!=null){
|
|
|
|
+ integral = order.getPrice().add(integral);
|
|
|
|
+ }else {
|
|
|
|
+ integral = order.getPrice();
|
|
|
|
+ }
|
|
|
|
+ szsmWx.setIntegral(integral);
|
|
|
|
+ szsmWxService.updateById(szsmWx);
|
|
|
|
+ if(StringUtils.isNotEmpty(order.getCoupons())){
|
|
|
|
+ String coupons = order.getCoupons();
|
|
|
|
+ coupons= coupons.substring(1,coupons.length()-1);
|
|
|
|
+ List<String> list1 = Arrays.asList(coupons);
|
|
|
|
+ if(list1.size()>0){
|
|
|
|
+ for(String code:list1){
|
|
|
|
+ szwlFeign.useYHJ(code, String.valueOf(order.getAdminId()),order.getClientId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ equipmentService.sentMessage(equipment.getClientId(), PushUtils.buildJson("pay_success", kindData.toString()).toString());
|
|
|
|
+ }
|
|
|
|
+ orderService.updateById(order);
|
|
|
|
+// equipmentService.sentMessage(equipment.getClientId(), PushUtils.buildJson("pay_success", kindData.toString()).toString());
|
|
try {
|
|
try {
|
|
if(order.getProductNumber()==null||order.getProductNumber()==0){
|
|
if(order.getProductNumber()==null||order.getProductNumber()==0){
|
|
order.setProductNumber(1);
|
|
order.setProductNumber(1);
|
|
@@ -1919,6 +1960,16 @@ public class TOrderController {
|
|
}catch (Exception e) {
|
|
}catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
+ try {
|
|
|
|
+ TOrderTask orderTask = new TOrderTask();
|
|
|
|
+ BeanUtils.copyPropertiesIgnoreNull(order, orderTask, true);
|
|
|
|
+ orderTask.setAgencyId(order.getId());
|
|
|
|
+ orderTaskService.save(orderTask);
|
|
|
|
+ }catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ //传送数据
|
|
|
|
+ sentJingZhun(order);
|
|
return R.ok("支付成功");
|
|
return R.ok("支付成功");
|
|
} else {
|
|
} else {
|
|
TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(order.getClientId()));
|
|
TEquipment equipment = R.getDataIfSuccess(szwlFeign.findEquipmentByClientId(order.getClientId()));
|