yujian
2020-06-09 554de444b87aab5f93cb1593a8095612cf9479a7
fanli/src/main/java/com/yeshi/fanli/mapping/user/cloud/UserCloudOrderMapper.xml
@@ -89,4 +89,21 @@
   WHERE crd_state = 0 AND crd_update_time > DATE_SUB(NOW(),INTERVAL 1 HOUR)
  </select>
  
  <select id="query" resultMap="BaseResultMap">
     SELECT * FROM yeshi_ec_user_cloud_order d
   WHERE 1=1
    <if test="key != null  and key !=''"> AND d.`crd_uid` LIKE '%#{key}%' </if>
    <if test="state != null">AND d.crd_state = #{state}</if>
   ORDER BY d.`crd_id` DESC
   LIMIT #{start},#{count}
  </select>
  <select id="count" resultType="Long">
     SELECT count(d.`crd_id`) FROM yeshi_ec_user_cloud_order d
   WHERE 1=1
      <if test="key != null and key !='' "> AND d.`crd_uid` LIKE '%#{key}%' </if>
      <if test="state != null">AND d.crd_state = #{state}</if>
  </select>
</mapper>