订单列表增加店铺名称

This commit is contained in:
2024-08-29 10:26:58 +08:00
parent e70d6b27b9
commit 01c6e5753c
2 changed files with 7 additions and 3 deletions

View File

@@ -101,12 +101,14 @@ public class TbOrderInfo implements Serializable {
private List<TbOrderDetail> detailList;
private String winnnerNo;
private String isWinner;
private String shopName;
//根据状态返回 需付款 已付款 未付款 已退
private String description;
public void setDescription() {
public void setDescription(String shopName) {
this.shopName = shopName;
switch (status) {
case "closed":
this.description = "已付款";

View File

@@ -220,9 +220,11 @@ public class OrderService {
// }
PageHelper.startPage(page, size);
List<TbOrderInfo> tbOrderInfos = orderInfoMapper.selectByUserId(userId, status);
String shopName = "";
for (TbOrderInfo orderInfo : tbOrderInfos) {
orderInfo.setDescription();
TbShopInfo tbShopInfo = tbShopInfoMapper.selectByPrimaryKey(Integer.valueOf(orderInfo.getShopId()));
shopName = tbShopInfo.getShopName();
orderInfo.setDescription(shopName);
List<TbOrderDetail> list = tbOrderDetailMapper.selectAllByOrderId(orderInfo.getId());
int num = 0;
for (TbOrderDetail orderDetail : list) {