diff --git a/bweb/lib/open-api-sdk-2.0-jd.jar b/bweb/lib/open-api-sdk-2.0-jd.jar
new file mode 100644
index 0000000..6c1b46c
Binary files /dev/null and b/bweb/lib/open-api-sdk-2.0-jd.jar differ
diff --git a/bweb/pom.xml b/bweb/pom.xml
index 6df9864..ab1bd59 100644
--- a/bweb/pom.xml
+++ b/bweb/pom.xml
@@ -31,6 +31,13 @@
1.0.21
${basedir}/lib/open-platform-sdk-1.0.21.jar
+
+ jd.skd
+ jd-open-sdk
+ system
+ 2.0
+ ${basedir}/lib/open-api-sdk-2.0-jd.jar
+
diff --git a/bweb/src/main/java/com/bweb/controller/TestController.java b/bweb/src/main/java/com/bweb/controller/TestController.java
index b8603aa..cb3a1ec 100644
--- a/bweb/src/main/java/com/bweb/controller/TestController.java
+++ b/bweb/src/main/java/com/bweb/controller/TestController.java
@@ -6,21 +6,24 @@ 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.entity.BsOrderGoods;
+import com.hfkj.entity.GoodsUserAddress;
+import com.hfkj.jd.JdPostService;
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.coupon.channel.YouTuCouponService;
+import com.hfkj.service.goods.BsOrderGoodsService;
+import com.hfkj.service.goods.GoodsUserAddressService;
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 com.jd.open.api.sdk.domain.vopsp.CategoryInfoGoodsProvider.response.getCategoryInfoList.GetCategoryInfoGoodsResp;
+import com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSkuDetailInfo.GetSkuPoolInfoGoodsResp;
+import com.jd.open.api.sdk.response.vopdz.VopAddressConvertFourAreaByDetailStrResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
@@ -40,16 +43,24 @@ import java.util.*;
@Api(value="测试")
public class TestController {
private static Logger log = LoggerFactory.getLogger(TestController.class);
+
@Resource
private TradeService huiftTradeService;
+
+
@Resource
- private BsOrderService orderService;
+ private BsOrderGoodsService orderGoodsService;
+
@Resource
- private BsMerPayConfigService merPayConfigService;
+ private JdService jdService;
+
@Resource
- private OrderPayService orderPayService;
+ private BsOrderGoodsService getOrderGoodsService;
+
@Resource
- private BsUserCardService userCardService;
+ private GoodsUserAddressService goodsUserAddressService;
+
+
@RequestMapping(value="/thirdPayResult",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询V家园订单交易状态")
@@ -118,13 +129,146 @@ public class TestController {
}
}
- @RequestMapping(value="/getAccessToken",method = RequestMethod.GET)
+ @RequestMapping(value="/getSkuPoolInfo",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "getSkuPoolInfo")
+ public ResponseData getSkuPoolInfo() {
+ try {
+
+ return ResponseMsgUtil.success(JdPostService.getSkuPoolInfo(jdService.getToken()));
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/querySkuByPage",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "querySkuByPage")
+ public ResponseData querySkuByPage() {
+ try {
+
+ return ResponseMsgUtil.success(JdPostService.querySkuByPage(jdService.getToken() , "7028" , 0).getOpenRpcResult().getResult().getSkus());
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/getSkuDetailInfo",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "getSkuDetailInfo")
+ public ResponseData getSkuDetailInfo() {
+ try {
+
+ GetSkuPoolInfoGoodsResp detail = JdPostService.getSkuDetailInfo(jdService.getToken() , 1235014L).getOpenRpcResult().getResult();
+ return ResponseMsgUtil.success(detail);
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/getSkuImageList",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "getSkuImageList")
+ public ResponseData getSkuImageList() {
+ try {
+
+ return ResponseMsgUtil.success(JdPostService.getSkuImageList(jdService.getToken() , "1235014"));
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/getSellPrice",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "批量查询商品售卖价")
+ public ResponseData getSellPrice() {
+ try {
+
+ return ResponseMsgUtil.success(JdPostService.getSellPrice(jdService.getToken() , "1235014"));
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/getCategoryInfoList",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "获取分类")
+ public ResponseData getCategoryInfoList() {
+ try {
+
+ return ResponseMsgUtil.success(JdPostService.getCategoryInfoList(jdService.getToken() , "1235014"));
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/getGoodsJd",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "更新商品")
+ public ResponseData getGoodsJd() {
+ try {
+ jdService.getGoodsJd();
+ return ResponseMsgUtil.success("");
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+
+ @RequestMapping(value="/confirmReceipt",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "confirmReceipt")
+ public ResponseData confirmReceipt() {
+ try {
+ Map map = new HashMap<>();
+
+ map.put("logisticsStatus" , "AGENT_SIGN");
+ map.put("status" , 2);
+
+ List orderGoodsList = orderGoodsService.getList(map);
+
+ for (BsOrderGoods goods : orderGoodsList) {
+
+ // 判断时间是否是十天前
+
+ if (DateUtil.differentDays(goods.getCreateTime() , new Date()) > 10) {
+ orderGoodsService.confirmReceipt(goods.getId());
+ }
+ }
+ return ResponseMsgUtil.success("");
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+
+
+ @RequestMapping(value="/convertFourAreaByDetailStr",method = RequestMethod.GET)
@ResponseBody
- @ApiOperation(value = "getAccessToken")
- public ResponseData getAccessToken() {
+ @ApiOperation(value = "地址详情转换京东地址编码")
+ public ResponseData convertFourAreaByDetailStr(@RequestParam(value = "address", required = false) String address
+ ) {
try {
- return ResponseMsgUtil.success(JdService.getAccessToken());
+ VopAddressConvertFourAreaByDetailStrResponse response = JdPostService.convertFourAreaByDetailStr(jdService.getToken() , address);
+
+ return ResponseMsgUtil.success(response.getOpenRpcResult().getResult());
} catch (Exception e) {
log.error("error!",e);
@@ -132,4 +276,96 @@ public class TestController {
}
}
+ @RequestMapping(value="/getYouTuCouponList",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "获取卡券")
+ public ResponseData getYouTuCouponList() {
+ try {
+
+ JSONObject object = new JSONObject();
+ object.put("time" , new Date().getTime()/1000);
+
+ JSONObject jsonObject = YouTuCouponService.getYouTuCouponList(object);
+
+ return ResponseMsgUtil.success(jsonObject);
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/getMerchantCouponCode",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "获取电子券码")
+ public ResponseData getMerchantCouponCode() {
+ try {
+
+ JSONObject object = new JSONObject();
+ object.put("id" , "759");
+ object.put("tradeId" , OrderUtil.generateOrderNo());
+ object.put("time" , new Date().getTime()/1000);
+
+ JSONObject jsonObject = YouTuCouponService.getMerchantCouponCode(object);
+
+ return ResponseMsgUtil.success(jsonObject);
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/merchantCouponToMember",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "获取电子券码")
+ public ResponseData merchantCouponToMember() {
+ try {
+
+ JSONObject object = new JSONObject();
+ object.put("id" , "759");
+ object.put("telephone" , "18090580471");
+ object.put("tradeId" , OrderUtil.generateOrderNo());
+ object.put("time" , new Date().getTime()/1000);
+
+ JSONObject jsonObject = YouTuCouponService.merchantCouponToMember(object);
+
+ return ResponseMsgUtil.success(jsonObject);
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+
+ @RequestMapping(value="/getGoodsUpdate",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "更新商品")
+ public ResponseData getGoodsUpdate() {
+ try {
+
+ Map map = new HashMap<>();
+ map.put("status" , 2);
+ List orderGoodsList = getOrderGoodsService.getList(map);
+
+ List userAddresses = goodsUserAddressService.getList(new HashMap<>());
+
+ for (BsOrderGoods orderGoods : orderGoodsList) {
+ GoodsUserAddress address = userAddresses.stream().filter(x -> Objects.equals(x.getId(), orderGoods.getGoodsId())).findFirst().orElse(null);
+
+ if (address != null) {
+ orderGoods.setDeliveryAddress(address.getRegionName() + "-" + address.getAddress() + "-" + address.getConsignee() + "-" + address.getPhone());
+ getOrderGoodsService.update(orderGoods);
+ }
+
+ }
+
+ return ResponseMsgUtil.success("");
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
}
diff --git a/bweb/src/main/java/com/bweb/controller/cms/CmsContentController.java b/bweb/src/main/java/com/bweb/controller/cms/CmsContentController.java
index 8a0edb2..f871eb6 100644
--- a/bweb/src/main/java/com/bweb/controller/cms/CmsContentController.java
+++ b/bweb/src/main/java/com/bweb/controller/cms/CmsContentController.java
@@ -70,6 +70,7 @@ public class CmsContentController {
cmsContent.setName(body.getName());
cmsContent.setAppid(body.getAppid());
cmsContent.setJumpType(body.getJumpType());
+ cmsContent.setShowType(body.getShowType());
cmsContent.setJumpUrl(body.getJumpUrl());
cmsContent.setPlatformCode(body.getPlatformCode());
cmsContent.setImg(body.getImg());
diff --git a/cweb/lib/open-api-sdk-2.0-jd.jar b/cweb/lib/open-api-sdk-2.0-jd.jar
new file mode 100644
index 0000000..6c1b46c
Binary files /dev/null and b/cweb/lib/open-api-sdk-2.0-jd.jar differ
diff --git a/cweb/pom.xml b/cweb/pom.xml
index c7a574c..416d520 100644
--- a/cweb/pom.xml
+++ b/cweb/pom.xml
@@ -31,6 +31,13 @@
1.0.21
${basedir}/lib/open-platform-sdk-1.0.21.jar
+
+ jd.skd
+ jd-open-sdk
+ system
+ 2.0
+ ${basedir}/lib/open-api-sdk-2.0-jd.jar
+
diff --git a/cweb/src/main/java/com/cweb/controller/cms/CmsContentController.java b/cweb/src/main/java/com/cweb/controller/cms/CmsContentController.java
index cd99179..0fb2eb9 100644
--- a/cweb/src/main/java/com/cweb/controller/cms/CmsContentController.java
+++ b/cweb/src/main/java/com/cweb/controller/cms/CmsContentController.java
@@ -1,12 +1,20 @@
package com.cweb.controller.cms;
import com.hfkj.common.utils.ResponseMsgUtil;
+import com.hfkj.entity.CmsContent;
+import com.hfkj.entity.GoodsMsg;
+import com.hfkj.entity.GoodsSpecs;
+import com.hfkj.model.CmsContentModel;
import com.hfkj.model.ResponseData;
+import com.hfkj.model.goods.GoodsModel;
import com.hfkj.service.cms.CmsContentService;
+import com.hfkj.service.goods.GoodsMsgService;
+import com.hfkj.service.goods.GoodsSpecsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -14,8 +22,12 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
@Controller
@RequestMapping(value="/cms")
@@ -27,6 +39,12 @@ public class CmsContentController {
@Resource
private CmsContentService cmsContentService;
+ @Resource
+ private GoodsMsgService goodsMsgService;
+
+ @Resource
+ private GoodsSpecsService goodsSpecsService;
+
@RequestMapping(value="/getCms",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询列表")
@@ -41,7 +59,62 @@ public class CmsContentController {
}
map.put("status", 1);
map.put("platformCode", platformCode);
- return ResponseMsgUtil.success(cmsContentService.getList(map));
+ List list = cmsContentService.getList(map);
+ List goodsMsgList = goodsMsgService.getList(new HashMap<>());
+ List specsList = goodsSpecsService.getList(new HashMap<>());
+
+ List cmsContents = new ArrayList<>();
+
+ for (CmsContent cmsContent : list) {
+ List goodsModels = new ArrayList<>();
+ if (cmsContent.getShowType() != null) {
+
+ List goodsMsgs = new ArrayList<>();
+
+ if (cmsContent.getShowType() == 1) {
+ goodsMsgs = goodsMsgList.stream().filter(s -> s.getGoodsType().equals(cmsContent.getShowDataId().longValue())).limit(2).collect(Collectors.toList());
+ }
+ if (cmsContent.getShowType() == 2) {
+ goodsMsgs = goodsMsgList.stream().filter(s -> s.getGoodsType().equals(cmsContent.getShowDataId().longValue())).limit(4).collect(Collectors.toList());
+ }
+ if (cmsContent.getShowType() == 3) {
+ goodsMsgs = goodsMsgList.stream().filter(s -> s.getGoodsType().equals(cmsContent.getShowDataId().longValue())).limit(10).collect(Collectors.toList());
+ }
+
+ for (GoodsMsg goodsMsg : goodsMsgs) {
+
+ GoodsModel goodsModel = new GoodsModel();
+
+ List goodsSpecs = specsList.stream().filter(s -> s.getGoodsId().equals(goodsMsg.getId())).collect(Collectors.toList());
+
+ if (!goodsSpecs.isEmpty()) {
+ BigDecimal minPrice = goodsSpecs.get(0).getSalePrice();
+ BigDecimal minOriginalPrice = goodsSpecs.get(0).getOriginalPrice();
+
+ for (GoodsSpecs specs : goodsSpecs) {
+ if (specs.getSalePrice().compareTo(minPrice) < 0) {
+ minPrice = specs.getSalePrice();
+ minOriginalPrice = specs.getOriginalPrice();
+ }
+ }
+ BeanUtils.copyProperties(goodsMsg, goodsModel);
+ goodsModel.setOriginalPrice(minOriginalPrice);
+ goodsModel.setPrice(minPrice);
+
+ goodsModels.add(goodsModel);
+
+ }
+ }
+
+ }
+ CmsContentModel cmsContentModel = new CmsContentModel();
+
+ BeanUtils.copyProperties(cmsContent, cmsContentModel);
+ cmsContentModel.setGoodsMsgList(goodsModels);
+ cmsContents.add(cmsContentModel);
+ }
+
+ return ResponseMsgUtil.success(cmsContents);
} catch (Exception e) {
log.error("error!",e);
diff --git a/cweb/src/main/java/com/cweb/controller/goods/DeliveryAddressController.java b/cweb/src/main/java/com/cweb/controller/goods/DeliveryAddressController.java
index d63deee..72854c1 100644
--- a/cweb/src/main/java/com/cweb/controller/goods/DeliveryAddressController.java
+++ b/cweb/src/main/java/com/cweb/controller/goods/DeliveryAddressController.java
@@ -6,10 +6,13 @@ import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.GoodsUserAddress;
+import com.hfkj.jd.JdPostService;
+import com.hfkj.jd.JdService;
import com.hfkj.model.ResponseData;
import com.hfkj.model.UserSessionObject;
import com.hfkj.service.goods.GoodsUserAddressService;
import com.hfkj.service.goods.impl.GoodsUserAddressServiceImpl;
+import com.jd.open.api.sdk.response.vopdz.VopAddressConvertFourAreaByDetailStrResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
@@ -34,6 +37,9 @@ public class DeliveryAddressController {
@Resource
private GoodsUserAddressServiceImpl goodsUserAddressService;
+ @Resource
+ private JdService jdService;
+
@RequestMapping(value = "/getDeliveryAddressList", method = RequestMethod.GET)
@ResponseBody
@@ -71,7 +77,7 @@ public class DeliveryAddressController {
map.put("userId", userSession.getUser().getId());
List list = deliveryAddressService.getList(map);
- if (list.size() == 0) {
+ if (list.isEmpty()) {
deliveryAddress.setWhetherDefault(true);
}
@@ -80,12 +86,22 @@ public class DeliveryAddressController {
deliveryAddress.getWhetherDefault() == null ||
deliveryAddress.getConsignee() == null ||
deliveryAddress.getPhone() == null ||
- deliveryAddress.getRegionName() == null ||
- deliveryAddress.getRegionId() == null
+ deliveryAddress.getRegionName() == null
) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
+ VopAddressConvertFourAreaByDetailStrResponse response = JdPostService.convertFourAreaByDetailStr(jdService.getToken() , deliveryAddress.getRegionName() + deliveryAddress.getAddress());
+
+ // 判断response是否为空,并且response的OpenRpcResult的success属性是否为true
+ if (response != null && response.getOpenRpcResult().getSuccess()) {
+ deliveryAddress.setProvinceId(response.getOpenRpcResult().getResult().getProvinceId());
+ deliveryAddress.setCityId(response.getOpenRpcResult().getResult().getCityId());
+ deliveryAddress.setCountyId(response.getOpenRpcResult().getResult().getCountyId());
+ deliveryAddress.setTownId(response.getOpenRpcResult().getResult().getTownId());
+ }
+
+
deliveryAddress.setUserId(userSession.getUser().getId());
deliveryAddress.setCreateTime(new Date());
deliveryAddress.setUpdateTime(new Date());
@@ -114,8 +130,7 @@ public class DeliveryAddressController {
deliveryAddress.getWhetherDefault() == null ||
deliveryAddress.getConsignee() == null ||
deliveryAddress.getPhone() == null ||
- deliveryAddress.getRegionName() == null ||
- deliveryAddress.getRegionId() == null
+ deliveryAddress.getRegionName() == null
) {
log.error("GoodsDetailController -> insertProduct() error!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
@@ -132,6 +147,19 @@ public class DeliveryAddressController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前收货地址异常!");
}
+ VopAddressConvertFourAreaByDetailStrResponse response = JdPostService.convertFourAreaByDetailStr(jdService.getToken() , deliveryAddress.getRegionName() + deliveryAddress.getAddress());
+
+ if (response != null && response.getOpenRpcResult().getSuccess()) {
+ deliveryAddress.setProvinceId(response.getOpenRpcResult().getResult().getProvinceId());
+ deliveryAddress.setProvinceName(response.getOpenRpcResult().getResult().getProvinceName());
+ deliveryAddress.setCityId(response.getOpenRpcResult().getResult().getCityId());
+ deliveryAddress.setCityName(response.getOpenRpcResult().getResult().getCityName());
+ deliveryAddress.setCountyId(response.getOpenRpcResult().getResult().getCountyId());
+ deliveryAddress.setCountyName(response.getOpenRpcResult().getResult().getCountyName());
+ deliveryAddress.setTownId(response.getOpenRpcResult().getResult().getTownId());
+ deliveryAddress.setTownName(response.getOpenRpcResult().getResult().getTownName());
+ }
+
deliveryAddress.setUserId(userSession.getUser().getId());
deliveryAddress.setCreateTime(goodsDeliveryAddress.getCreateTime());
deliveryAddress.setUpdateTime(new Date());
diff --git a/cweb/src/main/java/com/cweb/controller/goods/GoodsController.java b/cweb/src/main/java/com/cweb/controller/goods/GoodsController.java
index 0573255..ebd2a18 100644
--- a/cweb/src/main/java/com/cweb/controller/goods/GoodsController.java
+++ b/cweb/src/main/java/com/cweb/controller/goods/GoodsController.java
@@ -186,6 +186,8 @@ public class GoodsController {
GoodsMsg goodsMsg = goodsMsgService.queryDetail(id);
+
+
GoodsModel goodsModel = new GoodsModel();
BeanUtils.copyProperties(goodsMsg, goodsModel);
@@ -202,6 +204,9 @@ public class GoodsController {
BeanUtils.copyProperties(goodsSpec, goodsModelSpec);
GoodsVpd goodsVpd = goodsVpdService.queryDetailBySpecsId(goodsSpec.getId());
if (goodsVpd != null) {
+
+
+
BeanUtils.copyProperties(goodsVpd, goodsModelSpec);
}
goodsModelSpec.setSpecsId(goodsSpec.getId());
diff --git a/cweb/src/main/java/com/cweb/controller/goods/ShoppingCartController.java b/cweb/src/main/java/com/cweb/controller/goods/ShoppingCartController.java
index 5baf924..a444865 100644
--- a/cweb/src/main/java/com/cweb/controller/goods/ShoppingCartController.java
+++ b/cweb/src/main/java/com/cweb/controller/goods/ShoppingCartController.java
@@ -125,6 +125,7 @@ public class ShoppingCartController {
shoppingCart.setSpecsName(specs.getName());
shoppingCart.setLoseEfficacy(false);
shoppingCart.setMerId(goodsMsg.getMerId());
+ shoppingCart.setSource(goodsMsg.getChildType());
shoppingCart.setMerName(goodsMsg.getMerName());
shoppingCart.setWhetherCheck(true);
shoppingCart.setStatus(1);
diff --git a/cweb/src/main/java/com/cweb/controller/jd/JdController.java b/cweb/src/main/java/com/cweb/controller/jd/JdController.java
new file mode 100644
index 0000000..9b15f04
--- /dev/null
+++ b/cweb/src/main/java/com/cweb/controller/jd/JdController.java
@@ -0,0 +1,97 @@
+package com.cweb.controller.jd;
+
+import com.hfkj.common.exception.ErrorCode;
+import com.hfkj.common.exception.ErrorHelp;
+import com.hfkj.common.exception.SysCode;
+
+import com.hfkj.common.utils.ResponseMsgUtil;
+import com.hfkj.jd.JdPostService;
+import com.hfkj.jd.JdService;
+import com.hfkj.model.ResponseData;
+
+import com.jd.open.api.sdk.response.vopdz.VopAddressConvertFourAreaByDetailStrResponse;
+import com.jd.open.api.sdk.response.vopdz.VopAddressQueryJdAreaIdListResponse;
+import com.jd.open.api.sdk.response.vopdz.VopAddressVerifyAreaFourIdOpenReqResponse;
+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.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;
+
+
+@Controller
+@RequestMapping(value="/jd")
+@Api(value="京东")
+public class JdController {
+
+ Logger log = LoggerFactory.getLogger(JdController.class);
+
+ @Resource
+ private JdService jdService;
+
+ @RequestMapping(value="/queryJdAreaIdList",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "查询四级地址ID列表")
+ public ResponseData queryJdAreaIdList(@RequestParam(value = "areaLevel", required = false) Integer areaLevel,
+ @RequestParam(value = "areaId", required = false) Long areaId
+ ) {
+ try {
+
+ VopAddressQueryJdAreaIdListResponse response = JdPostService.queryJdAreaIdList(jdService.getToken() , areaLevel , areaId);
+
+ if (!response.getOpenRpcResult().getSuccess()) {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到任何信息!");
+ }
+
+ return ResponseMsgUtil.success(response.getOpenRpcResult().getResult().getAreaInfoList());
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/verifyAreaFourIdOpenReq",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "验证四级地址ID有效性")
+ public ResponseData verifyAreaFourIdOpenReq(@RequestParam(value = "provinceId", required = false) Long provinceId,
+ @RequestParam(value = "cityId", required = false) Long cityId,
+ @RequestParam(value = "countyId", required = false) Long countyId,
+ @RequestParam(value = "townId", required = false) Long townId
+ ) {
+ try {
+
+ VopAddressVerifyAreaFourIdOpenReqResponse response = JdPostService.verifyAreaFourIdOpenReq(jdService.getToken() , provinceId , cityId , countyId , townId);
+
+ return ResponseMsgUtil.success(response.getOpenRpcResult().getSuccess());
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+ @RequestMapping(value="/convertFourAreaByDetailStr",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "地址详情转换京东地址编码")
+ public ResponseData convertFourAreaByDetailStr(@RequestParam(value = "address", required = false) String address
+ ) {
+ try {
+
+ VopAddressConvertFourAreaByDetailStrResponse response = JdPostService.convertFourAreaByDetailStr(jdService.getToken() , address);
+
+ return ResponseMsgUtil.success(response.getOpenRpcResult().getResult());
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+}
diff --git a/order/src/main/java/com/order/controller/OrderPayController.java b/order/src/main/java/com/order/controller/OrderPayController.java
index 208b579..a3a364d 100644
--- a/order/src/main/java/com/order/controller/OrderPayController.java
+++ b/order/src/main/java/com/order/controller/OrderPayController.java
@@ -7,16 +7,14 @@ import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.config.CommonSysConst;
-import com.hfkj.entity.BsMerPayConfig;
-import com.hfkj.entity.BsOrderOutside;
-import com.hfkj.entity.BsUserCard;
-import com.hfkj.entity.BsUserLoginLog;
+import com.hfkj.entity.*;
import com.hfkj.mer.BsMerPayConfigService;
import com.hfkj.model.ResponseData;
import com.hfkj.model.UserSessionObject;
import com.hfkj.model.order.OrderChildModel;
import com.hfkj.model.order.OrderModel;
import com.hfkj.service.card.BsUserCardService;
+import com.hfkj.service.goods.GoodsVpdService;
import com.hfkj.service.order.BsOrderChildService;
import com.hfkj.service.order.BsOrderOutsideService;
import com.hfkj.service.order.BsOrderService;
@@ -71,12 +69,8 @@ public class OrderPayController {
private TradeService huiftTradeService;
@Resource
private BsMerPayConfigService merPayConfigService;
-
- @Resource
- private BsOrderOutsideService bsOrderOutsideService;
-
@Resource
- private BsUserLoginLogService bsUserLoginLogService;
+ private GoodsVpdService goodsVpdService;
@RequestMapping(value="/wechat",method = RequestMethod.POST)
@ResponseBody
@@ -204,6 +198,19 @@ public class OrderPayController {
signSecret = HuiftConfig.signSecret95;
}
+ if (order.getOrderChildList().get(0).getProductSpecId() != null) {
+ GoodsVpd goodsVpd = goodsVpdService.queryDetailBySpecsId(order.getOrderChildList().get(0).getProductSpecId());
+
+ if (goodsVpd != null) {
+ if (goodsVpd.getSource().equals(9)) {
+ shopCode = HuiftConfig.shopcode01;
+ signSecret = HuiftConfig.signSecret01;
+ }
+ }
+ }
+
+
+
// 请求支付渠道
JSONObject thirdPreOrder = huiftTradeService.thirdPreOrder(order , shopCode , signSecret);
for (OrderChildModel orderChild : order.getOrderChildList()) {
diff --git a/order/src/main/java/com/order/controller/business/BsOrderGoodsController.java b/order/src/main/java/com/order/controller/business/BsOrderGoodsController.java
index e30992c..6a9dad0 100644
--- a/order/src/main/java/com/order/controller/business/BsOrderGoodsController.java
+++ b/order/src/main/java/com/order/controller/business/BsOrderGoodsController.java
@@ -346,16 +346,12 @@ public class BsOrderGoodsController {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "暂无物流信息!");
}
- GoodsUserAddress userAddress = addressService.queryDetail(orderGoods.getDeliveryAddressId());
- if (userAddress == null) {
- throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "暂无物流信息!");
- }
if (orderGoods.getLogisticsNo() == null) {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "待揽收!");
}
- GoodsLogistics logistics = (GoodsLogistics) bsOrderGoodsService.getLogisticsMsg(orderGoods.getLogisticsNo() , userAddress.getPhone());
+ GoodsLogistics logistics = (GoodsLogistics) bsOrderGoodsService.getLogisticsMsg(orderGoods.getLogisticsNo() , orderGoods.getUserPhone());
if (logistics.getLogisticsStatus() != null) {
orderGoods.setLogisticsStatus(logistics.getLogisticsStatus());
diff --git a/order/src/main/java/com/order/controller/business/BsOrderMemberController.java b/order/src/main/java/com/order/controller/business/BsOrderMemberController.java
new file mode 100644
index 0000000..8986774
--- /dev/null
+++ b/order/src/main/java/com/order/controller/business/BsOrderMemberController.java
@@ -0,0 +1,84 @@
+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.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.service.SecConfigService;
+import com.hfkj.service.goods.BsOrderMeiTuanService;
+import com.hfkj.service.goods.BsOrderMemberService;
+import com.hfkj.service.goods.impl.BsOrderMeiTuanServiceImpl;
+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;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.HashMap;
+import java.util.Map;
+
+@Controller
+@RequestMapping(value="/orderMember")
+@Api(value="会员订单管理")
+public class BsOrderMemberController {
+
+ @Resource
+ private BsOrderMemberService bsOrderMemberService;
+
+ private static final Logger log = LoggerFactory.getLogger(BsOrderGoodsController.class);
+
+ @RequestMapping(value="/getListMember",method = RequestMethod.GET)
+ @ResponseBody
+ @ApiOperation(value = "查询列表")
+ public ResponseData getListMember(
+ @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 = "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 map = new HashMap<>();
+
+ map.put("orderNo", orderNo);
+ map.put("childOrderNo", childOrderNo);
+ map.put("userPhone", userPhone);
+ 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);
+
+ PageHelper.startPage(pageNum, pageSize);
+ return ResponseMsgUtil.success(new PageInfo<>(bsOrderMemberService.getList(map)));
+
+ } catch (Exception e) {
+ log.error("error!",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+}
diff --git a/order/src/main/java/com/order/controller/notify/JdNotify.java b/order/src/main/java/com/order/controller/notify/JdNotify.java
index 061f66c..41cd47b 100644
--- a/order/src/main/java/com/order/controller/notify/JdNotify.java
+++ b/order/src/main/java/com/order/controller/notify/JdNotify.java
@@ -2,12 +2,14 @@ package com.order.controller.notify;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.utils.HttpsUtils;
+import com.hfkj.common.utils.RedisUtil;
import com.hfkj.config.CommonSysConst;
-import com.hfkj.jd.JdService;
+import com.hfkj.jd.JdPostService;
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.*;
@@ -19,31 +21,11 @@ import java.io.PrintWriter;
@RequestMapping(value = "/jdNotify")
@Api(value = "京东回调")
public class JdNotify {
- private static final Logger log = LoggerFactory.getLogger(JdService.class);
+ private static final Logger log = LoggerFactory.getLogger(JdPostService.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);
- }
- }
+ @Autowired
+ private RedisUtil redisUtil;
@RequestMapping(value = "/callbackToken", method = RequestMethod.GET)
@ApiOperation(value = "token回调")
@@ -52,14 +34,16 @@ public class JdNotify {
try {
log.info("============token回调任务Start=============");
- log.info("token回调-回调参数: " + code);
+ log.info("token回调 code-回调参数: " + 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);
+ JSONObject jsonObject = HttpsUtils.doGet("https://open-oauth.jd.com/oauth2/access_token", object);
+ log.info("token回调 jsonObject-回调参数: " + jsonObject);
+ log.info("token回调 access_token-回调参数: " + jsonObject.getString("access_token"));
+ redisUtil.set("access_token", jsonObject.getString("access_token") , jsonObject.getInteger("expires_in") - 10000);
log.info("============token回调任务End=============");
} catch (Exception e) {
diff --git a/order/src/main/java/com/order/controller/notify/MeiTuanController.java b/order/src/main/java/com/order/controller/notify/MeiTuanController.java
index bb881d0..8a0da23 100644
--- a/order/src/main/java/com/order/controller/notify/MeiTuanController.java
+++ b/order/src/main/java/com/order/controller/notify/MeiTuanController.java
@@ -275,7 +275,20 @@ public class MeiTuanController {
BsOrderMeituan orderMeiTuan = bsOrderMeiTuanService.findOrderMeiTuanBySqtBizOrderId(object.getString("sqtBizOrderId"));
if (orderMeiTuan != null) {
- bsOrderMeiTuanService.orderFinish(orderMeiTuan.getChildOrderNo());
+ if (object.getInteger("changeType").equals(10)) {
+ if (object.getString("firstBusinessType").equals("020")) {
+ if (object.getString("changeStatus").equals("9")) {
+ bsOrderMeiTuanService.orderFinish(orderMeiTuan.getChildOrderNo());
+ }
+ }
+ if (object.getString("firstBusinessType").equals("010")) {
+ if (object.getString("changeStatus").equals("10")) {
+ bsOrderMeiTuanService.orderFinish(orderMeiTuan.getChildOrderNo());
+ }
+ }
+ }
+
+
}
JSONObject data = new JSONObject();
data.put("status", 0);
diff --git a/order/src/main/resources/dev/logback.xml b/order/src/main/resources/dev/logback.xml
index 63b61cb..160c7e6 100644
--- a/order/src/main/resources/dev/logback.xml
+++ b/order/src/main/resources/dev/logback.xml
@@ -329,7 +329,7 @@
UTF-8
-
+
diff --git a/schedule/lib/open-api-sdk-2.0-jd.jar b/schedule/lib/open-api-sdk-2.0-jd.jar
new file mode 100644
index 0000000..6c1b46c
Binary files /dev/null and b/schedule/lib/open-api-sdk-2.0-jd.jar differ
diff --git a/schedule/lib/open-platform-sdk-1.0.21.jar b/schedule/lib/open-platform-sdk-1.0.21.jar
new file mode 100644
index 0000000..0cbe24f
Binary files /dev/null and b/schedule/lib/open-platform-sdk-1.0.21.jar differ
diff --git a/schedule/pom.xml b/schedule/pom.xml
index 4a5f85b..c193162 100644
--- a/schedule/pom.xml
+++ b/schedule/pom.xml
@@ -18,6 +18,20 @@
service
PACKT-SNAPSHOT
+
+ meituan.skd
+ meituan-open-sdk
+ system
+ 1.0.21
+ ${basedir}/lib/open-platform-sdk-1.0.21.jar
+
+
+ jd.skd
+ jd-open-sdk
+ system
+ 2.0
+ ${basedir}/lib/open-api-sdk-2.0-jd.jar
+
@@ -26,6 +40,13 @@
src/main/resources/${env}
false
+
+ ${basedir}/lib
+ BOOT-INF/lib/
+
+ **/*.jar
+
+
diff --git a/schedule/src/main/java/com/hfkj/schedule/CouponSchedule.java b/schedule/src/main/java/com/hfkj/schedule/CouponSchedule.java
index 2d38d72..73e0ad5 100644
--- a/schedule/src/main/java/com/hfkj/schedule/CouponSchedule.java
+++ b/schedule/src/main/java/com/hfkj/schedule/CouponSchedule.java
@@ -7,6 +7,7 @@ import com.hfkj.service.coupon.BsOrderCouponNoService;
import com.hfkj.service.coupon.BsOrderCouponService;
import com.hfkj.service.coupon.channel.HuiLianTongCouponService;
import com.hfkj.service.coupon.channel.PetroConfig;
+import com.hfkj.service.coupon.channel.YouTuCouponService;
import com.hfkj.service.hlt.HuiLianTongUnionCardService;
import com.hfkj.service.order.BsOrderChildService;
import com.hfkj.service.order.BsOrderService;
@@ -77,13 +78,15 @@ public class CouponSchedule {
// 查询卡券订单
BsOrderCoupon orderCoupon = orderCouponService.getDetail(coupon.getCouponOrderId());
if (orderCoupon != null) {
- JSONObject jsonObject = PetroConfig.couponDetail(coupon.getGoodsVpdSourceCouNo(), orderCoupon.getUserPhone());
- if (jsonObject.getString("resultCode").equals("0000")) {
- String data = PetroConfig.decrypt(jsonObject.getString("jsonResult"));
- JSONObject jsonData = JSONObject.parseObject(data);
- if (jsonData.getInteger("state") == 40) {
+ JSONObject objectP = new JSONObject();
+ objectP.put("couponCode" , coupon.getGoodsVpdSourceCouNo());
+ objectP.put("time" , new Date().getTime()/1000);
+
+ JSONObject jsonObject = YouTuCouponService.getMerchantCouponState(objectP);
+ if (jsonObject.getString("code").equals("success")) {
+ if (jsonObject.getInteger("state") == 3) {
coupon.setStatus(OrderCouponNoStatusEnum.status3.getCode());
- coupon.setFinishTime(jsonData.getDate("usedTime"));
+ coupon.setFinishTime(new Date());
orderCouponNoService.editData(coupon);
}
}
diff --git a/schedule/src/main/java/com/hfkj/schedule/OrderGoodsSchedule.java b/schedule/src/main/java/com/hfkj/schedule/OrderGoodsSchedule.java
index 3af1b4f..f9caa3a 100644
--- a/schedule/src/main/java/com/hfkj/schedule/OrderGoodsSchedule.java
+++ b/schedule/src/main/java/com/hfkj/schedule/OrderGoodsSchedule.java
@@ -70,6 +70,25 @@ public class OrderGoodsSchedule {
}
}
+ @Scheduled(cron = "5 0 0 * * ?")
+ public void orderGoodsConfirmReceiptAgent() {
+ Map map = new HashMap<>();
+
+ map.put("logisticsStatus" , "AGENT_SIGN");
+ map.put("status" , 2);
+
+ List orderGoodsList = orderGoodsService.getList(map);
+
+ for (BsOrderGoods goods : orderGoodsList) {
+
+ // 判断时间是否是十天前
+
+ if (DateUtil.differentDays(goods.getCreateTime() , new Date()) > 10) {
+ orderGoodsService.confirmReceipt(goods.getId());
+ }
+ }
+ }
+
@Scheduled(cron = "5 0 0 * * ?")
public void getLogisticsMsg() {
Map objectMap = new HashMap<>();
diff --git a/service/src/main/java/com/hfkj/config/CommonSysConfig.java b/service/src/main/java/com/hfkj/config/CommonSysConfig.java
index 201da5a..5c8a785 100644
--- a/service/src/main/java/com/hfkj/config/CommonSysConfig.java
+++ b/service/src/main/java/com/hfkj/config/CommonSysConfig.java
@@ -160,4 +160,9 @@ public class CommonSysConfig {
private String jDAppKey;
private String jDAppSecret;
+
+ private String ytAccessKey;
+ private String ytSecretKey;
+ private String ytPostUrl;
+
}
diff --git a/service/src/main/java/com/hfkj/dao/BsOrderGoodsMapper.java b/service/src/main/java/com/hfkj/dao/BsOrderGoodsMapper.java
index ad4953e..499b8fe 100644
--- a/service/src/main/java/com/hfkj/dao/BsOrderGoodsMapper.java
+++ b/service/src/main/java/com/hfkj/dao/BsOrderGoodsMapper.java
@@ -42,7 +42,8 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
"insert into bs_order_goods (logistics_no, freight_price, ",
"delivery_address_id, delivery_address, ",
"order_no, child_order_no, ",
- "mer_id, mer_name, user_id, ",
+ "third_order_no, mer_id, ",
+ "mer_name, user_id, ",
"user_phone, goods_id, ",
"img, goods_name, ",
"goods_type_id, goods_type_name, ",
@@ -63,7 +64,8 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
"values (#{logisticsNo,jdbcType=VARCHAR}, #{freightPrice,jdbcType=DECIMAL}, ",
"#{deliveryAddressId,jdbcType=BIGINT}, #{deliveryAddress,jdbcType=VARCHAR}, ",
"#{orderNo,jdbcType=VARCHAR}, #{childOrderNo,jdbcType=VARCHAR}, ",
- "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ",
+ "#{thirdOrderNo,jdbcType=VARCHAR}, #{merId,jdbcType=BIGINT}, ",
+ "#{merName,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ",
"#{userPhone,jdbcType=VARCHAR}, #{goodsId,jdbcType=BIGINT}, ",
"#{img,jdbcType=VARCHAR}, #{goodsName,jdbcType=VARCHAR}, ",
"#{goodsTypeId,jdbcType=BIGINT}, #{goodsTypeName,jdbcType=VARCHAR}, ",
@@ -98,6 +100,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
@Result(column="delivery_address", property="deliveryAddress", jdbcType=JdbcType.VARCHAR),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
+ @Result(column="third_order_no", property="thirdOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@@ -142,13 +145,13 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
@Select({
"select",
"id, logistics_no, freight_price, delivery_address_id, delivery_address, order_no, ",
- "child_order_no, mer_id, mer_name, user_id, user_phone, goods_id, img, goods_name, ",
- "goods_type_id, goods_type_name, goods_brand_id, goods_brand_name, goods_specs_id, ",
- "goods_specs_name, goods_specs_original_price, goods_count, total_price, total_deduction_price, ",
- "coupon_discount_price, integral_discount_price, platform_code, pay_real_price, ",
- "pay_channel, pay_serial_no, pay_type, `status`, logistics_status_desc, logistics_status, ",
- "create_time, pay_time, cancel_time, refund_time, finish_time, update_time, exception_status, ",
- "exception_msg, ext_1, ext_2, ext_3",
+ "child_order_no, third_order_no, mer_id, mer_name, user_id, user_phone, goods_id, ",
+ "img, goods_name, goods_type_id, goods_type_name, goods_brand_id, goods_brand_name, ",
+ "goods_specs_id, goods_specs_name, goods_specs_original_price, goods_count, total_price, ",
+ "total_deduction_price, coupon_discount_price, integral_discount_price, platform_code, ",
+ "pay_real_price, pay_channel, pay_serial_no, pay_type, `status`, logistics_status_desc, ",
+ "logistics_status, create_time, pay_time, cancel_time, refund_time, finish_time, ",
+ "update_time, exception_status, exception_msg, ext_1, ext_2, ext_3",
"from bs_order_goods",
"where id = #{id,jdbcType=BIGINT}"
})
@@ -160,6 +163,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
@Result(column="delivery_address", property="deliveryAddress", jdbcType=JdbcType.VARCHAR),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
+ @Result(column="third_order_no", property="thirdOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@@ -218,6 +222,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt {
"delivery_address = #{deliveryAddress,jdbcType=VARCHAR},",
"order_no = #{orderNo,jdbcType=VARCHAR},",
"child_order_no = #{childOrderNo,jdbcType=VARCHAR},",
+ "third_order_no = #{thirdOrderNo,jdbcType=VARCHAR},",
"mer_id = #{merId,jdbcType=BIGINT},",
"mer_name = #{merName,jdbcType=VARCHAR},",
"user_id = #{userId,jdbcType=BIGINT},",
diff --git a/service/src/main/java/com/hfkj/dao/BsOrderGoodsSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsOrderGoodsSqlProvider.java
index 6dc8d10..f91bb22 100644
--- a/service/src/main/java/com/hfkj/dao/BsOrderGoodsSqlProvider.java
+++ b/service/src/main/java/com/hfkj/dao/BsOrderGoodsSqlProvider.java
@@ -52,6 +52,10 @@ public class BsOrderGoodsSqlProvider {
sql.VALUES("child_order_no", "#{childOrderNo,jdbcType=VARCHAR}");
}
+ if (record.getThirdOrderNo() != null) {
+ sql.VALUES("third_order_no", "#{thirdOrderNo,jdbcType=VARCHAR}");
+ }
+
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
@@ -220,6 +224,7 @@ public class BsOrderGoodsSqlProvider {
sql.SELECT("delivery_address");
sql.SELECT("order_no");
sql.SELECT("child_order_no");
+ sql.SELECT("third_order_no");
sql.SELECT("mer_id");
sql.SELECT("mer_name");
sql.SELECT("user_id");
@@ -303,6 +308,10 @@ public class BsOrderGoodsSqlProvider {
sql.SET("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}");
}
+ if (record.getThirdOrderNo() != null) {
+ sql.SET("third_order_no = #{record.thirdOrderNo,jdbcType=VARCHAR}");
+ }
+
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
@@ -470,6 +479,7 @@ public class BsOrderGoodsSqlProvider {
sql.SET("delivery_address = #{record.deliveryAddress,jdbcType=VARCHAR}");
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
sql.SET("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}");
+ sql.SET("third_order_no = #{record.thirdOrderNo,jdbcType=VARCHAR}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
@@ -542,6 +552,10 @@ public class BsOrderGoodsSqlProvider {
sql.SET("child_order_no = #{childOrderNo,jdbcType=VARCHAR}");
}
+ if (record.getThirdOrderNo() != null) {
+ sql.SET("third_order_no = #{thirdOrderNo,jdbcType=VARCHAR}");
+ }
+
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
diff --git a/service/src/main/java/com/hfkj/dao/CmsContentMapper.java b/service/src/main/java/com/hfkj/dao/CmsContentMapper.java
index c68e1a7..d4020de 100644
--- a/service/src/main/java/com/hfkj/dao/CmsContentMapper.java
+++ b/service/src/main/java/com/hfkj/dao/CmsContentMapper.java
@@ -41,12 +41,14 @@ public interface CmsContentMapper extends CmsContentMapperExt {
@Insert({
"insert into cms_content (platform_code, code, ",
"`name`, img, jump_type, ",
+ "show_type, show_data_id, ",
"jump_url, appid, ",
"create_time, update_time, ",
"`status`, ext_1, ext_2, ",
"ext_3)",
"values (#{platformCode,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, ",
"#{name,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{jumpType,jdbcType=INTEGER}, ",
+ "#{showType,jdbcType=INTEGER}, #{showDataId,jdbcType=INTEGER}, ",
"#{jumpUrl,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
@@ -67,6 +69,8 @@ public interface CmsContentMapper extends CmsContentMapperExt {
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER),
+ @Result(column="show_type", property="showType", jdbcType=JdbcType.INTEGER),
+ @Result(column="show_data_id", property="showDataId", jdbcType=JdbcType.INTEGER),
@Result(column="jump_url", property="jumpUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="appid", property="appid", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@@ -80,8 +84,8 @@ public interface CmsContentMapper extends CmsContentMapperExt {
@Select({
"select",
- "id, platform_code, code, `name`, img, jump_type, jump_url, appid, create_time, ",
- "update_time, `status`, ext_1, ext_2, ext_3",
+ "id, platform_code, code, `name`, img, jump_type, show_type, show_data_id, jump_url, ",
+ "appid, create_time, update_time, `status`, ext_1, ext_2, ext_3",
"from cms_content",
"where id = #{id,jdbcType=BIGINT}"
})
@@ -92,6 +96,8 @@ public interface CmsContentMapper extends CmsContentMapperExt {
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="img", property="img", jdbcType=JdbcType.VARCHAR),
@Result(column="jump_type", property="jumpType", jdbcType=JdbcType.INTEGER),
+ @Result(column="show_type", property="showType", jdbcType=JdbcType.INTEGER),
+ @Result(column="show_data_id", property="showDataId", jdbcType=JdbcType.INTEGER),
@Result(column="jump_url", property="jumpUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="appid", property="appid", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@@ -119,6 +125,8 @@ public interface CmsContentMapper extends CmsContentMapperExt {
"`name` = #{name,jdbcType=VARCHAR},",
"img = #{img,jdbcType=VARCHAR},",
"jump_type = #{jumpType,jdbcType=INTEGER},",
+ "show_type = #{showType,jdbcType=INTEGER},",
+ "show_data_id = #{showDataId,jdbcType=INTEGER},",
"jump_url = #{jumpUrl,jdbcType=VARCHAR},",
"appid = #{appid,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
diff --git a/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java b/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java
index e2a8cb2..876565c 100644
--- a/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java
+++ b/service/src/main/java/com/hfkj/dao/CmsContentSqlProvider.java
@@ -48,6 +48,14 @@ public class CmsContentSqlProvider {
sql.VALUES("jump_type", "#{jumpType,jdbcType=INTEGER}");
}
+ if (record.getShowType() != null) {
+ sql.VALUES("show_type", "#{showType,jdbcType=INTEGER}");
+ }
+
+ if (record.getShowDataId() != null) {
+ sql.VALUES("show_data_id", "#{showDataId,jdbcType=INTEGER}");
+ }
+
if (record.getJumpUrl() != null) {
sql.VALUES("jump_url", "#{jumpUrl,jdbcType=VARCHAR}");
}
@@ -95,6 +103,8 @@ public class CmsContentSqlProvider {
sql.SELECT("`name`");
sql.SELECT("img");
sql.SELECT("jump_type");
+ sql.SELECT("show_type");
+ sql.SELECT("show_data_id");
sql.SELECT("jump_url");
sql.SELECT("appid");
sql.SELECT("create_time");
@@ -144,6 +154,14 @@ public class CmsContentSqlProvider {
sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}");
}
+ if (record.getShowType() != null) {
+ sql.SET("show_type = #{record.showType,jdbcType=INTEGER}");
+ }
+
+ if (record.getShowDataId() != null) {
+ sql.SET("show_data_id = #{record.showDataId,jdbcType=INTEGER}");
+ }
+
if (record.getJumpUrl() != null) {
sql.SET("jump_url = #{record.jumpUrl,jdbcType=VARCHAR}");
}
@@ -190,6 +208,8 @@ public class CmsContentSqlProvider {
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
sql.SET("img = #{record.img,jdbcType=VARCHAR}");
sql.SET("jump_type = #{record.jumpType,jdbcType=INTEGER}");
+ sql.SET("show_type = #{record.showType,jdbcType=INTEGER}");
+ sql.SET("show_data_id = #{record.showDataId,jdbcType=INTEGER}");
sql.SET("jump_url = #{record.jumpUrl,jdbcType=VARCHAR}");
sql.SET("appid = #{record.appid,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
@@ -228,6 +248,14 @@ public class CmsContentSqlProvider {
sql.SET("jump_type = #{jumpType,jdbcType=INTEGER}");
}
+ if (record.getShowType() != null) {
+ sql.SET("show_type = #{showType,jdbcType=INTEGER}");
+ }
+
+ if (record.getShowDataId() != null) {
+ sql.SET("show_data_id = #{showDataId,jdbcType=INTEGER}");
+ }
+
if (record.getJumpUrl() != null) {
sql.SET("jump_url = #{jumpUrl,jdbcType=VARCHAR}");
}
diff --git a/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java b/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java
index aa9f8eb..68a0f46 100644
--- a/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java
+++ b/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java
@@ -39,26 +39,30 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
int deleteByPrimaryKey(Long id);
@Insert({
- "insert into goods_msg (goods_type, goods_type_name, ",
- "goods_type_parent, goods_type_parent_name, ",
- "sale_num, `type`, goods_brand_name, ",
- "goods_brand, goods_label, ",
- "goods_explain, title, ",
- "list_img, banner_img, ",
- "detail_img, `status`, ",
- "create_time, update_time, ",
- "mer_id, mer_name, ext_1, ",
- "ext_2, ext_3)",
- "values (#{goodsType,jdbcType=BIGINT}, #{goodsTypeName,jdbcType=VARCHAR}, ",
- "#{goodsTypeParent,jdbcType=BIGINT}, #{goodsTypeParentName,jdbcType=VARCHAR}, ",
- "#{saleNum,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{goodsBrandName,jdbcType=VARCHAR}, ",
- "#{goodsBrand,jdbcType=BIGINT}, #{goodsLabel,jdbcType=VARCHAR}, ",
- "#{goodsExplain,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, ",
- "#{listImg,jdbcType=VARCHAR}, #{bannerImg,jdbcType=VARCHAR}, ",
- "#{detailImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
- "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
- "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ",
- "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
+ "insert into goods_msg (goods_type, third_id, ",
+ "goods_type_name, goods_type_parent, ",
+ "goods_type_parent_name, sale_num, ",
+ "`type`, child_type, ",
+ "goods_brand_name, goods_brand, ",
+ "goods_label, goods_explain, ",
+ "title, list_img, ",
+ "banner_img, detail_img, ",
+ "`status`, create_time, ",
+ "update_time, mer_id, ",
+ "mer_name, ext_1, ext_2, ",
+ "ext_3)",
+ "values (#{goodsType,jdbcType=BIGINT}, #{thirdId,jdbcType=VARCHAR}, ",
+ "#{goodsTypeName,jdbcType=VARCHAR}, #{goodsTypeParent,jdbcType=BIGINT}, ",
+ "#{goodsTypeParentName,jdbcType=VARCHAR}, #{saleNum,jdbcType=INTEGER}, ",
+ "#{type,jdbcType=INTEGER}, #{childType,jdbcType=INTEGER}, ",
+ "#{goodsBrandName,jdbcType=VARCHAR}, #{goodsBrand,jdbcType=BIGINT}, ",
+ "#{goodsLabel,jdbcType=VARCHAR}, #{goodsExplain,jdbcType=VARCHAR}, ",
+ "#{title,jdbcType=VARCHAR}, #{listImg,jdbcType=VARCHAR}, ",
+ "#{bannerImg,jdbcType=VARCHAR}, #{detailImg,jdbcType=VARCHAR}, ",
+ "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
+ "#{updateTime,jdbcType=TIMESTAMP}, #{merId,jdbcType=BIGINT}, ",
+ "#{merName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
+ "#{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(GoodsMsg record);
@@ -71,11 +75,13 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT),
+ @Result(column="third_id", property="thirdId", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_type_parent", property="goodsTypeParent", jdbcType=JdbcType.BIGINT),
@Result(column="goods_type_parent_name", property="goodsTypeParentName", jdbcType=JdbcType.VARCHAR),
@Result(column="sale_num", property="saleNum", jdbcType=JdbcType.INTEGER),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
+ @Result(column="child_type", property="childType", jdbcType=JdbcType.INTEGER),
@Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_brand", property="goodsBrand", jdbcType=JdbcType.BIGINT),
@Result(column="goods_label", property="goodsLabel", jdbcType=JdbcType.VARCHAR),
@@ -97,8 +103,8 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
@Select({
"select",
- "id, goods_type, goods_type_name, goods_type_parent, goods_type_parent_name, ",
- "sale_num, `type`, goods_brand_name, goods_brand, goods_label, goods_explain, ",
+ "id, goods_type, third_id, goods_type_name, goods_type_parent, goods_type_parent_name, ",
+ "sale_num, `type`, child_type, goods_brand_name, goods_brand, goods_label, goods_explain, ",
"title, list_img, banner_img, detail_img, `status`, create_time, update_time, ",
"mer_id, mer_name, ext_1, ext_2, ext_3",
"from goods_msg",
@@ -107,11 +113,13 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT),
+ @Result(column="third_id", property="thirdId", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_type_parent", property="goodsTypeParent", jdbcType=JdbcType.BIGINT),
@Result(column="goods_type_parent_name", property="goodsTypeParentName", jdbcType=JdbcType.VARCHAR),
@Result(column="sale_num", property="saleNum", jdbcType=JdbcType.INTEGER),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
+ @Result(column="child_type", property="childType", jdbcType=JdbcType.INTEGER),
@Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_brand", property="goodsBrand", jdbcType=JdbcType.BIGINT),
@Result(column="goods_label", property="goodsLabel", jdbcType=JdbcType.VARCHAR),
@@ -143,11 +151,13 @@ public interface GoodsMsgMapper extends GoodsMsgMapperExt {
@Update({
"update goods_msg",
"set goods_type = #{goodsType,jdbcType=BIGINT},",
+ "third_id = #{thirdId,jdbcType=VARCHAR},",
"goods_type_name = #{goodsTypeName,jdbcType=VARCHAR},",
"goods_type_parent = #{goodsTypeParent,jdbcType=BIGINT},",
"goods_type_parent_name = #{goodsTypeParentName,jdbcType=VARCHAR},",
"sale_num = #{saleNum,jdbcType=INTEGER},",
"`type` = #{type,jdbcType=INTEGER},",
+ "child_type = #{childType,jdbcType=INTEGER},",
"goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR},",
"goods_brand = #{goodsBrand,jdbcType=BIGINT},",
"goods_label = #{goodsLabel,jdbcType=VARCHAR},",
diff --git a/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java b/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java
index e33d3ab..67310d2 100644
--- a/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java
+++ b/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java
@@ -32,6 +32,10 @@ public class GoodsMsgSqlProvider {
sql.VALUES("goods_type", "#{goodsType,jdbcType=BIGINT}");
}
+ if (record.getThirdId() != null) {
+ sql.VALUES("third_id", "#{thirdId,jdbcType=VARCHAR}");
+ }
+
if (record.getGoodsTypeName() != null) {
sql.VALUES("goods_type_name", "#{goodsTypeName,jdbcType=VARCHAR}");
}
@@ -52,6 +56,10 @@ public class GoodsMsgSqlProvider {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
+ if (record.getChildType() != null) {
+ sql.VALUES("child_type", "#{childType,jdbcType=INTEGER}");
+ }
+
if (record.getGoodsBrandName() != null) {
sql.VALUES("goods_brand_name", "#{goodsBrandName,jdbcType=VARCHAR}");
}
@@ -127,11 +135,13 @@ public class GoodsMsgSqlProvider {
sql.SELECT("id");
}
sql.SELECT("goods_type");
+ sql.SELECT("third_id");
sql.SELECT("goods_type_name");
sql.SELECT("goods_type_parent");
sql.SELECT("goods_type_parent_name");
sql.SELECT("sale_num");
sql.SELECT("`type`");
+ sql.SELECT("child_type");
sql.SELECT("goods_brand_name");
sql.SELECT("goods_brand");
sql.SELECT("goods_label");
@@ -173,6 +183,10 @@ public class GoodsMsgSqlProvider {
sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}");
}
+ if (record.getThirdId() != null) {
+ sql.SET("third_id = #{record.thirdId,jdbcType=VARCHAR}");
+ }
+
if (record.getGoodsTypeName() != null) {
sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}");
}
@@ -193,6 +207,10 @@ public class GoodsMsgSqlProvider {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
+ if (record.getChildType() != null) {
+ sql.SET("child_type = #{record.childType,jdbcType=INTEGER}");
+ }
+
if (record.getGoodsBrandName() != null) {
sql.SET("goods_brand_name = #{record.goodsBrandName,jdbcType=VARCHAR}");
}
@@ -267,11 +285,13 @@ public class GoodsMsgSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}");
+ sql.SET("third_id = #{record.thirdId,jdbcType=VARCHAR}");
sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}");
sql.SET("goods_type_parent = #{record.goodsTypeParent,jdbcType=BIGINT}");
sql.SET("goods_type_parent_name = #{record.goodsTypeParentName,jdbcType=VARCHAR}");
sql.SET("sale_num = #{record.saleNum,jdbcType=INTEGER}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
+ sql.SET("child_type = #{record.childType,jdbcType=INTEGER}");
sql.SET("goods_brand_name = #{record.goodsBrandName,jdbcType=VARCHAR}");
sql.SET("goods_brand = #{record.goodsBrand,jdbcType=BIGINT}");
sql.SET("goods_label = #{record.goodsLabel,jdbcType=VARCHAR}");
@@ -302,6 +322,10 @@ public class GoodsMsgSqlProvider {
sql.SET("goods_type = #{goodsType,jdbcType=BIGINT}");
}
+ if (record.getThirdId() != null) {
+ sql.SET("third_id = #{thirdId,jdbcType=VARCHAR}");
+ }
+
if (record.getGoodsTypeName() != null) {
sql.SET("goods_type_name = #{goodsTypeName,jdbcType=VARCHAR}");
}
@@ -322,6 +346,10 @@ public class GoodsMsgSqlProvider {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
+ if (record.getChildType() != null) {
+ sql.SET("child_type = #{childType,jdbcType=INTEGER}");
+ }
+
if (record.getGoodsBrandName() != null) {
sql.SET("goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR}");
}
diff --git a/service/src/main/java/com/hfkj/dao/GoodsSpecsMapper.java b/service/src/main/java/com/hfkj/dao/GoodsSpecsMapper.java
index 520bff5..ac30263 100644
--- a/service/src/main/java/com/hfkj/dao/GoodsSpecsMapper.java
+++ b/service/src/main/java/com/hfkj/dao/GoodsSpecsMapper.java
@@ -39,20 +39,20 @@ public interface GoodsSpecsMapper extends GoodsSpecsMapperExt {
int deleteByPrimaryKey(Long id);
@Insert({
- "insert into goods_specs (goods_id, `name`, ",
- "pur_limit, sale_price, ",
- "original_price, stock, ",
- "show_img, sales_end_time, ",
- "`status`, create_time, ",
- "update_time, ext_1, ",
- "ext_2, ext_3)",
- "values (#{goodsId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ",
- "#{purLimit,jdbcType=INTEGER}, #{salePrice,jdbcType=DECIMAL}, ",
- "#{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, ",
- "#{showImg,jdbcType=VARCHAR}, #{salesEndTime,jdbcType=TIMESTAMP}, ",
- "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
- "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
- "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
+ "insert into goods_specs (goods_id, third_id, ",
+ "`name`, pur_limit, ",
+ "sale_price, original_price, ",
+ "stock, show_img, ",
+ "sales_end_time, `status`, ",
+ "create_time, update_time, ",
+ "ext_1, ext_2, ext_3)",
+ "values (#{goodsId,jdbcType=BIGINT}, #{thirdId,jdbcType=VARCHAR}, ",
+ "#{name,jdbcType=VARCHAR}, #{purLimit,jdbcType=INTEGER}, ",
+ "#{salePrice,jdbcType=DECIMAL}, #{originalPrice,jdbcType=DECIMAL}, ",
+ "#{stock,jdbcType=INTEGER}, #{showImg,jdbcType=VARCHAR}, ",
+ "#{salesEndTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
+ "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
+ "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(GoodsSpecs record);
@@ -65,6 +65,7 @@ public interface GoodsSpecsMapper extends GoodsSpecsMapperExt {
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
+ @Result(column="third_id", property="thirdId", jdbcType=JdbcType.VARCHAR),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="pur_limit", property="purLimit", jdbcType=JdbcType.INTEGER),
@Result(column="sale_price", property="salePrice", jdbcType=JdbcType.DECIMAL),
@@ -83,14 +84,16 @@ public interface GoodsSpecsMapper extends GoodsSpecsMapperExt {
@Select({
"select",
- "id, goods_id, `name`, pur_limit, sale_price, original_price, stock, show_img, ",
- "sales_end_time, `status`, create_time, update_time, ext_1, ext_2, ext_3",
+ "id, goods_id, third_id, `name`, pur_limit, sale_price, original_price, stock, ",
+ "show_img, sales_end_time, `status`, create_time, update_time, ext_1, ext_2, ",
+ "ext_3",
"from goods_specs",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
+ @Result(column="third_id", property="thirdId", jdbcType=JdbcType.VARCHAR),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="pur_limit", property="purLimit", jdbcType=JdbcType.INTEGER),
@Result(column="sale_price", property="salePrice", jdbcType=JdbcType.DECIMAL),
@@ -119,6 +122,7 @@ public interface GoodsSpecsMapper extends GoodsSpecsMapperExt {
@Update({
"update goods_specs",
"set goods_id = #{goodsId,jdbcType=BIGINT},",
+ "third_id = #{thirdId,jdbcType=VARCHAR},",
"`name` = #{name,jdbcType=VARCHAR},",
"pur_limit = #{purLimit,jdbcType=INTEGER},",
"sale_price = #{salePrice,jdbcType=DECIMAL},",
@@ -135,4 +139,4 @@ public interface GoodsSpecsMapper extends GoodsSpecsMapperExt {
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(GoodsSpecs record);
-}
+}
\ No newline at end of file
diff --git a/service/src/main/java/com/hfkj/dao/GoodsSpecsSqlProvider.java b/service/src/main/java/com/hfkj/dao/GoodsSpecsSqlProvider.java
index fc278b5..4b71112 100644
--- a/service/src/main/java/com/hfkj/dao/GoodsSpecsSqlProvider.java
+++ b/service/src/main/java/com/hfkj/dao/GoodsSpecsSqlProvider.java
@@ -32,6 +32,10 @@ public class GoodsSpecsSqlProvider {
sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}");
}
+ if (record.getThirdId() != null) {
+ sql.VALUES("third_id", "#{thirdId,jdbcType=VARCHAR}");
+ }
+
if (record.getName() != null) {
sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}");
}
@@ -95,6 +99,7 @@ public class GoodsSpecsSqlProvider {
sql.SELECT("id");
}
sql.SELECT("goods_id");
+ sql.SELECT("third_id");
sql.SELECT("`name`");
sql.SELECT("pur_limit");
sql.SELECT("sale_price");
@@ -133,6 +138,10 @@ public class GoodsSpecsSqlProvider {
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
}
+ if (record.getThirdId() != null) {
+ sql.SET("third_id = #{record.thirdId,jdbcType=VARCHAR}");
+ }
+
if (record.getName() != null) {
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
}
@@ -195,6 +204,7 @@ public class GoodsSpecsSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}");
+ sql.SET("third_id = #{record.thirdId,jdbcType=VARCHAR}");
sql.SET("`name` = #{record.name,jdbcType=VARCHAR}");
sql.SET("pur_limit = #{record.purLimit,jdbcType=INTEGER}");
sql.SET("sale_price = #{record.salePrice,jdbcType=DECIMAL}");
@@ -222,6 +232,10 @@ public class GoodsSpecsSqlProvider {
sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}");
}
+ if (record.getThirdId() != null) {
+ sql.SET("third_id = #{thirdId,jdbcType=VARCHAR}");
+ }
+
if (record.getName() != null) {
sql.SET("`name` = #{name,jdbcType=VARCHAR}");
}
@@ -371,4 +385,4 @@ public class GoodsSpecsSqlProvider {
sql.WHERE(sb.toString());
}
}
-}
+}
\ No newline at end of file
diff --git a/service/src/main/java/com/hfkj/entity/BsOrderGoods.java b/service/src/main/java/com/hfkj/entity/BsOrderGoods.java
index 8e99555..d58a3d1 100644
--- a/service/src/main/java/com/hfkj/entity/BsOrderGoods.java
+++ b/service/src/main/java/com/hfkj/entity/BsOrderGoods.java
@@ -49,6 +49,11 @@ public class BsOrderGoods implements Serializable {
*/
private String childOrderNo;
+ /**
+ * 三方订单号
+ */
+ private String thirdOrderNo;
+
/**
* 商户id
*/
@@ -170,7 +175,7 @@ public class BsOrderGoods implements Serializable {
private Integer payType;
/**
- * bs_order_child订单表同步
+ * 1:待发货 2:已发货 3:配送中 4:已送达 5:已取消 6:退货中 7:已退货 8:待支付 0:删除
*/
private Integer status;
@@ -288,6 +293,14 @@ public class BsOrderGoods implements Serializable {
this.childOrderNo = childOrderNo;
}
+ public String getThirdOrderNo() {
+ return thirdOrderNo;
+ }
+
+ public void setThirdOrderNo(String thirdOrderNo) {
+ this.thirdOrderNo = thirdOrderNo;
+ }
+
public Long getMerId() {
return merId;
}
@@ -591,171 +604,4 @@ public class BsOrderGoods implements Serializable {
public void setExt3(String ext3) {
this.ext3 = ext3;
}
-
- @Override
- public boolean equals(Object that) {
- if (this == that) {
- return true;
- }
- if (that == null) {
- return false;
- }
- if (getClass() != that.getClass()) {
- return false;
- }
- BsOrderGoods other = (BsOrderGoods) that;
- return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
- && (this.getLogisticsNo() == null ? other.getLogisticsNo() == null : this.getLogisticsNo().equals(other.getLogisticsNo()))
- && (this.getFreightPrice() == null ? other.getFreightPrice() == null : this.getFreightPrice().equals(other.getFreightPrice()))
- && (this.getDeliveryAddressId() == null ? other.getDeliveryAddressId() == null : this.getDeliveryAddressId().equals(other.getDeliveryAddressId()))
- && (this.getDeliveryAddress() == null ? other.getDeliveryAddress() == null : this.getDeliveryAddress().equals(other.getDeliveryAddress()))
- && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
- && (this.getChildOrderNo() == null ? other.getChildOrderNo() == null : this.getChildOrderNo().equals(other.getChildOrderNo()))
- && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
- && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName()))
- && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
- && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
- && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
- && (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
- && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
- && (this.getGoodsTypeId() == null ? other.getGoodsTypeId() == null : this.getGoodsTypeId().equals(other.getGoodsTypeId()))
- && (this.getGoodsTypeName() == null ? other.getGoodsTypeName() == null : this.getGoodsTypeName().equals(other.getGoodsTypeName()))
- && (this.getGoodsBrandId() == null ? other.getGoodsBrandId() == null : this.getGoodsBrandId().equals(other.getGoodsBrandId()))
- && (this.getGoodsBrandName() == null ? other.getGoodsBrandName() == null : this.getGoodsBrandName().equals(other.getGoodsBrandName()))
- && (this.getGoodsSpecsId() == null ? other.getGoodsSpecsId() == null : this.getGoodsSpecsId().equals(other.getGoodsSpecsId()))
- && (this.getGoodsSpecsName() == null ? other.getGoodsSpecsName() == null : this.getGoodsSpecsName().equals(other.getGoodsSpecsName()))
- && (this.getGoodsSpecsOriginalPrice() == null ? other.getGoodsSpecsOriginalPrice() == null : this.getGoodsSpecsOriginalPrice().equals(other.getGoodsSpecsOriginalPrice()))
- && (this.getGoodsCount() == null ? other.getGoodsCount() == null : this.getGoodsCount().equals(other.getGoodsCount()))
- && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
- && (this.getTotalDeductionPrice() == null ? other.getTotalDeductionPrice() == null : this.getTotalDeductionPrice().equals(other.getTotalDeductionPrice()))
- && (this.getCouponDiscountPrice() == null ? other.getCouponDiscountPrice() == null : this.getCouponDiscountPrice().equals(other.getCouponDiscountPrice()))
- && (this.getIntegralDiscountPrice() == null ? other.getIntegralDiscountPrice() == null : this.getIntegralDiscountPrice().equals(other.getIntegralDiscountPrice()))
- && (this.getPlatformCode() == null ? other.getPlatformCode() == null : this.getPlatformCode().equals(other.getPlatformCode()))
- && (this.getPayRealPrice() == null ? other.getPayRealPrice() == null : this.getPayRealPrice().equals(other.getPayRealPrice()))
- && (this.getPayChannel() == null ? other.getPayChannel() == null : this.getPayChannel().equals(other.getPayChannel()))
- && (this.getPaySerialNo() == null ? other.getPaySerialNo() == null : this.getPaySerialNo().equals(other.getPaySerialNo()))
- && (this.getPayType() == null ? other.getPayType() == null : this.getPayType().equals(other.getPayType()))
- && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
- && (this.getLogisticsStatusDesc() == null ? other.getLogisticsStatusDesc() == null : this.getLogisticsStatusDesc().equals(other.getLogisticsStatusDesc()))
- && (this.getLogisticsStatus() == null ? other.getLogisticsStatus() == null : this.getLogisticsStatus().equals(other.getLogisticsStatus()))
- && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
- && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
- && (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime()))
- && (this.getRefundTime() == null ? other.getRefundTime() == null : this.getRefundTime().equals(other.getRefundTime()))
- && (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
- && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
- && (this.getExceptionStatus() == null ? other.getExceptionStatus() == null : this.getExceptionStatus().equals(other.getExceptionStatus()))
- && (this.getExceptionMsg() == null ? other.getExceptionMsg() == null : this.getExceptionMsg().equals(other.getExceptionMsg()))
- && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
- && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
- && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
- result = prime * result + ((getLogisticsNo() == null) ? 0 : getLogisticsNo().hashCode());
- result = prime * result + ((getFreightPrice() == null) ? 0 : getFreightPrice().hashCode());
- result = prime * result + ((getDeliveryAddressId() == null) ? 0 : getDeliveryAddressId().hashCode());
- result = prime * result + ((getDeliveryAddress() == null) ? 0 : getDeliveryAddress().hashCode());
- result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
- result = prime * result + ((getChildOrderNo() == null) ? 0 : getChildOrderNo().hashCode());
- result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
- result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode());
- result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
- result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
- result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
- result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
- result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
- result = prime * result + ((getGoodsTypeId() == null) ? 0 : getGoodsTypeId().hashCode());
- result = prime * result + ((getGoodsTypeName() == null) ? 0 : getGoodsTypeName().hashCode());
- result = prime * result + ((getGoodsBrandId() == null) ? 0 : getGoodsBrandId().hashCode());
- result = prime * result + ((getGoodsBrandName() == null) ? 0 : getGoodsBrandName().hashCode());
- result = prime * result + ((getGoodsSpecsId() == null) ? 0 : getGoodsSpecsId().hashCode());
- result = prime * result + ((getGoodsSpecsName() == null) ? 0 : getGoodsSpecsName().hashCode());
- result = prime * result + ((getGoodsSpecsOriginalPrice() == null) ? 0 : getGoodsSpecsOriginalPrice().hashCode());
- result = prime * result + ((getGoodsCount() == null) ? 0 : getGoodsCount().hashCode());
- result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
- result = prime * result + ((getTotalDeductionPrice() == null) ? 0 : getTotalDeductionPrice().hashCode());
- result = prime * result + ((getCouponDiscountPrice() == null) ? 0 : getCouponDiscountPrice().hashCode());
- result = prime * result + ((getIntegralDiscountPrice() == null) ? 0 : getIntegralDiscountPrice().hashCode());
- result = prime * result + ((getPlatformCode() == null) ? 0 : getPlatformCode().hashCode());
- result = prime * result + ((getPayRealPrice() == null) ? 0 : getPayRealPrice().hashCode());
- result = prime * result + ((getPayChannel() == null) ? 0 : getPayChannel().hashCode());
- result = prime * result + ((getPaySerialNo() == null) ? 0 : getPaySerialNo().hashCode());
- result = prime * result + ((getPayType() == null) ? 0 : getPayType().hashCode());
- result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
- result = prime * result + ((getLogisticsStatusDesc() == null) ? 0 : getLogisticsStatusDesc().hashCode());
- result = prime * result + ((getLogisticsStatus() == null) ? 0 : getLogisticsStatus().hashCode());
- result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
- result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
- result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode());
- result = prime * result + ((getRefundTime() == null) ? 0 : getRefundTime().hashCode());
- result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
- result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
- result = prime * result + ((getExceptionStatus() == null) ? 0 : getExceptionStatus().hashCode());
- result = prime * result + ((getExceptionMsg() == null) ? 0 : getExceptionMsg().hashCode());
- result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
- result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
- result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
- return result;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(getClass().getSimpleName());
- sb.append(" [");
- sb.append("Hash = ").append(hashCode());
- sb.append(", id=").append(id);
- sb.append(", logisticsNo=").append(logisticsNo);
- sb.append(", freightPrice=").append(freightPrice);
- sb.append(", deliveryAddressId=").append(deliveryAddressId);
- sb.append(", deliveryAddress=").append(deliveryAddress);
- sb.append(", orderNo=").append(orderNo);
- sb.append(", childOrderNo=").append(childOrderNo);
- sb.append(", merId=").append(merId);
- sb.append(", merName=").append(merName);
- sb.append(", userId=").append(userId);
- sb.append(", userPhone=").append(userPhone);
- sb.append(", goodsId=").append(goodsId);
- sb.append(", img=").append(img);
- sb.append(", goodsName=").append(goodsName);
- sb.append(", goodsTypeId=").append(goodsTypeId);
- sb.append(", goodsTypeName=").append(goodsTypeName);
- sb.append(", goodsBrandId=").append(goodsBrandId);
- sb.append(", goodsBrandName=").append(goodsBrandName);
- sb.append(", goodsSpecsId=").append(goodsSpecsId);
- sb.append(", goodsSpecsName=").append(goodsSpecsName);
- sb.append(", goodsSpecsOriginalPrice=").append(goodsSpecsOriginalPrice);
- sb.append(", goodsCount=").append(goodsCount);
- sb.append(", totalPrice=").append(totalPrice);
- sb.append(", totalDeductionPrice=").append(totalDeductionPrice);
- sb.append(", couponDiscountPrice=").append(couponDiscountPrice);
- sb.append(", integralDiscountPrice=").append(integralDiscountPrice);
- sb.append(", platformCode=").append(platformCode);
- sb.append(", payRealPrice=").append(payRealPrice);
- sb.append(", payChannel=").append(payChannel);
- sb.append(", paySerialNo=").append(paySerialNo);
- sb.append(", payType=").append(payType);
- sb.append(", status=").append(status);
- sb.append(", logisticsStatusDesc=").append(logisticsStatusDesc);
- sb.append(", logisticsStatus=").append(logisticsStatus);
- sb.append(", createTime=").append(createTime);
- sb.append(", payTime=").append(payTime);
- sb.append(", cancelTime=").append(cancelTime);
- sb.append(", refundTime=").append(refundTime);
- sb.append(", finishTime=").append(finishTime);
- sb.append(", updateTime=").append(updateTime);
- sb.append(", exceptionStatus=").append(exceptionStatus);
- sb.append(", exceptionMsg=").append(exceptionMsg);
- sb.append(", ext1=").append(ext1);
- sb.append(", ext2=").append(ext2);
- sb.append(", ext3=").append(ext3);
- sb.append(", serialVersionUID=").append(serialVersionUID);
- sb.append("]");
- return sb.toString();
- }
}
\ No newline at end of file
diff --git a/service/src/main/java/com/hfkj/entity/BsOrderGoodsExample.java b/service/src/main/java/com/hfkj/entity/BsOrderGoodsExample.java
index e88b952..d53fbf5 100644
--- a/service/src/main/java/com/hfkj/entity/BsOrderGoodsExample.java
+++ b/service/src/main/java/com/hfkj/entity/BsOrderGoodsExample.java
@@ -586,6 +586,76 @@ public class BsOrderGoodsExample {
return (Criteria) this;
}
+ public Criteria andThirdOrderNoIsNull() {
+ addCriterion("third_order_no is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoIsNotNull() {
+ addCriterion("third_order_no is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoEqualTo(String value) {
+ addCriterion("third_order_no =", value, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoNotEqualTo(String value) {
+ addCriterion("third_order_no <>", value, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoGreaterThan(String value) {
+ addCriterion("third_order_no >", value, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoGreaterThanOrEqualTo(String value) {
+ addCriterion("third_order_no >=", value, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoLessThan(String value) {
+ addCriterion("third_order_no <", value, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoLessThanOrEqualTo(String value) {
+ addCriterion("third_order_no <=", value, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoLike(String value) {
+ addCriterion("third_order_no like", value, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoNotLike(String value) {
+ addCriterion("third_order_no not like", value, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoIn(List values) {
+ addCriterion("third_order_no in", values, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoNotIn(List values) {
+ addCriterion("third_order_no not in", values, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoBetween(String value1, String value2) {
+ addCriterion("third_order_no between", value1, value2, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdOrderNoNotBetween(String value1, String value2) {
+ addCriterion("third_order_no not between", value1, value2, "thirdOrderNo");
+ return (Criteria) this;
+ }
+
public Criteria andMerIdIsNull() {
addCriterion("mer_id is null");
return (Criteria) this;
diff --git a/service/src/main/java/com/hfkj/entity/CmsContent.java b/service/src/main/java/com/hfkj/entity/CmsContent.java
index 7e96965..12418c2 100644
--- a/service/src/main/java/com/hfkj/entity/CmsContent.java
+++ b/service/src/main/java/com/hfkj/entity/CmsContent.java
@@ -43,6 +43,16 @@ public class CmsContent implements Serializable {
*/
private Integer jumpType;
+ /**
+ * 展示类型:1:双数据 2:四数据 3:横版多数据
+ */
+ private Integer showType;
+
+ /**
+ * 数据编码
+ */
+ private Integer showDataId;
+
/**
* 跳转地址
*/
@@ -124,6 +134,22 @@ public class CmsContent implements Serializable {
this.jumpType = jumpType;
}
+ public Integer getShowType() {
+ return showType;
+ }
+
+ public void setShowType(Integer showType) {
+ this.showType = showType;
+ }
+
+ public Integer getShowDataId() {
+ return showDataId;
+ }
+
+ public void setShowDataId(Integer showDataId) {
+ this.showDataId = showDataId;
+ }
+
public String getJumpUrl() {
return jumpUrl;
}
@@ -187,78 +213,4 @@ public class CmsContent implements Serializable {
public void setExt3(String ext3) {
this.ext3 = ext3;
}
-
- @Override
- public boolean equals(Object that) {
- if (this == that) {
- return true;
- }
- if (that == null) {
- return false;
- }
- if (getClass() != that.getClass()) {
- return false;
- }
- CmsContent other = (CmsContent) that;
- return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
- && (this.getPlatformCode() == null ? other.getPlatformCode() == null : this.getPlatformCode().equals(other.getPlatformCode()))
- && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
- && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
- && (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
- && (this.getJumpType() == null ? other.getJumpType() == null : this.getJumpType().equals(other.getJumpType()))
- && (this.getJumpUrl() == null ? other.getJumpUrl() == null : this.getJumpUrl().equals(other.getJumpUrl()))
- && (this.getAppid() == null ? other.getAppid() == null : this.getAppid().equals(other.getAppid()))
- && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
- && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
- && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
- && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
- && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
- && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
- result = prime * result + ((getPlatformCode() == null) ? 0 : getPlatformCode().hashCode());
- result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
- result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
- result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
- result = prime * result + ((getJumpType() == null) ? 0 : getJumpType().hashCode());
- result = prime * result + ((getJumpUrl() == null) ? 0 : getJumpUrl().hashCode());
- result = prime * result + ((getAppid() == null) ? 0 : getAppid().hashCode());
- result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
- result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
- result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
- result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
- result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
- result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
- return result;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(getClass().getSimpleName());
- sb.append(" [");
- sb.append("Hash = ").append(hashCode());
- sb.append(", id=").append(id);
- sb.append(", platformCode=").append(platformCode);
- sb.append(", code=").append(code);
- sb.append(", name=").append(name);
- sb.append(", img=").append(img);
- sb.append(", jumpType=").append(jumpType);
- sb.append(", jumpUrl=").append(jumpUrl);
- sb.append(", appid=").append(appid);
- sb.append(", createTime=").append(createTime);
- sb.append(", updateTime=").append(updateTime);
- sb.append(", status=").append(status);
- sb.append(", ext1=").append(ext1);
- sb.append(", ext2=").append(ext2);
- sb.append(", ext3=").append(ext3);
- sb.append(", serialVersionUID=").append(serialVersionUID);
- sb.append("]");
- return sb.toString();
- }
}
\ No newline at end of file
diff --git a/service/src/main/java/com/hfkj/entity/CmsContentExample.java b/service/src/main/java/com/hfkj/entity/CmsContentExample.java
index 0289f9e..ba692c0 100644
--- a/service/src/main/java/com/hfkj/entity/CmsContentExample.java
+++ b/service/src/main/java/com/hfkj/entity/CmsContentExample.java
@@ -525,6 +525,126 @@ public class CmsContentExample {
return (Criteria) this;
}
+ public Criteria andShowTypeIsNull() {
+ addCriterion("show_type is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeIsNotNull() {
+ addCriterion("show_type is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeEqualTo(Integer value) {
+ addCriterion("show_type =", value, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeNotEqualTo(Integer value) {
+ addCriterion("show_type <>", value, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeGreaterThan(Integer value) {
+ addCriterion("show_type >", value, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeGreaterThanOrEqualTo(Integer value) {
+ addCriterion("show_type >=", value, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeLessThan(Integer value) {
+ addCriterion("show_type <", value, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeLessThanOrEqualTo(Integer value) {
+ addCriterion("show_type <=", value, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeIn(List values) {
+ addCriterion("show_type in", values, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeNotIn(List values) {
+ addCriterion("show_type not in", values, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeBetween(Integer value1, Integer value2) {
+ addCriterion("show_type between", value1, value2, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowTypeNotBetween(Integer value1, Integer value2) {
+ addCriterion("show_type not between", value1, value2, "showType");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdIsNull() {
+ addCriterion("show_data_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdIsNotNull() {
+ addCriterion("show_data_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdEqualTo(Integer value) {
+ addCriterion("show_data_id =", value, "showDataId");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdNotEqualTo(Integer value) {
+ addCriterion("show_data_id <>", value, "showDataId");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdGreaterThan(Integer value) {
+ addCriterion("show_data_id >", value, "showDataId");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("show_data_id >=", value, "showDataId");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdLessThan(Integer value) {
+ addCriterion("show_data_id <", value, "showDataId");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdLessThanOrEqualTo(Integer value) {
+ addCriterion("show_data_id <=", value, "showDataId");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdIn(List values) {
+ addCriterion("show_data_id in", values, "showDataId");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdNotIn(List values) {
+ addCriterion("show_data_id not in", values, "showDataId");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdBetween(Integer value1, Integer value2) {
+ addCriterion("show_data_id between", value1, value2, "showDataId");
+ return (Criteria) this;
+ }
+
+ public Criteria andShowDataIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("show_data_id not between", value1, value2, "showDataId");
+ return (Criteria) this;
+ }
+
public Criteria andJumpUrlIsNull() {
addCriterion("jump_url is null");
return (Criteria) this;
diff --git a/service/src/main/java/com/hfkj/entity/GoodsMsg.java b/service/src/main/java/com/hfkj/entity/GoodsMsg.java
index d0e2299..109175c 100644
--- a/service/src/main/java/com/hfkj/entity/GoodsMsg.java
+++ b/service/src/main/java/com/hfkj/entity/GoodsMsg.java
@@ -23,6 +23,11 @@ public class GoodsMsg implements Serializable {
*/
private Long goodsType;
+ /**
+ * 第三方id
+ */
+ private String thirdId;
+
/**
* 商品类型名称
*/
@@ -48,6 +53,11 @@ public class GoodsMsg implements Serializable {
*/
private Integer type;
+ /**
+ * 类型:1.京东产品
+ */
+ private Integer childType;
+
/**
* 商品品牌名称
*/
@@ -146,6 +156,14 @@ public class GoodsMsg implements Serializable {
this.goodsType = goodsType;
}
+ public String getThirdId() {
+ return thirdId;
+ }
+
+ public void setThirdId(String thirdId) {
+ this.thirdId = thirdId;
+ }
+
public String getGoodsTypeName() {
return goodsTypeName;
}
@@ -186,6 +204,14 @@ public class GoodsMsg implements Serializable {
this.type = type;
}
+ public Integer getChildType() {
+ return childType;
+ }
+
+ public void setChildType(Integer childType) {
+ this.childType = childType;
+ }
+
public String getGoodsBrandName() {
return goodsBrandName;
}
@@ -328,11 +354,13 @@ public class GoodsMsg implements Serializable {
GoodsMsg other = (GoodsMsg) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType()))
+ && (this.getThirdId() == null ? other.getThirdId() == null : this.getThirdId().equals(other.getThirdId()))
&& (this.getGoodsTypeName() == null ? other.getGoodsTypeName() == null : this.getGoodsTypeName().equals(other.getGoodsTypeName()))
&& (this.getGoodsTypeParent() == null ? other.getGoodsTypeParent() == null : this.getGoodsTypeParent().equals(other.getGoodsTypeParent()))
&& (this.getGoodsTypeParentName() == null ? other.getGoodsTypeParentName() == null : this.getGoodsTypeParentName().equals(other.getGoodsTypeParentName()))
&& (this.getSaleNum() == null ? other.getSaleNum() == null : this.getSaleNum().equals(other.getSaleNum()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
+ && (this.getChildType() == null ? other.getChildType() == null : this.getChildType().equals(other.getChildType()))
&& (this.getGoodsBrandName() == null ? other.getGoodsBrandName() == null : this.getGoodsBrandName().equals(other.getGoodsBrandName()))
&& (this.getGoodsBrand() == null ? other.getGoodsBrand() == null : this.getGoodsBrand().equals(other.getGoodsBrand()))
&& (this.getGoodsLabel() == null ? other.getGoodsLabel() == null : this.getGoodsLabel().equals(other.getGoodsLabel()))
@@ -357,11 +385,13 @@ public class GoodsMsg implements Serializable {
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode());
+ result = prime * result + ((getThirdId() == null) ? 0 : getThirdId().hashCode());
result = prime * result + ((getGoodsTypeName() == null) ? 0 : getGoodsTypeName().hashCode());
result = prime * result + ((getGoodsTypeParent() == null) ? 0 : getGoodsTypeParent().hashCode());
result = prime * result + ((getGoodsTypeParentName() == null) ? 0 : getGoodsTypeParentName().hashCode());
result = prime * result + ((getSaleNum() == null) ? 0 : getSaleNum().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
+ result = prime * result + ((getChildType() == null) ? 0 : getChildType().hashCode());
result = prime * result + ((getGoodsBrandName() == null) ? 0 : getGoodsBrandName().hashCode());
result = prime * result + ((getGoodsBrand() == null) ? 0 : getGoodsBrand().hashCode());
result = prime * result + ((getGoodsLabel() == null) ? 0 : getGoodsLabel().hashCode());
@@ -389,11 +419,13 @@ public class GoodsMsg implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", goodsType=").append(goodsType);
+ sb.append(", thirdId=").append(thirdId);
sb.append(", goodsTypeName=").append(goodsTypeName);
sb.append(", goodsTypeParent=").append(goodsTypeParent);
sb.append(", goodsTypeParentName=").append(goodsTypeParentName);
sb.append(", saleNum=").append(saleNum);
sb.append(", type=").append(type);
+ sb.append(", childType=").append(childType);
sb.append(", goodsBrandName=").append(goodsBrandName);
sb.append(", goodsBrand=").append(goodsBrand);
sb.append(", goodsLabel=").append(goodsLabel);
diff --git a/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java b/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java
index 2bbfd41..8795d18 100644
--- a/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java
+++ b/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java
@@ -245,6 +245,76 @@ public class GoodsMsgExample {
return (Criteria) this;
}
+ public Criteria andThirdIdIsNull() {
+ addCriterion("third_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdIsNotNull() {
+ addCriterion("third_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdEqualTo(String value) {
+ addCriterion("third_id =", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdNotEqualTo(String value) {
+ addCriterion("third_id <>", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdGreaterThan(String value) {
+ addCriterion("third_id >", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdGreaterThanOrEqualTo(String value) {
+ addCriterion("third_id >=", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdLessThan(String value) {
+ addCriterion("third_id <", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdLessThanOrEqualTo(String value) {
+ addCriterion("third_id <=", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdLike(String value) {
+ addCriterion("third_id like", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdNotLike(String value) {
+ addCriterion("third_id not like", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdIn(List values) {
+ addCriterion("third_id in", values, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdNotIn(List values) {
+ addCriterion("third_id not in", values, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdBetween(String value1, String value2) {
+ addCriterion("third_id between", value1, value2, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdNotBetween(String value1, String value2) {
+ addCriterion("third_id not between", value1, value2, "thirdId");
+ return (Criteria) this;
+ }
+
public Criteria andGoodsTypeNameIsNull() {
addCriterion("goods_type_name is null");
return (Criteria) this;
@@ -565,6 +635,66 @@ public class GoodsMsgExample {
return (Criteria) this;
}
+ public Criteria andChildTypeIsNull() {
+ addCriterion("child_type is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeIsNotNull() {
+ addCriterion("child_type is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeEqualTo(Integer value) {
+ addCriterion("child_type =", value, "childType");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeNotEqualTo(Integer value) {
+ addCriterion("child_type <>", value, "childType");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeGreaterThan(Integer value) {
+ addCriterion("child_type >", value, "childType");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeGreaterThanOrEqualTo(Integer value) {
+ addCriterion("child_type >=", value, "childType");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeLessThan(Integer value) {
+ addCriterion("child_type <", value, "childType");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeLessThanOrEqualTo(Integer value) {
+ addCriterion("child_type <=", value, "childType");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeIn(List values) {
+ addCriterion("child_type in", values, "childType");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeNotIn(List values) {
+ addCriterion("child_type not in", values, "childType");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeBetween(Integer value1, Integer value2) {
+ addCriterion("child_type between", value1, value2, "childType");
+ return (Criteria) this;
+ }
+
+ public Criteria andChildTypeNotBetween(Integer value1, Integer value2) {
+ addCriterion("child_type not between", value1, value2, "childType");
+ return (Criteria) this;
+ }
+
public Criteria andGoodsBrandNameIsNull() {
addCriterion("goods_brand_name is null");
return (Criteria) this;
diff --git a/service/src/main/java/com/hfkj/entity/GoodsSpecs.java b/service/src/main/java/com/hfkj/entity/GoodsSpecs.java
index 24ba80d..b2ac918 100644
--- a/service/src/main/java/com/hfkj/entity/GoodsSpecs.java
+++ b/service/src/main/java/com/hfkj/entity/GoodsSpecs.java
@@ -24,6 +24,11 @@ public class GoodsSpecs implements Serializable {
*/
private Long goodsId;
+ /**
+ * 第三方ID
+ */
+ private String thirdId;
+
/**
* sku名称
*/
@@ -107,6 +112,14 @@ public class GoodsSpecs implements Serializable {
this.goodsId = goodsId;
}
+ public String getThirdId() {
+ return thirdId;
+ }
+
+ public void setThirdId(String thirdId) {
+ this.thirdId = thirdId;
+ }
+
public String getName() {
return name;
}
@@ -225,6 +238,7 @@ public class GoodsSpecs implements Serializable {
GoodsSpecs other = (GoodsSpecs) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
+ && (this.getThirdId() == null ? other.getThirdId() == null : this.getThirdId().equals(other.getThirdId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getPurLimit() == null ? other.getPurLimit() == null : this.getPurLimit().equals(other.getPurLimit()))
&& (this.getSalePrice() == null ? other.getSalePrice() == null : this.getSalePrice().equals(other.getSalePrice()))
@@ -246,6 +260,7 @@ public class GoodsSpecs implements Serializable {
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
+ result = prime * result + ((getThirdId() == null) ? 0 : getThirdId().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getPurLimit() == null) ? 0 : getPurLimit().hashCode());
result = prime * result + ((getSalePrice() == null) ? 0 : getSalePrice().hashCode());
@@ -270,6 +285,7 @@ public class GoodsSpecs implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", goodsId=").append(goodsId);
+ sb.append(", thirdId=").append(thirdId);
sb.append(", name=").append(name);
sb.append(", purLimit=").append(purLimit);
sb.append(", salePrice=").append(salePrice);
@@ -287,4 +303,4 @@ public class GoodsSpecs implements Serializable {
sb.append("]");
return sb.toString();
}
-}
+}
\ No newline at end of file
diff --git a/service/src/main/java/com/hfkj/entity/GoodsSpecsExample.java b/service/src/main/java/com/hfkj/entity/GoodsSpecsExample.java
index 921fbbd..002b4e0 100644
--- a/service/src/main/java/com/hfkj/entity/GoodsSpecsExample.java
+++ b/service/src/main/java/com/hfkj/entity/GoodsSpecsExample.java
@@ -246,6 +246,76 @@ public class GoodsSpecsExample {
return (Criteria) this;
}
+ public Criteria andThirdIdIsNull() {
+ addCriterion("third_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdIsNotNull() {
+ addCriterion("third_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdEqualTo(String value) {
+ addCriterion("third_id =", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdNotEqualTo(String value) {
+ addCriterion("third_id <>", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdGreaterThan(String value) {
+ addCriterion("third_id >", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdGreaterThanOrEqualTo(String value) {
+ addCriterion("third_id >=", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdLessThan(String value) {
+ addCriterion("third_id <", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdLessThanOrEqualTo(String value) {
+ addCriterion("third_id <=", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdLike(String value) {
+ addCriterion("third_id like", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdNotLike(String value) {
+ addCriterion("third_id not like", value, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdIn(List values) {
+ addCriterion("third_id in", values, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdNotIn(List values) {
+ addCriterion("third_id not in", values, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdBetween(String value1, String value2) {
+ addCriterion("third_id between", value1, value2, "thirdId");
+ return (Criteria) this;
+ }
+
+ public Criteria andThirdIdNotBetween(String value1, String value2) {
+ addCriterion("third_id not between", value1, value2, "thirdId");
+ return (Criteria) this;
+ }
+
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
@@ -1171,4 +1241,4 @@ public class GoodsSpecsExample {
this(condition, value, secondValue, null);
}
}
-}
+}
\ No newline at end of file
diff --git a/service/src/main/java/com/hfkj/entity/GoodsUserAddressWithBLOBs.java b/service/src/main/java/com/hfkj/entity/GoodsUserAddressWithBLOBs.java
deleted file mode 100644
index d336c93..0000000
--- a/service/src/main/java/com/hfkj/entity/GoodsUserAddressWithBLOBs.java
+++ /dev/null
@@ -1,63 +0,0 @@
-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;
- }
-}
\ No newline at end of file
diff --git a/service/src/main/java/com/hfkj/jd/Impl/JdServiceImpl.java b/service/src/main/java/com/hfkj/jd/Impl/JdServiceImpl.java
new file mode 100644
index 0000000..33dabf2
--- /dev/null
+++ b/service/src/main/java/com/hfkj/jd/Impl/JdServiceImpl.java
@@ -0,0 +1,315 @@
+package com.hfkj.jd.Impl;
+
+import com.hfkj.common.utils.RedisUtil;
+import com.hfkj.entity.*;
+import com.hfkj.jd.JdPostService;
+import com.hfkj.jd.JdService;
+import com.hfkj.service.BsMerService;
+import com.hfkj.service.BsProductConfigService;
+import com.hfkj.service.goods.*;
+import com.hfkj.sysenum.order.OrderChildProductTypeEnum;
+import com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSellPrice.GetSellPriceGoodsResp;
+import com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSellPrice.OpenRpcResult;
+import com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSkuDetailInfo.GetSkuPoolInfoGoodsResp;
+import com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSkuImageList.GetSkuImageGoodsResp;
+import com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSkuImageList.SkuImageItemGoodsResp;
+import com.jd.open.api.sdk.domain.vopsp.SkuPoolGoodsProvider.response.getSkuPoolInfo.GetSkuPoolInfoItemGoodsResp;
+import com.jd.open.api.sdk.response.vopsp.VopGoodsGetSkuDetailInfoResponse;
+import com.jd.open.api.sdk.response.vopsp.VopGoodsGetSkuImageListResponse;
+import com.jd.open.api.sdk.response.vopsp.VopGoodsGetSkuPoolInfoResponse;
+import com.jd.open.api.sdk.response.vopsp.VopGoodsGetSkuStateListResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@Service("jdService")
+public class JdServiceImpl implements JdService {
+
+ @Autowired
+ private RedisUtil redisUtil;
+
+ @Resource
+ private BsMerService bsMerService;
+
+ @Resource
+ private GoodsTypeService goodsTypeService;
+
+ @Resource
+ private GoodsBrandService goodsBrandService;
+
+ @Resource
+ private BsProductConfigService productConfigService;
+
+ @Resource
+ private GoodsMsgService goodsMsgService;
+
+ @Resource
+ private GoodsSpecsService goodsSpecsService;
+
+ @Override
+ public String getToken() throws Exception {
+ Object token = redisUtil.get("access_token");
+
+ if (token == null) {
+ // 请求回调 会在回调存入参数
+ JdPostService.getAccessToken();
+ getToken();
+ }
+ return token.toString();
+ }
+
+ @Override
+ public void getGoodsJd() throws Exception {
+ // 获取京东商品池
+ VopGoodsGetSkuPoolInfoResponse sku = JdPostService.getSkuPoolInfo(getToken());
+ // 获取sku列表
+ List skuList = sku.getOpenRpcResult().getResult().getSkuPoolList();
+
+ // 初始化商品信息
+ GoodsMsg goodsMsg;
+ // 初始化商品规格
+ GoodsSpecs goodsSpecs;
+
+ BsMer bsMer = bsMerService.getDetail("166241009282");
+ // 查询分类
+ List goodsType = goodsTypeService.getList(new HashMap<>());
+ List brands = goodsBrandService.getList(new HashMap<>());
+ Map goodsMap = new HashMap<>();
+ goodsMap.put("type", 1);
+ goodsMap.put("childType", 1);
+ List goodsMsgs = goodsMsgService.getList(goodsMap);
+ List goodsSpecsList = goodsSpecsService.getList(new HashMap<>());
+ BsProductConfig productConfig = productConfigService.queryDetail(OrderChildProductTypeEnum.type6.getCode());
+
+ for (GetSkuPoolInfoItemGoodsResp skuPoolInfoItemGoodsResp : skuList) {
+
+ // 根据sku查询商品
+ List skuIdList = JdPostService.querySkuByPage(getToken(), skuPoolInfoItemGoodsResp.getBizPoolId(), 0).getOpenRpcResult().getResult().getSkus();
+ for (Long aLong : skuIdList) {
+
+ // 根据skuId 查询商品详情
+ VopGoodsGetSkuDetailInfoResponse skuDetail = JdPostService.getSkuDetailInfo(getToken(), aLong);
+ GetSkuPoolInfoGoodsResp detail = skuDetail.getOpenRpcResult().getResult();
+ if (detail != null) {
+ // 根据skuId 查询商品售价
+ OpenRpcResult priceResponse = JdPostService.getSellPrice(getToken(), String.valueOf(aLong)).getOpenRpcResult();
+ if (priceResponse.getSuccess()) {
+ GetSellPriceGoodsResp price = priceResponse.getResult().get(0);
+ // 根据skuId 查询商品图片
+
+ com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSkuImageList.OpenRpcResult imageListResponse = JdPostService.getSkuImageList(getToken(), String.valueOf(aLong)).getOpenRpcResult();
+ if (imageListResponse.getSuccess()) {
+ GetSkuImageGoodsResp img = imageListResponse.getResult().get(0);
+ // 查询分类
+ String[] categoryS = detail.getCategory().split(";");
+
+ // 查询一级分类
+ String category1 = JdPostService.getCategoryInfoList(getToken(), categoryS[0]).getOpenRpcResult().getResult().get(0).getCategoryName();
+ // 查询二级分类
+ String category2 = JdPostService.getCategoryInfoList(getToken(), categoryS[1]).getOpenRpcResult().getResult().get(0).getCategoryName();
+
+ GoodsType goodsType1 = goodsType.stream().filter(s -> s.getTitle().equals(category1)).findFirst().orElse(null);
+ GoodsType goodsType2 = goodsType.stream().filter(s -> s.getTitle().equals(category2)).findFirst().orElse(null);
+
+ // 如果goodsType1为null,则创建一个新的GoodsType对象
+ if (goodsType1 == null) {
+ goodsType1 = new GoodsType();
+ // 设置title为category1
+ goodsType1.setTitle(category1);
+ // 设置status为1
+ goodsType1.setStatus(1);
+ goodsType1.setBusinessType(1);
+ // 设置sort为8
+ goodsType1.setSort(8);
+ // 设置createTime为当前时间
+ goodsType1.setCreateTime(new Date());
+ // 设置updateTime为当前时间
+ goodsType1.setUpdateTime(new Date());
+ // 调用goodsTypeService的create方法,将goodsType1对象保存到数据库中
+ goodsTypeService.create(goodsType1);
+ goodsType.add(goodsType1);
+ }
+ if (goodsType2 == null) {
+ goodsType2 = new GoodsType();
+ // 设置title为category2
+ goodsType2.setTitle(category2);
+ goodsType2.setParentId(goodsType1.getId());
+ // 设置status为1
+ goodsType2.setStatus(1);
+ // 设置businessType为1
+ goodsType2.setBusinessType(1);
+ // 设置sort为8
+ goodsType2.setSort(1);
+ // 设置createTime为当前时间
+ goodsType2.setCreateTime(new Date());
+ // 设置updateTime为当前时间
+ goodsType2.setUpdateTime(new Date());
+ // 调用goodsTypeService的create方法,将goodsType2对象保存到数据库中
+ goodsTypeService.create(goodsType2);
+ goodsType.add(goodsType2);
+ } else {
+ goodsType2.setParentId(goodsType1.getId());
+ goodsType2.setUpdateTime(new Date());
+ goodsTypeService.update(goodsType2);
+ }
+ // 从brands中筛选出title等于detail.getBrandName()的元素,并返回第一个元素,如果没有找到则返回null
+ GoodsBrand goodsBrand = brands.stream().filter(s -> s.getTitle().equals(detail.getBrandName())).findFirst().orElse(null);
+ // 如果goodsBrand为null,则创建一个新的GoodsBrand对象
+ if (goodsBrand == null) {
+ goodsBrand = new GoodsBrand();
+ // 设置title为detail.getBrandName()
+ goodsBrand.setTitle(detail.getBrandName());
+ // 设置status为1
+ goodsBrand.setStatus(1);
+ // 设置createTime为当前时间
+ goodsBrand.setCreateTime(new Date());
+ // 设置updateTime为当前时间
+ goodsBrand.setUpdateTime(new Date());
+ // 调用goodsBrandService的create方法,将goodsBrand对象保存到数据库中
+ goodsBrandService.create(goodsBrand);
+ brands.add(goodsBrand);
+ }
+
+ // 创建一个GoodsMsg对象
+ goodsMsg = new GoodsMsg();
+ // 设置更新时间为当前时间
+ goodsMsg.setUpdateTime(new Date());
+ // 设置商家ID为bsMer的ID
+ goodsMsg.setMerId(bsMer.getId());
+ // 设置商家名称为bsMer的名称
+ goodsMsg.setMerName(bsMer.getMerName());
+ // 设置商品名称为detail.getGoodsName()
+ goodsMsg.setTitle(detail.getSkuName());
+ // 设置商品类型为3
+ goodsMsg.setType(1);
+ // 设置商品状态为1
+ goodsMsg.setStatus(1);
+ // 设置商品子类型为1
+ goodsMsg.setChildType(1);
+ // 设置商品品牌ID
+ goodsMsg.setGoodsBrand(goodsBrand.getId());
+ // 设置商品品牌名称
+ goodsMsg.setGoodsBrandName(goodsBrand.getTitle());
+ // 设置商品类型ID
+ goodsMsg.setGoodsType(goodsType2.getId());
+ // 设置商品类型名称
+ goodsMsg.setGoodsTypeName(goodsType2.getTitle());
+ // 设置商品类型父级ID
+ goodsMsg.setGoodsTypeParent(goodsType1.getId());
+ // 设置商品类型父级名称
+ goodsMsg.setGoodsTypeParentName(goodsType1.getTitle());
+ goodsMsg.setThirdId(aLong.toString());
+ StringBuilder imgS = new StringBuilder();
+ // 遍历商品图片列表
+ for (SkuImageItemGoodsResp skuImage : img.getSkuImageList()) {
+ // 如果图片是主图
+ if (skuImage.getIsPrimary() == 1) {
+ // 设置主图
+ goodsMsg.setListImg("https://img13.360buyimg.com/n1/" + skuImage.getShortPath());
+ }
+ // 如果图片不是主图
+ if (skuImage.getIsPrimary() == 0) {
+
+ imgS.append("https://img13.360buyimg.com/n1/").append(skuImage.getShortPath()).append(",");
+
+ }
+ }
+
+ if (imgS.length() > 0) {
+ imgS.deleteCharAt(imgS.length() - 1);
+ }
+
+ // 设置轮播图
+ goodsMsg.setBannerImg(String.valueOf(imgS));
+ // 设置详情图
+ goodsMsg.setDetailImg(String.valueOf(imgS));
+ GoodsMsg msg = goodsMsgs.stream().filter(s -> s.getThirdId().equals(aLong.toString())).findFirst().orElse(null);
+
+ if (msg != null) {
+ goodsMsg.setId(msg.getId());
+ // 更新商品信息
+ goodsMsgService.update(goodsMsg);
+ } else {
+ // 设置销售数量为0
+ goodsMsg.setSaleNum(0);
+ goodsMsg.setCreateTime(new Date());
+ // 创建商品信息
+ goodsMsgService.create(goodsMsg);
+
+ }
+
+ // 创建商品规格
+ goodsSpecs = new GoodsSpecs();
+ // 设置商品ID
+ goodsSpecs.setGoodsId(goodsMsg.getId());
+ // 设置商品名称
+ goodsSpecs.setName(detail.getSpuName());
+ // 设置更新时间
+ goodsSpecs.setUpdateTime(new Date());
+ // 设置采购限制
+ goodsSpecs.setPurLimit(99999);
+ // 设置状态
+ goodsSpecs.setStatus(1);
+ goodsSpecs.setThirdId(aLong.toString());
+ // 设置库存
+ goodsSpecs.setStock(10000);
+ BigDecimal profitPrice = price.getSalePrice().multiply(productConfig.getDiscount().divide(new BigDecimal(100) , 2, RoundingMode.HALF_UP));
+ // 设置销售价格
+ goodsSpecs.setSalePrice(profitPrice.add(price.getSalePrice()));
+ // 设置原价
+ goodsSpecs.setOriginalPrice(price.getMarketPrice());
+ // 设置展示图片
+ goodsSpecs.setShowImg(goodsMsg.getListImg());
+
+ GoodsSpecs specs = goodsSpecsList.stream().filter(s -> s.getThirdId().equals(aLong.toString())).findFirst().orElse(null);
+
+ if (specs != null) {
+ goodsSpecs.setId(specs.getId());
+ // 更新商品规格
+ goodsSpecsService.update(goodsSpecs);
+ } else {
+ // 设置创建时间
+ goodsSpecs.setCreateTime(new Date());
+ // 创建商品规格
+ goodsSpecsService.create(goodsSpecs);
+ }
+ }
+
+ }
+ }
+
+
+ }
+ }
+ }
+
+
+ @Override
+ public Boolean checkSkuSale(GoodsMsg goodsMsg) throws Exception {
+
+ // 查询商品是否下架
+ VopGoodsGetSkuStateListResponse skuStateListResponse = JdPostService.getSkuState(getToken(), goodsMsg.getThirdId());
+
+ if (skuStateListResponse.getOpenRpcResult().getResult().get(0).getSkuState() == 0) {
+ return true;
+ }
+
+ // 查询规格
+ GoodsSpecs specs = goodsSpecsService.queryDetailByThirdId(goodsMsg.getThirdId());
+
+ // 根据skuId 查询商品详情
+ VopGoodsGetSkuDetailInfoResponse skuDetail = JdPostService.getSkuDetailInfo(getToken(), Long.valueOf(goodsMsg.getThirdId()));
+ GetSkuPoolInfoGoodsResp detail = skuDetail.getOpenRpcResult().getResult();
+ // 根据skuId 查询商品售价
+ OpenRpcResult priceResponse = JdPostService.getSellPrice(getToken(), String.valueOf(goodsMsg.getThirdId())).getOpenRpcResult();
+ return null;
+ }
+}
diff --git a/service/src/main/java/com/hfkj/jd/JdPostService.java b/service/src/main/java/com/hfkj/jd/JdPostService.java
new file mode 100644
index 0000000..5d0f362
--- /dev/null
+++ b/service/src/main/java/com/hfkj/jd/JdPostService.java
@@ -0,0 +1,313 @@
+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.entity.BsOrderGoods;
+import com.hfkj.entity.GoodsUserAddress;
+import com.jd.open.api.sdk.DefaultJdClient;
+import com.jd.open.api.sdk.JdClient;
+import com.jd.open.api.sdk.domain.vopdd.OperaOrderOpenProvider.request.submitOrder.*;
+import com.jd.open.api.sdk.domain.vopkc.SkuInfoGoodsProvider.request.getNewStockById.AreaBaseInfoGoodsReq;
+import com.jd.open.api.sdk.domain.vopkc.SkuInfoGoodsProvider.request.getNewStockById.GetStockByIdGoodsReq;
+import com.jd.open.api.sdk.domain.vopkc.SkuInfoGoodsProvider.request.getNewStockById.SkuNumBaseGoodsReq;
+import com.jd.open.api.sdk.request.vopdd.VopOrderSubmitOrderRequest;
+import com.jd.open.api.sdk.request.vopdz.VopAddressConvertFourAreaByDetailStrRequest;
+import com.jd.open.api.sdk.request.vopdz.VopAddressQueryJdAreaIdListRequest;
+import com.jd.open.api.sdk.request.vopdz.VopAddressVerifyAreaFourIdOpenReqRequest;
+import com.jd.open.api.sdk.request.vopkc.VopGoodsGetNewStockByIdRequest;
+import com.jd.open.api.sdk.request.vopsp.*;
+import com.jd.open.api.sdk.response.vopdd.VopOrderSubmitOrderResponse;
+import com.jd.open.api.sdk.response.vopdz.VopAddressConvertFourAreaByDetailStrResponse;
+import com.jd.open.api.sdk.response.vopdz.VopAddressQueryJdAreaIdListResponse;
+import com.jd.open.api.sdk.response.vopdz.VopAddressVerifyAreaFourIdOpenReqResponse;
+import com.jd.open.api.sdk.response.vopkc.VopGoodsGetNewStockByIdResponse;
+import com.jd.open.api.sdk.response.vopsp.*;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Resource;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @ClassName JdService
+ * @Author Sum1Dream
+ * @Description 京东服务
+ * @Date 2024/10/11 下午3:25
+ **/
+public class JdPostService {
+
+ private static Logger log = LoggerFactory.getLogger(JdPostService.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",
+ /**
+ * 请求地址
+ */
+ SERVER_URL = "https://api.jd.com/routerjson",
+ /**
+ * RSA私钥
+ */
+ PRIVATE_RSA_KEY = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMEtt0kF02YBxPXzXyqzCtr1zkuj8NXLiqqSCDAfU6zWB1T1GUEpCfNukPBeZ9nXGj+jbTom8RFllNXbnOkW01Zn2VoyePh8TRWQbToXi+i/JQ162GzpF0GdPsUhJSrB5Z2QzK4UVXXkpPHhQHR8NKQhvTRkoRLfOy+oXWL8PS2hAgMBAAECgYBySo/j/jRiZ62WLlUhuCg1/7P8AJSeiPwTiq6Zeg9RdJeF5jT43kTq54GNFO2wbpkzCYe4Hg4GUulJ1dLx/PUvYquRpM4jGznxDxBA10mNyjx0O+SHcY+ZlOYWIKhEq4MeeJhtHhoFrlgcMNIyofhRDbFzrRak48GrcZDQC4/cIQJBAPwxtEwMnetPveLExR1UsygdVKwoWoGNL5Hkhcx6b2N2Qapk5aHB5haUEXeg1ShrL4C/kE1lsMAIdpVS9lWd4x0CQQDEGASnnB2oPHjvNfj88klpYTvPJRi3ORQPtlfz36kv+29QFxB9Mt1u39ttopw5G2x7QvTtL542w878brrmS8lVAkEA4k7QFjZ0N8cVBLvCjrGFG4hGhT6pCPxjJa5GCtoLvttNzdRA5EkVaklw60LeRSj6NbSxj2Kjm498qj8KYoYOWQJATJhRISMy1mcgmdeMNUlycW4gjY4g9FigRG7mNgU0MeDVnwQTVcQLiGZ6cH2m5guXOSJzRz5lX2DmteWOrawGrQJBAMKLfeTnYkVpXw9MABcR/9L9myG3FKwOHBIqD0wK+QVahi9byFk8GFXD4OlBQ1ZSxHqsUuxWqLVSa3sWBCKpLo8=";
+
+
+ // 获取token
+ 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);
+ }
+
+ // 查询四级地址ID列表
+ public static VopAddressQueryJdAreaIdListResponse queryJdAreaIdList(String token , Integer areaLevel , Long areaId) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL, token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopAddressQueryJdAreaIdListRequest request=new VopAddressQueryJdAreaIdListRequest();
+ request.setAreaLevel(areaLevel);
+ request.setJdAreaId(areaId);
+ return client.execute(request);
+ }
+
+ //验证四级地址ID有效性
+ public static VopAddressVerifyAreaFourIdOpenReqResponse verifyAreaFourIdOpenReq (String token , Long provinceId , Long cityId , Long countyId , Long townId) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopAddressVerifyAreaFourIdOpenReqRequest request=new VopAddressVerifyAreaFourIdOpenReqRequest();
+ request.setProvinceId(provinceId);
+ request.setCityId(cityId);
+ request.setTownId(townId);
+ request.setCountyId(countyId);
+ return client.execute(request);
+ }
+
+ // 地址详情转换京东地址编码
+ public static VopAddressConvertFourAreaByDetailStrResponse convertFourAreaByDetailStr(String token , String address) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopAddressConvertFourAreaByDetailStrRequest request=new VopAddressConvertFourAreaByDetailStrRequest();
+ request.setAddressDetailStr(address);
+ return client.execute(request);
+ }
+ // 查询商品池编号
+ public static VopGoodsGetSkuPoolInfoResponse getSkuPoolInfo(String token) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopGoodsGetSkuPoolInfoRequest request=new VopGoodsGetSkuPoolInfoRequest();
+ return client.execute(request);
+ }
+
+ // 根据商品池获取所有商品信息
+ public static VopGoodsQuerySkuByPageResponse querySkuByPage(String token , String bizPoolId , Integer offset) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopGoodsQuerySkuByPageRequest request=new VopGoodsQuerySkuByPageRequest();
+ request.setBizPoolId(bizPoolId);
+ request.setOffset(offset);
+ request.setPageSize(10);
+ return client.execute(request);
+ }
+
+ // 获取商品详情及商品扩展信息
+ public static VopGoodsGetSkuDetailInfoResponse getSkuDetailInfo(String token , Long skuId) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopGoodsGetSkuDetailInfoRequest request=new VopGoodsGetSkuDetailInfoRequest();
+ request.setSkuId(skuId);
+ return client.execute(request);
+ }
+
+ // 查询商品图片
+ public static VopGoodsGetSkuImageListResponse getSkuImageList(String token , String skuId) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopGoodsGetSkuImageListRequest request=new VopGoodsGetSkuImageListRequest();
+ request.setSkuId(skuId);
+ return client.execute(request);
+ }
+
+ // 批量查询商品售卖价
+ public static VopGoodsGetSellPriceResponse getSellPrice(String token , String skuId) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopGoodsGetSellPriceRequest request=new VopGoodsGetSellPriceRequest();
+ request.setSkuId(skuId);
+ return client.execute(request);
+ }
+
+ // 根据分类id查询分类信息
+ public static VopGoodsGetCategoryInfoListResponse getCategoryInfoList(String token , String CategoryId) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopGoodsGetCategoryInfoListRequest request=new VopGoodsGetCategoryInfoListRequest();
+ request.setCategoryId(CategoryId);
+ return client.execute(request);
+ }
+
+ // 查询商品上下架状态
+ public static VopGoodsGetSkuStateListResponse getSkuState(String token , String skuId) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopGoodsGetSkuStateListRequest request=new VopGoodsGetSkuStateListRequest();
+ request.setSkuId(skuId);
+ VopGoodsGetSkuStateListResponse response=client.execute(request);
+ return client.execute(request);
+ }
+
+ // 校验商品购买区域是否受限
+ public static VopGoodsCheckAreaLimitListResponse checkAreaLimitList(String token , String skuId , Long provinceId , Long cityId , Long countyId , Long townId) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopGoodsCheckAreaLimitListRequest request=new VopGoodsCheckAreaLimitListRequest();
+ request.setSkuId(skuId);
+ request.setProvinceId(provinceId);
+ request.setCityId(cityId);
+ request.setCountyId(countyId);
+ request.setTownId(townId == null ? 0 : townId);
+ return client.execute(request);
+ }
+
+ // 提交预占订单服务
+ public static VopOrderSubmitOrderResponse submitOrder(String token , GoodsUserAddress address , String orderNo , Integer skuNum , Long skuId) throws Exception {
+ // 创建京东客户端
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ // 创建订单提交请求
+ VopOrderSubmitOrderRequest request=new VopOrderSubmitOrderRequest();
+ // 创建订单提交请求参数
+ SubmitOrderOpenReq submitOrderOpenReq=new SubmitOrderOpenReq();
+ // 设置订单提交状态类型
+ submitOrderOpenReq.setSubmitStateType(0);
+ // 设置第三方订单号
+ submitOrderOpenReq.setThirdOrderId(orderNo);
+
+ // 创建订单提交商品列表
+ List submitOrderOpenSkus = new ArrayList<>();
+ // 创建订单提交商品信息
+ SkuInfoOrderOpenReq skuInfoOrderOpenReq=new SkuInfoOrderOpenReq();
+ // 设置商品数量
+ skuInfoOrderOpenReq.setSkuNum(skuNum);
+ // 设置商品ID
+ skuInfoOrderOpenReq.setSkuId(skuId);
+ // 将商品信息添加到商品列表
+ submitOrderOpenSkus.add(skuInfoOrderOpenReq);
+ // 设置订单提交商品列表
+ submitOrderOpenReq.setSkuInfoList(submitOrderOpenSkus);
+
+ // 创建订单提交支付信息
+ PaymentInfoOrderOpenReq paymentInfoOrderOpenReq=new PaymentInfoOrderOpenReq();
+ // 设置支付类型
+ // 1:货到付款 4:预存款 5:公司转账 101:京东金采 102:商城金采(一般不适用,仅限确认开通商城账期的特殊情况使用,请与业务确认后使用) 20为混合支付
+ paymentInfoOrderOpenReq.setPaymentType(4);
+ // 设置订单提交支付信息
+ submitOrderOpenReq.setPaymentInfo(paymentInfoOrderOpenReq);
+
+ // 创建订单提交收货人信息
+ ConsigneeInfoOrderOpenReq infoOrderOpenReq = new ConsigneeInfoOrderOpenReq();
+ // 设置收货人地址
+ infoOrderOpenReq.setConsigneeAddress(address.getAddress());
+ // 设置收货人姓名
+ infoOrderOpenReq.setConsigneeName(address.getConsignee());
+ // 设置收货人手机号
+ infoOrderOpenReq.setConsigneeMobile(address.getPhone());
+ // 设置收货人电话
+ infoOrderOpenReq.setConsigneePhone(address.getPhone());
+ // 设置收货人省份ID
+ infoOrderOpenReq.setConsigneeProvinceId(address.getProvinceId());
+ // 设置收货人城市ID
+ infoOrderOpenReq.setConsigneeCityId(address.getCityId());
+ // 设置收货人区县ID
+ infoOrderOpenReq.setConsigneeCountyId(address.getCountyId());
+ // 设置收货人乡镇ID
+ infoOrderOpenReq.setConsigneeTownId(address.getTownId());
+ // 设置订单提交收货人信息
+ submitOrderOpenReq.setConsigneeInfo(infoOrderOpenReq);
+
+ // 创建订单提交发票信息
+ InvoiceInfoOrderOpenReq invoiceInfoOrderOpenReq = new InvoiceInfoOrderOpenReq();
+ // 设置发票类型
+ invoiceInfoOrderOpenReq.setInvoiceType(24);
+ // 设置发票开具类型
+ invoiceInfoOrderOpenReq.setInvoicePutType(2);
+ // 设置发票抬头
+ invoiceInfoOrderOpenReq.setInvoiceCompanyName("惠兑礼品(重庆)有限公司");
+ invoiceInfoOrderOpenReq.setInvoiceRegCompanyName("惠兑礼品(重庆)有限公司");
+ invoiceInfoOrderOpenReq.setInvoiceRegPhone("13983618575");
+ // 设置发票抬头
+ invoiceInfoOrderOpenReq.setInvoiceSelectedTitle(5);
+ // 设置发票类型
+ invoiceInfoOrderOpenReq.setInvoiceContentType(1);
+ // 设置发票姓名
+ invoiceInfoOrderOpenReq.setInvoiceName("魏涛");
+ // 设置发票电话
+ invoiceInfoOrderOpenReq.setInvoicePhone("13983618575");
+ // 设置发票地址
+ invoiceInfoOrderOpenReq.setInvoiceAddress("重庆渝中区国贸中心1308");
+ // 设置发票开户银行
+ invoiceInfoOrderOpenReq.setInvoiceRegBank("中国民生银行股份有限公司重庆大坪支行");
+ // 设置发票纳税人识别号
+ invoiceInfoOrderOpenReq.setInvoiceRegCode("91500103322277192B");
+ // 设置发票注册地址
+ invoiceInfoOrderOpenReq.setInvoiceRegAddress("重庆渝中区国贸中心1308");
+ // 设置发票开户银行账号
+ invoiceInfoOrderOpenReq.setInvoiceRegBankAccount("172792234");
+ // 设置发票省份ID
+ invoiceInfoOrderOpenReq.setInvoiceProvinceId(4L);
+ // 设置发票城市ID
+ invoiceInfoOrderOpenReq.setInvoiceCityId(51026L);
+ // 设置发票区县ID
+ invoiceInfoOrderOpenReq.setInvoiceCountyId(58459L);
+ // 设置订单提交发票信息
+ submitOrderOpenReq.setInvoiceInfo(invoiceInfoOrderOpenReq);
+
+
+ // 设置订单提交请求参数
+ request.setSubmitOrderOpenReq(submitOrderOpenReq);
+ // 执行订单提交请求
+ return client.execute(request);
+ }
+
+ // 批量获取库存接口
+ public static VopGoodsGetNewStockByIdResponse getNewStockById(String token , Long skuId , Long provinceId , Long cityId , Long countyId , Long townId) throws Exception {
+ JdClient client=new DefaultJdClient(SERVER_URL,token,CommonSysConst.getSysConfig().getJDAppKey(),CommonSysConst.getSysConfig().getJDAppSecret());
+ VopGoodsGetNewStockByIdRequest request=new VopGoodsGetNewStockByIdRequest();
+ GetStockByIdGoodsReq getStockByIdGoodsReq=new GetStockByIdGoodsReq();
+ List skuNumBaseGoodsReqs = new ArrayList<>();
+ SkuNumBaseGoodsReq skuNumBaseGoodsReq=new SkuNumBaseGoodsReq();
+ skuNumBaseGoodsReq.setSkuId(skuId);
+ skuNumBaseGoodsReq.setSkuNumber(1);
+ skuNumBaseGoodsReqs.add(skuNumBaseGoodsReq);
+ getStockByIdGoodsReq.setSkuNumInfoList(skuNumBaseGoodsReqs);
+
+ AreaBaseInfoGoodsReq areaBaseInfoGoodsReq=new AreaBaseInfoGoodsReq();
+ areaBaseInfoGoodsReq.setCityId(cityId);
+ areaBaseInfoGoodsReq.setCountyId(countyId);
+ areaBaseInfoGoodsReq.setProvinceId(provinceId);
+ areaBaseInfoGoodsReq.setTownId(townId == null ? 0 : townId);
+ getStockByIdGoodsReq.setAreaInfo(areaBaseInfoGoodsReq);
+
+ request.setGetStockByIdGoodsReq(getStockByIdGoodsReq);
+ return client.execute(request);
+ }
+
+
+
+
+
+}
diff --git a/service/src/main/java/com/hfkj/jd/JdService.java b/service/src/main/java/com/hfkj/jd/JdService.java
index 46143bc..12f2843 100644
--- a/service/src/main/java/com/hfkj/jd/JdService.java
+++ b/service/src/main/java/com/hfkj/jd/JdService.java
@@ -1,63 +1,36 @@
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 com.hfkj.entity.GoodsMsg;
-import java.net.URLEncoder;
-import java.util.Map;
+public interface JdService {
-/**
- * @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加密
+ * @MethodName getToken
+ * @Description: 获取token
+ * @param
+ * @return: java.lang.String
+ * @Author: Sum1Dream
+ * @Date: 2024/10/16 下午3:21
*/
- PLAINTEXT_PASSWORD = "hdcs1234",
+ String getToken() throws Exception;
+
+
/**
- * 回调地址,注册应用时配置的授权回调地址
+ * @MethodName getGoodsJd
+ * @Description: 获取京东商品信息
+ * @param
+ * @return: void
+ * @Author: Sum1Dream
+ * @Date: 2024/10/16 下午3:21
*/
- REDIRECT_URI = CommonSysConst.getSysConfig().getDomainName() + "/order/jdNotify/callbackToken",
+ void getGoodsJd() throws Exception;
+
/**
- * RSA私钥
+ * @MethodName checkSkuSale
+ * @Description: 校验商品可售性
+ * @param goodsMsg
+ * @Author: Sum1Dream
+ * @Date: 2024/11/22 下午2:01
*/
- 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);
- }
+ Boolean checkSkuSale(GoodsMsg goodsMsg) throws Exception;
}
diff --git a/service/src/main/java/com/hfkj/model/CmsContentModel.java b/service/src/main/java/com/hfkj/model/CmsContentModel.java
new file mode 100644
index 0000000..92e4639
--- /dev/null
+++ b/service/src/main/java/com/hfkj/model/CmsContentModel.java
@@ -0,0 +1,13 @@
+package com.hfkj.model;
+
+import com.hfkj.entity.CmsContent;
+import com.hfkj.model.goods.GoodsModel;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class CmsContentModel extends CmsContent {
+
+ List goodsMsgList;
+}
diff --git a/service/src/main/java/com/hfkj/service/coupon/channel/YouTuCouponService.java b/service/src/main/java/com/hfkj/service/coupon/channel/YouTuCouponService.java
new file mode 100644
index 0000000..6e609da
--- /dev/null
+++ b/service/src/main/java/com/hfkj/service/coupon/channel/YouTuCouponService.java
@@ -0,0 +1,168 @@
+package com.hfkj.service.coupon.channel;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.hfkj.common.exception.ErrorCode;
+import com.hfkj.common.exception.ErrorHelp;
+import com.hfkj.common.exception.SysCode;
+import com.hfkj.common.utils.HttpsUtils;
+import com.hfkj.config.CommonSysConst;
+import com.meituan.sqt.utils.EncryptUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.StandardCharsets;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Map;
+
+/**
+ * @ClassName MeiTuanService
+ * @Author Sum1Dream
+ * @Description 优涂接口
+ * @Date 2024/8/26 下午4:52
+ **/
+public class YouTuCouponService {
+
+ private static Logger log = LoggerFactory.getLogger(YouTuCouponService.class);
+
+
+ /**
+ * @MethodName getYouTuCouponList
+ * @Description:电子券模板列表
+ * @param param
+ * @return: com.alibaba.fastjson.JSONObject
+ * @Author: Sum1Dream
+ * @Date: 2024/11/19 下午3:38
+ */
+ public static JSONObject getYouTuCouponList(JSONObject param) {
+
+ try {
+ JSONObject object = request( "/openapi/couponV3/getMerchantCouponTpl", param);
+
+ if (object.getInteger("code").equals(200)) {
+ return object.getJSONObject("data");
+ } else {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
+ }
+
+ } catch (Exception e) {
+ log.info("响应错误信息:{}", e);
+ }
+
+ return null;
+
+ }
+
+ /**
+ * @MethodName getMerchantCouponCode
+ * @Description:获取电子券码
+ * @param param
+ * @return: com.alibaba.fastjson.JSONObject
+ * @Author: Sum1Dream
+ * @Date: 2024/11/19 下午3:38
+ */
+ public static JSONObject getMerchantCouponCode(JSONObject param) {
+
+ try {
+ JSONObject object = request( "/openapi/couponV3/getMerchantCouponCode", param);
+
+ if (object.getInteger("code").equals(200)) {
+ return object.getJSONObject("data");
+ } else {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
+ }
+
+ } catch (Exception e) {
+ log.info("响应错误信息:{}", e);
+ }
+
+ return null;
+
+ }
+
+ /**
+ * @MethodName merchantCouponToMember
+ * @Description:发送电子券到优途
+ * @param param
+ * @return: com.alibaba.fastjson.JSONObject
+ * @Author: Sum1Dream
+ * @Date: 2024/11/19 下午4:36
+ */
+ public static JSONObject merchantCouponToMember(JSONObject param) {
+
+ try {
+ JSONObject object = request( "/openapi/couponV3/merchantCouponToMember", param);
+
+ if (object.getInteger("code").equals(200)) {
+ return object.getJSONObject("data");
+ } else {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
+ }
+
+ } catch (Exception e) {
+ log.info("响应错误信息:{}", e);
+ }
+
+ return null;
+
+ }
+
+ public static JSONObject getMerchantCouponState(JSONObject param) {
+
+ try {
+ JSONObject object = request( "/openapi/couponV3/getMerchantCouponState", param);
+
+ if (object.getInteger("code").equals(200)) {
+ return object.getJSONObject("data");
+ } else {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
+ }
+
+ } catch (Exception e) {
+ log.info("响应错误信息:{}", e);
+ }
+
+ return null;
+
+ }
+
+
+ public static JSONObject request(String url , JSONObject param) throws Exception {
+ log.info("获取卡券列表-请求参数: " + JSON.toJSONString(param));
+
+ StringBuilder stringBuffer = new StringBuilder();
+
+ param.put("app_id", CommonSysConst.getSysConfig().getYtAccessKey());
+ JSONObject response = HttpsUtils.doPost(CommonSysConst.getSysConfig().getYtPostUrl() + url + "?app_id" + CommonSysConst.getSysConfig().getYtAccessKey()
+ + "&sign=" + encryptSha1(String.valueOf(stringBuffer.append(CommonSysConst.getSysConfig().getYtSecretKey()).append(param.toJSONString())))
+ , param);
+ log.info("获取卡券列表-回调参数: " + JSON.toJSONString(response));
+ log.info("========================请求任务End=========================");
+ // 请求接口
+ return response;
+ }
+
+
+ public static String encryptSha1(String input) {
+ try {
+ // Create MD5 Hash
+ MessageDigest md = MessageDigest.getInstance("SHA-1");
+ md.update(input.getBytes(java.nio.charset.StandardCharsets.UTF_8));
+ byte[] digest = md.digest();
+ StringBuffer hexString = new StringBuffer();
+ for (byte b : digest) {
+ String hex = Integer.toHexString(0xff & b);
+ if (hex.length() == 1) hexString.append('0');
+ hexString.append(hex);
+ }
+ return hexString.toString();
+
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ }
+ return "";
+
+ }
+}
diff --git a/service/src/main/java/com/hfkj/service/goods/GoodsSpecsService.java b/service/src/main/java/com/hfkj/service/goods/GoodsSpecsService.java
index 2d914fa..dcfba81 100644
--- a/service/src/main/java/com/hfkj/service/goods/GoodsSpecsService.java
+++ b/service/src/main/java/com/hfkj/service/goods/GoodsSpecsService.java
@@ -56,6 +56,16 @@ public interface GoodsSpecsService {
GoodsSpecs queryDetailByGoodsId(Long id);
+ /**
+ * @MethodName queryDetailByThirdId
+ * @Description: 根据第三方id查询
+ * @param thirdId
+ * @return: com.hfkj.entity.GoodsSpecs
+ * @Author: Sum1Dream
+ * @Date: 2024/11/22 下午2:34
+ */
+ GoodsSpecs queryDetailByThirdId(String thirdId);
+
/**
* @Author Sum1Dream
* @Name queryDetailByMap
diff --git a/service/src/main/java/com/hfkj/service/goods/impl/BsOrderMeiTuanServiceImpl.java b/service/src/main/java/com/hfkj/service/goods/impl/BsOrderMeiTuanServiceImpl.java
index e0f0ba6..74e211c 100644
--- a/service/src/main/java/com/hfkj/service/goods/impl/BsOrderMeiTuanServiceImpl.java
+++ b/service/src/main/java/com/hfkj/service/goods/impl/BsOrderMeiTuanServiceImpl.java
@@ -103,7 +103,7 @@ public class BsOrderMeiTuanServiceImpl implements BsOrderMeiTuanService {
criteria.andChildOrderNoEqualTo(MapUtils.getString(map, "childOrderNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "tradeNo"))) {
- criteria.andChildOrderNoEqualTo(MapUtils.getString(map, "tradeNo"));
+ criteria.andTradeNoEqualTo(MapUtils.getString(map, "tradeNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "userPhone"))) {
diff --git a/service/src/main/java/com/hfkj/service/goods/impl/BsOrderMemberServiceImpl.java b/service/src/main/java/com/hfkj/service/goods/impl/BsOrderMemberServiceImpl.java
index 00505b4..070e914 100644
--- a/service/src/main/java/com/hfkj/service/goods/impl/BsOrderMemberServiceImpl.java
+++ b/service/src/main/java/com/hfkj/service/goods/impl/BsOrderMemberServiceImpl.java
@@ -68,7 +68,45 @@ public class BsOrderMemberServiceImpl implements BsOrderMemberService {
@Override
public List getList(Map map) {
- return Collections.emptyList();
+ BsOrderMemberExample example = new BsOrderMemberExample();
+ BsOrderMemberExample.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, "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 bsOrderMemberMapper.selectByExample(example);
}
@Override
diff --git a/service/src/main/java/com/hfkj/service/goods/impl/GoodsMsgServiceImpl.java b/service/src/main/java/com/hfkj/service/goods/impl/GoodsMsgServiceImpl.java
index ac28bd1..e7e0dbc 100644
--- a/service/src/main/java/com/hfkj/service/goods/impl/GoodsMsgServiceImpl.java
+++ b/service/src/main/java/com/hfkj/service/goods/impl/GoodsMsgServiceImpl.java
@@ -98,6 +98,9 @@ public class GoodsMsgServiceImpl implements GoodsMsgService {
if (MapUtils.getInteger(map, "type") != null) {
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type"));
}
+ if (MapUtils.getInteger(map, "childType") != null) {
+ criteria.andChildTypeEqualTo(MapUtils.getInteger(map, "childType"));
+ }
if (MapUtils.getLong(map, "goodsBrand") != null) {
criteria.andGoodsBrandEqualTo(MapUtils.getLong(map, "goodsBrand"));
}
diff --git a/service/src/main/java/com/hfkj/service/goods/impl/GoodsSpecsServiceImpl.java b/service/src/main/java/com/hfkj/service/goods/impl/GoodsSpecsServiceImpl.java
index 83b0fc6..e24ae28 100644
--- a/service/src/main/java/com/hfkj/service/goods/impl/GoodsSpecsServiceImpl.java
+++ b/service/src/main/java/com/hfkj/service/goods/impl/GoodsSpecsServiceImpl.java
@@ -77,6 +77,13 @@ public class GoodsSpecsServiceImpl implements GoodsSpecsService {
return null;
}
+ @Override
+ public GoodsSpecs queryDetailByThirdId(String thirdId) {
+ GoodsSpecsExample goodsSpecsExample = new GoodsSpecsExample();
+ goodsSpecsExample.createCriteria().andThirdIdEqualTo(thirdId);
+ return null;
+ }
+
@Override
public GoodsSpecs queryDetailByMap(Map map) {
return null;
diff --git a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java
index 5d35d79..362c055 100644
--- a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java
+++ b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java
@@ -9,6 +9,8 @@ import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.RandomUtils;
import com.hfkj.common.utils.StarbucksUtil;
import com.hfkj.entity.*;
+import com.hfkj.jd.JdPostService;
+import com.hfkj.jd.JdService;
import com.hfkj.model.order.OrderChildModel;
import com.hfkj.model.order.OrderModel;
import com.hfkj.qianzhu.CinemaService;
@@ -22,6 +24,11 @@ import com.hfkj.service.goods.*;
import com.hfkj.service.hlt.HuiLianTongUnionCardService;
import com.hfkj.sysenum.GoodsVpdSourceEnum;
import com.hfkj.sysenum.order.*;
+import com.jd.open.api.sdk.domain.vopsp.SkuInfoGoodsProvider.response.getSellPrice.OpenRpcResult;
+import com.jd.open.api.sdk.response.vopdd.VopOrderSubmitOrderResponse;
+import com.jd.open.api.sdk.response.vopdz.VopAddressConvertFourAreaByDetailStrResponse;
+import com.jd.open.api.sdk.response.vopkc.VopGoodsGetNewStockByIdResponse;
+import com.jd.open.api.sdk.response.vopsp.VopGoodsCheckAreaLimitListResponse;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -54,6 +61,7 @@ public class OrderCreateService {
private GoodsVpdService goodsVpdService;
@Resource
private GoodsUserAddressService goodsUserAddressService;
+
@Resource
private BsOrderGoodsService bsOrderGoodsService;
@Resource
@@ -74,6 +82,8 @@ public class OrderCreateService {
private SecConfigService secConfigService;
@Resource
private BsOrderMeiTuanService bsOrderMeiTuanService;
+ @Resource
+ private JdService jdService;
/**
* 事务产品
@@ -119,7 +129,7 @@ public class OrderCreateService {
orderChild.setBusiness(goodsVpd);
if (goodsVpd.getSource().equals(GoodsVpdSourceEnum.type2.getCode())) {
yuShang(order , orderChild , goodsVpd , goodsMsg , goodsSpecs , businessObj);
- } else if (goodsVpd.getSource().equals(GoodsVpdSourceEnum.type4.getCode())) {
+ } else if (goodsVpd.getSource().equals(GoodsVpdSourceEnum.type4.getCode()) || goodsVpd.getSource().equals(GoodsVpdSourceEnum.type10.getCode())) {
couponHlt(order , orderChild , goodsVpd , goodsMsg , goodsSpecs , businessObj);
}
@@ -225,12 +235,14 @@ public class OrderCreateService {
if (goodsMsg.getType() != 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前商品不属于实物产品不可下单!");
}
+
// 查询商品规格
GoodsSpecs goodsSpecs = goodsSpecsService.queryDetail(orderChild.getProductSpecId());
if (goodsSpecs == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商品规格");
}
+
JSONObject object = new JSONObject((Map) orderChild.getBusiness());
orderChild.setMerId(goodsMsg.getMerId());
@@ -254,6 +266,14 @@ public class OrderCreateService {
} else {
jsonObject = new JSONObject((Map) orderChild.getBusiness());
}
+ BsOrderGoods orderGoods = new BsOrderGoods();
+ // 判断是否是京东产品
+ if (goodsMsg.getType() == 1) {
+ if (goodsMsg.getChildType() != null && goodsMsg.getChildType().equals(1)) {
+ orderGoods = jdGoods(orderGoods , address, goodsMsg.getThirdId(), goodsSpecs , orderChild.getChildOrderNo() , orderChild.getProductCount());
+ }
+
+ }
// 查询商品虚拟信息
GoodsJump goodsJump = goodsJumpService.queryDetailBySpecsId(goodsSpecs.getId());
@@ -262,7 +282,6 @@ public class OrderCreateService {
jsonObject.put("goodsJump", goodsJump);
// 创建实物订单
- BsOrderGoods orderGoods = new BsOrderGoods();
orderGoods.setOrderNo(orderChild.getOrderNo());
orderGoods.setChildOrderNo(orderChild.getChildOrderNo());
orderGoods.setMerId(orderChild.getMerId());
@@ -282,7 +301,7 @@ public class OrderCreateService {
orderGoods.setGoodsSpecsOriginalPrice(goodsSpecs.getOriginalPrice());
orderGoods.setGoodsCount(orderChild.getProductCount());
orderGoods.setStatus(orderChild.getStatus());
- orderGoods.setDeliveryAddress(address.getAddress());
+ orderGoods.setDeliveryAddress(address.getRegionName() + "-" + address.getAddress() + "-" + address.getConsignee() + "-" + address.getPhone());
orderGoods.setDeliveryAddressId(address.getId());
orderGoods.setCreateTime(new Date());
orderGoods.setUpdateTime(new Date());
@@ -549,4 +568,88 @@ public class OrderCreateService {
return orderChild;
}
+
+ private BsOrderGoods jdGoods(BsOrderGoods orderGoods , GoodsUserAddress address , String skuId , GoodsSpecs goodsSpecs , String orderNo , Integer num) throws Exception {
+ //校验商品购买区域是否受限
+ if (address.getProvinceId() == null) {
+ // 根据详细地址获取四级地址信息
+ VopAddressConvertFourAreaByDetailStrResponse response = JdPostService.convertFourAreaByDetailStr(jdService.getToken() , address.getRegionName() + address.getAddress());
+
+ // 如果获取成功,则将四级地址信息设置到address对象中
+ if (response != null && response.getOpenRpcResult().getSuccess()) {
+ address.setProvinceId(response.getOpenRpcResult().getResult().getProvinceId());
+ address.setProvinceName(response.getOpenRpcResult().getResult().getProvinceName());
+ address.setCityId(response.getOpenRpcResult().getResult().getCityId());
+ address.setCityName(response.getOpenRpcResult().getResult().getCityName());
+ address.setCountyId(response.getOpenRpcResult().getResult().getCountyId());
+ address.setCountyName(response.getOpenRpcResult().getResult().getCountyName());
+ address.setTownId(response.getOpenRpcResult().getResult().getTownId());
+ address.setTownName(response.getOpenRpcResult().getResult().getTownName());
+ }
+
+ // 更新address对象的更新时间
+ address.setUpdateTime(new Date());
+ goodsUserAddressService.update(address);
+ }
+
+ // 检查商品是否在指定地区限制范围内
+ VopGoodsCheckAreaLimitListResponse checkAreaLimitListResponse = JdPostService.checkAreaLimitList(jdService.getToken() , skuId , address.getProvinceId() , address.getCityId() , address.getCountyId() , address.getTownId());
+ if (checkAreaLimitListResponse != null && checkAreaLimitListResponse.getOpenRpcResult().getSuccess()) {
+ // 返回是否在限制范围内
+ if (checkAreaLimitListResponse.getOpenRpcResult().getResult().get(0).getIsAreaRestrict()) {
+ throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "当前地区不可销售该商品!" );
+ }
+
+ }
+
+ // 根据skuId 查询商品售价
+ OpenRpcResult priceResponse = JdPostService.getSellPrice(jdService.getToken(), skuId).getOpenRpcResult();
+
+ if (priceResponse != null && priceResponse.getSuccess()) {
+ if (goodsSpecs.getSalePrice().compareTo(priceResponse.getResult().get(0).getSalePrice()) < 0) {
+ throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "商品已售罄!" );
+ }
+ }
+
+ // 查询库存
+ VopGoodsGetNewStockByIdResponse stockResponse = JdPostService.getNewStockById(jdService.getToken() , Long.valueOf(skuId), address.getProvinceId() , address.getCityId() , address.getCountyId() , address.getTownId());
+
+ if (!checkStock(stockResponse.getOpenRpcResult().getResult().get(0).getStockStateType())) {
+ throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "商品已售罄!" );
+ }
+
+
+ // 提交订单
+ VopOrderSubmitOrderResponse submitOrderResponse = JdPostService.submitOrder(jdService.getToken() , address , orderNo, num , Long.valueOf(skuId) );
+
+ if (submitOrderResponse != null && !submitOrderResponse.getVopOrderRpcResult().getSuccess()) {
+ throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "下单失败!" );
+ }
+ orderGoods.setThirdOrderNo(submitOrderResponse.getVopOrderRpcResult().getResult().getThirdOrderId());
+
+ return orderGoods;
+
+ }
+
+
+ // 校验库存
+ private Boolean checkStock(Integer stock) {
+ if (stock == null ) {
+ return false;
+ }
+ if (stock == 34) {
+ return false;
+ }
+ if (stock == 35) {
+ return false;
+ }
+ if (stock == 36) {
+ return false;
+
+ }
+ if (stock == 99) {
+ return false;
+ }
+ return true;
+ }
}
diff --git a/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java b/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java
index ffb9fd1..5b5f58e 100644
--- a/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java
+++ b/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java
@@ -6,6 +6,7 @@ import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.DateUtil;
+import com.hfkj.common.utils.OrderUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.*;
import com.hfkj.meituan.MeiTuanService;
@@ -14,10 +15,7 @@ import com.hfkj.qianzhu.CinemaService;
import com.hfkj.qianzhu.StarbucksService;
import com.hfkj.service.coupon.BsOrderCouponNoService;
import com.hfkj.service.coupon.BsOrderCouponService;
-import com.hfkj.service.coupon.channel.ChongQingCNPCCouponService;
-import com.hfkj.service.coupon.channel.HuiLianTongCouponService;
-import com.hfkj.service.coupon.channel.PcytCNPCCouponConfig;
-import com.hfkj.service.coupon.channel.PetroConfig;
+import com.hfkj.service.coupon.channel.*;
import com.hfkj.service.goods.*;
import com.hfkj.service.goods.impl.BsOrderStarbucksServiceImpl;
import com.hfkj.service.hlt.HuiLianTongUnionCardService;
@@ -204,14 +202,19 @@ public class OrderPaySuccessService {
orderCouponService.editData(orderCoupon);
} else if (vpd.getSource() == GoodsVpdSourceEnum.type10.getCode()) {
- // 发放卡券
- JSONObject jsonObject = PcytCNPCCouponConfig.getCoupon(couponNo.getOrderNo() , orderCoupon.getUserPhone() , orderCoupon.getGoodsVpdKey());
- if (!jsonObject.getString("code").equals("200")) {
- throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , jsonObject.getString("errMsg"));
- }
- JSONObject object = jsonObject.getJSONObject("data");
+
+ JSONObject objectP = new JSONObject();
+ objectP.put("id" , orderCoupon.getGoodsVpdKey());
+ objectP.put("telephone" , orderCoupon.getUserPhone());
+ objectP.put("tradeId" , couponNo.getOrderNo());
+ objectP.put("time" , new Date().getTime()/1000);
+
+ JSONObject jsonObject = YouTuCouponService.merchantCouponToMember(objectP);
+
+ JSONObject object = jsonObject.getJSONObject("response").getJSONArray("records").getJSONObject(0);
couponNo.setExpireTime(vpd.getSalesEndTime());
couponNo.setDeliverTime(new Date());
+ couponNo.setChannelOrderNo(object.getString("recordId"));
couponNo.setGoodsVpdSourceCouNo(object.getString("couponCode"));
couponNo.setStatus(OrderCouponNoStatusEnum.status2.getCode());
orderCouponNoService.editData(couponNo);
diff --git a/service/src/main/java/com/hfkj/service/pay/huift/config/HuiftConfig.java b/service/src/main/java/com/hfkj/service/pay/huift/config/HuiftConfig.java
index 5d5339f..9bd894d 100644
--- a/service/src/main/java/com/hfkj/service/pay/huift/config/HuiftConfig.java
+++ b/service/src/main/java/com/hfkj/service/pay/huift/config/HuiftConfig.java
@@ -24,6 +24,9 @@ public class HuiftConfig {
public final static String shopcode95 = "b4b121b6-ec5c-44e1-a020-d2f21e754b55";
public final static String signSecret95 = "4AA9E79115848B797B53FBD830B402F4";
+ public final static String shopcode01 = "e9b60994-e5ed-4baf-b097-92e09c0a8a8a";
+ public final static String signSecret01 = "277E7873C1CDD59ED533BCE65FDD143E";
+
/**
* 参数排序
* @param param
diff --git a/service/src/main/java/com/hfkj/sysenum/order/OrderChildProductTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/order/OrderChildProductTypeEnum.java
index d68457e..f815034 100644
--- a/service/src/main/java/com/hfkj/sysenum/order/OrderChildProductTypeEnum.java
+++ b/service/src/main/java/com/hfkj/sysenum/order/OrderChildProductTypeEnum.java
@@ -16,6 +16,7 @@ public enum OrderChildProductTypeEnum {
type3(3, "千猪电影票"),
type4(4, "千猪星巴克"),
type5(5, "美团"),
+ type6(6, "京东"),
;
private int code;
diff --git a/service/src/main/java/com/hfkj/yushang/YuShangService.java b/service/src/main/java/com/hfkj/yushang/YuShangService.java
index 9b8f5a5..6f9e853 100644
--- a/service/src/main/java/com/hfkj/yushang/YuShangService.java
+++ b/service/src/main/java/com/hfkj/yushang/YuShangService.java
@@ -71,8 +71,7 @@ public class YuShangService {
param.put("AppKey", CommonSysConst.getSysConfig().getYuShangAppKey());
param.put("timestamp", new Date().getTime());
param.put("CustomerIP", "127.0.0.1");
- param.put("sign", MD5Util.encode(GenerateSign.paramSortYuShang(param,CommonSysConst.getSysConfig().getYuShangAppSecret()).getBytes()).toLowerCase());
-
+ param.put("sign", MD5Util.encode(GenerateSign.paramSortYuShang(param,CommonSysConst.getSysConfig().getYuShangAppSecret()).getBytes()));
log.info("请求接口:" + postUrl);
log.info("请求参数:" + JSONObject.toJSONString(param));
diff --git a/service/src/main/resources/dev/commonConfig.properties b/service/src/main/resources/dev/commonConfig.properties
index 1b6df48..b492612 100644
--- a/service/src/main/resources/dev/commonConfig.properties
+++ b/service/src/main/resources/dev/commonConfig.properties
@@ -78,9 +78,9 @@ 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
-yuShangAppKey=211394653
-yuShangAppSecret=cyQpQKMaGUG186iEZRt1uQ==
-yuShangPostUrl=http://mbsmemberwebapi.test.onfishes.com/
+yuShangAppKey=211395334
+yuShangAppSecret=VxNTJua4FkmRVgIm8HgCSg==
+yuShangPostUrl=http://mbapiq.mbs.scyshy.com/
haiOilPostUrl = https://test-oil.dctpay.com
haiOilAppid = hf7356c71fb97ab0
@@ -90,3 +90,7 @@ haiOilAppSecret = 8aef995ff71485dc19b36e35f04c4016
jDPostUrl = https://test-oil.dctpay.com
jDAppKey = C4FF710550C43FE76D4114E1C9C6A0C9
jDAppSecret = 873bcbc1d8d64f36832270c2ff59c194
+
+ytAccessKey=9326673207264334
+ytSecretKey=VCLXFV09BNZNMERR9F21KI3LC7L101YY
+ytPostUrl=https://youtu.95504.net/v4
diff --git a/service/src/main/resources/prod/commonConfig.properties b/service/src/main/resources/prod/commonConfig.properties
index 0f63b39..06efae2 100644
--- a/service/src/main/resources/prod/commonConfig.properties
+++ b/service/src/main/resources/prod/commonConfig.properties
@@ -77,11 +77,15 @@ HgApiKey=3fd74e7c16b04681a0f481c5bc0a96d3
HgMemberId=1622808562621276161
HgPostUrl=http://113.250.49.100:8088/recharge/
-yuShangAppKey=211394653
-yuShangAppSecret=cyQpQKMaGUG186iEZRt1uQ==
-yuShangPostUrl=http://mbsmemberwebapi.test.onfishes.com/
+yuShangAppKey=211395334
+yuShangAppSecret=VxNTJua4FkmRVgIm8HgCSg==
+yuShangPostUrl=http://mbapiq.mbs.scyshy.com/
haiOilPostUrl = https://oil.dctpay.com
haiOilAppid = hf166f4b2ed75e71
-haiOilAppSecret = 5a11778cfdd4962282a359397bf4f86b
\ No newline at end of file
+haiOilAppSecret = 5a11778cfdd4962282a359397bf4f86b
+
+ytAccessKey=9326673207264334
+ytSecretKey=VCLXFV09BNZNMERR9F21KI3LC7L101YY
+ytPostUrl= https://sichuan.95504.net/v4
\ No newline at end of file
diff --git a/user/lib/open-api-sdk-2.0-jd.jar b/user/lib/open-api-sdk-2.0-jd.jar
new file mode 100644
index 0000000..6c1b46c
Binary files /dev/null and b/user/lib/open-api-sdk-2.0-jd.jar differ
diff --git a/user/lib/open-platform-sdk-1.0.21.jar b/user/lib/open-platform-sdk-1.0.21.jar
new file mode 100644
index 0000000..0cbe24f
Binary files /dev/null and b/user/lib/open-platform-sdk-1.0.21.jar differ
diff --git a/user/pom.xml b/user/pom.xml
index 86a8a25..97d4dda 100644
--- a/user/pom.xml
+++ b/user/pom.xml
@@ -18,6 +18,20 @@
service
PACKT-SNAPSHOT
+
+ meituan.skd
+ meituan-open-sdk
+ system
+ 1.0.21
+ ${basedir}/lib/open-platform-sdk-1.0.21.jar
+
+
+ jd.skd
+ jd-open-sdk
+ system
+ 2.0
+ ${basedir}/lib/open-api-sdk-2.0-jd.jar
+
@@ -26,6 +40,13 @@
src/main/resources/${env}
false
+
+ ${basedir}/lib
+ BOOT-INF/lib/
+
+ **/*.jar
+
+
diff --git a/user/src/main/java/com/user/controller/SecUserController.java b/user/src/main/java/com/user/controller/SecUserController.java
index 4157c7b..42229ab 100644
--- a/user/src/main/java/com/user/controller/SecUserController.java
+++ b/user/src/main/java/com/user/controller/SecUserController.java
@@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
@@ -107,5 +108,46 @@ public class SecUserController {
}
+ @RequestMapping(value="/sendUserPass",method = RequestMethod.POST)
+ @ResponseBody
+ @ApiOperation(value = "修改用户密码")
+ public ResponseData sendUserPass(@RequestBody String reqBody , HttpServletRequest request) throws Exception{
+ try {
+
+ JSONObject jsonObject = JSONObject.parseObject(reqBody);
+ SecUserSessionObject session = userCenter.getSessionModel(SecUserSessionObject.class);
+
+ Long userId = session.getAccount().getId(); //用户Id
+ String oldPassword = jsonObject.getString("oldPassword"); //旧密码
+ String password = jsonObject.getString("newPassword"); //密码
+
+ if(userId == null || StringUtils.isBlank(oldPassword) || StringUtils.isBlank(password)) {
+ log.error("BaseMemberController --> sendUserPass() error!","参数错误");
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
+ }
+
+ //查询用户
+ SecUser secUser = secUserService.getDetail(userId);
+ if(secUser == null){
+ log.error("BaseMemberController --> sendUserPass() error!","");
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "用户不存在");
+ }
+ if(!secUser.getPassword().equals(MD5Util.encode(oldPassword.getBytes()))) {
+ log.error("BaseMemberController --> sendUserPass() error!","旧密码不一致");
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "旧密码不一致");
+ }
+ secUser.setPassword(MD5Util.encode(password.getBytes()));
+ //修改
+ secUserService.editUser(secUser);
+ userCenter.remove(request);
+ return ResponseMsgUtil.success("修改密码成功");
+
+ } catch (Exception e) {
+ log.error("getUserByTelephone",e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
+
}