yujian
2019-09-02 9eeda0d3049b71877c373c04d65533939b5582ef
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserGoodsStorageMapper.xml
@@ -98,14 +98,15 @@
  <select id="listQueryByUid" resultMap="BaseResultMap">
    SELECT * FROM yeshi_ec_user_goods_storage  tg
    LEFT JOIN  `yeshi_ec_common_goods` cg ON tg.`guc_common_id` = cg.`cg_id`
    WHERE tg.`guc_uid` = #{uid}
    WHERE tg.`guc_uid` = #{uid} <if test="gooodsType != null">AND cg.cg_goods_type = #{gooodsType}</if>
    ORDER BY  cg.cg_state, tg.guc_state, tg.`guc_updatetime` DESC
     LIMIT #{start},#{count}
   </select>
   
   <select id="countQueryByUid" resultType="java.lang.Long">
    SELECT IFNULL(count(guc_id),0) FROM yeshi_ec_user_goods_storage  tg
    WHERE tg.`guc_uid` = #{uid}
     <if test="gooodsType != null"> LEFT JOIN  `yeshi_ec_common_goods` cg ON tg.`guc_common_id` = cg.`cg_id`</if>
    WHERE tg.`guc_uid` = #{uid} <if test="gooodsType != null">AND cg.cg_goods_type = #{gooodsType}</if>
   </select>
  
   <select id="getByUidAndCid" resultMap="BaseResultMap">
@@ -130,6 +131,7 @@
      SELECT <include refid="Convert_Column_List"/>  FROM `yeshi_ec_user_goods_storage` g 
      LEFT JOIN  `yeshi_ec_common_goods` c ON g.`guc_common_id` = c.`cg_id`
      WHERE g.`guc_uid` = #{uid} AND c.`cg_goods_id`= #{auctionId}  
         <if test="gooodsType != null">AND c.cg_goods_type = #{gooodsType}</if>
   </select>
   
   <select id="listQueryByIds" resultMap="BaseResultMap" parameterType="java.util.List">
@@ -139,9 +141,4 @@
         separator=",">#{item}</foreach>
   </select>
   
      <update id="updateShareStateByCommonGoodsId" parameterType="java.lang.Long">
      UPDATE `yeshi_ec_user_goods_storage` ts SET ts.`guc_state` = 1
        WHERE ts.`guc_common_id` = #{commonGoodsId}
   </update>
</mapper>