| | |
| | | <?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.yuanchu.mom.mapper.EvaluateGroupMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.EvaluateGroup"> |
| | | <id column="id" property="id" /> |
| | | <result column="name" property="name"/> |
| | | <result column="depart_lims" property="departLims"/> |
| | | <result column="evaluate_id" property="evaluateId" /> |
| | | <result column="seasonable" property="seasonable" /> |
| | | <result column="exact" property="exact" /> |
| | |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | <select id="getEvaluateGroup" resultType="com.yuanchu.mom.pojo.EvaluateGroup"> |
| | | select eg.*,u.name,dl.name depart_lims |
| | | from evaluate_group eg |
| | | left join evaluate e on eg.evaluate_id = e.id |
| | | left join user u on e.user_id = u.id |
| | | left join department_lims dl on depart_lims_id like dl.id |
| | | where 1=1 |
| | | <if test="month!=null and month!=''"> |
| | | and e.month=#{month} |
| | | </if> |
| | | <if test="departLims!=null and departLims!=''"> |
| | | and dl.name like concat ('%',#{departLims},'%') |
| | | </if> |
| | | <if test="name!=null and name!=''"> |
| | | and u.name like concat ('%',#{name},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |