提交2。0代码

dev-discount
袁野 2 years ago
parent 7adb569d16
commit 8215f68730
  1. 3
      hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java
  2. 28
      hai-service/src/main/java/com/hai/config/RechargeConfig.java
  3. 10
      hai-service/src/main/java/com/hai/config/ThirdProductConfig.java
  4. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  5. 2
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -304,10 +304,11 @@ public class HighThirdPartyController {
@RequestParam(name = "productType", required = true) Integer productType, @RequestParam(name = "productType", required = true) Integer productType,
@RequestParam(name = "productId", required = false) Long productId, @RequestParam(name = "productId", required = false) Long productId,
@RequestParam(name = "orderNo", required = false) String orderNo, @RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "payType", required = false) String payType,
@RequestParam(name = "companyId", required = true) Long companyId) { @RequestParam(name = "companyId", required = true) Long companyId) {
try { try {
return ResponseMsgUtil.success(thirdProductConfig.getThirdPartyByDetail(platformId , productType , companyId , productId , orderNo)); return ResponseMsgUtil.success(thirdProductConfig.getThirdPartyByDetail(platformId , productType , companyId , productId , orderNo , payType));
} catch (Exception e) { } catch (Exception e) {
log.error("HighUserCardController --> oilCardRefund() error!", e); log.error("HighUserCardController --> oilCardRefund() error!", e);

@ -203,4 +203,32 @@ public class RechargeConfig {
} }
/**
* @Author Sum1Dream
* @Name searchProductByHg
* @Description // 嗨购话费产品查询
* @Date 11:39 2023/2/7
* @Param [object]
* @Return com.alibaba.fastjson.JSONObject
*/
public static JSONObject searchProductByHg(JSONObject object) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("agentOrderId" , object.getString("agentOrderId"));
paramMap.put("productId" , object.getInteger("productId"));
paramMap.put("mobile" , object.getString("mobile"));
paramMap.put("timestamp" , DateUtil.date2String(new Date() , DateUtil.Y_M_D_HMS));
paramMap.put("appid" , CommonSysConst.getSysConfig().getCyApiKey());
paramMap.put("sign", WxUtils.generateSignatureCy(paramMap , CommonSysConst.getSysConfig().getCyAppSecret() , WXPayConstants.SignType.MD5));
log.info("============请求任务Start=============");
log.info("城宇话费下单-请求参数: " + JSON.toJSONString(paramMap));
JSONObject jsonObject = HttpsUtils.doPostByCy(CommonSysConst.getSysConfig().getCyPostUrl()+ "/api/interface/recharge", paramMap);
log.info("城宇话费下单-响应参数: " + jsonObject.toJSONString());
log.info("============请求任务End==============");
return jsonObject;
}
} }

@ -67,7 +67,7 @@ public class ThirdProductConfig {
return null; return null;
} }
public JSONObject getThirdPartyByDetail(Integer platformId , Integer productType , Long companyId , Long productId , String orderNo) { public JSONObject getThirdPartyByDetail(Integer platformId , Integer productType , Long companyId , Long productId , String orderNo , String payType) {
BsProductConfig productConfig = getProductConfig(productType, companyId , productId); BsProductConfig productConfig = getProductConfig(productType, companyId , productId);
if (productConfig == null && productType != 9) { if (productConfig == null && productType != 9) {
@ -98,7 +98,13 @@ public class ThirdProductConfig {
object.put("priceDiscount" , productConfig.getDiscount()); object.put("priceDiscount" , productConfig.getDiscount());
} }
object.put("productPayType" , bsConfigService.getProductPayTypeByMap(listMap)); if (payType != null && payType.length() != 0) {
object.put("productPayType" , payType);
} else {
object.put("productPayType" , bsConfigService.getProductPayTypeByMap(listMap));
}
object.put("productPlatform" , bsConfigService.getProductPlatformByMap(listMap)); object.put("productPlatform" , bsConfigService.getProductPlatformByMap(listMap));
return object; return object;

@ -615,7 +615,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
String orderNo; String orderNo;
// 查询详单订单的实际 // 查询详单订单的实际
JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId") , object.getLong("productId") , null); JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId") , object.getLong("productId") , null , "");
// 获取token 千猪请求接口token // 获取token 千猪请求接口token
JSONObject userToken = QianZhuConfig.getTokenV2(user.getId().toString(), user.getName(), user.getPhone()); JSONObject userToken = QianZhuConfig.getTokenV2(user.getId().toString(), user.getName(), user.getPhone());

@ -1426,7 +1426,7 @@ public class HighOrderServiceImpl implements HighOrderService {
BigDecimal marketPrice = new BigDecimal(0); BigDecimal marketPrice = new BigDecimal(0);
// 查询详单订单的实际 // 查询详单订单的实际
JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId") , object.getLong("productId") , null); JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId") , object.getLong("productId") , null , "");
highOrder.setProductType(object.getInteger("productType")); highOrder.setProductType(object.getInteger("productType"));

Loading…
Cancel
Save