新增:买家备注、商家备注字段
This commit is contained in:
@@ -40,6 +40,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ public class ShopOrder implements Serializable {
|
|||||||
|
|
||||||
private String addressLng;
|
private String addressLng;
|
||||||
|
|
||||||
|
@Schema(description = "买家备注")
|
||||||
|
private String buyerRemarks;
|
||||||
|
|
||||||
@Schema(description = "自提店铺id")
|
@Schema(description = "自提店铺id")
|
||||||
private Integer selfTakeMerchantId;
|
private Integer selfTakeMerchantId;
|
||||||
|
|
||||||
@@ -207,6 +210,9 @@ public class ShopOrder implements Serializable {
|
|||||||
@Schema(description = "订单是否已结算(0未结算 1已结算)")
|
@Schema(description = "订单是否已结算(0未结算 1已结算)")
|
||||||
private Integer isSettled;
|
private Integer isSettled;
|
||||||
|
|
||||||
|
@Schema(description = "商户备注")
|
||||||
|
private String merchantRemarks;
|
||||||
|
|
||||||
@Schema(description = "系统版本号 0当前版本 value=其他版本")
|
@Schema(description = "系统版本号 0当前版本 value=其他版本")
|
||||||
private Integer version;
|
private Integer version;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<!-- 关联查询sql -->
|
<!-- 关联查询sql -->
|
||||||
<sql id="selectSql">
|
<sql id="selectSql">
|
||||||
SELECT a.*,b.nickname,b.real_name as realName, b.avatar,b.phone as phone
|
SELECT a.*,b.nickname, b.avatar,b.phone as phone
|
||||||
FROM shop_order a
|
FROM shop_order a
|
||||||
LEFT JOIN gxwebsoft_core.sys_user b ON a.user_id = b.user_id
|
LEFT JOIN gxwebsoft_core.sys_user b ON a.user_id = b.user_id
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -91,6 +91,12 @@ import com.gxwebsoft.common.core.service.PaymentCacheService;
|
|||||||
final Map<Integer, List<ShopOrderGoods>> collect = goodsList.stream().collect(Collectors.groupingBy(ShopOrderGoods::getOrderId));
|
final Map<Integer, List<ShopOrderGoods>> collect = goodsList.stream().collect(Collectors.groupingBy(ShopOrderGoods::getOrderId));
|
||||||
list.forEach(d -> {
|
list.forEach(d -> {
|
||||||
d.setOrderGoods(collect.get(d.getOrderId()));
|
d.setOrderGoods(collect.get(d.getOrderId()));
|
||||||
|
|
||||||
|
// 确保 realName 字段有值,优先使用关联查询的结果,如果为空则使用订单表中的 realName
|
||||||
|
if (StrUtil.isBlank(d.getRealName())) {
|
||||||
|
log.debug("订单 {} 的 realName 为空,尝试从其他字段获取", d.getOrderId());
|
||||||
|
// 可以根据业务需求添加其他逻辑,比如从 nickname 或其他字段获取
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return new PageResult<>(list, page.getTotal());
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
|||||||
Reference in New Issue
Block a user