From 90b524065179fd1103723d229d0a1804097ef18e Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 10 Jan 2023 13:37:39 +0800 Subject: [PATCH] Merge branch 'dev_yy' into 2.0-dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dev_yy: (25 commits) 提交代理商 1 1 提交实物 提交代码 提交代码 提交代码 提交抽奖代码 1 提交代码 提交代码 提交代码 提交代码 提交代码 提交 1 1 修改首页没有积分专区 提交代码 修改小程序注册用券 ... # Conflicts: # hai-cweb/src/main/java/com/cweb/controller/HighTestController.java # hai-service/src/main/java/com/hai/common/utils/DateUtil.java # hai-service/src/main/java/com/hai/common/utils/RequestUtils.java # hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java # hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java # hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java # hai-service/src/main/java/com/hai/entity/HighChildOrder.java # hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java # hai-service/src/main/java/com/hai/entity/HighOrder.java # hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java # hai-service/src/main/java/com/hai/service/HighUserService.java # hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java # hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java # hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java # hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java --- .../controller/BsProductConfigController.java | 16 +++++----------- .../cweb/controller/CmsContentController.java | 1 + .../controller/HighThirdPartyController.java | 13 ++----------- .../java/com/hai/config/ThirdProductConfig.java | 9 +-------- .../com/hai/enum_type/ApiProductTypeEnum.java | 5 +++-- .../impl/OrderCreateHandleServiceImpl.java | 2 ++ .../main/java/com/hai/order/utils/OrderUtil.java | 2 +- .../hai/service/impl/ApiProductServiceImpl.java | 16 ++++++---------- .../main/resources/dev/commonConfig.properties | 4 ++-- 9 files changed, 23 insertions(+), 45 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/BsProductConfigController.java b/hai-bweb/src/main/java/com/bweb/controller/BsProductConfigController.java index e72cc9ad..99ca83d3 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/BsProductConfigController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/BsProductConfigController.java @@ -80,20 +80,14 @@ public class BsProductConfigController { List productConfigModels = new ArrayList<>(); for (BsProductConfig list : productConfigs) { + BsProductConfigModel bsProductConfigModel = new BsProductConfigModel(); listMap = new HashMap<>(); listMap.put("returnType", 2); - //1:星巴克 2:肯德基 3:充值产品 4 卡券 5 在线加油 - if (list.getProductType() == 1 || list.getProductType() == 2 || list.getProductType() == 3) { - listMap.put("productType", "5"); - } else if( list.getProductType() == 4) { - listMap.put("productType", "1"); - } else if( list.getProductType() == 5) { - listMap.put("productType", "2"); - } - + listMap.put("productType", list.getProductType()); listMap.put("sourceId", list.getId()); BeanUtils.copyProperties(list, bsProductConfigModel); + if (bsConfigService.getProductDiscountByMap(listMap) != null) { bsProductConfigModel.setIntegralDiscount(bsConfigService.getProductDiscountByMap(listMap).getDiscount()); } @@ -169,7 +163,7 @@ public class BsProductConfigController { apiProductService.updateProductConfig(object); - return ResponseMsgUtil.success("新增成功"); + return ResponseMsgUtil.success("修改成功"); } catch (Exception e) { log.error("OutRechargePriceController --> insertPrice() error!", e); @@ -189,7 +183,7 @@ public class BsProductConfigController { BsProductConfigModel bsProductConfigModel = new BsProductConfigModel(); BeanUtils.copyProperties(bsProductConfig, bsProductConfigModel); Map listMap = new HashMap<>(); - listMap.put("productType", "5"); + listMap.put("productType", bsProductConfig.getProductType()); listMap.put("returnType", 1); listMap.put("sourceId", bsProductConfig.getId()); listMap.put("platformId", null); diff --git a/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java b/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java index 1310e3c2..00d31f0a 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java @@ -88,6 +88,7 @@ public class CmsContentController { if (cmsContent.size() > 0) { object.put("jumpType" , cmsContent.get(0).getJumpType()); object.put("jumpUrl" , cmsContent.get(0).getJumpUrl()); + object.put("detailJumpUrl" , cmsContent.get(0).getExt1()); } object.put("childDate" , cmsContentConfig.getCmsContentData(cmsCategory.getName(), companyId)); } else if(cmsCategory.getType() == 3) { diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java b/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java index 41bf5311..51c53752 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java @@ -303,19 +303,10 @@ public class HighThirdPartyController { public ResponseData getThirdPartyByDetail(@RequestParam(name = "platformId", required = true) Integer platformId, @RequestParam(name = "productType", required = true) Integer productType, @RequestParam(name = "productId", required = false) Long productId, - @RequestParam(name = "regionId", required = true) String regionId) { + @RequestParam(name = "companyId", required = true) Long companyId) { try { - SecRegion region = commonService.getParentByRegion(Long.valueOf(regionId)); - - if (region == null) { - log.error("getRechargeProduct error!", "查询失败!"); - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, regionId + "当前地区未配置产品"); - } - - BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); - - return ResponseMsgUtil.success(thirdProductConfig.getThirdPartyByDetail(platformId , productType , bsCompany.getId() , productId)); + return ResponseMsgUtil.success(thirdProductConfig.getThirdPartyByDetail(platformId , productType , companyId , productId)); } catch (Exception e) { log.error("HighUserCardController --> oilCardRefund() error!", e); diff --git a/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java b/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java index 0998af27..53fbb3dd 100644 --- a/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java +++ b/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java @@ -71,14 +71,7 @@ public class ThirdProductConfig { JSONObject object = new JSONObject(); Map listMap = new HashMap<>(); - //1:星巴克 2:肯德基 3:充值产品 4 卡券 5 在线加油 - if (productType == 1 || productType == 2 || productType == 3) { - listMap.put("productType", "5"); - } else if( productType == 4) { - listMap.put("productType", "1"); - } else if( productType == 5) { - listMap.put("productType", "2"); - } + listMap.put("productType", productType); listMap.put("returnType", 1); listMap.put("sourceId", productConfig.getId()); listMap.put("platformId", platformId); diff --git a/hai-service/src/main/java/com/hai/enum_type/ApiProductTypeEnum.java b/hai-service/src/main/java/com/hai/enum_type/ApiProductTypeEnum.java index 18f9b7a1..df5fdf56 100644 --- a/hai-service/src/main/java/com/hai/enum_type/ApiProductTypeEnum.java +++ b/hai-service/src/main/java/com/hai/enum_type/ApiProductTypeEnum.java @@ -13,8 +13,9 @@ public enum ApiProductTypeEnum { type1(1, "星巴克"), type2(2, "肯德基"), type3(3, "第三方产品"), - type4(4, "卡券"), - type5(5, "在线加油") + type4(5, "卡券"), + type5(6, "在线加油"), + type6(7, "优惠券包 ") ; private Integer type; diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java index e0a894c3..bef1750d 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java @@ -811,6 +811,8 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { childOrder.setCreateTime(new Date()); childOrder.setTotalDeductionPrice(memberProduct.getPrice().subtract(childPrice)); + // 配置实际支付金额 + childOrder.setGoodsActualPrice(childPrice); childOrderList.add(childOrder); diff --git a/hai-service/src/main/java/com/hai/order/utils/OrderUtil.java b/hai-service/src/main/java/com/hai/order/utils/OrderUtil.java index ea3e8038..bb9f136f 100644 --- a/hai-service/src/main/java/com/hai/order/utils/OrderUtil.java +++ b/hai-service/src/main/java/com/hai/order/utils/OrderUtil.java @@ -30,7 +30,7 @@ public class OrderUtil { BigDecimal deductionPrice = new BigDecimal("0"); for (HighChildOrder childOrder : childOrderList) { // 不是赠品才会计算金额 - if (childOrder.getGiveawayType() == false) { + if (!childOrder.getGiveawayType()) { if (childOrder.getTotalPrice() == null || childOrder.getGoodsActualPrice() == null || childOrder.getTotalDeductionPrice() == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "缺少计算金额"); } diff --git a/hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java index ad8ce70c..9f7c87b2 100644 --- a/hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java @@ -222,16 +222,12 @@ public class ApiProductServiceImpl implements ApiProductService { // 生成实体 JSONObject postObject = new JSONObject(); - //1:星巴克 2:肯德基 3:充值产品 4 卡券 5 在线加油 - if (object.getInteger("productType") == 1 || object.getInteger("productType") == 2 || object.getInteger("productType") == 3) { - postObject.put("productType", 5); - productConfig.setProductId(object.getLong("productType")); - } else if( object.getInteger("productType") == 4) { - postObject.put("productType", 1); + postObject.put("productType", object.getLong("productType")); + productConfig.setProductId(1L); + + // 产品类型 1:星巴克 2:肯德基 3:会员充值 4:积分充值 5:购买卡券 6:加油服务 7:优惠券包 8:汇联通充值 9:话费充值 + if( object.getInteger("productType") == 5) { productConfig.setProductId(object.getLong("productId")); - } else if( object.getInteger("productType") == 5) { - postObject.put("productType", 2); - productConfig.setProductId(object.getLong("productType")); } productConfigMapper.insert(productConfig); @@ -279,7 +275,7 @@ public class ApiProductServiceImpl implements ApiProductService { postObject.put("operatorId", object.getLong("operatorId")); postObject.put("operatorName", object.getString("operatorName")); postObject.put("sourceId", productConfig.getId()); - postObject.put("productType", 5); + postObject.put("productType", productConfig.getProductType()); // 配置支付方式 commonService.configPayType(postObject); diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties index 80dcac5e..a923cedb 100644 --- a/hai-service/src/main/resources/dev/commonConfig.properties +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -105,5 +105,5 @@ unionRsaKey=891f6775fba7f12cc23df7c75e02b39b891f6775fba7f12c #url -#fileUrl=/home/project/hsg/filesystem/ -fileUrl=/Volumes/work/code/filesystem/ +fileUrl=/home/project/hsg/filesystem/ +#fileUrl=/Volumes/work/code/filesystem/