12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?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.hjy.module.mapper.portal.CbContactUsMapper">
- <sql id="querySql">
- select <include refid="allField"/>
- from CB_CONTACT_US A
- <include refid="search"/>
- </sql>
- <select id="queryList" resultType="com.hjy.module.vo.portal.CbContactUsVo">
- <include refid="querySql"/>
- <if test="entity.id != null and entity.id != ''">
- and A.ID like concat('%', #{entity.id}, '%')
- </if>
- <if test="entity.createTime != null and entity.createTime != ''">
- and A.CREATE_TIME like concat('%', #{entity.createTime}, '%')
- </if>
- <if test="entity.createBy != null and entity.createBy != ''">
- and A.CREATE_BY like concat('%', #{entity.createBy}, '%')
- </if>
- <if test="entity.updateTime != null and entity.updateTime != ''">
- and A.UPDATE_TIME like concat('%', #{entity.updateTime}, '%')
- </if>
- <if test="entity.updateBy != null and entity.updateBy != ''">
- and A.UPDATE_BY like concat('%', #{entity.updateBy}, '%')
- </if>
- <if test="entity.delFlag != null and entity.delFlag != ''">
- and A.DEL_FLAG like concat('%', #{entity.delFlag}, '%')
- </if>
- <if test="entity.deptId != null and entity.deptId != ''">
- and A.DEPT_ID like concat('%', #{entity.deptId}, '%')
- </if>
- <if test="entity.depName != null and entity.depName != ''">
- and A.DEP_NAME like concat('%', #{entity.depName}, '%')
- </if>
- <if test="entity.telphone != null and entity.telphone != ''">
- and A.TELPHONE like concat('%', #{entity.telphone}, '%')
- </if>
- <if test="entity.location != null and entity.location != ''">
- and A.LOCATION like concat('%', #{entity.location}, '%')
- </if>
- <if test="entity.email != null and entity.email != ''">
- and A.EMAIL like concat('%', #{entity.email}, '%')
- </if>
- order by A.create_time DESC
- <if test="num == 1">
- LIMIT 1
- </if>
- </select>
- <select id="queryById" resultType="com.hjy.module.vo.portal.CbContactUsVo">
- <include refid="querySql"/>
- and A.id = #{id}
- </select>
- <sql id="allField">
- A.ID,
- A.CREATE_TIME,
- A.CREATE_BY,
- A.UPDATE_TIME,
- A.UPDATE_BY,
- A.DEL_FLAG,
- A.DEPT_ID,
- A.DEP_NAME,
- A.TELPHONE,
- A.LOCATION,
- A.EMAIL
- </sql>
- <sql id="search">
- where A.del_flag = 0
- </sql>
- </mapper>
|