123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?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.manager.dao.TemplateConfDao">
- <resultMap type="com.kmall.manager.entity.pay.TemplateConfVo" id="templateConfMap">
- <result property="id" column="id"/>
- <result property="templateType" column="template_type"/>
- <result property="templateId" column="template_id"/>
- <result property="desc" column="desc"/>
- </resultMap>
- <select id="queryByTypeId" resultMap="templateConfMap">
- select
- `id`,
- `template_type`,
- `template_id`,
- `desc`
- from mall_template_conf
- where template_type = #{templateType}
- </select>
- <select id="queryList" resultMap="templateConfMap">
- select
- `id`,
- `template_type`,
- `template_id`,
- `desc`
- from mall_template_conf
- 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 mall_template_conf
- WHERE 1=1
- <if test="name != null and name.trim() != ''">
- AND name LIKE concat('%',#{name},'%')
- </if>
- </select>
- </mapper>
|