修改注册送券内容

dev-discount
袁野 2 years ago
parent a3fb86d340
commit 9fa70087cd
  1. 9
      hai-bweb/src/main/java/com/bweb/controller/BsProductConfigController.java
  2. 22
      hai-order/src/main/java/com/web/controller/business/OrderThirdPartyController.java
  3. 4
      hai-service/src/main/java/com/hai/config/ThirdProductConfig.java
  4. 34
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java

@ -94,7 +94,10 @@ public class BsProductConfigController {
listMap.put("sourceId", list.getId()); listMap.put("sourceId", list.getId());
BeanUtils.copyProperties(list, bsProductConfigModel); 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.setProductPayTypeString(bsConfigService.getProductPayTypeByMap(listMap));
bsProductConfigModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap)); bsProductConfigModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap));
productConfigModels.add(bsProductConfigModel); productConfigModels.add(bsProductConfigModel);
@ -192,8 +195,10 @@ public class BsProductConfigController {
listMap.put("returnType", 1); listMap.put("returnType", 1);
listMap.put("sourceId", bsProductConfig.getId()); listMap.put("sourceId", bsProductConfig.getId());
listMap.put("platformId", null); 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.setProductPayTypeString(bsConfigService.getProductPayTypeByMap(listMap));
bsProductConfigModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap)); bsProductConfigModel.setProductPlatformString(bsConfigService.getProductPlatformByMap(listMap));
return ResponseMsgUtil.success(bsProductConfigModel); return ResponseMsgUtil.success(bsProductConfigModel);

@ -48,7 +48,7 @@ public class OrderThirdPartyController {
@RequestParam(name = "memPhone", required = false) String memPhone, @RequestParam(name = "memPhone", required = false) String memPhone,
@RequestParam(name = "memCardNo", required = false) String memCardNo, @RequestParam(name = "memCardNo", required = false) String memCardNo,
@RequestParam(name = "payType", required = false) Integer payType, @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 = "companyId", required = false) Long companyId,
@RequestParam(name = "createTimeS", required = false) Long createTimeS, @RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "createTimeE", required = false) Long createTimeE, @RequestParam(name = "createTimeE", required = false) Long createTimeE,
@ -74,23 +74,17 @@ public class OrderThirdPartyController {
} else { } else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
} }
if (createTimeS != null && createTimeE != null) { map.put("createTimeS", createTimeS);
map.put("createTimeS", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTimeS)); map.put("createTimeE", createTimeE);
map.put("createTimeE", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTimeE)); map.put("payTimeS", payTimeS);
} map.put("payTimeE", payTimeE);
if (createTimeS != null && createTimeE != null) { map.put("finishTimeS", finishTimeS);
map.put("payTimeS", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(payTimeS)); map.put("finishTimeE", finishTimeE);
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("orderNo", orderNo); map.put("orderNo", orderNo);
map.put("memPhone", memPhone); map.put("memPhone", memPhone);
map.put("memCardNo", memCardNo); map.put("memCardNo", memCardNo);
map.put("productType", productType); map.put("productType", productType);
map.put("orderStatus", orderStatus); map.put("status", status);
map.put("payType", payType); map.put("payType", payType);
PageHelper.startPage(pageNum,pageSize); PageHelper.startPage(pageNum,pageSize);

@ -82,8 +82,10 @@ public class ThirdProductConfig {
listMap.put("returnType", 1); listMap.put("returnType", 1);
listMap.put("sourceId", productConfig.getId()); listMap.put("sourceId", productConfig.getId());
listMap.put("platformId", platformId); 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("priceDiscount" , productConfig.getDiscount());
object.put("productPayType" , bsConfigService.getProductPayTypeByMap(listMap)); object.put("productPayType" , bsConfigService.getProductPayTypeByMap(listMap));
object.put("productPlatform" , bsConfigService.getProductPlatformByMap(listMap)); object.put("productPlatform" , bsConfigService.getProductPlatformByMap(listMap));

@ -692,25 +692,31 @@ public class OrderServiceImpl implements OrderService {
criteria.andMemPhoneLike("%" + MapUtils.getString(param, "memPhone") + "%"); criteria.andMemPhoneLike("%" + MapUtils.getString(param, "memPhone") + "%");
} }
if (MapUtils.getInteger(param, "orderStatus") != null) { if (MapUtils.getInteger(param, "status") != null) {
criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "orderStatus")); criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "status"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "createTimeS")) && StringUtils.isNotBlank(MapUtils.getString(param, "createTimeE"))) { if (MapUtils.getLong(param, "createTimeS") != null) {
criteria.andCreateTimeBetween( criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS")));
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 (StringUtils.isNotBlank(MapUtils.getString(param, "payTimeS")) && StringUtils.isNotBlank(MapUtils.getString(param, "payTimeE"))) { if (MapUtils.getLong(param, "createTimeE") != null) {
criteria.andPayTimeBetween( criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(param, "createTimeE")));
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 (StringUtils.isNotBlank(MapUtils.getString(param, "finishTimeS")) && StringUtils.isNotBlank(MapUtils.getString(param, "finishTimeE"))) {
criteria.andFinishTimeBetween( if (MapUtils.getLong(param, "payTimeS") != null) {
DateUtil.format(MapUtils.getString(param, "finishTimeS"), "yyyy-MM-dd HH:mm:ss"), criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "payTimeS")));
DateUtil.format(MapUtils.getString(param, "finishTimeE"), "yyyy-MM-dd HH:mm:ss")); }
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"); example.setOrderByClause("create_time desc");
return orderMapper.selectByExample(example); return orderMapper.selectByExample(example);
} }

Loading…
Cancel
Save