|
@@ -18,6 +18,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.ym.mec.biz.dal.dto.ComplementGoodsDto;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.mapper.GoodsSubMapper;
|
|
|
+import com.ym.mec.biz.dal.page.MusicGroupShippingAddressQueryInfo;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.api.CommonResult;
|
|
|
import com.ym.mec.common.dto.OrderCreate;
|
|
@@ -81,6 +82,8 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
|
|
|
private GoodsSubService goodsSubService;
|
|
|
@Autowired
|
|
|
private MallFeignService mallFeignService;
|
|
|
+ @Autowired
|
|
|
+ private MusicGroupShippingAddressService musicGroupShippingAddressService;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Integer, SellOrder> getDAO() {
|
|
@@ -619,6 +622,26 @@ public class SellOrderServiceImpl extends BaseServiceImpl<Integer, SellOrder> im
|
|
|
mallOrder.setPlatformType("STUDENT");
|
|
|
mallOrder.setSourceType(1);
|
|
|
|
|
|
+ // 乐团学生报名默认收货地址
|
|
|
+ if (studentPaymentOrder.getType() == OrderTypeEnum.APPLY && StringUtils.isNotBlank(mallOrder.getOrchestraId())) {
|
|
|
+
|
|
|
+ // 查询乐团默认收货地址
|
|
|
+ MusicGroupShippingAddressQueryInfo queryInfo = new MusicGroupShippingAddressQueryInfo();
|
|
|
+ queryInfo.setMusicGroupId(mallOrder.getOrchestraId());
|
|
|
+ queryInfo.setPage(1);
|
|
|
+ queryInfo.setRows(10);
|
|
|
+ List<MusicGroupShippingAddress> rows = musicGroupShippingAddressService.queryPage(queryInfo).getRows();
|
|
|
+ if (CollectionUtils.isNotEmpty(rows)) {
|
|
|
+ MusicGroupShippingAddress address = rows.get(0);
|
|
|
+ mallOrder.setReceiverName(address.getConsigneeName());
|
|
|
+ mallOrder.setReceiverPhone(address.getMobile());
|
|
|
+ mallOrder.setReceiverProvince(address.getRegionProvince());
|
|
|
+ mallOrder.setReceiverCity(address.getRegionCity());
|
|
|
+ mallOrder.setReceiverRegion(address.getRegionCounty());
|
|
|
+ mallOrder.setReceiverDetailAddress(address.getDetailAddress());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
CommonResult<Boolean> result = mallFeignService.productOrderCreate(mallOrder);
|
|
|
if (result.getCode() != 200) {
|
|
|
throw new BizException("同步商城订单失败",result.getMessage());
|