12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?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.example.nngkxxdp.dao.HandleMattersDao">
- <resultMap id="BaseResultMap" type="com.example.nngkxxdp.entity.HandleMatters">
- <id property="id" column="id" jdbcType="INTEGER"/>
- <result property="mattersName" column="matters_name" jdbcType="VARCHAR"/>
- <result property="windowNum" column="window_num" jdbcType="VARCHAR"/>
- <result property="deptId" column="deptId" jdbcType="INTEGER"/>
- <result property="url" column="url" jdbcType="VARCHAR"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
- <association property="handleDept" javaType="com.example.nngkxxdp.entity.HandleDept">
- <result column="id" property="id"/>
- <result column="dept_name" property="deptName"/>
- </association>
- </resultMap>
- <sql id="Base_Column_List">
- id,matters_name,window_num,
- deptId,create_time
- </sql>
- <select id="findById" resultType="com.example.nngkxxdp.entity.HandleMatters">
- select hm.id,hm.matters_name,hm.window_num,hm.url from t_handle_matters hm
- where hm.deptId=#{deptId}
- </select>
- <select id="queryCount" resultType="int">
- select count(*) from t_handle_matters hm
- where hm.deptId=#{deptId}
- </select>
- <select id="queryData" resultType="com.example.nngkxxdp.entity.HandleMatters">
- select hm.id,hm.matters_name,hm.window_num from t_handle_matters hm
- where hm.deptId=#{deptId}
- limit #{offset}, #{limit}
- </select>
- <!--事项清单模糊查询-->
- <select id="findBykey" resultType="com.example.nngkxxdp.entity.HandleMatters">
- select * from t_handle_matters
- where matters_name like concat('%',#{keyword},'%')
- LIMIT #{offset}, #{pageSize}
- </select>
- <select id="queryCountBykey" resultType="java.lang.Integer">
- select count(*) from t_handle_matters
- where matters_name like concat('%',#{keyword},'%')
- </select>
- <select id="findByKeyAll" resultType="com.example.nngkxxdp.entity.HandleMatters">
- select * from t_handle_matters
- where matters_name like concat('%',#{keyword},'%')
- </select>
- <select id="findByIdByKey" resultType="com.example.nngkxxdp.entity.HandleMatters">
- select * from t_handle_matters
- where deptId=#{deptId}
- <if test="keyword != null and keyword != ''">
- and matters_name like concat('%', #{keyword}, '%')
- </if>
- </select>
- <select id="findByIdByKeyCount" resultType="java.lang.Integer">
- select count(*) from t_handle_matters
- where deptId=#{deptId}
- <if test="keyword != null and keyword != ''">
- and matters_name like concat('%', #{keyword}, '%')
- </if>
- </select>
- </mapper>
|