123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <?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.kmall.admin.dao.vip.Mall2PointsRulesDetilDao">
- <resultMap type="com.kmall.admin.entity.vip.Mall2PointsRulesDetilEntity" id="mall2PointsRulesDetilMap">
- <result property="id" column="id"/>
- <result property="fatherId" column="father_id"/>
- <result property="pointsRulesType" column="points_rules_type"/>
- <result property="pointsDetilName" column="points_detil_name"/>
- <result property="pointsDetilNameId" column="points_detil_name_id"/>
- <result property="pointsStoreName" column="points_store_name"/>
- <result property="pointsStoreId" column="points_store_id"/>
- <result property="remark" column="remark"/>
- <result property="tstm" column="tstm"/>
- </resultMap>
- <select id="queryObject" resultType="com.kmall.admin.entity.vip.Mall2PointsRulesDetilEntity">
- select
- `id`,
- `father_id`,
- `points_rules_type`,
- `points_detil_name`,
- `points_detil_name_id`,
- `points_store_name`,
- `points_store_id`,
- `remark`,
- `tstm`
- from mall2_points_rules_detil
- where id = #{id}
- </select>
- <select id="queryList" resultType="com.kmall.admin.entity.vip.Mall2PointsRulesDetilEntity">
- select
- `id`,
- `father_id`,
- `points_rules_type`,
- `points_detil_name`,
- `points_detil_name_id`,
- `points_store_name`,
- `points_store_id`,
- `remark`,
- `tstm`
- from mall2_points_rules_detil
- WHERE 1=1
- <if test="name != null and name.trim() != ''">
- AND name LIKE concat('%',#{name},'%')
- </if>
- <choose>
- <when test="sidx != null and sidx.trim() != ''">
- order by ${sidx} ${order}
- </when>
- <otherwise>
- order by id desc
- </otherwise>
- </choose>
- <if test="offset != null and limit != null">
- limit #{offset}, #{limit}
- </if>
- </select>
-
- <select id="queryTotal" resultType="int">
- select count(*) from mall2_points_rules_detil
- WHERE 1=1
- <if test="name != null and name.trim() != ''">
- AND name LIKE concat('%',#{name},'%')
- </if>
- </select>
-
- <insert id="save" parameterType="com.kmall.admin.entity.vip.Mall2PointsRulesDetilEntity" useGeneratedKeys="true" keyProperty="id">
- insert into mall2_points_rules_detil(
- `father_id`,
- `points_rules_type`,
- `points_detil_name`,
- `points_detil_name_id`,
- `points_store_name`,
- `points_store_id`,
- `remark`,
- `tstm`)
- values(
- #{fatherId},
- #{pointsRulesType},
- #{pointsDetilName},
- #{pointsDetilNameId},
- #{pointsStoreName},
- #{pointsStoreId},
- #{remark},
- #{tstm})
- </insert>
-
- <update id="update" parameterType="com.kmall.admin.entity.vip.Mall2PointsRulesDetilEntity">
- update mall2_points_rules_detil
- <set>
- <if test="fatherId != null">`father_id` = #{fatherId}, </if>
- <if test="pointsRulesType != null">`points_rules_type` = #{pointsRulesType}, </if>
- <if test="pointsDetilName != null">`points_detil_name` = #{pointsDetilName}, </if>
- <if test="pointsDetilNameId != null">`points_detil_name_id` = #{pointsDetilNameId}, </if>
- <if test="pointsStoreName != null">`points_store_name` = #{pointsStoreName}, </if>
- <if test="pointsStoreId != null">`points_store_id` = #{pointsStoreId}, </if>
- <if test="remark != null">`remark` = #{remark}, </if>
- <if test="tstm != null">`tstm` = #{tstm}</if>
- </set>
- where id = #{id}
- </update>
-
- <delete id="delete">
- delete from mall2_points_rules_detil where id = #{value}
- </delete>
-
- <delete id="deleteBatch">
- delete from mall2_points_rules_detil where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|