dev^2
胡锐 1 month ago
commit 1910b4c537
  1. 64
      bweb/src/main/java/com/bweb/controller/TestController.java
  2. 18
      cweb/src/main/java/com/cweb/controller/meituan/MeiTuanController.java
  3. BIN
      order/lib/open-api-sdk-2.0-jd.jar
  4. 7
      order/pom.xml
  5. 1
      order/src/main/java/com/order/config/AuthConfig.java
  6. 7
      order/src/main/java/com/order/controller/business/BsOrderGoodsController.java
  7. 81
      order/src/main/java/com/order/controller/business/BsOrderMeiTuanController.java
  8. 455
      order/src/main/java/com/order/controller/business/OrderSettlementController.java
  9. 69
      order/src/main/java/com/order/controller/notify/JdNotify.java
  10. 133
      order/src/main/java/com/order/controller/notify/MeiTuanController.java
  11. 22
      order/src/main/resources/dev/logback.xml
  12. BIN
      service/lib/open-api-sdk-2.0-jd.jar
  13. 7
      service/pom.xml
  14. 2
      service/src/main/java/com/hfkj/common/utils/DateUtil.java
  15. 113
      service/src/main/java/com/hfkj/common/utils/RsaCoderUtils.java
  16. 9
      service/src/main/java/com/hfkj/config/CommonSysConfig.java
  17. 35
      service/src/main/java/com/hfkj/dao/GoodsShoppingCartMapper.java
  18. 16
      service/src/main/java/com/hfkj/dao/GoodsShoppingCartSqlProvider.java
  19. 59
      service/src/main/java/com/hfkj/dao/GoodsUserAddressMapper.java
  20. 114
      service/src/main/java/com/hfkj/dao/GoodsUserAddressSqlProvider.java
  21. 18
      service/src/main/java/com/hfkj/entity/GoodsShoppingCart.java
  22. 62
      service/src/main/java/com/hfkj/entity/GoodsShoppingCartExample.java
  23. 130
      service/src/main/java/com/hfkj/entity/GoodsUserAddress.java
  24. 506
      service/src/main/java/com/hfkj/entity/GoodsUserAddressExample.java
  25. 63
      service/src/main/java/com/hfkj/entity/GoodsUserAddressWithBLOBs.java
  26. 63
      service/src/main/java/com/hfkj/jd/JdService.java
  27. 34
      service/src/main/java/com/hfkj/meituan/MeiTuanService.java
  28. 58
      service/src/main/java/com/hfkj/model/order/orderExport/MerOrderSettlementDetailModel.java
  29. 120
      service/src/main/java/com/hfkj/model/order/orderExport/OrderMeiTuanExportModel.java
  30. 39
      service/src/main/java/com/hfkj/model/order/orderExport/OrderSettlementModel.java
  31. 34
      service/src/main/java/com/hfkj/model/order/orderExport/OrderSettlementSumModel.java
  32. 10
      service/src/main/java/com/hfkj/service/coupon/BsOrderCouponService.java
  33. 24
      service/src/main/java/com/hfkj/service/coupon/impl/BsOrderCouponServiceImpl.java
  34. 11
      service/src/main/java/com/hfkj/service/goods/BsOrderCinemaService.java
  35. 2
      service/src/main/java/com/hfkj/service/goods/BsOrderGoodsService.java
  36. 32
      service/src/main/java/com/hfkj/service/goods/BsOrderMeiTuanService.java
  37. 18
      service/src/main/java/com/hfkj/service/goods/BsOrderMemberService.java
  38. 9
      service/src/main/java/com/hfkj/service/goods/BsOrderStarbucksService.java
  39. 32
      service/src/main/java/com/hfkj/service/goods/impl/BsOrderCinemaServiceImpl.java
  40. 26
      service/src/main/java/com/hfkj/service/goods/impl/BsOrderGoodsServiceImpl.java
  41. 151
      service/src/main/java/com/hfkj/service/goods/impl/BsOrderMeiTuanServiceImpl.java
  42. 44
      service/src/main/java/com/hfkj/service/goods/impl/BsOrderMemberServiceImpl.java
  43. 25
      service/src/main/java/com/hfkj/service/goods/impl/BsOrderStarbucksServiceImpl.java
  44. 47
      service/src/main/java/com/hfkj/service/order/OrderCancelService.java
  45. 8
      service/src/main/java/com/hfkj/service/order/OrderCreateService.java
  46. 57
      service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java
  47. 28
      service/src/main/java/com/hfkj/service/order/OrderRefundSuccessService.java
  48. 47
      service/src/main/java/com/hfkj/service/order/OrderSettlementService.java
  49. 39
      service/src/main/java/com/hfkj/service/order/impl/BsOrderChildServiceImpl.java
  50. 45
      service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java
  51. 1
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java
  52. 370
      service/src/main/java/com/hfkj/service/order/impl/OrderSettlementServiceImpl.java
  53. 2
      service/src/main/java/com/hfkj/sysenum/UserLoginPlatform.java
  54. 12
      service/src/main/java/com/hfkj/sysenum/fileRecords/FileRecordsEnum.java
  55. 8
      service/src/main/resources/dev/commonConfig.properties
  56. 11
      service/src/main/resources/prod/commonConfig.properties
  57. 2
      user/src/main/java/com/user/controller/BsUserController.java

@ -6,9 +6,21 @@ import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.*;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.BsMerPayConfig;
import com.hfkj.entity.BsOrder;
import com.hfkj.entity.BsUserCard;
import com.hfkj.jd.JdService;
import com.hfkj.mer.BsMerPayConfigService;
import com.hfkj.model.ResponseData;
import com.hfkj.model.order.OrderModel;
import com.hfkj.qianzhu.CinemaService;
import com.hfkj.service.card.BsUserCardService;
import com.hfkj.service.hlt.HuiLianTongUnionCardService;
import com.hfkj.service.order.BsOrderService;
import com.hfkj.service.order.OrderPayService;
import com.hfkj.service.pay.huift.TradeService;
import com.hfkj.sysenum.mer.PayPlatformEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
@ -19,6 +31,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
@ -29,7 +42,14 @@ public class TestController {
private static Logger log = LoggerFactory.getLogger(TestController.class);
@Resource
private TradeService huiftTradeService;
@Resource
private BsOrderService orderService;
@Resource
private BsMerPayConfigService merPayConfigService;
@Resource
private OrderPayService orderPayService;
@Resource
private BsUserCardService userCardService;
@RequestMapping(value="/thirdPayResult",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询V家园订单交易状态")
@ -70,4 +90,46 @@ public class TestController {
}
}
@RequestMapping(value="/refundMovieOrder",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "refundMovieOrder")
public ResponseData refundMovieOrder(@RequestParam(value = "orderNo" , required = true) String orderNo,
@RequestParam(value = "payRealPrice" , required = true) BigDecimal payRealPrice,
@RequestParam(value = "cardNo" , required = true) String cardNo) {
try {
// 工会卡支付
JSONObject consumption = HuiLianTongUnionCardService.consumption(orderNo, cardNo, payRealPrice, "HiSen_phg_goods", "11101608", "", "241001130753599939订单扣款");
if (!consumption.getString("respCode").equals("0000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, consumption.getString("respMessage"));
}
// 响应参数
JSONObject consumptionResult = HuiLianTongUnionCardService.resolveResponse(consumption.getString("data"));
if (consumptionResult.getBoolean("success") != true) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, consumptionResult.getString("message"));
}
return ResponseMsgUtil.success(consumptionResult);
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getAccessToken",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "getAccessToken")
public ResponseData getAccessToken() {
try {
return ResponseMsgUtil.success(JdService.getAccessToken());
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -4,8 +4,11 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.utils.RandomStringGeneratorUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.BsOrderMeituan;
import com.hfkj.meituan.MeiTuanService;
import com.hfkj.model.ResponseData;
import com.hfkj.service.goods.BsOrderMeiTuanService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
@ -16,9 +19,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@Controller
@RequestMapping(value="/meiTuan")
@ -27,20 +32,31 @@ public class MeiTuanController {
private static final Logger log = LoggerFactory.getLogger(MeiTuanController.class);
@Resource
private BsOrderMeiTuanService bsOrderMeiTuanService;
@RequestMapping(value = "/loginFree", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "H5免登接口")
public ResponseData loginFree(@RequestParam(name = "staffPhone", required = true) String staffPhone,
@RequestParam(name = "childNo", required = false) String childNo,
@RequestParam(name = "productType", required = true) String productType) {
try {
Map<String , Object> map = new HashMap<>();
Map<String , Object> staffInfo = new HashMap<>();
Map<String , Object> bizParam = new HashMap<>();
staffInfo.put("staffPhone", staffPhone);
if (Objects.equals(productType, "sqt_order_detail")) {
BsOrderMeituan orderMeiTuan = bsOrderMeiTuanService.findOrderMeiTuan(childNo);
bizParam.put("sqtBizOrderId" , orderMeiTuan.getSqtBizOrderId());
}
map.put("staffInfo", staffInfo);
map.put("entId", 104310L);
map.put("bizParam", bizParam);
map.put("entId", CommonSysConst.getSysConfig().getEntId());
map.put("ts", new Date().getTime());
map.put("productType", productType);
map.put("nonce" , RandomStringGeneratorUtil.generateRandomString(36));

Binary file not shown.

@ -32,6 +32,13 @@
<version>1.0.21</version>
<systemPath>${basedir}/lib/open-platform-sdk-1.0.21.jar</systemPath>
</dependency>
<dependency>
<groupId>jd.skd</groupId>
<artifactId>jd-open-sdk</artifactId>
<scope>system</scope>
<version>2.0</version>
<systemPath>${basedir}/lib/open-api-sdk-2.0-jd.jar</systemPath>
</dependency>
</dependencies>
<build>

@ -87,6 +87,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/**/springfox-swagger-ui/**")
.excludePathPatterns("/**/swagger-ui.html")
.excludePathPatterns("/notify/*")
.excludePathPatterns("/jdNotify/*")
.excludePathPatterns("/cqNotify/*")
.excludePathPatterns("/meiTuan/*")
.excludePathPatterns("/orderCinema/queryOrder")

@ -151,15 +151,12 @@ public class BsOrderGoodsController {
@RequestParam(value = "payType" , required = false) Integer payType,
@RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE,
@RequestParam(value = "createTimeS" , required = false) Long createTimeS,
@RequestParam(value = "createTimeE" , required = false) Long createTimeE, HttpServletRequest request) {
// 插入下载记录
FileRecords fileRecords = new FileRecords();
try {
SessionObject sessionObject = userCenter.getSessionObject(request);

@ -1,16 +1,27 @@
package com.order.controller.business;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.SessionObject;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsOrderMeituan;
import com.hfkj.entity.SecConfig;
import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject;
import com.hfkj.service.SecConfigService;
import com.hfkj.service.goods.BsOrderMeiTuanService;
import com.hfkj.service.goods.impl.BsOrderMeiTuanServiceImpl;
import com.hfkj.sysenum.SecUserObjectTypeEnum;
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.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -18,7 +29,11 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping(value="/orderMeiTuan")
@ -28,12 +43,22 @@ public class BsOrderMeiTuanController {
@Resource
private SecConfigService secConfigService;
@Resource
private BsOrderMeiTuanService orderMeiTuanService;
@Resource
private UserCenter userCenter;
private static final Logger log = LoggerFactory.getLogger(BsOrderGoodsController.class);
@Autowired
private BsOrderMeiTuanServiceImpl bsOrderMeiTuanService;
@RequestMapping(value="/servicePrice",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询服务费")
public ResponseData servicePrice(@RequestParam(value = "platformCode" , required = true) String platformCode,
@RequestParam(value = "tradeNo" , required = true) String tradeNo,
@RequestParam(value = "price" , required = true) BigDecimal price
) {
try {
@ -46,9 +71,61 @@ public class BsOrderMeiTuanController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相信息");
}
servicePrice = price.multiply(new BigDecimal(config.getCodeValue()));
BsOrderMeituan orderMeiTuan = orderMeiTuanService.findOrderMeiTuanByTradeNo(tradeNo);
servicePrice = price.multiply(new BigDecimal(config.getCodeValue())).setScale(2 , RoundingMode.HALF_UP);
JSONObject object = new JSONObject();
object.put("servicePrice" , servicePrice);
object.put("goodsName" , orderMeiTuan.getGoodsName());
object.put("tradeAmount" , orderMeiTuan.getTradeAmount());
return ResponseMsgUtil.success(object);
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getListMeiTuan",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询列表")
public ResponseData getListMeiTuan(
@RequestParam(value = "orderNo" , required = false) String orderNo,
@RequestParam(value = "childOrderNo" , required = false) String childOrderNo,
@RequestParam(value = "userPhone" , required = false) String userPhone,
@RequestParam(value = "goodsName" , required = false) String goodsName,
@RequestParam(value = "tradeNo" , required = false) String tradeNo,
@RequestParam(value = "payType" , required = false) Integer payType,
@RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "createTimeS" , required = false) Long createTimeS,
@RequestParam(value = "createTimeE" , required = false) Long createTimeE,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE,
@RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try {
Map<String , Object> map = new HashMap<>();
map.put("orderNo", orderNo);
map.put("childOrderNo", childOrderNo);
map.put("userPhone", userPhone);
map.put("tradeNo", tradeNo);
map.put("goodsName", goodsName);
map.put("payType", payType);
map.put("createTimeS", createTimeS);
map.put("createTimeE", createTimeE);
map.put("finishTimeS", finishTimeS);
map.put("finishTimeE", finishTimeE);
map.put("status", status);
return ResponseMsgUtil.success(servicePrice);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(bsOrderMeiTuanService.getOrderList(map)));
} catch (Exception e) {
log.error("error!",e);

@ -0,0 +1,455 @@
package com.order.controller.business;
import com.alibaba.excel.EasyExcel;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.SessionObject;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.BsOrderGoods;
import com.hfkj.entity.FileRecords;
import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject;
import com.hfkj.model.order.orderExport.MerOrderSettlementDetailModel;
import com.hfkj.model.order.orderExport.OrderGoodsExportModel;
import com.hfkj.model.order.orderExport.OrderSettlementModel;
import com.hfkj.model.order.orderExport.OrderSettlementSumModel;
import com.hfkj.service.file.FileRecordsService;
import com.hfkj.service.order.OrderSettlementService;
import com.hfkj.sysenum.SecUserObjectTypeEnum;
import com.hfkj.sysenum.fileRecords.FileRecordsEnum;
import com.hfkj.sysenum.order.OrderChildStatusEnum;
import com.hfkj.sysenum.order.OrderPayChannelEnum;
import com.hfkj.sysenum.order.OrderPayTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.beanutils.BeanUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@Controller
@RequestMapping(value="/settlement")
@Api(value="订单统计业务")
public class OrderSettlementController {
private static final Logger log = LoggerFactory.getLogger(OrderSettlementController.class);
@Resource
private UserCenter userCenter;
@Resource
private OrderSettlementService orderSettlementService;
@Resource
private FileRecordsService fileRecordsService;
@RequestMapping(value="/settlementDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "结算详情")
public ResponseData settlementDetail(@RequestParam(value = "platform" , required = false) String platform,
@RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "payType" , required = false) Long payType,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE, HttpServletRequest request) {
try {
Map<String,Object> param = new HashMap<>();
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) {
param.put("merId", merId);
}
if (SecUserObjectTypeEnum.type2.getCode() == userModel.getAccount().getObjectType()) {
param.put("merId", userModel.getAccount().getObjectId());
}
param.put("platform", platform);
param.put("payType", payType);
param.put("finishTimeS", finishTimeS);
param.put("finishTimeE", finishTimeE);
return ResponseMsgUtil.success(orderSettlementService.getDetail(param));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/exportSettlementDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "导出结算详情")
public ResponseData exportSettlementDetail(@RequestParam(value = "platform" , required = false) String platform,
@RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "payType" , required = false) Long payType,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE, HttpServletRequest request) {
// 插入下载记录
FileRecords fileRecords = new FileRecords();
try {
Map<String,Object> param = new HashMap<>();
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) {
param.put("merId", merId);
}
if (SecUserObjectTypeEnum.type2.getCode() == userModel.getAccount().getObjectType()) {
param.put("merId", userModel.getAccount().getObjectId());
}
param.put("platform", platform);
param.put("payType", payType);
param.put("finishTimeS", finishTimeS);
param.put("finishTimeE", finishTimeE);
String dataSting = DateUtil.date2String(new Date(), DateUtil.YMDHMS);
String fileUrl = CommonSysConst.getSysConfig().getFileUrl();
String filePath = "/temporary/" + userModel.getAccount().getId() + "/" ;
String pathName = filePath + FileRecordsEnum.status10.getName() + "交易数据导出" + dataSting +".xlsx";
if (fileRecordsService.findExported(param.toString() , userModel.getAccount().getId())) {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "相同导出内容请勿重复点击!");
}
fileRecords.setCreateTime(new Date());
fileRecords.setBusinessType(FileRecordsEnum.status10.getCode());
fileRecords.setDownloadConditions(param.toString());
fileRecords.setOpId(userModel.getAccount().getId());
fileRecords.setOpName(userModel.getAccount().getUserName());
fileRecords.setStatus(2);
fileRecords.setDownloadStatus(2);
fileRecords.setFileUrl(CommonSysConst.getSysConfig().getDomainName() + "/filesystem" + pathName);
fileRecords.setType("2");
fileRecords.setTitle(FileRecordsEnum.status10.getName() + "交易数据导出" + dataSting + ".xls");
fileRecordsService.create(fileRecords);
// 创建线程
ThreadPoolExecutor executor = new ThreadPoolExecutor(
2, // 核心线程数
5, // 最大线程数
1, // 线程空闲时间
TimeUnit.MINUTES, // 时间单位
new ArrayBlockingQueue<>(5), // 任务队列
new ThreadPoolExecutor.CallerRunsPolicy() // 拒绝策略
);
// 提交任务给线程池
executor.execute(() -> {
try {
List<MerOrderSettlementDetailModel> list = orderSettlementService.getDetail(param);
File file = new File(fileUrl + filePath);
if (!file.exists()) {
file.mkdirs();
}
EasyExcel.write(fileUrl+pathName)
.head(MerOrderSettlementDetailModel.class)
.sheet(fileRecords.getTitle())
.doWrite(list);
fileRecords.setStatus(1);
fileRecords.setUpdateTime(new Date());
fileRecordsService.update(fileRecords);
} catch (Exception e) {
fileRecords.setStatus(3);
fileRecords.setUpdateTime(new Date());
fileRecords.setExt1(e.toString());
fileRecordsService.update(fileRecords);
log.error("error!",e);
}
});
// 关闭线程池
executor.shutdown();
return ResponseMsgUtil.success(fileRecords);
} catch (Exception e) {
fileRecords.setStatus(3);
fileRecords.setUpdateTime(new Date());
fileRecordsService.update(fileRecords);
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getSettlement",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "结算详情")
public ResponseData getSettlement(@RequestParam(value = "platform" , required = false) String platform,
@RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "payType" , required = false) Long payType,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE, HttpServletRequest request) {
try {
Map<String,Object> param = new HashMap<>();
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) {
param.put("merId", merId);
}
if (SecUserObjectTypeEnum.type2.getCode() == userModel.getAccount().getObjectType()) {
param.put("merId", userModel.getAccount().getObjectId());
}
param.put("platform", platform);
param.put("payType", payType);
param.put("finishTimeS", finishTimeS);
param.put("finishTimeE", finishTimeE);
return ResponseMsgUtil.success(orderSettlementService.getSettlement(param));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/exportSettlement",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "导出结算")
public ResponseData exportSettlement(@RequestParam(value = "platform" , required = false) String platform,
@RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "payType" , required = false) Long payType,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE, HttpServletRequest request) {
// 插入下载记录
FileRecords fileRecords = new FileRecords();
try {
Map<String,Object> param = new HashMap<>();
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) {
param.put("merId", merId);
}
if (SecUserObjectTypeEnum.type2.getCode() == userModel.getAccount().getObjectType()) {
param.put("merId", userModel.getAccount().getObjectId());
}
param.put("platform", platform);
param.put("payType", payType);
param.put("finishTimeS", finishTimeS);
param.put("finishTimeE", finishTimeE);
String dataSting = DateUtil.date2String(new Date(), DateUtil.YMDHMS);
String fileUrl = CommonSysConst.getSysConfig().getFileUrl();
String filePath = "/temporary/" + userModel.getAccount().getId() + "/" ;
String pathName = filePath + FileRecordsEnum.status11.getName() + "交易数据导出" + dataSting +".xlsx";
if (fileRecordsService.findExported(param.toString() , userModel.getAccount().getId())) {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "相同导出内容请勿重复点击!");
}
fileRecords.setCreateTime(new Date());
fileRecords.setBusinessType(FileRecordsEnum.status11.getCode());
fileRecords.setDownloadConditions(param.toString());
fileRecords.setOpId(userModel.getAccount().getId());
fileRecords.setOpName(userModel.getAccount().getUserName());
fileRecords.setStatus(2);
fileRecords.setDownloadStatus(2);
fileRecords.setFileUrl(CommonSysConst.getSysConfig().getDomainName() + "/filesystem" + pathName);
fileRecords.setType("2");
fileRecords.setTitle(FileRecordsEnum.status11.getName() + "交易数据导出" + dataSting + ".xls");
fileRecordsService.create(fileRecords);
// 创建线程
ThreadPoolExecutor executor = new ThreadPoolExecutor(
2, // 核心线程数
5, // 最大线程数
1, // 线程空闲时间
TimeUnit.MINUTES, // 时间单位
new ArrayBlockingQueue<>(5), // 任务队列
new ThreadPoolExecutor.CallerRunsPolicy() // 拒绝策略
);
// 提交任务给线程池
executor.execute(() -> {
try {
List<OrderSettlementModel> list = orderSettlementService.getSettlement(param);
File file = new File(fileUrl + filePath);
if (!file.exists()) {
file.mkdirs();
}
EasyExcel.write(fileUrl+pathName)
.head(OrderSettlementModel.class)
.sheet(fileRecords.getTitle())
.doWrite(list);
fileRecords.setStatus(1);
fileRecords.setUpdateTime(new Date());
fileRecordsService.update(fileRecords);
} catch (Exception e) {
fileRecords.setStatus(3);
fileRecords.setUpdateTime(new Date());
fileRecords.setExt1(e.toString());
fileRecordsService.update(fileRecords);
log.error("error!",e);
}
});
// 关闭线程池
executor.shutdown();
return ResponseMsgUtil.success(fileRecords);
} catch (Exception e) {
fileRecords.setStatus(3);
fileRecords.setUpdateTime(new Date());
fileRecordsService.update(fileRecords);
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getSum",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "结算总和")
public ResponseData getSum(@RequestParam(value = "platform" , required = false) String platform,
@RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "payType" , required = false) Long payType,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE, HttpServletRequest request) {
try {
Map<String,Object> param = new HashMap<>();
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) {
param.put("merId", merId);
}
if (SecUserObjectTypeEnum.type2.getCode() == userModel.getAccount().getObjectType()) {
param.put("merId", userModel.getAccount().getObjectId());
}
param.put("platform", platform);
param.put("payType", payType);
param.put("finishTimeS", finishTimeS);
param.put("finishTimeE", finishTimeE);
return ResponseMsgUtil.success(orderSettlementService.getSum(param));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/exportSettlementSum",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "导出结算总和")
public ResponseData exportSettlementSum(@RequestParam(value = "platform" , required = false) String platform,
@RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "payType" , required = false) Long payType,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE, HttpServletRequest request) {
// 插入下载记录
FileRecords fileRecords = new FileRecords();
try {
Map<String,Object> param = new HashMap<>();
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) {
param.put("merId", merId);
}
if (SecUserObjectTypeEnum.type2.getCode() == userModel.getAccount().getObjectType()) {
param.put("merId", userModel.getAccount().getObjectId());
}
param.put("platform", platform);
param.put("payType", payType);
param.put("finishTimeS", finishTimeS);
param.put("finishTimeE", finishTimeE);
String dataSting = DateUtil.date2String(new Date(), DateUtil.YMDHMS);
String fileUrl = CommonSysConst.getSysConfig().getFileUrl();
String filePath = "/temporary/" + userModel.getAccount().getId() + "/" ;
String pathName = filePath + FileRecordsEnum.status12.getName() + "交易数据导出" + dataSting +".xlsx";
if (fileRecordsService.findExported(param.toString() , userModel.getAccount().getId())) {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "相同导出内容请勿重复点击!");
}
fileRecords.setCreateTime(new Date());
fileRecords.setBusinessType(FileRecordsEnum.status12.getCode());
fileRecords.setDownloadConditions(param.toString());
fileRecords.setOpId(userModel.getAccount().getId());
fileRecords.setOpName(userModel.getAccount().getUserName());
fileRecords.setStatus(2);
fileRecords.setDownloadStatus(2);
fileRecords.setFileUrl(CommonSysConst.getSysConfig().getDomainName() + "/filesystem" + pathName);
fileRecords.setType("2");
fileRecords.setTitle(FileRecordsEnum.status12.getName() + "交易数据导出" + dataSting + ".xls");
fileRecordsService.create(fileRecords);
// 创建线程
ThreadPoolExecutor executor = new ThreadPoolExecutor(
2, // 核心线程数
5, // 最大线程数
1, // 线程空闲时间
TimeUnit.MINUTES, // 时间单位
new ArrayBlockingQueue<>(5), // 任务队列
new ThreadPoolExecutor.CallerRunsPolicy() // 拒绝策略
);
// 提交任务给线程池
executor.execute(() -> {
try {
List<OrderSettlementSumModel> list = orderSettlementService.getSum(param);
File file = new File(fileUrl + filePath);
if (!file.exists()) {
file.mkdirs();
}
EasyExcel.write(fileUrl+pathName)
.head(OrderSettlementSumModel.class)
.sheet(fileRecords.getTitle())
.doWrite(list);
fileRecords.setStatus(1);
fileRecords.setUpdateTime(new Date());
fileRecordsService.update(fileRecords);
} catch (Exception e) {
fileRecords.setStatus(3);
fileRecords.setUpdateTime(new Date());
fileRecords.setExt1(e.toString());
fileRecordsService.update(fileRecords);
log.error("error!",e);
}
});
// 关闭线程池
executor.shutdown();
return ResponseMsgUtil.success(fileRecords);
} catch (Exception e) {
fileRecords.setStatus(3);
fileRecords.setUpdateTime(new Date());
fileRecordsService.update(fileRecords);
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -0,0 +1,69 @@
package com.order.controller.notify;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.utils.HttpsUtils;
import com.hfkj.config.CommonSysConst;
import com.hfkj.jd.JdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
@Controller
@RequestMapping(value = "/jdNotify")
@Api(value = "京东回调")
public class JdNotify {
private static final Logger log = LoggerFactory.getLogger(JdService.class);
@RequestMapping(value = "/notify", method = RequestMethod.POST)
@ApiOperation(value = "回调")
@ResponseBody
public void notify(@RequestBody String reqBodyStr, HttpServletRequest request, HttpServletResponse response) {
try {
JSONObject dataObject = JSONObject.parseObject(reqBodyStr, JSONObject.class);
log.info("============回调任务Start=============");
log.info("尖椒订单充值-回调参数: " + dataObject);
log.info("============回调任务End=============");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=utf-8");
PrintWriter writer= response.getWriter();
writer.write("SUCCESS");
} catch (Exception e) {
log.error("WechatPayController --> wechatNotify() error!", e);
}
}
@RequestMapping(value = "/callbackToken", method = RequestMethod.GET)
@ApiOperation(value = "token回调")
@ResponseBody
public void notify(@RequestParam("code") String code) {
try {
log.info("============token回调任务Start=============");
log.info("token回调-回调参数: " + code);
JSONObject object = new JSONObject();
object.put("app_key", CommonSysConst.getSysConfig().getJDAppKey());
object.put("app_secret", CommonSysConst.getSysConfig().getJDAppSecret());
object.put("code", code);
object.put("grant_type", "authorization_code");
JSONObject jsonObject = HttpsUtils.doGet("https://open-oauth.jd.com/oauth2/authorizeForVOP", object);
log.info("token回调-回调参数: " + jsonObject);
log.info("============token回调任务End=============");
} catch (Exception e) {
log.error("WechatPayController --> wechatNotify() error!", e);
}
}
}

@ -19,14 +19,11 @@ import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Date;
import java.util.Objects;
import java.math.BigDecimal;
import java.util.*;
@Controller
@RequestMapping(value = "/meiTuan")
@ -107,8 +104,7 @@ public class MeiTuanController {
JSONObject staffInfo = jsonObject.getJSONObject("staffInfo");
object.put("thirdTradeNo", thirdTradeNo);
object.put("thirdPayUrl", "https://phgcs.dctpay.com/cweb/#/pages/meiTuanPay/index?tradeNo=" + jsonObject.getString("tradeNo") + "&goodsName=" +
jsonObject.getString("goodsName") +
object.put("thirdPayUrl", "https://phg.dctpay.com/cweb/#/pages/meiTuanPay/index?tradeNo=" + jsonObject.getString("tradeNo") +
"&tradeAmount=" + jsonObject.getString("tradeAmount") +
"&outSidePhone=" + staffInfo.getString("staffPhone")
);
@ -123,22 +119,64 @@ public class MeiTuanController {
// 退款
if (Objects.equals(jsonObject.getString("method"), "trade.third.refund")) {
BsOrderRefund orderRefund = orderRefundService.meiTuanRefund(
jsonObject.getString("tradeRefundNo") ,
jsonObject.getString("tradeNo") ,
jsonObject.getBigDecimal("refundAmount") ,
"美团退款"
// 查询退款订
BsOrderRefund bsOrderRefund = orderRefundService.getRefundByTradeRefundNo(jsonObject.getString("tradeRefundNo"));
if (bsOrderRefund != null) {
// 美团退款订单
JSONObject object = new JSONObject();
object.put("thirdRefundNo" , bsOrderRefund.getRefundOrderNo());
log.info("美团退款订单-参数: {}", object);
JSONObject data = new JSONObject();
data.put("status", 0);
data.put("msg", "成功");
data.put("data", EncryptUtil.aesEncrypt(object.toJSONString() , CommonSysConst.getSysConfig().getMtSecretKey()));
log.info("============回调任务End=============");
return data;
} else {
BsOrderMeituan bsOrderMeituan = bsOrderMeiTuanService.findOrderMeiTuanByTradeNo(jsonObject.getString("tradeNo"));
Map<String , Object> refundMap = new HashMap<>();
refundMap.put("orderNo", bsOrderMeituan.getOrderNo());
List<BsOrderRefund> refundList = orderRefundService.getRefundList(refundMap);
BigDecimal refundListPrice = new BigDecimal(0);
for (BsOrderRefund refund : refundList) {
refundListPrice = refundListPrice.add(refund.getTradeRefundPrice());
}
if (bsOrderMeituan.getTradeAmount().compareTo(refundListPrice.add(jsonObject.getBigDecimal("refundAmount"))) > -1) {
BsOrderRefund orderRefund = orderRefundService.meiTuanRefund(
jsonObject.getString("tradeRefundNo") ,
jsonObject.getString("tradeNo") ,
jsonObject.getBigDecimal("refundAmount") ,
"美团退款"
);
// 美团退款订单
JSONObject object = new JSONObject();
object.put("thirdRefundNo" , orderRefund.getRefundOrderNo());
log.info("美团关闭订单-参数: {}", object);
JSONObject data = new JSONObject();
data.put("status", 0);
data.put("msg", "成功");
data.put("data", EncryptUtil.aesEncrypt(object.toJSONString() , CommonSysConst.getSysConfig().getMtSecretKey()));
log.info("============回调任务End=============");
return data;
// 美团退款订单
JSONObject object = new JSONObject();
object.put("thirdRefundNo" , orderRefund.getRefundOrderNo());
log.info("美团退款订单-参数: {}", object);
JSONObject data = new JSONObject();
data.put("status", 0);
data.put("msg", "成功");
data.put("data", EncryptUtil.aesEncrypt(object.toJSONString() , CommonSysConst.getSysConfig().getMtSecretKey()));
log.info("============回调任务End=============");
return data;
} else {
JSONObject data = new JSONObject();
data.put("status", 411);
data.put("traceId", jsonObject.getString("traceId"));
data.put("msg", "退款超额");
data.put("data", null);
log.info("美团退款超额订单-参数: {}", data);
log.info("============回调任务End=============");
return data;
}
}
}
// 交易关单
@ -203,4 +241,53 @@ public class MeiTuanController {
return e;
}
}
@RequestMapping(value = "/orderPush", method = RequestMethod.POST)
@ApiOperation(value = "订单状态变更回调")
@ResponseBody
public Object orderPush(
@RequestParam(name = "traceId", required = false) String traceId,
@RequestParam(name = "accessKey", required = false) String accessKey,
@RequestParam(name = "content", required = false) String content
) {
try {
log.info("============订单状态变更回调Start=============");
if (accessKey == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "accessKey错误");
}
if (!Objects.equals(accessKey, CommonSysConst.getSysConfig().getMtAccessKey())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "accessKey错误");
}
if (content == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "content错误");
}
JSONObject jsonObject = JSONObject.parseObject(EncryptUtil.aesDecrypt(content, CommonSysConst.getSysConfig().getMtSecretKey()));;
log.info("美团-解密参数: {}", jsonObject);
JSONObject object = jsonObject.getJSONObject("data");
BsOrderMeituan orderMeiTuan = bsOrderMeiTuanService.findOrderMeiTuanBySqtBizOrderId(object.getString("sqtBizOrderId"));
if (orderMeiTuan != null) {
bsOrderMeiTuanService.orderFinish(orderMeiTuan.getChildOrderNo());
}
JSONObject data = new JSONObject();
data.put("status", 0);
data.put("msg", "成功");
data.put("data", new JSONObject());
log.info("============订单状态变更回调End=============");
return data;
} catch (Exception e) {
log.error("WechatPayController --> wechatNotify() error!", e);
return e;
}
}
}

@ -311,4 +311,26 @@
<appender-ref ref="HaiOilLog" />
</logger>
<!-- 嗨加油接口 -->
<!--京东接口 -->
<appender name="JdLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/JdLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/JdLog/JdLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.jd.JdService" level="INFO">
<appender-ref ref="JdLog" />
</logger>
<!-- 嗨加油接口 -->
</configuration>

@ -263,6 +263,13 @@
<version>1.0.21</version>
<systemPath>${basedir}/lib/open-platform-sdk-1.0.21.jar</systemPath>
</dependency>
<dependency>
<groupId>jd.skd</groupId>
<artifactId>jd-open-sdk</artifactId>
<scope>system</scope>
<version>2.0</version>
<systemPath>${basedir}/lib/open-api-sdk-2.0-jd.jar</systemPath>
</dependency>
</dependencies>
<build>
<resources>

@ -48,7 +48,7 @@ public class DateUtil {
return str;
}
public static Date long2Date(Long time) throws Exception{
public static Date long2Date(Long time){
if(time != null){
return new Date(time);
}else{

@ -0,0 +1,113 @@
package com.hfkj.common.utils;
import javafx.util.Pair;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
import java.nio.charset.StandardCharsets;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
public final class RsaCoderUtils {
/**
* 生成公私钥
*
* @return
* @throws NoSuchAlgorithmException
*/
public static Pair<String, String> genKeyPair() throws NoSuchAlgorithmException {
// KeyPairGenerator类用于生成公钥和私钥对,基于RSA算法生成对象
KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA");
// 初始化密钥对生成器,密钥大小为96-1024位
keyPairGen.initialize(1024, new SecureRandom());
// 生成一个密钥对,保存在keyPair中
KeyPair keyPair = keyPairGen.generateKeyPair();
// 得到私钥
RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
// 得到公钥
RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
String publicKeyString = new String(Base64.encodeBase64(publicKey.getEncoded()));
// 得到私钥字符串
String privateKeyString = new String(Base64.encodeBase64((privateKey.getEncoded())));
return new Pair<>(publicKeyString, privateKeyString);
}
/**
* RSA私钥加密
*
* @param str 加密字符串
* @param privateKey 私钥
* @return 密文
* @throws Exception 加密过程中的异常信息
*/
public static String encryptByPrivateKey(String str, String privateKey) throws Exception {
//base64编码的公钥
byte[] decoded = Base64.decodeBase64(privateKey);
RSAPrivateKey priKey = (RSAPrivateKey) KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(decoded));
//RSA解密
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, priKey);
return Base64.encodeBase64String(cipher.doFinal(str.getBytes(StandardCharsets.UTF_8)));
}
/**
* RSA公钥加密
*
* @param str 加密字符串
* @return 密文
* @throws Exception 加密过程中的异常信息
*/
public static String encryptByPublicKey(String str, String publicKey) throws Exception {
//base64编码的公钥
byte[] decoded = Base64.decodeBase64(publicKey);
RSAPublicKey pubKey = (RSAPublicKey) KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(decoded));
//RSA加密
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, pubKey);
return Base64.encodeBase64String(cipher.doFinal(str.getBytes(StandardCharsets.UTF_8)));
}
/**
* RSA公钥解密
*
* @param str 加密字符串
* @param publicKey 公钥
* @return 铭文
* @throws Exception 解密过程中的异常信息
*/
public static String decryptByPublicKey(String str, String publicKey) throws Exception {
//64位解码加密后的字符串
byte[] inputByte = Base64.decodeBase64(str.getBytes(StandardCharsets.UTF_8));
//base64编码的私钥
byte[] decoded = Base64.decodeBase64(publicKey);
RSAPublicKey pubKey = (RSAPublicKey) KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(decoded));
//RSA加密
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, pubKey);
return new String(cipher.doFinal(inputByte));
}
/**
* RSA私钥解密
*
* @param str 加密字符串
* @return 铭文
* @throws Exception 解密过程中的异常信息
*/
public static String decryptByPrivateKey(String str, String privateKey) throws Exception {
//64位解码加密后的字符串
byte[] inputByte = Base64.decodeBase64(str.getBytes(StandardCharsets.UTF_8));
//base64编码的私钥
byte[] decoded = Base64.decodeBase64(privateKey);
RSAPrivateKey priKey = (RSAPrivateKey) KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(decoded));
//RSA解密
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, priKey);
return new String(cipher.doFinal(inputByte));
}
}

@ -134,7 +134,7 @@ public class CommonSysConfig {
/**
* 美团接口请求参数
*/
private String mtNotifyUrl;
private String entId;
private String mtAccessKey;
private String mtSecretKey;
private String mtPostUrl;
@ -153,4 +153,11 @@ public class CommonSysConfig {
private String haiOilAppid;
private String haiOilAppSecret;
/**
* 京东请求参数
*/
private String jDPostUrl;
private String jDAppKey;
private String jDAppSecret;
}

@ -40,20 +40,20 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt {
@Insert({
"insert into goods_shopping_cart (goods_id, goods_type, ",
"user_id, title, img, ",
"specs_name, specs_id, ",
"num, price, whether_check, ",
"lose_efficacy, create_time, ",
"update_time, mer_id, ",
"mer_name, `status`, ",
"`source`, user_id, title, ",
"img, specs_name, ",
"specs_id, num, price, ",
"whether_check, lose_efficacy, ",
"create_time, update_time, ",
"mer_id, mer_name, `status`, ",
"ext_1, ext_2, ext_3)",
"values (#{goodsId,jdbcType=BIGINT}, #{goodsType,jdbcType=INTEGER}, ",
"#{userId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, ",
"#{specsName,jdbcType=VARCHAR}, #{specsId,jdbcType=BIGINT}, ",
"#{num,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{whetherCheck,jdbcType=BIT}, ",
"#{loseEfficacy,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{merId,jdbcType=BIGINT}, ",
"#{merName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{source,jdbcType=INTEGER}, #{userId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, ",
"#{img,jdbcType=VARCHAR}, #{specsName,jdbcType=VARCHAR}, ",
"#{specsId,jdbcType=BIGINT}, #{num,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ",
"#{whetherCheck,jdbcType=BIT}, #{loseEfficacy,jdbcType=BIT}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
@ -68,6 +68,7 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt {
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER),
@Result(column="source", property="source", jdbcType=JdbcType.INTEGER),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@ -90,9 +91,9 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt {
@Select({
"select",
"id, goods_id, goods_type, user_id, title, img, specs_name, specs_id, num, price, ",
"whether_check, lose_efficacy, create_time, update_time, mer_id, mer_name, `status`, ",
"ext_1, ext_2, ext_3",
"id, goods_id, goods_type, `source`, user_id, title, img, specs_name, specs_id, ",
"num, price, whether_check, lose_efficacy, create_time, update_time, mer_id, ",
"mer_name, `status`, ext_1, ext_2, ext_3",
"from goods_shopping_cart",
"where id = #{id,jdbcType=BIGINT}"
})
@ -100,6 +101,7 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt {
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER),
@Result(column="source", property="source", jdbcType=JdbcType.INTEGER),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@ -133,6 +135,7 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt {
"update goods_shopping_cart",
"set goods_id = #{goodsId,jdbcType=BIGINT},",
"goods_type = #{goodsType,jdbcType=INTEGER},",
"`source` = #{source,jdbcType=INTEGER},",
"user_id = #{userId,jdbcType=BIGINT},",
"title = #{title,jdbcType=VARCHAR},",
"img = #{img,jdbcType=VARCHAR},",
@ -153,4 +156,4 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt {
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(GoodsShoppingCart record);
}
}

@ -36,6 +36,10 @@ public class GoodsShoppingCartSqlProvider {
sql.VALUES("goods_type", "#{goodsType,jdbcType=INTEGER}");
}
if (record.getSource() != null) {
sql.VALUES("`source`", "#{source,jdbcType=INTEGER}");
}
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
}
@ -116,6 +120,7 @@ public class GoodsShoppingCartSqlProvider {
}
sql.SELECT("goods_id");
sql.SELECT("goods_type");
sql.SELECT("`source`");
sql.SELECT("user_id");
sql.SELECT("title");
sql.SELECT("img");
@ -162,6 +167,10 @@ public class GoodsShoppingCartSqlProvider {
sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}");
}
if (record.getSource() != null) {
sql.SET("`source` = #{record.source,jdbcType=INTEGER}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
}
@ -241,6 +250,7 @@ public class GoodsShoppingCartSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}");
sql.SET("`source` = #{record.source,jdbcType=INTEGER}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("title = #{record.title,jdbcType=VARCHAR}");
sql.SET("img = #{record.img,jdbcType=VARCHAR}");
@ -276,6 +286,10 @@ public class GoodsShoppingCartSqlProvider {
sql.SET("goods_type = #{goodsType,jdbcType=INTEGER}");
}
if (record.getSource() != null) {
sql.SET("`source` = #{source,jdbcType=INTEGER}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
@ -441,4 +455,4 @@ public class GoodsShoppingCartSqlProvider {
sql.WHERE(sb.toString());
}
}
}
}

@ -41,19 +41,24 @@ public interface GoodsUserAddressMapper extends GoodsUserAddressMapperExt {
@Insert({
"insert into goods_user_address (user_id, consignee, ",
"phone, address, ",
"region_id, region_name, ",
"whether_default, create_time, ",
"update_time, op_id, ",
"op_name, ext_1, ext_2, ",
"ext_3)",
"values " +
"(#{userId,jdbcType=BIGINT}, #{consignee,jdbcType=VARCHAR}, ",
"province_id, province_name, ",
"city_id, city_name, ",
"county_id, county_name, ",
"town_id, town_name, ",
"region_name, whether_default, ",
"create_time, update_time, ",
"op_id, op_name, ext_1, ",
"ext_2, ext_3)",
"values (#{userId,jdbcType=BIGINT}, #{consignee,jdbcType=VARCHAR}, ",
"#{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ",
"#{regionId,jdbcType=VARCHAR}, #{regionName,jdbcType=VARCHAR}, ",
"#{whetherDefault,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ",
"#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR})"
"#{provinceId,jdbcType=BIGINT}, #{provinceName,jdbcType=VARCHAR}, ",
"#{cityId,jdbcType=BIGINT}, #{cityName,jdbcType=VARCHAR}, ",
"#{countyId,jdbcType=BIGINT}, #{countyName,jdbcType=VARCHAR}, ",
"#{townId,jdbcType=BIGINT}, #{townName,jdbcType=VARCHAR}, ",
"#{regionName,jdbcType=VARCHAR}, #{whetherDefault,jdbcType=BIT}, ",
"#{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(GoodsUserAddress record);
@ -69,7 +74,14 @@ public interface GoodsUserAddressMapper extends GoodsUserAddressMapperExt {
@Result(column="consignee", property="consignee", jdbcType=JdbcType.VARCHAR),
@Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR),
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR),
@Result(column="province_id", property="provinceId", jdbcType=JdbcType.BIGINT),
@Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
@Result(column="city_id", property="cityId", jdbcType=JdbcType.BIGINT),
@Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
@Result(column="county_id", property="countyId", jdbcType=JdbcType.BIGINT),
@Result(column="county_name", property="countyName", jdbcType=JdbcType.VARCHAR),
@Result(column="town_id", property="townId", jdbcType=JdbcType.BIGINT),
@Result(column="town_name", property="townName", jdbcType=JdbcType.VARCHAR),
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR),
@Result(column="whether_default", property="whetherDefault", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -84,7 +96,8 @@ public interface GoodsUserAddressMapper extends GoodsUserAddressMapperExt {
@Select({
"select",
"id, user_id, consignee, phone, address, region_id, region_name, whether_default, ",
"id, user_id, consignee, phone, address, province_id, province_name, city_id, ",
"city_name, county_id, county_name, town_id, town_name, region_name, whether_default, ",
"create_time, update_time, op_id, op_name, ext_1, ext_2, ext_3",
"from goods_user_address",
"where id = #{id,jdbcType=BIGINT}"
@ -95,7 +108,14 @@ public interface GoodsUserAddressMapper extends GoodsUserAddressMapperExt {
@Result(column="consignee", property="consignee", jdbcType=JdbcType.VARCHAR),
@Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR),
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR),
@Result(column="province_id", property="provinceId", jdbcType=JdbcType.BIGINT),
@Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
@Result(column="city_id", property="cityId", jdbcType=JdbcType.BIGINT),
@Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
@Result(column="county_id", property="countyId", jdbcType=JdbcType.BIGINT),
@Result(column="county_name", property="countyName", jdbcType=JdbcType.VARCHAR),
@Result(column="town_id", property="townId", jdbcType=JdbcType.BIGINT),
@Result(column="town_name", property="townName", jdbcType=JdbcType.VARCHAR),
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR),
@Result(column="whether_default", property="whetherDefault", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -123,7 +143,14 @@ public interface GoodsUserAddressMapper extends GoodsUserAddressMapperExt {
"consignee = #{consignee,jdbcType=VARCHAR},",
"phone = #{phone,jdbcType=VARCHAR},",
"address = #{address,jdbcType=VARCHAR},",
"region_id = #{regionId,jdbcType=VARCHAR},",
"province_id = #{provinceId,jdbcType=BIGINT},",
"province_name = #{provinceName,jdbcType=VARCHAR},",
"city_id = #{cityId,jdbcType=BIGINT},",
"city_name = #{cityName,jdbcType=VARCHAR},",
"county_id = #{countyId,jdbcType=BIGINT},",
"county_name = #{countyName,jdbcType=VARCHAR},",
"town_id = #{townId,jdbcType=BIGINT},",
"town_name = #{townName,jdbcType=VARCHAR},",
"region_name = #{regionName,jdbcType=VARCHAR},",
"whether_default = #{whetherDefault,jdbcType=BIT},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",

@ -44,8 +44,36 @@ public class GoodsUserAddressSqlProvider {
sql.VALUES("address", "#{address,jdbcType=VARCHAR}");
}
if (record.getRegionId() != null) {
sql.VALUES("region_id", "#{regionId,jdbcType=VARCHAR}");
if (record.getProvinceId() != null) {
sql.VALUES("province_id", "#{provinceId,jdbcType=BIGINT}");
}
if (record.getProvinceName() != null) {
sql.VALUES("province_name", "#{provinceName,jdbcType=VARCHAR}");
}
if (record.getCityId() != null) {
sql.VALUES("city_id", "#{cityId,jdbcType=BIGINT}");
}
if (record.getCityName() != null) {
sql.VALUES("city_name", "#{cityName,jdbcType=VARCHAR}");
}
if (record.getCountyId() != null) {
sql.VALUES("county_id", "#{countyId,jdbcType=BIGINT}");
}
if (record.getCountyName() != null) {
sql.VALUES("county_name", "#{countyName,jdbcType=VARCHAR}");
}
if (record.getTownId() != null) {
sql.VALUES("town_id", "#{townId,jdbcType=BIGINT}");
}
if (record.getTownName() != null) {
sql.VALUES("town_name", "#{townName,jdbcType=VARCHAR}");
}
if (record.getRegionName() != null) {
@ -98,7 +126,14 @@ public class GoodsUserAddressSqlProvider {
sql.SELECT("consignee");
sql.SELECT("phone");
sql.SELECT("address");
sql.SELECT("region_id");
sql.SELECT("province_id");
sql.SELECT("province_name");
sql.SELECT("city_id");
sql.SELECT("city_name");
sql.SELECT("county_id");
sql.SELECT("county_name");
sql.SELECT("town_id");
sql.SELECT("town_name");
sql.SELECT("region_name");
sql.SELECT("whether_default");
sql.SELECT("create_time");
@ -145,8 +180,36 @@ public class GoodsUserAddressSqlProvider {
sql.SET("address = #{record.address,jdbcType=VARCHAR}");
}
if (record.getRegionId() != null) {
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}");
if (record.getProvinceId() != null) {
sql.SET("province_id = #{record.provinceId,jdbcType=BIGINT}");
}
if (record.getProvinceName() != null) {
sql.SET("province_name = #{record.provinceName,jdbcType=VARCHAR}");
}
if (record.getCityId() != null) {
sql.SET("city_id = #{record.cityId,jdbcType=BIGINT}");
}
if (record.getCityName() != null) {
sql.SET("city_name = #{record.cityName,jdbcType=VARCHAR}");
}
if (record.getCountyId() != null) {
sql.SET("county_id = #{record.countyId,jdbcType=BIGINT}");
}
if (record.getCountyName() != null) {
sql.SET("county_name = #{record.countyName,jdbcType=VARCHAR}");
}
if (record.getTownId() != null) {
sql.SET("town_id = #{record.townId,jdbcType=BIGINT}");
}
if (record.getTownName() != null) {
sql.SET("town_name = #{record.townName,jdbcType=VARCHAR}");
}
if (record.getRegionName() != null) {
@ -198,7 +261,14 @@ public class GoodsUserAddressSqlProvider {
sql.SET("consignee = #{record.consignee,jdbcType=VARCHAR}");
sql.SET("phone = #{record.phone,jdbcType=VARCHAR}");
sql.SET("address = #{record.address,jdbcType=VARCHAR}");
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}");
sql.SET("province_id = #{record.provinceId,jdbcType=BIGINT}");
sql.SET("province_name = #{record.provinceName,jdbcType=VARCHAR}");
sql.SET("city_id = #{record.cityId,jdbcType=BIGINT}");
sql.SET("city_name = #{record.cityName,jdbcType=VARCHAR}");
sql.SET("county_id = #{record.countyId,jdbcType=BIGINT}");
sql.SET("county_name = #{record.countyName,jdbcType=VARCHAR}");
sql.SET("town_id = #{record.townId,jdbcType=BIGINT}");
sql.SET("town_name = #{record.townName,jdbcType=VARCHAR}");
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}");
sql.SET("whether_default = #{record.whetherDefault,jdbcType=BIT}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
@ -234,8 +304,36 @@ public class GoodsUserAddressSqlProvider {
sql.SET("address = #{address,jdbcType=VARCHAR}");
}
if (record.getRegionId() != null) {
sql.SET("region_id = #{regionId,jdbcType=VARCHAR}");
if (record.getProvinceId() != null) {
sql.SET("province_id = #{provinceId,jdbcType=BIGINT}");
}
if (record.getProvinceName() != null) {
sql.SET("province_name = #{provinceName,jdbcType=VARCHAR}");
}
if (record.getCityId() != null) {
sql.SET("city_id = #{cityId,jdbcType=BIGINT}");
}
if (record.getCityName() != null) {
sql.SET("city_name = #{cityName,jdbcType=VARCHAR}");
}
if (record.getCountyId() != null) {
sql.SET("county_id = #{countyId,jdbcType=BIGINT}");
}
if (record.getCountyName() != null) {
sql.SET("county_name = #{countyName,jdbcType=VARCHAR}");
}
if (record.getTownId() != null) {
sql.SET("town_id = #{townId,jdbcType=BIGINT}");
}
if (record.getTownName() != null) {
sql.SET("town_name = #{townName,jdbcType=VARCHAR}");
}
if (record.getRegionName() != null) {

@ -29,6 +29,11 @@ public class GoodsShoppingCart implements Serializable {
*/
private Integer goodsType;
/**
* 产品来源1.内部虚拟商品 2: 娱尚会员充值 4.贵州中石化 5.重庆中石油 6.比邻星停车券 7.四川中石油 10.中油优途中石油
*/
private Integer source;
/**
* 用户编号
*/
@ -140,6 +145,14 @@ public class GoodsShoppingCart implements Serializable {
this.goodsType = goodsType;
}
public Integer getSource() {
return source;
}
public void setSource(Integer source) {
this.source = source;
}
public Long getUserId() {
return userId;
}
@ -291,6 +304,7 @@ public class GoodsShoppingCart implements Serializable {
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
&& (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType()))
&& (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
@ -317,6 +331,7 @@ public class GoodsShoppingCart implements Serializable {
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode());
result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
@ -346,6 +361,7 @@ public class GoodsShoppingCart implements Serializable {
sb.append(", id=").append(id);
sb.append(", goodsId=").append(goodsId);
sb.append(", goodsType=").append(goodsType);
sb.append(", source=").append(source);
sb.append(", userId=").append(userId);
sb.append(", title=").append(title);
sb.append(", img=").append(img);
@ -367,4 +383,4 @@ public class GoodsShoppingCart implements Serializable {
sb.append("]");
return sb.toString();
}
}
}

@ -306,6 +306,66 @@ public class GoodsShoppingCartExample {
return (Criteria) this;
}
public Criteria andSourceIsNull() {
addCriterion("`source` is null");
return (Criteria) this;
}
public Criteria andSourceIsNotNull() {
addCriterion("`source` is not null");
return (Criteria) this;
}
public Criteria andSourceEqualTo(Integer value) {
addCriterion("`source` =", value, "source");
return (Criteria) this;
}
public Criteria andSourceNotEqualTo(Integer value) {
addCriterion("`source` <>", value, "source");
return (Criteria) this;
}
public Criteria andSourceGreaterThan(Integer value) {
addCriterion("`source` >", value, "source");
return (Criteria) this;
}
public Criteria andSourceGreaterThanOrEqualTo(Integer value) {
addCriterion("`source` >=", value, "source");
return (Criteria) this;
}
public Criteria andSourceLessThan(Integer value) {
addCriterion("`source` <", value, "source");
return (Criteria) this;
}
public Criteria andSourceLessThanOrEqualTo(Integer value) {
addCriterion("`source` <=", value, "source");
return (Criteria) this;
}
public Criteria andSourceIn(List<Integer> values) {
addCriterion("`source` in", values, "source");
return (Criteria) this;
}
public Criteria andSourceNotIn(List<Integer> values) {
addCriterion("`source` not in", values, "source");
return (Criteria) this;
}
public Criteria andSourceBetween(Integer value1, Integer value2) {
addCriterion("`source` between", value1, value2, "source");
return (Criteria) this;
}
public Criteria andSourceNotBetween(Integer value1, Integer value2) {
addCriterion("`source` not between", value1, value2, "source");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
@ -1491,4 +1551,4 @@ public class GoodsShoppingCartExample {
this(condition, value, secondValue, null);
}
}
}
}

@ -39,9 +39,44 @@ public class GoodsUserAddress implements Serializable {
private String address;
/**
* 区域编码
* 一级地址编号
*/
private String regionId;
private Long provinceId;
/**
* 一级地址名称
*/
private String provinceName;
/**
* 二级地址编号
*/
private Long cityId;
/**
* 二级地址名称
*/
private String cityName;
/**
* 三级地址编号
*/
private Long countyId;
/**
* 三级地址名称
*/
private String countyName;
/**
* 四级地址编号
*/
private Long townId;
/**
* 四级地址名称
*/
private String townName;
/**
* 区域名称
@ -130,12 +165,68 @@ public class GoodsUserAddress implements Serializable {
this.address = address;
}
public String getRegionId() {
return regionId;
public Long getProvinceId() {
return provinceId;
}
public void setProvinceId(Long provinceId) {
this.provinceId = provinceId;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public Long getCityId() {
return cityId;
}
public void setCityId(Long cityId) {
this.cityId = cityId;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public Long getCountyId() {
return countyId;
}
public void setCountyId(Long countyId) {
this.countyId = countyId;
}
public String getCountyName() {
return countyName;
}
public void setCountyName(String countyName) {
this.countyName = countyName;
}
public Long getTownId() {
return townId;
}
public void setTownId(Long townId) {
this.townId = townId;
}
public String getTownName() {
return townName;
}
public void setRegionId(String regionId) {
this.regionId = regionId;
public void setTownName(String townName) {
this.townName = townName;
}
public String getRegionName() {
@ -227,7 +318,14 @@ public class GoodsUserAddress implements Serializable {
&& (this.getConsignee() == null ? other.getConsignee() == null : this.getConsignee().equals(other.getConsignee()))
&& (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
&& (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId()))
&& (this.getProvinceId() == null ? other.getProvinceId() == null : this.getProvinceId().equals(other.getProvinceId()))
&& (this.getProvinceName() == null ? other.getProvinceName() == null : this.getProvinceName().equals(other.getProvinceName()))
&& (this.getCityId() == null ? other.getCityId() == null : this.getCityId().equals(other.getCityId()))
&& (this.getCityName() == null ? other.getCityName() == null : this.getCityName().equals(other.getCityName()))
&& (this.getCountyId() == null ? other.getCountyId() == null : this.getCountyId().equals(other.getCountyId()))
&& (this.getCountyName() == null ? other.getCountyName() == null : this.getCountyName().equals(other.getCountyName()))
&& (this.getTownId() == null ? other.getTownId() == null : this.getTownId().equals(other.getTownId()))
&& (this.getTownName() == null ? other.getTownName() == null : this.getTownName().equals(other.getTownName()))
&& (this.getRegionName() == null ? other.getRegionName() == null : this.getRegionName().equals(other.getRegionName()))
&& (this.getWhetherDefault() == null ? other.getWhetherDefault() == null : this.getWhetherDefault().equals(other.getWhetherDefault()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
@ -248,7 +346,14 @@ public class GoodsUserAddress implements Serializable {
result = prime * result + ((getConsignee() == null) ? 0 : getConsignee().hashCode());
result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode());
result = prime * result + ((getProvinceId() == null) ? 0 : getProvinceId().hashCode());
result = prime * result + ((getProvinceName() == null) ? 0 : getProvinceName().hashCode());
result = prime * result + ((getCityId() == null) ? 0 : getCityId().hashCode());
result = prime * result + ((getCityName() == null) ? 0 : getCityName().hashCode());
result = prime * result + ((getCountyId() == null) ? 0 : getCountyId().hashCode());
result = prime * result + ((getCountyName() == null) ? 0 : getCountyName().hashCode());
result = prime * result + ((getTownId() == null) ? 0 : getTownId().hashCode());
result = prime * result + ((getTownName() == null) ? 0 : getTownName().hashCode());
result = prime * result + ((getRegionName() == null) ? 0 : getRegionName().hashCode());
result = prime * result + ((getWhetherDefault() == null) ? 0 : getWhetherDefault().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
@ -272,7 +377,14 @@ public class GoodsUserAddress implements Serializable {
sb.append(", consignee=").append(consignee);
sb.append(", phone=").append(phone);
sb.append(", address=").append(address);
sb.append(", regionId=").append(regionId);
sb.append(", provinceId=").append(provinceId);
sb.append(", provinceName=").append(provinceName);
sb.append(", cityId=").append(cityId);
sb.append(", cityName=").append(cityName);
sb.append(", countyId=").append(countyId);
sb.append(", countyName=").append(countyName);
sb.append(", townId=").append(townId);
sb.append(", townName=").append(townName);
sb.append(", regionName=").append(regionName);
sb.append(", whetherDefault=").append(whetherDefault);
sb.append(", createTime=").append(createTime);

@ -455,73 +455,523 @@ public class GoodsUserAddressExample {
return (Criteria) this;
}
public Criteria andRegionIdIsNull() {
addCriterion("region_id is null");
public Criteria andProvinceIdIsNull() {
addCriterion("province_id is null");
return (Criteria) this;
}
public Criteria andRegionIdIsNotNull() {
addCriterion("region_id is not null");
public Criteria andProvinceIdIsNotNull() {
addCriterion("province_id is not null");
return (Criteria) this;
}
public Criteria andRegionIdEqualTo(String value) {
addCriterion("region_id =", value, "regionId");
public Criteria andProvinceIdEqualTo(Long value) {
addCriterion("province_id =", value, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdNotEqualTo(String value) {
addCriterion("region_id <>", value, "regionId");
public Criteria andProvinceIdNotEqualTo(Long value) {
addCriterion("province_id <>", value, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdGreaterThan(String value) {
addCriterion("region_id >", value, "regionId");
public Criteria andProvinceIdGreaterThan(Long value) {
addCriterion("province_id >", value, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdGreaterThanOrEqualTo(String value) {
addCriterion("region_id >=", value, "regionId");
public Criteria andProvinceIdGreaterThanOrEqualTo(Long value) {
addCriterion("province_id >=", value, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdLessThan(String value) {
addCriterion("region_id <", value, "regionId");
public Criteria andProvinceIdLessThan(Long value) {
addCriterion("province_id <", value, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdLessThanOrEqualTo(String value) {
addCriterion("region_id <=", value, "regionId");
public Criteria andProvinceIdLessThanOrEqualTo(Long value) {
addCriterion("province_id <=", value, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdLike(String value) {
addCriterion("region_id like", value, "regionId");
public Criteria andProvinceIdIn(List<Long> values) {
addCriterion("province_id in", values, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdNotLike(String value) {
addCriterion("region_id not like", value, "regionId");
public Criteria andProvinceIdNotIn(List<Long> values) {
addCriterion("province_id not in", values, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdIn(List<String> values) {
addCriterion("region_id in", values, "regionId");
public Criteria andProvinceIdBetween(Long value1, Long value2) {
addCriterion("province_id between", value1, value2, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdNotIn(List<String> values) {
addCriterion("region_id not in", values, "regionId");
public Criteria andProvinceIdNotBetween(Long value1, Long value2) {
addCriterion("province_id not between", value1, value2, "provinceId");
return (Criteria) this;
}
public Criteria andRegionIdBetween(String value1, String value2) {
addCriterion("region_id between", value1, value2, "regionId");
public Criteria andProvinceNameIsNull() {
addCriterion("province_name is null");
return (Criteria) this;
}
public Criteria andRegionIdNotBetween(String value1, String value2) {
addCriterion("region_id not between", value1, value2, "regionId");
public Criteria andProvinceNameIsNotNull() {
addCriterion("province_name is not null");
return (Criteria) this;
}
public Criteria andProvinceNameEqualTo(String value) {
addCriterion("province_name =", value, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameNotEqualTo(String value) {
addCriterion("province_name <>", value, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameGreaterThan(String value) {
addCriterion("province_name >", value, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameGreaterThanOrEqualTo(String value) {
addCriterion("province_name >=", value, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameLessThan(String value) {
addCriterion("province_name <", value, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameLessThanOrEqualTo(String value) {
addCriterion("province_name <=", value, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameLike(String value) {
addCriterion("province_name like", value, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameNotLike(String value) {
addCriterion("province_name not like", value, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameIn(List<String> values) {
addCriterion("province_name in", values, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameNotIn(List<String> values) {
addCriterion("province_name not in", values, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameBetween(String value1, String value2) {
addCriterion("province_name between", value1, value2, "provinceName");
return (Criteria) this;
}
public Criteria andProvinceNameNotBetween(String value1, String value2) {
addCriterion("province_name not between", value1, value2, "provinceName");
return (Criteria) this;
}
public Criteria andCityIdIsNull() {
addCriterion("city_id is null");
return (Criteria) this;
}
public Criteria andCityIdIsNotNull() {
addCriterion("city_id is not null");
return (Criteria) this;
}
public Criteria andCityIdEqualTo(Long value) {
addCriterion("city_id =", value, "cityId");
return (Criteria) this;
}
public Criteria andCityIdNotEqualTo(Long value) {
addCriterion("city_id <>", value, "cityId");
return (Criteria) this;
}
public Criteria andCityIdGreaterThan(Long value) {
addCriterion("city_id >", value, "cityId");
return (Criteria) this;
}
public Criteria andCityIdGreaterThanOrEqualTo(Long value) {
addCriterion("city_id >=", value, "cityId");
return (Criteria) this;
}
public Criteria andCityIdLessThan(Long value) {
addCriterion("city_id <", value, "cityId");
return (Criteria) this;
}
public Criteria andCityIdLessThanOrEqualTo(Long value) {
addCriterion("city_id <=", value, "cityId");
return (Criteria) this;
}
public Criteria andCityIdIn(List<Long> values) {
addCriterion("city_id in", values, "cityId");
return (Criteria) this;
}
public Criteria andCityIdNotIn(List<Long> values) {
addCriterion("city_id not in", values, "cityId");
return (Criteria) this;
}
public Criteria andCityIdBetween(Long value1, Long value2) {
addCriterion("city_id between", value1, value2, "cityId");
return (Criteria) this;
}
public Criteria andCityIdNotBetween(Long value1, Long value2) {
addCriterion("city_id not between", value1, value2, "cityId");
return (Criteria) this;
}
public Criteria andCityNameIsNull() {
addCriterion("city_name is null");
return (Criteria) this;
}
public Criteria andCityNameIsNotNull() {
addCriterion("city_name is not null");
return (Criteria) this;
}
public Criteria andCityNameEqualTo(String value) {
addCriterion("city_name =", value, "cityName");
return (Criteria) this;
}
public Criteria andCityNameNotEqualTo(String value) {
addCriterion("city_name <>", value, "cityName");
return (Criteria) this;
}
public Criteria andCityNameGreaterThan(String value) {
addCriterion("city_name >", value, "cityName");
return (Criteria) this;
}
public Criteria andCityNameGreaterThanOrEqualTo(String value) {
addCriterion("city_name >=", value, "cityName");
return (Criteria) this;
}
public Criteria andCityNameLessThan(String value) {
addCriterion("city_name <", value, "cityName");
return (Criteria) this;
}
public Criteria andCityNameLessThanOrEqualTo(String value) {
addCriterion("city_name <=", value, "cityName");
return (Criteria) this;
}
public Criteria andCityNameLike(String value) {
addCriterion("city_name like", value, "cityName");
return (Criteria) this;
}
public Criteria andCityNameNotLike(String value) {
addCriterion("city_name not like", value, "cityName");
return (Criteria) this;
}
public Criteria andCityNameIn(List<String> values) {
addCriterion("city_name in", values, "cityName");
return (Criteria) this;
}
public Criteria andCityNameNotIn(List<String> values) {
addCriterion("city_name not in", values, "cityName");
return (Criteria) this;
}
public Criteria andCityNameBetween(String value1, String value2) {
addCriterion("city_name between", value1, value2, "cityName");
return (Criteria) this;
}
public Criteria andCityNameNotBetween(String value1, String value2) {
addCriterion("city_name not between", value1, value2, "cityName");
return (Criteria) this;
}
public Criteria andCountyIdIsNull() {
addCriterion("county_id is null");
return (Criteria) this;
}
public Criteria andCountyIdIsNotNull() {
addCriterion("county_id is not null");
return (Criteria) this;
}
public Criteria andCountyIdEqualTo(Long value) {
addCriterion("county_id =", value, "countyId");
return (Criteria) this;
}
public Criteria andCountyIdNotEqualTo(Long value) {
addCriterion("county_id <>", value, "countyId");
return (Criteria) this;
}
public Criteria andCountyIdGreaterThan(Long value) {
addCriterion("county_id >", value, "countyId");
return (Criteria) this;
}
public Criteria andCountyIdGreaterThanOrEqualTo(Long value) {
addCriterion("county_id >=", value, "countyId");
return (Criteria) this;
}
public Criteria andCountyIdLessThan(Long value) {
addCriterion("county_id <", value, "countyId");
return (Criteria) this;
}
public Criteria andCountyIdLessThanOrEqualTo(Long value) {
addCriterion("county_id <=", value, "countyId");
return (Criteria) this;
}
public Criteria andCountyIdIn(List<Long> values) {
addCriterion("county_id in", values, "countyId");
return (Criteria) this;
}
public Criteria andCountyIdNotIn(List<Long> values) {
addCriterion("county_id not in", values, "countyId");
return (Criteria) this;
}
public Criteria andCountyIdBetween(Long value1, Long value2) {
addCriterion("county_id between", value1, value2, "countyId");
return (Criteria) this;
}
public Criteria andCountyIdNotBetween(Long value1, Long value2) {
addCriterion("county_id not between", value1, value2, "countyId");
return (Criteria) this;
}
public Criteria andCountyNameIsNull() {
addCriterion("county_name is null");
return (Criteria) this;
}
public Criteria andCountyNameIsNotNull() {
addCriterion("county_name is not null");
return (Criteria) this;
}
public Criteria andCountyNameEqualTo(String value) {
addCriterion("county_name =", value, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameNotEqualTo(String value) {
addCriterion("county_name <>", value, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameGreaterThan(String value) {
addCriterion("county_name >", value, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameGreaterThanOrEqualTo(String value) {
addCriterion("county_name >=", value, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameLessThan(String value) {
addCriterion("county_name <", value, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameLessThanOrEqualTo(String value) {
addCriterion("county_name <=", value, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameLike(String value) {
addCriterion("county_name like", value, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameNotLike(String value) {
addCriterion("county_name not like", value, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameIn(List<String> values) {
addCriterion("county_name in", values, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameNotIn(List<String> values) {
addCriterion("county_name not in", values, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameBetween(String value1, String value2) {
addCriterion("county_name between", value1, value2, "countyName");
return (Criteria) this;
}
public Criteria andCountyNameNotBetween(String value1, String value2) {
addCriterion("county_name not between", value1, value2, "countyName");
return (Criteria) this;
}
public Criteria andTownIdIsNull() {
addCriterion("town_id is null");
return (Criteria) this;
}
public Criteria andTownIdIsNotNull() {
addCriterion("town_id is not null");
return (Criteria) this;
}
public Criteria andTownIdEqualTo(Long value) {
addCriterion("town_id =", value, "townId");
return (Criteria) this;
}
public Criteria andTownIdNotEqualTo(Long value) {
addCriterion("town_id <>", value, "townId");
return (Criteria) this;
}
public Criteria andTownIdGreaterThan(Long value) {
addCriterion("town_id >", value, "townId");
return (Criteria) this;
}
public Criteria andTownIdGreaterThanOrEqualTo(Long value) {
addCriterion("town_id >=", value, "townId");
return (Criteria) this;
}
public Criteria andTownIdLessThan(Long value) {
addCriterion("town_id <", value, "townId");
return (Criteria) this;
}
public Criteria andTownIdLessThanOrEqualTo(Long value) {
addCriterion("town_id <=", value, "townId");
return (Criteria) this;
}
public Criteria andTownIdIn(List<Long> values) {
addCriterion("town_id in", values, "townId");
return (Criteria) this;
}
public Criteria andTownIdNotIn(List<Long> values) {
addCriterion("town_id not in", values, "townId");
return (Criteria) this;
}
public Criteria andTownIdBetween(Long value1, Long value2) {
addCriterion("town_id between", value1, value2, "townId");
return (Criteria) this;
}
public Criteria andTownIdNotBetween(Long value1, Long value2) {
addCriterion("town_id not between", value1, value2, "townId");
return (Criteria) this;
}
public Criteria andTownNameIsNull() {
addCriterion("town_name is null");
return (Criteria) this;
}
public Criteria andTownNameIsNotNull() {
addCriterion("town_name is not null");
return (Criteria) this;
}
public Criteria andTownNameEqualTo(String value) {
addCriterion("town_name =", value, "townName");
return (Criteria) this;
}
public Criteria andTownNameNotEqualTo(String value) {
addCriterion("town_name <>", value, "townName");
return (Criteria) this;
}
public Criteria andTownNameGreaterThan(String value) {
addCriterion("town_name >", value, "townName");
return (Criteria) this;
}
public Criteria andTownNameGreaterThanOrEqualTo(String value) {
addCriterion("town_name >=", value, "townName");
return (Criteria) this;
}
public Criteria andTownNameLessThan(String value) {
addCriterion("town_name <", value, "townName");
return (Criteria) this;
}
public Criteria andTownNameLessThanOrEqualTo(String value) {
addCriterion("town_name <=", value, "townName");
return (Criteria) this;
}
public Criteria andTownNameLike(String value) {
addCriterion("town_name like", value, "townName");
return (Criteria) this;
}
public Criteria andTownNameNotLike(String value) {
addCriterion("town_name not like", value, "townName");
return (Criteria) this;
}
public Criteria andTownNameIn(List<String> values) {
addCriterion("town_name in", values, "townName");
return (Criteria) this;
}
public Criteria andTownNameNotIn(List<String> values) {
addCriterion("town_name not in", values, "townName");
return (Criteria) this;
}
public Criteria andTownNameBetween(String value1, String value2) {
addCriterion("town_name between", value1, value2, "townName");
return (Criteria) this;
}
public Criteria andTownNameNotBetween(String value1, String value2) {
addCriterion("town_name not between", value1, value2, "townName");
return (Criteria) this;
}

@ -0,0 +1,63 @@
package com.hfkj.entity;
import java.io.Serializable;
/**
* goods_user_address
* @author
*/
public class GoodsUserAddressWithBLOBs extends GoodsUserAddress implements Serializable {
/**
* 一级地址编号
*/
private String provinceId;
/**
* 二级地址编号
*/
private String cityId;
/**
* 三级地址编号
*/
private String countyId;
/**
* 四级地址编号
*/
private String townId;
private static final long serialVersionUID = 1L;
public String getProvinceId() {
return provinceId;
}
public void setProvinceId(String provinceId) {
this.provinceId = provinceId;
}
public String getCityId() {
return cityId;
}
public void setCityId(String cityId) {
this.cityId = cityId;
}
public String getCountyId() {
return countyId;
}
public void setCountyId(String countyId) {
this.countyId = countyId;
}
public String getTownId() {
return townId;
}
public void setTownId(String townId) {
this.townId = townId;
}
}

@ -0,0 +1,63 @@
package com.hfkj.jd;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.utils.HttpsUtils;
import com.hfkj.common.utils.RsaCoderUtils;
import com.hfkj.config.CommonSysConst;
import com.hfkj.meituan.MeiTuanService;
import com.jd.open.api.sdk.DefaultJdClient;
import com.jd.open.api.sdk.JdClient;
import org.apache.commons.codec.digest.DigestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URLEncoder;
import java.util.Map;
/**
* @ClassName JdService
* @Author Sum1Dream
* @Description 京东服务
* @Date 2024/10/11 下午3:25
**/
public class JdService {
private static Logger log = LoggerFactory.getLogger(JdService.class);
/**
* UTF_8
*/
public static final String UTF_8 = "utf-8";
/**
* 用户名
*/
private static final String USERNAME = "惠兑重庆VOP",
/**
* 明文密码后续需要通过RSA加密
*/
PLAINTEXT_PASSWORD = "hdcs1234",
/**
* 回调地址注册应用时配置的授权回调地址
*/
REDIRECT_URI = CommonSysConst.getSysConfig().getDomainName() + "/order/jdNotify/callbackToken",
/**
* RSA私钥
*/
PRIVATE_RSA_KEY = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMEtt0kF02YBxPXzXyqzCtr1zkuj8NXLiqqSCDAfU6zWB1T1GUEpCfNukPBeZ9nXGj+jbTom8RFllNXbnOkW01Zn2VoyePh8TRWQbToXi+i/JQ162GzpF0GdPsUhJSrB5Z2QzK4UVXXkpPHhQHR8NKQhvTRkoRLfOy+oXWL8PS2hAgMBAAECgYBySo/j/jRiZ62WLlUhuCg1/7P8AJSeiPwTiq6Zeg9RdJeF5jT43kTq54GNFO2wbpkzCYe4Hg4GUulJ1dLx/PUvYquRpM4jGznxDxBA10mNyjx0O+SHcY+ZlOYWIKhEq4MeeJhtHhoFrlgcMNIyofhRDbFzrRak48GrcZDQC4/cIQJBAPwxtEwMnetPveLExR1UsygdVKwoWoGNL5Hkhcx6b2N2Qapk5aHB5haUEXeg1ShrL4C/kE1lsMAIdpVS9lWd4x0CQQDEGASnnB2oPHjvNfj88klpYTvPJRi3ORQPtlfz36kv+29QFxB9Mt1u39ttopw5G2x7QvTtL542w878brrmS8lVAkEA4k7QFjZ0N8cVBLvCjrGFG4hGhT6pCPxjJa5GCtoLvttNzdRA5EkVaklw60LeRSj6NbSxj2Kjm498qj8KYoYOWQJATJhRISMy1mcgmdeMNUlycW4gjY4g9FigRG7mNgU0MeDVnwQTVcQLiGZ6cH2m5guXOSJzRz5lX2DmteWOrawGrQJBAMKLfeTnYkVpXw9MABcR/9L9myG3FKwOHBIqD0wK+QVahi9byFk8GFXD4OlBQ1ZSxHqsUuxWqLVSa3sWBCKpLo8=";
public static JSONObject getAccessToken() throws Exception {
String encodeRedirectUri = URLEncoder.encode(REDIRECT_URI, UTF_8);
String encodeUsername = URLEncoder.encode(USERNAME, UTF_8);
String md5Password = DigestUtils.md5Hex(PLAINTEXT_PASSWORD);
String ciphertextPassword = RsaCoderUtils.encryptByPrivateKey(md5Password, PRIVATE_RSA_KEY);
String encodePassword = URLEncoder.encode(ciphertextPassword, UTF_8);
JSONObject object = new JSONObject();
object.put("app_key", CommonSysConst.getSysConfig().getJDAppKey());
object.put("redirect_uri", encodeRedirectUri);
object.put("username", encodeUsername);
object.put("password", encodePassword);
object.put("response_type", "code");
object.put("scope", "snsapi_base");
return HttpsUtils.doGet("https://open-oauth.jd.com/oauth2/authorizeForVOP", object);
}
}

@ -34,7 +34,7 @@ public class MeiTuanService {
*/
public static JSONObject loginFree(Map<String , Object> map) throws Exception {
JSONObject object = doPostMeiTuanUrl("https://waimai-openapi.apigw.test.meituan.com/api/sqt/open/login/h5/loginFree/redirection?test_open_swimlane=test-open" , map);
JSONObject object = doPostMeiTuanUrl("login/h5/loginFree/redirection", map);
if (object.getBoolean("msg")) {
return object;
@ -44,6 +44,28 @@ public class MeiTuanService {
}
/**
* @MethodName queryDetail
* @Description: 查询订单
* @param map
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/9/26 下午2:08
*/
public static JSONObject queryDetail(Map<String , Object> map) {
try {
JSONObject object = request(CommonSysConst.getSysConfig().getMtPostUrl() + "order/queryDetail", map);
return JSONObject.parseObject(EncryptUtil.aesDecrypt(object.getString("data") , CommonSysConst.getSysConfig().getMtSecretKey()));
} catch (Exception e) {
log.info("响应错误信息:{}", e);
}
return null;
}
/**
* @MethodName paySuccess
* @Description: 支付成功通知接口
@ -90,23 +112,23 @@ public class MeiTuanService {
/**
* @MethodName doPostMeiTuanUrl
* @Description: 美团免登陆接口
* @param postUrl
* @Description: 请求
* @param url
* @param param
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/9/18 下午5:44
*/
public static JSONObject doPostMeiTuanUrl(String postUrl, Map<String,Object> param) throws Exception {
public static JSONObject doPostMeiTuanUrl(String url, Map<String,Object> param) throws Exception {
log.info("============ 美团请求-START =============");
param.put("accessKey", CommonSysConst.getSysConfig().getMtAccessKey());
param.put("content", EncryptUtil.aesEncrypt(JsonUtil.object2Json(param), CommonSysConst.getSysConfig().getMtSecretKey()));
log.info("请求接口:" + postUrl);
log.info("请求接口:" + url);
log.info("请求参数:" + JSONObject.toJSONString(param));
JSONObject response = HttpsUtils.doPostMeiTuanUrl(postUrl, JSONObject.toJSONString(param));
JSONObject response = HttpsUtils.doPostMeiTuanUrl(CommonSysConst.getSysConfig().getMtPostUrl() + url, JSONObject.toJSONString(param));
log.info("响应参数:" + response.toJSONString());
log.info("============ 美团请求-END ==============");

@ -0,0 +1,58 @@
package com.hfkj.model.order.orderExport;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName MerOrderSettlementDetailModel
* @Author Sum1Dream
* @Description 商户订单结算详情
* @Date 2024/9/29 上午10:50
**/
@Data
public class MerOrderSettlementDetailModel {
@ColumnWidth(50)
@ExcelProperty("商品名称")
public String goodsName;
@ColumnWidth(20)
@ExcelProperty("商户名称")
public String merName;
@ColumnWidth(20)
@ExcelProperty("业务类型")
public String businessType;
@ColumnWidth(20)
@ExcelProperty("登录平台")
public String platform;
@ColumnWidth(40)
@ExcelProperty("订单号")
public String orderNo;
@ColumnWidth(15)
@ExcelProperty("子订单号")
public String childOrderNo;
@ColumnWidth(20)
@ExcelProperty("业务信息")
public String business;
@ColumnWidth(20)
@ExcelProperty({"支付金额"})
public BigDecimal payRealPrice;
@ColumnWidth(20)
@ExcelProperty({"支付方式"})
public String payType;
@ColumnWidth(20)
@ExcelProperty("收货时间")
public String finishTime;
}

@ -0,0 +1,120 @@
package com.hfkj.model.order.orderExport;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName OrderGoodsExportModel
* @Author Sum1Dream
* @Description 实物订单导出
* @Date 2024/8/12 下午5:07
**/
@Data
public class OrderMeiTuanExportModel {
@ColumnWidth(50)
@ExcelProperty("商品名称")
public String goodsName;
@ColumnWidth(20)
@ExcelProperty("商户名称")
public String merName;
@ColumnWidth(20)
@ExcelProperty("类型名称")
public String goodsTypeName;
@ColumnWidth(20)
@ExcelProperty("品牌名称")
public String goodsBrandName;
@ColumnWidth(20)
@ExcelProperty("用户手机号")
public String userPhone;
@ColumnWidth(40)
@ExcelProperty("订单号")
public String orderNo;
@ColumnWidth(15)
@ExcelProperty("子订单号")
public String childOrderNo;
@ColumnWidth(20)
@ExcelProperty("物流单号")
public String logisticsNo;
@ColumnWidth(30)
@ExcelProperty("商品规格")
public String goodsSpecsName;
@ColumnWidth(20)
@ExcelProperty("商品价格")
public BigDecimal goodsPrice;
@ColumnWidth(20)
@ExcelProperty("购买数量")
public Integer goodsCount;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "订单金额"})
public BigDecimal totalPrice;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "总优惠"})
public BigDecimal totalDeductionPrice;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "优惠券优惠"})
public BigDecimal couponDiscountPrice;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "积分抵扣"})
public BigDecimal integralDiscountPrice;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "实付金额"})
public BigDecimal payRealPrice;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "支付渠道"})
public String payChannel;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "支付方式"})
public String payType;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "支付单号"})
public String paySerialNo;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "交易状态"})
public String tradeStatus;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "创建时间"})
public Date createTime;
@ColumnWidth(20)
@ExcelProperty({"交易信息", "支付时间"})
public Date payTime;
@ColumnWidth(20)
@ExcelProperty("物流状态")
public String logisticsStatusDesc;
@ColumnWidth(20)
@ExcelProperty("更新时间")
public Date updateTime;
@ColumnWidth(20)
@ExcelProperty("确认收货时间")
public Date finishTime;
}

@ -0,0 +1,39 @@
package com.hfkj.model.order.orderExport;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName MerOrderSettlementDetailModel
* @Author Sum1Dream
* @Description 商户订单结算详情
* @Date 2024/9/29 上午10:50
**/
@Data
public class OrderSettlementModel {
@ColumnWidth(40)
@ExcelProperty("商户名称")
public String merName;
@ColumnWidth(20)
@ExcelProperty("支付方式")
public String payType;
@ColumnWidth(20)
@ExcelProperty("业务类型")
public String businessType;
@ColumnWidth(20)
@ExcelProperty({"结算金额"})
public BigDecimal payRealPrice;
@ColumnWidth(30)
@ExcelProperty("结算日期")
public String time;
}

@ -0,0 +1,34 @@
package com.hfkj.model.order.orderExport;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName MerOrderSettlementDetailModel
* @Author Sum1Dream
* @Description 商户订单结算详情
* @Date 2024/9/29 上午10:50
**/
@Data
public class OrderSettlementSumModel {
@ColumnWidth(20)
@ExcelProperty("业务类型")
public String businessType;
@ColumnWidth(20)
@ExcelProperty("支付方式")
public String payType;
@ColumnWidth(20)
@ExcelProperty({"结算金额"})
public BigDecimal payRealPrice;
@ColumnWidth(30)
@ExcelProperty("结算日期")
public String time;
}

@ -41,4 +41,14 @@ public interface BsOrderCouponService {
*/
List<OrderCouponModel> getOrderList(Map<String,Object> param);
/**
* @MethodName getOrderCouponList
* @Description: 查询卡券订单列表
* @param map
* @return: java.util.List<com.hfkj.entity.BsOrderCoupon>
* @Author: Sum1Dream
* @Date: 2024/9/29 下午3:55
*/
List<BsOrderCoupon> getOrderCouponList(Map<String,Object> map);
}

@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -67,5 +68,28 @@ public class BsOrderCouponServiceImpl implements BsOrderCouponService {
return orderCouponMapper.getOrderList(param);
}
@Override
public List<BsOrderCoupon> getOrderCouponList(Map<String, Object> map) {
BsOrderCouponExample example = new BsOrderCouponExample();
BsOrderCouponExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "finishTimeS") != null) {
criteria.andUpdateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "finishTimeS")));
}
if (MapUtils.getLong(map, "finishTimeE") != null) {
criteria.andUpdateTimeLessThan(new Date(MapUtils.getLong(map, "finishTimeE")));
}
if (MapUtils.getLong(map, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId"));
}
if (MapUtils.getInteger(map, "payType") != null) {
criteria.andPayTypeEqualTo(MapUtils.getInteger(map, "payType"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "platform"))) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platform"));
}
criteria.andStatusEqualTo(2);
return orderCouponMapper.selectByExample(example);
}
}

@ -74,4 +74,15 @@ public interface BsOrderCinemaService {
* @Date: 2024/7/4 下午2:35
*/
List<BsOrderCinema> getList(Map<String , Object> map);
/**
* @MethodName getListFinish
* @Description:
* @param map
* @return: java.util.List<com.hfkj.entity.BsOrderCinema>
* @Author: Sum1Dream
* @Date: 2024/9/29 下午4:24
*/
List<BsOrderCinema> getListFinish(Map<String , Object> map);
}

@ -97,7 +97,7 @@ public interface BsOrderGoodsService {
* @return java.util.List<com.hfkj.entity.GoodsBrand>
*/
List<BsOrderGoods> getList(Map<String , Object> map);
List<BsOrderGoods> getList();
List<BsOrderGoods> getListFinish(Map<String , Object> map);
/**
* @Author Sum1Dream

@ -2,6 +2,9 @@ package com.hfkj.service.goods;
import com.hfkj.entity.BsOrderMeituan;
import java.util.List;
import java.util.Map;
public interface BsOrderMeiTuanService {
/**
@ -62,6 +65,35 @@ public interface BsOrderMeiTuanService {
*/
BsOrderMeituan findOrderMeiTuanByTradeNo(String tradeNo);
/**
* @MethodName findOrderMeiTuanBySqtBizOrderId
* @Description:
* @param sqtBizOrderId
* @return: com.hfkj.entity.BsOrderMeituan
* @Author: Sum1Dream
* @Date: 2024/9/26 下午3:39
*/
BsOrderMeituan findOrderMeiTuanBySqtBizOrderId(String sqtBizOrderId);
/**
* @MethodName getOrderList
* @Description: 查询美团订单
* @param map
* @return: java.util.List<com.hfkj.entity.BsOrderMeituan>
* @Author: Sum1Dream
* @Date: 2024/9/26 下午1:45
*/
List<BsOrderMeituan> getOrderList(Map<String , Object> map);
/**
* @MethodName getOrderListFinish
* @Description:
* @param map
* @return: java.util.List<com.hfkj.entity.BsOrderMeituan>
* @Author: Sum1Dream
* @Date: 2024/9/29 下午4:34
*/
List<BsOrderMeituan> getOrderListFinish(Map<String , Object> map);
void orderFinish(String childNo);
}

@ -55,6 +55,15 @@ public interface BsOrderMemberService {
* @Date: 2024/9/5 下午4:22
*/
BsOrderMember findGoodsOrder(String orderNo);
/**
* @MethodName findGoodsOrderByChildNo
* @Description: 根据子订单号查询
* @param childNo
* @return: com.hfkj.entity.BsOrderMember
* @Author: Sum1Dream
* @Date: 2024/9/25 上午10:50
*/
BsOrderMember findGoodsOrderByChildNo(String childNo);
/**
* @MethodName queryDetailByMap
@ -75,4 +84,13 @@ public interface BsOrderMemberService {
* @Date: 2024/9/5 下午4:27
*/
List<BsOrderMember> getList(Map<String , Object> map);
/**
* @MethodName getListFinish
* @Description:
* @param map
* @return: java.util.List<com.hfkj.entity.BsOrderMember>
* @Author: Sum1Dream
* @Date: 2024/9/29 下午4:38
*/
List<BsOrderMember> getListFinish(Map<String , Object> map);
}

@ -81,6 +81,15 @@ public interface BsOrderStarbucksService {
* @Date: 2024/7/4 下午2:35
*/
List<BsOrderStarbucks> getList(Map<String , Object> map);
/**
* @MethodName getListFinish
* @Description:
* @param map
* @return: java.util.List<com.hfkj.entity.BsOrderStarbucks>
* @Author: Sum1Dream
* @Date: 2024/9/29 下午4:36
*/
List<BsOrderStarbucks> getListFinish(Map<String , Object> map);
/**
* @MethodName updateOrderStatus

@ -11,10 +11,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
@Service("bsOrderCinemaService")
public class BsOrderCinemaServiceImpl implements BsOrderCinemaService {
@ -106,4 +103,31 @@ public class BsOrderCinemaServiceImpl implements BsOrderCinemaService {
example.setOrderByClause("exception_status desc");
return bsOrderCinemaMapper.selectByExample(example);
}
@Override
public List<BsOrderCinema> getListFinish(Map<String, Object> map) {
BsOrderCinemaExample example = new BsOrderCinemaExample();
BsOrderCinemaExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "finishTimeS") != null) {
criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "finishTimeS")));
}
if (MapUtils.getLong(map, "finishTimeE") != null) {
criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(map, "finishTimeE")));
}
if (MapUtils.getLong(map, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId"));
}
if (MapUtils.getInteger(map, "payType") != null) {
criteria.andPayTypeEqualTo(MapUtils.getInteger(map, "payType"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "platform"))) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platform"));
}
List<Integer> statusList = new ArrayList<>();
statusList.add(10);
statusList.add(15);
criteria.andStatusIn(statusList);
return bsOrderCinemaMapper.selectByExample(example);
}
}

@ -194,9 +194,27 @@ public class BsOrderGoodsServiceImpl implements BsOrderGoodsService {
}
@Override
public List<BsOrderGoods> getList() {
public List<BsOrderGoods> getListFinish(Map<String , Object> map) {
BsOrderGoodsExample example = new BsOrderGoodsExample();
BsOrderGoodsExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "finishTimeS") != null) {
criteria.andFinishTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "finishTimeS")));
}
if (MapUtils.getLong(map, "finishTimeE") != null) {
criteria.andFinishTimeLessThan(new Date(MapUtils.getLong(map, "finishTimeE")));
}
if (MapUtils.getLong(map, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId"));
} else {
criteria.andMerIdIsNotNull();
}
if (MapUtils.getInteger(map, "payType") != null) {
criteria.andPayTypeEqualTo(MapUtils.getInteger(map, "payType"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "platform"))) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platform"));
}
criteria.andStatusEqualTo(3);
return bsOrderGoodsMapper.selectByExample(example);
}
@ -308,7 +326,9 @@ public class BsOrderGoodsServiceImpl implements BsOrderGoodsService {
orderService.childOrderComplete(orderGoods.getChildOrderNo());
orderGoods.setStatus(OrderChildStatusEnum.status3.getCode());
orderGoods.setUpdateTime(new Date());
orderGoods.setFinishTime(new Date());
if (orderGoods.getFinishTime() == null) {
orderGoods.setFinishTime(new Date());
}
update(orderGoods);
// 删除缓存
orderService.cacheDelete(orderGoods.getOrderNo());

@ -1,13 +1,21 @@
package com.hfkj.service.goods.impl;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.dao.BsOrderMeituanMapper;
import com.hfkj.entity.BsOrderMeituan;
import com.hfkj.entity.BsOrderMeituanExample;
import com.hfkj.meituan.MeiTuanService;
import com.hfkj.service.goods.BsOrderMeiTuanService;
import com.hfkj.service.order.BsOrderService;
import com.hfkj.sysenum.order.OrderChildStatusEnum;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.*;
@Service("bsOrderMeiTuanService")
public class BsOrderMeiTuanServiceImpl implements BsOrderMeiTuanService {
@ -15,6 +23,9 @@ public class BsOrderMeiTuanServiceImpl implements BsOrderMeiTuanService {
@Resource
private BsOrderMeituanMapper bsOrderMeituanMapper;
@Resource
private BsOrderService orderService;
@Override
public void create(BsOrderMeituan orderMeiTuan) {
bsOrderMeituanMapper.insert(orderMeiTuan);
@ -64,4 +75,142 @@ public class BsOrderMeiTuanServiceImpl implements BsOrderMeiTuanService {
return null;
}
@Override
public BsOrderMeituan findOrderMeiTuanBySqtBizOrderId(String sqtBizOrderId) {
BsOrderMeituanExample example = new BsOrderMeituanExample();
BsOrderMeituanExample.Criteria criteria = example.createCriteria();
criteria.andSqtBizOrderIdEqualTo(sqtBizOrderId);
List<BsOrderMeituan> list = bsOrderMeituanMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override
public List<BsOrderMeituan> getOrderList(Map<String, Object> map) {
BsOrderMeituanExample example = new BsOrderMeituanExample();
BsOrderMeituanExample.Criteria criteria = example.createCriteria();
if (StringUtils.isNotBlank(MapUtils.getString(map, "orderNo"))) {
criteria.andOrderNoEqualTo(MapUtils.getString(map, "orderNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "childOrderNo"))) {
criteria.andChildOrderNoEqualTo(MapUtils.getString(map, "childOrderNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "tradeNo"))) {
criteria.andChildOrderNoEqualTo(MapUtils.getString(map, "tradeNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "userPhone"))) {
criteria.andUserPhoneEqualTo(MapUtils.getString(map, "userPhone"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "goodsName"))) {
criteria.andGoodsNameLike("%"+MapUtils.getString(map, "goodsName")+"%");
}
if (MapUtils.getInteger(map, "payType") != null) {
criteria.andPayTypeEqualTo(MapUtils.getInteger(map, "payType"));
}
if (MapUtils.getLong(map, "createTimeS") != null) {
criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "createTimeS")));
}
if (MapUtils.getLong(map, "createTimeE") != null) {
criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(map, "createTimeE")));
}
if (MapUtils.getLong(map, "finishTimeS") != null) {
criteria.andFinishTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "finishTimeS")));
}
if (MapUtils.getLong(map, "finishTimeE") != null) {
criteria.andFinishTimeLessThan(new Date(MapUtils.getLong(map, "finishTimeE")));
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
}
example.setOrderByClause("create_time desc");
return bsOrderMeituanMapper.selectByExample(example);
}
@Override
public List<BsOrderMeituan> getOrderListFinish(Map<String, Object> map) {
BsOrderMeituanExample example = new BsOrderMeituanExample();
BsOrderMeituanExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "finishTimeS") != null) {
criteria.andFinishTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "finishTimeS")));
}
if (MapUtils.getLong(map, "finishTimeE") != null) {
criteria.andFinishTimeLessThan(new Date(MapUtils.getLong(map, "finishTimeE")));
}
if (MapUtils.getLong(map, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId"));
}
if (MapUtils.getInteger(map, "payType") != null) {
criteria.andPayTypeEqualTo(MapUtils.getInteger(map, "payType"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "platform"))) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platform"));
}
criteria.andStatusEqualTo(3);
return bsOrderMeituanMapper.selectByExample(example);
}
@Override
public void orderFinish(String childNo) {
BsOrderMeituan orderMeiTuan = findOrderMeiTuan(childNo);
if (orderMeiTuan != null) {
// 查询上游订单状态
Map<String , Object> map = new HashMap<>();
map.put("ts" , new Date().getTime());
map.put("entId" , CommonSysConst.getSysConfig().getEntId());
map.put("sqtBizOrderId" , orderMeiTuan.getSqtBizOrderId());
JSONObject object = MeiTuanService.queryDetail(map);
Boolean finish = false;
Date finshDate = new Date();
if (object != null) {
// 订单基本信息
JSONObject baseInfo = object.getJSONObject("baseInfo");
// 业务信息字段
JSONObject orderInfo = JSONObject.parseObject(object.getString("origOrderInfo"));
// 判断业务类型
// 到店
if (baseInfo.getString("firstBusinessType").equals("010")) {
// 判断是否完成
if (orderInfo.getInteger("groupConsumeStatus") == 10) {
finish = true;
}
}
// 外卖
if (baseInfo.getString("firstBusinessType").equals("020")) {
// 判断是否完成
if (orderInfo.getInteger("orderStatus") == 8) {
finish = true;
finshDate = DateUtil.StringToDate(orderInfo.getString("deliverTime") , "yyyy-MM-dd HH:mm:ss");
}
}
if (finish) {
// 子订单完成
orderService.childOrderComplete(childNo);
orderMeiTuan.setFinishTime(finshDate);
orderMeiTuan.setUpdateTime(new Date());
orderMeiTuan.setStatus(OrderChildStatusEnum.status3.getCode());
update(orderMeiTuan);
}
}
}
}
}

@ -1,12 +1,17 @@
package com.hfkj.service.goods.impl;
import com.hfkj.dao.BsOrderMemberMapper;
import com.hfkj.entity.BsOrderGoodsExample;
import com.hfkj.entity.BsOrderMember;
import com.hfkj.entity.BsOrderMemberExample;
import com.hfkj.service.goods.BsOrderMemberService;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -41,6 +46,20 @@ public class BsOrderMemberServiceImpl implements BsOrderMemberService {
return null;
}
@Override
public BsOrderMember findGoodsOrderByChildNo(String childNo) {
BsOrderMemberExample example = new BsOrderMemberExample();
example.createCriteria().andChildOrderNoEqualTo(childNo);
List<BsOrderMember> list = bsOrderMemberMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override
public BsOrderMember queryDetailByMap(Map<String, Object> map) {
return null;
@ -48,6 +67,31 @@ public class BsOrderMemberServiceImpl implements BsOrderMemberService {
@Override
public List<BsOrderMember> getList(Map<String, Object> map) {
return Collections.emptyList();
}
@Override
public List<BsOrderMember> getListFinish(Map<String, Object> map) {
BsOrderMemberExample example = new BsOrderMemberExample();
BsOrderMemberExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "finishTimeS") != null) {
criteria.andFinishTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "finishTimeS")));
}
if (MapUtils.getLong(map, "finishTimeE") != null) {
criteria.andFinishTimeLessThan(new Date(MapUtils.getLong(map, "finishTimeE")));
}
if (MapUtils.getLong(map, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId"));
}
if (MapUtils.getInteger(map, "payType") != null) {
criteria.andPayTypeEqualTo(MapUtils.getInteger(map, "payType"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "platform"))) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platform"));
}
criteria.andStatusEqualTo(3);
return bsOrderMemberMapper.selectByExample(example);
}
}

@ -95,6 +95,31 @@ public class BsOrderStarbucksServiceImpl implements BsOrderStarbucksService {
return bsOrderStarbucksMapper.selectByExample(example);
}
@Override
public List<BsOrderStarbucks> getListFinish(Map<String, Object> map) {
BsOrderStarbucksExample example = new BsOrderStarbucksExample();
BsOrderStarbucksExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "finishTimeS") != null) {
criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(map, "finishTimeS")));
}
if (MapUtils.getLong(map, "finishTimeE") != null) {
criteria.andCreateTimeLessThan(new Date(MapUtils.getLong(map, "finishTimeE")));
}
if (MapUtils.getLong(map, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId"));
}
if (MapUtils.getInteger(map, "payType") != null) {
criteria.andPayTypeEqualTo(MapUtils.getInteger(map, "payType"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "platform"))) {
criteria.andPlatformCodeEqualTo(MapUtils.getString(map, "platform"));
}
criteria.andStatusEqualTo(15);
return bsOrderStarbucksMapper.selectByExample(example);
}
@Override
public void updateOrderStatus(String orderNo, Integer status) {
// 查询星巴克订单

@ -1,18 +1,16 @@
package com.hfkj.service.order;
import com.hfkj.common.utils.RedisUtil;
import com.hfkj.entity.BsOrderChild;
import com.hfkj.entity.BsOrderCoupon;
import com.hfkj.entity.BsOrderMeituan;
import com.hfkj.entity.GoodsMsg;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.*;
import com.hfkj.model.order.OrderChildModel;
import com.hfkj.model.order.OrderModel;
import com.hfkj.service.coupon.BsOrderCouponService;
import com.hfkj.service.goods.BsOrderMeiTuanService;
import com.hfkj.service.goods.GoodsMsgService;
import com.hfkj.service.goods.GoodsSpecsService;
import com.hfkj.service.goods.*;
import com.hfkj.sysenum.GoodsVpdSourceEnum;
import com.hfkj.sysenum.order.OrderChildProductTypeEnum;
import com.hfkj.sysenum.order.OrderChildStatusEnum;
import com.hfkj.yushang.YuShangService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -23,7 +21,9 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 取消订单业务
@ -34,12 +34,8 @@ import java.util.List;
@Component
public class OrderCancelService {
Logger log = LoggerFactory.getLogger(OrderCancelService.class);
@Autowired
private RedisUtil redisUtil;
@Resource
private BsOrderService orderService;
@Resource
private BsOrderChildService orderChildService;
private GoodsVpdService goodsVpdService;
@Resource
private BsOrderCouponService orderCouponService;
@Resource
@ -48,6 +44,8 @@ public class OrderCancelService {
private GoodsSpecsService goodsSpecsService;
@Resource
private BsOrderMeiTuanService bsOrderMeiTuanService;
@Resource
private BsOrderMemberService bsOrderMemberService;
/**
* 订单业务处理
* @param order
@ -78,11 +76,26 @@ public class OrderCancelService {
// 归库
goodsSpecsService.editStockNum(orderChild.getProductSpecId(), orderChild.getProductCount(), 1);
// 虚拟
BsOrderCoupon orderCoupon = orderCouponService.getDetailByChildOrderNo(orderChild.getChildOrderNo());
orderCoupon.setCancelTime(new Date());
orderCoupon.setStatus(OrderChildStatusEnum.status5.getCode());
orderCouponService.editData(orderCoupon);
// 虚拟商品
GoodsVpd vpd = goodsVpdService.queryDetailBySpecsId(orderChild.getProductSpecId());
if (vpd.getSource() == GoodsVpdSourceEnum.type2.getCode()) {
BsOrderMember orderMember = bsOrderMemberService.findGoodsOrderByChildNo(orderChild.getChildOrderNo());
if (orderMember != null) {
orderMember.setUpdateTime(new Date());
orderMember.setStatus(OrderChildStatusEnum.status5.getCode());
bsOrderMemberService.update(orderMember);
}
} else {
// 虚拟
BsOrderCoupon orderCoupon = orderCouponService.getDetailByChildOrderNo(orderChild.getChildOrderNo());
orderCoupon.setCancelTime(new Date());
orderCoupon.setStatus(OrderChildStatusEnum.status5.getCode());
orderCouponService.editData(orderCoupon);
}
}
}

@ -20,13 +20,11 @@ import com.hfkj.service.coupon.BsOrderCouponService;
import com.hfkj.service.coupon.channel.HuiLianTongCouponService;
import com.hfkj.service.goods.*;
import com.hfkj.service.hlt.HuiLianTongUnionCardService;
import com.hfkj.service.impl.SecConfigServiceImpl;
import com.hfkj.sysenum.GoodsVpdSourceEnum;
import com.hfkj.sysenum.order.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@ -137,7 +135,7 @@ public class OrderCreateService {
orderMember.setMerId(orderChild.getMerId());
orderMember.setPlatformCode(businessObj.getString("platformCode"));
orderMember.setUserId(order.getUserId());
orderMember.setUserPhone(order.getUserPhone());
orderMember.setUserPhone(businessObj.getString("userPhone"));
orderMember.setGoodsId(goodsMsg.getId());
orderMember.setGoodsName(goodsMsg.getTitle());
orderMember.setGoodsTypeId(goodsMsg.getGoodsType());
@ -153,6 +151,8 @@ public class OrderCreateService {
orderMember.setGoodsVpdSource(goodsVpd.getSource());
orderMember.setGoodsCount(orderChild.getProductCount());
orderMember.setStatus(OrderChildStatusEnum.status1.getCode());
orderMember.setUpdateTime(new Date());
orderMember.setCreateTime(new Date());
orderMemberService.create(orderMember);
}
@ -541,7 +541,7 @@ public class OrderCreateService {
orderChild.setMerId(productConfig.getMerId());
orderChild.setProductName(orderMeiTuan.getGoodsName());
orderChild.setProductCount(1);
orderChild.setProductImg("202409/1726638258182.png");
orderChild.setProductImg("202409/1727150603020.png");
orderChild.setProductSpecName(orderMeiTuan.getGoodsName());
orderChild.setProductPrice(orderMeiTuan.getTotalPrice());

@ -22,6 +22,8 @@ import com.hfkj.service.goods.*;
import com.hfkj.service.goods.impl.BsOrderStarbucksServiceImpl;
import com.hfkj.service.hlt.HuiLianTongUnionCardService;
import com.hfkj.sysenum.GoodsVpdSourceEnum;
import com.hfkj.sysenum.UserLoginPlatform;
import com.hfkj.sysenum.mer.PayPlatformEnum;
import com.hfkj.sysenum.order.*;
import com.hfkj.yushang.YuShangService;
import org.slf4j.Logger;
@ -119,30 +121,31 @@ public class OrderPaySuccessService {
if (vpd.getSource() == GoodsVpdSourceEnum.type2.getCode()) {
Map<String , Object> map = new HashMap<>();
map.put("productCode" , vpd.getKey());
map.put("AppKey" , CommonSysConst.getSysConfig().getYuShangAppKey());
map.put("BuyCount" , childOrder.getProductCount());
map.put("MOrderID" , childOrder.getChildOrderNo());
map.put("ChargeAccount" , childOrder.getChildOrderNo());
// 推送给娱尚
YuShangService.insertV2(map);
BsOrderMember orderMember = new BsOrderMember();
orderMember.setTotalPrice(childOrder.getProductTotalPrice());
orderMember.setTotalDeductionPrice(childOrder.getTotalDeductionPrice());
orderMember.setCouponDiscountPrice(childOrder.getCouponDiscountPrice());
orderMember.setIntegralDiscountPrice(childOrder.getIntegralDiscountPrice());
orderMember.setPayRealPrice(childOrder.getSurplusRefundPrice());
orderMember.setPayChannel(order.getPayChannel());
orderMember.setPayType(order.getPayType());
orderMember.setPaySerialNo(order.getPaySerialNo());
orderMember.setPayTime(order.getPayTime());
orderMember.setStatus(OrderChildStatusEnum.status3.getCode());
orderMember.setUpdateTime(new Date());
bsOrderMemberService.update(orderMember);
BsOrderMember orderMember = bsOrderMemberService.findGoodsOrderByChildNo(childOrder.getChildOrderNo());
if (orderMember != null) {
Map<String , Object> map = new HashMap<>();
map.put("productCode" , vpd.getKey());
map.put("AppKey" , CommonSysConst.getSysConfig().getYuShangAppKey());
map.put("BuyCount" , childOrder.getProductCount());
map.put("MOrderID" , childOrder.getChildOrderNo());
map.put("ChargeAccount" , orderMember.getUserPhone());
// 推送给娱尚
YuShangService.insertV2(map);
orderMember.setTotalPrice(childOrder.getProductTotalPrice());
orderMember.setTotalDeductionPrice(childOrder.getTotalDeductionPrice());
orderMember.setCouponDiscountPrice(childOrder.getCouponDiscountPrice());
orderMember.setIntegralDiscountPrice(childOrder.getIntegralDiscountPrice());
orderMember.setPayRealPrice(childOrder.getSurplusRefundPrice());
orderMember.setPayChannel(order.getPayChannel());
orderMember.setPayType(order.getPayType());
orderMember.setPaySerialNo(order.getPaySerialNo());
orderMember.setPayTime(order.getPayTime());
orderMember.setStatus(OrderChildStatusEnum.status3.getCode());
orderMember.setFinishTime(new Date());
orderMember.setUpdateTime(new Date());
bsOrderMemberService.update(orderMember);
}
} else {
// 查询卡券订单的卡密
@ -368,6 +371,12 @@ public class OrderPaySuccessService {
orderMeiTuan.setIntegralDiscountPrice(childOrder.getIntegralDiscountPrice());
orderMeiTuan.setPayRealPrice(childOrder.getSurplusRefundPrice());
orderMeiTuan.setPayChannel(order.getPayChannel());
if (order.getPayType() == OrderPayTypeEnum.type3.getCode()) {
orderMeiTuan.setPlatformCode(UserLoginPlatform.VFAMILY.getCode());
}
if (order.getPayType() == OrderPayTypeEnum.type4.getCode()) {
orderMeiTuan.setPlatformCode(UserLoginPlatform.WXAPPLETS.getCode());
}
orderMeiTuan.setPayType(order.getPayType());
orderMeiTuan.setPaySerialNo(order.getPaySerialNo());
orderMeiTuan.setPayTime(order.getPayTime());

@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@ -36,9 +37,10 @@ public class OrderRefundSuccessService {
private BsOrderCouponService orderCouponService;
@Resource
private BsOrderStarbucksService bsOrderStarbucksService;
@Autowired
@Resource
private BsOrderMeiTuanServiceImpl bsOrderMeiTuanService;
@Resource
private BsOrderChildService bsOrderChildService;
/**
* 订单业务处理
* @param orderChild
@ -106,7 +108,7 @@ public class OrderRefundSuccessService {
if (orderCinema != null) {
Map<String , Object> map = new HashMap<>();
map.put("orderNo", childOrder.getOrderNo());
map.put("orderNo", orderCinema.getChannelOrderNo());
CinemaService.refundMovieOrder(map);
orderCinema.setStatus(-5);
orderCinema.setExceptionStatus(false);
@ -129,22 +131,12 @@ public class OrderRefundSuccessService {
*/
public void meiTuan(BsOrderChild childOrder) {
// 美团退款
BsOrderMeituan orderMeiTuan = bsOrderMeiTuanService.findOrderMeiTuan(childOrder.getOrderNo());
try {
BsOrderMeituan orderMeiTuan = bsOrderMeiTuanService.findOrderMeiTuan(childOrder.getChildOrderNo());
if (orderMeiTuan != null) {
Map<String , Object> map = new HashMap<>();
map.put("orderNo", childOrder.getOrderNo());
CinemaService.refundMovieOrder(map);
orderMeiTuan.setStatus(OrderChildStatusEnum.status4.getCode());
orderMeiTuan.setRefundTime(new Date());
orderMeiTuan.setExceptionStatus(false);
bsOrderMeiTuanService.update(orderMeiTuan);
}
} catch (Exception e) {
orderMeiTuan.setExceptionStatus(true);
orderMeiTuan.setExceptionMsg(e.getMessage());
if (orderMeiTuan != null) {
orderMeiTuan.setStatus(OrderChildStatusEnum.status4.getCode());
orderMeiTuan.setRefundTime(new Date());
orderMeiTuan.setExceptionStatus(false);
bsOrderMeiTuanService.update(orderMeiTuan);
}

@ -0,0 +1,47 @@
package com.hfkj.service.order;
import com.hfkj.model.order.orderExport.MerOrderSettlementDetailModel;
import com.hfkj.model.order.orderExport.OrderSettlementModel;
import com.hfkj.model.order.orderExport.OrderSettlementSumModel;
import java.util.List;
import java.util.Map;
/**
* @ClassName OrderSettlementService
* @Author Sum1Dream
* @Description 订单结算
* @Date 2024/9/29 下午4:12
**/
public interface OrderSettlementService {
/**
* @MethodName getDetail
* @Description: 获取结算订单详情
* @param map
* @return: java.util.List<com.hfkj.model.order.orderExport.MerOrderSettlementDetailModel>
* @Author: Sum1Dream
* @Date: 2024/9/29 下午4:14
*/
List<MerOrderSettlementDetailModel> getDetail(Map<String,Object> map);
/**
* @MethodName getSettlement
* @Description: 结算订单
* @param map
* @return: java.util.List<com.hfkj.model.order.orderExport.OrderSettlementModel>
* @Author: Sum1Dream
* @Date: 2024/9/29 下午4:14
*/
List<OrderSettlementModel> getSettlement(Map<String,Object> map);
/**
* @MethodName getSum
* @Description: 结算总和
* @param map
* @return: java.util.List<com.hfkj.model.order.orderExport.OrderSettlementSumModel>
* @Author: Sum1Dream
* @Date: 2024/9/29 下午4:14
*/
List<OrderSettlementSumModel> getSum(Map<String,Object> map);
}

@ -3,8 +3,10 @@ package com.hfkj.service.order.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.utils.StarbucksUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.dao.BsOrderChildMapper;
import com.hfkj.entity.*;
import com.hfkj.meituan.MeiTuanService;
import com.hfkj.model.order.OrderChildModel;
import com.hfkj.qianzhu.StarbucksService;
import com.hfkj.service.BsProductConfigService;
@ -15,6 +17,7 @@ import com.hfkj.service.order.BsOrderService;
import com.hfkj.sysenum.order.OrderChildProductTypeEnum;
import com.hfkj.sysenum.order.OrderChildStatusEnum;
import com.hfkj.sysenum.order.OrderLogisticsStatusEnum;
import com.meituan.sqt.utils.EncryptUtil;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
@ -50,6 +53,11 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
@Resource
private BsOrderService orderService;
@Resource
private BsOrderMeiTuanService orderMeiTuanService;
@Resource
private BsOrderMemberService orderMemberService;
@Override
public void editData(BsOrderChild data) {
@ -73,7 +81,6 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
return childModel;
}
return null;
}
@Override
@ -90,7 +97,7 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
BeanUtils.copyProperties(orderChild, childModel);
if (childModel.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) {
BsOrderGoods orderGoods = orderGoodsService.findGoodsOrder(orderNo);
BsOrderGoods orderGoods = orderGoodsService.findGoodsOrderByChild(childModel.getChildOrderNo());
if (orderGoods != null) {
GoodsUserAddress address;
if (orderGoods.getDeliveryAddressId() != null) {
@ -111,7 +118,9 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
// 查询商品虚拟信息
GoodsJump goodsJump = goodsJumpService.queryDetailBySpecsId(orderChild.getProductSpecId());
object.put("goodsJump", goodsJump);
if (goodsJump != null && goodsJump.getJumpType() != null) {
object.put("goodsJump", goodsJump);
}
object.put("address", address);
object.put("orderGoodsId", orderGoods.getId());
childModel.setBusiness(object);
@ -121,6 +130,9 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
orderService.childOrderComplete(orderGoods.getChildOrderNo());
orderGoods.setStatus(OrderChildStatusEnum.status3.getCode());
orderGoods.setUpdateTime(new Date());
if (orderGoods.getFinishTime() == null) {
orderGoods.setFinishTime(new Date());
}
orderGoodsService.update(orderGoods);
// 删除缓存
orderService.cacheDelete(orderGoods.getOrderNo());
@ -128,7 +140,20 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
}
} else if (childModel.getProductType().equals(OrderChildProductTypeEnum.type2.getCode())) {
childModel.setBusiness(goodsVpdService.queryDetailBySpecsId(childModel.getProductSpecId()));
if (!childModel.getProductSpecId().equals(999999L)) {
GoodsVpd goodsVpd = goodsVpdService.queryDetailBySpecsId(childModel.getProductSpecId());
if (goodsVpd.getSource() == 2) {
BsOrderMember orderMember = orderMemberService.findGoodsOrderByChildNo(childModel.getChildOrderNo());
if (orderMember != null) {
goodsVpd.setExt1(orderMember.getUserPhone());
}
}
childModel.setBusiness(goodsVpd);
}
} else if (childModel.getProductType().equals(OrderChildProductTypeEnum.type4.getCode())) {
BsProductConfig productConfig = bsProductConfigService.queryDetail(OrderChildProductTypeEnum.type4.getCode());
// 查询星巴克订单列表信息
@ -200,6 +225,12 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
object.put("orderItemList", orderItemList);
childModel.setBusiness(object);
} else if (childModel.getProductType().equals(OrderChildProductTypeEnum.type5.getCode())) {
if (childModel.getStatus().equals(OrderChildStatusEnum.status2.getCode())) {
orderMeiTuanService.orderFinish(childModel.getChildOrderNo());
}
}
orderChildModelList.add(childModel);
}

@ -255,13 +255,6 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService {
@Transactional(propagation= Propagation.REQUIRES_NEW,rollbackFor= {RuntimeException.class})
public BsOrderRefund meiTuanRefund(String tradeRefundNo, String tradeNo , BigDecimal refundPrice, String remark) {
// 查询退款订
BsOrderRefund bsOrderRefund = getRefundByTradeRefundNo(tradeRefundNo);
if (bsOrderRefund != null) {
return bsOrderRefund;
}
// 查询业务订单
BsOrderMeituan orderMeiTuan = orderMeiTuanService.findOrderMeiTuanByTradeNo(tradeNo);
if (orderMeiTuan == null) {
@ -289,6 +282,7 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService {
orderRefund.setMerId(orderChild.getMerId());
orderRefund.setOrderNo(orderChild.getOrderNo());
orderRefund.setTradeRefundNo(tradeRefundNo);
orderRefund.setTradeRefundPrice(refundPrice);
orderRefund.setOrderChildNo(orderChild.getChildOrderNo());
orderRefund.setUserId(order.getUserId());
orderRefund.setUserPhone(order.getUserPhone());
@ -305,29 +299,26 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService {
} else {
// 部分退款
// 计算部分退款比例
BigDecimal proportion = refundPrice.divide(orderChild.getProductTotalPrice() , 2 , RoundingMode.HALF_UP);
BigDecimal proportion = refundPrice.divide(orderMeiTuan.getTradeAmount() , 2 , RoundingMode.HALF_UP);
// 退积分
Long unitPriceIntegral = new BigDecimal(orderChild.getIntegralDiscountPrice()).multiply(proportion).longValue();
// 退金额
BigDecimal price = orderChild.getProductActualPrice().multiply(proportion);
BigDecimal price = orderChild.getProductActualPrice().multiply(proportion).setScale(2 , RoundingMode.HALF_UP);
if (price.compareTo(new BigDecimal("0.01")) < 0) {
price = new BigDecimal(0);
}
// 插入退款积分
if (unitPriceIntegral > orderChild.getSurplusRefundIntegral()) {
// 如果退积分大于可退那么按照可退处理
if (unitPriceIntegral.compareTo(orderChild.getSurplusRefundIntegral()) >- 1) {
// 插入退款积分
orderRefund.setRefundIntegral(orderChild.getSurplusRefundIntegral());
} else {
orderRefund.setRefundIntegral(unitPriceIntegral);
}
// 插入退款金额
if (price.compareTo(orderChild.getSurplusRefundPrice()) > 0) {
// 如果退金额大于可退那么按照可退处理
if (price.compareTo(orderChild.getSurplusRefundPrice()) >- 1) {
// 插入退款金额
orderRefund.setRefundPrice(orderChild.getSurplusRefundPrice());
} else {
orderRefund.setRefundPrice(price);
}
}
@ -355,12 +346,11 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService {
editData(orderRefund);
// 资金退款
orderRefund.setRefundStatus(refundMoney(orderRefund)?OrderRefundStatusEnum.status2.getCode():OrderRefundStatusEnum.status3.getCode());
if (orderRefund.getRefundPrice().compareTo(new BigDecimal(0)) > 0) {
// 资金退款
orderRefund.setRefundStatus(refundMoney(orderRefund)?OrderRefundStatusEnum.status2.getCode():OrderRefundStatusEnum.status3.getCode());
} else {
orderRefund.setRefundStatus(OrderRefundStatusEnum.status2.getCode());
if (orderRefund.getRefundStatus() == OrderRefundStatusEnum.status2.getCode()) {
orderRefund.setFinishTime(new Date());
}
editData(orderRefund);
@ -368,20 +358,19 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService {
// 退款成功
if (orderRefund.getRefundStatus().equals(OrderRefundStatusEnum.status2.getCode())) {
// 修改子订单可退数量、金额、积分
// orderChild.setSurplusRefundCount(orderChild.getSurplusRefundCount() - productCount);
orderChild.setSurplusRefundPrice(orderChild.getSurplusRefundPrice().subtract(orderRefund.getRefundPrice()));
orderChild.setSurplusRefundIntegral(orderChild.getSurplusRefundIntegral() - orderRefund.getRefundIntegral());
orderChild.setStatus(orderChild.getSurplusRefundCount()==0?OrderChildStatusEnum.status4.getCode():orderChild.getStatus());
// 退款业务处理
orderRefundSuccessService.orderRefundHandle(orderChild);
orderChild.setStatus(orderChild.getSurplusRefundPrice().compareTo(new BigDecimal(0)) == 0 && orderChild.getSurplusRefundIntegral() == 0?OrderChildStatusEnum.status4.getCode():orderChild.getStatus());
orderChildService.editData(orderChild);
// 查询子订单已全部退款
Map<String,Object> map = new HashMap<>();
map.put("orderNo", orderChild.getOrderNo());
List<BsOrderChild> orderChildList = orderChildService.getList(map);
if (orderChildList.size() == orderChildList.stream().filter(o->o.getStatus().equals(OrderChildStatusEnum.status4.getCode())).collect(Collectors.toList()).size()) {
// 退款业务处理
orderRefundSuccessService.orderRefundHandle(orderChild);
order.setOrderStatus(OrderStatusEnum.status4.getCode());
order.setRefundTime(new Date());
orderService.editData(order);

@ -579,6 +579,7 @@ public class BsOrderServiceImpl implements BsOrderService {
}
}
return orderModel;

@ -0,0 +1,370 @@
package com.hfkj.service.order.impl;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.entity.*;
import com.hfkj.model.order.OrderCouponModel;
import com.hfkj.model.order.orderExport.MerOrderSettlementDetailModel;
import com.hfkj.model.order.orderExport.OrderSettlementModel;
import com.hfkj.model.order.orderExport.OrderSettlementSumModel;
import com.hfkj.service.BsMerService;
import com.hfkj.service.coupon.BsOrderCouponService;
import com.hfkj.service.goods.*;
import com.hfkj.service.order.OrderSettlementService;
import com.hfkj.sysenum.UserLoginPlatform;
import com.hfkj.sysenum.order.OrderPayTypeEnum;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
@Service("orderSettlementService")
public class OrderSettlementServiceImpl implements OrderSettlementService {
@Resource
private BsOrderCouponService orderCouponService;
@Resource
private BsOrderGoodsService goodsService;
@Resource
private BsOrderCinemaService cinemaService;
@Resource
private BsOrderStarbucksService starbucksService;
@Resource
private BsOrderMeiTuanService meiTuanService;
@Resource
private BsOrderMemberService memberService;
@Resource
private BsMerService bsMerService;
@Override
public List<MerOrderSettlementDetailModel> getDetail(Map<String, Object> map) {
return settlementData(map);
}
@Override
public List<OrderSettlementModel> getSettlement(Map<String, Object> map) {
List<MerOrderSettlementDetailModel> list = settlementData(map);
Map<String, List<MerOrderSettlementDetailModel>> merList = list.stream().collect(Collectors.groupingBy(MerOrderSettlementDetailModel:: getMerName));
List<OrderSettlementModel> settlementModels = new ArrayList<>();
OrderSettlementModel settlementModel;
for (String key : merList.keySet()) {
Map<String, List<MerOrderSettlementDetailModel>> detailList = merList.get(key).stream().collect(Collectors.groupingBy(MerOrderSettlementDetailModel:: getBusinessType));
for (String key1 : detailList.keySet()) {
Map<String, List<MerOrderSettlementDetailModel>> listMap = detailList.get(key1).stream().collect(Collectors.groupingBy(MerOrderSettlementDetailModel:: getPayType));
for (String key2 : listMap.keySet()) {
settlementModel = new OrderSettlementModel();
if (map.get("finishTimeS") == null) {
settlementModel.setTime("全时间段");
} else {
settlementModel.setTime(DateUtil.date2String(DateUtil.long2Date(MapUtils.getLong(map , "finishTimeS")) , DateUtil.Y_M_D) + "-" + DateUtil.date2String(DateUtil.long2Date(MapUtils.getLong(map , "finishTimeE")) , DateUtil.Y_M_D));
}
settlementModel.setPayType(key2);
settlementModel.setBusinessType(key1);
settlementModel.setMerName(key);
BigDecimal reduce = listMap.get(key2).stream().map(MerOrderSettlementDetailModel::getPayRealPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
settlementModel.setPayRealPrice(reduce);
settlementModels.add(settlementModel);
}
}
}
return settlementModels;
}
@Override
public List<OrderSettlementSumModel> getSum(Map<String, Object> map) {
List<MerOrderSettlementDetailModel> list = settlementData(map);
List<OrderSettlementSumModel> sumModels = new ArrayList<>();
OrderSettlementSumModel sumModel;
Map<String, List<MerOrderSettlementDetailModel>> detailList = list.stream().collect(Collectors.groupingBy(MerOrderSettlementDetailModel:: getBusinessType));
for (String key1 : detailList.keySet()) {
Map<String, List<MerOrderSettlementDetailModel>> listMap = detailList.get(key1).stream().collect(Collectors.groupingBy(MerOrderSettlementDetailModel:: getPayType));
for (String key2 : listMap.keySet()) {
sumModel = new OrderSettlementSumModel();
if (map.get("finishTimeS") == null) {
sumModel.setTime("全时间段");
} else {
sumModel.setTime(DateUtil.date2String(DateUtil.long2Date(MapUtils.getLong(map , "finishTimeS")) , DateUtil.Y_M_D) + "-" + DateUtil.date2String(DateUtil.long2Date(MapUtils.getLong(map , "finishTimeE")) , DateUtil.Y_M_D));
}
sumModel.setPayType(key2);
sumModel.setBusinessType(key1);
BigDecimal reduce = listMap.get(key2).stream().map(MerOrderSettlementDetailModel::getPayRealPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
sumModel.setPayRealPrice(reduce);
sumModels.add(sumModel);
}
}
return sumModels;
}
// 查询结算订单详情
private List<MerOrderSettlementDetailModel> settlementData(Map<String, Object> map) {
List<MerOrderSettlementDetailModel> list = new ArrayList<>();
// 卡券订单整合
list = couponOrder(map , list);
// 查询实物订单
list = goodsOrder(map , list);
// 查询电影票订单
list = cinemaOrder(map , list);
// 查询星巴克
list = starbucksOrder(map , list);
// 查询美团订单
list = meiTuanOrder(map , list);
// 查询会员订单
list = membersOrder(map , list);
return list;
}
// 实物订单整合
private List<MerOrderSettlementDetailModel> goodsOrder(Map<String, Object> map, List<MerOrderSettlementDetailModel> list) {
// 查询实物订单
List<BsOrderGoods> orderGoodsList = goodsService.getListFinish(map);
MerOrderSettlementDetailModel model;
for (BsOrderGoods orderGoods : orderGoodsList) {
model = new MerOrderSettlementDetailModel();
model.setBusinessType("实物订单");
model.setGoodsName(orderGoods.getGoodsName());
model.setMerName(findMerName(orderGoods.getMerId()));
if (orderGoods.getPlatformCode() != null) {
model.setPlatform(UserLoginPlatform.getDataByType(orderGoods.getPlatformCode()).getName());
}
model.setOrderNo(orderGoods.getOrderNo());
model.setChildOrderNo(orderGoods.getChildOrderNo());
model.setBusiness(orderGoods.getLogisticsNo());
if (orderGoods.getPayRealPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderGoods.getPayRealPrice());
}
if (orderGoods.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderGoods.getPayType()).getName());
} else {
model.setPayType("未知");
}
if (orderGoods.getFinishTime() != null) {
model.setFinishTime(DateUtil.date2String(orderGoods.getFinishTime() , DateUtil.Y_M_D_HMS));
} else {
model.setFinishTime(DateUtil.date2String(orderGoods.getUpdateTime() , DateUtil.Y_M_D_HMS));
}
list.add(model);
}
return list;
}
// 卡券订单整合
private List<MerOrderSettlementDetailModel> couponOrder(Map<String, Object> map , List<MerOrderSettlementDetailModel> list) {
// 查询卡券订单
List<BsOrderCoupon> orderCouponList = orderCouponService.getOrderCouponList(map);
Map<String , Object> mapCou = new HashMap<>();
mapCou.put("couStatus", 2);
// 查询卡券订单卡密
List<OrderCouponModel> orderCouponModelList = orderCouponService.getOrderList(mapCou);
MerOrderSettlementDetailModel model;
for (BsOrderCoupon orderCoupon : orderCouponList) {
String business = couponCode(orderCoupon.getChildOrderNo() , orderCouponModelList);
if (business != null) {
model = new MerOrderSettlementDetailModel();
model.setGoodsName(orderCoupon.getGoodsName());
model.setBusinessType("卡券订单");
model.setMerName(findMerName(orderCoupon.getMerId()));
if (orderCoupon.getPlatformCode() != null) {
model.setPlatform(UserLoginPlatform.getDataByType(orderCoupon.getPlatformCode()).getName());
}
model.setOrderNo(orderCoupon.getOrderNo());
model.setChildOrderNo(orderCoupon.getChildOrderNo());
model.setBusiness(business);
if (orderCoupon.getPayRealPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderCoupon.getPayRealPrice());
}
if (orderCoupon.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderCoupon.getPayType()).getName());
} else {
model.setPayType("未知");
}
model.setFinishTime(DateUtil.date2String(orderCoupon.getUpdateTime() , DateUtil.Y_M_D_HMS));
list.add(model);
}
}
return list;
}
// 整合电影票订单
private List<MerOrderSettlementDetailModel> cinemaOrder(Map<String, Object> map, List<MerOrderSettlementDetailModel> list) {
// 查询电影票订单
List<BsOrderCinema> orderCinemaList = cinemaService.getListFinish(map);
MerOrderSettlementDetailModel model;
for (BsOrderCinema orderCinema : orderCinemaList) {
model = new MerOrderSettlementDetailModel();
model.setBusinessType("电影票订单");
model.setGoodsName(orderCinema.getGoodsName());
model.setMerName(findMerName(orderCinema.getMerId()));
if (orderCinema.getPlatformCode() != null) {
model.setPlatform(UserLoginPlatform.getDataByType(orderCinema.getPlatformCode()).getName());
}
model.setOrderNo(orderCinema.getOrderNo());
model.setChildOrderNo(orderCinema.getChildOrderNo());
if (orderCinema.getPayRealPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderCinema.getPayRealPrice());
}
if (orderCinema.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderCinema.getPayType()).getName());
} else {
model.setPayType("未知");
}
model.setFinishTime(DateUtil.date2String(orderCinema.getCreateTime() , DateUtil.Y_M_D_HMS));
list.add(model);
}
return list;
}
// 整合星巴克订单
private List<MerOrderSettlementDetailModel> starbucksOrder(Map<String, Object> map, List<MerOrderSettlementDetailModel> list) {
// 查询星巴克
List<BsOrderStarbucks> orderStarbucksList = starbucksService.getListFinish(map);
MerOrderSettlementDetailModel model;
for (BsOrderStarbucks orderStarbucks : orderStarbucksList) {
model = new MerOrderSettlementDetailModel();
model.setBusinessType("星巴克订单");
model.setGoodsName(orderStarbucks.getName());
model.setMerName(findMerName(orderStarbucks.getMerId()));
if (orderStarbucks.getPlatformCode() != null) {
model.setPlatform(UserLoginPlatform.getDataByType(orderStarbucks.getPlatformCode()).getName());
}
model.setOrderNo(orderStarbucks.getOrderNo());
model.setChildOrderNo(orderStarbucks.getChildOrderNo());
if (orderStarbucks.getPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderStarbucks.getPrice());
}
if (orderStarbucks.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderStarbucks.getPayType()).getName());
} else {
model.setPayType("未知");
}
model.setFinishTime(DateUtil.date2String(orderStarbucks.getCreateTime() , DateUtil.Y_M_D_HMS));
list.add(model);
}
return list;
}
// 整合美团订单
private List<MerOrderSettlementDetailModel> meiTuanOrder(Map<String, Object> map, List<MerOrderSettlementDetailModel> list) {
// 查询美团订单
List<BsOrderMeituan> orderMeituanList = meiTuanService.getOrderListFinish(map);
MerOrderSettlementDetailModel model;
for (BsOrderMeituan orderMeiTuan : orderMeituanList) {
model = new MerOrderSettlementDetailModel();
model.setBusinessType("美团订单");
model.setBusiness(orderMeiTuan.getSqtBizOrderId());
model.setGoodsName(orderMeiTuan.getGoodsName());
model.setMerName(findMerName(orderMeiTuan.getMerId()));
if (orderMeiTuan.getPlatformCode() != null) {
model.setPlatform(UserLoginPlatform.getDataByType(orderMeiTuan.getPlatformCode()).getName());
}
model.setOrderNo(orderMeiTuan.getOrderNo());
model.setChildOrderNo(orderMeiTuan.getChildOrderNo());
if (orderMeiTuan.getPayRealPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderMeiTuan.getPayRealPrice());
}
if (orderMeiTuan.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderMeiTuan.getPayType()).getName());
} else {
model.setPayType("未知");
}
if (orderMeiTuan.getFinishTime() != null) {
model.setFinishTime(DateUtil.date2String(orderMeiTuan.getFinishTime() , DateUtil.Y_M_D_HMS));
} else {
model.setFinishTime(DateUtil.date2String(orderMeiTuan.getUpdateTime() , DateUtil.Y_M_D_HMS));
}
list.add(model);
}
return list;
}
// 整合会员订单
private List<MerOrderSettlementDetailModel> membersOrder(Map<String, Object> map, List<MerOrderSettlementDetailModel> list) {
// 查询会员订单
List<BsOrderMember> orderMembersList = memberService.getListFinish(map);
MerOrderSettlementDetailModel model;
for (BsOrderMember orderMember : orderMembersList) {
model = new MerOrderSettlementDetailModel();
model.setBusinessType("会员订单");
model.setGoodsName(orderMember.getGoodsName());
model.setMerName(findMerName(orderMember.getMerId()));
if (orderMember.getPlatformCode() != null) {
model.setPlatform(UserLoginPlatform.getDataByType(orderMember.getPlatformCode()).getName());
}
model.setOrderNo(orderMember.getOrderNo());
model.setChildOrderNo(orderMember.getChildOrderNo());
if (orderMember.getPayRealPrice() == null) {
model.setPayRealPrice(new BigDecimal(0));
} else {
model.setPayRealPrice(orderMember.getPayRealPrice());
}
if (orderMember.getPayType() != null) {
model.setPayType(OrderPayTypeEnum.getData(orderMember.getPayType()).getName());
} else {
model.setPayType("未知");
}
if (orderMember.getFinishTime() != null) {
model.setFinishTime(DateUtil.date2String(orderMember.getFinishTime() , DateUtil.Y_M_D_HMS));
} else {
model.setFinishTime(DateUtil.date2String(orderMember.getUpdateTime() , DateUtil.Y_M_D_HMS));
}
list.add(model);
}
return list;
}
private String findMerName(Long merId) {
// 查询商户
List<BsMer> bsMerList = bsMerService.getList(new HashMap<>());
bsMerList = bsMerList.stream().filter(s -> s.getId().equals(merId)).collect(Collectors.toList());
if (bsMerList.size() > 0) {
return bsMerList.get(0).getMerName();
}
return merId.toString();
}
private String couponCode(String childOrderNo , List<OrderCouponModel> orderCouponModelList) {
orderCouponModelList = orderCouponModelList.stream().filter(s -> s.getChildOrderNo().equals(childOrderNo)).collect(Collectors.toList());
if (!orderCouponModelList.isEmpty()) {
StringBuilder sb = new StringBuilder();
for (OrderCouponModel orderCouponModel : orderCouponModelList) {
sb.append(orderCouponModel.getCouNo()).append(",");
}
return sb.substring(0, sb.length() - 1);
}
return null;
}
}

@ -10,7 +10,7 @@ import java.util.Objects;
**/
public enum UserLoginPlatform {
H5("H5", "H5客户端"),
WXAPPLETS("WXAPPLETS", "微信小程序"),
WXAPPLETS("WXAPPLETS", "普汇GO"),
VFAMILY("VFAMILY", "V家园"),
GZGOV("GZGOV", "省自机关"),
;

@ -51,6 +51,18 @@ public enum FileRecordsEnum {
* 退款记录
*/
status9(9, "退款记录"),
/**
* 导出结算详情
*/
status10(10, "结算详情"),
/**
* 导出结算统计
*/
status11(11, "结算统计"),
/**
* 导出结算总和
*/
status12(12, "结算总和"),
;
private final int code;

@ -1,4 +1,5 @@
fileUrl=/home/project/phg/filesystem
#fileUrl=/Users/chenyao/Desktop/img
domainName=https://phgcs.dctpay.com
wechatMpAppid=wxa075e8509802f826
@ -72,7 +73,7 @@ ctMemberId=1622808562621276161
ctPostUrl=http://113.250.49.100:8088/recharge/
mtNotifyUrl = https://phg.dctpay.com/order/cinemaNotify/notify
entId=68465
mtAccessKey=DVNKSHSDHHJ6-TK
mtSecretKey=lj2YDjGnqroY1OuR5zriWg==
mtPostUrl=https://waimai-openapi.apigw.test.meituan.com/api/sqt/open/login/h5/loginFree/redirection?test_open_swimlane=test-open
@ -84,3 +85,8 @@ yuShangPostUrl=http://mbsmemberwebapi.test.onfishes.com/
haiOilPostUrl = https://test-oil.dctpay.com
haiOilAppid = hf7356c71fb97ab0
haiOilAppSecret = 8aef995ff71485dc19b36e35f04c4016
jDPostUrl = https://test-oil.dctpay.com
jDAppKey = C4FF710550C43FE76D4114E1C9C6A0C9
jDAppSecret = 873bcbc1d8d64f36832270c2ff59c194

@ -56,6 +56,13 @@ huiftReqUrl=https://gzyhmp.huift.com.cn
huiftShopCode=20240653-59c4-4181-9157-17fd4b95c3fc
huiftSignSecret=19C17F9E19B8DDDDF2FD2EE4EA9F6C61
entId=68465
mtAccessKey=DYCUPRFHDVY9-TK
mtSecretKey=6TnzPWsQr/45BW4DIKZJDQ==
mtPostUrl=https://bep-openapi.meituan.com/api/sqt/open/
#QIANZHU
qianZhuUrl=https://live.qianzhu8.com
qianzhuH5url=https://nf.qianzhu8.com/gateway
@ -70,6 +77,10 @@ HgApiKey=3fd74e7c16b04681a0f481c5bc0a96d3
HgMemberId=1622808562621276161
HgPostUrl=http://113.250.49.100:8088/recharge/
yuShangAppKey=211394653
yuShangAppSecret=cyQpQKMaGUG186iEZRt1uQ==
yuShangPostUrl=http://mbsmemberwebapi.test.onfishes.com/
haiOilPostUrl = https://oil.dctpay.com
haiOilAppid = hf166f4b2ed75e71

@ -207,7 +207,7 @@ public class BsUserController {
try {
Map<String, Object> other = new HashMap<>();
return ResponseMsgUtil.success(userService.login(UserLoginPlatform.H5, UserLoginType.SMS, "18090580471", "123456", other));
return ResponseMsgUtil.success(userService.login(UserLoginPlatform.H5, UserLoginType.SMS, "13985476824", "123456", other));
} catch (Exception e) {
log.error("LoginController --> phone() error!", e);

Loading…
Cancel
Save