AsraOpSmapper.xml
2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?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.zteits.oa.report.mapper.smapper.AsraOpSmapper">
<resultMap id="BaseResultMap" type="com.zteits.oa.report.domain.AsraOp">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="login_code" jdbcType="VARCHAR" property="loginCode" />
<result column="login_password" jdbcType="VARCHAR" property="loginPassword" />
<result column="op_name" jdbcType="VARCHAR" property="opName" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="role_id" jdbcType="BIGINT" property="roleId" />
<result column="city_id" jdbcType="BIGINT" property="cityId" />
<result column="city_name" jdbcType="VARCHAR" property="cityName" />
<result column="is_remind_email" jdbcType="INTEGER" property="isRemindEmail" />
<result column="data_state" jdbcType="INTEGER" property="dataState" />
<result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
<result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
<result column="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
<result column="modfiy_emp_name" jdbcType="VARCHAR" property="modfiyEmpName" />
<result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, login_code, login_password, op_name, email, role_id, city_id, city_name,
is_remind_email, data_state, create_empid, create_emp_name, create_date, modfiy_empid,
modfiy_emp_name, modfiy_date, remark
</sql>
<select id="queryAsraOpForList" parameterType="com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq" resultType="com.zteits.oa.api.dto.asraop.AsraOpDTO">
select
ap.id id,
ap.login_code loginCode,
ap.op_name opName,
ap.email email,
ap.role_id roleId,
ap.city_id cityId,
ap.city_name cityName,
ap.is_remind_email isRemindEmail
from asra_op ap,asra_op_relations apr
where 1=1 and ap.id = apr.op_id
<if test="id != null ">
and apr.parent_id = #{id} or ap.id = #{id}
</if>
<if test="loginCode != null and loginCode !=''">
and ap.login_code = #{loginCode,jdbcType=VARCHAR}
</if>
<if test="opName != null and opName != ''">
and ap.op_name ike concat('${opName}','%')
</if>
<if test="email != null and email != ''">
and ap.email = #{email,jdbcType=VARCHAR}
</if>
<if test="opIdLists != null">
and ap.id in
<foreach collection="opIdLists" item="opId" open="(" close=")" separator="," >
#{opId}
</foreach>
</if>
</select>
</mapper>