AsraOpSmapper.xml 2.56 KB
<?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" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from asra_op
    where 1=1
      <if test="loginCode != null and loginCode !=''">
        and login_code = #{loginCode,jdbcType=VARCHAR}
      </if>
      <if test="opName != null and opName != ''">
        and op_name ike concat('${opName}','%')
      </if>
      <if test="email != null and email != ''">
        and email = #{email,jdbcType=VARCHAR}
      </if>
      <if test="opIdLists != null and opIdLists.size >0">
        and id in
        <foreach collection="opIdLists" item="opId"  open="(" close=")" separator="," >
          #{opId}
        </foreach>
      </if>
  </select>
 
  </mapper>