feat(order): 添加订单实体扩展字段和用户关联查询
- 在GltTicketOrder实体中添加address、province、city、region等地址相关字段 - 在GltTicketOrder实体中添加nickname、phone、avatar等用户信息字段 - 所有新增字段均使用@TableField(exist = false)注解标记为非数据库字段 - 更新GltTicketOrderMapper.xml中的关联
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.gxwebsoft.glt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@@ -43,8 +44,21 @@ public class GltTicketOrder implements Serializable {
|
||||
private Integer addressId;
|
||||
|
||||
@Schema(description = "收货地址")
|
||||
@TableField(exist = false)
|
||||
private String address;
|
||||
|
||||
@Schema(description = "省")
|
||||
@TableField(exist = false)
|
||||
private String province;
|
||||
|
||||
@Schema(description = "市")
|
||||
@TableField(exist = false)
|
||||
private String city;
|
||||
|
||||
@Schema(description = "区")
|
||||
@TableField(exist = false)
|
||||
private String region;
|
||||
|
||||
@Schema(description = "买家留言")
|
||||
private String buyerRemarks;
|
||||
|
||||
@@ -61,6 +75,18 @@ public class GltTicketOrder implements Serializable {
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "昵称")
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "手机号")
|
||||
@TableField(exist = false)
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "头像")
|
||||
@TableField(exist = false)
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
SELECT a.*, u.nickname, u.phone, u.avatar
|
||||
FROM glt_ticket_order a
|
||||
LEFT JOIN gxwebsoft_core.sys_user u ON a.user_id = u.user_id
|
||||
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
|
||||
Reference in New Issue
Block a user