|
|
|
@ -0,0 +1,476 @@
|
|
|
|
|
<?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.hzya.frame.plugin.masterData.user.dao.impl.MdmUserDaoImpl">
|
|
|
|
|
|
|
|
|
|
<resultMap id="get-MdmUserEntity-result" type="com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" >
|
|
|
|
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="documentRule" column="document_rule" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="documentRuleNum" column="document_rule_num" jdbcType="INTEGER"/>
|
|
|
|
|
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="addStatus" column="add_status" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="updateStatus" column="update_status" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="deleteStatus" column="delete_status" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
|
|
|
|
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="userCode" column="user_code" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="userPassword" column="user_password" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="pwdlevelcode" column="pwdlevelcode" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="pwdparam" column="pwdparam" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="userNote" column="user_note" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="abledate" column="abledate" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="disabledate" column="disabledate" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="islocked" column="islocked" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="userType" column="user_type" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="baseDocType" column="base_doc_type" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="pkBaseDoc" column="pk_base_doc" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="identityverifycode" column="identityverifycode" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="pkOrg" column="pk_org" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="format" column="format" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="isca" column="isca" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="enablestate" column="enablestate" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="contentlang" column="contentlang" jdbcType="VARCHAR"/>
|
|
|
|
|
<result property="userCodeQ" column="user_code_q" jdbcType="VARCHAR"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<!-- 查询的字段-->
|
|
|
|
|
<sql id = "MdmUserEntity_Base_Column_List">
|
|
|
|
|
id
|
|
|
|
|
,document_rule
|
|
|
|
|
,document_rule_num
|
|
|
|
|
,data_status
|
|
|
|
|
,add_status
|
|
|
|
|
,update_status
|
|
|
|
|
,delete_status
|
|
|
|
|
,sorts
|
|
|
|
|
,create_user_id
|
|
|
|
|
,create_time
|
|
|
|
|
,modify_user_id
|
|
|
|
|
,modify_time
|
|
|
|
|
,sts
|
|
|
|
|
,org_id
|
|
|
|
|
,company_id
|
|
|
|
|
,user_name
|
|
|
|
|
,user_code
|
|
|
|
|
,user_password
|
|
|
|
|
,pwdlevelcode
|
|
|
|
|
,pwdparam
|
|
|
|
|
,user_note
|
|
|
|
|
,abledate
|
|
|
|
|
,disabledate
|
|
|
|
|
,islocked
|
|
|
|
|
,user_type
|
|
|
|
|
,base_doc_type
|
|
|
|
|
,pk_base_doc
|
|
|
|
|
,identityverifycode
|
|
|
|
|
,pk_org
|
|
|
|
|
,format
|
|
|
|
|
,isca
|
|
|
|
|
,enablestate
|
|
|
|
|
,contentlang
|
|
|
|
|
,user_code_q
|
|
|
|
|
</sql>
|
|
|
|
|
<!-- 查询 采用==查询 -->
|
|
|
|
|
<select id="entity_list_base" resultMap="get-MdmUserEntity-result" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity">
|
|
|
|
|
select
|
|
|
|
|
<include refid="MdmUserEntity_Base_Column_List" />
|
|
|
|
|
from mdm_user
|
|
|
|
|
<trim prefix="where" prefixOverrides="and">
|
|
|
|
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
|
|
|
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
|
|
|
|
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
|
|
|
|
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
|
|
|
|
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
|
|
|
|
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
|
|
|
|
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
|
|
|
|
|
<if test="sorts != null"> and sorts = #{sorts} </if>
|
|
|
|
|
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
|
|
|
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
|
|
|
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
|
|
|
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
|
|
|
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
|
|
|
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
|
|
|
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
|
|
|
|
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
|
|
|
|
<if test="userCode != null and userCode != ''"> and user_code = #{userCode} </if>
|
|
|
|
|
<if test="userPassword != null and userPassword != ''"> and user_password = #{userPassword} </if>
|
|
|
|
|
<if test="pwdlevelcode != null and pwdlevelcode != ''"> and pwdlevelcode = #{pwdlevelcode} </if>
|
|
|
|
|
<if test="pwdparam != null and pwdparam != ''"> and pwdparam = #{pwdparam} </if>
|
|
|
|
|
<if test="userNote != null and userNote != ''"> and user_note = #{userNote} </if>
|
|
|
|
|
<if test="abledate != null and abledate != ''"> and abledate = #{abledate} </if>
|
|
|
|
|
<if test="disabledate != null and disabledate != ''"> and disabledate = #{disabledate} </if>
|
|
|
|
|
<if test="islocked != null and islocked != ''"> and islocked = #{islocked} </if>
|
|
|
|
|
<if test="userType != null and userType != ''"> and user_type = #{userType} </if>
|
|
|
|
|
<if test="baseDocType != null and baseDocType != ''"> and base_doc_type = #{baseDocType} </if>
|
|
|
|
|
<if test="pkBaseDoc != null and pkBaseDoc != ''"> and pk_base_doc = #{pkBaseDoc} </if>
|
|
|
|
|
<if test="identityverifycode != null and identityverifycode != ''"> and identityverifycode = #{identityverifycode} </if>
|
|
|
|
|
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
|
|
|
|
<if test="format != null and format != ''"> and format = #{format} </if>
|
|
|
|
|
<if test="isca != null and isca != ''"> and isca = #{isca} </if>
|
|
|
|
|
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
|
|
|
|
<if test="contentlang != null and contentlang != ''"> and contentlang = #{contentlang} </if>
|
|
|
|
|
<if test="userCodeQ != null and userCodeQ != ''"> and user_code_q = #{userCodeQ} </if>
|
|
|
|
|
and sts='Y'
|
|
|
|
|
</trim>
|
|
|
|
|
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
|
|
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 查询符合条件的数量 -->
|
|
|
|
|
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity">
|
|
|
|
|
select count(1) from mdm_user
|
|
|
|
|
<trim prefix="where" prefixOverrides="and">
|
|
|
|
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
|
|
|
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
|
|
|
|
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
|
|
|
|
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
|
|
|
|
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
|
|
|
|
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
|
|
|
|
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
|
|
|
|
|
<if test="sorts != null"> and sorts = #{sorts} </if>
|
|
|
|
|
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
|
|
|
|
<if test="create_time != null"> and create_time = #{create_time} </if>
|
|
|
|
|
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
|
|
|
|
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
|
|
|
|
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
|
|
|
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
|
|
|
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
|
|
|
|
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
|
|
|
|
<if test="userCode != null and userCode != ''"> and user_code = #{userCode} </if>
|
|
|
|
|
<if test="userPassword != null and userPassword != ''"> and user_password = #{userPassword} </if>
|
|
|
|
|
<if test="pwdlevelcode != null and pwdlevelcode != ''"> and pwdlevelcode = #{pwdlevelcode} </if>
|
|
|
|
|
<if test="pwdparam != null and pwdparam != ''"> and pwdparam = #{pwdparam} </if>
|
|
|
|
|
<if test="userNote != null and userNote != ''"> and user_note = #{userNote} </if>
|
|
|
|
|
<if test="abledate != null and abledate != ''"> and abledate = #{abledate} </if>
|
|
|
|
|
<if test="disabledate != null and disabledate != ''"> and disabledate = #{disabledate} </if>
|
|
|
|
|
<if test="islocked != null and islocked != ''"> and islocked = #{islocked} </if>
|
|
|
|
|
<if test="userType != null and userType != ''"> and user_type = #{userType} </if>
|
|
|
|
|
<if test="baseDocType != null and baseDocType != ''"> and base_doc_type = #{baseDocType} </if>
|
|
|
|
|
<if test="pkBaseDoc != null and pkBaseDoc != ''"> and pk_base_doc = #{pkBaseDoc} </if>
|
|
|
|
|
<if test="identityverifycode != null and identityverifycode != ''"> and identityverifycode = #{identityverifycode} </if>
|
|
|
|
|
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
|
|
|
|
<if test="format != null and format != ''"> and format = #{format} </if>
|
|
|
|
|
<if test="isca != null and isca != ''"> and isca = #{isca} </if>
|
|
|
|
|
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
|
|
|
|
<if test="contentlang != null and contentlang != ''"> and contentlang = #{contentlang} </if>
|
|
|
|
|
<if test="userCodeQ != null and userCodeQ != ''"> and user_code_q = #{userCodeQ} </if>
|
|
|
|
|
and sts='Y'
|
|
|
|
|
</trim>
|
|
|
|
|
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
|
|
|
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 分页查询列表 采用like格式 -->
|
|
|
|
|
<select id="entity_list_like" resultMap="get-MdmUserEntity-result" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity">
|
|
|
|
|
select
|
|
|
|
|
<include refid="MdmUserEntity_Base_Column_List" />
|
|
|
|
|
from mdm_user
|
|
|
|
|
<trim prefix="where" prefixOverrides="and">
|
|
|
|
|
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
|
|
|
|
<if test="documentRule != null and documentRule != ''"> and document_rule like concat('%',#{documentRule},'%') </if>
|
|
|
|
|
<if test="documentRuleNum != null"> and document_rule_num like concat('%',#{documentRuleNum},'%') </if>
|
|
|
|
|
<if test="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </if>
|
|
|
|
|
<if test="addStatus != null and addStatus != ''"> and add_status like concat('%',#{addStatus},'%') </if>
|
|
|
|
|
<if test="updateStatus != null and updateStatus != ''"> and update_status like concat('%',#{updateStatus},'%') </if>
|
|
|
|
|
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status like concat('%',#{deleteStatus},'%') </if>
|
|
|
|
|
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
|
|
|
|
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
|
|
|
|
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
|
|
|
|
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
|
|
|
|
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
|
|
|
|
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
|
|
|
|
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
|
|
|
|
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
|
|
|
|
<if test="userName != null and userName != ''"> and user_name like concat('%',#{userName},'%') </if>
|
|
|
|
|
<if test="userCode != null and userCode != ''"> and user_code like concat('%',#{userCode},'%') </if>
|
|
|
|
|
<if test="userPassword != null and userPassword != ''"> and user_password like concat('%',#{userPassword},'%') </if>
|
|
|
|
|
<if test="pwdlevelcode != null and pwdlevelcode != ''"> and pwdlevelcode like concat('%',#{pwdlevelcode},'%') </if>
|
|
|
|
|
<if test="pwdparam != null and pwdparam != ''"> and pwdparam like concat('%',#{pwdparam},'%') </if>
|
|
|
|
|
<if test="userNote != null and userNote != ''"> and user_note like concat('%',#{userNote},'%') </if>
|
|
|
|
|
<if test="abledate != null and abledate != ''"> and abledate like concat('%',#{abledate},'%') </if>
|
|
|
|
|
<if test="disabledate != null and disabledate != ''"> and disabledate like concat('%',#{disabledate},'%') </if>
|
|
|
|
|
<if test="islocked != null and islocked != ''"> and islocked like concat('%',#{islocked},'%') </if>
|
|
|
|
|
<if test="userType != null and userType != ''"> and user_type like concat('%',#{userType},'%') </if>
|
|
|
|
|
<if test="baseDocType != null and baseDocType != ''"> and base_doc_type like concat('%',#{baseDocType},'%') </if>
|
|
|
|
|
<if test="pkBaseDoc != null and pkBaseDoc != ''"> and pk_base_doc like concat('%',#{pkBaseDoc},'%') </if>
|
|
|
|
|
<if test="identityverifycode != null and identityverifycode != ''"> and identityverifycode like concat('%',#{identityverifycode},'%') </if>
|
|
|
|
|
<if test="pkOrg != null and pkOrg != ''"> and pk_org like concat('%',#{pkOrg},'%') </if>
|
|
|
|
|
<if test="format != null and format != ''"> and format like concat('%',#{format},'%') </if>
|
|
|
|
|
<if test="isca != null and isca != ''"> and isca like concat('%',#{isca},'%') </if>
|
|
|
|
|
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
|
|
|
|
|
<if test="contentlang != null and contentlang != ''"> and contentlang like concat('%',#{contentlang},'%') </if>
|
|
|
|
|
<if test="userCodeQ != null and userCodeQ != ''"> and user_code_q like concat('%',#{userCodeQ},'%') </if>
|
|
|
|
|
and sts='Y'
|
|
|
|
|
</trim>
|
|
|
|
|
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
|
|
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 查询列表 字段采用or格式 -->
|
|
|
|
|
<select id="MdmUserentity_list_or" resultMap="get-MdmUserEntity-result" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity">
|
|
|
|
|
select
|
|
|
|
|
<include refid="MdmUserEntity_Base_Column_List" />
|
|
|
|
|
from mdm_user
|
|
|
|
|
<trim prefix="where" prefixOverrides="and">
|
|
|
|
|
<if test="id != null and id != ''"> or id = #{id} </if>
|
|
|
|
|
<if test="documentRule != null and documentRule != ''"> or document_rule = #{documentRule} </if>
|
|
|
|
|
<if test="documentRuleNum != null"> or document_rule_num = #{documentRuleNum} </if>
|
|
|
|
|
<if test="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </if>
|
|
|
|
|
<if test="addStatus != null and addStatus != ''"> or add_status = #{addStatus} </if>
|
|
|
|
|
<if test="updateStatus != null and updateStatus != ''"> or update_status = #{updateStatus} </if>
|
|
|
|
|
<if test="deleteStatus != null and deleteStatus != ''"> or delete_status = #{deleteStatus} </if>
|
|
|
|
|
<if test="sorts != null"> or sorts = #{sorts} </if>
|
|
|
|
|
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
|
|
|
|
<if test="create_time != null"> or create_time = #{create_time} </if>
|
|
|
|
|
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
|
|
|
|
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
|
|
|
|
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
|
|
|
|
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
|
|
|
|
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
|
|
|
|
<if test="userName != null and userName != ''"> or user_name = #{userName} </if>
|
|
|
|
|
<if test="userCode != null and userCode != ''"> or user_code = #{userCode} </if>
|
|
|
|
|
<if test="userPassword != null and userPassword != ''"> or user_password = #{userPassword} </if>
|
|
|
|
|
<if test="pwdlevelcode != null and pwdlevelcode != ''"> or pwdlevelcode = #{pwdlevelcode} </if>
|
|
|
|
|
<if test="pwdparam != null and pwdparam != ''"> or pwdparam = #{pwdparam} </if>
|
|
|
|
|
<if test="userNote != null and userNote != ''"> or user_note = #{userNote} </if>
|
|
|
|
|
<if test="abledate != null and abledate != ''"> or abledate = #{abledate} </if>
|
|
|
|
|
<if test="disabledate != null and disabledate != ''"> or disabledate = #{disabledate} </if>
|
|
|
|
|
<if test="islocked != null and islocked != ''"> or islocked = #{islocked} </if>
|
|
|
|
|
<if test="userType != null and userType != ''"> or user_type = #{userType} </if>
|
|
|
|
|
<if test="baseDocType != null and baseDocType != ''"> or base_doc_type = #{baseDocType} </if>
|
|
|
|
|
<if test="pkBaseDoc != null and pkBaseDoc != ''"> or pk_base_doc = #{pkBaseDoc} </if>
|
|
|
|
|
<if test="identityverifycode != null and identityverifycode != ''"> or identityverifycode = #{identityverifycode} </if>
|
|
|
|
|
<if test="pkOrg != null and pkOrg != ''"> or pk_org = #{pkOrg} </if>
|
|
|
|
|
<if test="format != null and format != ''"> or format = #{format} </if>
|
|
|
|
|
<if test="isca != null and isca != ''"> or isca = #{isca} </if>
|
|
|
|
|
<if test="enablestate != null and enablestate != ''"> or enablestate = #{enablestate} </if>
|
|
|
|
|
<if test="contentlang != null and contentlang != ''"> or contentlang = #{contentlang} </if>
|
|
|
|
|
<if test="userCodeQ != null and userCodeQ != ''"> or user_code_q = #{userCodeQ} </if>
|
|
|
|
|
and sts='Y'
|
|
|
|
|
</trim>
|
|
|
|
|
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
|
|
|
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!--新增所有列-->
|
|
|
|
|
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
|
insert into mdm_user(
|
|
|
|
|
<trim suffix="" suffixOverrides=",">
|
|
|
|
|
<if test="id != null and id != ''"> id , </if>
|
|
|
|
|
<if test="documentRule != null and documentRule != ''"> document_rule , </if>
|
|
|
|
|
<if test="documentRuleNum != null"> document_rule_num , </if>
|
|
|
|
|
<if test="dataStatus != null and dataStatus != ''"> data_status , </if>
|
|
|
|
|
<if test="addStatus != null and addStatus != ''"> add_status , </if>
|
|
|
|
|
<if test="updateStatus != null and updateStatus != ''"> update_status , </if>
|
|
|
|
|
<if test="deleteStatus != null and deleteStatus != ''"> delete_status , </if>
|
|
|
|
|
<if test="sorts != null"> sorts , </if>
|
|
|
|
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
|
|
|
|
<if test="create_time != null"> create_time , </if>
|
|
|
|
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
|
|
|
|
<if test="modify_time != null"> modify_time , </if>
|
|
|
|
|
<if test="sts != null and sts != ''"> sts , </if>
|
|
|
|
|
<if test="org_id != null and org_id != ''"> org_id , </if>
|
|
|
|
|
<if test="companyId != null and companyId != ''"> company_id , </if>
|
|
|
|
|
<if test="userName != null and userName != ''"> user_name , </if>
|
|
|
|
|
<if test="userCode != null and userCode != ''"> user_code , </if>
|
|
|
|
|
<if test="userPassword != null and userPassword != ''"> user_password , </if>
|
|
|
|
|
<if test="pwdlevelcode != null and pwdlevelcode != ''"> pwdlevelcode , </if>
|
|
|
|
|
<if test="pwdparam != null and pwdparam != ''"> pwdparam , </if>
|
|
|
|
|
<if test="userNote != null and userNote != ''"> user_note , </if>
|
|
|
|
|
<if test="abledate != null and abledate != ''"> abledate , </if>
|
|
|
|
|
<if test="disabledate != null and disabledate != ''"> disabledate , </if>
|
|
|
|
|
<if test="islocked != null and islocked != ''"> islocked , </if>
|
|
|
|
|
<if test="userType != null and userType != ''"> user_type , </if>
|
|
|
|
|
<if test="baseDocType != null and baseDocType != ''"> base_doc_type , </if>
|
|
|
|
|
<if test="pkBaseDoc != null and pkBaseDoc != ''"> pk_base_doc , </if>
|
|
|
|
|
<if test="identityverifycode != null and identityverifycode != ''"> identityverifycode , </if>
|
|
|
|
|
<if test="pkOrg != null and pkOrg != ''"> pk_org , </if>
|
|
|
|
|
<if test="format != null and format != ''"> format , </if>
|
|
|
|
|
<if test="isca != null and isca != ''"> isca , </if>
|
|
|
|
|
<if test="enablestate != null and enablestate != ''"> enablestate , </if>
|
|
|
|
|
<if test="contentlang != null and contentlang != ''"> contentlang , </if>
|
|
|
|
|
<if test="userCodeQ != null and userCodeQ != ''"> user_code_q , </if>
|
|
|
|
|
<if test="sorts == null ">sorts,</if>
|
|
|
|
|
<if test="sts == null ">sts,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
)values(
|
|
|
|
|
<trim suffix="" suffixOverrides=",">
|
|
|
|
|
<if test="id != null and id != ''"> #{id} ,</if>
|
|
|
|
|
<if test="documentRule != null and documentRule != ''"> #{documentRule} ,</if>
|
|
|
|
|
<if test="documentRuleNum != null"> #{documentRuleNum} ,</if>
|
|
|
|
|
<if test="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</if>
|
|
|
|
|
<if test="addStatus != null and addStatus != ''"> #{addStatus} ,</if>
|
|
|
|
|
<if test="updateStatus != null and updateStatus != ''"> #{updateStatus} ,</if>
|
|
|
|
|
<if test="deleteStatus != null and deleteStatus != ''"> #{deleteStatus} ,</if>
|
|
|
|
|
<if test="sorts != null"> #{sorts} ,</if>
|
|
|
|
|
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
|
|
|
|
<if test="create_time != null"> #{create_time} ,</if>
|
|
|
|
|
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
|
|
|
|
<if test="modify_time != null"> #{modify_time} ,</if>
|
|
|
|
|
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
|
|
|
|
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
|
|
|
|
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
|
|
|
|
<if test="userName != null and userName != ''"> #{userName} ,</if>
|
|
|
|
|
<if test="userCode != null and userCode != ''"> #{userCode} ,</if>
|
|
|
|
|
<if test="userPassword != null and userPassword != ''"> #{userPassword} ,</if>
|
|
|
|
|
<if test="pwdlevelcode != null and pwdlevelcode != ''"> #{pwdlevelcode} ,</if>
|
|
|
|
|
<if test="pwdparam != null and pwdparam != ''"> #{pwdparam} ,</if>
|
|
|
|
|
<if test="userNote != null and userNote != ''"> #{userNote} ,</if>
|
|
|
|
|
<if test="abledate != null and abledate != ''"> #{abledate} ,</if>
|
|
|
|
|
<if test="disabledate != null and disabledate != ''"> #{disabledate} ,</if>
|
|
|
|
|
<if test="islocked != null and islocked != ''"> #{islocked} ,</if>
|
|
|
|
|
<if test="userType != null and userType != ''"> #{userType} ,</if>
|
|
|
|
|
<if test="baseDocType != null and baseDocType != ''"> #{baseDocType} ,</if>
|
|
|
|
|
<if test="pkBaseDoc != null and pkBaseDoc != ''"> #{pkBaseDoc} ,</if>
|
|
|
|
|
<if test="identityverifycode != null and identityverifycode != ''"> #{identityverifycode} ,</if>
|
|
|
|
|
<if test="pkOrg != null and pkOrg != ''"> #{pkOrg} ,</if>
|
|
|
|
|
<if test="format != null and format != ''"> #{format} ,</if>
|
|
|
|
|
<if test="isca != null and isca != ''"> #{isca} ,</if>
|
|
|
|
|
<if test="enablestate != null and enablestate != ''"> #{enablestate} ,</if>
|
|
|
|
|
<if test="contentlang != null and contentlang != ''"> #{contentlang} ,</if>
|
|
|
|
|
<if test="userCodeQ != null and userCodeQ != ''"> #{userCodeQ} ,</if>
|
|
|
|
|
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_user a WHERE a.sts = 'Y' ),</if>
|
|
|
|
|
<if test="sts == null ">'Y',</if>
|
|
|
|
|
</trim>
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
<!-- 批量新增 -->
|
|
|
|
|
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
|
insert into mdm_user(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, user_name, user_code, user_password, pwdlevelcode, pwdparam, user_note, abledate, disabledate, islocked, user_type, base_doc_type, pk_base_doc, identityverifycode, pk_org, format, isca, enablestate, contentlang, user_code_q, sts)
|
|
|
|
|
values
|
|
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
|
|
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.userName},#{entity.userCode},#{entity.userPassword},#{entity.pwdlevelcode},#{entity.pwdparam},#{entity.userNote},#{entity.abledate},#{entity.disabledate},#{entity.islocked},#{entity.userType},#{entity.baseDocType},#{entity.pkBaseDoc},#{entity.identityverifycode},#{entity.pkOrg},#{entity.format},#{entity.isca},#{entity.enablestate},#{entity.contentlang},#{entity.userCodeQ}, 'Y')
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
<!-- 批量新增或者修改-->
|
|
|
|
|
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
|
|
insert into mdm_user(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, user_name, user_code, user_password, pwdlevelcode, pwdparam, user_note, abledate, disabledate, islocked, user_type, base_doc_type, pk_base_doc, identityverifycode, pk_org, format, isca, enablestate, contentlang, user_code_q)
|
|
|
|
|
values
|
|
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
|
|
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.userName},#{entity.userCode},#{entity.userPassword},#{entity.pwdlevelcode},#{entity.pwdparam},#{entity.userNote},#{entity.abledate},#{entity.disabledate},#{entity.islocked},#{entity.userType},#{entity.baseDocType},#{entity.pkBaseDoc},#{entity.identityverifycode},#{entity.pkOrg},#{entity.format},#{entity.isca},#{entity.enablestate},#{entity.contentlang},#{entity.userCodeQ})
|
|
|
|
|
</foreach>
|
|
|
|
|
on duplicate key update
|
|
|
|
|
document_rule = values(document_rule),
|
|
|
|
|
document_rule_num = values(document_rule_num),
|
|
|
|
|
data_status = values(data_status),
|
|
|
|
|
add_status = values(add_status),
|
|
|
|
|
update_status = values(update_status),
|
|
|
|
|
delete_status = values(delete_status),
|
|
|
|
|
create_user_id = values(create_user_id),
|
|
|
|
|
create_time = values(create_time),
|
|
|
|
|
modify_user_id = values(modify_user_id),
|
|
|
|
|
modify_time = values(modify_time),
|
|
|
|
|
sts = values(sts),
|
|
|
|
|
org_id = values(org_id),
|
|
|
|
|
company_id = values(company_id),
|
|
|
|
|
user_name = values(user_name),
|
|
|
|
|
user_code = values(user_code),
|
|
|
|
|
user_password = values(user_password),
|
|
|
|
|
pwdlevelcode = values(pwdlevelcode),
|
|
|
|
|
pwdparam = values(pwdparam),
|
|
|
|
|
user_note = values(user_note),
|
|
|
|
|
abledate = values(abledate),
|
|
|
|
|
disabledate = values(disabledate),
|
|
|
|
|
islocked = values(islocked),
|
|
|
|
|
user_type = values(user_type),
|
|
|
|
|
base_doc_type = values(base_doc_type),
|
|
|
|
|
pk_base_doc = values(pk_base_doc),
|
|
|
|
|
identityverifycode = values(identityverifycode),
|
|
|
|
|
pk_org = values(pk_org),
|
|
|
|
|
format = values(format),
|
|
|
|
|
isca = values(isca),
|
|
|
|
|
enablestate = values(enablestate),
|
|
|
|
|
contentlang = values(contentlang),
|
|
|
|
|
user_code_q = values(user_code_q)</insert>
|
|
|
|
|
<!--通过主键修改方法-->
|
|
|
|
|
<update id="entity_update" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" >
|
|
|
|
|
update mdm_user set
|
|
|
|
|
<trim suffix="" suffixOverrides=",">
|
|
|
|
|
<if test="documentRule != null and documentRule != ''"> document_rule = #{documentRule},</if>
|
|
|
|
|
<if test="documentRuleNum != null"> document_rule_num = #{documentRuleNum},</if>
|
|
|
|
|
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</if>
|
|
|
|
|
<if test="addStatus != null and addStatus != ''"> add_status = #{addStatus},</if>
|
|
|
|
|
<if test="updateStatus != null and updateStatus != ''"> update_status = #{updateStatus},</if>
|
|
|
|
|
<if test="deleteStatus != null and deleteStatus != ''"> delete_status = #{deleteStatus},</if>
|
|
|
|
|
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
|
|
|
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
|
|
|
|
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
|
|
|
|
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
|
|
|
|
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
|
|
|
|
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
|
|
|
|
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
|
|
|
|
<if test="userName != null and userName != ''"> user_name = #{userName},</if>
|
|
|
|
|
<if test="userCode != null and userCode != ''"> user_code = #{userCode},</if>
|
|
|
|
|
<if test="userPassword != null and userPassword != ''"> user_password = #{userPassword},</if>
|
|
|
|
|
<if test="pwdlevelcode != null and pwdlevelcode != ''"> pwdlevelcode = #{pwdlevelcode},</if>
|
|
|
|
|
<if test="pwdparam != null and pwdparam != ''"> pwdparam = #{pwdparam},</if>
|
|
|
|
|
<if test="userNote != null and userNote != ''"> user_note = #{userNote},</if>
|
|
|
|
|
<if test="abledate != null and abledate != ''"> abledate = #{abledate},</if>
|
|
|
|
|
<if test="disabledate != null and disabledate != ''"> disabledate = #{disabledate},</if>
|
|
|
|
|
<if test="islocked != null and islocked != ''"> islocked = #{islocked},</if>
|
|
|
|
|
<if test="userType != null and userType != ''"> user_type = #{userType},</if>
|
|
|
|
|
<if test="baseDocType != null and baseDocType != ''"> base_doc_type = #{baseDocType},</if>
|
|
|
|
|
<if test="pkBaseDoc != null and pkBaseDoc != ''"> pk_base_doc = #{pkBaseDoc},</if>
|
|
|
|
|
<if test="identityverifycode != null and identityverifycode != ''"> identityverifycode = #{identityverifycode},</if>
|
|
|
|
|
<if test="pkOrg != null and pkOrg != ''"> pk_org = #{pkOrg},</if>
|
|
|
|
|
<if test="format != null and format != ''"> format = #{format},</if>
|
|
|
|
|
<if test="isca != null and isca != ''"> isca = #{isca},</if>
|
|
|
|
|
<if test="enablestate != null and enablestate != ''"> enablestate = #{enablestate},</if>
|
|
|
|
|
<if test="contentlang != null and contentlang != ''"> contentlang = #{contentlang},</if>
|
|
|
|
|
<if test="userCodeQ != null and userCodeQ != ''"> user_code_q = #{userCodeQ},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
<!-- 逻辑删除 -->
|
|
|
|
|
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" >
|
|
|
|
|
update mdm_user set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
<!-- 多条件逻辑删除 -->
|
|
|
|
|
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.masterData.user.entity.MdmUserEntity" >
|
|
|
|
|
update mdm_user set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
|
|
|
|
<trim prefix="where" prefixOverrides="and">
|
|
|
|
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
|
|
|
|
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
|
|
|
|
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
|
|
|
|
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
|
|
|
|
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
|
|
|
|
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
|
|
|
|
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
|
|
|
|
|
<if test="sorts != null"> and sorts = #{sorts} </if>
|
|
|
|
|
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
|
|
|
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
|
|
|
|
<if test="userName != null and userName != ''"> and user_name = #{userName} </if>
|
|
|
|
|
<if test="userCode != null and userCode != ''"> and user_code = #{userCode} </if>
|
|
|
|
|
<if test="userPassword != null and userPassword != ''"> and user_password = #{userPassword} </if>
|
|
|
|
|
<if test="pwdlevelcode != null and pwdlevelcode != ''"> and pwdlevelcode = #{pwdlevelcode} </if>
|
|
|
|
|
<if test="pwdparam != null and pwdparam != ''"> and pwdparam = #{pwdparam} </if>
|
|
|
|
|
<if test="userNote != null and userNote != ''"> and user_note = #{userNote} </if>
|
|
|
|
|
<if test="abledate != null and abledate != ''"> and abledate = #{abledate} </if>
|
|
|
|
|
<if test="disabledate != null and disabledate != ''"> and disabledate = #{disabledate} </if>
|
|
|
|
|
<if test="islocked != null and islocked != ''"> and islocked = #{islocked} </if>
|
|
|
|
|
<if test="userType != null and userType != ''"> and user_type = #{userType} </if>
|
|
|
|
|
<if test="baseDocType != null and baseDocType != ''"> and base_doc_type = #{baseDocType} </if>
|
|
|
|
|
<if test="pkBaseDoc != null and pkBaseDoc != ''"> and pk_base_doc = #{pkBaseDoc} </if>
|
|
|
|
|
<if test="identityverifycode != null and identityverifycode != ''"> and identityverifycode = #{identityverifycode} </if>
|
|
|
|
|
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
|
|
|
|
<if test="format != null and format != ''"> and format = #{format} </if>
|
|
|
|
|
<if test="isca != null and isca != ''"> and isca = #{isca} </if>
|
|
|
|
|
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
|
|
|
|
<if test="contentlang != null and contentlang != ''"> and contentlang = #{contentlang} </if>
|
|
|
|
|
<if test="userCodeQ != null and userCodeQ != ''"> and user_code_q = #{userCodeQ} </if>
|
|
|
|
|
and sts='Y'
|
|
|
|
|
</trim>
|
|
|
|
|
</update>
|
|
|
|
|
<!--通过主键删除-->
|
|
|
|
|
<delete id="entity_delete">
|
|
|
|
|
delete from mdm_user where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|
|