|
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
- <mapper namespace="com.iformall.mapper.ServiceInfoMapper">
-
-
- <sql id="allColumns">
- `id`, `create_time`, `update_time`, `name`, `address`, `code`, `type`, `status`, `del_flag`, `mall_user_info`,`remaining_times`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
- <if test=" null != id ">
- and `id` = #{id}
- </if>
- <if test=" null != name and '' != name">
- and `name` LIKE CONCAT('%', #{name},'%')
- </if>
- <if test=" null != code and '' != code">
- and `code` = #{code}
- </if>
- <if test=" null != type ">
- and `type` = #{type}
- </if>
- <if test=" null != status ">
- and `status` = #{status}
- </if>
- <if test=" null != delFlag ">
- and `del_flag` = #{delFlag}
- </if>
- <if test=" null != mallUserInfo ">
- and `mall_user_info` = #{mallUserInfo}
- </if>
- </sql>
-
- <select id="listServiceInfo" resultType="com.iformall.domain.po.sm.ServiceInfo">
- SELECT
- <include refid="allColumns"/>
- FROM service_info
- <include refid="dynamicWhereConditions"/>
- </select>
-
- <update id = "reduceTimes" >
- update service_info set remaining_times = remaining_times - #{seconds} where id = #{id}
- </update>
-
-
- </mapper>
|