Browse Source

👎 到处订单列表

sj
Loki 2 years ago
parent
commit
8948581e47
  1. 6
      zsw-bxg/src/main/java/co/yixiang/app/modules/shop/rest/BxgIndexController.java
  2. 14
      zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java

6
zsw-bxg/src/main/java/co/yixiang/app/modules/shop/rest/BxgIndexController.java

@ -119,17 +119,17 @@ public class BxgIndexController {
.bargainList(yxStoreBargainService.getList(1,10))//砍价活动列表 .bargainList(yxStoreBargainService.getList(1,10))//砍价活动列表
.seckillConfigVo(yxStoreSeckillService.getStoreSeckil())//秒杀配置 .seckillConfigVo(yxStoreSeckillService.getStoreSeckil())//秒杀配置
.yxStoreSeckillQueryVoList(yxStoreSeckillService.getIndexList())//秒杀商品 .yxStoreSeckillQueryVoList(yxStoreSeckillService.getIndexList())//秒杀商品
.bastList(storeProductService.getList(1,10, ProductEnum.TYPE_1.getValue())) //精品推荐 .bastList(storeProductService.getList(1,100, ProductEnum.TYPE_1.getValue())) //精品推荐
.evaluationList(evaluationService.getList(1,5)) .evaluationList(evaluationService.getList(1,5))
.benefit(storeProductService.getList(1,100,ProductEnum.TYPE_4.getValue())) //猜你喜欢 .benefit(storeProductService.getList(1,100,ProductEnum.TYPE_4.getValue())) //猜你喜欢
.combinationList(storeCombinationService.getList(1,8).getStoreCombinationQueryVos()) .combinationList(storeCombinationService.getList(1,8).getStoreCombinationQueryVos())
.firstList(storeProductService.getList(1,6,ProductEnum.TYPE_3.getValue())) //首发新品 .firstList(storeProductService.getList(1,10,ProductEnum.TYPE_3.getValue())) //首发新品
.likeInfo(storeProductService.getList(1,80,ProductEnum.TYPE_2.getValue())) //热门榜单 .likeInfo(storeProductService.getList(1,80,ProductEnum.TYPE_2.getValue())) //热门榜单
.mapKey(systemConfigService.getData(ShopKeyUtils.getTengXunMapKey())) .mapKey(systemConfigService.getData(ShopKeyUtils.getTengXunMapKey()))
//菜单 //菜单
.menus(systemGroupDataService.getDatas(ShopConstants.ZSW_HOME_MENUS)) .menus(systemGroupDataService.getDatas(ShopConstants.ZSW_HOME_MENUS))
.roll(systemGroupDataService.getDatas(ShopConstants.ZSW_HOME_ROLL_NEWS)) .roll(systemGroupDataService.getDatas(ShopConstants.ZSW_HOME_ROLL_NEWS))
.seckillList(storeSeckillService.getList(1, 4)) .seckillList(storeSeckillService.getList(1, 6))
.liveList(wechatLiveService.getList(1,4,0)) .liveList(wechatLiveService.getList(1,4,0))
.build(); .build();
return ApiResult.ok(indexVo); return ApiResult.ok(indexVo);

14
zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java

@ -14,6 +14,7 @@ import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import cn.iocoder.yudao.framework.common.exception.YshopException; import cn.iocoder.yudao.framework.common.exception.YshopException;
import co.yixiang.api.BusinessException; import co.yixiang.api.BusinessException;
import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.service.impl.BaseServiceImpl;
@ -2335,6 +2336,19 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("订单号", yxStoreOrder.getOrderId()); map.put("订单号", yxStoreOrder.getOrderId());
map.put("用户id", yxStoreOrder.getUid()); map.put("用户id", yxStoreOrder.getUid());
StringBuilder pname = new StringBuilder();
yxStoreOrder.getCartInfoList().forEach(c->{
Object info = c.getCartInfoMap().get("productInfo");
YxStoreProductQueryVo vo = JSONUtil.toBean(info.toString(), YxStoreProductQueryVo.class);
if (ObjectUtil.isNotEmpty(vo)) {
pname
.append(ObjectUtil.isNotEmpty(vo.getStoreName()) ? vo.getStoreName() : "")
.append(":")
.append(ObjectUtil.isNotEmpty(vo.getAttrInfo()) ? vo.getAttrInfo().getSku() : "")
.append(" ,\r\n");
}
});
map.put("商品名称",pname);
map.put("用户姓名", yxStoreOrder.getRealName()); map.put("用户姓名", yxStoreOrder.getRealName());
map.put("用户电话", yxStoreOrder.getUserPhone()); map.put("用户电话", yxStoreOrder.getUserPhone());
map.put("详细地址", yxStoreOrder.getUserAddress()); map.put("详细地址", yxStoreOrder.getUserAddress());

Loading…
Cancel
Save