球杆商品关联项名称
This commit is contained in:
parent
544cb4b3ff
commit
5352019d63
@ -70,4 +70,19 @@ public class CueProductVO extends BaseVO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "状态:0-禁用,1-启用")
|
@Schema(description = "状态:0-禁用,1-启用")
|
||||||
private Integer productStatus;
|
private Integer productStatus;
|
||||||
|
/**
|
||||||
|
* 关联的品牌名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "关联的品牌名称")
|
||||||
|
private String brandName;
|
||||||
|
/**
|
||||||
|
* 关联的系列名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "关联的系列名称")
|
||||||
|
private String seriesName;
|
||||||
|
/**
|
||||||
|
* 关联的球杆类型名称
|
||||||
|
*/
|
||||||
|
@Schema(description = "关联的球杆类型名称")
|
||||||
|
private String typeName;
|
||||||
}
|
}
|
@ -17,6 +17,9 @@
|
|||||||
<result property="productStatus" column="product_status"/>
|
<result property="productStatus" column="product_status"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="brandName" column="brand_name"/>
|
||||||
|
<result property="seriesName" column="series_name"/>
|
||||||
|
<result property="typeName" column="type_name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Vo_Column_List">
|
<sql id="Vo_Column_List">
|
||||||
@ -25,30 +28,48 @@
|
|||||||
|
|
||||||
<select id="list" resultMap="cueProductVOMap">
|
<select id="list" resultMap="cueProductVOMap">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="Vo_Column_List" />
|
cp.product_id,
|
||||||
|
cp.brand_id,
|
||||||
|
cp.series_id,
|
||||||
|
cp.type_id,
|
||||||
|
cp.product_name,
|
||||||
|
cp.product_description,
|
||||||
|
cp.product_images,
|
||||||
|
cp.product_price,
|
||||||
|
cp.product_seq,
|
||||||
|
cp.product_status,
|
||||||
|
cp.deleted,
|
||||||
|
cp.create_time,
|
||||||
|
cp.update_time,
|
||||||
|
cb.brand_name,
|
||||||
|
cs.series_name,
|
||||||
|
ct.type_name
|
||||||
FROM
|
FROM
|
||||||
cue_product
|
cue_product AS cp
|
||||||
|
LEFT JOIN cue_brand AS cb ON cp.brand_id = cb.brand_id
|
||||||
|
LEFT JOIN cue_series AS cs ON cp.series_id = cs.series_id
|
||||||
|
LEFT JOIN cue_type AS ct ON cp.type_id = ct.type_id
|
||||||
<where>
|
<where>
|
||||||
deleted = 0
|
deleted = 0
|
||||||
<if test="dto.productName != null and dto.productName != ''">
|
<if test="dto.productName != null and dto.productName != ''">
|
||||||
AND product_name LIKE CONCAT('%', #{dto.productName}, '%')
|
AND cp.product_name LIKE CONCAT('%', #{dto.productName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.productStatus != null">
|
<if test="dto.productStatus != null">
|
||||||
AND product_status = #{dto.productStatus}
|
AND cp.product_status = #{dto.productStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.brandId != null">
|
<if test="dto.brandId != null">
|
||||||
AND brand_id = #{dto.brandId}
|
AND cp.brand_id = #{dto.brandId}
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.typeId != null">
|
<if test="dto.typeId != null">
|
||||||
AND type_id = #{dto.typeId}
|
AND cp.type_id = #{dto.typeId}
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.seriesId != null">
|
<if test="dto.seriesId != null">
|
||||||
AND series_id = #{dto.seriesId}
|
AND cp.series_id = #{dto.seriesId}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
product_seq ASC,
|
cp.product_seq ASC,
|
||||||
product_id DESC
|
cp.product_id DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getById" resultMap="cueProductVOMap">
|
<select id="getById" resultMap="cueProductVOMap">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user