diff --git a/hai-bweb/src/main/java/com/bweb/controller/Goods/GoodsDetailController.java b/hai-bweb/src/main/java/com/bweb/controller/Goods/GoodsDetailController.java index 65378f8f..c0f52b98 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/Goods/GoodsDetailController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/Goods/GoodsDetailController.java @@ -60,6 +60,7 @@ public class GoodsDetailController { public ResponseData getListGoodsDetail( @RequestParam(value = "title", required = false) String title, @RequestParam(value = "status", required = false) Integer status, + @RequestParam(value = "goodsLabel", required = false) String goodsLabel, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize , HttpServletRequest request @@ -73,6 +74,8 @@ public class GoodsDetailController { map.put("title", title); map.put("status", status); + map.put("goodsLabel", goodsLabel); + map.put("companyId", userInfoModel.getBsCompany().getId()); if (userInfoModel.getSecUser().getExt3() != null) { map.put("opId" , userInfoModel.getSecUser().getId()); @@ -161,9 +164,7 @@ public class GoodsDetailController { goodsDetail.setCreateTime(goods.getCreateTime()); goodsDetail.setUpdateTime(new Date()); goodsDetail.setGoodsTypeName(goodsType.getTitle()); - - goodsDetail.setOpId(userInfoModel.getSecUser().getId()); - goodsDetail.setOpName(userInfoModel.getSecUser().getLoginName()); + goodsDetail.setCompanyId(userInfoModel.getBsCompany().getId()); goodsDetailService.updateGoodsDetail(goodsDetail); @@ -271,6 +272,7 @@ public class GoodsDetailController { approve.setUpdateTime(new Date()); approve.setSubmitOperatorId(userInfoModel.getSecUser().getId()); approve.setSubmitOperatorName(userInfoModel.getSecUser().getUserName()); + approve.setExt1(userInfoModel.getBsCompany().getId().toString()); // 增加审批 highApproveService.insertApprove(approve); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighApproveController.java b/hai-bweb/src/main/java/com/bweb/controller/HighApproveController.java index 6ef83480..958f51c4 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighApproveController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighApproveController.java @@ -10,8 +10,13 @@ import com.hai.common.security.SessionObject; import com.hai.common.security.UserCenter; import com.hai.common.utils.DateUtil; import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.GoodsDetail; +import com.hai.entity.GoodsSku; import com.hai.entity.HighApprove; import com.hai.enum_type.ApproveType; +import com.hai.goods.model.GoodsModel; +import com.hai.goods.service.GoodsDetailService; +import com.hai.goods.service.GoodsSkuService; import com.hai.model.ResponseData; import com.hai.model.UserInfoModel; import com.hai.service.HighApproveService; @@ -20,14 +25,17 @@ import io.swagger.annotations.Api; 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; /** @@ -46,12 +54,18 @@ public class HighApproveController { @Autowired private UserCenter userCenter; + @Resource + private GoodsSkuService goodsSkuService; + @Resource private HighApproveService highApproveService; @Resource private HighCouponService highCouponService; + @Resource + private GoodsDetailService goodsDetailService; + @RequestMapping(value="/approveProcessed",method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "审批") @@ -112,6 +126,26 @@ public class HighApproveController { if (approve.getObjectType().equals(ApproveType.UP_SHELF_APPROVE.getType())) { map.put("object", highCouponService.getCouponById(approve.getObjectId())); } + if (approve.getObjectType().equals(ApproveType.GOODS_UP_SHELF_APPROVE.getType())) { + + + + GoodsDetail goodsDetail = goodsDetailService.findGoodsDetailById(approve.getObjectId()); + + if (goodsDetail == null) { + log.error("GoodsDetailController -> findGoodsDetailById() error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相关商品信息"); + } + + GoodsModel goodsModel = new GoodsModel(); + + BeanUtils.copyProperties(goodsDetail, goodsModel); + + goodsModel.setGoodsSkus(goodsSkuService.getGoodsSkuList(goodsDetail.getId())); + + map.put("object", goodsModel); + + } return ResponseMsgUtil.success(map); @@ -129,12 +163,18 @@ public class HighApproveController { @RequestParam(name = "objectId", required = false) Long objectId, @RequestParam(name = "objectName", required = false) String objectName, @RequestParam(name = "pageNum", required = true) Integer pageNum, - @RequestParam(name = "pageSize", required = true) Integer pageSize) { + @RequestParam(name = "pageSize", required = true) Integer pageSize ,HttpServletRequest request) { try { + SessionObject sessionObject = userCenter.getSessionObject(request); + UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); + Map map = new HashMap<>(); map.put("approveSerialNo", approveSerialNo); map.put("objectType", objectType); + if (objectType == 4) { + map.put("companyId", userInfoModel.getBsCompany().getId()); + } map.put("objectId", objectId); map.put("objectName", objectName); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighTestController.java b/hai-bweb/src/main/java/com/bweb/controller/HighTestController.java index 52c4d168..9c8925c0 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighTestController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighTestController.java @@ -1 +1 @@ - package com.bweb.controller; import com.alibaba.excel.EasyExcel; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alipay.api.domain.ForbbidenTime; import com.alipay.api.domain.OfferObject; import com.bweb.config.SysConst; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.entity.*; import com.hai.model.OrderRefundModel; import com.hai.model.ResponseData; import com.hai.order.model.ExportOrderMobileModel; import com.hai.order.model.OrderThirdPartyModel; import com.hai.order.service.OrderRefundService; import com.hai.order.service.OrderService; import com.hai.order.type.*; import com.hai.order.utils.OrderUtil; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.io.File; import java.math.BigDecimal; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private OutRechargeOrderService outRechargeOrderService; @Autowired private OutRechargeChildOrderService childOrderService; @Resource private BsOrderRebateService bsOrderRebateService; @Resource private CommonService commonService; @Resource private OrderService orderService; @Resource private HighOrderService highOrderService; @Autowired private RedisTemplate redisTemplate; @RequestMapping(value="/resolveResponse",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "解析") public ResponseData resolveResponse( @RequestParam(name = "data", required = false) String data ) { try { JSONObject cardInfoObject = HuiLianTongUnionCardConfig.resolveResponse(data); return ResponseMsgUtil.success(cardInfoObject); } catch (Exception e) { log.error("getUserByTelephone",e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getHuiLianTongCardConsume", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询汇联通工会卡消费记录") public ResponseData getHuiLianTongCardConsume(@RequestParam(name = "businessType", required = true) String businessType, @RequestParam(name = "cardNo", required = true) String cardNo, @RequestParam(name = "sdate", required = true) Long sdate, @RequestParam(name = "edate", required = true) Long edate, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request) { try { JSONObject consumptionRecord = HuiLianTongUnionCardConfig.queryConsumptionRecordByBusiness(businessType, cardNo, sdate, edate, pageNum, pageSize); if (StringUtils.isBlank(consumptionRecord.getString("data"))) { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQUEST_ERROR, ""); } JSONArray array = HuiLianTongUnionCardConfig.resolveResponse(consumptionRecord.getString("data")).getJSONArray("records"); return ResponseMsgUtil.success(array); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardConsume() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getStationStores", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "获取油站") public ResponseData getStationStores() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "4B1DF80A2D64376D2807ACA6CFEDE8AA"); mapPost.put("merchId" , "20220896102"); Map map = new HashMap<>(); map.put("apiKey" , "4B1DF80A2D64376D2807ACA6CFEDE8AA"); map.put("merchId" , "20220896102"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsg.dctpay.com/v1/refuelOnline/getStationStore" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getRechargeProduct", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "获取充值产品") public ResponseData getRechargeProduct() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/mobileRecharge/getMobileProduct" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getAllCities", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询可用城市") public ResponseData getAllCities() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/apiMerchants/getAllCities" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克门店") public ResponseData starbucksStore() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("lat" , "29.56900"); mapPost.put("lon" , "106.55843"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("lat" , "29.56900"); map.put("lon" , "106.55843"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/starbucks/starbucksStore" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksProducts", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克商品") public ResponseData starbucksProducts() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/starbucks/starbucksProducts" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/kfcStoresList", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询肯德基门店") public ResponseData kfcStoresList() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/kfc/kfcStoresList" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/kfcProductByStoreCode", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据门店编码查询KFC产品") public ResponseData kfcProductByStoreCode(@RequestParam(name = "storeCode", required = true) String storeCode) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("storeCode" , storeCode); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("storeCode" , storeCode); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/kfc/kfcProductByStoreCode" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getRegional", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询区域信息") public ResponseData getRegional() { try { return ResponseMsgUtil.success(commonService.getRegional("code" , "name" , "childs")); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/memberProducts", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询会员产品") public ResponseData memberProducts() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/memberRecharge/memberProducts" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/createOrder", method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "创建订单") public ResponseData createOrder(@RequestBody JSONObject object) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("timetable" , new Date().getTime()); mapPost.put("orderNo" , "TEST" + OrderUtil.generateOrderNo()); mapPost.put("productType" , object.getString("productType")); mapPost.put("notifyUrl" , "test"); mapPost.put("content" , object.toString()); System.out.println(mapPost); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("timetable" , mapPost.get("timetable").toString()); map.put("orderNo" , mapPost.get("orderNo")); map.put("productType" , object.getString("productType")); map.put("content" , object.toString()); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/createOrder" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付订单") public ResponseData payOrder(@RequestParam(name = "mchOrderNo", required = true) String mchOrderNo) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("mchOrderNo" , mchOrderNo); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("mchOrderNo" , mchOrderNo); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/orderPay" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryOrderDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单详情") public ResponseData queryOrderDetail(@RequestParam(name = "mchOrderNo", required = true) String mchOrderNo) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("mchOrderNo" , mchOrderNo); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("mchOrderNo" , mchOrderNo); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/queryOrderDetail" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/mobileChildOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据订单号修改话费订单状态") public ResponseData mobileChildOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { OutRechargeOrder order = outRechargeOrderService.findByOrderNo(orderNo); String key = "recharge_" + order.getId(); try { // 分布式锁占坑 Boolean lock = redisTemplate.opsForValue().setIfAbsent(key, order.getOrderNo()); if(Boolean.TRUE.equals(lock)) { // 判断订单是否可以继续充值 1:满足继续充值条件 2:订单满足退款条件 3:订单不可以退款不可以继续充值 4:订单异常 5:订单充值完成 int orderStatus = outRechargeOrderService.orderWhetherRecharge(order); log.info("处理话费订单:" + orderStatus + "订单号" + order.getOrderNo()); if (orderStatus == 1) { outRechargeOrderService.getPrepaidRechargeApi(order); } if (orderStatus == 2) { outRechargeOrderService.refundOrder(order.getId()); } if (orderStatus == 4) { HighOrder highOrder = highOrderService.getOrderByOrderNo(order.getOrderNo()); highOrder.setExceptionStatus(true); highOrder.setExceptionContent("话费订单存在多条重复记录"); highOrderService.updateOrder(highOrder); } if (orderStatus == 5) { outRechargeOrderService.completeOrder(order.getId()); } } else { // 加锁失败,重试 Thread.sleep(100); mobileChildOrderByOrderNo(orderNo); } return ResponseMsgUtil.success(""); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } finally { // 删除key,释放锁 redisTemplate.delete(key); } } @RequestMapping(value = "/deposit", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "工会卡充值") public ResponseData deposit(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); HighChildOrder highChildOrder = order.getHighChildOrderList().get(0); if (order.getOrderStatus() != 2) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态错误"); } // 汇联通充值 String goodsDesc = "汇联通充值"+order.getPayPrice()+"元"; String tranDesc = ""; String businessType = "ghk_deposit"; String orderNoAgain = OrderUtil.generateOrderNo(); order.setOrderStatus(3); order.setRemarks("工会卡再次充值订单号" + orderNoAgain); highOrderService.updateOrder(order); // 汇联通卡充值 JSONObject deposit = HuiLianTongUnionCardConfig.deposit(orderNoAgain, highChildOrder.getGoodsSpecName(), order.getPayPrice(), businessType, order.getPaySerialNo(), goodsDesc); return ResponseMsgUtil.success( HuiLianTongUnionCardConfig.resolveResponse(deposit.getString("data"))); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/refundOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "工会卡退款") public ResponseData refundOrder(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); if (order.getOrderStatus() != 2) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态错误"); } orderService.refundOrder(order, "工会卡充值退款",OrderRefundOpUserType.TYPE1, null, "系统自动退款"); return ResponseMsgUtil.success("退款成功"); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/mobileDw", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "话费订单下载") public ResponseData mobileDw(@RequestParam(name = "createTimeS", required = false) String createTimeS, @RequestParam(name = "createTimeE", required = false) String createTimeE, @RequestParam(name = "refundTimeS", required = false) String refundTimeS, @RequestParam(name = "refundTimeE", required = false) String refundTimeE ) { try { Map map = new HashMap<>(); map.put("productType" , 9); map.put("createTimeS" , createTimeS); map.put("createTimeE" , createTimeE); map.put("refundTimeS" , refundTimeS); map.put("refundTimeE" , refundTimeE); List order = highOrderService.getOrderListNotChild(map); List list = new ArrayList<>(); ExportOrderMobileModel model; for (HighOrder highOrder : order) { model = new ExportOrderMobileModel(); OutRechargeOrder rechargeOrder = outRechargeOrderService.findByOrderNoNotChild(highOrder.getOrderNo()); if (rechargeOrder != null) { OutRechargeChildOrder childOrder = mobileChildOrderHandle(highOrder,rechargeOrder); model.setRechargeOrderNo(rechargeOrder.getOrderNo()); if (childOrder != null) { model.setChildOrderNo(childOrder.getOrderNo()); if (childOrder.getRechargePlatform() != null) { model.setRechargePlatform(RechargePlatformType.getDataByType(childOrder.getRechargePlatform()).getName()); } model.setRemark(childOrder.getExt1()); } } model.setFinishTime(highOrder.getFinishTime()); model.setOrderStatus(OrderStatus.getDataByType(highOrder.getOrderStatus()).getName()); model.setMemPhone(highOrder.getMemPhone()); model.setCreateTime(highOrder.getCreateTime()); model.setTitle(highOrder.getTitle()); model.setPayablePrice(highOrder.getPayablePrice()); model.setRefundTime(highOrder.getRefundTime()); model.setPayPrice(highOrder.getPayPrice()); model.setOrderNo(highOrder.getOrderNo()); model.setMemCardNo(highOrder.getMemCardNo()); if (highOrder.getPayType() != null) { model.setPayType(OrderPayType.getDataByType(highOrder.getPayType()).getName()); } list.add(model); } String fileUrl = SysConst.getSysConfig().getFileUrl() + "temporary/"; String pathName = System.currentTimeMillis()+".xlsx"; File file = new File(fileUrl); if (!file.exists()) { file.mkdirs(); } EasyExcel.write(fileUrl+pathName) .head(ExportOrderMobileModel.class) .sheet("话费交易订单") .doWrite(list); return ResponseMsgUtil.success(pathName); } catch (Exception e) { log.error("HighUserCardController --> oilCardRefund() error!", e); return ResponseMsgUtil.exception(e); } } public OutRechargeChildOrder mobileChildOrderHandle(HighOrder highOrder , OutRechargeOrder outRechargeOrder) { // 组装查询子订单数据 Map childOrderMap101 = new HashMap<>(); childOrderMap101.put("parent_order_id", outRechargeOrder.getId()); childOrderMap101.put("status", "101,102"); // 查询充值订单 List childOrders = childOrderService.getListRechargeChildOrder(childOrderMap101); OutRechargeChildOrder childOrder; // 判读是否存在多个充值中的订单 if (childOrders.size() > 0) { childOrder = childOrders.get(0); if (childOrders.size() > 1) { childOrder.setExt1("当前订单存在多个充值订单"); } } else { childOrder = childOrderService.findByOrderId(outRechargeOrder.getId()); if (childOrder != null && highOrder != null && childOrder.getStatus() != null && highOrder.getOrderStatus() != null) { if (highOrder.getOrderStatus() == 2 && childOrder.getStatus() != 102) { childOrder.setExt1("主订单充值中,但是充值订单状态不为充值中"); } if (highOrder.getOrderStatus() == 3 && childOrder.getStatus() != 101) { childOrder.setExt1("主订单充值成功,但是充值订单状态不为充值成功"); } if (highOrder.getOrderStatus() == 4 && !(childOrder.getStatus() == 103 || childOrder.getStatus() == 104)) { childOrder.setExt1("主订单退款,但是充值订单状态不为退款"); } } } return childOrder; } @RequestMapping(value = "/externalOrderRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "对外订单退款") public ResponseData externalOrderRefund(@RequestParam(name = "paySerialNo", required = true) String paySerialNo, @RequestParam(name = "WxMchId", required = true) String WxMchId, @RequestParam(name = "payRealPrice", required = true) String payRealPrice) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "B94B5E62807FA56A7260AB581D8A1B48"); mapPost.put("merchId" , "20230394901"); mapPost.put("paySerialNo" , paySerialNo); mapPost.put("wxMchId" , WxMchId); mapPost.put("payRealPrice" , payRealPrice); mapPost.put("refundPrice" , payRealPrice); Map map = new HashMap<>(); map.put("apiKey" , "B94B5E62807FA56A7260AB581D8A1B48"); map.put("merchId" , "20230394901"); map.put("paySerialNo" , paySerialNo); map.put("wxMchId" , WxMchId); map.put("payRealPrice" , payRealPrice); map.put("refundPrice" , payRealPrice); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsg.dctpay.com/v1/order/externalOrderRefund" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/test", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "测试") public ResponseData test() { try { JSONObject object = new JSONObject(); object.put("productType" , 101); object.put("phone" , "17726395120"); object.put("orderNo" , "ZF1130202305041640363988083900"); object.put("orderId" , 792 ); object.put("title" , "惠付门店"); object.put("createTime" , new Date()); object.put("price" , 1); bsOrderRebateService.insertOrderRebate(object); return ResponseMsgUtil.success(""); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } } \ No newline at end of file + package com.bweb.controller; import com.alibaba.excel.EasyExcel; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alipay.api.domain.ForbbidenTime; import com.alipay.api.domain.OfferObject; import com.bweb.config.SysConst; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.entity.*; import com.hai.model.OrderRefundModel; import com.hai.model.ResponseData; import com.hai.order.model.ExportOrderMobileModel; import com.hai.order.model.OrderThirdPartyModel; import com.hai.order.service.OrderRefundService; import com.hai.order.service.OrderService; import com.hai.order.type.*; import com.hai.order.utils.OrderUtil; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.io.File; import java.math.BigDecimal; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private OutRechargeOrderService outRechargeOrderService; @Autowired private OutRechargeChildOrderService childOrderService; @Resource private BsOrderRebateService bsOrderRebateService; @Resource private CommonService commonService; @Resource private OrderService orderService; @Resource private HighOrderService highOrderService; @RequestMapping(value="/resolveResponse",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "解析") public ResponseData resolveResponse( @RequestParam(name = "data", required = false) String data ) { try { JSONObject cardInfoObject = HuiLianTongUnionCardConfig.resolveResponse(data); return ResponseMsgUtil.success(cardInfoObject); } catch (Exception e) { log.error("getUserByTelephone",e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getHuiLianTongCardConsume", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询汇联通工会卡消费记录") public ResponseData getHuiLianTongCardConsume(@RequestParam(name = "businessType", required = true) String businessType, @RequestParam(name = "cardNo", required = true) String cardNo, @RequestParam(name = "sdate", required = true) Long sdate, @RequestParam(name = "edate", required = true) Long edate, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request) { try { JSONObject consumptionRecord = HuiLianTongUnionCardConfig.queryConsumptionRecordByBusiness(businessType, cardNo, sdate, edate, pageNum, pageSize); if (StringUtils.isBlank(consumptionRecord.getString("data"))) { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQUEST_ERROR, ""); } JSONArray array = HuiLianTongUnionCardConfig.resolveResponse(consumptionRecord.getString("data")).getJSONArray("records"); return ResponseMsgUtil.success(array); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardConsume() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getStationStores", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "获取油站") public ResponseData getStationStores() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "4B1DF80A2D64376D2807ACA6CFEDE8AA"); mapPost.put("merchId" , "20220896102"); Map map = new HashMap<>(); map.put("apiKey" , "4B1DF80A2D64376D2807ACA6CFEDE8AA"); map.put("merchId" , "20220896102"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsg.dctpay.com/v1/refuelOnline/getStationStore" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getRechargeProduct", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "获取充值产品") public ResponseData getRechargeProduct() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/mobileRecharge/getMobileProduct" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getAllCities", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询可用城市") public ResponseData getAllCities() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/apiMerchants/getAllCities" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克门店") public ResponseData starbucksStore() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("lat" , "29.56900"); mapPost.put("lon" , "106.55843"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("lat" , "29.56900"); map.put("lon" , "106.55843"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/starbucks/starbucksStore" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksProducts", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克商品") public ResponseData starbucksProducts() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/starbucks/starbucksProducts" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/kfcStoresList", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询肯德基门店") public ResponseData kfcStoresList() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/kfc/kfcStoresList" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/kfcProductByStoreCode", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据门店编码查询KFC产品") public ResponseData kfcProductByStoreCode(@RequestParam(name = "storeCode", required = true) String storeCode) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("storeCode" , storeCode); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("storeCode" , storeCode); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/kfc/kfcProductByStoreCode" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getRegional", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询区域信息") public ResponseData getRegional() { try { return ResponseMsgUtil.success(commonService.getRegional("code" , "name" , "childs")); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/memberProducts", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询会员产品") public ResponseData memberProducts() { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/memberRecharge/memberProducts" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/createOrder", method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "创建订单") public ResponseData createOrder(@RequestBody JSONObject object) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("timetable" , new Date().getTime()); mapPost.put("orderNo" , "TEST" + OrderUtil.generateOrderNo()); mapPost.put("productType" , object.getString("productType")); mapPost.put("notifyUrl" , "test"); mapPost.put("content" , object.toString()); System.out.println(mapPost); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("timetable" , mapPost.get("timetable").toString()); map.put("orderNo" , mapPost.get("orderNo")); map.put("productType" , object.getString("productType")); map.put("content" , object.toString()); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/createOrder" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付订单") public ResponseData payOrder(@RequestParam(name = "mchOrderNo", required = true) String mchOrderNo) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("mchOrderNo" , mchOrderNo); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("mchOrderNo" , mchOrderNo); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/orderPay" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryOrderDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单详情") public ResponseData queryOrderDetail(@RequestParam(name = "mchOrderNo", required = true) String mchOrderNo) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); mapPost.put("merchId" , "20230258302"); mapPost.put("mchOrderNo" , mchOrderNo); Map map = new HashMap<>(); map.put("apiKey" , "0C7897EA3BD96156A5881618FF2FF645"); map.put("merchId" , "20230258302"); map.put("mchOrderNo" , mchOrderNo); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("http://localhost:9902/v1/order/queryOrderDetail" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/deposit", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "工会卡充值") public ResponseData deposit(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); HighChildOrder highChildOrder = order.getHighChildOrderList().get(0); if (order.getOrderStatus() != 2) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态错误"); } // 汇联通充值 String goodsDesc = "汇联通充值"+order.getPayPrice()+"元"; String tranDesc = ""; String businessType = "ghk_deposit"; String orderNoAgain = OrderUtil.generateOrderNo(); order.setOrderStatus(3); order.setRemarks("工会卡再次充值订单号" + orderNoAgain); highOrderService.updateOrder(order); // 汇联通卡充值 JSONObject deposit = HuiLianTongUnionCardConfig.deposit(orderNoAgain, highChildOrder.getGoodsSpecName(), order.getPayPrice(), businessType, order.getPaySerialNo(), goodsDesc); return ResponseMsgUtil.success( HuiLianTongUnionCardConfig.resolveResponse(deposit.getString("data"))); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/refundOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "工会卡退款") public ResponseData refundOrder(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); if (order.getOrderStatus() != 2) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态错误"); } orderService.refundOrder(order, "工会卡充值退款",OrderRefundOpUserType.TYPE1, null, "系统自动退款"); return ResponseMsgUtil.success("退款成功"); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/mobileDw", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "话费订单下载") public ResponseData mobileDw(@RequestParam(name = "createTimeS", required = false) String createTimeS, @RequestParam(name = "createTimeE", required = false) String createTimeE, @RequestParam(name = "refundTimeS", required = false) String refundTimeS, @RequestParam(name = "refundTimeE", required = false) String refundTimeE ) { try { Map map = new HashMap<>(); map.put("productType" , 9); map.put("createTimeS" , createTimeS); map.put("createTimeE" , createTimeE); map.put("refundTimeS" , refundTimeS); map.put("refundTimeE" , refundTimeE); List order = highOrderService.getOrderListNotChild(map); List list = new ArrayList<>(); ExportOrderMobileModel model; for (HighOrder highOrder : order) { model = new ExportOrderMobileModel(); OutRechargeOrder rechargeOrder = outRechargeOrderService.findByOrderNoNotChild(highOrder.getOrderNo()); if (rechargeOrder != null) { OutRechargeChildOrder childOrder = mobileChildOrderHandle(highOrder,rechargeOrder); model.setRechargeOrderNo(rechargeOrder.getOrderNo()); if (childOrder != null) { model.setChildOrderNo(childOrder.getOrderNo()); if (childOrder.getRechargePlatform() != null) { model.setRechargePlatform(RechargePlatformType.getDataByType(childOrder.getRechargePlatform()).getName()); } model.setRemark(childOrder.getExt1()); } } model.setFinishTime(highOrder.getFinishTime()); model.setOrderStatus(OrderStatus.getDataByType(highOrder.getOrderStatus()).getName()); model.setMemPhone(highOrder.getMemPhone()); model.setCreateTime(highOrder.getCreateTime()); model.setTitle(highOrder.getTitle()); model.setPayablePrice(highOrder.getPayablePrice()); model.setRefundTime(highOrder.getRefundTime()); model.setPayPrice(highOrder.getPayPrice()); model.setOrderNo(highOrder.getOrderNo()); model.setMemCardNo(highOrder.getMemCardNo()); if (highOrder.getPayType() != null) { model.setPayType(OrderPayType.getDataByType(highOrder.getPayType()).getName()); } list.add(model); } String fileUrl = SysConst.getSysConfig().getFileUrl() + "temporary/"; String pathName = System.currentTimeMillis()+".xlsx"; File file = new File(fileUrl); if (!file.exists()) { file.mkdirs(); } EasyExcel.write(fileUrl+pathName) .head(ExportOrderMobileModel.class) .sheet("话费交易订单") .doWrite(list); return ResponseMsgUtil.success(pathName); } catch (Exception e) { log.error("HighUserCardController --> oilCardRefund() error!", e); return ResponseMsgUtil.exception(e); } } public OutRechargeChildOrder mobileChildOrderHandle(HighOrder highOrder , OutRechargeOrder outRechargeOrder) { // 组装查询子订单数据 Map childOrderMap101 = new HashMap<>(); childOrderMap101.put("parent_order_id", outRechargeOrder.getId()); childOrderMap101.put("status", "101,102"); // 查询充值订单 List childOrders = childOrderService.getListRechargeChildOrder(childOrderMap101); OutRechargeChildOrder childOrder; // 判读是否存在多个充值中的订单 if (childOrders.size() > 0) { childOrder = childOrders.get(0); if (childOrders.size() > 1) { childOrder.setExt1("当前订单存在多个充值订单"); } } else { childOrder = childOrderService.findByOrderId(outRechargeOrder.getId()); if (childOrder != null && highOrder != null && childOrder.getStatus() != null && highOrder.getOrderStatus() != null) { if (highOrder.getOrderStatus() == 2 && childOrder.getStatus() != 102) { childOrder.setExt1("主订单充值中,但是充值订单状态不为充值中"); } if (highOrder.getOrderStatus() == 3 && childOrder.getStatus() != 101) { childOrder.setExt1("主订单充值成功,但是充值订单状态不为充值成功"); } if (highOrder.getOrderStatus() == 4 && !(childOrder.getStatus() == 103 || childOrder.getStatus() == 104)) { childOrder.setExt1("主订单退款,但是充值订单状态不为退款"); } } } return childOrder; } @RequestMapping(value = "/externalOrderRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "对外订单退款") public ResponseData externalOrderRefund(@RequestParam(name = "paySerialNo", required = true) String paySerialNo, @RequestParam(name = "WxMchId", required = true) String WxMchId, @RequestParam(name = "payRealPrice", required = true) String payRealPrice) { try { Map mapPost = new HashMap<>(); mapPost.put("apiKey" , "B94B5E62807FA56A7260AB581D8A1B48"); mapPost.put("merchId" , "20230394901"); mapPost.put("paySerialNo" , paySerialNo); mapPost.put("wxMchId" , WxMchId); mapPost.put("payRealPrice" , payRealPrice); mapPost.put("refundPrice" , payRealPrice); Map map = new HashMap<>(); map.put("apiKey" , "B94B5E62807FA56A7260AB581D8A1B48"); map.put("merchId" , "20230394901"); map.put("paySerialNo" , paySerialNo); map.put("wxMchId" , WxMchId); map.put("payRealPrice" , payRealPrice); map.put("refundPrice" , payRealPrice); System.out.println(map); mapPost.put("sign" , WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5)); return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsg.dctpay.com/v1/order/externalOrderRefund" , mapPost , new HashMap<>())); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/test", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "测试") public ResponseData test() { try { JSONObject object = new JSONObject(); object.put("productType" , 101); object.put("phone" , "17726395120"); object.put("orderNo" , "ZF1130202305041640363988083900"); object.put("orderId" , 792 ); object.put("title" , "惠付门店"); object.put("createTime" , new Date()); object.put("price" , 1); bsOrderRebateService.insertOrderRebate(object); return ResponseMsgUtil.success(""); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } } \ No newline at end of file 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 5b51a182..e3273ac2 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java @@ -86,7 +86,6 @@ public class CmsContentController { List objectList = new ArrayList<>(); - for (CmsCategory cmsCategory : categoryList) { JSONObject object = new JSONObject(); // 1.小图一行四个 2.轮播图 3.消息通知 4.大图展示 5.一横图三小图 6.数据库数据 7.小图一行五个 @@ -153,13 +152,14 @@ public class CmsContentController { } if (cmsCategory.getType() == 3 || cmsCategory.getType() == 6 || cmsCategory.getType() == 9) { - if (object.getJSONArray("childDate") != null && object.getJSONArray("childDate").size() >0) { + if (object.getJSONArray("childDate") != null && object.getJSONArray("childDate").size() >0 ) { objectList.add(object); } } else { - objectList.add(object); + if (object.getJSONArray("childCategory").size() >0 ) { + objectList.add(object); + } } - } return ResponseMsgUtil.success(dataWhetherNull ? null:objectList); diff --git a/hai-cweb/src/main/java/com/cweb/controller/Goods/DeliveryAddressController.java b/hai-cweb/src/main/java/com/cweb/controller/Goods/DeliveryAddressController.java index 93afeba0..48dec891 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/Goods/DeliveryAddressController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/Goods/DeliveryAddressController.java @@ -139,7 +139,7 @@ public class DeliveryAddressController { } if (deliveryAddress.getWhetherDefault()) { - deliveryAddressService.cleanDeliveryAddressDefault(deliveryAddress.getUserId()); + deliveryAddressService.cleanDeliveryAddressDefault(userInfoModel.getHighUser().getId()); } GoodsDeliveryAddress goodsDeliveryAddress = deliveryAddressService.findDeliveryAddressById(deliveryAddress.getId()); diff --git a/hai-cweb/src/main/java/com/cweb/controller/Goods/GoodsController.java b/hai-cweb/src/main/java/com/cweb/controller/Goods/GoodsController.java index 60876085..417c6be0 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/Goods/GoodsController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/Goods/GoodsController.java @@ -64,6 +64,8 @@ public class GoodsController { @RequestParam(value = "title", required = false) String title, @RequestParam(value = "goodsType", required = false) Long goodsType, @RequestParam(value = "price", required = false) Integer price, + @RequestParam(value = "companyId", required = false) Long companyId, + @RequestParam(value = "goodsLabel", required = false) String goodsLabel, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize ) { @@ -74,6 +76,8 @@ public class GoodsController { map.put("title", title); map.put("goodsType", goodsType); + map.put("companyId", companyId); + map.put("goodsLabel", goodsLabel); map.put("status", 1); diff --git a/hai-cweb/src/main/java/com/cweb/controller/Goods/ShoppingCartController.java b/hai-cweb/src/main/java/com/cweb/controller/Goods/ShoppingCartController.java index 289fe082..4031cd03 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/Goods/ShoppingCartController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/Goods/ShoppingCartController.java @@ -113,8 +113,7 @@ public class ShoppingCartController { if (shoppingCart == null || shoppingCart.getGoodsId() == null || shoppingCart.getSku() == null || - shoppingCart.getNum() == null || - shoppingCart.getWhetherCheck() == null + shoppingCart.getNum() == null ) { log.error("GoodsDetailController -> insertProduct() error!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); @@ -148,6 +147,7 @@ public class ShoppingCartController { shoppingCart.setImg(sku.getShowImg()); shoppingCart.setOriginalPrice(sku.getOriginalPrice()); shoppingCart.setLoseEfficacy(false); + shoppingCart.setWhetherCheck(true); shoppingCart.setPrice(sku.getPrice()); shoppingCart.setCreateTime(new Date()); shoppingCart.setUpdateTime(new Date()); @@ -249,4 +249,48 @@ public class ShoppingCartController { } + @RequestMapping(value = "/whetherCheck", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "是否选中") + public ResponseData whetherCheck( + @RequestParam(value = "ids", required = true) String ids, + @RequestParam(value = "whetherCheck", required = true) Boolean whetherCheck + , HttpServletRequest request + ) { + try { + + // 用户 + SessionObject sessionObject = userCenter.getSessionObject(request); + HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); + + String[] idArray = ids.split(","); + + for (String id : idArray) { + GoodsShoppingCart shoppingCart = shoppingCartService.findShoppingCartById(Long.valueOf(id)); + + if (!Objects.equals(userInfoModel.getHighUser().getId(), shoppingCart.getUserId())) { + log.error("GoodsDetailController -> findGoodsDetailById() error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "用户信息错误"); + } + + if (shoppingCart == null) { + log.error("GoodsDetailController -> insertProduct() error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相关内容!"); + } + + shoppingCart.setWhetherCheck(whetherCheck); + shoppingCart.setUpdateTime(new Date()); + shoppingCartService.updateShoppingCart(shoppingCart); + } + + + + return ResponseMsgUtil.success("成功"); + + } catch (Exception e) { + log.error("GoodsDetailController --> findGoodsDetailById() error!", e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/hai-order/src/main/java/com/web/controller/business/GoodsOrderController.java b/hai-order/src/main/java/com/web/controller/business/GoodsOrderController.java index e83fe3ed..fceb0525 100644 --- a/hai-order/src/main/java/com/web/controller/business/GoodsOrderController.java +++ b/hai-order/src/main/java/com/web/controller/business/GoodsOrderController.java @@ -21,6 +21,7 @@ import com.hai.goods.service.GoodsSkuService; import com.hai.model.ResponseData; import com.hai.model.UserInfoModel; import com.hai.order.model.ExportOrderMobileModel; +import com.hai.order.model.GoodsChildOrderExtModel; import com.hai.order.model.GoodsOrderExtModel; import com.hai.order.service.OrderService; import com.hai.order.type.OrderPayType; @@ -195,4 +196,60 @@ public class GoodsOrderController { return ResponseMsgUtil.exception(e); } } + + + @RequestMapping(value = "/getOrderChildList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询子订单列表") + public ResponseData getOrderChildList(@RequestParam(name = "orderNo", required = false) String orderNo, + @RequestParam(name = "childOrderNo", required = false) String childOrderNo, + @RequestParam(name = "memPhone", required = false) String memPhone, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "createTimeS", required = false) Long createTimeS, + @RequestParam(name = "createTimeE", required = false) Long createTimeE, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize, + HttpServletRequest request) { + try { + + UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); + } + Map map = new HashMap<>(); + + map.put("createTimeS", createTimeS); + map.put("createTimeE", createTimeE); + map.put("orderNo", orderNo); + map.put("secUserId", userInfoModel.getSecUser().getId()); + map.put("childOrderNo", childOrderNo); + map.put("memPhone", memPhone); + map.put("status", status); + + + List list = orderService.getChildOrderList(map); + + List goodsChildOrderExtModels = new ArrayList<>(); + + GoodsChildOrderExtModel model; + + for (HighChildOrder order : list) { + model = new GoodsChildOrderExtModel(); + BeanUtils.copyProperties(order, model); + GoodsOrder goodsOrder = goodsOrderExtService.findGoodsOrder(order.getChildOrderNo()); + if (goodsOrder != null) { + model.setLogisticsStatus(goodsOrder.getStatus()); + } + goodsChildOrderExtModels.add(model); + } + goodsChildOrderExtModels = goodsChildOrderExtModels.stream().sorted(Comparator.comparing(GoodsChildOrderExtModel::getLogisticsStatus)).collect(Collectors.toList()); + + return ResponseMsgUtil.success(PageUtil.initPageInfoObj(pageNum, goodsChildOrderExtModels.size(), pageSize, new PageInfo<>(goodsChildOrderExtModels))); + + } catch (Exception e) { + log.error("OrderCouponController --> getOrderList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/hai-order/src/main/java/com/web/controller/business/OrderMobileRechargeController.java b/hai-order/src/main/java/com/web/controller/business/OrderMobileRechargeController.java index 7941f54b..76750873 100644 --- a/hai-order/src/main/java/com/web/controller/business/OrderMobileRechargeController.java +++ b/hai-order/src/main/java/com/web/controller/business/OrderMobileRechargeController.java @@ -21,6 +21,7 @@ import com.hai.order.service.OrderService; import com.hai.order.type.OrderPayType; import com.hai.order.type.OrderStatus; import com.hai.order.type.RechargePlatformType; +import com.hai.service.HighOrderService; import com.hai.service.OutRechargeChildOrderService; import com.hai.service.OutRechargeOrderService; import com.hai.service.impl.OutRechargeOrderServiceImpl; @@ -29,6 +30,8 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -38,10 +41,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; @Controller @RequestMapping(value = "mobileRecharge") @@ -57,12 +57,16 @@ public class OrderMobileRechargeController { private OutRechargeOrderService outRechargeOrderService; @Resource - private OutRechargeChildOrderService outRechargeChildOrderService; - + private OrderService orderService; @Resource - private OrderService orderService; + private HighOrderService highOrderService; + + @Autowired + private RedisTemplate redisTemplate; + @Resource + private OutRechargeChildOrderService outRechargeChildOrderService; @RequestMapping(value = "/getOrderList", method = RequestMethod.GET) @ResponseBody @@ -71,6 +75,7 @@ public class OrderMobileRechargeController { @RequestParam(name = "memPhone", required = false) String memPhone, @RequestParam(name = "memCardNo", required = false) String memCardNo, @RequestParam(name = "title", required = false) String title, + @RequestParam(name = "exceptionStatus", required = false) Boolean exceptionStatus, @RequestParam(name = "payType", required = false) Integer payType, @RequestParam(name = "orderStatus", required = false) Integer orderStatus, @RequestParam(name = "companyId", required = false) Long companyId, @@ -80,8 +85,8 @@ public class OrderMobileRechargeController { @RequestParam(name = "payTimeE", required = false) Long payTimeE, @RequestParam(name = "finishTimeS", required = false) Long finishTimeS, @RequestParam(name = "finishTimeE", required = false) Long finishTimeE, - @RequestParam(name = "refundTimeS", required = false) String refundTimeS, - @RequestParam(name = "refundTimeE", required = false) String refundTimeE, + @RequestParam(name = "refundTimeS", required = false) Long refundTimeS, + @RequestParam(name = "refundTimeE", required = false) Long refundTimeE, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request) { @@ -99,6 +104,8 @@ public class OrderMobileRechargeController { } else { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); } + + map.put("exceptionStatus", exceptionStatus); map.put("createTimeS", createTimeS); map.put("createTimeE", createTimeE); map.put("payTimeS", payTimeS); @@ -133,14 +140,15 @@ public class OrderMobileRechargeController { @RequestParam(name = "payType", required = false) Integer payType, @RequestParam(name = "orderStatus", required = false) Integer orderStatus, @RequestParam(name = "companyId", required = false) Long companyId, + @RequestParam(name = "exceptionStatus", required = false) Boolean exceptionStatus, @RequestParam(name = "createTimeS", required = false) Long createTimeS, @RequestParam(name = "title", required = false) String title, @RequestParam(name = "createTimeE", required = false) Long createTimeE, @RequestParam(name = "payTimeS", required = false) Long payTimeS, @RequestParam(name = "payTimeE", required = false) Long payTimeE, @RequestParam(name = "productType", required = false) Integer productType, - @RequestParam(name = "refundTimeS", required = false) String refundTimeS, - @RequestParam(name = "refundTimeE", required = false) String refundTimeE, + @RequestParam(name = "refundTimeS", required = false) Long refundTimeS, + @RequestParam(name = "refundTimeE", required = false) Long refundTimeE, @RequestParam(name = "finishTimeS", required = false) Long finishTimeS, @RequestParam(name = "finishTimeE", required = false) Long finishTimeE) { try { @@ -159,6 +167,7 @@ public class OrderMobileRechargeController { } map.put("createTimeS", createTimeS); map.put("createTimeE", createTimeE); + map.put("exceptionStatus", exceptionStatus); map.put("payTimeS", payTimeS); map.put("payTimeE", payTimeE); map.put("finishTimeS", finishTimeS); @@ -240,7 +249,7 @@ public class OrderMobileRechargeController { public ResponseData getMobileOrderDetail(@RequestParam(name = "orderNo", required = true) String orderNo) { try { Map map = new HashMap<>(); - map.put("tradeOrder", orderService.getOrderDetailByNo(orderNo)); + map.put("tradeOrder", orderService.getOrderDetail(orderNo)); map.put("mobileOrder", outRechargeOrderService.findByOrderNo(orderNo)); return ResponseMsgUtil.success(map); @@ -250,4 +259,82 @@ public class OrderMobileRechargeController { } } + @RequestMapping(value="/refundOrder",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "订单退款") + public ResponseData refundOrder(@RequestParam(name = "orderNo", required = true) String orderNo) { + + OutRechargeOrder outRechargeOrder = outRechargeOrderService.findByOrderNo(orderNo); + + String key = "recharge_" + outRechargeOrder.getId(); + try { + + // 分布式锁占坑 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(key, outRechargeOrder.getOrderNo()); + + if(Boolean.TRUE.equals(lock)) { + // 加锁成功,处理业务 + // 判断订单是否可以继续充值 1:满足继续充值条件 2:订单满足退款条件 3:订单不可以退款不可以继续充值 4:订单存在多个充值订单 5:订单充值完成 6:充值订单号未查询到任何充值记录 + int orderStatus = outRechargeOrderService.orderWhetherRecharge(outRechargeOrder); + if (orderStatus == 2) { + outRechargeOrderService.refundOrder(outRechargeOrder.getId()); + } + if (orderStatus == 6) { + outRechargeOrderService.refundOrder(outRechargeOrder.getId()); + } + } else { + // 加锁失败,重试 + Thread.sleep(100); + refundOrder(orderNo); + } + + + + HighOrder order = highOrderService.getOrderByOrderNo(orderNo); + order.setExceptionStatus(false); + highOrderService.updateOrder(order); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("OrderExtController -> getGasOrderDetail() error!",e); + return ResponseMsgUtil.exception(e); + } finally { + // 删除key,释放锁 + redisTemplate.delete(key); + } + } + + @RequestMapping(value="/orderNormal",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "订单修改正常") + public ResponseData orderNormal(@RequestParam(name = "orderNo", required = true) String orderNo) { + + + try { + + OutRechargeOrder rechargeOrder = outRechargeOrderService.findByOrderNo(orderNo); + + List rechargeChildOrderList = outRechargeChildOrderService.getListRechargeChildOrderByOrderId(rechargeOrder.getId()); + + for (OutRechargeChildOrder rechargeChildOrder : rechargeChildOrderList) { + if (rechargeChildOrder.getStatus() == 104) { + rechargeChildOrder.setStatus(102); + } + outRechargeChildOrderService.updateOrder(rechargeChildOrder); + } + + HighOrder order = highOrderService.getOrderByOrderNo(orderNo); + order.setExceptionStatus(false); + highOrderService.updateOrder(order); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("OrderExtController -> getGasOrderDetail() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + } diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java index 778a8ee2..82a8f998 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighRechargeOrderSchedule.java @@ -50,7 +50,7 @@ public class HighRechargeOrderSchedule { * @Date 14:18 2022/5/31 * @Param [] */ - @Scheduled(cron = "0 0/120 * * * ?") //每120分钟执行一次 + @Scheduled(cron = "0 0/60 * * * ?") //每60分钟执行一次 public void initRechargeOrder() { log.info("处理话费订单定时任务开始"); Map map = new HashMap<>(); diff --git a/hai-service/src/main/java/com/hai/config/PayloService.java b/hai-service/src/main/java/com/hai/config/PayloService.java index d82ef7c9..09796c10 100644 --- a/hai-service/src/main/java/com/hai/config/PayloService.java +++ b/hai-service/src/main/java/com/hai/config/PayloService.java @@ -137,14 +137,14 @@ public class PayloService { // 请求接口 JSONObject object = HttpsUtils.doPost(CommonSysConst.getSysConfig().getShellGroupUrl(), param); -/* reqLogService.insert( + reqLogService.insert( TripartiteReqLogType.type2, logSerialNo, TripartiteReqLogReqType.type1, CommonSysConst.getSysConfig().getShellGroupUrl(), this.generateParam(param), object.toString() - );*/ + ); if (object == null || !object.getString("status").equals("SUCCESS")) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object == null?"请求失败":object.getString("message")); diff --git a/hai-service/src/main/java/com/hai/config/RechargeConfig.java b/hai-service/src/main/java/com/hai/config/RechargeConfig.java index ac5bcda2..b63b44d3 100644 --- a/hai-service/src/main/java/com/hai/config/RechargeConfig.java +++ b/hai-service/src/main/java/com/hai/config/RechargeConfig.java @@ -56,24 +56,30 @@ public class RechargeConfig { * @Param [com.alibaba.fastjson.JSONObject] * @return com.alibaba.fastjson.JSONObject */ - public static JSONObject rechargeOrderByLy(JSONObject object) throws Exception { + public static JSONObject rechargeOrderByLy(JSONObject object) { - Map paramMap = new HashMap<>(); + try { - paramMap.put("out_trade_num" , object.getString("out_trade_num")); - paramMap.put("product_id" , object.getString("product_id")); - paramMap.put("mobile" , object.getString("mobile")); - paramMap.put("notify_url" , object.getString("notifyUrl")); - paramMap.put("userid" , CommonSysConst.getSysConfig().getLyMemberId()); - paramMap.put("sign", WxUtils.generateSignatureLy(paramMap , CommonSysConst.getSysConfig().getLyApiKey() , WXPayConstants.SignType.MD5)); + Map paramMap = new HashMap<>(); - log.info("发起龙阅订单充值="); - log.info("龙阅订单充值-请求参数: " + JSON.toJSONString(paramMap)); + paramMap.put("out_trade_num" , object.getString("out_trade_num")); + paramMap.put("product_id" , object.getString("product_id")); + paramMap.put("mobile" , object.getString("mobile")); + paramMap.put("notify_url" , object.getString("notifyUrl")); + paramMap.put("userid" , CommonSysConst.getSysConfig().getLyMemberId()); + paramMap.put("sign", WxUtils.generateSignatureLy(paramMap , CommonSysConst.getSysConfig().getLyApiKey() , WXPayConstants.SignType.MD5)); - JSONObject jsonObject = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLyPostUrl()+ "index/recharge", paramMap); + log.info("发起龙阅订单充值"); + log.info("龙阅订单充值-请求参数: " + JSON.toJSONString(paramMap)); - log.info("龙阅订单充值-响应参数: " + jsonObject.toJSONString()); - return jsonObject; + JSONObject jsonObject = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLyPostUrl()+ "index/recharge", paramMap); + + log.info("龙阅订单充值-响应参数: " + jsonObject.toJSONString()); + return jsonObject; + + } catch (Exception e) { + return null; + } } @@ -94,7 +100,7 @@ public class RechargeConfig { paramMap.put("out_trade_nums" , object.getString("out_trade_nums")); paramMap.put("sign", WxUtils.generateSignatureLy(paramMap , CommonSysConst.getSysConfig().getLyApiKey() , WXPayConstants.SignType.MD5)); - log.info("发起龙阅订单查询="); + log.info("发起龙阅订单查询"); log.info("龙阅订单查询-请求参数: " + JSON.toJSONString(paramMap)); JSONObject jsonObject = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLyPostUrl()+ "index/check", paramMap); @@ -112,27 +118,33 @@ public class RechargeConfig { * @Param [com.alibaba.fastjson.JSONObject] * @return com.alibaba.fastjson.JSONObject */ - public static JSONObject rechargeOrderByJj(JSONObject object) throws Exception { - - String timestamp = String.valueOf(System.currentTimeMillis()); - - Map map = new HashMap<>(); - map.put("mobile" , object.getString("mobile")); - map.put("amount" , object.getString("amount")); - map.put("out_order_id" , object.getString("out_order_id")); - map.put("app_key" , CommonSysConst.getSysConfig().getJjAppKey()); - map.put("timestamp" , timestamp.substring(0,timestamp.length()-3)); - map.put("notify_url" , object.getString("notifyUrl")); - String signStr = WxUtils.generateSignatureAppSecret(map, CommonSysConst.getSysConfig().getJjAppSecret() , WXPayConstants.SignType.MD5); - map.put("sign" , signStr); - - log.info("发起尖椒充值"); - log.info("尖椒订单充值-请求参数: " + JSON.toJSONString(map)); + public static JSONObject rechargeOrderByJj(JSONObject object) { + + try { + String timestamp = String.valueOf(System.currentTimeMillis()); + + Map map = new HashMap<>(); + map.put("mobile" , object.getString("mobile")); + map.put("amount" , object.getString("amount")); + map.put("out_order_id" , object.getString("out_order_id")); + map.put("app_key" , CommonSysConst.getSysConfig().getJjAppKey()); + map.put("timestamp" , timestamp.substring(0,timestamp.length()-3)); + map.put("notify_url" , object.getString("notifyUrl")); + String signStr = WxUtils.generateSignatureAppSecret(map, CommonSysConst.getSysConfig().getJjAppSecret() , WXPayConstants.SignType.MD5); + map.put("sign" , signStr); + + log.info("发起尖椒充值"); + log.info("尖椒订单充值-请求参数: " + JSON.toJSONString(map)); + + JSONObject jsonObject = HttpsUtils.doPost(CommonSysConst.getSysConfig().getJjUrl() + "createOrder" , map); + + log.info("尖椒订单充值-响应参数: " + jsonObject.toJSONString()); + return jsonObject; + } catch (Exception e) { + return null; + } - JSONObject jsonObject = HttpsUtils.doPost(CommonSysConst.getSysConfig().getJjUrl() + "createOrder" , map); - log.info("尖椒订单充值-响应参数: " + jsonObject.toJSONString()); - return jsonObject; } @@ -175,25 +187,30 @@ public class RechargeConfig { * @Param [object] * @Return com.alibaba.fastjson.JSONObject */ - public static JSONObject rechargeOrderByHg(JSONObject object) throws Exception { - Map paramMap = new HashMap<>(); - - paramMap.put("mchid" , CommonSysConst.getSysConfig().getHgMemberId()); - paramMap.put("phone" , object.getString("phone")); - paramMap.put("orderid" , object.getString("orderid")); - paramMap.put("price" , object.getInteger("price").toString()); - paramMap.put("product_id" , object.getString("product_id")); - paramMap.put("notify" , CommonSysConst.getSysConfig().getHgNotifyUrl()); - paramMap.put("sign", WxUtils.generateSignatureHg(paramMap , CommonSysConst.getSysConfig().getHgApiKey() , WXPayConstants.SignType.MD5)); - - log.info("发起畅停话费查询订单="); - log.info("畅停话费查询订单-请求参数: " + JSON.toJSONString(paramMap)); - - System.out.println("畅停话费查询订单-请求参数: " + JSON.toJSONString(paramMap)); - JSONObject repsObject = HttpsUtils.doPostForm(CommonSysConst.getSysConfig().getHgPostUrl()+ "external/api/telPay", paramSort(paramMap), new HashMap<>()); + public static JSONObject rechargeOrderByHg(JSONObject object) { + try { + Map paramMap = new HashMap<>(); + + paramMap.put("mchid" , CommonSysConst.getSysConfig().getHgMemberId()); + paramMap.put("phone" , object.getString("phone")); + paramMap.put("orderid" , object.getString("orderid")); + paramMap.put("price" , object.getInteger("price").toString()); + paramMap.put("product_id" , object.getString("product_id")); + paramMap.put("notify" , CommonSysConst.getSysConfig().getHgNotifyUrl()); + paramMap.put("sign", WxUtils.generateSignatureHg(paramMap , CommonSysConst.getSysConfig().getHgApiKey() , WXPayConstants.SignType.MD5)); + + log.info("发起畅停话费查询订单="); + log.info("畅停话费查询订单-请求参数: " + JSON.toJSONString(paramMap)); + + System.out.println("畅停话费查询订单-请求参数: " + JSON.toJSONString(paramMap)); + JSONObject repsObject = HttpsUtils.doPostForm(CommonSysConst.getSysConfig().getHgPostUrl()+ "external/api/telPay", paramSort(paramMap), new HashMap<>()); + + log.info("畅停话费查询订单-响应参数: " + repsObject.toJSONString()); + return repsObject; + }catch (Exception e) { + return null; + } - log.info("畅停话费查询订单-响应参数: " + repsObject.toJSONString()); - return repsObject; } /** diff --git a/hai-service/src/main/java/com/hai/dao/GoodsDetailMapper.java b/hai-service/src/main/java/com/hai/dao/GoodsDetailMapper.java index 7f676036..9dd5da08 100644 --- a/hai-service/src/main/java/com/hai/dao/GoodsDetailMapper.java +++ b/hai-service/src/main/java/com/hai/dao/GoodsDetailMapper.java @@ -40,21 +40,23 @@ public interface GoodsDetailMapper extends GoodsDetailMapperExt { @Insert({ "insert into goods_detail (company_id, goods_type_name, ", - "goods_type, `name`, ", - "list_describe, goods_describe, ", - "list_img, banner_img, ", - "detail_img, `status`, ", - "create_time, update_time, ", - "op_id, op_name, ext_1, ", - "ext_2, ext_3)", + "goods_type, goods_label, ", + "`name`, list_describe, ", + "goods_describe, list_img, ", + "banner_img, detail_img, ", + "`status`, create_time, ", + "update_time, op_id, ", + "op_name, ext_1, ext_2, ", + "ext_3)", "values (#{companyId,jdbcType=BIGINT}, #{goodsTypeName,jdbcType=VARCHAR}, ", - "#{goodsType,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ", - "#{listDescribe,jdbcType=VARCHAR}, #{goodsDescribe,jdbcType=VARCHAR}, ", - "#{listImg,jdbcType=VARCHAR}, #{bannerImg,jdbcType=VARCHAR}, ", - "#{detailImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", - "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{goodsType,jdbcType=BIGINT}, #{goodsLabel,jdbcType=VARCHAR}, ", + "#{name,jdbcType=VARCHAR}, #{listDescribe,jdbcType=VARCHAR}, ", + "#{goodsDescribe,jdbcType=VARCHAR}, #{listImg,jdbcType=VARCHAR}, ", + "#{bannerImg,jdbcType=VARCHAR}, #{detailImg,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", + "#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(GoodsDetail record); @@ -69,6 +71,7 @@ public interface GoodsDetailMapper extends GoodsDetailMapperExt { @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), + @Result(column="goods_label", property="goodsLabel", jdbcType=JdbcType.VARCHAR), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="list_describe", property="listDescribe", jdbcType=JdbcType.VARCHAR), @Result(column="goods_describe", property="goodsDescribe", jdbcType=JdbcType.VARCHAR), @@ -88,9 +91,9 @@ public interface GoodsDetailMapper extends GoodsDetailMapperExt { @Select({ "select", - "id, company_id, goods_type_name, goods_type, `name`, list_describe, goods_describe, ", - "list_img, banner_img, detail_img, `status`, create_time, update_time, op_id, ", - "op_name, ext_1, ext_2, ext_3", + "id, company_id, goods_type_name, goods_type, goods_label, `name`, list_describe, ", + "goods_describe, list_img, banner_img, detail_img, `status`, create_time, update_time, ", + "op_id, op_name, ext_1, ext_2, ext_3", "from goods_detail", "where id = #{id,jdbcType=BIGINT}" }) @@ -99,6 +102,7 @@ public interface GoodsDetailMapper extends GoodsDetailMapperExt { @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), + @Result(column="goods_label", property="goodsLabel", jdbcType=JdbcType.VARCHAR), @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), @Result(column="list_describe", property="listDescribe", jdbcType=JdbcType.VARCHAR), @Result(column="goods_describe", property="goodsDescribe", jdbcType=JdbcType.VARCHAR), @@ -130,6 +134,7 @@ public interface GoodsDetailMapper extends GoodsDetailMapperExt { "set company_id = #{companyId,jdbcType=BIGINT},", "goods_type_name = #{goodsTypeName,jdbcType=VARCHAR},", "goods_type = #{goodsType,jdbcType=BIGINT},", + "goods_label = #{goodsLabel,jdbcType=VARCHAR},", "`name` = #{name,jdbcType=VARCHAR},", "list_describe = #{listDescribe,jdbcType=VARCHAR},", "goods_describe = #{goodsDescribe,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/GoodsDetailSqlProvider.java b/hai-service/src/main/java/com/hai/dao/GoodsDetailSqlProvider.java index a2377d30..2ef80775 100644 --- a/hai-service/src/main/java/com/hai/dao/GoodsDetailSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/GoodsDetailSqlProvider.java @@ -40,6 +40,10 @@ public class GoodsDetailSqlProvider { sql.VALUES("goods_type", "#{goodsType,jdbcType=BIGINT}"); } + if (record.getGoodsLabel() != null) { + sql.VALUES("goods_label", "#{goodsLabel,jdbcType=VARCHAR}"); + } + if (record.getName() != null) { sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); } @@ -109,6 +113,7 @@ public class GoodsDetailSqlProvider { sql.SELECT("company_id"); sql.SELECT("goods_type_name"); sql.SELECT("goods_type"); + sql.SELECT("goods_label"); sql.SELECT("`name`"); sql.SELECT("list_describe"); sql.SELECT("goods_describe"); @@ -156,6 +161,10 @@ public class GoodsDetailSqlProvider { sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); } + if (record.getGoodsLabel() != null) { + sql.SET("goods_label = #{record.goodsLabel,jdbcType=VARCHAR}"); + } + if (record.getName() != null) { sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); } @@ -224,6 +233,7 @@ public class GoodsDetailSqlProvider { sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}"); sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); + sql.SET("goods_label = #{record.goodsLabel,jdbcType=VARCHAR}"); sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); sql.SET("list_describe = #{record.listDescribe,jdbcType=VARCHAR}"); sql.SET("goods_describe = #{record.goodsDescribe,jdbcType=VARCHAR}"); @@ -260,6 +270,10 @@ public class GoodsDetailSqlProvider { sql.SET("goods_type = #{goodsType,jdbcType=BIGINT}"); } + if (record.getGoodsLabel() != null) { + sql.SET("goods_label = #{goodsLabel,jdbcType=VARCHAR}"); + } + if (record.getName() != null) { sql.SET("`name` = #{name,jdbcType=VARCHAR}"); } 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 dbdadaee..5756090a 100644 --- a/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java @@ -44,39 +44,41 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "child_order_no, store_id, ", "store_name, store_address, ", "goods_type, goods_id, ", - "goods_name, goods_desc, ", - "goods_img, sku_id, ", - "goods_spec_name, goods_price, ", - "goods_actual_price, surplus_refund_num, ", - "surplus_refund_price, surplus_refund_integral, ", - "channel_order_no, total_price, ", - "total_actual_price, total_deduction_price, ", - "sale_count, giveaway_type, ", - "child_order_status, praise_status, ", - "create_time, pay_time, ", - "finish_time, refund_time, ", - "refund_remarks, cancel_time, ", - "ext_1, ext_2, ext_3, ", - "ext_4, ext_5, ext_6)", + "sec_user_id, goods_name, ", + "goods_desc, goods_img, ", + "sku_id, goods_spec_name, ", + "goods_price, goods_actual_price, ", + "surplus_refund_num, surplus_refund_price, ", + "surplus_refund_integral, channel_order_no, ", + "total_price, total_actual_price, ", + "total_deduction_price, sale_count, ", + "giveaway_type, child_order_status, ", + "praise_status, create_time, ", + "pay_time, finish_time, ", + "refund_time, refund_remarks, ", + "cancel_time, ext_1, ", + "ext_2, ext_3, ext_4, ", + "ext_5, ext_6)", "values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ", "#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", "#{childOrderNo,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, ", "#{storeName,jdbcType=VARCHAR}, #{storeAddress,jdbcType=VARCHAR}, ", "#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ", - "#{goodsName,jdbcType=VARCHAR}, #{goodsDesc,jdbcType=VARCHAR}, ", - "#{goodsImg,jdbcType=VARCHAR}, #{skuId,jdbcType=BIGINT}, ", - "#{goodsSpecName,jdbcType=VARCHAR}, #{goodsPrice,jdbcType=DECIMAL}, ", - "#{goodsActualPrice,jdbcType=DECIMAL}, #{surplusRefundNum,jdbcType=INTEGER}, ", - "#{surplusRefundPrice,jdbcType=DECIMAL}, #{surplusRefundIntegral,jdbcType=INTEGER}, ", - "#{channelOrderNo,jdbcType=VARCHAR}, #{totalPrice,jdbcType=DECIMAL}, ", - "#{totalActualPrice,jdbcType=DECIMAL}, #{totalDeductionPrice,jdbcType=DECIMAL}, ", - "#{saleCount,jdbcType=INTEGER}, #{giveawayType,jdbcType=BIT}, ", - "#{childOrderStatus,jdbcType=INTEGER}, #{praiseStatus,jdbcType=INTEGER}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ", - "#{finishTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, ", - "#{refundRemarks,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ", - "#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" + "#{secUserId,jdbcType=BIGINT}, #{goodsName,jdbcType=VARCHAR}, ", + "#{goodsDesc,jdbcType=VARCHAR}, #{goodsImg,jdbcType=VARCHAR}, ", + "#{skuId,jdbcType=BIGINT}, #{goodsSpecName,jdbcType=VARCHAR}, ", + "#{goodsPrice,jdbcType=DECIMAL}, #{goodsActualPrice,jdbcType=DECIMAL}, ", + "#{surplusRefundNum,jdbcType=INTEGER}, #{surplusRefundPrice,jdbcType=DECIMAL}, ", + "#{surplusRefundIntegral,jdbcType=INTEGER}, #{channelOrderNo,jdbcType=VARCHAR}, ", + "#{totalPrice,jdbcType=DECIMAL}, #{totalActualPrice,jdbcType=DECIMAL}, ", + "#{totalDeductionPrice,jdbcType=DECIMAL}, #{saleCount,jdbcType=INTEGER}, ", + "#{giveawayType,jdbcType=BIT}, #{childOrderStatus,jdbcType=INTEGER}, ", + "#{praiseStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{payTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ", + "#{refundTime,jdbcType=TIMESTAMP}, #{refundRemarks,jdbcType=VARCHAR}, ", + "#{cancelTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ", + "#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighChildOrder record); @@ -99,6 +101,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { @Result(column="store_address", property="storeAddress", jdbcType=JdbcType.VARCHAR), @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), + @Result(column="sec_user_id", property="secUserId", jdbcType=JdbcType.BIGINT), @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_desc", property="goodsDesc", jdbcType=JdbcType.VARCHAR), @Result(column="goods_img", property="goodsImg", jdbcType=JdbcType.VARCHAR), @@ -135,8 +138,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { @Select({ "select", "id, order_id, order_no, mem_id, mem_name, mem_phone, child_order_no, store_id, ", - "store_name, store_address, goods_type, goods_id, goods_name, goods_desc, goods_img, ", - "sku_id, goods_spec_name, goods_price, goods_actual_price, surplus_refund_num, ", + "store_name, store_address, goods_type, goods_id, sec_user_id, goods_name, goods_desc, ", + "goods_img, sku_id, goods_spec_name, goods_price, goods_actual_price, surplus_refund_num, ", "surplus_refund_price, surplus_refund_integral, channel_order_no, total_price, ", "total_actual_price, total_deduction_price, sale_count, giveaway_type, child_order_status, ", "praise_status, create_time, pay_time, finish_time, refund_time, refund_remarks, ", @@ -157,6 +160,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { @Result(column="store_address", property="storeAddress", jdbcType=JdbcType.VARCHAR), @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), + @Result(column="sec_user_id", property="secUserId", jdbcType=JdbcType.BIGINT), @Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR), @Result(column="goods_desc", property="goodsDesc", jdbcType=JdbcType.VARCHAR), @Result(column="goods_img", property="goodsImg", jdbcType=JdbcType.VARCHAR), @@ -212,6 +216,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt { "store_address = #{storeAddress,jdbcType=VARCHAR},", "goods_type = #{goodsType,jdbcType=INTEGER},", "goods_id = #{goodsId,jdbcType=BIGINT},", + "sec_user_id = #{secUserId,jdbcType=BIGINT},", "goods_name = #{goodsName,jdbcType=VARCHAR},", "goods_desc = #{goodsDesc,jdbcType=VARCHAR},", "goods_img = #{goodsImg,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 0fdbb1b7..6c903ac2 100644 --- a/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java @@ -72,6 +72,10 @@ public class HighChildOrderSqlProvider { sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}"); } + if (record.getSecUserId() != null) { + sql.VALUES("sec_user_id", "#{secUserId,jdbcType=BIGINT}"); + } + if (record.getGoodsName() != null) { sql.VALUES("goods_name", "#{goodsName,jdbcType=VARCHAR}"); } @@ -213,6 +217,7 @@ public class HighChildOrderSqlProvider { sql.SELECT("store_address"); sql.SELECT("goods_type"); sql.SELECT("goods_id"); + sql.SELECT("sec_user_id"); sql.SELECT("goods_name"); sql.SELECT("goods_desc"); sql.SELECT("goods_img"); @@ -308,6 +313,10 @@ public class HighChildOrderSqlProvider { sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); } + if (record.getSecUserId() != null) { + sql.SET("sec_user_id = #{record.secUserId,jdbcType=BIGINT}"); + } + if (record.getGoodsName() != null) { sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}"); } @@ -448,6 +457,7 @@ public class HighChildOrderSqlProvider { sql.SET("store_address = #{record.storeAddress,jdbcType=VARCHAR}"); sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}"); sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); + sql.SET("sec_user_id = #{record.secUserId,jdbcType=BIGINT}"); sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}"); sql.SET("goods_desc = #{record.goodsDesc,jdbcType=VARCHAR}"); sql.SET("goods_img = #{record.goodsImg,jdbcType=VARCHAR}"); @@ -532,6 +542,10 @@ public class HighChildOrderSqlProvider { sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}"); } + if (record.getSecUserId() != null) { + sql.SET("sec_user_id = #{secUserId,jdbcType=BIGINT}"); + } + if (record.getGoodsName() != null) { sql.SET("goods_name = #{goodsName,jdbcType=VARCHAR}"); } diff --git a/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java b/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java index 250fee57..5c44e4e1 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java @@ -41,50 +41,50 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Insert({ "insert into high_order (title, search_title, ", "product_type, company_id, ", - "company_name, promote_code, ", "mem_discount_id, mem_discount_name, ", "mem_id, mem_name, mem_phone, ", "order_no, pay_serial_no, ", "pay_type, mem_card_id, ", "mem_card_type, mem_card_no, ", - "total_price, total_deduction_price, ", - "deduction_coupon_price, deduction_product_price, ", - "pay_gold, payable_price, ", + "total_price, payable_price, ", "pay_price, pay_real_price, ", "order_status, remarks, ", - "create_time, surplus_refund_price, ", + "create_time, total_deduction_price, ", + "deduction_coupon_price, deduction_product_price, ", + "pay_gold, surplus_refund_price, ", "surplus_refund_integral, pay_time, ", "finish_time, cancel_time, ", "cancel_remarks, refund_time, ", "account_merchant_num, profit_sharing_status, ", "profit_sharing_record_id, whether_check, ", "whether_rebate, exception_status, ", - "exception_content, ext_1, ", - "ext_2, ext_3, ext_4, ", - "ext_5, ext_6)", + "exception_content, company_name, ", + "promote_code, sec_user_id, ", + "ext_1, ext_2, ext_3, ", + "ext_4, ext_5, ext_6)", "values (#{title,jdbcType=VARCHAR}, #{searchTitle,jdbcType=VARCHAR}, ", "#{productType,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, ", - "#{companyName,jdbcType=VARCHAR}, #{promoteCode,jdbcType=VARCHAR}, ", "#{memDiscountId,jdbcType=BIGINT}, #{memDiscountName,jdbcType=VARCHAR}, ", "#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", "#{orderNo,jdbcType=VARCHAR}, #{paySerialNo,jdbcType=VARCHAR}, ", "#{payType,jdbcType=INTEGER}, #{memCardId,jdbcType=BIGINT}, ", "#{memCardType,jdbcType=INTEGER}, #{memCardNo,jdbcType=VARCHAR}, ", - "#{totalPrice,jdbcType=DECIMAL}, #{totalDeductionPrice,jdbcType=DECIMAL}, ", - "#{deductionCouponPrice,jdbcType=DECIMAL}, #{deductionProductPrice,jdbcType=DECIMAL}, ", - "#{payGold,jdbcType=INTEGER}, #{payablePrice,jdbcType=DECIMAL}, ", + "#{totalPrice,jdbcType=DECIMAL}, #{payablePrice,jdbcType=DECIMAL}, ", "#{payPrice,jdbcType=DECIMAL}, #{payRealPrice,jdbcType=DECIMAL}, ", "#{orderStatus,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{surplusRefundPrice,jdbcType=DECIMAL}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{totalDeductionPrice,jdbcType=DECIMAL}, ", + "#{deductionCouponPrice,jdbcType=DECIMAL}, #{deductionProductPrice,jdbcType=DECIMAL}, ", + "#{payGold,jdbcType=INTEGER}, #{surplusRefundPrice,jdbcType=DECIMAL}, ", "#{surplusRefundIntegral,jdbcType=INTEGER}, #{payTime,jdbcType=TIMESTAMP}, ", "#{finishTime,jdbcType=TIMESTAMP}, #{cancelTime,jdbcType=TIMESTAMP}, ", "#{cancelRemarks,jdbcType=VARCHAR}, #{refundTime,jdbcType=TIMESTAMP}, ", "#{accountMerchantNum,jdbcType=VARCHAR}, #{profitSharingStatus,jdbcType=BIT}, ", "#{profitSharingRecordId,jdbcType=BIGINT}, #{whetherCheck,jdbcType=BIT}, ", "#{whetherRebate,jdbcType=BIT}, #{exceptionStatus,jdbcType=BIT}, ", - "#{exceptionContent,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", - "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ", - "#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" + "#{exceptionContent,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, ", + "#{promoteCode,jdbcType=VARCHAR}, #{secUserId,jdbcType=BIGINT}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ", + "#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighOrder record); @@ -100,8 +100,6 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="search_title", property="searchTitle", jdbcType=JdbcType.VARCHAR), @Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), - @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), - @Result(column="promote_code", property="promoteCode", jdbcType=JdbcType.VARCHAR), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @@ -114,16 +112,16 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER), @Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), - @Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL), - @Result(column="deduction_coupon_price", property="deductionCouponPrice", jdbcType=JdbcType.DECIMAL), - @Result(column="deduction_product_price", property="deductionProductPrice", jdbcType=JdbcType.DECIMAL), - @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="payable_price", property="payablePrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="deduction_coupon_price", property="deductionCouponPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="deduction_product_price", property="deductionProductPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="surplus_refund_integral", property="surplusRefundIntegral", jdbcType=JdbcType.INTEGER), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @@ -138,6 +136,9 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT), @Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT), @Result(column="exception_content", property="exceptionContent", jdbcType=JdbcType.VARCHAR), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="promote_code", property="promoteCode", jdbcType=JdbcType.VARCHAR), + @Result(column="sec_user_id", property="secUserId", jdbcType=JdbcType.BIGINT), @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,14 +150,15 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Select({ "select", - "id, title, search_title, product_type, company_id, company_name, promote_code, ", - "mem_discount_id, mem_discount_name, mem_id, mem_name, mem_phone, order_no, pay_serial_no, ", - "pay_type, mem_card_id, mem_card_type, mem_card_no, total_price, total_deduction_price, ", - "deduction_coupon_price, deduction_product_price, pay_gold, payable_price, pay_price, ", - "pay_real_price, order_status, remarks, create_time, surplus_refund_price, surplus_refund_integral, ", + "id, title, search_title, product_type, company_id, mem_discount_id, mem_discount_name, ", + "mem_id, mem_name, mem_phone, order_no, pay_serial_no, pay_type, mem_card_id, ", + "mem_card_type, mem_card_no, total_price, payable_price, pay_price, pay_real_price, ", + "order_status, remarks, create_time, total_deduction_price, deduction_coupon_price, ", + "deduction_product_price, pay_gold, surplus_refund_price, surplus_refund_integral, ", "pay_time, finish_time, cancel_time, cancel_remarks, refund_time, account_merchant_num, ", "profit_sharing_status, profit_sharing_record_id, whether_check, whether_rebate, ", - "exception_status, exception_content, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6", + "exception_status, exception_content, company_name, promote_code, sec_user_id, ", + "ext_1, ext_2, ext_3, ext_4, ext_5, ext_6", "from high_order", "where id = #{id,jdbcType=BIGINT}" }) @@ -166,8 +168,6 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="search_title", property="searchTitle", jdbcType=JdbcType.VARCHAR), @Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), - @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), - @Result(column="promote_code", property="promoteCode", jdbcType=JdbcType.VARCHAR), @Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT), @Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR), @Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT), @@ -180,16 +180,16 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER), @Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR), @Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL), - @Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL), - @Result(column="deduction_coupon_price", property="deductionCouponPrice", jdbcType=JdbcType.DECIMAL), - @Result(column="deduction_product_price", property="deductionProductPrice", jdbcType=JdbcType.DECIMAL), - @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="payable_price", property="payablePrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="deduction_coupon_price", property="deductionCouponPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="deduction_product_price", property="deductionProductPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER), @Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="surplus_refund_integral", property="surplusRefundIntegral", jdbcType=JdbcType.INTEGER), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @@ -204,6 +204,9 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT), @Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT), @Result(column="exception_content", property="exceptionContent", jdbcType=JdbcType.VARCHAR), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="promote_code", property="promoteCode", jdbcType=JdbcType.VARCHAR), + @Result(column="sec_user_id", property="secUserId", jdbcType=JdbcType.BIGINT), @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), @@ -228,8 +231,6 @@ public interface HighOrderMapper extends HighOrderMapperExt { "search_title = #{searchTitle,jdbcType=VARCHAR},", "product_type = #{productType,jdbcType=INTEGER},", "company_id = #{companyId,jdbcType=BIGINT},", - "company_name = #{companyName,jdbcType=VARCHAR},", - "promote_code = #{promoteCode,jdbcType=VARCHAR},", "mem_discount_id = #{memDiscountId,jdbcType=BIGINT},", "mem_discount_name = #{memDiscountName,jdbcType=VARCHAR},", "mem_id = #{memId,jdbcType=BIGINT},", @@ -242,16 +243,16 @@ public interface HighOrderMapper extends HighOrderMapperExt { "mem_card_type = #{memCardType,jdbcType=INTEGER},", "mem_card_no = #{memCardNo,jdbcType=VARCHAR},", "total_price = #{totalPrice,jdbcType=DECIMAL},", - "total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL},", - "deduction_coupon_price = #{deductionCouponPrice,jdbcType=DECIMAL},", - "deduction_product_price = #{deductionProductPrice,jdbcType=DECIMAL},", - "pay_gold = #{payGold,jdbcType=INTEGER},", "payable_price = #{payablePrice,jdbcType=DECIMAL},", "pay_price = #{payPrice,jdbcType=DECIMAL},", "pay_real_price = #{payRealPrice,jdbcType=DECIMAL},", "order_status = #{orderStatus,jdbcType=INTEGER},", "remarks = #{remarks,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},", + "total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL},", + "deduction_coupon_price = #{deductionCouponPrice,jdbcType=DECIMAL},", + "deduction_product_price = #{deductionProductPrice,jdbcType=DECIMAL},", + "pay_gold = #{payGold,jdbcType=INTEGER},", "surplus_refund_price = #{surplusRefundPrice,jdbcType=DECIMAL},", "surplus_refund_integral = #{surplusRefundIntegral,jdbcType=INTEGER},", "pay_time = #{payTime,jdbcType=TIMESTAMP},", @@ -266,6 +267,9 @@ public interface HighOrderMapper extends HighOrderMapperExt { "whether_rebate = #{whetherRebate,jdbcType=BIT},", "exception_status = #{exceptionStatus,jdbcType=BIT},", "exception_content = #{exceptionContent,jdbcType=VARCHAR},", + "company_name = #{companyName,jdbcType=VARCHAR},", + "promote_code = #{promoteCode,jdbcType=VARCHAR},", + "sec_user_id = #{secUserId,jdbcType=BIGINT},", "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/HighOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java index 0d2295b9..113b3dda 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java @@ -44,14 +44,6 @@ public class HighOrderSqlProvider { sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); } - if (record.getCompanyName() != null) { - sql.VALUES("company_name", "#{companyName,jdbcType=VARCHAR}"); - } - - if (record.getPromoteCode() != null) { - sql.VALUES("promote_code", "#{promoteCode,jdbcType=VARCHAR}"); - } - if (record.getMemDiscountId() != null) { sql.VALUES("mem_discount_id", "#{memDiscountId,jdbcType=BIGINT}"); } @@ -100,22 +92,6 @@ public class HighOrderSqlProvider { sql.VALUES("total_price", "#{totalPrice,jdbcType=DECIMAL}"); } - if (record.getTotalDeductionPrice() != null) { - sql.VALUES("total_deduction_price", "#{totalDeductionPrice,jdbcType=DECIMAL}"); - } - - if (record.getDeductionCouponPrice() != null) { - sql.VALUES("deduction_coupon_price", "#{deductionCouponPrice,jdbcType=DECIMAL}"); - } - - if (record.getDeductionProductPrice() != null) { - sql.VALUES("deduction_product_price", "#{deductionProductPrice,jdbcType=DECIMAL}"); - } - - if (record.getPayGold() != null) { - sql.VALUES("pay_gold", "#{payGold,jdbcType=INTEGER}"); - } - if (record.getPayablePrice() != null) { sql.VALUES("payable_price", "#{payablePrice,jdbcType=DECIMAL}"); } @@ -140,6 +116,22 @@ public class HighOrderSqlProvider { sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); } + if (record.getTotalDeductionPrice() != null) { + sql.VALUES("total_deduction_price", "#{totalDeductionPrice,jdbcType=DECIMAL}"); + } + + if (record.getDeductionCouponPrice() != null) { + sql.VALUES("deduction_coupon_price", "#{deductionCouponPrice,jdbcType=DECIMAL}"); + } + + if (record.getDeductionProductPrice() != null) { + sql.VALUES("deduction_product_price", "#{deductionProductPrice,jdbcType=DECIMAL}"); + } + + if (record.getPayGold() != null) { + sql.VALUES("pay_gold", "#{payGold,jdbcType=INTEGER}"); + } + if (record.getSurplusRefundPrice() != null) { sql.VALUES("surplus_refund_price", "#{surplusRefundPrice,jdbcType=DECIMAL}"); } @@ -196,6 +188,18 @@ public class HighOrderSqlProvider { sql.VALUES("exception_content", "#{exceptionContent,jdbcType=VARCHAR}"); } + if (record.getCompanyName() != null) { + sql.VALUES("company_name", "#{companyName,jdbcType=VARCHAR}"); + } + + if (record.getPromoteCode() != null) { + sql.VALUES("promote_code", "#{promoteCode,jdbcType=VARCHAR}"); + } + + if (record.getSecUserId() != null) { + sql.VALUES("sec_user_id", "#{secUserId,jdbcType=BIGINT}"); + } + if (record.getExt1() != null) { sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); } @@ -234,8 +238,6 @@ public class HighOrderSqlProvider { sql.SELECT("search_title"); sql.SELECT("product_type"); sql.SELECT("company_id"); - sql.SELECT("company_name"); - sql.SELECT("promote_code"); sql.SELECT("mem_discount_id"); sql.SELECT("mem_discount_name"); sql.SELECT("mem_id"); @@ -248,16 +250,16 @@ public class HighOrderSqlProvider { sql.SELECT("mem_card_type"); sql.SELECT("mem_card_no"); sql.SELECT("total_price"); - sql.SELECT("total_deduction_price"); - sql.SELECT("deduction_coupon_price"); - sql.SELECT("deduction_product_price"); - sql.SELECT("pay_gold"); sql.SELECT("payable_price"); sql.SELECT("pay_price"); sql.SELECT("pay_real_price"); sql.SELECT("order_status"); sql.SELECT("remarks"); sql.SELECT("create_time"); + sql.SELECT("total_deduction_price"); + sql.SELECT("deduction_coupon_price"); + sql.SELECT("deduction_product_price"); + sql.SELECT("pay_gold"); sql.SELECT("surplus_refund_price"); sql.SELECT("surplus_refund_integral"); sql.SELECT("pay_time"); @@ -272,6 +274,9 @@ public class HighOrderSqlProvider { sql.SELECT("whether_rebate"); sql.SELECT("exception_status"); sql.SELECT("exception_content"); + sql.SELECT("company_name"); + sql.SELECT("promote_code"); + sql.SELECT("sec_user_id"); sql.SELECT("ext_1"); sql.SELECT("ext_2"); sql.SELECT("ext_3"); @@ -315,14 +320,6 @@ public class HighOrderSqlProvider { sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); } - if (record.getCompanyName() != null) { - sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); - } - - if (record.getPromoteCode() != null) { - sql.SET("promote_code = #{record.promoteCode,jdbcType=VARCHAR}"); - } - if (record.getMemDiscountId() != null) { sql.SET("mem_discount_id = #{record.memDiscountId,jdbcType=BIGINT}"); } @@ -371,22 +368,6 @@ public class HighOrderSqlProvider { sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}"); } - if (record.getTotalDeductionPrice() != null) { - sql.SET("total_deduction_price = #{record.totalDeductionPrice,jdbcType=DECIMAL}"); - } - - if (record.getDeductionCouponPrice() != null) { - sql.SET("deduction_coupon_price = #{record.deductionCouponPrice,jdbcType=DECIMAL}"); - } - - if (record.getDeductionProductPrice() != null) { - sql.SET("deduction_product_price = #{record.deductionProductPrice,jdbcType=DECIMAL}"); - } - - if (record.getPayGold() != null) { - sql.SET("pay_gold = #{record.payGold,jdbcType=INTEGER}"); - } - if (record.getPayablePrice() != null) { sql.SET("payable_price = #{record.payablePrice,jdbcType=DECIMAL}"); } @@ -411,6 +392,22 @@ public class HighOrderSqlProvider { sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); } + if (record.getTotalDeductionPrice() != null) { + sql.SET("total_deduction_price = #{record.totalDeductionPrice,jdbcType=DECIMAL}"); + } + + if (record.getDeductionCouponPrice() != null) { + sql.SET("deduction_coupon_price = #{record.deductionCouponPrice,jdbcType=DECIMAL}"); + } + + if (record.getDeductionProductPrice() != null) { + sql.SET("deduction_product_price = #{record.deductionProductPrice,jdbcType=DECIMAL}"); + } + + if (record.getPayGold() != null) { + sql.SET("pay_gold = #{record.payGold,jdbcType=INTEGER}"); + } + if (record.getSurplusRefundPrice() != null) { sql.SET("surplus_refund_price = #{record.surplusRefundPrice,jdbcType=DECIMAL}"); } @@ -467,6 +464,18 @@ public class HighOrderSqlProvider { sql.SET("exception_content = #{record.exceptionContent,jdbcType=VARCHAR}"); } + if (record.getCompanyName() != null) { + sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); + } + + if (record.getPromoteCode() != null) { + sql.SET("promote_code = #{record.promoteCode,jdbcType=VARCHAR}"); + } + + if (record.getSecUserId() != null) { + sql.SET("sec_user_id = #{record.secUserId,jdbcType=BIGINT}"); + } + if (record.getExt1() != null) { sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); } @@ -504,8 +513,6 @@ public class HighOrderSqlProvider { sql.SET("search_title = #{record.searchTitle,jdbcType=VARCHAR}"); sql.SET("product_type = #{record.productType,jdbcType=INTEGER}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); - sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); - sql.SET("promote_code = #{record.promoteCode,jdbcType=VARCHAR}"); sql.SET("mem_discount_id = #{record.memDiscountId,jdbcType=BIGINT}"); sql.SET("mem_discount_name = #{record.memDiscountName,jdbcType=VARCHAR}"); sql.SET("mem_id = #{record.memId,jdbcType=BIGINT}"); @@ -518,16 +525,16 @@ public class HighOrderSqlProvider { sql.SET("mem_card_type = #{record.memCardType,jdbcType=INTEGER}"); sql.SET("mem_card_no = #{record.memCardNo,jdbcType=VARCHAR}"); sql.SET("total_price = #{record.totalPrice,jdbcType=DECIMAL}"); - sql.SET("total_deduction_price = #{record.totalDeductionPrice,jdbcType=DECIMAL}"); - sql.SET("deduction_coupon_price = #{record.deductionCouponPrice,jdbcType=DECIMAL}"); - sql.SET("deduction_product_price = #{record.deductionProductPrice,jdbcType=DECIMAL}"); - sql.SET("pay_gold = #{record.payGold,jdbcType=INTEGER}"); sql.SET("payable_price = #{record.payablePrice,jdbcType=DECIMAL}"); sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}"); sql.SET("pay_real_price = #{record.payRealPrice,jdbcType=DECIMAL}"); sql.SET("order_status = #{record.orderStatus,jdbcType=INTEGER}"); sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("total_deduction_price = #{record.totalDeductionPrice,jdbcType=DECIMAL}"); + sql.SET("deduction_coupon_price = #{record.deductionCouponPrice,jdbcType=DECIMAL}"); + sql.SET("deduction_product_price = #{record.deductionProductPrice,jdbcType=DECIMAL}"); + sql.SET("pay_gold = #{record.payGold,jdbcType=INTEGER}"); sql.SET("surplus_refund_price = #{record.surplusRefundPrice,jdbcType=DECIMAL}"); sql.SET("surplus_refund_integral = #{record.surplusRefundIntegral,jdbcType=INTEGER}"); sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); @@ -542,6 +549,9 @@ public class HighOrderSqlProvider { sql.SET("whether_rebate = #{record.whetherRebate,jdbcType=BIT}"); sql.SET("exception_status = #{record.exceptionStatus,jdbcType=BIT}"); sql.SET("exception_content = #{record.exceptionContent,jdbcType=VARCHAR}"); + sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); + sql.SET("promote_code = #{record.promoteCode,jdbcType=VARCHAR}"); + sql.SET("sec_user_id = #{record.secUserId,jdbcType=BIGINT}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); @@ -574,14 +584,6 @@ public class HighOrderSqlProvider { sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); } - if (record.getCompanyName() != null) { - sql.SET("company_name = #{companyName,jdbcType=VARCHAR}"); - } - - if (record.getPromoteCode() != null) { - sql.SET("promote_code = #{promoteCode,jdbcType=VARCHAR}"); - } - if (record.getMemDiscountId() != null) { sql.SET("mem_discount_id = #{memDiscountId,jdbcType=BIGINT}"); } @@ -630,22 +632,6 @@ public class HighOrderSqlProvider { sql.SET("total_price = #{totalPrice,jdbcType=DECIMAL}"); } - if (record.getTotalDeductionPrice() != null) { - sql.SET("total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL}"); - } - - if (record.getDeductionCouponPrice() != null) { - sql.SET("deduction_coupon_price = #{deductionCouponPrice,jdbcType=DECIMAL}"); - } - - if (record.getDeductionProductPrice() != null) { - sql.SET("deduction_product_price = #{deductionProductPrice,jdbcType=DECIMAL}"); - } - - if (record.getPayGold() != null) { - sql.SET("pay_gold = #{payGold,jdbcType=INTEGER}"); - } - if (record.getPayablePrice() != null) { sql.SET("payable_price = #{payablePrice,jdbcType=DECIMAL}"); } @@ -670,6 +656,22 @@ public class HighOrderSqlProvider { sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); } + if (record.getTotalDeductionPrice() != null) { + sql.SET("total_deduction_price = #{totalDeductionPrice,jdbcType=DECIMAL}"); + } + + if (record.getDeductionCouponPrice() != null) { + sql.SET("deduction_coupon_price = #{deductionCouponPrice,jdbcType=DECIMAL}"); + } + + if (record.getDeductionProductPrice() != null) { + sql.SET("deduction_product_price = #{deductionProductPrice,jdbcType=DECIMAL}"); + } + + if (record.getPayGold() != null) { + sql.SET("pay_gold = #{payGold,jdbcType=INTEGER}"); + } + if (record.getSurplusRefundPrice() != null) { sql.SET("surplus_refund_price = #{surplusRefundPrice,jdbcType=DECIMAL}"); } @@ -726,6 +728,18 @@ public class HighOrderSqlProvider { sql.SET("exception_content = #{exceptionContent,jdbcType=VARCHAR}"); } + if (record.getCompanyName() != null) { + sql.SET("company_name = #{companyName,jdbcType=VARCHAR}"); + } + + if (record.getPromoteCode() != null) { + sql.SET("promote_code = #{promoteCode,jdbcType=VARCHAR}"); + } + + if (record.getSecUserId() != null) { + sql.SET("sec_user_id = #{secUserId,jdbcType=BIGINT}"); + } + if (record.getExt1() != null) { sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); } diff --git a/hai-service/src/main/java/com/hai/entity/GoodsDetail.java b/hai-service/src/main/java/com/hai/entity/GoodsDetail.java index cb420093..8428009e 100644 --- a/hai-service/src/main/java/com/hai/entity/GoodsDetail.java +++ b/hai-service/src/main/java/com/hai/entity/GoodsDetail.java @@ -33,6 +33,11 @@ public class GoodsDetail implements Serializable { */ private Long goodsType; + /** + * 商品标签 + */ + private String goodsLabel; + /** * 商品名称 */ @@ -64,7 +69,7 @@ public class GoodsDetail implements Serializable { private String detailImg; /** - * 商品状态:0:删除 1:上线 2:编辑中 3:审核中 + * 商品状态:0:删除 1:上线 2:编辑中 */ private Integer status; @@ -137,6 +142,14 @@ public class GoodsDetail implements Serializable { this.goodsType = goodsType; } + public String getGoodsLabel() { + return goodsLabel; + } + + public void setGoodsLabel(String goodsLabel) { + this.goodsLabel = goodsLabel; + } + public String getName() { return name; } @@ -265,6 +278,7 @@ public class GoodsDetail implements Serializable { && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) && (this.getGoodsTypeName() == null ? other.getGoodsTypeName() == null : this.getGoodsTypeName().equals(other.getGoodsTypeName())) && (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType())) + && (this.getGoodsLabel() == null ? other.getGoodsLabel() == null : this.getGoodsLabel().equals(other.getGoodsLabel())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getListDescribe() == null ? other.getListDescribe() == null : this.getListDescribe().equals(other.getListDescribe())) && (this.getGoodsDescribe() == null ? other.getGoodsDescribe() == null : this.getGoodsDescribe().equals(other.getGoodsDescribe())) @@ -289,6 +303,7 @@ public class GoodsDetail implements Serializable { result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); result = prime * result + ((getGoodsTypeName() == null) ? 0 : getGoodsTypeName().hashCode()); result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode()); + result = prime * result + ((getGoodsLabel() == null) ? 0 : getGoodsLabel().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); result = prime * result + ((getListDescribe() == null) ? 0 : getListDescribe().hashCode()); result = prime * result + ((getGoodsDescribe() == null) ? 0 : getGoodsDescribe().hashCode()); @@ -316,6 +331,7 @@ public class GoodsDetail implements Serializable { sb.append(", companyId=").append(companyId); sb.append(", goodsTypeName=").append(goodsTypeName); sb.append(", goodsType=").append(goodsType); + sb.append(", goodsLabel=").append(goodsLabel); sb.append(", name=").append(name); sb.append(", listDescribe=").append(listDescribe); sb.append(", goodsDescribe=").append(goodsDescribe); @@ -334,4 +350,4 @@ public class GoodsDetail implements Serializable { sb.append("]"); return sb.toString(); } -} +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/GoodsDetailExample.java b/hai-service/src/main/java/com/hai/entity/GoodsDetailExample.java index 2034957e..83039e56 100644 --- a/hai-service/src/main/java/com/hai/entity/GoodsDetailExample.java +++ b/hai-service/src/main/java/com/hai/entity/GoodsDetailExample.java @@ -375,6 +375,76 @@ public class GoodsDetailExample { return (Criteria) this; } + public Criteria andGoodsLabelIsNull() { + addCriterion("goods_label is null"); + return (Criteria) this; + } + + public Criteria andGoodsLabelIsNotNull() { + addCriterion("goods_label is not null"); + return (Criteria) this; + } + + public Criteria andGoodsLabelEqualTo(String value) { + addCriterion("goods_label =", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelNotEqualTo(String value) { + addCriterion("goods_label <>", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelGreaterThan(String value) { + addCriterion("goods_label >", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelGreaterThanOrEqualTo(String value) { + addCriterion("goods_label >=", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelLessThan(String value) { + addCriterion("goods_label <", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelLessThanOrEqualTo(String value) { + addCriterion("goods_label <=", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelLike(String value) { + addCriterion("goods_label like", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelNotLike(String value) { + addCriterion("goods_label not like", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelIn(List values) { + addCriterion("goods_label in", values, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelNotIn(List values) { + addCriterion("goods_label not in", values, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelBetween(String value1, String value2) { + addCriterion("goods_label between", value1, value2, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelNotBetween(String value1, String value2) { + addCriterion("goods_label not between", value1, value2, "goodsLabel"); + return (Criteria) this; + } + public Criteria andNameIsNull() { addCriterion("`name` is null"); return (Criteria) this; 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 ae758414..56f4c71c 100644 --- a/hai-service/src/main/java/com/hai/entity/HighChildOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighChildOrder.java @@ -84,6 +84,11 @@ public class HighChildOrder implements Serializable { */ private Long goodsId; + /** + * 后台用户ID + */ + private Long secUserId; + /** * 商品的名称 */ @@ -321,6 +326,14 @@ public class HighChildOrder implements Serializable { this.goodsId = goodsId; } + public Long getSecUserId() { + return secUserId; + } + + public void setSecUserId(Long secUserId) { + this.secUserId = secUserId; + } + public String getGoodsName() { return goodsName; } @@ -585,6 +598,7 @@ public class HighChildOrder implements Serializable { && (this.getStoreAddress() == null ? other.getStoreAddress() == null : this.getStoreAddress().equals(other.getStoreAddress())) && (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType())) && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) + && (this.getSecUserId() == null ? other.getSecUserId() == null : this.getSecUserId().equals(other.getSecUserId())) && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName())) && (this.getGoodsDesc() == null ? other.getGoodsDesc() == null : this.getGoodsDesc().equals(other.getGoodsDesc())) && (this.getGoodsImg() == null ? other.getGoodsImg() == null : this.getGoodsImg().equals(other.getGoodsImg())) @@ -633,6 +647,7 @@ public class HighChildOrder implements Serializable { result = prime * result + ((getStoreAddress() == null) ? 0 : getStoreAddress().hashCode()); result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode()); result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); + result = prime * result + ((getSecUserId() == null) ? 0 : getSecUserId().hashCode()); result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode()); result = prime * result + ((getGoodsDesc() == null) ? 0 : getGoodsDesc().hashCode()); result = prime * result + ((getGoodsImg() == null) ? 0 : getGoodsImg().hashCode()); @@ -684,6 +699,7 @@ public class HighChildOrder implements Serializable { sb.append(", storeAddress=").append(storeAddress); sb.append(", goodsType=").append(goodsType); sb.append(", goodsId=").append(goodsId); + sb.append(", secUserId=").append(secUserId); sb.append(", goodsName=").append(goodsName); sb.append(", goodsDesc=").append(goodsDesc); sb.append(", goodsImg=").append(goodsImg); 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 fb7f808f..93e9e05a 100644 --- a/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java @@ -906,6 +906,66 @@ public class HighChildOrderExample { return (Criteria) this; } + public Criteria andSecUserIdIsNull() { + addCriterion("sec_user_id is null"); + return (Criteria) this; + } + + public Criteria andSecUserIdIsNotNull() { + addCriterion("sec_user_id is not null"); + return (Criteria) this; + } + + public Criteria andSecUserIdEqualTo(Long value) { + addCriterion("sec_user_id =", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdNotEqualTo(Long value) { + addCriterion("sec_user_id <>", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdGreaterThan(Long value) { + addCriterion("sec_user_id >", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("sec_user_id >=", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdLessThan(Long value) { + addCriterion("sec_user_id <", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdLessThanOrEqualTo(Long value) { + addCriterion("sec_user_id <=", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdIn(List values) { + addCriterion("sec_user_id in", values, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdNotIn(List values) { + addCriterion("sec_user_id not in", values, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdBetween(Long value1, Long value2) { + addCriterion("sec_user_id between", value1, value2, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdNotBetween(Long value1, Long value2) { + addCriterion("sec_user_id not between", value1, value2, "secUserId"); + return (Criteria) this; + } + public Criteria andGoodsNameIsNull() { addCriterion("goods_name is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/entity/HighOrder.java b/hai-service/src/main/java/com/hai/entity/HighOrder.java index 426ddafb..ccf71fbc 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrder.java @@ -41,6 +41,9 @@ public class HighOrder implements Serializable { 7:优惠券包 8:汇联通充值 9:话费充值 +10:电影票 +11:贵州中石化 +12:实物商品 */ private Integer productType; @@ -49,16 +52,6 @@ public class HighOrder implements Serializable { */ private Long companyId; - /** - * 公司名称 - */ - private String companyName; - - /** - * 推广码 - */ - private String promoteCode; - /** * 用户的优惠券high_discount_user_rel表的id */ @@ -119,26 +112,6 @@ public class HighOrder implements Serializable { */ private BigDecimal totalPrice; - /** - * 交易总优惠金额(优惠券优惠金额+商品优惠金额) - */ - private BigDecimal totalDeductionPrice; - - /** - * 优惠券优惠金额 - */ - private BigDecimal deductionCouponPrice; - - /** - * 产品优惠金额 - */ - private BigDecimal deductionProductPrice; - - /** - * 积分抵扣 - */ - private Integer payGold; - /** * 应付金额 */ @@ -169,6 +142,26 @@ public class HighOrder implements Serializable { */ private Date createTime; + /** + * 交易总优惠金额(优惠券优惠金额+商品优惠金额) + */ + private BigDecimal totalDeductionPrice; + + /** + * 优惠券优惠金额 + */ + private BigDecimal deductionCouponPrice; + + /** + * 产品优惠金额 + */ + private BigDecimal deductionProductPrice; + + /** + * 积分抵扣 + */ + private Integer payGold; + /** * 可退款金额 */ @@ -239,6 +232,21 @@ public class HighOrder implements Serializable { */ private String exceptionContent; + /** + * 公司名称 + */ + private String companyName; + + /** + * 推广码 + */ + private String promoteCode; + + /** + * 后台用户ID + */ + private Long secUserId; + private String ext1; private String ext2; @@ -249,6 +257,9 @@ public class HighOrder implements Serializable { private String ext5; + /** + * 存实物 商品图片 + */ private String ext6; private String time; @@ -323,22 +334,6 @@ public class HighOrder implements Serializable { this.companyId = companyId; } - public String getCompanyName() { - return companyName; - } - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - public String getPromoteCode() { - return promoteCode; - } - - public void setPromoteCode(String promoteCode) { - this.promoteCode = promoteCode; - } - public Long getMemDiscountId() { return memDiscountId; } @@ -435,38 +430,6 @@ public class HighOrder implements Serializable { this.totalPrice = totalPrice; } - public BigDecimal getTotalDeductionPrice() { - return totalDeductionPrice; - } - - public void setTotalDeductionPrice(BigDecimal totalDeductionPrice) { - this.totalDeductionPrice = totalDeductionPrice; - } - - public BigDecimal getDeductionCouponPrice() { - return deductionCouponPrice; - } - - public void setDeductionCouponPrice(BigDecimal deductionCouponPrice) { - this.deductionCouponPrice = deductionCouponPrice; - } - - public BigDecimal getDeductionProductPrice() { - return deductionProductPrice; - } - - public void setDeductionProductPrice(BigDecimal deductionProductPrice) { - this.deductionProductPrice = deductionProductPrice; - } - - public Integer getPayGold() { - return payGold; - } - - public void setPayGold(Integer payGold) { - this.payGold = payGold; - } - public BigDecimal getPayablePrice() { return payablePrice; } @@ -515,6 +478,38 @@ public class HighOrder implements Serializable { this.createTime = createTime; } + public BigDecimal getTotalDeductionPrice() { + return totalDeductionPrice; + } + + public void setTotalDeductionPrice(BigDecimal totalDeductionPrice) { + this.totalDeductionPrice = totalDeductionPrice; + } + + public BigDecimal getDeductionCouponPrice() { + return deductionCouponPrice; + } + + public void setDeductionCouponPrice(BigDecimal deductionCouponPrice) { + this.deductionCouponPrice = deductionCouponPrice; + } + + public BigDecimal getDeductionProductPrice() { + return deductionProductPrice; + } + + public void setDeductionProductPrice(BigDecimal deductionProductPrice) { + this.deductionProductPrice = deductionProductPrice; + } + + public Integer getPayGold() { + return payGold; + } + + public void setPayGold(Integer payGold) { + this.payGold = payGold; + } + public BigDecimal getSurplusRefundPrice() { return surplusRefundPrice; } @@ -627,6 +622,30 @@ public class HighOrder implements Serializable { this.exceptionContent = exceptionContent; } + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public String getPromoteCode() { + return promoteCode; + } + + public void setPromoteCode(String promoteCode) { + this.promoteCode = promoteCode; + } + + public Long getSecUserId() { + return secUserId; + } + + public void setSecUserId(Long secUserId) { + this.secUserId = secUserId; + } + public String getExt1() { return ext1; } @@ -692,8 +711,6 @@ public class HighOrder implements Serializable { && (this.getSearchTitle() == null ? other.getSearchTitle() == null : this.getSearchTitle().equals(other.getSearchTitle())) && (this.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) - && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName())) - && (this.getPromoteCode() == null ? other.getPromoteCode() == null : this.getPromoteCode().equals(other.getPromoteCode())) && (this.getMemDiscountId() == null ? other.getMemDiscountId() == null : this.getMemDiscountId().equals(other.getMemDiscountId())) && (this.getMemDiscountName() == null ? other.getMemDiscountName() == null : this.getMemDiscountName().equals(other.getMemDiscountName())) && (this.getMemId() == null ? other.getMemId() == null : this.getMemId().equals(other.getMemId())) @@ -706,16 +723,16 @@ public class HighOrder implements Serializable { && (this.getMemCardType() == null ? other.getMemCardType() == null : this.getMemCardType().equals(other.getMemCardType())) && (this.getMemCardNo() == null ? other.getMemCardNo() == null : this.getMemCardNo().equals(other.getMemCardNo())) && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice())) - && (this.getTotalDeductionPrice() == null ? other.getTotalDeductionPrice() == null : this.getTotalDeductionPrice().equals(other.getTotalDeductionPrice())) - && (this.getDeductionCouponPrice() == null ? other.getDeductionCouponPrice() == null : this.getDeductionCouponPrice().equals(other.getDeductionCouponPrice())) - && (this.getDeductionProductPrice() == null ? other.getDeductionProductPrice() == null : this.getDeductionProductPrice().equals(other.getDeductionProductPrice())) - && (this.getPayGold() == null ? other.getPayGold() == null : this.getPayGold().equals(other.getPayGold())) && (this.getPayablePrice() == null ? other.getPayablePrice() == null : this.getPayablePrice().equals(other.getPayablePrice())) && (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice())) && (this.getPayRealPrice() == null ? other.getPayRealPrice() == null : this.getPayRealPrice().equals(other.getPayRealPrice())) && (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus())) && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getTotalDeductionPrice() == null ? other.getTotalDeductionPrice() == null : this.getTotalDeductionPrice().equals(other.getTotalDeductionPrice())) + && (this.getDeductionCouponPrice() == null ? other.getDeductionCouponPrice() == null : this.getDeductionCouponPrice().equals(other.getDeductionCouponPrice())) + && (this.getDeductionProductPrice() == null ? other.getDeductionProductPrice() == null : this.getDeductionProductPrice().equals(other.getDeductionProductPrice())) + && (this.getPayGold() == null ? other.getPayGold() == null : this.getPayGold().equals(other.getPayGold())) && (this.getSurplusRefundPrice() == null ? other.getSurplusRefundPrice() == null : this.getSurplusRefundPrice().equals(other.getSurplusRefundPrice())) && (this.getSurplusRefundIntegral() == null ? other.getSurplusRefundIntegral() == null : this.getSurplusRefundIntegral().equals(other.getSurplusRefundIntegral())) && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime())) @@ -730,6 +747,9 @@ public class HighOrder implements Serializable { && (this.getWhetherRebate() == null ? other.getWhetherRebate() == null : this.getWhetherRebate().equals(other.getWhetherRebate())) && (this.getExceptionStatus() == null ? other.getExceptionStatus() == null : this.getExceptionStatus().equals(other.getExceptionStatus())) && (this.getExceptionContent() == null ? other.getExceptionContent() == null : this.getExceptionContent().equals(other.getExceptionContent())) + && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName())) + && (this.getPromoteCode() == null ? other.getPromoteCode() == null : this.getPromoteCode().equals(other.getPromoteCode())) + && (this.getSecUserId() == null ? other.getSecUserId() == null : this.getSecUserId().equals(other.getSecUserId())) && (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())) @@ -747,8 +767,6 @@ public class HighOrder implements Serializable { result = prime * result + ((getSearchTitle() == null) ? 0 : getSearchTitle().hashCode()); result = prime * result + ((getProductType() == null) ? 0 : getProductType().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); - result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); - result = prime * result + ((getPromoteCode() == null) ? 0 : getPromoteCode().hashCode()); result = prime * result + ((getMemDiscountId() == null) ? 0 : getMemDiscountId().hashCode()); result = prime * result + ((getMemDiscountName() == null) ? 0 : getMemDiscountName().hashCode()); result = prime * result + ((getMemId() == null) ? 0 : getMemId().hashCode()); @@ -761,16 +779,16 @@ public class HighOrder implements Serializable { result = prime * result + ((getMemCardType() == null) ? 0 : getMemCardType().hashCode()); result = prime * result + ((getMemCardNo() == null) ? 0 : getMemCardNo().hashCode()); result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode()); - result = prime * result + ((getTotalDeductionPrice() == null) ? 0 : getTotalDeductionPrice().hashCode()); - result = prime * result + ((getDeductionCouponPrice() == null) ? 0 : getDeductionCouponPrice().hashCode()); - result = prime * result + ((getDeductionProductPrice() == null) ? 0 : getDeductionProductPrice().hashCode()); - result = prime * result + ((getPayGold() == null) ? 0 : getPayGold().hashCode()); result = prime * result + ((getPayablePrice() == null) ? 0 : getPayablePrice().hashCode()); result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode()); result = prime * result + ((getPayRealPrice() == null) ? 0 : getPayRealPrice().hashCode()); result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode()); result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getTotalDeductionPrice() == null) ? 0 : getTotalDeductionPrice().hashCode()); + result = prime * result + ((getDeductionCouponPrice() == null) ? 0 : getDeductionCouponPrice().hashCode()); + result = prime * result + ((getDeductionProductPrice() == null) ? 0 : getDeductionProductPrice().hashCode()); + result = prime * result + ((getPayGold() == null) ? 0 : getPayGold().hashCode()); result = prime * result + ((getSurplusRefundPrice() == null) ? 0 : getSurplusRefundPrice().hashCode()); result = prime * result + ((getSurplusRefundIntegral() == null) ? 0 : getSurplusRefundIntegral().hashCode()); result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode()); @@ -785,6 +803,9 @@ public class HighOrder implements Serializable { result = prime * result + ((getWhetherRebate() == null) ? 0 : getWhetherRebate().hashCode()); result = prime * result + ((getExceptionStatus() == null) ? 0 : getExceptionStatus().hashCode()); result = prime * result + ((getExceptionContent() == null) ? 0 : getExceptionContent().hashCode()); + result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); + result = prime * result + ((getPromoteCode() == null) ? 0 : getPromoteCode().hashCode()); + result = prime * result + ((getSecUserId() == null) ? 0 : getSecUserId().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()); @@ -805,8 +826,6 @@ public class HighOrder implements Serializable { sb.append(", searchTitle=").append(searchTitle); sb.append(", productType=").append(productType); sb.append(", companyId=").append(companyId); - sb.append(", companyName=").append(companyName); - sb.append(", promoteCode=").append(promoteCode); sb.append(", memDiscountId=").append(memDiscountId); sb.append(", memDiscountName=").append(memDiscountName); sb.append(", memId=").append(memId); @@ -819,16 +838,16 @@ public class HighOrder implements Serializable { sb.append(", memCardType=").append(memCardType); sb.append(", memCardNo=").append(memCardNo); sb.append(", totalPrice=").append(totalPrice); - sb.append(", totalDeductionPrice=").append(totalDeductionPrice); - sb.append(", deductionCouponPrice=").append(deductionCouponPrice); - sb.append(", deductionProductPrice=").append(deductionProductPrice); - sb.append(", payGold=").append(payGold); sb.append(", payablePrice=").append(payablePrice); sb.append(", payPrice=").append(payPrice); sb.append(", payRealPrice=").append(payRealPrice); sb.append(", orderStatus=").append(orderStatus); sb.append(", remarks=").append(remarks); sb.append(", createTime=").append(createTime); + sb.append(", totalDeductionPrice=").append(totalDeductionPrice); + sb.append(", deductionCouponPrice=").append(deductionCouponPrice); + sb.append(", deductionProductPrice=").append(deductionProductPrice); + sb.append(", payGold=").append(payGold); sb.append(", surplusRefundPrice=").append(surplusRefundPrice); sb.append(", surplusRefundIntegral=").append(surplusRefundIntegral); sb.append(", payTime=").append(payTime); @@ -843,6 +862,9 @@ public class HighOrder implements Serializable { sb.append(", whetherRebate=").append(whetherRebate); sb.append(", exceptionStatus=").append(exceptionStatus); sb.append(", exceptionContent=").append(exceptionContent); + sb.append(", companyName=").append(companyName); + sb.append(", promoteCode=").append(promoteCode); + sb.append(", secUserId=").append(secUserId); 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/HighOrderExample.java b/hai-service/src/main/java/com/hai/entity/HighOrderExample.java index 858b0283..1bb72bd9 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrderExample.java @@ -446,146 +446,6 @@ public class HighOrderExample { return (Criteria) this; } - public Criteria andCompanyNameIsNull() { - addCriterion("company_name is null"); - return (Criteria) this; - } - - public Criteria andCompanyNameIsNotNull() { - addCriterion("company_name is not null"); - return (Criteria) this; - } - - public Criteria andCompanyNameEqualTo(String value) { - addCriterion("company_name =", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameNotEqualTo(String value) { - addCriterion("company_name <>", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameGreaterThan(String value) { - addCriterion("company_name >", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameGreaterThanOrEqualTo(String value) { - addCriterion("company_name >=", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameLessThan(String value) { - addCriterion("company_name <", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameLessThanOrEqualTo(String value) { - addCriterion("company_name <=", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameLike(String value) { - addCriterion("company_name like", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameNotLike(String value) { - addCriterion("company_name not like", value, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameIn(List values) { - addCriterion("company_name in", values, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameNotIn(List values) { - addCriterion("company_name not in", values, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameBetween(String value1, String value2) { - addCriterion("company_name between", value1, value2, "companyName"); - return (Criteria) this; - } - - public Criteria andCompanyNameNotBetween(String value1, String value2) { - addCriterion("company_name not between", value1, value2, "companyName"); - return (Criteria) this; - } - - public Criteria andPromoteCodeIsNull() { - addCriterion("promote_code is null"); - return (Criteria) this; - } - - public Criteria andPromoteCodeIsNotNull() { - addCriterion("promote_code is not null"); - return (Criteria) this; - } - - public Criteria andPromoteCodeEqualTo(String value) { - addCriterion("promote_code =", value, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeNotEqualTo(String value) { - addCriterion("promote_code <>", value, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeGreaterThan(String value) { - addCriterion("promote_code >", value, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeGreaterThanOrEqualTo(String value) { - addCriterion("promote_code >=", value, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeLessThan(String value) { - addCriterion("promote_code <", value, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeLessThanOrEqualTo(String value) { - addCriterion("promote_code <=", value, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeLike(String value) { - addCriterion("promote_code like", value, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeNotLike(String value) { - addCriterion("promote_code not like", value, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeIn(List values) { - addCriterion("promote_code in", values, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeNotIn(List values) { - addCriterion("promote_code not in", values, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeBetween(String value1, String value2) { - addCriterion("promote_code between", value1, value2, "promoteCode"); - return (Criteria) this; - } - - public Criteria andPromoteCodeNotBetween(String value1, String value2) { - addCriterion("promote_code not between", value1, value2, "promoteCode"); - return (Criteria) this; - } - public Criteria andMemDiscountIdIsNull() { addCriterion("mem_discount_id is null"); return (Criteria) this; @@ -1366,613 +1226,613 @@ public class HighOrderExample { return (Criteria) this; } - public Criteria andTotalDeductionPriceIsNull() { - addCriterion("total_deduction_price is null"); + public Criteria andPayablePriceIsNull() { + addCriterion("payable_price is null"); return (Criteria) this; } - public Criteria andTotalDeductionPriceIsNotNull() { - addCriterion("total_deduction_price is not null"); + public Criteria andPayablePriceIsNotNull() { + addCriterion("payable_price is not null"); return (Criteria) this; } - public Criteria andTotalDeductionPriceEqualTo(BigDecimal value) { - addCriterion("total_deduction_price =", value, "totalDeductionPrice"); + public Criteria andPayablePriceEqualTo(BigDecimal value) { + addCriterion("payable_price =", value, "payablePrice"); return (Criteria) this; } - public Criteria andTotalDeductionPriceNotEqualTo(BigDecimal value) { - addCriterion("total_deduction_price <>", value, "totalDeductionPrice"); + public Criteria andPayablePriceNotEqualTo(BigDecimal value) { + addCriterion("payable_price <>", value, "payablePrice"); return (Criteria) this; } - public Criteria andTotalDeductionPriceGreaterThan(BigDecimal value) { - addCriterion("total_deduction_price >", value, "totalDeductionPrice"); + public Criteria andPayablePriceGreaterThan(BigDecimal value) { + addCriterion("payable_price >", value, "payablePrice"); return (Criteria) this; } - public Criteria andTotalDeductionPriceGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("total_deduction_price >=", value, "totalDeductionPrice"); + public Criteria andPayablePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("payable_price >=", value, "payablePrice"); return (Criteria) this; } - public Criteria andTotalDeductionPriceLessThan(BigDecimal value) { - addCriterion("total_deduction_price <", value, "totalDeductionPrice"); + public Criteria andPayablePriceLessThan(BigDecimal value) { + addCriterion("payable_price <", value, "payablePrice"); return (Criteria) this; } - public Criteria andTotalDeductionPriceLessThanOrEqualTo(BigDecimal value) { - addCriterion("total_deduction_price <=", value, "totalDeductionPrice"); + public Criteria andPayablePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("payable_price <=", value, "payablePrice"); return (Criteria) this; } - public Criteria andTotalDeductionPriceIn(List values) { - addCriterion("total_deduction_price in", values, "totalDeductionPrice"); + public Criteria andPayablePriceIn(List values) { + addCriterion("payable_price in", values, "payablePrice"); return (Criteria) this; } - public Criteria andTotalDeductionPriceNotIn(List values) { - addCriterion("total_deduction_price not in", values, "totalDeductionPrice"); + public Criteria andPayablePriceNotIn(List values) { + addCriterion("payable_price not in", values, "payablePrice"); return (Criteria) this; } - public Criteria andTotalDeductionPriceBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("total_deduction_price between", value1, value2, "totalDeductionPrice"); + public Criteria andPayablePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("payable_price between", value1, value2, "payablePrice"); return (Criteria) this; } - public Criteria andTotalDeductionPriceNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("total_deduction_price not between", value1, value2, "totalDeductionPrice"); + public Criteria andPayablePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("payable_price not between", value1, value2, "payablePrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceIsNull() { - addCriterion("deduction_coupon_price is null"); + public Criteria andPayPriceIsNull() { + addCriterion("pay_price is null"); return (Criteria) this; } - public Criteria andDeductionCouponPriceIsNotNull() { - addCriterion("deduction_coupon_price is not null"); + public Criteria andPayPriceIsNotNull() { + addCriterion("pay_price is not null"); return (Criteria) this; } - public Criteria andDeductionCouponPriceEqualTo(BigDecimal value) { - addCriterion("deduction_coupon_price =", value, "deductionCouponPrice"); + public Criteria andPayPriceEqualTo(BigDecimal value) { + addCriterion("pay_price =", value, "payPrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceNotEqualTo(BigDecimal value) { - addCriterion("deduction_coupon_price <>", value, "deductionCouponPrice"); + public Criteria andPayPriceNotEqualTo(BigDecimal value) { + addCriterion("pay_price <>", value, "payPrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceGreaterThan(BigDecimal value) { - addCriterion("deduction_coupon_price >", value, "deductionCouponPrice"); + public Criteria andPayPriceGreaterThan(BigDecimal value) { + addCriterion("pay_price >", value, "payPrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("deduction_coupon_price >=", value, "deductionCouponPrice"); + public Criteria andPayPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("pay_price >=", value, "payPrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceLessThan(BigDecimal value) { - addCriterion("deduction_coupon_price <", value, "deductionCouponPrice"); + public Criteria andPayPriceLessThan(BigDecimal value) { + addCriterion("pay_price <", value, "payPrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceLessThanOrEqualTo(BigDecimal value) { - addCriterion("deduction_coupon_price <=", value, "deductionCouponPrice"); + public Criteria andPayPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("pay_price <=", value, "payPrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceIn(List values) { - addCriterion("deduction_coupon_price in", values, "deductionCouponPrice"); + public Criteria andPayPriceIn(List values) { + addCriterion("pay_price in", values, "payPrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceNotIn(List values) { - addCriterion("deduction_coupon_price not in", values, "deductionCouponPrice"); + public Criteria andPayPriceNotIn(List values) { + addCriterion("pay_price not in", values, "payPrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("deduction_coupon_price between", value1, value2, "deductionCouponPrice"); + public Criteria andPayPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("pay_price between", value1, value2, "payPrice"); return (Criteria) this; } - public Criteria andDeductionCouponPriceNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("deduction_coupon_price not between", value1, value2, "deductionCouponPrice"); + public Criteria andPayPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("pay_price not between", value1, value2, "payPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceIsNull() { - addCriterion("deduction_product_price is null"); + public Criteria andPayRealPriceIsNull() { + addCriterion("pay_real_price is null"); return (Criteria) this; } - public Criteria andDeductionProductPriceIsNotNull() { - addCriterion("deduction_product_price is not null"); + public Criteria andPayRealPriceIsNotNull() { + addCriterion("pay_real_price is not null"); return (Criteria) this; } - public Criteria andDeductionProductPriceEqualTo(BigDecimal value) { - addCriterion("deduction_product_price =", value, "deductionProductPrice"); + public Criteria andPayRealPriceEqualTo(BigDecimal value) { + addCriterion("pay_real_price =", value, "payRealPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceNotEqualTo(BigDecimal value) { - addCriterion("deduction_product_price <>", value, "deductionProductPrice"); + public Criteria andPayRealPriceNotEqualTo(BigDecimal value) { + addCriterion("pay_real_price <>", value, "payRealPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceGreaterThan(BigDecimal value) { - addCriterion("deduction_product_price >", value, "deductionProductPrice"); + public Criteria andPayRealPriceGreaterThan(BigDecimal value) { + addCriterion("pay_real_price >", value, "payRealPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("deduction_product_price >=", value, "deductionProductPrice"); + public Criteria andPayRealPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("pay_real_price >=", value, "payRealPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceLessThan(BigDecimal value) { - addCriterion("deduction_product_price <", value, "deductionProductPrice"); + public Criteria andPayRealPriceLessThan(BigDecimal value) { + addCriterion("pay_real_price <", value, "payRealPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceLessThanOrEqualTo(BigDecimal value) { - addCriterion("deduction_product_price <=", value, "deductionProductPrice"); + public Criteria andPayRealPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("pay_real_price <=", value, "payRealPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceIn(List values) { - addCriterion("deduction_product_price in", values, "deductionProductPrice"); + public Criteria andPayRealPriceIn(List values) { + addCriterion("pay_real_price in", values, "payRealPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceNotIn(List values) { - addCriterion("deduction_product_price not in", values, "deductionProductPrice"); + public Criteria andPayRealPriceNotIn(List values) { + addCriterion("pay_real_price not in", values, "payRealPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("deduction_product_price between", value1, value2, "deductionProductPrice"); + public Criteria andPayRealPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("pay_real_price between", value1, value2, "payRealPrice"); return (Criteria) this; } - public Criteria andDeductionProductPriceNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("deduction_product_price not between", value1, value2, "deductionProductPrice"); + public Criteria andPayRealPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("pay_real_price not between", value1, value2, "payRealPrice"); return (Criteria) this; } - public Criteria andPayGoldIsNull() { - addCriterion("pay_gold is null"); + public Criteria andOrderStatusIsNull() { + addCriterion("order_status is null"); return (Criteria) this; } - public Criteria andPayGoldIsNotNull() { - addCriterion("pay_gold is not null"); + public Criteria andOrderStatusIsNotNull() { + addCriterion("order_status is not null"); return (Criteria) this; } - public Criteria andPayGoldEqualTo(Integer value) { - addCriterion("pay_gold =", value, "payGold"); + public Criteria andOrderStatusEqualTo(Integer value) { + addCriterion("order_status =", value, "orderStatus"); return (Criteria) this; } - public Criteria andPayGoldNotEqualTo(Integer value) { - addCriterion("pay_gold <>", value, "payGold"); + public Criteria andOrderStatusNotEqualTo(Integer value) { + addCriterion("order_status <>", value, "orderStatus"); return (Criteria) this; } - public Criteria andPayGoldGreaterThan(Integer value) { - addCriterion("pay_gold >", value, "payGold"); + public Criteria andOrderStatusGreaterThan(Integer value) { + addCriterion("order_status >", value, "orderStatus"); return (Criteria) this; } - public Criteria andPayGoldGreaterThanOrEqualTo(Integer value) { - addCriterion("pay_gold >=", value, "payGold"); + public Criteria andOrderStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("order_status >=", value, "orderStatus"); return (Criteria) this; } - public Criteria andPayGoldLessThan(Integer value) { - addCriterion("pay_gold <", value, "payGold"); + public Criteria andOrderStatusLessThan(Integer value) { + addCriterion("order_status <", value, "orderStatus"); return (Criteria) this; } - public Criteria andPayGoldLessThanOrEqualTo(Integer value) { - addCriterion("pay_gold <=", value, "payGold"); + public Criteria andOrderStatusLessThanOrEqualTo(Integer value) { + addCriterion("order_status <=", value, "orderStatus"); return (Criteria) this; } - public Criteria andPayGoldIn(List values) { - addCriterion("pay_gold in", values, "payGold"); + public Criteria andOrderStatusIn(List values) { + addCriterion("order_status in", values, "orderStatus"); return (Criteria) this; } - public Criteria andPayGoldNotIn(List values) { - addCriterion("pay_gold not in", values, "payGold"); + public Criteria andOrderStatusNotIn(List values) { + addCriterion("order_status not in", values, "orderStatus"); return (Criteria) this; } - public Criteria andPayGoldBetween(Integer value1, Integer value2) { - addCriterion("pay_gold between", value1, value2, "payGold"); + public Criteria andOrderStatusBetween(Integer value1, Integer value2) { + addCriterion("order_status between", value1, value2, "orderStatus"); return (Criteria) this; } - public Criteria andPayGoldNotBetween(Integer value1, Integer value2) { - addCriterion("pay_gold not between", value1, value2, "payGold"); + public Criteria andOrderStatusNotBetween(Integer value1, Integer value2) { + addCriterion("order_status not between", value1, value2, "orderStatus"); return (Criteria) this; } - public Criteria andPayablePriceIsNull() { - addCriterion("payable_price is null"); + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); return (Criteria) this; } - public Criteria andPayablePriceIsNotNull() { - addCriterion("payable_price is not null"); + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); return (Criteria) this; } - public Criteria andPayablePriceEqualTo(BigDecimal value) { - addCriterion("payable_price =", value, "payablePrice"); + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); return (Criteria) this; } - public Criteria andPayablePriceNotEqualTo(BigDecimal value) { - addCriterion("payable_price <>", value, "payablePrice"); + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); return (Criteria) this; } - public Criteria andPayablePriceGreaterThan(BigDecimal value) { - addCriterion("payable_price >", value, "payablePrice"); + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); return (Criteria) this; } - public Criteria andPayablePriceGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("payable_price >=", value, "payablePrice"); + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); return (Criteria) this; } - public Criteria andPayablePriceLessThan(BigDecimal value) { - addCriterion("payable_price <", value, "payablePrice"); + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); return (Criteria) this; } - public Criteria andPayablePriceLessThanOrEqualTo(BigDecimal value) { - addCriterion("payable_price <=", value, "payablePrice"); + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); return (Criteria) this; } - public Criteria andPayablePriceIn(List values) { - addCriterion("payable_price in", values, "payablePrice"); + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); return (Criteria) this; } - public Criteria andPayablePriceNotIn(List values) { - addCriterion("payable_price not in", values, "payablePrice"); + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); return (Criteria) this; } - public Criteria andPayablePriceBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("payable_price between", value1, value2, "payablePrice"); + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); return (Criteria) this; } - public Criteria andPayablePriceNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("payable_price not between", value1, value2, "payablePrice"); + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); return (Criteria) this; } - public Criteria andPayPriceIsNull() { - addCriterion("pay_price is null"); + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); return (Criteria) this; } - public Criteria andPayPriceIsNotNull() { - addCriterion("pay_price is not null"); + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); return (Criteria) this; } - public Criteria andPayPriceEqualTo(BigDecimal value) { - addCriterion("pay_price =", value, "payPrice"); + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); return (Criteria) this; } - public Criteria andPayPriceNotEqualTo(BigDecimal value) { - addCriterion("pay_price <>", value, "payPrice"); + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); return (Criteria) this; } - public Criteria andPayPriceGreaterThan(BigDecimal value) { - addCriterion("pay_price >", value, "payPrice"); + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); return (Criteria) this; } - public Criteria andPayPriceGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("pay_price >=", value, "payPrice"); + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } - public Criteria andPayPriceLessThan(BigDecimal value) { - addCriterion("pay_price <", value, "payPrice"); + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); return (Criteria) this; } - public Criteria andPayPriceLessThanOrEqualTo(BigDecimal value) { - addCriterion("pay_price <=", value, "payPrice"); + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } - public Criteria andPayPriceIn(List values) { - addCriterion("pay_price in", values, "payPrice"); + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); return (Criteria) this; } - public Criteria andPayPriceNotIn(List values) { - addCriterion("pay_price not in", values, "payPrice"); + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } - public Criteria andPayPriceBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("pay_price between", value1, value2, "payPrice"); + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); return (Criteria) this; } - public Criteria andPayPriceNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("pay_price not between", value1, value2, "payPrice"); + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } - public Criteria andPayRealPriceIsNull() { - addCriterion("pay_real_price is null"); + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } - public Criteria andPayRealPriceIsNotNull() { - addCriterion("pay_real_price is not null"); + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } - public Criteria andPayRealPriceEqualTo(BigDecimal value) { - addCriterion("pay_real_price =", value, "payRealPrice"); + public Criteria andTotalDeductionPriceIsNull() { + addCriterion("total_deduction_price is null"); return (Criteria) this; } - public Criteria andPayRealPriceNotEqualTo(BigDecimal value) { - addCriterion("pay_real_price <>", value, "payRealPrice"); + public Criteria andTotalDeductionPriceIsNotNull() { + addCriterion("total_deduction_price is not null"); return (Criteria) this; } - public Criteria andPayRealPriceGreaterThan(BigDecimal value) { - addCriterion("pay_real_price >", value, "payRealPrice"); + public Criteria andTotalDeductionPriceEqualTo(BigDecimal value) { + addCriterion("total_deduction_price =", value, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andPayRealPriceGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("pay_real_price >=", value, "payRealPrice"); + public Criteria andTotalDeductionPriceNotEqualTo(BigDecimal value) { + addCriterion("total_deduction_price <>", value, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andPayRealPriceLessThan(BigDecimal value) { - addCriterion("pay_real_price <", value, "payRealPrice"); + public Criteria andTotalDeductionPriceGreaterThan(BigDecimal value) { + addCriterion("total_deduction_price >", value, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andPayRealPriceLessThanOrEqualTo(BigDecimal value) { - addCriterion("pay_real_price <=", value, "payRealPrice"); + public Criteria andTotalDeductionPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("total_deduction_price >=", value, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andPayRealPriceIn(List values) { - addCriterion("pay_real_price in", values, "payRealPrice"); + public Criteria andTotalDeductionPriceLessThan(BigDecimal value) { + addCriterion("total_deduction_price <", value, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andPayRealPriceNotIn(List values) { - addCriterion("pay_real_price not in", values, "payRealPrice"); + public Criteria andTotalDeductionPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("total_deduction_price <=", value, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andPayRealPriceBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("pay_real_price between", value1, value2, "payRealPrice"); + public Criteria andTotalDeductionPriceIn(List values) { + addCriterion("total_deduction_price in", values, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andPayRealPriceNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("pay_real_price not between", value1, value2, "payRealPrice"); + public Criteria andTotalDeductionPriceNotIn(List values) { + addCriterion("total_deduction_price not in", values, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andOrderStatusIsNull() { - addCriterion("order_status is null"); + public Criteria andTotalDeductionPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("total_deduction_price between", value1, value2, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andOrderStatusIsNotNull() { - addCriterion("order_status is not null"); + public Criteria andTotalDeductionPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("total_deduction_price not between", value1, value2, "totalDeductionPrice"); return (Criteria) this; } - public Criteria andOrderStatusEqualTo(Integer value) { - addCriterion("order_status =", value, "orderStatus"); + public Criteria andDeductionCouponPriceIsNull() { + addCriterion("deduction_coupon_price is null"); return (Criteria) this; } - public Criteria andOrderStatusNotEqualTo(Integer value) { - addCriterion("order_status <>", value, "orderStatus"); + public Criteria andDeductionCouponPriceIsNotNull() { + addCriterion("deduction_coupon_price is not null"); return (Criteria) this; } - public Criteria andOrderStatusGreaterThan(Integer value) { - addCriterion("order_status >", value, "orderStatus"); + public Criteria andDeductionCouponPriceEqualTo(BigDecimal value) { + addCriterion("deduction_coupon_price =", value, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andOrderStatusGreaterThanOrEqualTo(Integer value) { - addCriterion("order_status >=", value, "orderStatus"); + public Criteria andDeductionCouponPriceNotEqualTo(BigDecimal value) { + addCriterion("deduction_coupon_price <>", value, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andOrderStatusLessThan(Integer value) { - addCriterion("order_status <", value, "orderStatus"); + public Criteria andDeductionCouponPriceGreaterThan(BigDecimal value) { + addCriterion("deduction_coupon_price >", value, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andOrderStatusLessThanOrEqualTo(Integer value) { - addCriterion("order_status <=", value, "orderStatus"); + public Criteria andDeductionCouponPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("deduction_coupon_price >=", value, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andOrderStatusIn(List values) { - addCriterion("order_status in", values, "orderStatus"); + public Criteria andDeductionCouponPriceLessThan(BigDecimal value) { + addCriterion("deduction_coupon_price <", value, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andOrderStatusNotIn(List values) { - addCriterion("order_status not in", values, "orderStatus"); + public Criteria andDeductionCouponPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("deduction_coupon_price <=", value, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andOrderStatusBetween(Integer value1, Integer value2) { - addCriterion("order_status between", value1, value2, "orderStatus"); + public Criteria andDeductionCouponPriceIn(List values) { + addCriterion("deduction_coupon_price in", values, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andOrderStatusNotBetween(Integer value1, Integer value2) { - addCriterion("order_status not between", value1, value2, "orderStatus"); + public Criteria andDeductionCouponPriceNotIn(List values) { + addCriterion("deduction_coupon_price not in", values, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andRemarksIsNull() { - addCriterion("remarks is null"); + public Criteria andDeductionCouponPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("deduction_coupon_price between", value1, value2, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andRemarksIsNotNull() { - addCriterion("remarks is not null"); + public Criteria andDeductionCouponPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("deduction_coupon_price not between", value1, value2, "deductionCouponPrice"); return (Criteria) this; } - public Criteria andRemarksEqualTo(String value) { - addCriterion("remarks =", value, "remarks"); + public Criteria andDeductionProductPriceIsNull() { + addCriterion("deduction_product_price is null"); return (Criteria) this; } - public Criteria andRemarksNotEqualTo(String value) { - addCriterion("remarks <>", value, "remarks"); + public Criteria andDeductionProductPriceIsNotNull() { + addCriterion("deduction_product_price is not null"); return (Criteria) this; } - public Criteria andRemarksGreaterThan(String value) { - addCriterion("remarks >", value, "remarks"); + public Criteria andDeductionProductPriceEqualTo(BigDecimal value) { + addCriterion("deduction_product_price =", value, "deductionProductPrice"); return (Criteria) this; } - public Criteria andRemarksGreaterThanOrEqualTo(String value) { - addCriterion("remarks >=", value, "remarks"); + public Criteria andDeductionProductPriceNotEqualTo(BigDecimal value) { + addCriterion("deduction_product_price <>", value, "deductionProductPrice"); return (Criteria) this; } - public Criteria andRemarksLessThan(String value) { - addCriterion("remarks <", value, "remarks"); + public Criteria andDeductionProductPriceGreaterThan(BigDecimal value) { + addCriterion("deduction_product_price >", value, "deductionProductPrice"); return (Criteria) this; } - public Criteria andRemarksLessThanOrEqualTo(String value) { - addCriterion("remarks <=", value, "remarks"); + public Criteria andDeductionProductPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("deduction_product_price >=", value, "deductionProductPrice"); return (Criteria) this; } - public Criteria andRemarksLike(String value) { - addCriterion("remarks like", value, "remarks"); + public Criteria andDeductionProductPriceLessThan(BigDecimal value) { + addCriterion("deduction_product_price <", value, "deductionProductPrice"); return (Criteria) this; } - public Criteria andRemarksNotLike(String value) { - addCriterion("remarks not like", value, "remarks"); + public Criteria andDeductionProductPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("deduction_product_price <=", value, "deductionProductPrice"); return (Criteria) this; } - public Criteria andRemarksIn(List values) { - addCriterion("remarks in", values, "remarks"); + public Criteria andDeductionProductPriceIn(List values) { + addCriterion("deduction_product_price in", values, "deductionProductPrice"); return (Criteria) this; } - public Criteria andRemarksNotIn(List values) { - addCriterion("remarks not in", values, "remarks"); + public Criteria andDeductionProductPriceNotIn(List values) { + addCriterion("deduction_product_price not in", values, "deductionProductPrice"); return (Criteria) this; } - public Criteria andRemarksBetween(String value1, String value2) { - addCriterion("remarks between", value1, value2, "remarks"); + public Criteria andDeductionProductPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("deduction_product_price between", value1, value2, "deductionProductPrice"); return (Criteria) this; } - public Criteria andRemarksNotBetween(String value1, String value2) { - addCriterion("remarks not between", value1, value2, "remarks"); + public Criteria andDeductionProductPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("deduction_product_price not between", value1, value2, "deductionProductPrice"); return (Criteria) this; } - public Criteria andCreateTimeIsNull() { - addCriterion("create_time is null"); + public Criteria andPayGoldIsNull() { + addCriterion("pay_gold is null"); return (Criteria) this; } - public Criteria andCreateTimeIsNotNull() { - addCriterion("create_time is not null"); + public Criteria andPayGoldIsNotNull() { + addCriterion("pay_gold is not null"); return (Criteria) this; } - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("create_time =", value, "createTime"); + public Criteria andPayGoldEqualTo(Integer value) { + addCriterion("pay_gold =", value, "payGold"); return (Criteria) this; } - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("create_time <>", value, "createTime"); + public Criteria andPayGoldNotEqualTo(Integer value) { + addCriterion("pay_gold <>", value, "payGold"); return (Criteria) this; } - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("create_time >", value, "createTime"); + public Criteria andPayGoldGreaterThan(Integer value) { + addCriterion("pay_gold >", value, "payGold"); return (Criteria) this; } - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("create_time >=", value, "createTime"); + public Criteria andPayGoldGreaterThanOrEqualTo(Integer value) { + addCriterion("pay_gold >=", value, "payGold"); return (Criteria) this; } - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("create_time <", value, "createTime"); + public Criteria andPayGoldLessThan(Integer value) { + addCriterion("pay_gold <", value, "payGold"); return (Criteria) this; } - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("create_time <=", value, "createTime"); + public Criteria andPayGoldLessThanOrEqualTo(Integer value) { + addCriterion("pay_gold <=", value, "payGold"); return (Criteria) this; } - public Criteria andCreateTimeIn(List values) { - addCriterion("create_time in", values, "createTime"); + public Criteria andPayGoldIn(List values) { + addCriterion("pay_gold in", values, "payGold"); return (Criteria) this; } - public Criteria andCreateTimeNotIn(List values) { - addCriterion("create_time not in", values, "createTime"); + public Criteria andPayGoldNotIn(List values) { + addCriterion("pay_gold not in", values, "payGold"); return (Criteria) this; } - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("create_time between", value1, value2, "createTime"); + public Criteria andPayGoldBetween(Integer value1, Integer value2) { + addCriterion("pay_gold between", value1, value2, "payGold"); return (Criteria) this; } - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("create_time not between", value1, value2, "createTime"); + public Criteria andPayGoldNotBetween(Integer value1, Integer value2) { + addCriterion("pay_gold not between", value1, value2, "payGold"); return (Criteria) this; } @@ -2846,6 +2706,206 @@ public class HighOrderExample { return (Criteria) this; } + public Criteria andCompanyNameIsNull() { + addCriterion("company_name is null"); + return (Criteria) this; + } + + public Criteria andCompanyNameIsNotNull() { + addCriterion("company_name is not null"); + return (Criteria) this; + } + + public Criteria andCompanyNameEqualTo(String value) { + addCriterion("company_name =", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotEqualTo(String value) { + addCriterion("company_name <>", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThan(String value) { + addCriterion("company_name >", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThanOrEqualTo(String value) { + addCriterion("company_name >=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThan(String value) { + addCriterion("company_name <", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThanOrEqualTo(String value) { + addCriterion("company_name <=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLike(String value) { + addCriterion("company_name like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotLike(String value) { + addCriterion("company_name not like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameIn(List values) { + addCriterion("company_name in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotIn(List values) { + addCriterion("company_name not in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameBetween(String value1, String value2) { + addCriterion("company_name between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotBetween(String value1, String value2) { + addCriterion("company_name not between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andPromoteCodeIsNull() { + addCriterion("promote_code is null"); + return (Criteria) this; + } + + public Criteria andPromoteCodeIsNotNull() { + addCriterion("promote_code is not null"); + return (Criteria) this; + } + + public Criteria andPromoteCodeEqualTo(String value) { + addCriterion("promote_code =", value, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeNotEqualTo(String value) { + addCriterion("promote_code <>", value, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeGreaterThan(String value) { + addCriterion("promote_code >", value, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeGreaterThanOrEqualTo(String value) { + addCriterion("promote_code >=", value, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeLessThan(String value) { + addCriterion("promote_code <", value, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeLessThanOrEqualTo(String value) { + addCriterion("promote_code <=", value, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeLike(String value) { + addCriterion("promote_code like", value, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeNotLike(String value) { + addCriterion("promote_code not like", value, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeIn(List values) { + addCriterion("promote_code in", values, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeNotIn(List values) { + addCriterion("promote_code not in", values, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeBetween(String value1, String value2) { + addCriterion("promote_code between", value1, value2, "promoteCode"); + return (Criteria) this; + } + + public Criteria andPromoteCodeNotBetween(String value1, String value2) { + addCriterion("promote_code not between", value1, value2, "promoteCode"); + return (Criteria) this; + } + + public Criteria andSecUserIdIsNull() { + addCriterion("sec_user_id is null"); + return (Criteria) this; + } + + public Criteria andSecUserIdIsNotNull() { + addCriterion("sec_user_id is not null"); + return (Criteria) this; + } + + public Criteria andSecUserIdEqualTo(Long value) { + addCriterion("sec_user_id =", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdNotEqualTo(Long value) { + addCriterion("sec_user_id <>", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdGreaterThan(Long value) { + addCriterion("sec_user_id >", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("sec_user_id >=", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdLessThan(Long value) { + addCriterion("sec_user_id <", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdLessThanOrEqualTo(Long value) { + addCriterion("sec_user_id <=", value, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdIn(List values) { + addCriterion("sec_user_id in", values, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdNotIn(List values) { + addCriterion("sec_user_id not in", values, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdBetween(Long value1, Long value2) { + addCriterion("sec_user_id between", value1, value2, "secUserId"); + return (Criteria) this; + } + + public Criteria andSecUserIdNotBetween(Long value1, Long value2) { + addCriterion("sec_user_id not between", value1, value2, "secUserId"); + return (Criteria) this; + } + public Criteria andExt1IsNull() { addCriterion("ext_1 is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/enum_type/ApproveType.java b/hai-service/src/main/java/com/hai/enum_type/ApproveType.java index c14feed9..b4b8760f 100644 --- a/hai-service/src/main/java/com/hai/enum_type/ApproveType.java +++ b/hai-service/src/main/java/com/hai/enum_type/ApproveType.java @@ -9,7 +9,7 @@ public enum ApproveType { UP_SHELF_APPROVE(1, "卡卷上架审批"), COUPON_PRICE_APPROVE(2, "卡卷价格审批"), COUPON_DISTRIBUTE_APPROVE(3, "卡卷分发审批"), - GOODS_UP_SHELF_APPROVE(4, "卡卷分发审批"), + GOODS_UP_SHELF_APPROVE(4, "实物审批"), ; private Integer type; diff --git a/hai-service/src/main/java/com/hai/goods/model/GoodsModel.java b/hai-service/src/main/java/com/hai/goods/model/GoodsModel.java index 23da907d..af2182f6 100644 --- a/hai-service/src/main/java/com/hai/goods/model/GoodsModel.java +++ b/hai-service/src/main/java/com/hai/goods/model/GoodsModel.java @@ -1,9 +1,11 @@ package com.hai.goods.model; import com.hai.entity.GoodsDetail; +import com.hai.entity.GoodsSku; import java.io.Serializable; import java.math.BigDecimal; +import java.util.List; public class GoodsModel extends GoodsDetail { @@ -14,6 +16,8 @@ public class GoodsModel extends GoodsDetail { private Boolean whetherMultiple; + private List goodsSkus; + public BigDecimal getPrice() { return price; @@ -38,4 +42,12 @@ public class GoodsModel extends GoodsDetail { public void setWhetherMultiple(Boolean whetherMultiple) { this.whetherMultiple = whetherMultiple; } + + public List getGoodsSkus() { + return goodsSkus; + } + + public void setGoodsSkus(List goodsSkus) { + this.goodsSkus = goodsSkus; + } } diff --git a/hai-service/src/main/java/com/hai/goods/service/GoodsDetailService.java b/hai-service/src/main/java/com/hai/goods/service/GoodsDetailService.java index 5f774f33..ba9d1983 100644 --- a/hai-service/src/main/java/com/hai/goods/service/GoodsDetailService.java +++ b/hai-service/src/main/java/com/hai/goods/service/GoodsDetailService.java @@ -3,6 +3,7 @@ package com.hai.goods.service; import com.hai.entity.ApiMchProduct; import com.hai.entity.GoodsDetail; import com.hai.entity.GoodsLogistics; +import com.hai.entity.HighApprove; import java.util.List; import java.util.Map; @@ -57,4 +58,6 @@ public interface GoodsDetailService { */ GoodsDetail findGoodsDetailById(Long id); + void upShelfApproveResult(HighApprove highApprove); + } diff --git a/hai-service/src/main/java/com/hai/goods/service/GoodsPresentService.java b/hai-service/src/main/java/com/hai/goods/service/GoodsPresentService.java index 55bd9b4e..1d2f2ad7 100644 --- a/hai-service/src/main/java/com/hai/goods/service/GoodsPresentService.java +++ b/hai-service/src/main/java/com/hai/goods/service/GoodsPresentService.java @@ -2,6 +2,8 @@ package com.hai.goods.service; import com.hai.entity.GoodsPresent; import com.hai.entity.GoodsPresentRecord; +import com.hai.entity.HighChildOrder; +import com.hai.entity.HighOrder; import java.util.List; import java.util.Map; @@ -88,4 +90,16 @@ public interface GoodsPresentService { * @Return java.util.List */ List getPresentRecord(Map map); + + void presentUser(HighOrder order , HighChildOrder highChildOrder); + + /** + * @Author Sum1Dream + * @Name preGiveUser + * @Description // 预送用户卡券 + * @Date 14:45 2023/5/10 + * @Param [order, highChildOrder] + * @Return void + */ + void preGiveUser( HighChildOrder highChildOrder); } diff --git a/hai-service/src/main/java/com/hai/goods/service/impl/GoodsDetailServiceImpl.java b/hai-service/src/main/java/com/hai/goods/service/impl/GoodsDetailServiceImpl.java index d15c2ee9..67dc1b0e 100644 --- a/hai-service/src/main/java/com/hai/goods/service/impl/GoodsDetailServiceImpl.java +++ b/hai-service/src/main/java/com/hai/goods/service/impl/GoodsDetailServiceImpl.java @@ -1,16 +1,17 @@ package com.hai.goods.service.impl; +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; import com.hai.dao.GoodsDetailMapper; import com.hai.dao.GoodsLogisticsMapper; -import com.hai.entity.ApiMerchantsExample; -import com.hai.entity.GoodsDetail; -import com.hai.entity.GoodsDetailExample; -import com.hai.entity.GoodsLogistics; +import com.hai.entity.*; import com.hai.goods.service.GoodsDetailService; import org.apache.commons.collections4.MapUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.Date; import java.util.List; import java.util.Map; @@ -21,9 +22,6 @@ public class GoodsDetailServiceImpl implements GoodsDetailService { @Resource private GoodsDetailMapper goodsDetailMapper; - @Resource - private GoodsLogisticsMapper logisticsMapper; - @Override public void insertGoodsDetail(GoodsDetail goodsDetail) { goodsDetailMapper.insert(goodsDetail); @@ -43,12 +41,18 @@ public class GoodsDetailServiceImpl implements GoodsDetailService { if (MapUtils.getString(map, "title") != null) { criteria.andNameLike("%" + MapUtils.getString(map, "title") + "%"); } + if (MapUtils.getString(map, "goodsLabel") != null) { + criteria.andGoodsLabelLike("%" + MapUtils.getString(map, "goodsLabel") + "%"); + } if (MapUtils.getLong(map, "goodsType") != null) { criteria.andGoodsTypeEqualTo(MapUtils.getLong(map, "goodsType") ); } if (MapUtils.getLong(map, "opId") != null) { criteria.andOpIdEqualTo(MapUtils.getLong(map, "opId") ); } + if (MapUtils.getLong(map, "companyId") != null) { + criteria.andCompanyIdEqualTo(MapUtils.getLong(map, "companyId") ); + } if (MapUtils.getInteger(map, "status") != null) { criteria.andStatusEqualTo(MapUtils.getInteger(map, "status") ); } else { @@ -64,4 +68,26 @@ public class GoodsDetailServiceImpl implements GoodsDetailService { return goodsDetailMapper.selectByPrimaryKey(id); } + @Override + public void upShelfApproveResult(HighApprove highApprove) { + GoodsDetail goodsDetail = findGoodsDetailById(highApprove.getObjectId()); + if (goodsDetail == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相关信息!"); + } + + if (goodsDetail.getStatus() != 3) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "状态错误!"); + } + + // 状态: 1:待审批 2:驳回 3:通过 + if (highApprove.getStatus() == 2) { + goodsDetail.setStatus(2); + } + if (highApprove.getStatus() == 3) { + goodsDetail.setStatus(1); + } + + goodsDetail.setUpdateTime(new Date()); + updateGoodsDetail(goodsDetail); + } } diff --git a/hai-service/src/main/java/com/hai/goods/service/impl/GoodsPresentServiceImpl.java b/hai-service/src/main/java/com/hai/goods/service/impl/GoodsPresentServiceImpl.java index 9fb901a5..55d74237 100644 --- a/hai-service/src/main/java/com/hai/goods/service/impl/GoodsPresentServiceImpl.java +++ b/hai-service/src/main/java/com/hai/goods/service/impl/GoodsPresentServiceImpl.java @@ -1,16 +1,19 @@ package com.hai.goods.service.impl; +import com.hai.config.HuiLianTongConfig; import com.hai.dao.GoodsPresentMapper; import com.hai.dao.GoodsPresentRecordMapper; -import com.hai.entity.GoodsPresent; -import com.hai.entity.GoodsPresentExample; -import com.hai.entity.GoodsPresentRecord; -import com.hai.entity.GoodsRegionFreight; +import com.hai.entity.*; import com.hai.goods.service.GoodsPresentService; +import com.hai.service.HighCouponCodeService; +import com.hai.service.HighCouponService; +import com.hai.service.HighDiscountAgentCodeService; import org.apache.commons.collections4.MapUtils; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.Date; import java.util.List; import java.util.Map; @@ -23,6 +26,18 @@ public class GoodsPresentServiceImpl implements GoodsPresentService { @Resource private GoodsPresentRecordMapper goodsPresentRecordMapper; + @Resource + private GoodsPresentService goodsPresentService; + + @Resource + private HighCouponService highCouponService; + + @Resource + private HighCouponCodeService couponCodeService; + + @Resource + private HighDiscountAgentCodeService highDiscountAgentCodeService; + @Override public void insertPresent(GoodsPresent present) { goodsPresentMapper.insert(present); @@ -78,4 +93,94 @@ public class GoodsPresentServiceImpl implements GoodsPresentService { public List getPresentRecord(Map map) { return null; } + + @Override + public void presentUser(HighOrder order, HighChildOrder highChildOrder) { + + try { + // 赠送卡券or优惠券 + List goodsPresents = goodsPresentService.getPresentList(highChildOrder.getGoodsId()); + + if (goodsPresents.size() > 0) { + + for (GoodsPresent present : goodsPresents) { + GoodsPresentRecord presentRecord = new GoodsPresentRecord(); + presentRecord.setStatus("0"); + if (present.getType() == 1) { + HighCoupon coupon = highCouponService.getCouponById(present.getSourceId()); + if (coupon.getCouponSource() == 1 || coupon.getCouponSource() == 2 || coupon.getCouponSource() == 3) { + for (int i = 0; i < present.getNum(); i++) { + for (int j = 0; j < highChildOrder.getSaleCount(); j++) { + // 支付购买卡券 + couponCodeService.payCoupon(order,highChildOrder,coupon); + } + } + } + if (coupon.getCouponSource() == 4 || coupon.getCouponSource() == 5) { + for (int i = 0; i < present.getNum(); i++) { + // 支付购买卡券 + couponCodeService.payCoupon(order,highChildOrder,coupon); + } + } + } + if (present.getType() == 2) { + highDiscountAgentCodeService.giveDiscount(present.getSourceId() , ((long) present.getNum() * highChildOrder.getSaleCount()), order.getMemId()); + } + + presentRecord.setOrderNo(order.getOrderNo()); + presentRecord.setOrderId(order.getId()); + presentRecord.setChildOrderId(highChildOrder.getId()); + presentRecord.setCreateTime(new Date()); + presentRecord.setNum(present.getNum()*highChildOrder.getSaleCount()); + presentRecord.setUpdateTime(new Date()); + presentRecord.setType(present.getType()); + presentRecord.setStatus("1"); + presentRecord.setSourceId(present.getSourceId()); + presentRecord.setSourceName(present.getSourceName()); + presentRecord.setOpName("系统赠送"); + presentRecord.setPresentId(present.getId()); + + goodsPresentService.insertPresentRecord(presentRecord); + } + } + + } catch (Exception e) { + + } + } + + @Override + public void preGiveUser(HighChildOrder childOrder) { + + try { + + List goodsPresents = goodsPresentService.getPresentList(childOrder.getGoodsId()); + + if (goodsPresents.size() > 0) { + for (GoodsPresent present : goodsPresents) { + if (present.getType() == 1) { + HighCoupon coupon = highCouponService.getCouponById(present.getSourceId()); + if (coupon.getCouponSource() == 1 || coupon.getCouponSource() == 2 || coupon.getCouponSource() == 3) { + for (int i = 0; i < present.getNum(); i++) { + for (int j = 0; j < childOrder.getSaleCount(); j++) { + highCouponService.assignOrderStock(present.getSourceId(), childOrder.getChildOrderNo()); + } + } + } + if (coupon.getCouponSource() == 4) { + HuiLianTongConfig.recharge(childOrder.getChildOrderNo(), + childOrder.getSaleCount()*present.getNum(), + coupon.getCouponKey(), + childOrder.getMemPhone()); + } + + } + } + } + + } catch (Exception e) { + + } + + } } diff --git a/hai-service/src/main/java/com/hai/mobile/service/MobileHandleService.java b/hai-service/src/main/java/com/hai/mobile/service/MobileHandleService.java new file mode 100644 index 00000000..f17d57ed --- /dev/null +++ b/hai-service/src/main/java/com/hai/mobile/service/MobileHandleService.java @@ -0,0 +1,14 @@ +package com.hai.mobile.service; + +/** + * @serviceName MobileHandleService.java + * @author Sum1Dream + * @version 1.0.0 + * @Description // 话费业务处理 + * @createTime 11:09 2023/5/17 + **/ +public interface MobileHandleService { + + + +} diff --git a/hai-service/src/main/java/com/hai/mobile/service/impl/MobileHandleServiceImpl.java b/hai-service/src/main/java/com/hai/mobile/service/impl/MobileHandleServiceImpl.java new file mode 100644 index 00000000..1c4d734f --- /dev/null +++ b/hai-service/src/main/java/com/hai/mobile/service/impl/MobileHandleServiceImpl.java @@ -0,0 +1,6 @@ +package com.hai.mobile.service.impl; + +import com.hai.mobile.service.MobileHandleService; + +public class MobileHandleServiceImpl implements MobileHandleService { +} diff --git a/hai-service/src/main/java/com/hai/order/model/GoodsChildOrderExtModel.java b/hai-service/src/main/java/com/hai/order/model/GoodsChildOrderExtModel.java new file mode 100644 index 00000000..d81ac31c --- /dev/null +++ b/hai-service/src/main/java/com/hai/order/model/GoodsChildOrderExtModel.java @@ -0,0 +1,19 @@ +package com.hai.order.model; + +import com.hai.entity.HighChildOrder; + +public class GoodsChildOrderExtModel extends HighChildOrder { + + /** + * 1:待发货 2:已发货 3:配送中 4:已送达 5:已取消 6:退货中 7:已退货 8:待支付 0:删除'; + */ + private String logisticsStatus; + + public String getLogisticsStatus() { + return logisticsStatus; + } + + public void setLogisticsStatus(String logisticsStatus) { + this.logisticsStatus = logisticsStatus; + } +} diff --git a/hai-service/src/main/java/com/hai/order/service/OrderService.java b/hai-service/src/main/java/com/hai/order/service/OrderService.java index ed9ef88d..12f6df6d 100644 --- a/hai-service/src/main/java/com/hai/order/service/OrderService.java +++ b/hai-service/src/main/java/com/hai/order/service/OrderService.java @@ -69,6 +69,17 @@ public interface OrderService { */ HighOrder getOrderDetailByNo(String orderNo); + + /** + * @Author Sum1Dream + * @Name getOrderDetail + * @Description // 查询线上 + * @Date 18:29 2023/5/18 + * @Param [orderNo] + * @Return com.hai.entity.HighOrder + */ + HighOrder getOrderDetail(String orderNo); + /** * 根据子订单号查询子订单信息 * @param childOrderNo @@ -103,4 +114,14 @@ public interface OrderService { */ List phoneErrorOrder(); + + /** + * @Author Sum1Dream + * @Name getChildOrderList + * @Description // 查询子订单数量 + * @Date 15:54 2023/5/16 + * @Param [param] + * @Return java.util.List + */ + List getChildOrderList(Map param); } 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 2b28b6ba..736fd74f 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 @@ -53,14 +53,10 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { @Resource private CommonService commonService; - @Resource - private BsCompanyService companyService; - @Resource - private OrderService orderService; @Resource - private BsConfigService bsConfigService; + private BsCompanyService companyService; @Resource private SecConfigService secConfigService; @@ -77,8 +73,6 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { @Resource private HighMerchantStoreService storeService; - @Resource - private GoodsPresentService goodsPresentService; @Resource private HighMerchantService merchantService; @@ -138,6 +132,9 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { @Resource private GoodsSkuService goodsSkuService; + @Resource + private GoodsPresentService presentService; + @Resource private ShoppingCartService shoppingCartService; @@ -886,6 +883,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { childOrder.setPraiseStatus(0); childOrder.setCreateTime(new Date()); + // 生成充值订单 outRechargeOrder.setUserId(order.getMemId()); outRechargeOrder.setRechargeContent(rechargeContent); outRechargeOrder.setCompanyId(outRechargePrice.getCompanyId()); @@ -932,6 +930,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { childOrder.setGoodsType(OrderChildGoodsType.TYPE11.getNumber()); childOrder.setGoodsId(createOrderChild.getGoodsId()); childOrder.setGoodsName(goods.getName()); + childOrder.setSecUserId(goods.getOpId()); childOrder.setSkuId(createOrderChild.getSkuId()); childOrder.setGoodsSpecName(goodsSku.getName()); childOrder.setGoodsPrice(goodsSku.getOriginalPrice()); @@ -945,6 +944,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { childOrder.setTotalDeductionPrice(childOrder.getTotalPrice().subtract(childOrder.getTotalActualPrice())); childOrder.setPraiseStatus(0); childOrder.setCreateTime(new Date()); + childOrder.setExt5(goods.getOpId().toString()); if (createOrderChild.getShopCartId() != null) { shoppingCartService.deleteShoppingCart(createOrderChild.getShopCartId()); @@ -952,22 +952,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { goodsSkuService.decreaseStockNum(createOrderChild.getSkuId(), createOrderChild.getSaleCount()); - - List goodsPresents = goodsPresentService.getPresentList(childOrder.getGoodsId()); - - - if (goodsPresents.size() > 0) { - for (GoodsPresent present : goodsPresents) { - GoodsPresentRecord presentRecord = new GoodsPresentRecord(); - presentRecord.setStatus("0"); - if (present.getType() == 1) { - for (int i = 0; i < present.getNum(); i++) { - couponService.assignOrderStock(present.getSourceId(), childOrder.getChildOrderNo()); - } - } - - } - } + presentService.preGiveUser(childOrder); return childOrder; } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java index 9037f58e..737cb600 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java @@ -74,8 +74,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { @Resource private JinZhuJiaYouService jinZhuJiaYouService; - @Resource - private HighDiscountAgentCodeService highDiscountAgentCodeService; + @Resource private PayloService payloService; @@ -108,10 +107,9 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { private OutRechargeOrderService outRechargeOrderService; @Resource - private GoodsPresentService goodsPresentService; + private GoodsPresentService presentService; + - @Resource - private HighCouponService highCouponService; @Override public HighOrder orderPaySuccessHandle(String orderNo, OrderPayType payType, String paySerialNo, BigDecimal payRealPrice, HighUserCard userCard) { @@ -498,7 +496,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { * @Param [order] * @Return void */ - private void mobileRecharge(HighOrder order) throws Exception { + private void mobileRecharge(HighOrder order) { OutRechargeOrder outRechargeOrder = outRechargeOrderService.findByOrderNo(order.getOrderNo()); if (outRechargeOrder.getPayStatus() == null) { if (order.getProductType().equals(9)) { @@ -516,47 +514,12 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { * @Param [order] * @Return void */ - private void goodsRecharge(HighOrder order , HighChildOrder highChildOrder) throws Exception { + private void goodsRecharge(HighOrder order , HighChildOrder highChildOrder) { GoodsOrder goodsOrder = goodsOrderExtService.findGoodsOrder(order.getOrderNo()); goodsOrder.setUpdateTime(new Date()); goodsOrder.setStatus("1"); goodsOrderExtService.updateGoodsOrder(goodsOrder); - - // 赠送卡券or优惠券 - List goodsPresents = goodsPresentService.getPresentList(highChildOrder.getGoodsId()); - - if (goodsPresents.size() > 0) { - for (GoodsPresent present : goodsPresents) { - GoodsPresentRecord presentRecord = new GoodsPresentRecord(); - presentRecord.setStatus("0"); - if (present.getType() == 1) { - for (int i = 0; i < present.getNum(); i++) { - HighCoupon coupon = highCouponService.getCouponById(present.getSourceId()); - // 支付购买卡券 - couponCodeService.payCoupon(order,highChildOrder,coupon); - } - } - if (present.getType() == 2) { - highDiscountAgentCodeService.giveDiscount(present.getSourceId() , Long.valueOf(present.getNum()), order.getMemId()); - } - - presentRecord.setOrderNo(order.getOrderNo()); - presentRecord.setOrderId(order.getId()); - presentRecord.setChildOrderId(highChildOrder.getOrderId()); - presentRecord.setCreateTime(new Date()); - presentRecord.setNum(presentRecord.getNum()); - presentRecord.setUpdateTime(new Date()); - presentRecord.setType(present.getType()); - presentRecord.setStatus("1"); - presentRecord.setSourceId(present.getSourceId()); - presentRecord.setSourceName(present.getSourceName()); - presentRecord.setOpName("系统赠送"); - presentRecord.setPresentId(present.getId()); - - goodsPresentService.insertPresentRecord(presentRecord); - } - } - + presentService.presentUser(order , highChildOrder); } } 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 9f6dcfcd..c5e6e3ab 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 @@ -127,7 +127,7 @@ public class OrderServiceImpl implements OrderService { @Transactional( propagation= Propagation.REQUIRES_NEW, isolation = Isolation.READ_COMMITTED, - timeout = 10, + timeout = 20, rollbackFor = Exception.class) @Cached(cacheType = CacheType.REMOTE, name="order:", key = "#createOrderModel.orderNo", expire = 3600*24*30) // 缓存一个月 public HighOrder createOrder(CreateOrderModel createOrderModel) throws Exception { @@ -305,6 +305,7 @@ public class OrderServiceImpl implements OrderService { HighChildOrder childOrder = orderCreateHandleService.goods(order , child); childOrderList.add(childOrder); order.setProductType(OrderProductType.PRODUCT_TYPE12.getNumber()); + order.setSecUserId(childOrder.getId()); if (StringUtils.isBlank(order.getTitle())) { order.setTitle(childOrder.getGoodsName()); @@ -604,61 +605,68 @@ public class OrderServiceImpl implements OrderService { timeout = 25, rollbackFor = Exception.class) @CacheUpdate(name = "order:", key = "#order.orderNo", value = "#order") - public HighOrder refundOrder(HighOrder order, String remarks, OrderRefundOpUserType opUserType, Long opUserId, String opUserName) throws Exception { - if (!order.getOrderStatus().equals(OrderStatus.STATUS2.getNumber()) - && !order.getOrderStatus().equals(OrderStatus.STATUS3.getNumber())) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态错误"); - } - // 订单是否异常,订单没异常则需要校验产品业务是否支持退款 - if (order.getExceptionStatus().equals(false) - // 产品业务是否支付退款 - && (order.getProductType().equals(OrderProductType.PRODUCT_TYPE3.getNumber()) - || order.getProductType().equals(OrderProductType.PRODUCT_TYPE4.getNumber()) - || order.getProductType().equals(OrderProductType.PRODUCT_TYPE5.getNumber())) - ) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单无法退款!"); - } - - // 退款订单号 - String refundOrderNo = OrderUtil.generateRefundOrderNo(); + public HighOrder refundOrder(HighOrder order, String remarks, OrderRefundOpUserType opUserType, Long opUserId, String opUserName) { - // 创建退款 - order = orderRefundService.createOrderRefund(refundOrderNo, order, remarks, opUserType, opUserId, opUserName); + try { - for (HighChildOrder childOrder : order.getHighChildOrderList()) { - if (childOrder.getGiveawayType() == false) { - childOrder.setRefundRemarks(remarks); - childOrder.setRefundTime(new Date()); - childOrder.setChildOrderStatus(OrderChildStatus.STATUS4.getNumber()); + if (!order.getOrderStatus().equals(OrderStatus.STATUS2.getNumber()) + && !order.getOrderStatus().equals(OrderStatus.STATUS3.getNumber())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态错误"); + } + // 订单是否异常,订单没异常则需要校验产品业务是否支持退款 + if (order.getExceptionStatus().equals(false) + // 产品业务是否支付退款 + && (order.getProductType().equals(OrderProductType.PRODUCT_TYPE3.getNumber()) + || order.getProductType().equals(OrderProductType.PRODUCT_TYPE4.getNumber()) + || order.getProductType().equals(OrderProductType.PRODUCT_TYPE5.getNumber())) + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单无法退款!"); } - } + // 退款订单号 + String refundOrderNo = OrderUtil.generateRefundOrderNo(); - order.setSurplusRefundIntegral(0); - order.setSurplusRefundPrice(new BigDecimal("0")); - order.setRefundTime(new Date()); - order.setOrderStatus(OrderStatus.STATUS4.getNumber()); + // 创建退款 + order = orderRefundService.createOrderRefund(refundOrderNo, order, remarks, opUserType, opUserId, opUserName); - // 退回金额,原路返回 - RefundPriceModel refundPrice = orderRefundService.refundPrice(refundOrderNo - , order - , OrderPayType.getDataByType(order.getPayType()) - , order.getPayRealPrice() - , order.getPayGold()); - if (!refundPrice.getRefundSuccess()) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败,请稍后重试"); - } + for (HighChildOrder childOrder : order.getHighChildOrderList()) { + if (childOrder.getGiveawayType() == false) { + childOrder.setRefundRemarks(remarks); + childOrder.setRefundTime(new Date()); + childOrder.setChildOrderStatus(OrderChildStatus.STATUS4.getNumber()); + } - List refundList = orderRefundService.getRefundByRefundNo(refundOrderNo); - for (HighOrderRefund orderRefund : refundList) { - orderRefund.setRefundStatus(OrderRefundStatus.STATUS2.getNumber()); - orderRefund.setRefundTime(new Date()); - orderRefund.setThirdPartyRefundOrderNo(refundPrice.getThirdPartyRefundOrderNo()); - orderRefundService.update(orderRefund); + } - rocketMQTemplate.syncSend(OrderTopic.ORDER_TOPIC_REFUND_SUCCESS.getTopic(), orderRefund); + order.setSurplusRefundIntegral(0); + order.setSurplusRefundPrice(new BigDecimal("0")); + order.setRefundTime(new Date()); + order.setOrderStatus(OrderStatus.STATUS4.getNumber()); + + // 退回金额,原路返回 + RefundPriceModel refundPrice = orderRefundService.refundPrice(refundOrderNo + , order + , OrderPayType.getDataByType(order.getPayType()) + , order.getPayRealPrice() + , order.getPayGold()); + if (!refundPrice.getRefundSuccess()) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败,请稍后重试"); + } + + List refundList = orderRefundService.getRefundByRefundNo(refundOrderNo); + for (HighOrderRefund orderRefund : refundList) { + orderRefund.setRefundStatus(OrderRefundStatus.STATUS2.getNumber()); + orderRefund.setRefundTime(new Date()); + orderRefund.setThirdPartyRefundOrderNo(refundPrice.getThirdPartyRefundOrderNo()); + orderRefundService.update(orderRefund); + + rocketMQTemplate.syncSend(OrderTopic.ORDER_TOPIC_REFUND_SUCCESS.getTopic(), orderRefund); + } + return updateOrderData(order); + } catch (Exception e) { + return null; } - return updateOrderData(order); + } @Override @@ -748,6 +756,18 @@ public class OrderServiceImpl implements OrderService { return order; } + @Override + public HighOrder getOrderDetail(String orderNo) { + HighOrderExample orderExample = new HighOrderExample(); + orderExample.createCriteria().andOrderNoEqualTo(orderNo); + List orderList = orderMapper.selectByExample(orderExample); + if (orderList.size() == 0) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的订单号"); + } + + return orderList.get(0); + } + @Override public HighChildOrder getChildOrderByNo(String childOrderNo) { HighChildOrderExample childOrderExample = new HighChildOrderExample(); @@ -768,6 +788,10 @@ public class OrderServiceImpl implements OrderService { criteria.andMemIdEqualTo(MapUtils.getLong(param, "userId")); } + if (MapUtils.getBoolean(param, "exceptionStatus") != null) { + criteria.andExceptionStatusEqualTo(MapUtils.getBoolean(param, "exceptionStatus")); + } + if (MapUtils.getLong(param, "companyId") != null) { criteria.andCompanyIdEqualTo(MapUtils.getLong(param, "companyId")); } @@ -808,24 +832,27 @@ public class OrderServiceImpl implements OrderService { } if (MapUtils.getLong(param, "payTimeS") != null) { - criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "payTimeS"))); + criteria.andPayTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "payTimeS"))); } if (MapUtils.getLong(param, "payTimeE") != null) { - criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(param, "payTimeE"))); + criteria.andPayTimeLessThan(new Date(MapUtils.getLong(param, "payTimeE"))); } if (MapUtils.getLong(param, "finishTimeS") != null) { - criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "finishTimeS"))); + criteria.andFinishTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "finishTimeS"))); } if (MapUtils.getLong(param, "finishTimeE") != null) { - criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(param, "finishTimeE"))); + criteria.andFinishTimeLessThan(new Date(MapUtils.getLong(param, "finishTimeE"))); + } + + if (MapUtils.getLong(param, "refundTimeS") != null) { + criteria.andRefundTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "refundTimeS"))); } - if (StringUtils.isNotBlank(MapUtils.getString(param, "refundTimeS")) && StringUtils.isNotBlank(MapUtils.getString(param, "refundTimeE"))) { - criteria.andRefundTimeBetween( - DateUtil.format(MapUtils.getString(param, "refundTimeS"), "yyyy-MM-dd HH:mm:ss"), - DateUtil.format(MapUtils.getString(param, "refundTimeE"), "yyyy-MM-dd HH:mm:ss")); + if (MapUtils.getLong(param, "refundTimeE") != null) { + criteria.andRefundTimeLessThan(new Date(MapUtils.getLong(param, "refundTimeE"))); } + example.setOrderByClause("create_time desc"); return orderMapper.selectByExample(example); } @@ -845,4 +872,39 @@ public class OrderServiceImpl implements OrderService { public List phoneErrorOrder() { return orderMapper.phoneErrorOrder(); } + + @Override + public List getChildOrderList(Map param) { + + HighChildOrderExample example = new HighChildOrderExample(); + HighChildOrderExample.Criteria criteria = example.createCriteria(); + + if (MapUtils.getString(param, "orderNo") != null) { + criteria.andOrderNoEqualTo(MapUtils.getString(param, "orderNo")); + } + + if (MapUtils.getString(param, "childOrderNo") != null) { + criteria.andChildOrderNoEqualTo(MapUtils.getString(param, "childOrderNo")); + } + + if (MapUtils.getString(param, "memPhone") != null) { + criteria.andMemPhoneEqualTo(MapUtils.getString(param, "memPhone")); + } + if (MapUtils.getInteger(param, "status") != null) { + criteria.andChildOrderStatusEqualTo(MapUtils.getInteger(param, "status")); + } + if (MapUtils.getLong(param, "createTimeS") != null) { + criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS"))); + } + if (MapUtils.getLong(param, "createTimeE") != null) { + criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(param, "createTimeE"))); + } + if (MapUtils.getLong(param, "secUserId") != null) { + criteria.andSecUserIdEqualTo(MapUtils.getLong(param, "secUserId")); + } + example.setOrderByClause("create_time desc"); + + + return childOrderMapper.selectByExample(example); + } } diff --git a/hai-service/src/main/java/com/hai/order/topic/OrderTopic.java b/hai-service/src/main/java/com/hai/order/topic/OrderTopic.java index 93558014..d1f5438c 100644 --- a/hai-service/src/main/java/com/hai/order/topic/OrderTopic.java +++ b/hai-service/src/main/java/com/hai/order/topic/OrderTopic.java @@ -11,6 +11,7 @@ public enum OrderTopic { ORDER_TOPIC_CANCEL(ORDER_TOPIC.getTopic() + ":cancel", "订单取消"), ORDER_TOPIC_REFUND_SUCCESS(ORDER_TOPIC.getTopic() + ":refund-success", "订单退款成功业务"), ORDER_TOPIC_PROFIT_SHARING(ORDER_TOPIC.getTopic() + ":profit-sharing", "订单分账业务"), + MOBILE_TOPIC_PROFIT_RECHARGE(ORDER_TOPIC.getTopic() + ":mobile-recharge", "话费订单充值业务"), ; private String topic; 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 6e8a8611..a2b38dbb 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 @@ -51,13 +51,17 @@ public class OrderUtil { * @return * @throws Exception */ - public static String generateOrderNo() throws Exception { - // 5位随机数 + 1位线程生成数 - String randomNum = (new Random().nextInt(899999) + 10000) + IDGenerator.nextId(1); - // 生成订单号 - return DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + randomNum; - } + public static String generateOrderNo() { + try { + // 5位随机数 + 1位线程生成数 + String randomNum = (new Random().nextInt(8999) + 1000) + IDGenerator.nextId(1); + // 生成订单号 + return DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + randomNum; + } catch (Exception e) { + return null; + } + } /** * 生成子订单号 diff --git a/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java b/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java index b8ead430..1a834c3c 100644 --- a/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java +++ b/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java @@ -144,7 +144,7 @@ public interface OutRechargeOrderService { * @Param [rechargeOrder] * @Return void */ - void getPrepaidRechargeApi(OutRechargeOrder outRechargeOrder) throws Exception; + void getPrepaidRechargeApi(OutRechargeOrder outRechargeOrder); /** * @Author Sum1Dream @@ -197,7 +197,7 @@ public interface OutRechargeOrderService { * @Param [object] * @Return void */ - Integer getRechargeOrderLegality(OutRechargeChildOrder childOrder) throws Exception; + Integer getRechargeOrderLegality(OutRechargeChildOrder childOrder); /** * @Author Sum1Dream @@ -205,9 +205,11 @@ public interface OutRechargeOrderService { * @Description // 订单是否可以充值 * @Date 16:11 2023/3/28 * @Param [childOrder] - * @Return java.lang.Integer 1:满足继续充值条件 2:订单满足退款条件 3:订单不可以退款不可以继续充值 4:订单异常 5:订单充值完成 + * @Return java.lang.Integer 1:满足继续充值条件 2:订单满足退款条件 3:订单不可以退款不可以继续充值 4:订单异常 5:订单充值完成 6:充值订单号未查询到任何充值记录 */ - Integer orderWhetherRecharge(OutRechargeOrder rechargeOrder) throws Exception; + Integer orderWhetherRecharge(OutRechargeOrder rechargeOrder); OutRechargeChildOrder mobileChildOrderHandle(HighOrder highOrder , OutRechargeOrder outRechargeOrder); + + JSONObject prepaidRechargeOrderHandle(JSONObject object); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighApproveServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighApproveServiceImpl.java index 542d7fb3..ee7f2fb6 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighApproveServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighApproveServiceImpl.java @@ -7,6 +7,7 @@ import com.hai.common.exception.SysCode; import com.hai.dao.HighApproveMapper; import com.hai.entity.*; import com.hai.enum_type.ApproveType; +import com.hai.goods.service.GoodsDetailService; import com.hai.model.HighCouponModel; import com.hai.service.HighAgentService; import com.hai.service.HighApproveService; @@ -37,6 +38,9 @@ public class HighApproveServiceImpl implements HighApproveService { @Resource private HighCouponService highCouponService; + @Resource + private GoodsDetailService goodsDetailService; + @Override @Transactional(propagation= Propagation.REQUIRES_NEW ,rollbackFor = Exception.class) @@ -82,6 +86,10 @@ public class HighApproveServiceImpl implements HighApproveService { if (highApprove.getObjectType().equals(ApproveType.COUPON_DISTRIBUTE_APPROVE.getType())) { highCouponService.distributeApprove(highApprove); } + if (highApprove.getObjectType().equals(ApproveType.GOODS_UP_SHELF_APPROVE.getType())) { + goodsDetailService.upShelfApproveResult(highApprove); + } + updateApprove(highApprove); } @@ -102,6 +110,9 @@ public class HighApproveServiceImpl implements HighApproveService { if (MapUtils.getInteger(map, "objectId") != null) { criteria.andObjectTypeEqualTo(MapUtils.getInteger(map, "objectId")); } + if (MapUtils.getInteger(map, "companyId") != null) { + criteria.andExt1EqualTo(MapUtils.getString(map, "companyId")); + } if (MapUtils.getString(map, "objectName") != null) { criteria.andObjectNameLike("%" + MapUtils.getString(map, "objectName") + "%"); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java index 5d56d5c2..1d18959a 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java @@ -329,7 +329,7 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService { if (coupon.getCouponSource().equals(4)) { // 推送给汇联通 JSONObject returnParam = HuiLianTongConfig.costRechargeOrder(childOrder.getChannelOrderNo()); - if (returnParam != null && returnParam.getString("respCode").equals("0000")) { + if (returnParam.getString("respCode").equals("0000")) { // 解密 JSONObject jsonObject = HuiLianTongUnionCardConfig.resolveResponse(returnParam.getString("data")); JSONArray dataArray = JSONObject.parseObject(jsonObject.getString("data"), JSONArray.class); @@ -362,10 +362,10 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService { } } else if (coupon.getCouponSource().equals(5)) { // 预发码 - JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(coupon.getCouponKey(), order.getOrderNo(), childOrder.getSaleCount(), order.getMemPhone()); + JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(coupon.getCouponKey(), childOrder.getChildOrderNo(), childOrder.getSaleCount(), order.getMemPhone()); if (preSendCoupon.getInteger("status").equals(1)) { // 给用户发码 - JSONObject response = ChongQingCNPCService.sendCNPCTicket(coupon.getCouponKey(), order.getOrderNo(), childOrder.getSaleCount(), order.getMemPhone()); + JSONObject response = ChongQingCNPCService.sendCNPCTicket(coupon.getCouponKey(), childOrder.getChildOrderNo(), childOrder.getSaleCount(), order.getMemPhone()); JSONObject couponDetail = response.getJSONObject("ticketDetail"); JSONArray codeList = response.getJSONArray("codeList"); for (Object data : codeList) { diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java index 3b0d2322..ac863337 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java @@ -325,6 +325,10 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe highDiscountUserRel.setStatus(1); highDiscountUserRel.setCreateTime(new Date()); highDiscountUserRel.setDiscountCompanyId(discount.getCompanyId()); + highDiscountUserRel.setDiscountUseScope(discount.getUseScope()); + highDiscountUserRel.setDiscountUsingRange(discount.getUsingRange()); + highDiscountUserRel.setDiscountCondition(discount.getDiscountCondition()); + highDiscountUserRel.setDiscountType(discount.getDiscountType()); highDiscountUserRel.setDiscountImg(discount.getDiscountImg()); highDiscountUserRel.setDiscountName(discount.getDiscountName()); highDiscountUserRel.setDiscountCondition(discount.getDiscountCondition()); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGoldRecServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGoldRecServiceImpl.java index 6ddff44c..a010ea19 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGoldRecServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGoldRecServiceImpl.java @@ -59,6 +59,9 @@ public class HighGoldRecServiceImpl implements HighGoldRecService { if (MapUtils.getLong(map, "resId") != null) { criteria.andResIdEqualTo(MapUtils.getLong(map, "resId")); } + if (MapUtils.getString(map, "resOrderNo") != null) { + criteria.andResOrderNoEqualTo(MapUtils.getString(map, "resOrderNo")); + } if (MapUtils.getLong(map , "createTimeS") != null) { criteria.andCreateTimeBetween(new Date(MapUtils.getLong(map , "createTimeS")) , new Date(MapUtils.getLong(map , "createTimeE"))); diff --git a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java index 9833f215..02e124d6 100644 --- a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java @@ -17,6 +17,7 @@ import com.hai.entity.*; import com.hai.enum_type.*; import com.hai.model.*; import com.hai.order.service.OrderService; +import com.hai.order.topic.OrderTopic; import com.hai.order.type.OrderChildStatus; import com.hai.order.type.OrderPayType; import com.hai.order.type.OrderRefundOpUserType; @@ -26,6 +27,7 @@ import com.hai.service.*; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.rocketmq.spring.core.RocketMQTemplate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -50,6 +52,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { @Resource private OutRechargeOrderMapper outRechargeOrderMapper; + @Resource + private RocketMQTemplate rocketMQTemplate; + @Resource private OutRechargeOrderMapperExt outRechargeOrderMapperExt; @@ -394,8 +399,153 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { } + + @Override - public void getPrepaidRechargeApi(OutRechargeOrder outRechargeOrder) throws Exception { + public void prepaidRechargeHandle(OutRechargeOrder outRechargeOrder){ + + String key = "recharge_" + outRechargeOrder.getId(); + + try { + + // 分布式锁占坑 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(key, outRechargeOrder.getOrderNo()); + + if(Boolean.TRUE.equals(lock)) { + // 加锁成功,处理业务 + // 判断订单是否可以继续充值 1:满足继续充值条件 2:订单满足退款条件 3:订单不可以退款不可以继续充值 4:订单存在多个充值订单 5:订单充值完成 6:充值订单号未查询到任何充值记录 + int orderStatus = orderWhetherRecharge(outRechargeOrder); + log.info("处理话费" + outRechargeOrder.getOrderNo() + "订单状态:" + orderStatus); + if (orderStatus == 1) { + getPrepaidRechargeApi(outRechargeOrder); + } + if (orderStatus == 2) { + refundOrder(outRechargeOrder.getId()); + } + if (orderStatus == 4) { + HighOrder highOrder = highOrderService.getOrderByOrderNo(outRechargeOrder.getOrderNo()); + highOrder.setExceptionStatus(true); + highOrder.setExceptionContent("订单存在多个充值订单"); + highOrderService.updateOrder(highOrder); + } + if (orderStatus == 6) { + HighOrder highOrder = highOrderService.getOrderByOrderNo(outRechargeOrder.getOrderNo()); + highOrder.setExceptionStatus(true); + highOrder.setExceptionContent("充值订单号未查询到任何充值记录"); + highOrderService.updateOrder(highOrder); + } + if (orderStatus == 5) { + completeOrder(outRechargeOrder.getId()); + } + } else { + // 加锁失败,重试 + Thread.sleep(100); + prepaidRechargeHandle(outRechargeOrder); + } + + + } catch (Exception e) { + e.printStackTrace(); + } finally { + // 删除key,释放锁 + redisTemplate.delete(key); + } + + + } + +// @Override +// public void getPrepaidRechargeApi(OutRechargeOrder outRechargeOrder) { +// +// JSONObject object = new JSONObject(); +// object.put("rechargePrice" , outRechargeOrder.getRechargePrice()); +// object.put("rechargeMobile" , outRechargeOrder.getRechargeContent()); +// object.put("productId" , outRechargeOrder.getGoodsId()); +// object.put("parentOrderId" , outRechargeOrder.getId()); +// +// // 判断参数是否为空 +// if ( +// object.getBigDecimal("rechargePrice") == null || +// object.getString("rechargeMobile") == null || +// object.getInteger("productId") == null || +// object.getLong("parentOrderId") == null +// ) { +// throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); +// } +// +// // 定义子订单对象 +// OutRechargeChildOrder childOrder = new OutRechargeChildOrder(); +// +// // 补充下单参数 +// object = prepaidRechargeOrderHandle(object); +// +// // 补充子订单参数 +// childOrder.setParentOrderId(object.getLong("parentOrderId")); +// childOrder.setRechargePlatform(object.getInteger("rechargePlatform")); +// childOrder.setStatus(102); +// childOrder.setOrderNo("CZ" + OrderUtil.generateOrderNo()); +// childOrder.setUpdateTime(new Date()); +// childOrder.setCreateTime(new Date()); +// +// outRechargeChildOrderService.insertOrder(childOrder); +// +// // -1 取消,0充值中 ,1充值成功,2充值失败,3部分成功 +// Integer status = outRechargeOrderService.getRechargeOrderLegality(childOrder); +// +// if (status == 2 || status == -1) { +// // 补充下单参数 +// object = outRechargeOrderService.prepaidRechargeOrderHandle(object); +// +// // 尖椒充值 +// if (object.getInteger("rechargePlatform") == 1) { +// object.put("out_order_id", childOrder.getOrderNo()); +// object.put("amount", object.getBigDecimal("rechargePrice")); +// object.put("mobile", object.getString("rechargeMobile")); +// object.put("notifyUrl", CommonSysConst.getSysConfig().getJjNotifyUrl()); +// JSONObject returnObject = RechargeConfig.rechargeOrderByJj(object); +// childOrder.setExt1(returnObject.toJSONString()); +// } +// +// // 龙阅 +// if (object.getInteger("rechargePlatform") == 2) { +// +// if (object.getString("code") == null) { +// throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); +// } +// +// object.put("out_trade_num", childOrder.getOrderNo()); +// object.put("product_id", object.getString("code")); +// object.put("mobile", object.getString("rechargeMobile")); +// object.put("notifyUrl", CommonSysConst.getSysConfig().getLyNotifyUrl()); +// JSONObject returnObject = RechargeConfig.rechargeOrderByLy(object); +// childOrder.setExt1(returnObject.toJSONString()); +// } +// +// // 畅停充值 +// if (object.getInteger("rechargePlatform") == 4) { +// +// if (object.getString("code") == null) { +// throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); +// } +// +// object.put("orderid", childOrder.getOrderNo()); +// object.put("product_id", object.getString("code")); +// object.put("phone", object.getString("rechargeMobile")); +// object.put("price", object.getBigDecimal("rechargePrice")); +// JSONObject returnObject = RechargeConfig.rechargeOrderByHg(object); +// childOrder.setExt1(returnObject.toJSONString()); +// } +// +// +// System.out.println("消费内容:" + childOrder); +// +// childOrder.setUpdateTime(new Date()); +// outRechargeChildOrderService.updateOrder(childOrder); +// } +// } + + @Override + public void getPrepaidRechargeApi(OutRechargeOrder outRechargeOrder) { JSONObject object = new JSONObject(); object.put("rechargePrice" , outRechargeOrder.getRechargePrice()); @@ -406,9 +556,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { // 判断参数是否为空 if ( object.getBigDecimal("rechargePrice") == null || - object.getString("rechargeMobile") == null || - object.getInteger("productId") == null || - object.getLong("parentOrderId") == null + object.getString("rechargeMobile") == null || + object.getInteger("productId") == null || + object.getLong("parentOrderId") == null ) { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } @@ -426,7 +576,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { childOrder.setOrderNo("CZ" + OrderUtil.generateOrderNo()); childOrder.setUpdateTime(new Date()); childOrder.setCreateTime(new Date()); - + outRechargeChildOrderService.insertOrder(childOrder); // 尖椒充值 if (object.getInteger("rechargePlatform") == 1) { object.put("out_order_id", childOrder.getOrderNo()); @@ -434,7 +584,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { object.put("mobile", object.getString("rechargeMobile")); object.put("notifyUrl", CommonSysConst.getSysConfig().getJjNotifyUrl()); JSONObject returnObject = RechargeConfig.rechargeOrderByJj(object); - childOrder.setExt1(returnObject.toJSONString()); + childOrder.setRechargePlatform(1); + childOrder.setExt1("尖椒" + returnObject.toJSONString()); + childOrder.setExt2(object.toJSONString()); } // 龙阅 @@ -449,7 +601,11 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { object.put("mobile", object.getString("rechargeMobile")); object.put("notifyUrl", CommonSysConst.getSysConfig().getLyNotifyUrl()); JSONObject returnObject = RechargeConfig.rechargeOrderByLy(object); - childOrder.setExt1(returnObject.toJSONString()); + childOrder.setRechargePlatform(2); + childOrder.setExt1("龙阅充值" + returnObject.toJSONString()); + childOrder.setExt2("龙阅请求参数" + object.toJSONString()); + childOrder.setExt3("龙阅充值" + returnObject.toJSONString()); + } // 畅停充值 @@ -464,56 +620,13 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { object.put("phone", object.getString("rechargeMobile")); object.put("price", object.getBigDecimal("rechargePrice")); JSONObject returnObject = RechargeConfig.rechargeOrderByHg(object); - childOrder.setExt1(returnObject.toJSONString()); - } - outRechargeChildOrderService.insertOrder(childOrder); - } - - @Override - public void prepaidRechargeHandle(OutRechargeOrder outRechargeOrder){ - - String key = "recharge_" + outRechargeOrder.getId(); - - try { - - // 分布式锁占坑 - Boolean lock = redisTemplate.opsForValue().setIfAbsent(key, outRechargeOrder.getOrderNo()); - - if(Boolean.TRUE.equals(lock)) { - // 加锁成功,处理业务 - // 判断订单是否可以继续充值 1:满足继续充值条件 2:订单满足退款条件 3:订单不可以退款不可以继续充值 4:订单异常 5:订单充值完成 - int orderStatus = orderWhetherRecharge(outRechargeOrder); - - if (orderStatus == 1) { - getPrepaidRechargeApi(outRechargeOrder); - } - if (orderStatus == 2) { - refundOrder(outRechargeOrder.getId()); - } - if (orderStatus == 4) { - HighOrder highOrder = highOrderService.getOrderByOrderNo(outRechargeOrder.getOrderNo()); - highOrder.setExceptionStatus(true); - highOrder.setExceptionContent("话费订单存在多条重复记录"); - highOrderService.updateOrder(highOrder); - } - if (orderStatus == 5) { - completeOrder(outRechargeOrder.getId()); - } - } else { - // 加锁失败,重试 - Thread.sleep(100); - prepaidRechargeHandle(outRechargeOrder); - } - - - } catch (Exception e) { - e.printStackTrace(); - } finally { - // 删除key,释放锁 - redisTemplate.delete(key); + childOrder.setRechargePlatform(4); + childOrder.setExt1("畅停充值" + returnObject.toJSONString()); + childOrder.setExt2("畅停请求参数" + object.toJSONString()); + childOrder.setExt3("畅停充值" + returnObject.toJSONString()); } - - + childOrder.setUpdateTime(new Date()); + outRechargeChildOrderService.updateOrder(childOrder); } @Override @@ -583,67 +696,82 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { } @Override - public Integer getRechargeOrderLegality(OutRechargeChildOrder childOrder) throws Exception { + public Integer getRechargeOrderLegality(OutRechargeChildOrder childOrder) { - JSONObject object = new JSONObject(); - // 龙阅 - if (childOrder.getRechargePlatform() == 2) { + try { - object.put("out_trade_nums" , childOrder.getOrderNo()); + JSONObject object = new JSONObject(); - JSONObject jsonObject = RechargeConfig.checkOrderByLy(object); + Integer status = 99; - JSONArray objectJSONArray = jsonObject.getJSONArray("data"); - JSONObject objectData = new JSONObject(); - for (Object objects : objectJSONArray) { - objectData = (JSONObject) objects; - } - if (objectData.size() == 0) { - if (jsonObject.getInteger("errno") == 0) { - return 2; - } else { - return 99; - } - } else { - // -1取消,0充值中 ,1充值成功,2充值失败,3部分成功 - return objectData.getInteger("state"); - } + // 龙阅 + if (childOrder.getRechargePlatform() == 2) { - } - // 畅停 - if (childOrder.getRechargePlatform() == 4) { - object.put("orderid" , childOrder.getOrderNo()); + object.put("out_trade_nums" , childOrder.getOrderNo()); + + JSONObject jsonObject = RechargeConfig.checkOrderByLy(object); + childOrder.setExt3("龙阅查询"+ jsonObject); - JSONObject jsonObject = RechargeConfig.checkOrderByHg(object); - if (jsonObject.getJSONArray("data") == null) { - if (jsonObject.getInteger("code") == 20001) { - return 2; - } - return 99; - } else { JSONArray objectJSONArray = jsonObject.getJSONArray("data"); - JSONObject objectData; + + JSONObject objectData = new JSONObject(); for (Object objects : objectJSONArray) { objectData = (JSONObject) objects; - // 0充值中,1成功,2失败,3已取消,4部分充值,5缓存订单 + } + if (objectData.size() > 0) { // -1取消,0充值中 ,1充值成功,2充值失败,3部分成功 + status = objectData.getInteger("state"); + } - if (objectData.getInteger("status") == 0 || objectData.getInteger("status") == 5) { - return 0; - } else if (objectData.getInteger("status") == 1) { - return 1; - } else if (objectData.getInteger("status") == 2) { - return 2; - } else if (objectData.getInteger("status") == 3) { - return -1; - } else if (objectData.getInteger("status") == 4) { - return 3; - } + } + // 畅停 + if (childOrder.getRechargePlatform() == 4) { + object.put("orderid" , childOrder.getOrderNo()); + + JSONObject jsonObject = RechargeConfig.checkOrderByHg(object); + childOrder.setExt3("畅停查询"+ jsonObject); + if (jsonObject.getJSONArray("data") != null) { + JSONArray objectJSONArray = jsonObject.getJSONArray("data"); + + JSONObject objectData; + for (Object objects : objectJSONArray) { + objectData = (JSONObject) objects; + // 0充值中,1成功,2失败,3已取消,4部分充值,5缓存订单 + // -1取消,0充值中 ,1充值成功,2充值失败,3部分成功 + if (objectData.getInteger("status") == 0 || objectData.getInteger("status") == 5) { + status = 0; + } else if (objectData.getInteger("status") == 1) { + status = 1; + } else if (objectData.getInteger("status") == 2) { + status = 2; + } else if (objectData.getInteger("status") == 3) { + status = -1; + } else if (objectData.getInteger("status") == 4) { + status = 3; + } + } } } + + if (status == 1) { + childOrder.setStatus(101); + } + if (status == 2 || status == -1) { + childOrder.setStatus(103); + } + if (status == 99 ) { + childOrder.setStatus(104); + } + + childOrder.setUpdateTime(new Date()); + outRechargeChildOrderService.updateOrder(childOrder); + return status; + }catch (Exception e) { + return 99; } - return 99; + + } // 获取当前最新的充值平台 @@ -664,7 +792,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { * @Param [object] * @Return com.alibaba.fastjson.JSONObject */ - private JSONObject prepaidRechargeOrderHandle(JSONObject object) { + + @Override + public JSONObject prepaidRechargeOrderHandle(JSONObject object) { if (object.getLong("productId") == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "产品编码为空"); @@ -711,13 +841,13 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { } @Override - public Integer orderWhetherRecharge(OutRechargeOrder rechargeOrder) throws Exception { + public Integer orderWhetherRecharge(OutRechargeOrder rechargeOrder) { // 查询子订单 List childOrderList = outRechargeChildOrderService.getListRechargeChildOrderByOrderId(rechargeOrder.getId()); if (childOrderList.size() == 0) { - return 4; + return 6; } // 充值订单充值时间 @@ -757,14 +887,17 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { if (status == 2 || status == -1) { // 修改充值订单状态 rechargeChildOrderHandle(childOrders102.get(0) , 103); - // 如果订单记录超过5条退款 反之继续充值 - if (childOrderList.size() > 4) { + // 如果订单记录超过2条退款 反之继续充值 + if (childOrderList.size() > 1) { return 2; } else { // 如果订单记录超过71小时 反之继续充值 return hours > 71 ? 2 : 1; } } + if (status == 99) { + return 6; + } // 充值订单为充值成功 if (status == 1) { // 修改充值订单状态 @@ -782,8 +915,8 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { if (status == 2 || status == -1) { // 修改充值订单状态 rechargeChildOrderHandle(childOrderList.get(0) , 103); - // 如果订单记录超过5条退款 反之继续充值 - if (childOrderList.size() > 4) { + // 如果订单记录超过2条退款 反之继续充值 + if (childOrderList.size() > 1) { return 2; } else { // 如果订单记录超过71小时 反之继续充值 @@ -791,17 +924,15 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { } } + if (status == 99) { + return 6; + } if (status == 1) { // 修改充值订单状态 rechargeChildOrderHandle(childOrderList.get(0) , 101); return 5; } - } else { - // 如果订单记录超过71小时 反之继续充值 - return hours > 71 ? 2 : 1; } - - } return 3; } diff --git a/v1/src/main/java/com/v1/controller/WxMsgController.java b/v1/src/main/java/com/v1/controller/WxMsgController.java index 650618e4..7dbc36b7 100644 --- a/v1/src/main/java/com/v1/controller/WxMsgController.java +++ b/v1/src/main/java/com/v1/controller/WxMsgController.java @@ -216,7 +216,7 @@ public class WxMsgController { linkContent = "支付分享,享受更高优惠[礼物]\n\n" + "分享好友\n\n"; } @@ -339,7 +339,7 @@ public class WxMsgController { linkContent = "支付分享,享受更高优惠[礼物]\n\n" + "分享好友\n\n"; } @@ -535,6 +535,32 @@ public class WxMsgController { } + @RequestMapping(value = "/createMenu", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "创建菜单") + public ResponseData createMenu(@RequestBody JSONObject object) { + try { + Map params = new HashMap<>(); + params.put("appid", SysConst.getSysConfig().getWxH5AppId()); + params.put("secret", SysConst.getSysConfig().getWxH5AppSecret()); + params.put("grant_type", "client_credential"); + + JSONObject accessTokenObject = HttpsUtils.doGet("https://api.weixin.qq.com/cgi-bin/token", params); + if (accessTokenObject == null) { + log.error("getH5UserInfo error!", "获取微信access_token失败" ); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "获取微信access_token失败"); + } + + JSONObject jsonObject = HttpsUtils.doPost("https://api.weixin.qq.com/cgi-bin/menu/create?access_token=" + accessTokenObject.getString("access_token"), object); + + return ResponseMsgUtil.success(jsonObject); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + // @RequestMapping(value = "/verifyWx", method = RequestMethod.GET) // @ResponseBody diff --git a/v1/src/main/java/com/v1/controller/business/OrderRebateController.java b/v1/src/main/java/com/v1/controller/business/OrderRebateController.java index 5daf1d81..638cb717 100644 --- a/v1/src/main/java/com/v1/controller/business/OrderRebateController.java +++ b/v1/src/main/java/com/v1/controller/business/OrderRebateController.java @@ -172,6 +172,7 @@ public class OrderRebateController { Map mapGold = new HashMap<>(); mapGold.put("goldType", 1); mapGold.put("resId", object.getLong("orderId")); + mapGold.put("resOrderNo", object.getString("orderNo")); List goldRecs = highGoldRecService.getGoldRec(mapGold); @@ -296,10 +297,6 @@ public class OrderRebateController { } - - - - return ResponseMsgUtil.success("操作成功"); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); diff --git a/v1/src/main/java/com/v1/controller/orderController.java b/v1/src/main/java/com/v1/controller/orderController.java index f944c1b3..18c4e866 100644 --- a/v1/src/main/java/com/v1/controller/orderController.java +++ b/v1/src/main/java/com/v1/controller/orderController.java @@ -423,6 +423,23 @@ public class orderController { } } + @RequestMapping(value = "/test", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "对外订单退款接口") + public ResponseData test() { + try { + + System.out.println("话费请求订单================================="); + + Thread.currentThread().sleep(30000); + + return ResponseMsgUtil.success("请求成功!"); + + } catch (Exception e) { + log.error("HighOpenApiController --> createOrder() error!", e); + return ResponseMsgUtil.exception(e); + } + } }