parent
54dd50431f
commit
0a7301a88c
83 changed files with 2 additions and 1703 deletions
@ -1,95 +0,0 @@ |
|||||||
# 开发和测试环境(dev) |
|
||||||
#服务名称 |
|
||||||
spring.application.name=dq-financial-crms |
|
||||||
#配置中心地址 |
|
||||||
spring.cloud.nacos.config.server-addr=192.168.31.140:8848 |
|
||||||
spring.cloud.nacos.config.namespace=1f69d47e-0aeb-4a1e-8ab4-0e84dfb86354 |
|
||||||
#spring.cloud.nacos.config.group=prod |
|
||||||
|
|
||||||
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml |
|
||||||
spring.cloud.nacos.config.ext-config[0].group=dev |
|
||||||
spring.cloud.nacos.config.ext-config[0].refresh=true |
|
||||||
|
|
||||||
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml |
|
||||||
spring.cloud.nacos.config.ext-config[1].group=dev |
|
||||||
spring.cloud.nacos.config.ext-config[1].refresh=true |
|
||||||
|
|
||||||
spring.cloud.nacos.config.ext-config[2].data-id=other.yml |
|
||||||
spring.cloud.nacos.config.ext-config[2].group=dev |
|
||||||
spring.cloud.nacos.config.ext-config[2].refresh=true |
|
||||||
|
|
||||||
spring.redis.host=127.0.0.1 |
|
||||||
spring.redis.port=6379 |
|
||||||
spring.redis.password=123456 |
|
||||||
spring.redis.database=0 |
|
||||||
spring.redis.timeout=30000 |
|
||||||
spring.redis.jedis.pool.max-active=8 |
|
||||||
spring.redis.jedis.pool.max-wait=-1 |
|
||||||
spring.redis.jedis.pool.max-idle=8 |
|
||||||
spring.redis.jedis.pool.min-idle=0 |
|
||||||
|
|
||||||
#请求处理的超时时间 |
|
||||||
ribbon.ReadTimeout: 120000 |
|
||||||
#请求连接的超时时间 |
|
||||||
ribbon.ConnectTimeout: 120000 |
|
||||||
|
|
||||||
# 正式环境(prod) |
|
||||||
#服务名称 |
|
||||||
#spring.application.name=dq-financial-crms |
|
||||||
###配置中心地址 |
|
||||||
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848 |
|
||||||
#spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd |
|
||||||
##spring.cloud.nacos.config.group=prod |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[0].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[0].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[1].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[1].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[2].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[2].refresh=true |
|
||||||
# |
|
||||||
#spring.redis.host=127.0.0.1 |
|
||||||
#spring.redis.port=6379 |
|
||||||
#spring.redis.password=dq123456 |
|
||||||
#spring.redis.database=0 |
|
||||||
#spring.redis.timeout=30000 |
|
||||||
#spring.redis.jedis.pool.max-active=8 |
|
||||||
#spring.redis.jedis.pool.max-wait=-1 |
|
||||||
#spring.redis.jedis.pool.max-idle=8 |
|
||||||
#spring.redis.jedis.pool.min-idle=0 |
|
||||||
|
|
||||||
|
|
||||||
# 测试环境(prod) |
|
||||||
#服务名称 |
|
||||||
#spring.application.name=dq-financial-crms |
|
||||||
##配置中心地址 |
|
||||||
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 |
|
||||||
#spring.cloud.nacos.config.namespace=1912aa66-6e18-4680-8943-5b8fae71414c |
|
||||||
##spring.cloud.nacos.config.group=prod |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[0].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[0].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[1].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[1].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[2].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[2].refresh=true |
|
||||||
# |
|
||||||
#spring.redis.host=127.0.0.1 |
|
||||||
#spring.redis.port=6379 |
|
||||||
#spring.redis.password= |
|
||||||
#spring.redis.database=0 |
|
||||||
#spring.redis.timeout=30000 |
|
||||||
#spring.redis.jedis.pool.max-active=8 |
|
||||||
#spring.redis.jedis.pool.max-wait=-1 |
|
||||||
#spring.redis.jedis.pool.max-idle=8 |
|
||||||
#spring.redis.jedis.pool.min-idle=0 |
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,47 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
|
|
||||||
<configuration> |
|
||||||
<!--定义日志文件的存储地址,使用绝对路径--> |
|
||||||
<property name="LOG_HOME" value="d:/logs/daqing/crms"/> |
|
||||||
|
|
||||||
<!-- Console 输出设置 --> |
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|
||||||
<encoder> |
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
|
||||||
<charset>utf8</charset> |
|
||||||
</encoder> |
|
||||||
</appender> |
|
||||||
|
|
||||||
<!-- 按照每天生成日志文件 --> |
|
||||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||||
<!--日志文件输出的文件名--> |
|
||||||
<fileNamePattern>${LOG_HOME}/crms.%d{yyyy-MM-dd}.log</fileNamePattern> |
|
||||||
</rollingPolicy> |
|
||||||
<encoder> |
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
|
||||||
</encoder> |
|
||||||
</appender> |
|
||||||
|
|
||||||
<!-- 异步输出 --> |
|
||||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> |
|
||||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
|
||||||
<discardingThreshold>0</discardingThreshold> |
|
||||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
|
||||||
<queueSize>512</queueSize> |
|
||||||
<!-- 添加附加的appender,最多只能添加一个 --> |
|
||||||
<appender-ref ref="FILE"/> |
|
||||||
</appender> |
|
||||||
|
|
||||||
|
|
||||||
<logger name="org.apache.ibatis.cache.decorators.LoggingCache" level="DEBUG" additivity="false"> |
|
||||||
<appender-ref ref="CONSOLE"/> |
|
||||||
</logger> |
|
||||||
<logger name="org.springframework.boot" level="DEBUG"/> |
|
||||||
<root level="info"> |
|
||||||
<!--<appender-ref ref="ASYNC"/>--> |
|
||||||
<appender-ref ref="FILE"/> |
|
||||||
<appender-ref ref="CONSOLE"/> |
|
||||||
</root> |
|
||||||
</configuration> |
|
@ -1,78 +0,0 @@ |
|||||||
<?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.daqing.financial.crms.dao.CompanyCustomerDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.crms.CompanyCustomerEntity" id="companyCustomerMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="registeredCapital" column="registered_capital"/> |
|
||||||
<result property="socialUnifiedCode" column="social_unified_code"/> |
|
||||||
<result property="industry" column="industry"/> |
|
||||||
<result property="years" column="years"/> |
|
||||||
<result property="region" column="region"/> |
|
||||||
<result property="shareholder" column="shareholder"/> |
|
||||||
<result property="affiliatedCompany" column="affiliated_company"/> |
|
||||||
<result property="empNum" column="emp_num"/> |
|
||||||
<result property="linkman" column="linkman"/> |
|
||||||
<result property="linkPhone" column="link_phone"/> |
|
||||||
<result property="businessSource" column="business_source"/> |
|
||||||
<result property="businessScope" column="business_scope"/> |
|
||||||
<result property="businessAddr" column="business_addr"/> |
|
||||||
<result property="registerTime" column="register_time"/> |
|
||||||
<result property="registerAddr" column="register_addr"/> |
|
||||||
<result property="legalIdNumber" column="legal_id_number"/> |
|
||||||
<result property="legalHukouAddr" column="legal_hukou_addr"/> |
|
||||||
<result property="legalPhone" column="legal_phone"/> |
|
||||||
<result property="legalHomeAddr" column="legal_home_addr"/> |
|
||||||
<result property="legalGender" column="legal_gender"/> |
|
||||||
<result property="legalName" column="legal_name"/> |
|
||||||
<result property="isExistRelated" column="is_exist_related"/> |
|
||||||
<result property="customerId" column="customer_id"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<!-- 根据客户基本信息id查询企业类型客户的信息 --> |
|
||||||
<select id="queryCompanyCustomerById" parameterType="long" resultType="com.daqing.framework.domain.crms.CompanyCustomerEntity"> |
|
||||||
SELECT registered_capital,industry,years,region,shareholder,affiliated_company,emp_num,linkman,business_source |
|
||||||
FROM crms_company_customer |
|
||||||
WHERE customer_id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 插入企业类型客户信息 --> |
|
||||||
<insert id="saveCompanyCustomer" parameterType="com.daqing.framework.domain.crms.CompanyCustomerEntity"> |
|
||||||
INSERT INTO crms_company_customer |
|
||||||
(registered_capital,industry,years,region,shareholder,affiliated_company,emp_num,linkman,business_source,customer_id) |
|
||||||
values (#{registeredCapital},#{industry},#{years},#{region},#{shareholder},#{affiliatedCompany},#{empNum},#{linkman}, |
|
||||||
#{businessSource},#{customerId}); |
|
||||||
</insert> |
|
||||||
|
|
||||||
<!-- 更新企业类型客户信息 --> |
|
||||||
<update id="updateCompanyCustomer" parameterType="com.daqing.framework.domain.crms.CompanyCustomerEntity"> |
|
||||||
UPDATE crms_company_customer |
|
||||||
SET registered_capital=#{registeredCapital},industry=#{industry},years=#{years},region=#{region},shareholder=#{shareholder}, |
|
||||||
affiliated_company=#{affiliatedCompany},emp_num=#{empNum},linkman=#{linkman},business_source=#{businessSource} |
|
||||||
WHERE customer_id = #{customerId} |
|
||||||
</update> |
|
||||||
|
|
||||||
<!-- 根据客户编号/客户名称获取企业信息 --> |
|
||||||
<select id="queryCompanyInfo" parameterType="com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest" resultType="com.daqing.framework.domain.crms.response.CompanyCustomerResponse"> |
|
||||||
SELECT cu.*,cc.* |
|
||||||
FROM crms_company_customer cu |
|
||||||
left join crms_customer cc on cu.customer_id = cc.id |
|
||||||
<where> |
|
||||||
cc.del_or_not=0 and cc.status=0 |
|
||||||
<if test="applyAmountInfo.code != null and applyAmountInfo.code != '' "> |
|
||||||
AND cc.code LIKE CONCAT('%',#{applyAmountInfo.code},'%') |
|
||||||
</if> |
|
||||||
<if test="applyAmountInfo.name != null and applyAmountInfo.name != '' "> |
|
||||||
AND cc.name LIKE CONCAT('%',#{applyAmountInfo.name},'%') |
|
||||||
</if> |
|
||||||
<if test="applyAmountInfo.companyId != null and applyAmountInfo.companyId != '' "> |
|
||||||
AND cu.id = #{applyAmountInfo.companyId} |
|
||||||
</if> |
|
||||||
</where> |
|
||||||
</select> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper> |
|
@ -1,102 +0,0 @@ |
|||||||
<?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.daqing.financial.crms.dao.CustomerDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.crms.CustomerEntity" id="customerMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="code" column="code"/> |
|
||||||
<result property="type" column="type"/> |
|
||||||
<result property="manager" column="manager"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="addr" column="addr"/> |
|
||||||
<result property="phone" column="phone"/> |
|
||||||
<result property="password" column="password"/> |
|
||||||
<result property="wechatId" column="wechat_id"/> |
|
||||||
<result property="delOrNot" column="del_or_not"/> |
|
||||||
<result property="status" column="status"/> |
|
||||||
<result property="createTime" column="create_time"/> |
|
||||||
<result property="motifyTime" column="motify_time"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<!-- 查询客户列表(所有)、根据创建时间筛选、根据客户类型筛选、根据客户编号或者名称搜索 --> |
|
||||||
<select id="queryList" parameterType="com.daqing.framework.domain.crms.request.CustomerRequest" resultType="com.daqing.framework.domain.crms.CustomerEntity"> |
|
||||||
SELECT id,code,type,name,phone,manager |
|
||||||
FROM crms_customer |
|
||||||
WHERE del_or_not = 0 |
|
||||||
<if test="cr.codeOrName != null and cr.codeOrName != '' "> |
|
||||||
AND (name LIKE CONCAT('%',#{cr.codeOrName},'%') OR code LIKE CONCAT('%',#{cr.codeOrName},'%')) |
|
||||||
</if> |
|
||||||
<if test="cr.customerType != null"> |
|
||||||
AND type = #{cr.customerType} |
|
||||||
</if> |
|
||||||
<if test="cr.startTime != null and cr.startTime != '' "> |
|
||||||
AND create_time >= #{cr.startTime} |
|
||||||
</if> |
|
||||||
<if test="cr.endTime != null and cr.endTime != '' "> |
|
||||||
AND create_time <= #{cr.endTime} |
|
||||||
</if> |
|
||||||
ORDER BY create_time DESC |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 根据id查询客户的基本信息 --> |
|
||||||
<select id="queryCustomerById" parameterType="long" resultType="com.daqing.framework.domain.crms.CustomerEntity"> |
|
||||||
SELECT id,code,type,manager,name,addr,phone |
|
||||||
FROM crms_customer |
|
||||||
WHERE del_or_not = 0 |
|
||||||
AND id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 根据id更新是否删除字段 --> |
|
||||||
<update id="updateCustomerById" > |
|
||||||
UPDATE crms_customer |
|
||||||
SET del_or_not = 1 |
|
||||||
WHERE id IN |
|
||||||
<foreach collection="ids" open="(" close=")" separator="," item="id"> |
|
||||||
#{id} |
|
||||||
</foreach> |
|
||||||
</update> |
|
||||||
|
|
||||||
<!-- 根据id查询客户姓名 --> |
|
||||||
<select id="queryCustomerNameById" resultType="string"> |
|
||||||
SELECT name |
|
||||||
FROM crms_customer |
|
||||||
WHERE del_or_not = 0 |
|
||||||
AND id IN |
|
||||||
<foreach collection="ids" open="(" close=")" separator="," item="id"> |
|
||||||
#{id} |
|
||||||
</foreach> |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 插入客户基本信息 --> |
|
||||||
<insert id="saveCustomer" keyProperty="id" useGeneratedKeys="true" parameterType="com.daqing.framework.domain.crms.CustomerEntity"> |
|
||||||
INSERT INTO crms_customer |
|
||||||
(code,type,manager,name,addr,phone,del_or_not,status,create_time,motify_time) |
|
||||||
VALUES (#{code},#{type},#{manager},#{name},#{addr},#{phone},0,0,#{createTime},#{motifyTime}) |
|
||||||
</insert> |
|
||||||
|
|
||||||
<!-- 更新客户基本信息 --> |
|
||||||
<update id="updateCustomer" parameterType="com.daqing.framework.domain.crms.CustomerEntity"> |
|
||||||
UPDATE crms_customer |
|
||||||
SET manager=#{manager},name=#{name},addr=#{addr},phone=#{phone},motify_time=#{motifyTime} |
|
||||||
WHERE id = #{id} |
|
||||||
</update> |
|
||||||
|
|
||||||
<!-- 查询所有的客户基本信息 --> |
|
||||||
<select id="listCustomerId" resultType="long"> |
|
||||||
SELECT id |
|
||||||
FROM crms_customer |
|
||||||
WHERE del_or_not = 0; |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 获取所有客户编号和客户名称 --> |
|
||||||
<select id="queryCompanyCodeAndName" parameterType="int" resultMap="customerMap"> |
|
||||||
SELECT code,`name` from crms_customer where `type` =#{type} and del_or_not = 0 and status = 0 |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 获取最新添加的数据的客户编码 --> |
|
||||||
<select id="getCodeByType" parameterType="integer" resultType="string"> |
|
||||||
SELECT code FROM crms_customer WHERE type = #{type} AND del_or_not = 0 ORDER BY create_time DESC LIMIT 0,1 |
|
||||||
</select> |
|
||||||
</mapper> |
|
@ -1,57 +0,0 @@ |
|||||||
<?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.daqing.financial.crms.dao.PersonalCustomerDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.crms.PersonalCustomerEntity" id="personalCustomerMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="customerId" column="customer_id"/> |
|
||||||
<result property="idCard" column="id_card"/> |
|
||||||
<result property="age" column="age"/> |
|
||||||
<result property="gender" column="gender"/> |
|
||||||
<result property="maritalStatus" column="marital_status"/> |
|
||||||
<result property="education" column="education"/> |
|
||||||
<result property="employer" column="employer"/> |
|
||||||
<result property="position" column="position"/> |
|
||||||
<result property="workingYears" column="working_years"/> |
|
||||||
<result property="socialSecurityNum" column="social_security_num"/> |
|
||||||
<result property="livingSituation" column="living_situation"/> |
|
||||||
<result property="residenceAddr" column="residence_addr"/> |
|
||||||
<result property="businessSource" column="business_source"/> |
|
||||||
<result property="emergencyLinkman" column="emergency_linkman"/> |
|
||||||
<result property="emergencyLinkmanRelationship" column="emergency_linkman_relationship"/> |
|
||||||
<result property="emergencyLinkmanPhone" column="emergency_linkman_phone"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<!-- 根据客户基本信息id查询个人类型客户的信息 --> |
|
||||||
<select id="queryPersonalCustomerById" parameterType="long" resultType="com.daqing.framework.domain.crms.PersonalCustomerEntity"> |
|
||||||
SELECT id_card,age,gender,marital_status,education,employer,position,working_years,social_security_num, |
|
||||||
living_situation,residence_addr,business_source,emergency_linkman,emergency_linkman_relationship, |
|
||||||
emergency_linkman_phone |
|
||||||
FROM crms_personal_customer |
|
||||||
WHERE customer_id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 插入个人类型的客户信息 --> |
|
||||||
<insert id="savePersonalCustomer" parameterType="com.daqing.framework.domain.crms.PersonalCustomerEntity"> |
|
||||||
INSERT INTO crms_personal_customer |
|
||||||
(customer_id,id_card,age,gender,marital_status,education,employer,position,working_years,social_security_num,living_situation |
|
||||||
,residence_addr,business_source,emergency_linkman,emergency_linkman_relationship,emergency_linkman_phone) |
|
||||||
VALUES (#{customerId},#{idCard},#{age},#{gender},#{maritalStatus},#{education},#{employer},#{position},#{workingYears}, |
|
||||||
#{socialSecurityNum},#{livingSituation},#{residenceAddr},#{businessSource},#{emergencyLinkman},#{emergencyLinkmanRelationship}, |
|
||||||
#{emergencyLinkmanPhone}); |
|
||||||
</insert> |
|
||||||
|
|
||||||
<!-- 更新个人类型的客户信息 --> |
|
||||||
<update id="updatePersonalCustomer" parameterType="com.daqing.framework.domain.crms.PersonalCustomerEntity"> |
|
||||||
UPDATE crms_personal_customer |
|
||||||
SET id_card=#{idCard},age=#{age},gender=#{gender},marital_status=#{maritalStatus},education=#{education}, |
|
||||||
employer=#{employer},position=#{position},working_years=#{workingYears},social_security_num=#{socialSecurityNum}, |
|
||||||
living_situation=#{livingSituation},residence_addr=#{residenceAddr},business_source=#{businessSource}, |
|
||||||
emergency_linkman=#{emergencyLinkman},emergency_linkman_relationship=#{emergencyLinkmanRelationship}, |
|
||||||
emergency_linkman_phone=#{emergencyLinkmanPhone} |
|
||||||
WHERE customer_id = #{customerId} |
|
||||||
</update> |
|
||||||
|
|
||||||
</mapper> |
|
@ -1,87 +0,0 @@ |
|||||||
# 开发和测试环境(dev) |
|
||||||
spring.application.name=dq-financial-hrms-auth |
|
||||||
|
|
||||||
spring.cloud.nacos.config.server-addr=192.168.31.140:8848 |
|
||||||
spring.cloud.nacos.config.namespace=7632bdaa-3381-4669-b3f9-2fc73be451e8 |
|
||||||
#spring.cloud.nacos.config.group=prod |
|
||||||
|
|
||||||
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml |
|
||||||
spring.cloud.nacos.config.ext-config[0].group=dev |
|
||||||
spring.cloud.nacos.config.ext-config[0].refresh=true |
|
||||||
|
|
||||||
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml |
|
||||||
spring.cloud.nacos.config.ext-config[1].group=dev |
|
||||||
spring.cloud.nacos.config.ext-config[1].refresh=true |
|
||||||
|
|
||||||
spring.cloud.nacos.config.ext-config[2].data-id=other.yml |
|
||||||
spring.cloud.nacos.config.ext-config[2].group=dev |
|
||||||
spring.cloud.nacos.config.ext-config[2].refresh=true |
|
||||||
|
|
||||||
spring.redis.host=127.0.0.1 |
|
||||||
spring.redis.port=6379 |
|
||||||
spring.redis.password=123456 |
|
||||||
spring.redis.database=0 |
|
||||||
spring.redis.timeout=30000 |
|
||||||
spring.redis.jedis.pool.max-active=8 |
|
||||||
spring.redis.jedis.pool.max-wait=-1 |
|
||||||
spring.redis.jedis.pool.max-idle=8 |
|
||||||
spring.redis.jedis.pool.min-idle=0 |
|
||||||
|
|
||||||
|
|
||||||
#正式环境(prod) |
|
||||||
#spring.application.name=dq-financial-hrms-auth |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848 |
|
||||||
#spring.cloud.nacos.config.namespace=b590c830-7ada-44b7-968f-e8d0c81990c4 |
|
||||||
##spring.cloud.nacos.config.group=prod |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[0].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[0].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[1].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[1].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[2].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[2].refresh=true |
|
||||||
# |
|
||||||
#spring.redis.host=127.0.0.1 |
|
||||||
#spring.redis.port=6379 |
|
||||||
#spring.redis.password=dq123456 |
|
||||||
#spring.redis.database=0 |
|
||||||
#spring.redis.timeout=30000 |
|
||||||
#spring.redis.jedis.pool.max-active=8 |
|
||||||
#spring.redis.jedis.pool.max-wait=-1 |
|
||||||
#spring.redis.jedis.pool.max-idle=8 |
|
||||||
#spring.redis.jedis.pool.min-idle=0 |
|
||||||
|
|
||||||
#测试环境(prod) |
|
||||||
#spring.application.name=dq-financial-hrms-auth |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 |
|
||||||
#spring.cloud.nacos.config.namespace=d4e087eb-2a9b-4ef1-9f22-76269a30d081 |
|
||||||
##spring.cloud.nacos.config.group=prod |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[0].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[0].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[1].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[1].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[2].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[2].refresh=true |
|
||||||
# |
|
||||||
#spring.redis.host=127.0.0.1 |
|
||||||
#spring.redis.port=6379 |
|
||||||
#spring.redis.password= |
|
||||||
#spring.redis.database=0 |
|
||||||
#spring.redis.timeout=30000 |
|
||||||
#spring.redis.jedis.pool.max-active=8 |
|
||||||
#spring.redis.jedis.pool.max-wait=-1 |
|
||||||
#spring.redis.jedis.pool.max-idle=8 |
|
||||||
#spring.redis.jedis.pool.min-idle=0 |
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,47 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
|
|
||||||
<configuration> |
|
||||||
<!--定义日志文件的存储地址,使用绝对路径--> |
|
||||||
<property name="LOG_HOME" value="d:/logs/daqing/hrms_auth"/> |
|
||||||
|
|
||||||
<!-- Console 输出设置 --> |
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|
||||||
<encoder> |
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
|
||||||
<charset>utf8</charset> |
|
||||||
</encoder> |
|
||||||
</appender> |
|
||||||
|
|
||||||
<!-- 按照每天生成日志文件 --> |
|
||||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||||
<!--日志文件输出的文件名--> |
|
||||||
<fileNamePattern>${LOG_HOME}/hrms_auth.%d{yyyy-MM-dd}.log</fileNamePattern> |
|
||||||
</rollingPolicy> |
|
||||||
<encoder> |
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
|
||||||
</encoder> |
|
||||||
</appender> |
|
||||||
|
|
||||||
<!-- 异步输出 --> |
|
||||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> |
|
||||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
|
||||||
<discardingThreshold>0</discardingThreshold> |
|
||||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
|
||||||
<queueSize>512</queueSize> |
|
||||||
<!-- 添加附加的appender,最多只能添加一个 --> |
|
||||||
<appender-ref ref="FILE"/> |
|
||||||
</appender> |
|
||||||
|
|
||||||
|
|
||||||
<logger name="org.apache.ibatis.cache.decorators.LoggingCache" level="DEBUG" additivity="false"> |
|
||||||
<appender-ref ref="CONSOLE"/> |
|
||||||
</logger> |
|
||||||
<logger name="org.springframework.boot" level="DEBUG"/> |
|
||||||
<root level="info"> |
|
||||||
<!--<appender-ref ref="ASYNC"/>--> |
|
||||||
<appender-ref ref="FILE"/> |
|
||||||
<appender-ref ref="CONSOLE"/> |
|
||||||
</root> |
|
||||||
</configuration> |
|
@ -1,12 +0,0 @@ |
|||||||
#security: |
|
||||||
# oauth2: |
|
||||||
# client: |
|
||||||
# client-id: user-client |
|
||||||
# client-secret: user-secret-8888 |
|
||||||
# user-authorization-uri: http://localhost:7000/oauth/authorize |
|
||||||
# access-token-uri: http://localhost:7000/oauth/token |
|
||||||
# resource: |
|
||||||
# id: user-client |
|
||||||
# user-info-uri: user-info |
|
||||||
# authorization: |
|
||||||
# check-token-access: http://localhost:7000/oauth/check_token |
|
@ -1,100 +0,0 @@ |
|||||||
#服务名称 |
|
||||||
spring.application.name=dq-financial-hrms |
|
||||||
#配置中心地址 |
|
||||||
spring.cloud.nacos.config.server-addr=192.168.31.140:8848 |
|
||||||
spring.cloud.nacos.config.namespace=4c56c2f9-b6a3-4e7b-88b8-b1001e86dfd6 |
|
||||||
#spring.cloud.nacos.config.group=prod |
|
||||||
|
|
||||||
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml |
|
||||||
spring.cloud.nacos.config.ext-config[0].group=dev |
|
||||||
spring.cloud.nacos.config.ext-config[0].refresh=true |
|
||||||
|
|
||||||
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml |
|
||||||
spring.cloud.nacos.config.ext-config[1].group=dev |
|
||||||
spring.cloud.nacos.config.ext-config[1].refresh=true |
|
||||||
|
|
||||||
spring.cloud.nacos.config.ext-config[2].data-id=other.yml |
|
||||||
spring.cloud.nacos.config.ext-config[2].group=dev |
|
||||||
spring.cloud.nacos.config.ext-config[2].refresh=true |
|
||||||
|
|
||||||
spring.redis.host=127.0.0.1 |
|
||||||
spring.redis.port=6379 |
|
||||||
spring.redis.password=123456 |
|
||||||
spring.redis.database=0 |
|
||||||
spring.redis.timeout=30000 |
|
||||||
spring.redis.jedis.pool.max-active=8 |
|
||||||
spring.redis.jedis.pool.max-wait=-1 |
|
||||||
spring.redis.jedis.pool.max-idle=8 |
|
||||||
spring.redis.jedis.pool.min-idle=0 |
|
||||||
|
|
||||||
#请求处理的超时时间 |
|
||||||
ribbon.ReadTimeout: 120000 |
|
||||||
#请求连接的超时时间 |
|
||||||
ribbon.ConnectTimeout: 30000 |
|
||||||
|
|
||||||
|
|
||||||
spring.servlet.multipart.max-file-size=10MB |
|
||||||
spring.servlet.multipart.max-request-size=10MB |
|
||||||
|
|
||||||
# 正式环境(prod) |
|
||||||
#服务名称 |
|
||||||
#spring.application.name=dq-financial-hrms |
|
||||||
##配置中心地址 |
|
||||||
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848 |
|
||||||
#spring.cloud.nacos.config.namespace=69614b55-1521-421c-ac58-dbe4a5b01b43 |
|
||||||
##spring.cloud.nacos.config.group=prod |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[0].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[0].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[1].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[1].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[2].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[2].refresh=true |
|
||||||
# |
|
||||||
#spring.redis.host=127.0.0.1 |
|
||||||
#spring.redis.port=6379 |
|
||||||
#spring.redis.password=dq123456 |
|
||||||
#spring.redis.database=0 |
|
||||||
#spring.redis.timeout=30000 |
|
||||||
#spring.redis.jedis.pool.max-active=8 |
|
||||||
#spring.redis.jedis.pool.max-wait=-1 |
|
||||||
#spring.redis.jedis.pool.max-idle=8 |
|
||||||
#spring.redis.jedis.pool.min-idle=0 |
|
||||||
# |
|
||||||
#spring.servlet.multipart.max-file-size=10MB |
|
||||||
#spring.servlet.multipart.max-request-size=10MB |
|
||||||
|
|
||||||
# 测试环境(prod) |
|
||||||
#服务名称 |
|
||||||
#spring.application.name=dq-financial-hrms |
|
||||||
##配置中心地址 |
|
||||||
#spring.cloud.nacos.config.server-addr=127.0.0.1:8848 |
|
||||||
#spring.cloud.nacos.config.namespace=ed20f51f-6038-44e6-8e28-7ac72625e7b0 |
|
||||||
##spring.cloud.nacos.config.group=prod |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[0].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[0].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[1].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[1].refresh=true |
|
||||||
# |
|
||||||
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml |
|
||||||
#spring.cloud.nacos.config.ext-config[2].group=prod |
|
||||||
#spring.cloud.nacos.config.ext-config[2].refresh=true |
|
||||||
# |
|
||||||
#spring.redis.host=127.0.0.1 |
|
||||||
#spring.redis.port=6379 |
|
||||||
#spring.redis.password= |
|
||||||
#spring.redis.database=0 |
|
||||||
#spring.redis.timeout=30000 |
|
||||||
#spring.redis.jedis.pool.max-active=8 |
|
||||||
#spring.redis.jedis.pool.max-wait=-1 |
|
||||||
#spring.redis.jedis.pool.max-idle=8 |
|
||||||
#spring.redis.jedis.pool.min-idle=0 |
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,47 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
|
|
||||||
<configuration> |
|
||||||
<!--定义日志文件的存储地址,使用绝对路径--> |
|
||||||
<property name="LOG_HOME" value="d:/logs/daqing/hrms"/> |
|
||||||
|
|
||||||
<!-- Console 输出设置 --> |
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|
||||||
<encoder> |
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> |
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
|
||||||
<charset>utf8</charset> |
|
||||||
</encoder> |
|
||||||
</appender> |
|
||||||
|
|
||||||
<!-- 按照每天生成日志文件 --> |
|
||||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||||
<!--日志文件输出的文件名--> |
|
||||||
<fileNamePattern>${LOG_HOME}/hrms.%d{yyyy-MM-dd}.log</fileNamePattern> |
|
||||||
</rollingPolicy> |
|
||||||
<encoder> |
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> |
|
||||||
</encoder> |
|
||||||
</appender> |
|
||||||
|
|
||||||
<!-- 异步输出 --> |
|
||||||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> |
|
||||||
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
|
||||||
<discardingThreshold>0</discardingThreshold> |
|
||||||
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
|
||||||
<queueSize>512</queueSize> |
|
||||||
<!-- 添加附加的appender,最多只能添加一个 --> |
|
||||||
<appender-ref ref="FILE"/> |
|
||||||
</appender> |
|
||||||
|
|
||||||
|
|
||||||
<logger name="org.apache.ibatis.cache.decorators.LoggingCache" level="DEBUG" additivity="false"> |
|
||||||
<appender-ref ref="CONSOLE"/> |
|
||||||
</logger> |
|
||||||
<logger name="org.springframework.boot" level="DEBUG"/> |
|
||||||
<root level="info"> |
|
||||||
<!--<appender-ref ref="ASYNC"/>--> |
|
||||||
<appender-ref ref="FILE"/> |
|
||||||
<appender-ref ref="CONSOLE"/> |
|
||||||
</root> |
|
||||||
</configuration> |
|
@ -1,92 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.DeptDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.DeptEntity" id="deptMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="parentId" column="parent_id"/> |
|
||||||
<result property="level" column="level"/> |
|
||||||
<result property="sort" column="sort"/> |
|
||||||
<result property="createTime" column="create_time"/> |
|
||||||
<result property="motifyTime" column="motify_time"/> |
|
||||||
</resultMap> |
|
||||||
<!-- 部门树及各级部门下的员工 --> |
|
||||||
<select id="getMaxSort" parameterType="java.lang.Long" resultType="java.lang.Integer"> |
|
||||||
SELECT MAX(sort) FROM hrms_dept WHERE parent_id = #{parentId} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="getEmpDeptCount" parameterType="java.lang.Long" resultType="java.lang.Integer"> |
|
||||||
SELECT count(1) FROM hrms_employee_dept AS ed |
|
||||||
LEFT JOIN hrms_employee AS e |
|
||||||
ON ed.employee_id = e.id |
|
||||||
LEFT JOIN hrms_user AS u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND dept_id = #{deptId} |
|
||||||
</select> |
|
||||||
<select id="getByPositionId" resultType="com.daqing.framework.domain.hrms.DeptEntity"> |
|
||||||
SELECT |
|
||||||
d.* |
|
||||||
FROM |
|
||||||
hrms_dept d |
|
||||||
INNER JOIN hrms_dept_position dp ON d.id = dp.dept_id |
|
||||||
WHERE |
|
||||||
dp.position_id = #{positionId} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="listDepartment" resultType="com.daqing.framework.domain.hrms.DepartmentVO"> |
|
||||||
SELECT id,name,parent_id,sort |
|
||||||
FROM hrms_dept |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="getDepartmentByParentId" parameterType="long" resultType="com.daqing.framework.domain.hrms.DepartmentVO"> |
|
||||||
SELECT id,name,parent_id,sort |
|
||||||
FROM hrms_dept WHERE parent_id = #{parentId} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="listDepartmentIdAndName" resultType="com.daqing.framework.domain.hrms.DepartmentVO"> |
|
||||||
SELECT id,name FROM hrms_dept |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="listEmployeeById" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO"> |
|
||||||
SELECT DISTINCT e.id id,e.name name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON e.id = ed.employee_id |
|
||||||
LEFT JOIN hrms_dept d |
|
||||||
ON d.id = ed.dept_id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND d.id IN |
|
||||||
( SELECT d.id |
|
||||||
FROM hrms_dept d |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON d.id = ed.dept_id |
|
||||||
LEFT JOIN hrms_employee e |
|
||||||
ON e.id = ed.employee_id |
|
||||||
WHERE e.id = #{id} |
|
||||||
) |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="listEmployeeByDeptId" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO"> |
|
||||||
SELECT e.id id,e.name name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON e.id = ed.employee_id |
|
||||||
LEFT JOIN hrms_dept d |
|
||||||
ON ed.dept_id = d.id |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND d.id = #{deptId} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="listDepartments" resultType="java.util.Map"> |
|
||||||
SELECT id,name FROM hrms_dept |
|
||||||
</select> |
|
||||||
|
|
||||||
</mapper> |
|
@ -1,28 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.DeptPositionDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.DeptPositionEntity" id="deptPositionMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="deptId" column="dept_id"/> |
|
||||||
<result property="positionId" column="position_id"/> |
|
||||||
</resultMap> |
|
||||||
<insert id="saveBatch" parameterType="java.util.List"> |
|
||||||
INSERT INTO hrms_dept_position (id, dept_id, position_id) |
|
||||||
VALUES |
|
||||||
<foreach collection="list" index="index" separator="," item="item"> |
|
||||||
(#{item.id}, #{item.deptId}, #{item.positionId}) |
|
||||||
</foreach> |
|
||||||
</insert> |
|
||||||
|
|
||||||
<delete id="deleteByPositionId"> |
|
||||||
DELETE |
|
||||||
FROM |
|
||||||
hrms_dept_position |
|
||||||
WHERE |
|
||||||
position_id = #{positionId} |
|
||||||
</delete> |
|
||||||
|
|
||||||
</mapper> |
|
@ -1,629 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.EmployeeDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.EmployeeEntity" id="employeeMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="gender" column="gender"/> |
|
||||||
<result property="birthday" column="birthday"/> |
|
||||||
<result property="officePhone" column="office_phone"/> |
|
||||||
<result property="phone" column="phone"/> |
|
||||||
<result property="companyMail" column="company_mail"/> |
|
||||||
<result property="spareMail" column="spare_mail"/> |
|
||||||
<result property="positionDescription" column="position_description"/> |
|
||||||
<result property="jobNumber" column="job_number"/> |
|
||||||
<result property="headPortaritUrl" column="head_portarit_url"/> |
|
||||||
<result property="userId" column="user_id"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<!-- 不含部门id时列表 --> |
|
||||||
<resultMap id="employeeList" type="com.daqing.framework.domain.hrms.ext.EmployeeListVO"> |
|
||||||
<id property="id" column="id"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="jobNumber" column="job_number"/> |
|
||||||
<association property="account" javaType="string"> |
|
||||||
<result column="account"/> |
|
||||||
</association> |
|
||||||
<association property="createTime" javaType="java.util.Date"> |
|
||||||
<result column="create_time"/> |
|
||||||
</association> |
|
||||||
<association property="status" javaType="integer"> |
|
||||||
<result column="status"/> |
|
||||||
</association> |
|
||||||
<collection property="departmentNameList" ofType="string" column="id" select="departmentList"/> |
|
||||||
<collection property="positionNameList" ofType="string" column="id" select="positionList"/> |
|
||||||
<collection property="roleNameList" ofType="string" column="id" select="roleList"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<!-- 含有部门时列表 --> |
|
||||||
<resultMap id="employeeAndDeptList" type="com.daqing.framework.domain.hrms.ext.EmployeeListVO"> |
|
||||||
<id property="id" column="id"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="jobNumber" column="job_number"/> |
|
||||||
<association property="account" javaType="string"> |
|
||||||
<result column="account"/> |
|
||||||
</association> |
|
||||||
<association property="createTime" javaType="java.util.Date"> |
|
||||||
<result column="create_time"/> |
|
||||||
</association> |
|
||||||
<association property="status" javaType="integer"> |
|
||||||
<result column="status"/> |
|
||||||
</association> |
|
||||||
<collection property="departmentNameList" ofType="string" column="id" select="departmentList"/> |
|
||||||
<collection property="positionNameList" ofType="string" column="id" select="positionList"/> |
|
||||||
<collection property="roleNameList" ofType="string" column="id" select="roleList"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<!-- 员工详情(人力后台展示) --> |
|
||||||
<resultMap id="employeeInfo" type="com.daqing.framework.domain.hrms.ext.EmployeeInfoVO"> |
|
||||||
<id property="id" column="id"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="jobNumber" column="job_number"/> |
|
||||||
<result property="gender" column="gender"/> |
|
||||||
<result property="birthday" column="birthday"/> |
|
||||||
<result property="phone" column="phone"/> |
|
||||||
<result property="companyMail" column="company_mail"/> |
|
||||||
<association property="account" javaType="string"> |
|
||||||
<result column="account"/> |
|
||||||
</association> |
|
||||||
<association property="status" javaType="integer"> |
|
||||||
<result column="status"/> |
|
||||||
</association> |
|
||||||
<collection property="departments" ofType="com.daqing.framework.domain.hrms.DeptEntity"> |
|
||||||
<id property="id" column="dept_id"/> |
|
||||||
<result property="name" column="dept_name"/> |
|
||||||
</collection> |
|
||||||
<collection property="positions" ofType="com.daqing.framework.domain.hrms.PositionEntity"> |
|
||||||
<id property="id" column="position_id"/> |
|
||||||
<result property="name" column="position_name"/> |
|
||||||
</collection> |
|
||||||
<collection property="roles" ofType="com.daqing.framework.domain.hrms.RoleEntity"> |
|
||||||
<id property="id" column="role_id"/> |
|
||||||
<result property="name" column="role_name"/> |
|
||||||
</collection> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<!-- 员工详情(人力工作台展示) --> |
|
||||||
<resultMap id="employeeInfoByUserId" type="com.daqing.framework.domain.hrms.ext.EmployeeAndUserVO"> |
|
||||||
<id property="id" column="id"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="jobNumber" column="job_number"/> |
|
||||||
<result property="gender" column="gender"/> |
|
||||||
<result property="birthday" column="birthday"/> |
|
||||||
<result property="phone" column="phone"/> |
|
||||||
<result property="companyMail" column="company_mail"/> |
|
||||||
<result property="spareMail" column="spare_mail"/> |
|
||||||
<result property="officePhone" column="office_phone"/> |
|
||||||
<result property="positionDescription" column="position_description"/> |
|
||||||
<result property="headPortaritUrl" column="head_portarit_url"/> |
|
||||||
<result property="userId" column="user_id"/> |
|
||||||
<association property="account" javaType="string"> |
|
||||||
<result column="account"/> |
|
||||||
</association> |
|
||||||
<association property="password" javaType="string"> |
|
||||||
<result column="password"/> |
|
||||||
</association> |
|
||||||
<association property="loginNum" javaType="integer"> |
|
||||||
<result column="login_num"/> |
|
||||||
</association> |
|
||||||
<association property="lasttime" javaType="java.util.Date"> |
|
||||||
<result column="lasttime"/> |
|
||||||
</association> |
|
||||||
<association property="phoneAccount" javaType="string"> |
|
||||||
<result column="phone_account"/> |
|
||||||
</association> |
|
||||||
<association property="wechatId" javaType="string"> |
|
||||||
<result column="wechat_id"/> |
|
||||||
</association> |
|
||||||
<collection property="departments" ofType="string"> |
|
||||||
<result column="dept_name"/> |
|
||||||
</collection> |
|
||||||
<collection property="positions" ofType="string"> |
|
||||||
<result column="position_name"/> |
|
||||||
</collection> |
|
||||||
<collection property="roles" ofType="string"> |
|
||||||
<result column="role_name"/> |
|
||||||
</collection> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<!-- 映射user实体类和数据库表主键,使之能获取到新增的主键 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.UserEntity" id="userMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.ext.EmployeeTO" id="employeeTO"> |
|
||||||
<id property="id" column="eid"/> |
|
||||||
<result property="empName" column="emp_name"/> |
|
||||||
<collection property="deptNames" ofType="string"> |
|
||||||
<result column="dept_name"/> <!-- 员工和部门是多对多,从单个员工的角度看为一对多 --> |
|
||||||
</collection> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<!-- 根据员工id查询员工的姓名和部门信息 --> |
|
||||||
<select id="getEmployeeAndDeptById" resultMap="employeeTO"> |
|
||||||
SELECT e.id eid,e.name emp_name,d.name dept_name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON e.id = ed.employee_id |
|
||||||
LEFT JOIN hrms_dept d |
|
||||||
ON d.id = ed.dept_id |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND e.id |
|
||||||
IN |
|
||||||
<foreach collection="ids" open="(" separator="," close=")" item="id"> |
|
||||||
#{id} |
|
||||||
</foreach> |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 根据id查询员工姓名 --> |
|
||||||
<select id="getEmployeeById" parameterType="long" resultType="com.daqing.framework.domain.hrms.EmployeeEntity"> |
|
||||||
SELECT e.name name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND e.id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 根据部门id获取该部门下面所有的员工 --> |
|
||||||
<select id="listEmployeeByDeptId" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO"> |
|
||||||
SELECT e.id,e.name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON e.id = ed.employee_id |
|
||||||
LEFT JOIN hrms_dept d |
|
||||||
ON ed.dept_id = d.id |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND d.id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 根据部门id获取该部门下面所有的员工 --> |
|
||||||
<select id="listEmployeeByDeptIdAndEmpId" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO"> |
|
||||||
SELECT e.id,e.name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON e.id = ed.employee_id |
|
||||||
LEFT JOIN hrms_dept d |
|
||||||
ON ed.dept_id = d.id |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND d.id = #{id} |
|
||||||
<if test="name != null and name != ''"> |
|
||||||
AND e.name LIKE CONCAT('%',#{name},'%') |
|
||||||
</if> |
|
||||||
<if test="empIds != null and empIds != ''"> |
|
||||||
AND e.id NOT IN |
|
||||||
<foreach collection="empIds" item="empId" open="(" separator="," close=")"> |
|
||||||
#{empId} |
|
||||||
</foreach> |
|
||||||
</if> |
|
||||||
</select> |
|
||||||
|
|
||||||
|
|
||||||
<!-- 根据部门id获取该部门下面所有的员工 --> |
|
||||||
<select id="employeeListByDeptId" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.UserDeptVO"> |
|
||||||
SELECT |
|
||||||
u.id, |
|
||||||
e.name as account , GROUP_CONCAT(er.role_id SEPARATOR ',') roleId |
|
||||||
FROM |
|
||||||
hrms_employee e |
|
||||||
LEFT JOIN hrms_employee_dept ed ON e.id = ed.employee_id |
|
||||||
LEFT JOIN hrms_dept d ON ed.dept_id = d.id |
|
||||||
LEFT JOIN hrms_user u ON e.user_id = u.id |
|
||||||
left join hrms_employee_role er on e.user_id = er.user_id |
|
||||||
WHERE |
|
||||||
u.del_or_not = 0 |
|
||||||
AND d.id = #{id} |
|
||||||
<if test="account != null"> |
|
||||||
AND e.name LIKE CONCAT('%',#{account},'%') |
|
||||||
</if> |
|
||||||
GROUP BY u.id |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 查询所有的员工姓名和id --> |
|
||||||
<select id="listEmployeeName" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO"> |
|
||||||
SELECT e.id id,e.name name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- //TODO 修改查询员工为user表的del_or_not = 0的员工 --> |
|
||||||
<select id="pageByCondition" resultMap="employeeMap"> |
|
||||||
SELECT e.id eid,e.name emp_name,d.name |
|
||||||
,u.account,e.job_number,u.create_time,p.name pos_name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_employee_dept ed ON e.id = ed.employee_id |
|
||||||
LEFT JOIN hrms_dept d ON d.id = ed.dept_id |
|
||||||
LEFT JOIN hrms_user u ON e.user_id = u.id |
|
||||||
LEFT JOIN hrms_employee_position ep ON e.id = ep.emp_id |
|
||||||
LEFT JOIN hrms_position p ON p.id = ep.position_id |
|
||||||
<where> |
|
||||||
<if test="employee.name != null and employee.name != ''"> |
|
||||||
e.`name` LIKE CONCAT('%',#{employee.name},'%') |
|
||||||
</if> |
|
||||||
<if test="employee.jobNumber != null and employee.jobNumber != ''"> |
|
||||||
AND e.job_number = #{employee.jobNumber} |
|
||||||
</if> |
|
||||||
AND u.del_or_not = 0 |
|
||||||
</where> |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="pageList" parameterType="com.daqing.framework.domain.hrms.request.EmployeeRequest" |
|
||||||
resultMap="employeeList"> |
|
||||||
SELECT e.id id,e.name name,u.account account,e.job_number job_number, |
|
||||||
u.create_time create_time,u.status status |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
<if test="employee.codeOrName != null and employee.codeOrName != ''"> |
|
||||||
AND (e.name LIKE CONCAT('%',#{employee.codeOrName},'%') OR u.account LIKE |
|
||||||
CONCAT('%',#{employee.codeOrName},'%') |
|
||||||
OR e.job_number LIKE CONCAT('%',#{employee.codeOrName},'%')) |
|
||||||
</if> |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="excelList" resultMap="employeeList"> |
|
||||||
SELECT e.id id,e.name name,u.account account,e.job_number job_number, |
|
||||||
u.create_time create_time,u.status status |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="pageListByDept" parameterType="com.daqing.framework.domain.hrms.request.EmployeeRequest" |
|
||||||
resultMap="employeeList"> |
|
||||||
SELECT e.id id,e.name name,u.account account,e.job_number job_number, |
|
||||||
u.create_time create_time,u.status status |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON e.id = ed.employee_id |
|
||||||
LEFT JOIN hrms_dept d |
|
||||||
ON ed.dept_id = d.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
<if test="employee.id != null and employee.id != ''"> |
|
||||||
AND d.id = #{employee.id} |
|
||||||
</if> |
|
||||||
<if test="employee.codeOrName != null and employee.codeOrName != ''"> |
|
||||||
AND (e.name LIKE CONCAT('%',#{employee.codeOrName},'%') OR u.account LIKE |
|
||||||
CONCAT('%',#{employee.codeOrName},'%') |
|
||||||
OR e.job_number LIKE CONCAT('%',#{employee.codeOrName},'%')) |
|
||||||
</if> |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="departmentList" parameterType="long" resultType="string"> |
|
||||||
SELECT d.name |
|
||||||
FROM hrms_dept d |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON d.id = ed.dept_id |
|
||||||
LEFT JOIN hrms_employee e |
|
||||||
ON ed.employee_id = e.id |
|
||||||
WHERE e.id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="positionList" parameterType="long" resultType="string"> |
|
||||||
SELECT p.name |
|
||||||
FROM hrms_position p |
|
||||||
LEFT JOIN hrms_employee_position ep |
|
||||||
ON p.id = ep.position_id |
|
||||||
LEFT JOIN hrms_employee e |
|
||||||
ON ep.emp_id = e.id |
|
||||||
WHERE e.id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="roleList" parameterType="long" resultType="string"> |
|
||||||
SELECT r.name |
|
||||||
FROM hrms_role r |
|
||||||
LEFT JOIN hrms_employee_role er |
|
||||||
ON r.id = er.role_id |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON u.id = er.user_id |
|
||||||
LEFT JOIN hrms_employee e |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE e.id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 根据employee id得到 user_id--> |
|
||||||
<select id="queryIds" parameterType="long" resultType="long"> |
|
||||||
SELECT user_id FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND e.id IN |
|
||||||
<foreach collection="ids" open="(" separator="," close=")" item="id"> |
|
||||||
#{id} |
|
||||||
</foreach> |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 删除:del_or_not = 1 --> |
|
||||||
<delete id="deleteByIds" parameterType="long"> |
|
||||||
UPDATE hrms_user SET del_or_not = 1 WHERE id IN |
|
||||||
<foreach collection="ids" open="(" separator="," close=")" item="id"> |
|
||||||
#{id} |
|
||||||
</foreach> |
|
||||||
</delete> |
|
||||||
|
|
||||||
<select id="getStatus" parameterType="long" resultType="integer"> |
|
||||||
SELECT u.status status FROM hrms_user u |
|
||||||
LEFT JOIN hrms_employee e |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND e.id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 启用或者禁用 --> |
|
||||||
<update id="startOrStop" parameterType="com.daqing.framework.domain.hrms.UserEntity"> |
|
||||||
UPDATE hrms_user SET status = #{status},disable_start_time = #{disableStartTime}, |
|
||||||
disable_end_time = #{disableEndTime},disable_cause = #{disableCause} |
|
||||||
WHERE id = #{id} |
|
||||||
</update> |
|
||||||
|
|
||||||
<!-- 禁用详情--> |
|
||||||
<select id="forbidInfo" parameterType="long" resultType="com.daqing.framework.domain.hrms.UserEntity"> |
|
||||||
SELECT disable_start_time,disable_end_time,disable_cause |
|
||||||
FROM hrms_user WHERE id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 所有的禁用时间 --> |
|
||||||
<select id="listDisableTime" resultType="com.daqing.framework.domain.hrms.UserEntity"> |
|
||||||
SELECT id,disable_start_time,disable_end_time,disable_cause |
|
||||||
FROM hrms_user WHERE status = 1 OR status = 2 |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 获取user_id--> |
|
||||||
<select id="getUserId" resultType="long"> |
|
||||||
SELECT user_id FROM hrms_employee WHERE id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 重置密码 --> |
|
||||||
<update id="updatePassword"> |
|
||||||
UPDATE hrms_user SET password = #{password} WHERE id = #{id} |
|
||||||
</update> |
|
||||||
|
|
||||||
<select id="getInfo" resultMap="employeeInfo" parameterType="long"> |
|
||||||
SELECT e.id id,e.name name,e.job_number job_number,e.phone phone,e.gender gender, |
|
||||||
e.birthday birthday,e.company_mail company_mail,u.account account,u.status status, |
|
||||||
d.id dept_id,d.name dept_name,r.id role_id,r.name role_name,po.id position_id, |
|
||||||
po.name position_name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON ed.employee_id = e.id |
|
||||||
LEFT JOIN hrms_dept d |
|
||||||
ON ed.dept_id = d.id |
|
||||||
LEFT JOIN hrms_employee_role er |
|
||||||
ON er.user_id = u.id |
|
||||||
LEFT JOIN hrms_role r |
|
||||||
ON er.role_id = r.id |
|
||||||
LEFT JOIN hrms_employee_position ep |
|
||||||
ON ep.emp_id = e.id |
|
||||||
LEFT JOIN hrms_position po |
|
||||||
ON ep.position_id = po.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND e.id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<update id="updateEmployee" parameterType="com.daqing.framework.domain.hrms.EmployeeEntity"> |
|
||||||
UPDATE hrms_employee SET name = #{name},job_number = #{jobNumber},gender = #{gender},birthday = #{birthday}, |
|
||||||
phone = #{phone},company_mail = #{companyMail} |
|
||||||
WHERE id = #{id} |
|
||||||
</update> |
|
||||||
|
|
||||||
<update id="updateUser"> |
|
||||||
UPDATE hrms_user SET account = #{account},motify_time = #{modifyTime} WHERE id = #{id} |
|
||||||
</update> |
|
||||||
|
|
||||||
<delete id="deleteDepartment" parameterType="long"> |
|
||||||
DELETE FROM hrms_employee_dept WHERE employee_id = #{id} |
|
||||||
</delete> |
|
||||||
|
|
||||||
<delete id="deletePosition" parameterType="long"> |
|
||||||
DELETE FROM hrms_employee_position WHERE emp_id = #{id} |
|
||||||
</delete> |
|
||||||
|
|
||||||
<delete id="deleteRole" parameterType="long"> |
|
||||||
DELETE FROM hrms_employee_role WHERE user_id = #{id} |
|
||||||
</delete> |
|
||||||
|
|
||||||
<insert id="insertDepartment"> |
|
||||||
INSERT INTO hrms_employee_dept |
|
||||||
(employee_id,dept_id) |
|
||||||
VALUES |
|
||||||
<foreach collection="deptIds" item="deptId" separator=","> |
|
||||||
(#{id},#{deptId}) |
|
||||||
</foreach> |
|
||||||
</insert> |
|
||||||
|
|
||||||
<insert id="insertPosition"> |
|
||||||
INSERT INTO hrms_employee_position |
|
||||||
(emp_id,position_id) |
|
||||||
VALUES |
|
||||||
<foreach collection="positionIds" item="positionId" separator=","> |
|
||||||
(#{id},#{positionId}) |
|
||||||
</foreach> |
|
||||||
</insert> |
|
||||||
|
|
||||||
<insert id="insertRole"> |
|
||||||
INSERT INTO hrms_employee_role |
|
||||||
(user_id,role_id) |
|
||||||
VALUES |
|
||||||
<foreach collection="roleIds" item="roleId" separator=","> |
|
||||||
(#{id},#{roleId}) |
|
||||||
</foreach> |
|
||||||
</insert> |
|
||||||
|
|
||||||
<insert id="insertUsrRole"> |
|
||||||
INSERT INTO hrms_employee_role |
|
||||||
(user_id,role_id) |
|
||||||
VALUES |
|
||||||
<foreach collection="list" item="item" separator=","> |
|
||||||
(#{item.userId},#{item.roleId}) |
|
||||||
</foreach> |
|
||||||
</insert> |
|
||||||
|
|
||||||
<insert id="insertUserRole"> |
|
||||||
INSERT INTO hrms_employee_role |
|
||||||
(user_id,role_id) |
|
||||||
VALUES (#{userId},#{roleId}) |
|
||||||
</insert> |
|
||||||
|
|
||||||
<insert id="saveUserRole"> |
|
||||||
INSERT INTO hrms_employee_role |
|
||||||
(user_id,role_id) |
|
||||||
VALUES (#{userId},#{roleId}) |
|
||||||
</insert> |
|
||||||
|
|
||||||
<insert id="insertEmployee" keyProperty="id" useGeneratedKeys="true" |
|
||||||
parameterType="com.daqing.framework.domain.hrms.EmployeeEntity"> |
|
||||||
INSERT INTO hrms_employee (name,job_number,gender,birthday,phone,company_mail,user_id) |
|
||||||
VALUES (#{name},#{jobNumber},#{gender},#{birthday},#{phone},#{companyMail},#{userId}) |
|
||||||
</insert> |
|
||||||
|
|
||||||
<insert id="insertUser" keyProperty="id" useGeneratedKeys="true" |
|
||||||
parameterType="com.daqing.framework.domain.hrms.UserEntity"> |
|
||||||
INSERT INTO hrms_user (account,create_time,motify_time) VALUES (#{account},#{createTime},#{motifyTime}) |
|
||||||
</insert> |
|
||||||
|
|
||||||
<select id="getEmployeeByUserId" parameterType="long" resultMap="employeeInfoByUserId"> |
|
||||||
SELECT e.id id,e.name name,e.job_number job_number,e.phone phone,e.gender gender, |
|
||||||
e.birthday birthday,e.company_mail company_mail,e.spare_mail spare_mail, |
|
||||||
e.office_phone office_phone,e.position_description position_description, |
|
||||||
e.head_portarit_url head_portarit_url,e.user_id user_id,u.account account, |
|
||||||
u.password password,u.login_num login_num,u.lasttime lasttime,u.phone_account |
|
||||||
phone_account,u.wechat_id wechat_id,d.name dept_name,r.name role_name, |
|
||||||
po.name position_name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
LEFT JOIN hrms_employee_dept ed |
|
||||||
ON ed.employee_id = e.id |
|
||||||
LEFT JOIN hrms_dept d |
|
||||||
ON ed.dept_id = d.id |
|
||||||
LEFT JOIN hrms_employee_role er |
|
||||||
ON er.user_id = u.id |
|
||||||
LEFT JOIN hrms_role r |
|
||||||
ON er.role_id = r.id |
|
||||||
LEFT JOIN hrms_employee_position ep |
|
||||||
ON ep.emp_id = e.id |
|
||||||
LEFT JOIN hrms_position po |
|
||||||
ON ep.position_id = po.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND u.id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<update id="updateEmployeeAndUser" parameterType="com.daqing.framework.domain.hrms.EmployeeEntity"> |
|
||||||
UPDATE hrms_employee SET gender = #{gender},office_phone = #{officePhone},phone = #{phone}, |
|
||||||
company_mail = #{companyMail},spare_mail = #{spareMail} |
|
||||||
<if test="headPortaritUrl != null and headPortaritUrl != ''"> |
|
||||||
,head_portarit_url = #{headPortaritUrl} |
|
||||||
</if> |
|
||||||
WHERE id = #{id} |
|
||||||
</update> |
|
||||||
|
|
||||||
<!-- 根据id查询员工头像 --> |
|
||||||
<select id="getEmployeeEntityByUserId" parameterType="long" |
|
||||||
resultType="com.daqing.framework.domain.hrms.EmployeeEntity"> |
|
||||||
SELECT head_portarit_url |
|
||||||
FROM hrms_employee |
|
||||||
WHERE user_id = #{userId} |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 新增员工时判断姓名、工号、账号是否存在 --> |
|
||||||
<select id="employeeNameCount" parameterType="string" resultType="integer"> |
|
||||||
SELECT COUNT(e.id) |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND e.name = #{name} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="userAccountCount" parameterType="string" resultType="integer"> |
|
||||||
SELECT COUNT(id) FROM hrms_user WHERE del_or_not = 0 AND account = #{account} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="employeeJobNumberCount" parameterType="string" resultType="integer"> |
|
||||||
SELECT COUNT(e.id) |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND e.job_number = #{jobNumber} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="getEmployeeRepetitionByEmpId" parameterType="long" |
|
||||||
resultType="com.daqing.framework.domain.hrms.ext.EmployeeRepetition"> |
|
||||||
SELECT e.name name,e.job_number job_number,u.account account |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND e.id = #{empId} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="getAccountAndDeptNameById" |
|
||||||
resultType="com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse"> |
|
||||||
select hu.id, hu.account, GROUP_CONCAT(hd.`name` SEPARATOR '/')deptName |
|
||||||
from hrms_employee_dept ed |
|
||||||
LEFT JOIN hrms_dept hd on hd.id=ed.dept_id |
|
||||||
LEFT JOIN hrms_employee he on he.id=ed.employee_id |
|
||||||
LEFT JOIN hrms_user hu on hu.id = he.user_id |
|
||||||
where hu.id IN |
|
||||||
<foreach collection="ids" open="(" separator="," close=")" item="id"> |
|
||||||
#{id} |
|
||||||
</foreach> |
|
||||||
GROUP BY hu.id |
|
||||||
</select> |
|
||||||
|
|
||||||
<!-- 根据userId查询对应的员工姓名 --> |
|
||||||
<select id="listEmpNameByUserId" parameterType="integer" resultType="com.daqing.framework.domain.hrms.ext.EmployeeVO"> |
|
||||||
SELECT u.id id,e.name name |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE u.del_or_not = 0 |
|
||||||
AND u.id IN |
|
||||||
<foreach collection="userIds" open="(" separator="," close=")" item="userId"> |
|
||||||
#{userId} |
|
||||||
</foreach> |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="getListEmployeeTrees" parameterType="long" resultType="com.daqing.framework.domain.hrms.ext.UserDeptVO"> |
|
||||||
SELECT |
|
||||||
u.id, |
|
||||||
e.name as account |
|
||||||
FROM |
|
||||||
hrms_employee e |
|
||||||
LEFT JOIN hrms_employee_dept ed ON e.id = ed.employee_id |
|
||||||
LEFT JOIN hrms_dept d ON ed.dept_id = d.id |
|
||||||
LEFT JOIN hrms_user u ON e.user_id = u.id |
|
||||||
WHERE |
|
||||||
u.del_or_not = 0 |
|
||||||
AND d.id = #{id} |
|
||||||
<if test="account != null"> |
|
||||||
AND e.name LIKE CONCAT('%',#{account},'%') |
|
||||||
</if> |
|
||||||
</select> |
|
||||||
<select id="selectUserRole" resultType="java.lang.Integer"> |
|
||||||
select COUNT(0) from hrms_employee_role where user_id=#{userId} and role_id=#{roleId} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="countUserIdAndRoleId" resultType="integer"> |
|
||||||
SELECT COUNT(id) FROM hrms_employee_role WHERE user_id = #{userId} AND role_id = #{roleId} |
|
||||||
</select> |
|
||||||
|
|
||||||
</mapper> |
|
@ -1,14 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.EmployeeDeptDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.EmployeeDeptEntity" id="employeeDeptMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="employeeId" column="employee_id"/> |
|
||||||
<result property="deptId" column="dept_id"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
|
|
||||||
</mapper> |
|
@ -1,14 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.EmployeePositionDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.EmployeePositionEntity" id="employeePositionMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="empId" column="emp_id"/> |
|
||||||
<result property="positionId" column="position_id"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
|
|
||||||
</mapper> |
|
@ -1,14 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.EmployeeRoleDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.EmployeeRoleEntity" id="employeeRoleMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="userId" column="user_id"/> |
|
||||||
<result property="roleId" column="role_id"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
|
|
||||||
</mapper> |
|
@ -1,41 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.PermissionDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.PermissionEntity" id="permissionMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="code" column="code"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="url" column="url"/> |
|
||||||
<result property="menuUrl" column="menu_url"/> |
|
||||||
<result property="parentId" column="parent_id"/> |
|
||||||
<result property="level" column="level"/> |
|
||||||
<result property="menuOrNot" column="menu_or_not"/> |
|
||||||
<result property="status" column="status"/> |
|
||||||
<result property="sort" column="sort"/> |
|
||||||
<result property="icon" column="icon"/> |
|
||||||
<result property="createTime" column="create_time"/> |
|
||||||
<result property="motifyTime" column="motify_time"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<select id="listPermissionByRoleIds" parameterType="long" resultType="com.daqing.framework.domain.hrms.response.RolePermissionResponse"> |
|
||||||
SELECT rp.permission_id, hp.name permissionName, hp.parent_id, hp.sort |
|
||||||
FROM hrms_role_permission rp |
|
||||||
LEFT JOIN hrms_permission hp |
|
||||||
ON hp.id=rp.permission_id |
|
||||||
WHERE rp.role_id IN |
|
||||||
<foreach collection="ids" open="(" separator="," close=")" item="id"> |
|
||||||
#{id} |
|
||||||
</foreach> |
|
||||||
</select> |
|
||||||
<select id="queryPermissionsByIds" resultType="com.daqing.framework.domain.hrms.PermissionEntity"> |
|
||||||
select * from hrms_permission |
|
||||||
where id in |
|
||||||
<foreach collection="ids" open="(" separator="," close=")" item="id"> |
|
||||||
#{id} |
|
||||||
</foreach> |
|
||||||
</select> |
|
||||||
|
|
||||||
</mapper> |
|
@ -1,100 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.PositionDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.PositionEntity" id="positionMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="introduction" column="introduction"/> |
|
||||||
<result property="sort" column="sort"/> |
|
||||||
<result property="createUser" column="create_user"/> |
|
||||||
<result property="createTime" column="create_time"/> |
|
||||||
<result property="motifyTime" column="motify_time"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.ext.PositionVO" id="positionVOMap"> |
|
||||||
<result property="id" column="position_id"/> |
|
||||||
<result property="name" column="position_name"/> |
|
||||||
<result property="deptNames" column="dept_name"/> |
|
||||||
<result property="createUserName" column="crate_user_name"/> |
|
||||||
<result property="createTime" column="create_time"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<select id="pageByCondition" resultMap="positionVOMap"> |
|
||||||
SELECT |
|
||||||
p.`id`, position_id, |
|
||||||
p.`name` position_name, |
|
||||||
GROUP_CONCAT(d.`name` SEPARATOR '/') dept_name, |
|
||||||
e.`name` crate_user_name, |
|
||||||
p.create_time |
|
||||||
FROM |
|
||||||
hrms_position p |
|
||||||
INNER JOIN hrms_dept_position dp ON p.id = dp.position_id |
|
||||||
INNER JOIN hrms_dept d ON dp.dept_id = d.id |
|
||||||
INNER JOIN hrms_employee e ON p.create_user = e.id |
|
||||||
INNER JOIN hrms_user u ON e.user_id = u.id |
|
||||||
<if test="queryMsg != null and queryMsg != ''"> |
|
||||||
WHERE |
|
||||||
( |
|
||||||
d.`name` LIKE CONCAT('%',#{queryMsg},'%') |
|
||||||
OR p.`name` LIKE CONCAT('%',#{queryMsg},'%') |
|
||||||
) |
|
||||||
</if> |
|
||||||
AND u.del_or_not = 0 |
|
||||||
GROUP BY |
|
||||||
p.id |
|
||||||
ORDER BY |
|
||||||
p.create_time |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="getCountByNameAndDeptId" resultType="java.lang.Integer"> |
|
||||||
SELECT |
|
||||||
COUNT(1) |
|
||||||
FROM |
|
||||||
hrms_position p |
|
||||||
INNER JOIN |
|
||||||
hrms_dept_position dp |
|
||||||
ON |
|
||||||
p.id = dp.position_id |
|
||||||
WHERE |
|
||||||
dp.dept_id = #{deptId} |
|
||||||
AND |
|
||||||
p.name = #{name} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="getCountByNameAndDeptIdAndId" resultType="java.lang.Integer"> |
|
||||||
SELECT |
|
||||||
COUNT(1) |
|
||||||
FROM |
|
||||||
hrms_position p |
|
||||||
INNER JOIN |
|
||||||
hrms_dept_position dp |
|
||||||
ON |
|
||||||
p.id = dp.position_id |
|
||||||
WHERE |
|
||||||
dp.dept_id = #{deptId} |
|
||||||
AND |
|
||||||
p.name = #{name} |
|
||||||
AND |
|
||||||
p.id != #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="listPositionIdAndName" resultType="com.daqing.framework.domain.hrms.ext.PositionVO"> |
|
||||||
SELECT id,name FROM hrms_position |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="listPositionIdAndNameByDeptId" resultType="com.daqing.framework.domain.hrms.ext.PositionVO" parameterType="long"> |
|
||||||
SELECT p.id id,p.name name |
|
||||||
FROM hrms_position p |
|
||||||
LEFT JOIN hrms_dept_position dp |
|
||||||
ON p.id = dp.position_id |
|
||||||
LEFT JOIN hrms_dept d |
|
||||||
ON d.id = dp.dept_id |
|
||||||
WHERE d.id IN |
|
||||||
<foreach collection="deptIds" open="(" separator="," close=")" item="deptId"> |
|
||||||
#{deptId} |
|
||||||
</foreach> |
|
||||||
</select> |
|
||||||
</mapper> |
|
@ -1,19 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.RoleDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.RoleEntity" id="roleMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="name" column="name"/> |
|
||||||
<result property="description" column="description"/> |
|
||||||
<result property="createTime" column="create_time"/> |
|
||||||
<result property="motifyTime" column="motify_time"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<select id="listRoleIdAndName" resultType="com.daqing.framework.domain.hrms.ext.RoleVO"> |
|
||||||
SELECT id,name FROM hrms_role |
|
||||||
</select> |
|
||||||
|
|
||||||
</mapper> |
|
@ -1,21 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.RolePermissionDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.RolePermissionEntity" id="rolePermissionMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="roleId" column="role_id"/> |
|
||||||
<result property="permissionId" column="permission_id"/> |
|
||||||
</resultMap> |
|
||||||
<select id="queryPermissionsByRoleIds" resultType="com.daqing.framework.domain.hrms.RolePermissionEntity"> |
|
||||||
select permission_id from hrms_role_permission |
|
||||||
where role_id in |
|
||||||
<foreach collection="ids" open="(" separator="," close=")" item="id"> |
|
||||||
#{id} |
|
||||||
</foreach> |
|
||||||
|
|
||||||
</select> |
|
||||||
|
|
||||||
</mapper> |
|
@ -1,57 +0,0 @@ |
|||||||
<?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.daqing.financial.hrms.dao.UserDao"> |
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 --> |
|
||||||
<resultMap type="com.daqing.framework.domain.hrms.UserEntity" id="userMap"> |
|
||||||
<result property="id" column="id"/> |
|
||||||
<result property="account" column="account"/> |
|
||||||
<result property="phoneAccount" column="phone_account"/> |
|
||||||
<result property="password" column="password"/> |
|
||||||
<result property="loginNum" column="login_num"/> |
|
||||||
<result property="lasttime" column="lasttime"/> |
|
||||||
<result property="wechatId" column="wechat_id"/> |
|
||||||
<result property="status" column="status"/> |
|
||||||
<result property="disableStartTime" column="disable_start_time"/> |
|
||||||
<result property="disableEndTime" column="disable_end_time"/> |
|
||||||
<result property="disableCause" column="disable_cause"/> |
|
||||||
<result property="delOrNot" column="del_or_not"/> |
|
||||||
<result property="createTime" column="create_time"/> |
|
||||||
<result property="motifyTime" column="motify_time"/> |
|
||||||
</resultMap> |
|
||||||
|
|
||||||
<select id="getPasswordById" parameterType="long" resultType="string"> |
|
||||||
SELECT password FROM hrms_user WHERE del_or_not = 0 AND id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<select id="getAccountById" parameterType="long" resultType="string"> |
|
||||||
SELECT account FROM hrms_user WHERE del_or_not = 0 AND id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<update id="updatePassword"> |
|
||||||
UPDATE hrms_user SET password = #{password} WHERE id = #{id} |
|
||||||
</update> |
|
||||||
|
|
||||||
<select id="getPhoneAccount" parameterType="long" resultType="string"> |
|
||||||
SELECT phone_account FROM hrms_user WHERE del_or_not = 0 AND id = #{id} |
|
||||||
</select> |
|
||||||
|
|
||||||
<update id="updatePhoneAccount"> |
|
||||||
UPDATE hrms_user SET phone_account = #{phoneAccount} WHERE id = #{id} |
|
||||||
</update> |
|
||||||
|
|
||||||
<update id="updateWeChat"> |
|
||||||
UPDATE hrms_user SET wechat_id = #{weChatId} WHERE id = #{id} |
|
||||||
</update> |
|
||||||
|
|
||||||
<select id="getEmployeeIdByUserId" parameterType="long" resultType="long"> |
|
||||||
SELECT e.id id |
|
||||||
FROM hrms_employee e |
|
||||||
LEFT JOIN hrms_user u |
|
||||||
ON e.user_id = u.id |
|
||||||
WHERE del_or_not = 0 |
|
||||||
AND u.id = #{userId} |
|
||||||
</select> |
|
||||||
|
|
||||||
</mapper> |
|
Loading…
Reference in new issue