后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.5 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.iformall.mapper.ServiceInfoMapper">
  4. <sql id="allColumns">
  5. `id`, `create_time`, `update_time`, `name`, `address`, `code`, `type`, `status`, `del_flag`, `mall_user_info`,`remaining_times`
  6. </sql>
  7. <sql id="dynamicWhereConditions">
  8. where 1 = 1
  9. <if test=" null != id ">
  10. and `id` = #{id}
  11. </if>
  12. <if test=" null != name and '' != name">
  13. and `name` LIKE CONCAT('%', #{name},'%')
  14. </if>
  15. <if test=" null != code and '' != code">
  16. and `code` = #{code}
  17. </if>
  18. <if test=" null != type ">
  19. and `type` = #{type}
  20. </if>
  21. <if test=" null != status ">
  22. and `status` = #{status}
  23. </if>
  24. <if test=" null != delFlag ">
  25. and `del_flag` = #{delFlag}
  26. </if>
  27. <if test=" null != mallUserInfo ">
  28. and `mall_user_info` = #{mallUserInfo}
  29. </if>
  30. </sql>
  31. <select id="listServiceInfo" resultType="com.iformall.domain.po.sm.ServiceInfo">
  32. SELECT
  33. <include refid="allColumns"/>
  34. FROM service_info
  35. <include refid="dynamicWhereConditions"/>
  36. </select>
  37. <update id = "reduceTimes" >
  38. update service_info set remaining_times = remaining_times - #{seconds} where id = #{id}
  39. </update>
  40. </mapper>