| | |
| | | <?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.dg.core.db.gen.mapper.AutomessageCommonProblemMapper"> |
| | | <resultMap type="com.dg.core.db.gen.entity.AutomessageCommonProblem" id="AutomessageCommonProblemResult"> |
| | | <id property="id" column="id" /> |
| | | <id property="title" column="title" /> |
| | | <id property="content" column="content" /> |
| | | <id property="createTime" column="create_time" /> |
| | | <id property="updateTime" column="update_time" /> |
| | | <id property="updateUserId" column="update_user_id" /> |
| | | <id property="createUserId" column="create_user_id" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectAutomessageCommonProblemResul"> |
| | | SELECT |
| | | id, |
| | | title, |
| | | content, |
| | | create_time, |
| | | update_time, |
| | | (select user_name from automessage_sys_user where user_id=a.update_user_id)updateUserName, |
| | | update_user_id, |
| | | (select user_name from automessage_sys_user where user_id=a.create_user_id)createUserName, |
| | | create_user_id |
| | | FROM |
| | | automessage_common_problem a |
| | | </sql> |
| | | |
| | | <select id="selectConfigList" resultMap="AutomessageCommonProblemResult"> |
| | | <include refid="selectAutomessageCommonProblemResul" /> |
| | | <where> |
| | | <if test="title!=null and title!=''"> |
| | | and title like concat('%', #{title}, '%') |
| | | </if> |
| | | <if test="content!=null and content!=''"> |
| | | and content like concat('%', #{content}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="countConfigList" resultType="integer"> |
| | | select count(*) from automessage_common_problem |
| | | <where> |
| | | <if test="title!=null and title!=''"> |
| | | and title like concat('%', #{title}, '%') |
| | | </if> |
| | | <if test="content!=null and content!=''"> |
| | | and content like concat('%', #{content}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |