|
@@ -10,7 +10,7 @@
|
|
left join asso_product_category as apc on p.id =product_id
|
|
left join asso_product_category as apc on p.id =product_id
|
|
left join person as pe on p.create_id =pe.uuid
|
|
left join person as pe on p.create_id =pe.uuid
|
|
<where>
|
|
<where>
|
|
- p.if_hot = true and p.search_condition IS NOT NULL and p.search_condition != ''
|
|
|
|
|
|
+ p.if_hot = true and p.search_condition IS NOT NULL and p.search_condition != ''
|
|
<if test="getProductDTO.name!=null and getProductDTO.name!=''">
|
|
<if test="getProductDTO.name!=null and getProductDTO.name!=''">
|
|
and p.name like CONCAT('%',#{getProductDTO.name},'%')
|
|
and p.name like CONCAT('%',#{getProductDTO.name},'%')
|
|
</if>
|
|
</if>
|
|
@@ -36,12 +36,10 @@
|
|
<if test="getProductDTO.bestSellingBrand!=null and getProductDTO.bestSellingBrand!=''">
|
|
<if test="getProductDTO.bestSellingBrand!=null and getProductDTO.bestSellingBrand!=''">
|
|
and p.best_selling_brand like CONCAT('%',#{getProductDTO.bestSellingBrand},'%')
|
|
and p.best_selling_brand like CONCAT('%',#{getProductDTO.bestSellingBrand},'%')
|
|
</if>
|
|
</if>
|
|
- order by p.create_time desc
|
|
|
|
|
|
+ order by p.create_time desc,p.id desc
|
|
<if test="getProductDTO.current!=null and getProductDTO.size!=null">
|
|
<if test="getProductDTO.current!=null and getProductDTO.size!=null">
|
|
limit ${(getProductDTO.current -1)*getProductDTO.size},${getProductDTO.size}
|
|
limit ${(getProductDTO.current -1)*getProductDTO.size},${getProductDTO.size}
|
|
</if>
|
|
</if>
|
|
-
|
|
|
|
-
|
|
|
|
</where>
|
|
</where>
|
|
|
|
|
|
</select>
|
|
</select>
|
|
@@ -52,7 +50,7 @@
|
|
asso_product_category as apc on p.id =product_id
|
|
asso_product_category as apc on p.id =product_id
|
|
left join person as pe on p.create_id =pe.uuid
|
|
left join person as pe on p.create_id =pe.uuid
|
|
<where>
|
|
<where>
|
|
- p.if_hot = true and p.search_condition IS NOT NULL and p.search_condition != ''
|
|
|
|
|
|
+ p.if_hot = true and p.search_condition IS NOT NULL and p.search_condition != ''
|
|
<if test="getProductDTO.name!=null and getProductDTO.name!=''">
|
|
<if test="getProductDTO.name!=null and getProductDTO.name!=''">
|
|
and p.name like CONCAT('%',#{getProductDTO.name},'%')
|
|
and p.name like CONCAT('%',#{getProductDTO.name},'%')
|
|
</if>
|
|
</if>
|
|
@@ -93,14 +91,15 @@
|
|
left join product as p on app.product_id =p.id
|
|
left join product as p on app.product_id =p.id
|
|
left join person as pe on p.create_id =pe.uuid
|
|
left join person as pe on p.create_id =pe.uuid
|
|
<where>
|
|
<where>
|
|
- app.person_uuid = #{getProductDTO.personUuid}
|
|
|
|
|
|
+ app.person_uuid = #{getProductDTO.personUuid}
|
|
<if test="getProductDTO.name!=null and getProductDTO.name!=''">
|
|
<if test="getProductDTO.name!=null and getProductDTO.name!=''">
|
|
and p.name like CONCAT('%',#{getProductDTO.name},'%')
|
|
and p.name like CONCAT('%',#{getProductDTO.name},'%')
|
|
</if>
|
|
</if>
|
|
|
|
|
|
<if test="getProductDTO.concernTypes!=null and getProductDTO.concernTypes.size()>0">
|
|
<if test="getProductDTO.concernTypes!=null and getProductDTO.concernTypes.size()>0">
|
|
and app.concern_type in
|
|
and app.concern_type in
|
|
- <foreach collection="getProductDTO.concernTypes" index="index" item="item" open="(" separator="," close=") ">
|
|
|
|
|
|
+ <foreach collection="getProductDTO.concernTypes" index="index" item="item" open="(" separator=","
|
|
|
|
+ close=") ">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
@@ -145,14 +144,15 @@
|
|
left join product as p on app.product_id =p.id
|
|
left join product as p on app.product_id =p.id
|
|
left join person as pe on p.create_id =pe.uuid
|
|
left join person as pe on p.create_id =pe.uuid
|
|
<where>
|
|
<where>
|
|
- app.person_uuid = #{getProductDTO.personUuid}
|
|
|
|
|
|
+ app.person_uuid = #{getProductDTO.personUuid}
|
|
<if test="getProductDTO.name!=null and getProductDTO.name!=''">
|
|
<if test="getProductDTO.name!=null and getProductDTO.name!=''">
|
|
and p.name like CONCAT('%',#{getProductDTO.name},'%')
|
|
and p.name like CONCAT('%',#{getProductDTO.name},'%')
|
|
</if>
|
|
</if>
|
|
|
|
|
|
<if test="getProductDTO.concernTypes!=null and getProductDTO.concernTypes.size()>0">
|
|
<if test="getProductDTO.concernTypes!=null and getProductDTO.concernTypes.size()>0">
|
|
and app.concern_type in
|
|
and app.concern_type in
|
|
- <foreach collection="getProductDTO.concernTypes" index="index" item="item" open="(" separator="," close=") ">
|
|
|
|
|
|
+ <foreach collection="getProductDTO.concernTypes" index="index" item="item" open="(" separator=","
|
|
|
|
+ close=") ">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|