Merge remote-tracking branch 'origin/2.0-dev' into 2.0-dev

new-dev
袁野 1 year ago
parent 14320ddc7b
commit 632a92173f
  1. 22
      hai-order/src/main/java/com/web/controller/OrderController.java
  2. 2
      hai-service/src/main/java/com/hai/config/CommonSysConfig.java
  3. 1
      hai-service/src/main/java/com/hai/group/GroupCodeService.java
  4. 5
      hai-service/src/main/java/com/hai/group/impl/GroupCodeServiceImpl.java
  5. 19
      hai-service/src/main/java/com/hai/model/GoodsOrderModel.java
  6. 2
      hai-service/src/main/resources/dev/commonConfig.properties

@ -15,6 +15,8 @@ import com.hai.enum_type.UserObjectTypeEnum;
import com.hai.goods.service.DeliveryAddressService; import com.hai.goods.service.DeliveryAddressService;
import com.hai.goods.service.GoodsLogisticsService; import com.hai.goods.service.GoodsLogisticsService;
import com.hai.goods.service.GoodsOrderExtService; import com.hai.goods.service.GoodsOrderExtService;
import com.hai.group.GroupCodeService;
import com.hai.group.GroupService;
import com.hai.model.GoodsOrderModel; import com.hai.model.GoodsOrderModel;
import com.hai.model.HighUserModel; import com.hai.model.HighUserModel;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
@ -77,6 +79,13 @@ public class OrderController {
@Resource @Resource
private HighUserService highUserService; private HighUserService highUserService;
@Resource
private GroupService groupService;
@Resource
private GroupCodeService groupCodeService;
@RequestMapping(value="/create",method = RequestMethod.POST) @RequestMapping(value="/create",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "创建订单") @ApiOperation(value = "创建订单")
@ -299,6 +308,19 @@ public class OrderController {
goodsOrderModel.setGoodsOrder(order); goodsOrderModel.setGoodsOrder(order);
goodsOrderModel.setGoodsDeliveryAddress(deliveryAddress); goodsOrderModel.setGoodsDeliveryAddress(deliveryAddress);
HighGroupOrder highGroupOrder = groupCodeService.findGroupOrder(highOrder.getOrderNo());
JSONObject object = groupService.getGroupContent(highGroupOrder.getGroupId());
if (object.getString("return_code").equals("000000")) {
goodsOrderModel.setGroupData(object.getJSONObject("return_data"));
}
Map<String , Object> map = new HashMap<>();
map.put("orderId" , highOrder.getId());
HighGroupCode highGroupCode = groupCodeService.findGroupCode(map);
goodsOrderModel.setHighGroupCode(highGroupCode);
return ResponseMsgUtil.success(goodsOrderModel); return ResponseMsgUtil.success(goodsOrderModel);

@ -142,4 +142,6 @@ public class CommonSysConfig {
private String diandianwAppid; private String diandianwAppid;
private String diandianwAppSecret; private String diandianwAppSecret;
private String groupCode;
} }

@ -50,6 +50,7 @@ public interface GroupCodeService {
*/ */
HighGroupCode findGroupCode(Map<String , Object> map); HighGroupCode findGroupCode(Map<String , Object> map);
/** /**
* @Author Sum1Dream * @Author Sum1Dream
* @Name findGroupCodeList * @Name findGroupCodeList

@ -60,6 +60,9 @@ public class GroupCodeServiceImpl implements GroupCodeService {
if (MapUtils.getLong(map, "storeId") != null) { if (MapUtils.getLong(map, "storeId") != null) {
criteria.andSroreIdEqualTo(MapUtils.getLong(map, "storeId")); criteria.andSroreIdEqualTo(MapUtils.getLong(map, "storeId"));
} }
if (MapUtils.getLong(map, "orderId") != null) {
criteria.andOrderIdEqualTo(MapUtils.getLong(map, "orderId"));
}
List<HighGroupCode> list = highGroupCodeMapper.selectByExample(example); List<HighGroupCode> list = highGroupCodeMapper.selectByExample(example);
@ -110,7 +113,7 @@ public class GroupCodeServiceImpl implements GroupCodeService {
// 生成二维码 // 生成二维码
String qrCodeImg = highGroupCode.getGroupCode() +".png"; String qrCodeImg = highGroupCode.getGroupCode() +".png";
String qrCodeUrl = CommonSysConst.getSysConfig().getFileUrl() + "/groupCode/" + qrCodeImg; String qrCodeUrl = CommonSysConst.getSysConfig().getFileUrl() + "/groupCode/" + qrCodeImg;
QRCodeGenerator.generateQRCodeImage(highGroupCode.getGroupCode(), 350, 350, qrCodeUrl); QRCodeGenerator.generateQRCodeImage(CommonSysConst.getSysConfig().getGroupCode() + highGroupCode.getGroupCode(), 350, 350, qrCodeUrl);
highGroupCode.setCodeImgUrl(qrCodeUrl); highGroupCode.setCodeImgUrl(qrCodeUrl);
updateGroupCode(highGroupCode); updateGroupCode(highGroupCode);

@ -1,28 +1,21 @@
package com.hai.model; package com.hai.model;
import com.alibaba.fastjson.JSONObject;
import com.hai.entity.GoodsDeliveryAddress; import com.hai.entity.GoodsDeliveryAddress;
import com.hai.entity.GoodsOrder; import com.hai.entity.GoodsOrder;
import com.hai.entity.HighGroupCode;
import com.hai.entity.HighOrder; import com.hai.entity.HighOrder;
import lombok.Data;
@Data
public class GoodsOrderModel extends HighOrder { public class GoodsOrderModel extends HighOrder {
GoodsOrder goodsOrder; GoodsOrder goodsOrder;
GoodsDeliveryAddress goodsDeliveryAddress; GoodsDeliveryAddress goodsDeliveryAddress;
public GoodsOrder getGoodsOrder() { JSONObject groupData;
return goodsOrder;
}
public void setGoodsOrder(GoodsOrder goodsOrder) { HighGroupCode highGroupCode;
this.goodsOrder = goodsOrder;
}
public GoodsDeliveryAddress getGoodsDeliveryAddress() {
return goodsDeliveryAddress;
}
public void setGoodsDeliveryAddress(GoodsDeliveryAddress goodsDeliveryAddress) {
this.goodsDeliveryAddress = goodsDeliveryAddress;
}
} }

@ -143,3 +143,5 @@ blxPostUrl=https://vertical-formats-gateway.blx.bodata.cn:18443
diandianwPostUrl=http://www.diandianw.cn/youdianyou/ diandianwPostUrl=http://www.diandianw.cn/youdianyou/
diandianwAppid=1016145002rmz7dkti3f5oqh1razswc0 diandianwAppid=1016145002rmz7dkti3f5oqh1razswc0
diandianwAppSecret=msk48q5jinmpsfdgpcyryx6lhkoiii4s diandianwAppSecret=msk48q5jinmpsfdgpcyryx6lhkoiii4s
groupCode = https://gratia-pay.dctpay.com/cweb?accountId=0001&key=

Loading…
Cancel
Save