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 b48968f4..ef8335e6 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/BsProductConfigController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/BsProductConfigController.java @@ -94,7 +94,10 @@ public class BsProductConfigController { listMap.put("sourceId", list.getId()); BeanUtils.copyProperties(list, bsProductConfigModel); - bsProductConfigModel.setIntegralDiscount(bsConfigService.getProductDiscountByMap(listMap).getDiscount()); + if (bsConfigService.getProductDiscountByMap(listMap) != null) { + bsProductConfigModel.setIntegralDiscount(bsConfigService.getProductDiscountByMap(listMap).getDiscount()); + } + bsProductConfigModel.setProductPayTypeString(bsConfigService.getProductPayTypeByMap(listMap)); bsProductConfigModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap)); productConfigModels.add(bsProductConfigModel); @@ -192,8 +195,10 @@ public class BsProductConfigController { listMap.put("returnType", 1); listMap.put("sourceId", bsProductConfig.getId()); listMap.put("platformId", null); + if (bsConfigService.getProductDiscountByMap(listMap) != null) { + bsProductConfigModel.setIntegralDiscount(bsConfigService.getProductDiscountByMap(listMap).getDiscount()); + } - bsProductConfigModel.setIntegralDiscount(bsConfigService.getProductDiscountByMap(listMap).getDiscount()); bsProductConfigModel.setProductPayTypeString(bsConfigService.getProductPayTypeByMap(listMap)); bsProductConfigModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap)); return ResponseMsgUtil.success(bsProductConfigModel); diff --git a/hai-order/src/main/java/com/web/controller/business/OrderThirdPartyController.java b/hai-order/src/main/java/com/web/controller/business/OrderThirdPartyController.java index 6d285669..ccd91aee 100644 --- a/hai-order/src/main/java/com/web/controller/business/OrderThirdPartyController.java +++ b/hai-order/src/main/java/com/web/controller/business/OrderThirdPartyController.java @@ -48,7 +48,7 @@ public class OrderThirdPartyController { @RequestParam(name = "memPhone", required = false) String memPhone, @RequestParam(name = "memCardNo", required = false) String memCardNo, @RequestParam(name = "payType", required = false) Integer payType, - @RequestParam(name = "orderStatus", required = false) Integer orderStatus, + @RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "companyId", required = false) Long companyId, @RequestParam(name = "createTimeS", required = false) Long createTimeS, @RequestParam(name = "createTimeE", required = false) Long createTimeE, @@ -74,23 +74,17 @@ public class OrderThirdPartyController { } else { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); } - if (createTimeS != null && createTimeE != null) { - map.put("createTimeS", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTimeS)); - map.put("createTimeE", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTimeE)); - } - if (createTimeS != null && createTimeE != null) { - map.put("payTimeS", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(payTimeS)); - map.put("payTimeE", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(payTimeE)); - } - if (createTimeS != null && createTimeE != null) { - map.put("finishTimeS", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(finishTimeS)); - map.put("finishTimeE", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(finishTimeE)); - } + map.put("createTimeS", createTimeS); + map.put("createTimeE", createTimeE); + map.put("payTimeS", payTimeS); + map.put("payTimeE", payTimeE); + map.put("finishTimeS", finishTimeS); + map.put("finishTimeE", finishTimeE); map.put("orderNo", orderNo); map.put("memPhone", memPhone); map.put("memCardNo", memCardNo); map.put("productType", productType); - map.put("orderStatus", orderStatus); + map.put("status", status); map.put("payType", payType); PageHelper.startPage(pageNum,pageSize); 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 62b53c39..0998af27 100644 --- a/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java +++ b/hai-service/src/main/java/com/hai/config/ThirdProductConfig.java @@ -82,8 +82,10 @@ public class ThirdProductConfig { listMap.put("returnType", 1); listMap.put("sourceId", productConfig.getId()); listMap.put("platformId", platformId); + if (bsConfigService.getProductDiscountByMap(listMap) != null) { + object.put("integralDiscount" , bsConfigService.getProductDiscountByMap(listMap).getDiscount()); + } - object.put("integralDiscount" , bsConfigService.getProductDiscountByMap(listMap).getDiscount()); object.put("priceDiscount" , productConfig.getDiscount()); object.put("productPayType" , bsConfigService.getProductPayTypeByMap(listMap)); object.put("productPlatform" , bsConfigService.getProductPlatformByMap(listMap)); diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java index 52efa713..97aed713 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java @@ -692,25 +692,31 @@ public class OrderServiceImpl implements OrderService { criteria.andMemPhoneLike("%" + MapUtils.getString(param, "memPhone") + "%"); } - if (MapUtils.getInteger(param, "orderStatus") != null) { - criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "orderStatus")); + if (MapUtils.getInteger(param, "status") != null) { + criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "status")); } - if (StringUtils.isNotBlank(MapUtils.getString(param, "createTimeS")) && StringUtils.isNotBlank(MapUtils.getString(param, "createTimeE"))) { - criteria.andCreateTimeBetween( - DateUtil.format(MapUtils.getString(param, "createTimeS"), "yyyy-MM-dd HH:mm:ss"), - DateUtil.format(MapUtils.getString(param, "createTimeE"), "yyyy-MM-dd HH:mm:ss")); + if (MapUtils.getLong(param, "createTimeS") != null) { + criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS"))); } - if (StringUtils.isNotBlank(MapUtils.getString(param, "payTimeS")) && StringUtils.isNotBlank(MapUtils.getString(param, "payTimeE"))) { - criteria.andPayTimeBetween( - DateUtil.format(MapUtils.getString(param, "payTimeS"), "yyyy-MM-dd HH:mm:ss"), - DateUtil.format(MapUtils.getString(param, "payTimeE"), "yyyy-MM-dd HH:mm:ss")); + if (MapUtils.getLong(param, "createTimeE") != null) { + criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(param, "createTimeE"))); } - if (StringUtils.isNotBlank(MapUtils.getString(param, "finishTimeS")) && StringUtils.isNotBlank(MapUtils.getString(param, "finishTimeE"))) { - criteria.andFinishTimeBetween( - DateUtil.format(MapUtils.getString(param, "finishTimeS"), "yyyy-MM-dd HH:mm:ss"), - DateUtil.format(MapUtils.getString(param, "finishTimeE"), "yyyy-MM-dd HH:mm:ss")); + + if (MapUtils.getLong(param, "payTimeS") != null) { + criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "payTimeS"))); + } + if (MapUtils.getLong(param, "payTimeE") != null) { + criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(param, "payTimeE"))); + } + + if (MapUtils.getLong(param, "finishTimeS") != null) { + criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "finishTimeS"))); + } + if (MapUtils.getLong(param, "finishTimeE") != null) { + criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(param, "finishTimeE"))); } + example.setOrderByClause("create_time desc"); return orderMapper.selectByExample(example); }