|
|
|
@ -13,7 +13,7 @@ |
|
|
|
contract_status as contractStatus,contractual_start_time as contractualStartTime, contractualtime_end_time as contractualtimeEndTime |
|
|
|
</sql> |
|
|
|
<!-- simple columns--> |
|
|
|
<sql id="scols">id,username,createtime,goods_status as goodsStatus</sql> |
|
|
|
<sql id="scols">id,username,createtime</sql> |
|
|
|
<sql id="tbName">goods</sql> |
|
|
|
|
|
|
|
<!-- 统计条件总数 --> |
|
|
|
@ -38,7 +38,7 @@ |
|
|
|
|
|
|
|
<!--根据map组装条件进行查询--> |
|
|
|
<select id="getGoodsListByMap" parameterType="java.util.Map" resultType="cn.chjyj.szwh.bean.Goods"> |
|
|
|
SELECT <include refid="scols"/> |
|
|
|
SELECT <include refid="column"/> |
|
|
|
FROM <include refid="tbName"/> |
|
|
|
<where> |
|
|
|
<foreach collection="map" item="v" index="k" separator="and"> |
|
|
|
@ -64,6 +64,43 @@ |
|
|
|
limit 1; |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 简版筛选商品列表 --> |
|
|
|
<select id="getGoodsSimpleVo" parameterType="java.util.Map" resultType="cn.chjyj.szwh.vo.GoodsListVo"> |
|
|
|
SELECT g.id,g.username,gd.goods_name,gd.price,gd.createtime, |
|
|
|
gd.updatetime,gd.goods_islicode,gd.goods_entrust,gd.goods_type,gd.charges_type |
|
|
|
FROM goods as g |
|
|
|
INNER JOIN goods_detail as gd |
|
|
|
ON g.goods_detail_id=gd.id |
|
|
|
<where> |
|
|
|
<if test="map!=null"> |
|
|
|
<foreach collection="map" item="v" index="k" separator="and"> |
|
|
|
<if test="v != null and v != '' and k!='orderway' and k!='id' |
|
|
|
and k!='gd.goods_name' and k!='g.entrust_name' and k!='g.gisli' |
|
|
|
and k!='createtime' and k!='ishow'"> |
|
|
|
${k} = #{v} |
|
|
|
</if> |
|
|
|
<if test="k=='ishow'"> |
|
|
|
g.is_recommend=#{v} |
|
|
|
</if> |
|
|
|
<if test="k=='gd.goods_name'"> |
|
|
|
gd.goods_name like concat('%',#{v},'%') |
|
|
|
OR g.goods_islicode like concat('%',#{v},'%') |
|
|
|
</if> |
|
|
|
<if test="k=='g.gisli'"> |
|
|
|
g.goods_islicode=#{v} |
|
|
|
</if> |
|
|
|
<if test="k=='g.entrust_name'"> |
|
|
|
g.username like concat('%',#{v},'%') |
|
|
|
</if> |
|
|
|
<if test="k=='createtime'"> |
|
|
|
${v} |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
limit #{startrs},#{limit} |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 筛选商品列表 --> |
|
|
|
<select id="getGoodsVoList" parameterType="java.util.Map" resultType="cn.chjyj.szwh.vo.GoodsListVo"> |
|
|
|
SELECT g.id,g.username,g.recommend_sort,g.sale_count,g.click_count,g.is_recommend,gd.goods_name,gd.goods_image,gd.price,gd.createtime, |
|
|
|
|