diff --git a/hai-cweb/src/main/java/com/cweb/config/SysConfig.java b/hai-cweb/src/main/java/com/cweb/config/SysConfig.java index 18b5dd92..85afdd30 100644 --- a/hai-cweb/src/main/java/com/cweb/config/SysConfig.java +++ b/hai-cweb/src/main/java/com/cweb/config/SysConfig.java @@ -17,10 +17,6 @@ public class SysConfig { private String wxH5AppId; private String wxH5AppSecret; - private String tuanYouUrl; - private String tuanYouAppKey; - private String tuanYouAppSecret; - private String wxApiKey; private String wxMchId; private String wxMchAppId; @@ -30,14 +26,6 @@ public class SysConfig { private String couponCodePath; private String notifyUrl; - public String getTuanYouUrl() { - return tuanYouUrl; - } - - public void setTuanYouUrl(String tuanYouUrl) { - this.tuanYouUrl = tuanYouUrl; - } - public String getFileUrl() { return fileUrl; } @@ -62,52 +50,36 @@ public class SysConfig { this.wxAppSecret = wxAppSecret; } - public String getWxApiKey() { - return wxApiKey; - } - - public void setWxApiKey(String wxApiKey) { - this.wxApiKey = wxApiKey; - } - - public String getWxMchId() { - return wxMchId; - } - - public void setWxMchId(String wxMchId) { - this.wxMchId = wxMchId; - } - - public String getWxUnifiedOrderUrl() { - return wxUnifiedOrderUrl; + public String getWxH5AppId() { + return wxH5AppId; } - public void setWxUnifiedOrderUrl(String wxUnifiedOrderUrl) { - this.wxUnifiedOrderUrl = wxUnifiedOrderUrl; + public void setWxH5AppId(String wxH5AppId) { + this.wxH5AppId = wxH5AppId; } - public String getNotifyUrl() { - return notifyUrl; + public String getWxH5AppSecret() { + return wxH5AppSecret; } - public void setNotifyUrl(String notifyUrl) { - this.notifyUrl = notifyUrl; + public void setWxH5AppSecret(String wxH5AppSecret) { + this.wxH5AppSecret = wxH5AppSecret; } - public String getCouponCodePath() { - return couponCodePath; + public String getWxApiKey() { + return wxApiKey; } - public void setCouponCodePath(String couponCodePath) { - this.couponCodePath = couponCodePath; + public void setWxApiKey(String wxApiKey) { + this.wxApiKey = wxApiKey; } - public String getWxSubMchId() { - return wxSubMchId; + public String getWxMchId() { + return wxMchId; } - public void setWxSubMchId(String wxSubMchId) { - this.wxSubMchId = wxSubMchId; + public void setWxMchId(String wxMchId) { + this.wxMchId = wxMchId; } public String getWxMchAppId() { @@ -126,35 +98,35 @@ public class SysConfig { this.wxSubAppId = wxSubAppId; } - public String getWxH5AppId() { - return wxH5AppId; + public String getWxSubMchId() { + return wxSubMchId; } - public void setWxH5AppId(String wxH5AppId) { - this.wxH5AppId = wxH5AppId; + public void setWxSubMchId(String wxSubMchId) { + this.wxSubMchId = wxSubMchId; } - public String getWxH5AppSecret() { - return wxH5AppSecret; + public String getWxUnifiedOrderUrl() { + return wxUnifiedOrderUrl; } - public void setWxH5AppSecret(String wxH5AppSecret) { - this.wxH5AppSecret = wxH5AppSecret; + public void setWxUnifiedOrderUrl(String wxUnifiedOrderUrl) { + this.wxUnifiedOrderUrl = wxUnifiedOrderUrl; } - public String getTuanYouAppKey() { - return tuanYouAppKey; + public String getCouponCodePath() { + return couponCodePath; } - public void setTuanYouAppKey(String tuanYouAppKey) { - this.tuanYouAppKey = tuanYouAppKey; + public void setCouponCodePath(String couponCodePath) { + this.couponCodePath = couponCodePath; } - public String getTuanYouAppSecret() { - return tuanYouAppSecret; + public String getNotifyUrl() { + return notifyUrl; } - public void setTuanYouAppSecret(String tuanYouAppSecret) { - this.tuanYouAppSecret = tuanYouAppSecret; + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; } } diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java index d11e05cf..4acc97c1 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java @@ -1,16 +1,15 @@ package com.cweb.controller; import com.alibaba.fastjson.JSONObject; -import com.cweb.config.SysConst; -import com.cweb.config.TuanYouConfig; import com.github.pagehelper.PageInfo; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; -import com.hai.common.security.AESEncodeUtil; import com.hai.common.utils.CoordCommonUtil; import com.hai.common.utils.PageUtil; import com.hai.common.utils.ResponseMsgUtil; +import com.hai.config.CommonSysConst; +import com.hai.config.TuanYouConfig; import com.hai.model.ResponseData; import com.hai.service.HighGasOilPriceService; import io.swagger.annotations.Api; @@ -200,7 +199,9 @@ public class HighGasController { String data = "{\"data\":\"ui2KbK5jpLtw7YaA52uSt1TzDpaE5OjeW5O6xg+saM4nN4aVnpoT1aTgJwQt/DuNSbs7LrX6q1B0cpW5T531ltYl1ERxyKXqZyMKBNWzDFuB5QSww22VGfypchGNm+oW\",\"timestamp\":1624611912047,\"companyCode\":\"208241666939552\"}"; JSONObject jsonObject = JSONObject.parseObject(data, JSONObject.class); - return ResponseMsgUtil.success(AESEncodeUtil.aesDecryptByBytes(AESEncodeUtil.base64Decode(jsonObject.getString("data")), SysConst.getSysConfig().getTuanYouAppSecret())); + + //return ResponseMsgUtil.success(AESEncodeUtil.aesDecryptByBytes(AESEncodeUtil.base64Decode(jsonObject.getString("data")), SysConst.getSysConfig().getTuanYouAppSecret())); + return ResponseMsgUtil.success(CommonSysConst.getSysConfig().getTuanYouUrl()); } catch (Exception e) { log.error("HighGasController -> queryThirdOrderDretail() error!",e); diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index 10d3f8ac..38766570 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -1,7 +1,6 @@ package com.cweb.controller; import com.alibaba.fastjson.JSONObject; -import com.cweb.config.TuanYouConfig; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.hai.common.exception.ErrorCode; @@ -12,8 +11,8 @@ import com.hai.common.security.UserCenter; import com.hai.common.utils.DateUtil; import com.hai.common.utils.IDGenerator; import com.hai.common.utils.ResponseMsgUtil; +import com.hai.config.TuanYouConfig; import com.hai.entity.*; -import com.hai.model.HighCouponModel; import com.hai.model.HighMerchantStoreModel; import com.hai.model.HighUserModel; import com.hai.model.ResponseData; @@ -175,10 +174,6 @@ public class HighOrderController { log.error("HighOrderController --> addOrder() error!", "未找到门店信息"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到门店信息"); } - childOrder.setGoodsName(store.getStoreName()); - childOrder.setGoodsImg(store.getStoreLogo()); - childOrder.setGoodsSpecName("默认"); - childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString()))); // 获取当前加油价格 JSONObject jsonObject = TuanYouConfig.queryCompanyPriceDetail(store.getStoreKey(), childOrder.getGasOilNo()); @@ -189,24 +184,12 @@ public class HighOrderController { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未获取到加油价格"); } JSONObject priceDetail = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.getJSONArray("result").get(0)), JSONObject.class); - // 推送订单 - Map map = new HashMap<>(); - map.put("gasId", store.getStoreKey()); - map.put("oilNo", childOrder.getGasOilNo()); - map.put("gunNo", childOrder.getGasGunNo()); - BigDecimal priceGun = new BigDecimal(priceDetail.getString("priceGun")); - BigDecimal priceVip = new BigDecimal(priceDetail.getString("priceVip")); - map.put("priceGun", priceGun); // 枪单价 - map.put("priceVip", priceVip); // 优惠价 - map.put("driverPhone", userInfoModel.getHighUser().getPhone()); - map.put("thirdSerialNo", highOrder.getOrderNo()); - BigDecimal refuelingAmount = new BigDecimal(childOrder.getTotalPrice().toString()).divide(priceGun,2,BigDecimal.ROUND_HALF_UP).multiply(priceVip).setScale(2,BigDecimal.ROUND_HALF_UP); - map.put("refuelingAmount", refuelingAmount); - JSONObject orderPushObject = TuanYouConfig.refuelingOrderPush(map); - if (orderPushObject == null || !orderPushObject.getString("code").equals("200")) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "提交订单,出现了未知错误"); - } - childOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); + childOrder.setGoodsName(store.getStoreName()); + childOrder.setGoodsImg(store.getStoreLogo()); + childOrder.setGasPriceGun(priceDetail.getBigDecimal("priceGun")); + childOrder.setGasPriceVip(priceDetail.getBigDecimal("priceVip")); + childOrder.setGoodsSpecName("默认"); + childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString()))); } childOrder.setMemId(userInfoModel.getHighUser().getId()); diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java index 8112ee9c..13e09baf 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java @@ -1,21 +1,15 @@ package com.cweb.controller; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.cweb.config.TuanYouConfig; -import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; -import com.hai.common.security.SessionObject; -import com.hai.common.security.UserCenter; import com.hai.common.utils.*; +import com.hai.config.TuanYouConfig; import com.hai.entity.*; import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantStoreModel; -import com.hai.model.HighUserModel; import com.hai.model.ResponseData; import com.hai.service.*; import io.swagger.annotations.Api; @@ -23,18 +17,11 @@ import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import java.math.BigDecimal; import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; /** * @Auther: 胡锐 diff --git a/hai-cweb/src/main/resources/dev/config.properties b/hai-cweb/src/main/resources/dev/config.properties index 7de3b0e3..21bbf7d7 100644 --- a/hai-cweb/src/main/resources/dev/config.properties +++ b/hai-cweb/src/main/resources/dev/config.properties @@ -5,10 +5,6 @@ wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df wxH5AppId=wxa075e8509802f826 wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5 -tuanYouUrl=https://test02-motorcade-hcs.czb365.com -tuanYouAppKey=208241666939552 -tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6 - wxApiKey=Skufk5oi85wDFGl888i6wsRSTkdd5df5 wxMchAppId=wx637bd6f7314daa46 wxMchId=1289663601 diff --git a/hai-cweb/src/main/resources/prod/config.properties b/hai-cweb/src/main/resources/prod/config.properties index 383b00ed..71f142a9 100644 --- a/hai-cweb/src/main/resources/prod/config.properties +++ b/hai-cweb/src/main/resources/prod/config.properties @@ -5,10 +5,6 @@ wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df wxH5AppId=wxa075e8509802f826 wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5 -tuanYouUrl=https://test02-motorcade-hcs.czb365.com -tuanYouAppKey=208241666939552 -tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6 - wxApiKey=Skufk5oi85wDFGl888i6wsRSTkdd5df5 wxMchAppId=wx637bd6f7314daa46 wxMchId=1289663601 diff --git a/hai-service/pom.xml b/hai-service/pom.xml index 24ce40c8..70a6412b 100644 --- a/hai-service/pom.xml +++ b/hai-service/pom.xml @@ -304,5 +304,12 @@ 0.2.2 - + + + + src/main/resources/${env} + false + + + diff --git a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java new file mode 100644 index 00000000..c511128c --- /dev/null +++ b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java @@ -0,0 +1,39 @@ +package com.hai.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.PropertySource; +import org.springframework.stereotype.Component; + +@Component("commonSysConfig") +@ConfigurationProperties +@PropertySource("classpath:/commonConfig.properties") +public class CommonSysConfig { + + private String tuanYouUrl; + private String tuanYouAppKey; + private String tuanYouAppSecret; + + public String getTuanYouUrl() { + return tuanYouUrl; + } + + public void setTuanYouUrl(String tuanYouUrl) { + this.tuanYouUrl = tuanYouUrl; + } + + public String getTuanYouAppKey() { + return tuanYouAppKey; + } + + public void setTuanYouAppKey(String tuanYouAppKey) { + this.tuanYouAppKey = tuanYouAppKey; + } + + public String getTuanYouAppSecret() { + return tuanYouAppSecret; + } + + public void setTuanYouAppSecret(String tuanYouAppSecret) { + this.tuanYouAppSecret = tuanYouAppSecret; + } +} diff --git a/hai-service/src/main/java/com/hai/config/CommonSysConst.java b/hai-service/src/main/java/com/hai/config/CommonSysConst.java new file mode 100644 index 00000000..cf790283 --- /dev/null +++ b/hai-service/src/main/java/com/hai/config/CommonSysConst.java @@ -0,0 +1,19 @@ +package com.hai.config; + +public class CommonSysConst { + + private static CommonSysConfig sysConfig; + + public static void setSysConfig(CommonSysConfig arg){ + sysConfig = arg; + } + + public static CommonSysConfig getSysConfig(){ + if (null == sysConfig) { + //防止空指针异常 + sysConfig = new CommonSysConfig(); + return sysConfig; + } + return sysConfig; + } +} diff --git a/hai-service/src/main/java/com/hai/config/ConfigListener.java b/hai-service/src/main/java/com/hai/config/ConfigListener.java new file mode 100644 index 00000000..506f428d --- /dev/null +++ b/hai-service/src/main/java/com/hai/config/ConfigListener.java @@ -0,0 +1,23 @@ +package com.hai.config; + +import javax.annotation.Resource; +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import javax.servlet.annotation.WebListener; + +@WebListener +public class ConfigListener implements ServletContextListener { + + @Resource + private CommonSysConfig commonSysConfig; + + @Override + public void contextInitialized(ServletContextEvent sce) { + CommonSysConst.setSysConfig(commonSysConfig); + } + + @Override + public void contextDestroyed(ServletContextEvent sce) { + } + +} diff --git a/hai-cweb/src/main/java/com/cweb/config/TuanYouConfig.java b/hai-service/src/main/java/com/hai/config/TuanYouConfig.java similarity index 69% rename from hai-cweb/src/main/java/com/cweb/config/TuanYouConfig.java rename to hai-service/src/main/java/com/hai/config/TuanYouConfig.java index ae9093c6..65b9e4db 100644 --- a/hai-cweb/src/main/java/com/cweb/config/TuanYouConfig.java +++ b/hai-service/src/main/java/com/hai/config/TuanYouConfig.java @@ -1,4 +1,4 @@ -package com.cweb.config; +package com.hai.config; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -27,12 +27,12 @@ public class TuanYouConfig { */ public static JSONObject queryGasInfoListByPage(Integer pageIndex,Integer pageSize) throws Exception { Map paramMap = new HashMap<>(); - paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); + paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("timestamp", new Date().getTime()); paramMap.put("pageIndex", pageIndex); paramMap.put("pageSize", pageSize); - paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); - return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryGasInfoListByPage", JSON.toJSONString(paramMap)); + paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); + return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryGasInfoListByPage", JSON.toJSONString(paramMap)); } /** @@ -43,11 +43,11 @@ public class TuanYouConfig { */ public static JSONObject queryGasInfoByGasId(String gasId) throws Exception { Map paramMap = new HashMap<>(); - paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); + paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("timestamp", new Date().getTime()); paramMap.put("gasId", gasId); - paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); - return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryGasInfoByGasId", JSON.toJSONString(paramMap)); + paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); + return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryGasInfoByGasId", JSON.toJSONString(paramMap)); } /** @@ -59,12 +59,12 @@ public class TuanYouConfig { */ public static JSONObject queryCompanyPriceDetail(String gasId,String oilNo) throws Exception { Map paramMap = new HashMap<>(); - paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); + paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("timestamp", new Date().getTime()); paramMap.put("gasId", gasId); paramMap.put("oilNo", oilNo); - paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); - return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryCompanyPriceDetail", JSON.toJSONString(paramMap)); + paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); + return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryCompanyPriceDetail", JSON.toJSONString(paramMap)); } /** @@ -75,13 +75,13 @@ public class TuanYouConfig { */ public static JSONObject refuelingOrderPush(Map map) throws Exception { Map paramMap = new HashMap<>(); - paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); + paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("timestamp", new Date().getTime()); for (Map.Entry entry : map.entrySet()) { paramMap.put(entry.getKey(), entry.getValue().toString()); } - paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); - return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/refuelingOrderPush", JSON.toJSONString(paramMap)); + paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); + return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/refuelingOrderPush", JSON.toJSONString(paramMap)); } /** @@ -94,13 +94,13 @@ public class TuanYouConfig { */ public static JSONObject refuelingOrderRefund(String driverPhone,String thirdSerialNo,String refundReason) throws Exception { Map paramMap = new HashMap<>(); - paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); + paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("timestamp", new Date().getTime()); paramMap.put("driverPhone", driverPhone); paramMap.put("thirdSerialNo", thirdSerialNo); paramMap.put("refundReason", refundReason); - paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); - return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/refuelingOrderRefund", JSON.toJSONString(paramMap)); + paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); + return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/refuelingOrderRefund", JSON.toJSONString(paramMap)); } /** @@ -111,11 +111,11 @@ public class TuanYouConfig { */ public static JSONObject queryThirdOrderDretail(String thirdSerialNo) throws Exception { Map paramMap = new HashMap<>(); - paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); + paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("timestamp", new Date().getTime()); paramMap.put("thirdSerialNo", thirdSerialNo); - paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); - return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryThirdOrderDetail", JSON.toJSONString(paramMap)); + paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); + return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryThirdOrderDetail", JSON.toJSONString(paramMap)); } /** @@ -131,7 +131,7 @@ public class TuanYouConfig { */ public static JSONObject queryOrderInfoList(String companyCode,String startTime,String endTime,Integer page,Integer rows,Integer orderPayFlag) throws Exception { Map paramMap = new HashMap<>(); - paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); + paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("timestamp", new Date().getTime()); paramMap.put("companyCode", companyCode); paramMap.put("startTime", startTime); @@ -145,8 +145,8 @@ public class TuanYouConfig { if (orderPayFlag != null) { paramMap.put("orderPayFlag", orderPayFlag); } - paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); - return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryOrderInfoList", JSON.toJSONString(paramMap)); + paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); + return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/queryOrderInfoList", JSON.toJSONString(paramMap)); } /** @@ -157,11 +157,11 @@ public class TuanYouConfig { */ public static JSONObject loopShangQiOrder(String thirdSerialNo) throws Exception { Map paramMap = new HashMap<>(); - paramMap.put("app_key", SysConst.getSysConfig().getTuanYouAppKey()); + paramMap.put("app_key", CommonSysConst.getSysConfig().getTuanYouAppKey()); paramMap.put("timestamp", new Date().getTime()); paramMap.put("thirdSerialNo", thirdSerialNo); - paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,SysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); - return HttpsUtils.doPost(SysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/loopShangQiOrder", JSON.toJSONString(paramMap)); + paramMap.put("sign", MD5Util.encode(generateTuanYouSignature(paramMap,CommonSysConst.getSysConfig().getTuanYouAppSecret()).getBytes()).toLowerCase()); + return HttpsUtils.doPost(CommonSysConst.getSysConfig().getTuanYouUrl()+"/services/vp/openapi/loopShangQiOrder", JSON.toJSONString(paramMap)); } /** diff --git a/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java b/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java index f2cdfd98..64edcb36 100644 --- a/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java @@ -47,6 +47,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "giveaway_type, child_orde_status, ", "praise_status, gas_oil_no, ", "gas_gun_no, gas_order_no, ", + "gas_price_gun, gas_price_vip, ", "ext_1, ext_2, ext_3)", "values (#{orderId,jdbcType=BIGINT}, #{memId,jdbcType=BIGINT}, ", "#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ", @@ -56,6 +57,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "#{giveawayType,jdbcType=BIT}, #{childOrdeStatus,jdbcType=INTEGER}, ", "#{praiseStatus,jdbcType=INTEGER}, #{gasOilNo,jdbcType=VARCHAR}, ", "#{gasGunNo,jdbcType=VARCHAR}, #{gasOrderNo,jdbcType=VARCHAR}, ", + "#{gasPriceGun,jdbcType=DECIMAL}, #{gasPriceVip,jdbcType=DECIMAL}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") @@ -84,6 +86,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { @Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_order_no", property="gasOrderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL), + @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) @@ -94,7 +98,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "select", "id, order_id, mem_id, goods_type, goods_id, goods_name, goods_img, goods_spec_name, ", "goods_price, sale_count, total_price, giveaway_type, child_orde_status, praise_status, ", - "gas_oil_no, gas_gun_no, gas_order_no, ext_1, ext_2, ext_3", + "gas_oil_no, gas_gun_no, gas_order_no, gas_price_gun, gas_price_vip, ext_1, ext_2, ", + "ext_3", "from high_child_order", "where id = #{id,jdbcType=BIGINT}" }) @@ -116,6 +121,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { @Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR), @Result(column="gas_order_no", property="gasOrderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL), + @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) @@ -149,6 +156,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "gas_oil_no = #{gasOilNo,jdbcType=VARCHAR},", "gas_gun_no = #{gasGunNo,jdbcType=VARCHAR},", "gas_order_no = #{gasOrderNo,jdbcType=VARCHAR},", + "gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL},", + "gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL},", "ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},", "ext_3 = #{ext3,jdbcType=VARCHAR}", diff --git a/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java index 5e715443..88a5be32 100644 --- a/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java @@ -92,6 +92,14 @@ public class HighChildOrderSqlProvider { sql.VALUES("gas_order_no", "#{gasOrderNo,jdbcType=VARCHAR}"); } + if (record.getGasPriceGun() != null) { + sql.VALUES("gas_price_gun", "#{gasPriceGun,jdbcType=DECIMAL}"); + } + + if (record.getGasPriceVip() != null) { + sql.VALUES("gas_price_vip", "#{gasPriceVip,jdbcType=DECIMAL}"); + } + if (record.getExt1() != null) { sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); } @@ -130,6 +138,8 @@ public class HighChildOrderSqlProvider { sql.SELECT("gas_oil_no"); sql.SELECT("gas_gun_no"); sql.SELECT("gas_order_no"); + sql.SELECT("gas_price_gun"); + sql.SELECT("gas_price_vip"); sql.SELECT("ext_1"); sql.SELECT("ext_2"); sql.SELECT("ext_3"); @@ -218,6 +228,14 @@ public class HighChildOrderSqlProvider { sql.SET("gas_order_no = #{record.gasOrderNo,jdbcType=VARCHAR}"); } + if (record.getGasPriceGun() != null) { + sql.SET("gas_price_gun = #{record.gasPriceGun,jdbcType=DECIMAL}"); + } + + if (record.getGasPriceVip() != null) { + sql.SET("gas_price_vip = #{record.gasPriceVip,jdbcType=DECIMAL}"); + } + if (record.getExt1() != null) { sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); } @@ -255,6 +273,8 @@ public class HighChildOrderSqlProvider { sql.SET("gas_oil_no = #{record.gasOilNo,jdbcType=VARCHAR}"); sql.SET("gas_gun_no = #{record.gasGunNo,jdbcType=VARCHAR}"); sql.SET("gas_order_no = #{record.gasOrderNo,jdbcType=VARCHAR}"); + sql.SET("gas_price_gun = #{record.gasPriceGun,jdbcType=DECIMAL}"); + sql.SET("gas_price_vip = #{record.gasPriceVip,jdbcType=DECIMAL}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); @@ -332,6 +352,14 @@ public class HighChildOrderSqlProvider { sql.SET("gas_order_no = #{gasOrderNo,jdbcType=VARCHAR}"); } + if (record.getGasPriceGun() != null) { + sql.SET("gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL}"); + } + + if (record.getGasPriceVip() != null) { + sql.SET("gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL}"); + } + if (record.getExt1() != null) { sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighChildOrder.java b/hai-service/src/main/java/com/hai/entity/HighChildOrder.java index 1ec33747..0d8f6685 100644 --- a/hai-service/src/main/java/com/hai/entity/HighChildOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighChildOrder.java @@ -98,6 +98,16 @@ public class HighChildOrder implements Serializable { */ private String gasOrderNo; + /** + * 【加油站】油枪价 + */ + private BigDecimal gasPriceGun; + + /** + * 【加油站】优惠价 + */ + private BigDecimal gasPriceVip; + private String ext1; private String ext2; @@ -242,6 +252,22 @@ public class HighChildOrder implements Serializable { this.gasOrderNo = gasOrderNo; } + public BigDecimal getGasPriceGun() { + return gasPriceGun; + } + + public void setGasPriceGun(BigDecimal gasPriceGun) { + this.gasPriceGun = gasPriceGun; + } + + public BigDecimal getGasPriceVip() { + return gasPriceVip; + } + + public void setGasPriceVip(BigDecimal gasPriceVip) { + this.gasPriceVip = gasPriceVip; + } + public String getExt1() { return ext1; } @@ -295,6 +321,8 @@ public class HighChildOrder implements Serializable { && (this.getGasOilNo() == null ? other.getGasOilNo() == null : this.getGasOilNo().equals(other.getGasOilNo())) && (this.getGasGunNo() == null ? other.getGasGunNo() == null : this.getGasGunNo().equals(other.getGasGunNo())) && (this.getGasOrderNo() == null ? other.getGasOrderNo() == null : this.getGasOrderNo().equals(other.getGasOrderNo())) + && (this.getGasPriceGun() == null ? other.getGasPriceGun() == null : this.getGasPriceGun().equals(other.getGasPriceGun())) + && (this.getGasPriceVip() == null ? other.getGasPriceVip() == null : this.getGasPriceVip().equals(other.getGasPriceVip())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); @@ -321,6 +349,8 @@ public class HighChildOrder implements Serializable { result = prime * result + ((getGasOilNo() == null) ? 0 : getGasOilNo().hashCode()); result = prime * result + ((getGasGunNo() == null) ? 0 : getGasGunNo().hashCode()); result = prime * result + ((getGasOrderNo() == null) ? 0 : getGasOrderNo().hashCode()); + result = prime * result + ((getGasPriceGun() == null) ? 0 : getGasPriceGun().hashCode()); + result = prime * result + ((getGasPriceVip() == null) ? 0 : getGasPriceVip().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); @@ -350,6 +380,8 @@ public class HighChildOrder implements Serializable { sb.append(", gasOilNo=").append(gasOilNo); sb.append(", gasGunNo=").append(gasGunNo); sb.append(", gasOrderNo=").append(gasOrderNo); + sb.append(", gasPriceGun=").append(gasPriceGun); + sb.append(", gasPriceVip=").append(gasPriceVip); sb.append(", ext1=").append(ext1); sb.append(", ext2=").append(ext2); sb.append(", ext3=").append(ext3); diff --git a/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java b/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java index 783653d0..2e2f35ca 100644 --- a/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java @@ -1205,6 +1205,126 @@ public class HighChildOrderExample { return (Criteria) this; } + public Criteria andGasPriceGunIsNull() { + addCriterion("gas_price_gun is null"); + return (Criteria) this; + } + + public Criteria andGasPriceGunIsNotNull() { + addCriterion("gas_price_gun is not null"); + return (Criteria) this; + } + + public Criteria andGasPriceGunEqualTo(BigDecimal value) { + addCriterion("gas_price_gun =", value, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceGunNotEqualTo(BigDecimal value) { + addCriterion("gas_price_gun <>", value, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceGunGreaterThan(BigDecimal value) { + addCriterion("gas_price_gun >", value, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceGunGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("gas_price_gun >=", value, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceGunLessThan(BigDecimal value) { + addCriterion("gas_price_gun <", value, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceGunLessThanOrEqualTo(BigDecimal value) { + addCriterion("gas_price_gun <=", value, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceGunIn(List values) { + addCriterion("gas_price_gun in", values, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceGunNotIn(List values) { + addCriterion("gas_price_gun not in", values, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceGunBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("gas_price_gun between", value1, value2, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceGunNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("gas_price_gun not between", value1, value2, "gasPriceGun"); + return (Criteria) this; + } + + public Criteria andGasPriceVipIsNull() { + addCriterion("gas_price_vip is null"); + return (Criteria) this; + } + + public Criteria andGasPriceVipIsNotNull() { + addCriterion("gas_price_vip is not null"); + return (Criteria) this; + } + + public Criteria andGasPriceVipEqualTo(BigDecimal value) { + addCriterion("gas_price_vip =", value, "gasPriceVip"); + return (Criteria) this; + } + + public Criteria andGasPriceVipNotEqualTo(BigDecimal value) { + addCriterion("gas_price_vip <>", value, "gasPriceVip"); + return (Criteria) this; + } + + public Criteria andGasPriceVipGreaterThan(BigDecimal value) { + addCriterion("gas_price_vip >", value, "gasPriceVip"); + return (Criteria) this; + } + + public Criteria andGasPriceVipGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("gas_price_vip >=", value, "gasPriceVip"); + return (Criteria) this; + } + + public Criteria andGasPriceVipLessThan(BigDecimal value) { + addCriterion("gas_price_vip <", value, "gasPriceVip"); + return (Criteria) this; + } + + public Criteria andGasPriceVipLessThanOrEqualTo(BigDecimal value) { + addCriterion("gas_price_vip <=", value, "gasPriceVip"); + return (Criteria) this; + } + + public Criteria andGasPriceVipIn(List values) { + addCriterion("gas_price_vip in", values, "gasPriceVip"); + return (Criteria) this; + } + + public Criteria andGasPriceVipNotIn(List values) { + addCriterion("gas_price_vip not in", values, "gasPriceVip"); + return (Criteria) this; + } + + public Criteria andGasPriceVipBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("gas_price_vip between", value1, value2, "gasPriceVip"); + return (Criteria) this; + } + + public Criteria andGasPriceVipNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("gas_price_vip not between", value1, value2, "gasPriceVip"); + return (Criteria) this; + } + public Criteria andExt1IsNull() { addCriterion("ext_1 is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/service/HighOrderService.java b/hai-service/src/main/java/com/hai/service/HighOrderService.java index 8f40495f..7f6255a9 100644 --- a/hai-service/src/main/java/com/hai/service/HighOrderService.java +++ b/hai-service/src/main/java/com/hai/service/HighOrderService.java @@ -22,6 +22,12 @@ public interface HighOrderService { **/ void insertOrder(HighOrder highOrder) throws Exception; + /** + * 修子订单信息 + * @param highChildOrder + */ + void updateChildOrder(HighChildOrder highChildOrder); + /** * @Author 胡锐 * @Description 金币支付订单 diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index eb015a55..a2f772b5 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -135,6 +135,11 @@ public class HighOrderServiceImpl implements HighOrderService { } } + @Override + public void updateChildOrder(HighChildOrder highChildOrder) { + highChildOrderMapper.updateByPrimaryKey(highChildOrder); + } + @Override @Transactional(propagation= Propagation.REQUIRES_NEW) public void goldPayOrder(Long userId, Long orderId) { diff --git a/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java index fefa5504..3b8287d5 100644 --- a/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java @@ -7,8 +7,10 @@ import com.hai.common.exception.SysCode; import com.hai.common.pay.util.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.utils.WxUtils; +import com.hai.config.TuanYouConfig; import com.hai.dao.HighUserCouponMapper; import com.hai.entity.*; +import com.hai.model.HighMerchantStoreModel; import com.hai.model.ResultProfitSharing; import com.hai.service.*; import com.hai.service.pay.PayService; @@ -59,6 +61,9 @@ public class GoodsOrderServiceImpl implements PayService { @Resource private HighUserCouponMapper highUserCouponMapper; + @Resource + private HighMerchantStoreService highMerchantStoreService; + @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @@ -125,6 +130,29 @@ public class GoodsOrderServiceImpl implements PayService { Integer goldNum = new BigDecimal(highChildOrder.getTotalPrice().toString()).multiply(new BigDecimal("100")).intValue(); highUserService.goldHandle(highChildOrder.getGoodsId(), goldNum, 1, 1, highChildOrder.getId()); } + + if (highChildOrder.getGoodsType() == 3) { + highChildOrder.setChildOrdeStatus(3); + HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(highChildOrder.getGoodsId()); + // 推送团油订单 + Map paramMap = new HashMap<>(); + paramMap.put("gasId", store.getStoreKey()); + paramMap.put("oilNo", highChildOrder.getGasOilNo()); + paramMap.put("gunNo", highChildOrder.getGasGunNo()); + BigDecimal priceGun = highChildOrder.getGasPriceGun(); + BigDecimal priceVip = highChildOrder.getGasPriceVip(); + paramMap.put("priceGun", priceGun); // 枪单价 + paramMap.put("priceVip", priceVip); // 优惠价 + paramMap.put("driverPhone", order.getMemPhone()); + paramMap.put("thirdSerialNo", order.getOrderNo()); + BigDecimal refuelingAmount = new BigDecimal(highChildOrder.getTotalPrice().toString()).divide(priceGun,2,BigDecimal.ROUND_HALF_UP).multiply(priceVip).setScale(2,BigDecimal.ROUND_HALF_UP); + paramMap.put("refuelingAmount", refuelingAmount); + JSONObject orderPushObject = TuanYouConfig.refuelingOrderPush(paramMap); + if (orderPushObject != null || orderPushObject.getString("code").equals("200")) { + highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); + } + highOrderService.updateChildOrder(highChildOrder); + } } highOrderService.updateOrder(order); @@ -141,9 +169,6 @@ public class GoodsOrderServiceImpl implements PayService { // 计算分账金额 手续费后的价格 * 0.01 注:如果与两个相邻数字的距离相等,则为上舍入的舍入模式。 BigDecimal profitSharingAmount = price.multiply(rake).setScale(2,BigDecimal.ROUND_DOWN); this.wxProfitsharing(order.getPaySerialNo(),order.getOrderNo(),profitSharingAmount); - - - } catch (InterruptedException e) { e.printStackTrace(); } diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties new file mode 100644 index 00000000..310d8262 --- /dev/null +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -0,0 +1,3 @@ +tuanYouUrl=https://test02-motorcade-hcs.czb365.com +tuanYouAppKey=208241666939552 +tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6 \ No newline at end of file diff --git a/hai-service/src/main/resources/prod/commonConfig.properties b/hai-service/src/main/resources/prod/commonConfig.properties new file mode 100644 index 00000000..f61038df --- /dev/null +++ b/hai-service/src/main/resources/prod/commonConfig.properties @@ -0,0 +1,3 @@ +tuanYouUrl=https://test04-motorcade-hcs.czb365.com +tuanYouAppKey=208241666939552 +tuanYouAppSecret=adecc3cff077834cb8632c8ab3bec0e6 \ No newline at end of file