parent
4242aade43
commit
c20898fe81
139 changed files with 1003 additions and 9 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,18 @@ |
||||
#服务名称 |
||||
spring.application.name=dq-financial-crms |
||||
#配置中心地址 |
||||
spring.cloud.nacos.config.server-addr=192.168.31.142: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 |
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.
@ -0,0 +1,47 @@ |
||||
<?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> |
@ -0,0 +1,44 @@ |
||||
<?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="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="businessSource" column="business_source"/> |
||||
<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 |
||||
(id,registered_capital,industry,years,region,shareholder,affiliated_company,emp_num,linkman,business_source,customer_id) |
||||
values (#{id},#{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> |
||||
|
||||
</mapper> |
@ -0,0 +1,86 @@ |
||||
<?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" parameterType="com.daqing.framework.domain.crms.CustomerEntity"> |
||||
INSERT INTO crms_customer |
||||
(id,code,type,manager,name,addr,phone,del_or_not,status,create_time,motify_time) |
||||
VALUES (#{id},#{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> |
||||
|
||||
</mapper> |
@ -0,0 +1,57 @@ |
||||
<?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 |
||||
(id,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 (#{id},#{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> |
Binary file not shown.
@ -0,0 +1,18 @@ |
||||
#服务名称 |
||||
spring.application.name=dq-financial-hrms |
||||
#配置中心地址 |
||||
spring.cloud.nacos.config.server-addr=192.168.31.142: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 |
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.
Binary file not shown.
@ -0,0 +1,47 @@ |
||||
<?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> |
@ -0,0 +1,39 @@ |
||||
<?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 WHERE 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> |
||||
|
||||
</mapper> |
@ -0,0 +1,28 @@ |
||||
<?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> |
@ -0,0 +1,60 @@ |
||||
<?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> |
||||
|
||||
<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 |
||||
WHERE 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 name FROM hrms_employee WHERE 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 |
||||
WHERE d.id = #{id} |
||||
</select> |
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
<?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> |
@ -0,0 +1,14 @@ |
||||
<?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> |
@ -0,0 +1,14 @@ |
||||
<?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> |
@ -0,0 +1,23 @@ |
||||
<?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="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> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,83 @@ |
||||
<?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 |
||||
<if test="queryMsg != null and queryMsg != ''"> |
||||
WHERE |
||||
( |
||||
d.`name` LIKE CONCAT('%',#{queryMsg},'%') |
||||
OR p.`name` LIKE CONCAT('%',#{queryMsg},'%') |
||||
) |
||||
</if> |
||||
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> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,16 @@ |
||||
<?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> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
<?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> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,25 @@ |
||||
<?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> |
||||
|
||||
|
||||
</mapper> |
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.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue