first commit

This commit is contained in:
8324144
2026-05-18 14:39:26 +08:00
commit 3e9264ebc6
109 changed files with 13139 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.LevelScores;
import org.apache.ibatis.annotations.Select;
public interface LevelScoresMapper {
/**
* 根据层级查找对应的记录
*
* @param level 层级
* @return LevelScores 对象
*/
LevelScores findByLevel(String level);
}

View File

@@ -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="cn.wepact.dfm.training.mapper.LevelScoresMapper">
<!-- 公共的列清单 -->
<sql id="Base_Column_List">
id, level, required_score, elective_score, org_code
</sql>
<!-- 基本的结果映射 -->
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.LevelScores">
<id column="id" property="id" />
<result column="level" property="level" />
<result column="required_score" property="requiredScore" />
<result column="elective_score" property="electiveScore" />
<result column="org_code" property="orgCode" />
</resultMap>
<!-- 根据层级查找对应的记录 -->
<select id="findByLevel" parameterType="string" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM LevelScores
WHERE level = #{level}
</select>
</mapper>

View File

@@ -0,0 +1,24 @@
package cn.wepact.dfm.training.mapper;
import java.io.Serializable;
import java.util.List;
import org.apache.ibatis.annotations.Param;
/**
* DAO公共基类由MybatisGenerator自动生成请勿修改
* @param <Model> The Model Class 这里是泛型不是Model类
* @param <PK> The Primary Key Class 如果是无主键则可以用Model来跳过如果是多主键则是Key类
*/
public interface MyBatisBaseDao<Model, PK extends Serializable> {
int deleteByPrimaryKey(PK id);
int insert(Model record);
int insertSelective(Model record);
Model selectByPrimaryKey(PK id);
int updateByPrimaryKeySelective(Model record);
int updateByPrimaryKey(Model record);
}

View File

@@ -0,0 +1,22 @@
package cn.wepact.dfm.training.mapper;
import java.io.Serializable;
/**
* DAO公共基类由MybatisGenerator自动生成请勿修改
* @param <Model> The Model Class 这里是泛型不是Model类
* @param <PK> The Primary Key Class 如果是无主键则可以用Model来跳过如果是多主键则是Key类
*/
public interface MyBatisBaseMapper<Model, PK extends Serializable> {
int deleteByPrimaryKey(PK id);
int insert(Model record);
int insertSelective(Model record);
Model selectByPrimaryKey(PK id);
int updateByPrimaryKeySelective(Model record);
int updateByPrimaryKey(Model record);
}

View File

@@ -0,0 +1,26 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.TaskScoreSummary;
import cn.wepact.dfm.training.dto.entity.SyncTaskLog;
import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
import java.util.List;
/**
* TProfessionalFeedbackMapper继承基类
*/
@Mapper
public interface SyncTaskLogMapper extends MyBatisBaseMapper<SyncTaskLog, Long> {
int insert(SyncTaskLog log);
SyncTaskLog findByTaskId(Long taskId);
Date getLastSyncTime();
void updateLastSyncTime(Date lastSyncTime);
void update(SyncTaskLog existingLog);
List<TaskScoreSummary> getTaskScoreSummary();
}

View File

@@ -0,0 +1,382 @@
<?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="cn.wepact.dfm.training.mapper.SyncTaskLogMapper">
<!-- 结果映射字段到Java对象属性的映射 -->
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.SyncTaskLog">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="sync_time" jdbcType="TIMESTAMP" property="syncTime"/>
<result column="offset" jdbcType="INTEGER" property="offset"/>
<result column="sync_limit" jdbcType="INTEGER" property="limit"/>
<result column="search_start_time" jdbcType="TIMESTAMP" property="searchStartTime"/>
<result column="search_end_time" jdbcType="TIMESTAMP" property="searchEndTime"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="task_id" jdbcType="BIGINT" property="taskId"/>
<result column="org_id" jdbcType="BIGINT" property="orgId"/>
<result column="project_id" jdbcType="BIGINT" property="projectId"/>
<result column="main_project_id" jdbcType="BIGINT" property="mainProjectId"/>
<result column="stu_user_id" jdbcType="BIGINT" property="stuUserId"/>
<result column="third_user_id" jdbcType="BIGINT" property="thirdUserId"/>
<result column="formal" jdbcType="BOOLEAN" property="formal"/>
<result column="period_id" jdbcType="BIGINT" property="periodId"/>
<result column="result_repeat_flag" jdbcType="BOOLEAN" property="resultRepeatFlag"/>
<result column="sub_result_id" jdbcType="BIGINT" property="subResultId"/>
<result column="sub_task_id" jdbcType="BIGINT" property="subTaskId"/>
<result column="repeat_count" jdbcType="INTEGER" property="repeatCount"/>
<result column="sub_task_result_id" jdbcType="BIGINT" property="subTaskResultId"/>
<result column="order_index" jdbcType="INTEGER" property="orderIndex"/>
<result column="task_status" jdbcType="VARCHAR" property="taskStatus"/>
<result column="task_required" jdbcType="BOOLEAN" property="taskRequired"/>
<result column="task_schedule" jdbcType="INTEGER" property="taskSchedule"/>
<result column="task_manual_completed" jdbcType="BOOLEAN" property="taskManualCompleted"/>
<result column="task_start_time" jdbcType="TIMESTAMP" property="taskStartTime"/>
<result column="task_completed_time" jdbcType="TIMESTAMP" property="taskCompletedTime"/>
<result column="task_duration" jdbcType="INTEGER" property="taskDuration"/>
<result column="is_rated" jdbcType="BOOLEAN" property="isRated"/>
<result column="task_target_scores" jdbcType="INTEGER" property="taskTargetScores"/>
<result column="task_passed" jdbcType="BOOLEAN" property="taskPassed"/>
<result column="task_is_excellent" jdbcType="BOOLEAN" property="taskIsExcellent"/>
<result column="task_delay" jdbcType="INTEGER" property="taskDelay"/>
<result column="task_sign_status" jdbcType="BOOLEAN" property="taskSignStatus"/>
<result column="task_signout_status" jdbcType="BOOLEAN" property="taskSignoutStatus"/>
<result column="task_sign_time" jdbcType="TIMESTAMP" property="taskSignTime"/>
<result column="task_signout_time" jdbcType="TIMESTAMP" property="taskSignoutTime"/>
<result column="task_sign_address" jdbcType="VARCHAR" property="taskSignAddress"/>
<result column="task_signout_address" jdbcType="VARCHAR" property="taskSignoutAddress"/>
<result column="task_answer" jdbcType="VARCHAR" property="taskAnswer"/>
<result column="task_get_scores" jdbcType="INTEGER" property="taskGetScores"/>
<result column="task_get_points" jdbcType="INTEGER" property="taskGetPoints"/>
<result column="task_get_study_hours" jdbcType="INTEGER" property="taskGetStudyHours"/>
<result column="stu_deleted" jdbcType="BOOLEAN" property="stuDeleted"/>
<result column="task_result_deleted" jdbcType="BOOLEAN" property="taskResultDeleted"/>
<result column="task_has_tutor" jdbcType="BOOLEAN" property="taskHasTutor"/>
<result column="ojt_teacher_id" jdbcType="BIGINT" property="ojtTeacherId"/>
<result column="ojt_teacher_fullname" jdbcType="VARCHAR" property="ojtTeacherFullname"/>
<result column="ojt_study_status" jdbcType="VARCHAR" property="ojtStudyStatus"/>
<result column="ojt_out_time" jdbcType="TIMESTAMP" property="ojtOutTime"/>
<result column="ojt_in_time" jdbcType="TIMESTAMP" property="ojtInTime"/>
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt"/>
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt"/>
<!-- New mappings -->
<result column="tr_create_user_id" jdbcType="VARCHAR" property="trCreateUserId"/>
<result column="tr_update_user_id" jdbcType="VARCHAR" property="trUpdateUserId"/>
<result column="tr_update_time" jdbcType="TIMESTAMP" property="trUpdateTime"/>
<result column="task_type" jdbcType="INTEGER" property="taskType"/>
<result column="tr_create_time" jdbcType="TIMESTAMP" property="trCreateTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="db_create_time" jdbcType="TIMESTAMP" property="dbCreateTime"/>
<result column="db_update_time" jdbcType="TIMESTAMP" property="dbUpdateTime"/>
</resultMap>
<!-- 基础列清单 -->
<sql id="Base_Column_List">
id, sync_time, offset, sync_limit, search_start_time, search_end_time, status, task_id,
org_id, project_id, main_project_id, stu_user_id, third_user_id, formal, period_id, result_repeat_flag,
sub_result_id, sub_task_id, repeat_count, sub_task_result_id, order_index, task_status, task_required,
task_schedule, task_manual_completed, task_start_time, task_completed_time, task_duration, is_rated,
task_target_scores, task_passed, task_is_excellent, task_delay, task_sign_status, task_signout_status,
task_sign_time, task_signout_time, task_sign_address, task_signout_address, task_answer, task_get_scores,
task_get_points, task_get_study_hours, stu_deleted, task_result_deleted, task_has_tutor, ojt_teacher_id,
ojt_teacher_fullname, ojt_study_status, ojt_out_time, ojt_in_time, created_at, updated_at,
tr_create_user_id, tr_update_user_id, tr_update_time, task_type, tr_create_time, update_time, db_create_time, db_update_time
</sql>
<!-- 插入同步任务日志 -->
<insert id="insert" parameterType="cn.wepact.dfm.training.dto.entity.SyncTaskLog">
INSERT INTO sync_task_log (
sync_time,
offset,
sync_limit,
search_start_time,
search_end_time,
status,
task_id,
org_id,
project_id,
main_project_id,
stu_user_id,
third_user_id,
formal,
period_id,
result_repeat_flag,
sub_result_id,
sub_task_id,
repeat_count,
sub_task_result_id,
order_index,
task_status,
task_required,
task_schedule,
task_manual_completed,
task_start_time,
task_completed_time,
task_duration,
is_rated,
task_target_scores,
task_passed,
task_is_excellent,
task_delay,
task_sign_status,
task_signout_status,
task_sign_time,
task_signout_time,
task_sign_address,
task_signout_address,
task_answer,
task_get_scores,
task_get_points,
task_get_study_hours,
stu_deleted,
task_result_deleted,
task_has_tutor,
ojt_teacher_id,
ojt_teacher_fullname,
ojt_study_status,
ojt_out_time,
ojt_in_time,
created_at,
updated_at,
tr_create_user_id,
tr_update_user_id,
tr_update_time,
task_type,
tr_create_time,
update_time,
db_create_time,
db_update_time
)
VALUES (
#{syncTime},
#{offset},
#{limit},
#{searchStartTime},
#{searchEndTime},
#{status},
#{taskId},
#{orgId},
#{projectId},
#{mainProjectId},
#{stuUserId},
#{thirdUserId},
#{formal},
#{periodId},
#{resultRepeatFlag},
#{subResultId},
#{subTaskId},
#{repeatCount},
#{subTaskResultId},
#{orderIndex},
#{taskStatus},
#{taskRequired},
#{taskSchedule},
#{taskManualCompleted},
#{taskStartTime},
#{taskCompletedTime},
#{taskDuration},
#{isRated},
#{taskTargetScores},
#{taskPassed},
#{taskIsExcellent},
#{taskDelay},
#{taskSignStatus},
#{taskSignoutStatus},
#{taskSignTime},
#{taskSignoutTime},
#{taskSignAddress},
#{taskSignoutAddress},
#{taskAnswer},
#{taskGetScores},
#{taskGetPoints},
#{taskGetStudyHours},
#{stuDeleted},
#{taskResultDeleted},
#{taskHasTutor},
#{ojtTeacherId},
#{ojtTeacherFullname},
#{ojtStudyStatus},
#{ojtOutTime},
#{ojtInTime},
#{createdAt},
#{updatedAt},
#{trCreateUserId},
#{trUpdateUserId},
#{trUpdateTime},
#{taskType},
#{trCreateTime},
#{updateTime},
#{dbCreateTime},
#{dbUpdateTime}
)
</insert>
<!-- 根据任务ID查找同步任务日志 -->
<select id="findByTaskId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM sync_task_log
WHERE task_id = #{taskId}
LIMIT 1
</select>
<!-- 获取最后一次同步时间 -->
<select id="getLastSyncTime" resultType="java.util.Date">
SELECT sync_time
FROM sync_task_log
ORDER BY sync_time DESC
LIMIT 1
</select>
<!-- 更新最后同步时间 -->
<update id="updateLastSyncTime" parameterType="java.util.Date">
UPDATE sync_task_log
SET sync_time = #{syncTime}
</update>
<update id="update" parameterType="cn.wepact.dfm.training.dto.entity.SyncTaskLog">
UPDATE sync_task_log
SET
sync_time = #{syncTime},
offset = #{offset},
sync_limit = #{limit},
search_start_time = #{searchStartTime},
search_end_time = #{searchEndTime},
status = #{status},
task_id = #{taskId},
org_id = #{orgId},
project_id = #{projectId},
main_project_id = #{mainProjectId},
stu_user_id = #{stuUserId},
third_user_id = #{thirdUserId},
formal = #{formal},
period_id = #{periodId},
result_repeat_flag = #{resultRepeatFlag},
sub_result_id = #{subResultId},
sub_task_id = #{subTaskId},
repeat_count = #{repeatCount},
sub_task_result_id = #{subTaskResultId},
order_index = #{orderIndex},
task_status = #{taskStatus},
task_required = #{taskRequired},
task_manual_completed = #{taskManualCompleted},
task_start_time = #{taskStartTime},
task_completed_time = #{taskCompletedTime},
task_duration = #{taskDuration},
is_rated = #{isRated},
task_target_scores = #{taskTargetScores},
task_passed = #{taskPassed},
task_is_excellent = #{taskIsExcellent},
task_delay = #{taskDelay},
task_sign_status = #{taskSignStatus},
task_signout_status = #{taskSignoutStatus},
task_sign_time = #{taskSignTime},
task_signout_time = #{taskSignoutTime},
task_sign_address = #{taskSignAddress},
task_signout_address = #{taskSignoutAddress},
task_answer = #{taskAnswer},
task_get_scores = #{taskGetScores},
task_get_points = #{taskGetPoints},
task_get_study_hours = #{taskGetStudyHours},
stu_deleted = #{stuDeleted},
task_result_deleted = #{taskResultDeleted},
task_has_tutor = #{taskHasTutor},
ojt_teacher_id = #{ojtTeacherId},
ojt_teacher_fullname = #{ojtTeacherFullname},
ojt_study_status = #{ojtStudyStatus},
ojt_out_time = #{ojtOutTime},
ojt_in_time = #{ojtInTime},
created_at = #{createdAt},
updated_at = #{updatedAt},
tr_create_user_id = #{trCreateUserId},
tr_update_user_id = #{trUpdateUserId},
tr_update_time = #{trUpdateTime},
task_type = #{taskType},
tr_create_time = #{trCreateTime},
update_time = #{updateTime},
db_create_time = #{dbCreateTime},
db_update_time = #{dbUpdateTime}
WHERE task_id = #{taskId}
</update>
<select id="getTaskScoreSummary" resultType="cn.wepact.dfm.training.dto.TaskScoreSummary">
<!-- SELECT-->
<!-- s.stu_user_id AS stuUserId,-->
<!-- s.project_id AS projectId,-->
<!-- SUM(CASE WHEN s.task_required = 1 THEN s.task_get_scores ELSE 0 END) AS requiredTotalScores,-->
<!-- SUM(CASE WHEN s.task_required = 0 THEN s.task_get_scores ELSE 0 END) AS electiveTotalScores-->
<!-- FROM-->
<!-- (SELECT -->
<!-- stu_user_id,-->
<!-- project_id,-->
<!-- task_id,-->
<!-- task_required,-->
<!-- task_get_scores,-->
<!-- task_status,-->
<!-- task_completed_time-->
<!-- FROM sync_task_log s1-->
<!-- WHERE s1.id = (-->
<!-- SELECT id -->
<!-- FROM sync_task_log s2 -->
<!-- WHERE s2.task_id = s1.task_id -->
<!-- ORDER BY created_at DESC -->
<!-- LIMIT 1-->
<!-- )-->
<!-- AND s1.task_status = 2-->
<!-- ) s-->
<!-- JOIN -->
<!-- sync_user_info_log u ON s.stu_user_id = u.user_id-->
<!-- JOIN -->
<!-- t_user tu ON u.username = tu.user_no-->
<!-- JOIN -->
<!-- t_qualification_review q ON tu.id = q.user_id -->
<!-- AND s.project_id = q.project_id-->
<!-- WHERE-->
<!-- s.task_completed_time > q.created_at-->
<!-- AND q.del_flag = '0'-->
<!-- AND q.status IN ('0', '1', '2', '3')-->
<!-- GROUP BY-->
<!-- s.stu_user_id,-->
<!-- s.project_id;-->
SELECT
s.stu_user_id AS stuUserId,
s.project_id AS projectId,
SUM(CASE WHEN s.task_required = 1 THEN s.task_get_scores ELSE 0 END) AS requiredTotalScores,
SUM(CASE WHEN s.task_required = 0 THEN s.task_get_scores ELSE 0 END) AS electiveTotalScores
FROM
(SELECT
s1.stu_user_id,
s1.project_id,
s1.task_id,
s1.task_required,
s1.task_get_scores,
s1.task_status,
s1.task_completed_time
FROM sync_task_log s1
INNER JOIN (
SELECT task_id, stu_user_id, MAX(created_at) as latest_created_at
FROM sync_task_log
WHERE task_status = 2
GROUP BY task_id, stu_user_id
) latest ON s1.task_id = latest.task_id
AND s1.stu_user_id = latest.stu_user_id
AND s1.created_at = latest.latest_created_at
) s
LEFT JOIN
sync_user_info_log u ON s.stu_user_id = u.user_id
LEFT JOIN
t_user tu ON u.username = tu.user_no
LEFT JOIN
t_qualification_review q ON tu.id = q.user_id
AND s.project_id = q.project_id
AND q.del_flag = '0'
AND q.status IN ('0', '1', '2', '3')
WHERE
s.task_completed_time > q.created_at
GROUP BY
s.stu_user_id,
s.project_id;
</select>
</mapper>

View File

@@ -0,0 +1,25 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.SyncTaskLog;
import cn.wepact.dfm.training.dto.entity.SyncUserInfoLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
@Mapper
public interface SyncUserInfoLogMapper extends MyBatisBaseMapper<SyncUserInfoLog, Long> {
SyncUserInfoLog getUserInfoByUserId(@Param("userId") String userId);
void insertUserInfo(SyncUserInfoLog userInfo);
void updateUserInfo(SyncUserInfoLog userInfo);
Date getLastSyncTime();
void updateLastSyncTime(Date date);
SyncUserInfoLog findUserInfoByStuUserId(@Param("stuUserId") String stuUserId);
}

View File

@@ -0,0 +1,153 @@
<?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="cn.wepact.dfm.training.mapper.SyncUserInfoLogMapper">
<resultMap id="UserResultMap" type="cn.wepact.dfm.training.dto.entity.SyncUserInfoLog">
<result property="id" column="id"/> <!-- 用户ID -->
<result property="syncTime" column="sync_time"/> <!-- 同步时间 -->
<result property="offset" column="offset"/> <!-- 偏移量 -->
<result property="syncLimit" column="sync_limit"/> <!-- 同步限制 -->
<result property="searchStartTime" column="search_start_time"/> <!-- 搜索开始时间 -->
<result property="searchEndTime" column="search_end_time"/> <!-- 搜索结束时间 -->
<result property="status" column="status"/> <!-- 状态 -->
<result property="userId" column="user_id"/> <!-- 用户唯一标识 -->
<result property="username" column="username"/> <!-- 用户名 -->
<result property="fullname" column="fullname"/> <!-- 全名 -->
<result property="gender" column="gender"/> <!-- 性别 (1: 男, 2: 女) -->
<result property="idNo" column="id_no"/> <!-- 身份证号 -->
<result property="birthday" column="birthday"/> <!-- 生日 -->
<result property="deptId" column="dept_id"/> <!-- 部门ID -->
<result property="deptName" column="dept_name"/> <!-- 部门名称 -->
<result property="positionId" column="position_id"/> <!-- 职位ID -->
<result property="positionName" column="position_name"/> <!-- 职位名称 -->
<result property="gradeId" column="grade_id"/> <!-- 等级ID -->
<result property="gradeName" column="grade_name"/> <!-- 等级名称 -->
<result property="managerId" column="manager_id"/> <!-- 经理ID -->
<result property="managerFullname" column="manager_fullname"/> <!-- 经理全名 -->
<result property="deptManagerId" column="dept_manager_id"/> <!-- 部门经理ID -->
<result property="deptManagerFullname" column="dept_manager_fullname"/> <!-- 部门经理全名 -->
<result property="mobile" column="mobile"/> <!-- 手机号 -->
<result property="email" column="email"/> <!-- 邮箱 -->
<result property="userNo" column="user_no"/> <!-- 用户工号 -->
<result property="hireDate" column="hire_date"/> <!-- 入职时间 -->
<result property="expiredTime" column="expired_time"/> <!-- 到期时间 -->
<result property="areaCode" column="area_code"/> <!-- 区号 -->
<result property="userStatus" column="user_status"/> <!-- 用户状态 -->
<result property="avatarUrl" column="avatar_url"/> <!-- 头像URL -->
<result property="admin" column="admin"/> <!-- 是否是管理员 -->
<result property="deleted" column="deleted"/> <!-- 是否删除 -->
<result property="thirdUserId" column="third_user_id"/> <!-- 第三方用户ID -->
<result property="createTime" column="create_time"/> <!-- 创建时间 -->
<result property="updateTime" column="update_time"/> <!-- 更新时间 -->
<result property="userType" column="user_type"/> <!-- 用户类型 -->
</resultMap>
<sql id="Base_Column_List">
id,
user_id,
username,
fullname,
gender,
id_no,
birthday,
dept_id,
dept_name,
position_id,
position_name,
grade_id,
grade_name,
manager_id,
manager_fullname,
dept_manager_id,
dept_manager_fullname,
mobile,
email,
user_no,
hire_date,
expired_time,
area_code,
user_status,
avatar_url,
admin,
deleted,
third_user_id,
create_time,
update_time,
user_type,
sync_time,
offset,
sync_limit,
search_start_time,
search_end_time,
status
</sql>
<insert id="insertUserInfo">
INSERT INTO sync_user_info_log (<include refid="Base_Column_List"/>)
VALUES (#{id}, #{userId}, #{username}, #{fullname}, #{gender}, #{idNo}, #{birthday}, #{deptId}, #{deptName},
#{positionId}, #{positionName}, #{gradeId}, #{gradeName}, #{managerId}, #{managerFullname}, #{deptManagerId}, #{deptManagerFullname},
#{mobile}, #{email}, #{userNo}, #{hireDate}, #{expiredTime}, #{areaCode}, #{userStatus}, #{avatarUrl}, #{admin}, #{deleted}, #{thirdUserId},
#{createTime}, #{updateTime}, #{userType}, #{syncTime}, #{offset}, #{syncLimit}, #{searchStartTime}, #{searchEndTime}, #{status})
</insert>
<update id="updateUserInfo">
UPDATE sync_user_info_log
SET
id = #{id},
user_id = #{userId},
username = #{username},
fullname = #{fullname},
gender = #{gender},
id_no = #{idNo},
birthday = #{birthday},
dept_id = #{deptId},
dept_name = #{deptName},
position_id = #{positionId},
position_name = #{positionName},
grade_id = #{gradeId},
grade_name = #{gradeName},
manager_id = #{managerId},
manager_fullname = #{managerFullname},
dept_manager_id = #{deptManagerId},
dept_manager_fullname = #{deptManagerFullname},
mobile = #{mobile},
email = #{email},
user_no = #{userNo},
hire_date = #{hireDate},
expired_time = #{expiredTime},
area_code = #{areaCode},
user_status = #{userStatus},
avatar_url = #{avatarUrl},
admin = #{admin},
deleted = #{deleted},
third_user_id = #{thirdUserId},
create_time = #{createTime},
update_time = #{updateTime},
user_type = #{userType},
sync_time = #{syncTime},
offset = #{offset},
sync_limit = #{syncLimit},
search_start_time = #{searchStartTime},
search_end_time = #{searchEndTime},
status = #{status}
WHERE user_id = #{userId}
</update>
<select id="getUserInfoByUserId" resultMap="UserResultMap">
SELECT <include refid="Base_Column_List"/> FROM sync_user_info_log WHERE user_id = #{userId}
</select>
<!-- 获取最后一次同步时间 -->
<select id="getLastSyncTime" resultType="java.util.Date">
SELECT sync_time
FROM sync_user_info_log
ORDER BY sync_time DESC
LIMIT 1
</select>
<!-- 更新最后同步时间 -->
<update id="updateLastSyncTime" parameterType="java.util.Date">
UPDATE sync_user_info_log
SET sync_time = #{syncTime}
</update>
<select id="findUserInfoByStuUserId" resultMap="UserResultMap">
SELECT user_id, username FROM sync_user_info_log WHERE user_id = #{stuUserId}
</select>
</mapper>

View File

@@ -0,0 +1,15 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.TAppCheck;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* TAppCheckMapper继承基类
*/
@Repository
public interface TAppCheckMapper extends MyBatisBaseDao<TAppCheck, Long> {
List<TAppCheck> selectByConditions(@Param("param") TAppCheck param);
}

View File

@@ -0,0 +1,186 @@
<?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="cn.wepact.dfm.training.mapper.TAppCheckMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TAppCheck">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="org_code" jdbcType="VARCHAR" property="orgCode" />
<result column="degree" jdbcType="VARCHAR" property="degree" />
<result column="level" jdbcType="VARCHAR" property="level" />
<result column="s_year" jdbcType="INTEGER" property="sYear" />
<result column="p_year" jdbcType="INTEGER" property="pYear" />
<result column="jx" jdbcType="INTEGER" property="jx" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
</resultMap>
<sql id="Base_Column_List">
id, org_code, `degree`, `level`, s_year, p_year, jx, updated_at, updated_by, created_at,
created_by, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_app_check
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByConditions" resultMap="BaseResultMap"
parameterType="cn.wepact.dfm.training.dto.entity.TAppCheck">
select
<include refid="Base_Column_List" />
from t_app_check
where
del_flag='0'
<if test="param.orgCode != null">
and org_code = #{param.orgCode,jdbcType=VARCHAR}
</if>
<if test="param.degree != null">
and `degree` = #{param.degree,jdbcType=VARCHAR}
</if>
<if test="param.level != null">
and `level` = #{param.level,jdbcType=VARCHAR}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_app_check
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TAppCheck" useGeneratedKeys="true">
insert into t_app_check (org_code, `degree`, `level`,
s_year, p_year, jx, updated_at,
updated_by, created_at, created_by,
del_flag)
values (#{orgCode,jdbcType=VARCHAR}, #{degree,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR},
#{sYear,jdbcType=INTEGER}, #{pYear,jdbcType=INTEGER}, #{jx,jdbcType=INTEGER}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR},
#{delFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TAppCheck" useGeneratedKeys="true">
insert into t_app_check
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orgCode != null">
org_code,
</if>
<if test="degree != null">
`degree`,
</if>
<if test="level != null">
`level`,
</if>
<if test="sYear != null">
s_year,
</if>
<if test="pYear != null">
p_year,
</if>
<if test="jx != null">
jx,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orgCode != null">
#{orgCode,jdbcType=VARCHAR},
</if>
<if test="degree != null">
#{degree,jdbcType=VARCHAR},
</if>
<if test="level != null">
#{level,jdbcType=VARCHAR},
</if>
<if test="sYear != null">
#{sYear,jdbcType=INTEGER},
</if>
<if test="pYear != null">
#{pYear,jdbcType=INTEGER},
</if>
<if test="jx != null">
#{jx,jdbcType=INTEGER},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TAppCheck">
update t_app_check
<set>
<if test="orgCode != null">
org_code = #{orgCode,jdbcType=VARCHAR},
</if>
<if test="degree != null">
`degree` = #{degree,jdbcType=VARCHAR},
</if>
<if test="level != null">
`level` = #{level,jdbcType=VARCHAR},
</if>
<if test="sYear != null">
s_year = #{sYear,jdbcType=INTEGER},
</if>
<if test="pYear != null">
p_year = #{pYear,jdbcType=INTEGER},
</if>
<if test="jx != null">
jx = #{jx,jdbcType=INTEGER},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TAppCheck">
update t_app_check
set org_code = #{orgCode,jdbcType=VARCHAR},
`degree` = #{degree,jdbcType=VARCHAR},
`level` = #{level,jdbcType=VARCHAR},
s_year = #{sYear,jdbcType=INTEGER},
p_year = #{pYear,jdbcType=INTEGER},
jx = #{jx,jdbcType=INTEGER},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,15 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.TDictionary;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* TDictionaryMapper继承基类
*/
@Mapper
public interface TDictionaryMapper extends MyBatisBaseMapper<TDictionary, Long> {
List<TDictionary> selectByCondition(TDictionary tDictionary);
}

View File

@@ -0,0 +1,178 @@
<?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="cn.wepact.dfm.training.mapper.TDictionaryMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TDictionary">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="org_code" jdbcType="VARCHAR" property="orgCode" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="version" jdbcType="INTEGER" property="version" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
</resultMap>
<sql id="Base_Column_List">
id, org_code, `type`, code, `value`, version, updated_at, updated_by, created_at,
created_by, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_dictionary
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByCondition" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from
t_dictionary
where
del_flag=0
<if test="orgCode != null">
and org_code = #{orgCode}
</if>
<if test="type != null">
and `type` = #{type}
</if>
<if test="code != null">
and code = #{code}
</if>
<if test="version != null">
and version = #{version}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_dictionary
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TDictionary" useGeneratedKeys="true">
insert into t_dictionary (org_code, `type`, code,
`value`, version, updated_at,
updated_by, created_at, created_by,
del_flag)
values (#{orgCode,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR},
#{delFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TDictionary" useGeneratedKeys="true">
insert into t_dictionary
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orgCode != null">
org_code,
</if>
<if test="type != null">
`type`,
</if>
<if test="code != null">
code,
</if>
<if test="value != null">
`value`,
</if>
<if test="version != null">
version,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orgCode != null">
#{orgCode,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="version != null">
#{version,jdbcType=INTEGER},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TDictionary">
update t_dictionary
<set>
<if test="orgCode != null">
org_code = #{orgCode,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=VARCHAR},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="value != null">
`value` = #{value,jdbcType=VARCHAR},
</if>
<if test="version != null">
version = #{version,jdbcType=INTEGER},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TDictionary">
update t_dictionary
set org_code = #{orgCode,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR},
`value` = #{value,jdbcType=VARCHAR},
version = #{version,jdbcType=INTEGER},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,17 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.TEvidenceSubmission;
import cn.wepact.dfm.training.dto.entity.TProfessionalFeedback;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* TEvidenceSubmissionMapper继承基类
*/
@Mapper
public interface TEvidenceSubmissionMapper extends MyBatisBaseMapper<TEvidenceSubmission, Long> {
List<TEvidenceSubmission> selectByCondition(TEvidenceSubmission condition);
}

View File

@@ -0,0 +1,252 @@
<?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="cn.wepact.dfm.training.mapper.TEvidenceSubmissionMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TEvidenceSubmission">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="org_code" jdbcType="BIGINT" property="orgCode" />
<result column="evidence_no" jdbcType="VARCHAR" property="evidenceNo" />
<result column="evidence_name" jdbcType="VARCHAR" property="evidenceName" />
<result column="evidence_witness" jdbcType="VARCHAR" property="evidenceWitness" />
<result column="evidence_attachment" jdbcType="VARCHAR" property="evidenceAttachment" />
<result column="upload_date" jdbcType="TIMESTAMP" property="uploadDate" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
<result column="evidence_description" jdbcType="LONGVARCHAR" property="evidenceDescription" />
<result column="remarks" jdbcType="LONGVARCHAR" property="remarks" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, org_code, evidence_no, evidence_name, evidence_witness, evidence_attachment,
upload_date, created_at, created_by, updated_at, updated_by, del_flag, evidence_description, remarks
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_evidence_submission
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_evidence_submission
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TEvidenceSubmission" useGeneratedKeys="true">
insert into t_evidence_submission (user_id, org_code, evidence_no,
evidence_name, evidence_witness, evidence_attachment,
upload_date, created_at, created_by,
updated_at, updated_by, del_flag,
evidence_description, remarks)
values (#{userId,jdbcType=BIGINT}, #{orgCode,jdbcType=VARCHAR}, #{evidenceNo,jdbcType=VARCHAR},
#{evidenceName,jdbcType=VARCHAR}, #{evidenceWitness,jdbcType=VARCHAR}, #{evidenceAttachment,jdbcType=VARCHAR},
#{uploadDate,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR},
#{evidenceDescription,jdbcType=LONGVARCHAR}, #{remarks,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TEvidenceSubmission" useGeneratedKeys="true">
insert into t_evidence_submission
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="orgCode != null">
org_code,
</if>
<if test="evidenceNo != null">
evidence_no,
</if>
<if test="evidenceName != null">
evidence_name,
</if>
<if test="evidenceWitness != null">
evidence_witness,
</if>
<if test="evidenceAttachment != null">
evidence_attachment,
</if>
<if test="uploadDate != null">
upload_date,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="evidenceDescription != null">
evidence_description,
</if>
<if test="remarks != null">
remarks,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="orgCode != null">
#{orgCode,jdbcType=VARCHAR},
</if>
<if test="evidenceNo != null">
#{evidenceNo,jdbcType=VARCHAR},
</if>
<if test="evidenceName != null">
#{evidenceName,jdbcType=VARCHAR},
</if>
<if test="evidenceWitness != null">
#{evidenceWitness,jdbcType=VARCHAR},
</if>
<if test="evidenceAttachment != null">
#{evidenceAttachment,jdbcType=VARCHAR},
</if>
<if test="uploadDate != null">
#{uploadDate,jdbcType=TIMESTAMP},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
<if test="evidenceDescription != null">
#{evidenceDescription,jdbcType=LONGVARCHAR},
</if>
<if test="remarks != null">
#{remarks,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TEvidenceSubmission">
update t_evidence_submission
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="orgCode != null">
org_code = #{orgCode,jdbcType=VARCHAR},
</if>
<if test="evidenceNo != null">
evidence_no = #{evidenceNo,jdbcType=VARCHAR},
</if>
<if test="evidenceName != null">
evidence_name = #{evidenceName,jdbcType=VARCHAR},
</if>
<if test="evidenceWitness != null">
evidence_witness = #{evidenceWitness,jdbcType=VARCHAR},
</if>
<if test="evidenceAttachment != null">
evidence_attachment = #{evidenceAttachment,jdbcType=VARCHAR},
</if>
<if test="uploadDate != null">
upload_date = #{uploadDate,jdbcType=TIMESTAMP},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
<if test="evidenceDescription != null">
evidence_description = #{evidenceDescription,jdbcType=LONGVARCHAR},
</if>
<if test="remarks != null">
remarks = #{remarks,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<!-- <update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TEvidenceSubmission">-->
<!-- update t_evidence_submission-->
<!-- set user_id = #{userId,jdbcType=BIGINT},-->
<!-- org_code = #{orgCode,jdbcType=VARCHAR},-->
<!-- evidence_no = #{evidenceNo,jdbcType=VARCHAR},-->
<!-- evidence_name = #{evidenceName,jdbcType=VARCHAR},-->
<!-- evidence_witness = #{evidenceWitness,jdbcType=VARCHAR},-->
<!-- evidence_attachment = #{evidenceAttachment,jdbcType=VARCHAR},-->
<!-- upload_date = #{uploadDate,jdbcType=TIMESTAMP},-->
<!-- created_at = #{createdAt,jdbcType=TIMESTAMP},-->
<!-- created_by = #{createdBy,jdbcType=VARCHAR},-->
<!-- updated_at = #{updatedAt,jdbcType=TIMESTAMP},-->
<!-- updated_by = #{updatedBy,jdbcType=VARCHAR},-->
<!-- del_flag = #{delFlag,jdbcType=VARCHAR},-->
<!-- evidence_description = #{evidenceDescription,jdbcType=LONGVARCHAR},-->
<!-- remarks = #{remarks,jdbcType=LONGVARCHAR}-->
<!-- where id = #{id,jdbcType=BIGINT}-->
<!-- </update>-->
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TEvidenceSubmission">
update t_evidence_submission
set user_id = #{userId,jdbcType=BIGINT},
org_code = #{orgCode,jdbcType=VARCHAR},
evidence_no = #{evidenceNo,jdbcType=VARCHAR},
evidence_name = #{evidenceName,jdbcType=VARCHAR},
evidence_witness = #{evidenceWitness,jdbcType=VARCHAR},
evidence_attachment = #{evidenceAttachment,jdbcType=VARCHAR},
upload_date = #{uploadDate,jdbcType=TIMESTAMP},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectByCondition" resultType="cn.wepact.dfm.training.dto.entity.TEvidenceSubmission">
SELECT
id,
user_id AS userId,
org_code AS orgCode,
evidence_no AS evidenceNo,
evidence_name AS evidenceName,
evidence_witness AS evidenceWitness,
evidence_attachment AS evidenceAttachment,
created_at AS createdAt,
created_by AS createdBy,
updated_at AS updatedAt,
updated_by AS updatedBy,
remarks
FROM
t_evidence_submission
WHERE
del_flag =0
<if test="orgCode != null">
and org_code = #{orgCode,jdbcType=VARCHAR}
</if>
<if test="userId != null">
and user_id = #{userId,jdbcType=VARCHAR}
</if>
<if test="evidenceNo != null and evidenceNo !=''">
and evidence_no = #{evidenceNo,jdbcType=VARCHAR}
</if>
<if test="evidenceName != null and evidenceName !=''">
and evidence_name like CONCAT("%", #{evidenceName,jdbcType=VARCHAR}, "%")
</if>
</select>
</mapper>

View File

@@ -0,0 +1,17 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.TOrg;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* TOrgMapper继承基类
*/
@Mapper
public interface TOrgMapper extends MyBatisBaseMapper<TOrg, Long> {
TOrg selectByCode(@Param("code") String code);
List<TOrg> selectAll();
}

View File

@@ -0,0 +1,144 @@
<?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="cn.wepact.dfm.training.mapper.TOrgMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TOrg">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="short_name" jdbcType="VARCHAR" property="shortName" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
</resultMap>
<sql id="Base_Column_List">
id, `name`, code, short_name, updated_at, updated_by, created_at, created_by, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_org
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByCode" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
<include refid="Base_Column_List" />
from t_org
where code = #{code}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_org
where del_flag = '0'
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_org
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TOrg" useGeneratedKeys="true">
insert into t_org (`name`, code, short_name, updated_at,
updated_by, created_at, created_by, del_flag)
values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{shortName,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TOrg" useGeneratedKeys="true">
insert into t_org
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
`name`,
</if>
<if test="code != null">
code,
</if>
<if test="shortName != null">
short_name,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="shortName != null">
#{shortName,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TOrg">
update t_org
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="shortName != null">
short_name = #{shortName,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TOrg">
update t_org
set `name` = #{name,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR},
short_name = #{shortName,jdbcType=VARCHAR},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,15 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.TPerformanceRule;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* TPerformanceRuleMapper继承基类
*/
@Repository
public interface TPerformanceRuleMapper extends MyBatisBaseDao<TPerformanceRule, Long> {
List<TPerformanceRule> selectByConditions(@Param("param") TPerformanceRule param);
}

View File

@@ -0,0 +1,144 @@
<?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="cn.wepact.dfm.training.mapper.TPerformanceRuleMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TPerformanceRule">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="org_code" jdbcType="VARCHAR" property="orgCode" />
<result column="jx_name" jdbcType="VARCHAR" property="jxName" />
<result column="score" jdbcType="INTEGER" property="score" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
</resultMap>
<sql id="Base_Column_List">
id, org_code, jx_name, score, updated_at, updated_by, created_at, created_by, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_performance_rule
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByConditions" resultMap="BaseResultMap"
parameterType="cn.wepact.dfm.training.dto.entity.TPerformanceRule">
select
<include refid="Base_Column_List" />
from t_performance_rule
where
del_flag='0'
<if test="param.orgCode != null">
and org_code = #{param.orgCode,jdbcType=VARCHAR}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_performance_rule
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TPerformanceRule" useGeneratedKeys="true">
insert into t_performance_rule (org_code, jx_name, score,
updated_at, updated_by, created_at,
created_by, del_flag)
values (#{orgCode,jdbcType=VARCHAR}, #{jxName,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TPerformanceRule" useGeneratedKeys="true">
insert into t_performance_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orgCode != null">
org_code,
</if>
<if test="jxName != null">
jx_name,
</if>
<if test="score != null">
score,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orgCode != null">
#{orgCode,jdbcType=VARCHAR},
</if>
<if test="jxName != null">
#{jxName,jdbcType=VARCHAR},
</if>
<if test="score != null">
#{score,jdbcType=INTEGER},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TPerformanceRule">
update t_performance_rule
<set>
<if test="orgCode != null">
org_code = #{orgCode,jdbcType=VARCHAR},
</if>
<if test="jxName != null">
jx_name = #{jxName,jdbcType=VARCHAR},
</if>
<if test="score != null">
score = #{score,jdbcType=INTEGER},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TPerformanceRule">
update t_performance_rule
set org_code = #{orgCode,jdbcType=VARCHAR},
jx_name = #{jxName,jdbcType=VARCHAR},
score = #{score,jdbcType=INTEGER},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,16 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.TProfessionalFeedback;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* TProfessionalFeedbackMapper继承基类
*/
@Mapper
public interface TProfessionalFeedbackMapper extends MyBatisBaseMapper<TProfessionalFeedback, Long> {
List<TProfessionalFeedback> selectByCondition(TProfessionalFeedback tProfessionalFeedback);
List<TProfessionalFeedback> selectWithUserInfoByCondition(TProfessionalFeedback condition);
}

View File

@@ -0,0 +1,457 @@
<?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="cn.wepact.dfm.training.mapper.TProfessionalFeedbackMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TProfessionalFeedback">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="org_code" jdbcType="VARCHAR" property="orgCode" />
<result column="category_code" jdbcType="VARCHAR" property="categoryCode" />
<result column="define_code" jdbcType="VARCHAR" property="defineCode" />
<result column="specific_task" jdbcType="VARCHAR" property="specificTask" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="number" jdbcType="INTEGER" property="number" />
<result column="unit_code" jdbcType="VARCHAR" property="unitCode" />
<result column="initiating_department" jdbcType="VARCHAR" property="initiatingDepartment" />
<result column="role_code" jdbcType="VARCHAR" property="roleCode" />
<result column="level_code" jdbcType="VARCHAR" property="levelCode" />
<result column="proof_material" jdbcType="VARCHAR" property="proofMaterial" />
<result column="audit_status" jdbcType="VARCHAR" property="auditStatus" />
<result column="auditor" jdbcType="VARCHAR" property="auditor" />
<result column="audit_date" jdbcType="TIMESTAMP" property="auditDate" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
<result column="remarks" jdbcType="LONGVARCHAR" property="remarks" />
<result column="score" jdbcType="REAL" property="score" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, org_code, category_code, define_code, specific_task, start_time, end_time, `number`,
unit_code, initiating_department, role_code, level_code, proof_material, audit_status,
auditor, audit_date, created_at, created_by, updated_at, updated_by, del_flag,remarks,score
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_professional_feedback
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByCondition" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List" />
FROM
t_professional_feedback
WHERE
del_flag = 0
<if test="orgCode != null">
and org_code = #{orgCode,jdbcType=VARCHAR}
</if>
<if test="userId != null">
and user_id = #{userId,jdbcType=VARCHAR}
</if>
<if test="categoryCode != null">
and category_code = #{categoryCode,jdbcType=VARCHAR}
</if>
<if test="defineCode != null">
and define_code = #{defineCode, jdbcType=VARCHAR}
</if>
<if test="specificTask != null and specificTask !=''">
and specific_task like CONCAT("%", #{specificTask,jdbcType=VARCHAR}, "%")
</if>
<if test="startTime != null">
and start_time = #{startTime,jdbcType=TIMESTAMP}
</if>
<if test="endTime != null">
and end_time = #{endTime,jdbcType=TIMESTAMP}
</if>
<if test="selectStartTime != null and selectEndTime != null">
and end_time > #{selectStartTime,jdbcType=TIMESTAMP}
and start_time <![CDATA[<]]> #{selectEndTime,jdbcType=TIMESTAMP}
</if>
<if test="number != null">
and `number` = #{number,jdbcType=INTEGER}
</if>
<if test="unitCode != null">
and unit_code = #{unitCode,jdbcType=VARCHAR}
</if>
<if test="initiatingDepartment != null">
and initiating_department = #{initiatingDepartment,jdbcType=VARCHAR}
</if>
<if test="roleCode != null">
and role_code = #{roleCode,jdbcType=VARCHAR}
</if>
<if test="levelCode != null">
and level_code = #{levelCode,jdbcType=VARCHAR}
</if>
<if test="auditStatus != null">
and audit_status = #{auditStatus,jdbcType=VARCHAR}
</if>
</select>
<select id="selectWithUserInfoByCondition" resultType="cn.wepact.dfm.training.dto.entity.TProfessionalFeedback">
SELECT
a.id,
a.user_id as userId,
a.org_code as orgCode,
a.category_code as categoryCode,
a.define_code as defineCode,
a.score,
a.specific_task as specificTask,
a.start_time as startTime,
a.end_time as endTime,
a.`number`,
a.unit_code as unitCode,
a.initiating_department as initiatingDepartment,
a.role_code as roleCode,
a.level_code as levelCode,
a.proof_material as proofMaterial,
a.audit_status as auditStatus,
a.auditor,
a.audit_date as auditDate,
a.created_at as createdAt,
a.created_by as createdBy,
a.updated_at as updatedAt,
a.updated_by as updatedBy,
a.del_flag as delFlag,
a.remarks,
b.username,
b.user_no as userNo
FROM
t_professional_feedback a left join
t_user b on a.user_id = b.id
WHERE
a.del_flag = 0
<if test="orgCode != null">
and a.org_code = #{orgCode,jdbcType=VARCHAR}
</if>
<if test="categoryCode != null">
and a.category_code = #{categoryCode,jdbcType=VARCHAR}
</if>
<if test= "defineCode != null">
and a.define_code = #{defineCode, jdbcType=VARCHAR}
</if>
<if test="defineCodeList != null">
<foreach collection="defineCodeList" item="item" open="and a.define_code in (" close=")" separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="specificTask != null">
and specific_task like CONCAT("%", #{specificTask,jdbcType=VARCHAR}, "%")
</if>
<if test="startTime != null">
and a.start_time = #{startTime,jdbcType=TIMESTAMP}
</if>
<if test="endTime != null">
and a.end_time = #{endTime,jdbcType=TIMESTAMP}
</if>
<if test="number != null">
and a.`number` = #{number,jdbcType=INTEGER}
</if>
<if test="unitCode != null">
and a.unit_code = #{unitCode,jdbcType=VARCHAR}
</if>
<if test="initiatingDepartment != null">
and a.initiating_department = #{initiatingDepartment,jdbcType=VARCHAR}
</if>
<if test="roleCode != null">
and a.role_code = #{roleCode,jdbcType=VARCHAR}
</if>
<if test="levelCode != null">
and a.level_code = #{levelCode,jdbcType=VARCHAR}
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_professional_feedback
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalFeedback" useGeneratedKeys="true">
insert into t_professional_feedback (user_id, org_code, category_code, define_code,
specific_task, start_time, end_time,
`number`, unit_code, initiating_department,
role_code, level_code, proof_material,
audit_status, auditor, audit_date,
created_at, created_by, updated_at,
updated_by, del_flag, remarks,score
)
values (#{userId,jdbcType=BIGINT}, #{orgCode,jdbcType=VARCHAR}, #{categoryCode,jdbcType=VARCHAR}, #{defineCode, jdbcType=VARCHAR},
#{specificTask,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{number,jdbcType=INTEGER}, #{unitCode,jdbcType=VARCHAR}, #{initiatingDepartment,jdbcType=VARCHAR},
#{roleCode,jdbcType=VARCHAR}, #{levelCode,jdbcType=VARCHAR}, #{proofMaterial,jdbcType=VARCHAR},
#{auditStatus,jdbcType=VARCHAR}, #{auditor,jdbcType=VARCHAR}, #{auditDate,jdbcType=TIMESTAMP},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR}, #{remarks,jdbcType=LONGVARCHAR},#{score, jdbcType=REAL}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalFeedback" useGeneratedKeys="true">
insert into t_professional_feedback
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="orgCode != null">
org_code,
</if>
<if test="categoryCode != null">
category_code,
</if>
<if test="defineCode != null">
define_code,
</if>
<if test="score != null">
score,
</if>
<if test="specificTask != null">
specific_task,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="number != null">
`number`,
</if>
<if test="unitCode != null">
unit_code,
</if>
<if test="initiatingDepartment != null">
initiating_department,
</if>
<if test="roleCode != null">
role_code,
</if>
<if test="levelCode != null">
level_code,
</if>
<if test="proofMaterial != null">
proof_material,
</if>
<if test="auditStatus != null">
audit_status,
</if>
<if test="auditor != null">
auditor,
</if>
<if test="auditDate != null">
audit_date,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="remarks != null">
remarks,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="orgCode != null">
#{orgCode,jdbcType=VARCHAR},
</if>
<if test="categoryCode != null">
#{categoryCode,jdbcType=VARCHAR},
</if>
<if test="defineCode != null">
#{defineCode,jdbcType=VARCHAR},
</if>
<if test="score != null">
#{score,jdbcType=REAL},
</if>
<if test="specificTask != null">
#{specificTask,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="number != null">
#{number,jdbcType=INTEGER},
</if>
<if test="unitCode != null">
#{unitCode,jdbcType=VARCHAR},
</if>
<if test="initiatingDepartment != null">
#{initiatingDepartment,jdbcType=VARCHAR},
</if>
<if test="roleCode != null">
#{roleCode,jdbcType=VARCHAR},
</if>
<if test="levelCode != null">
#{levelCode,jdbcType=VARCHAR},
</if>
<if test="proofMaterial != null">
#{proofMaterial,jdbcType=VARCHAR},
</if>
<if test="auditStatus != null">
#{auditStatus,jdbcType=VARCHAR},
</if>
<if test="auditor != null">
#{auditor,jdbcType=VARCHAR},
</if>
<if test="auditDate != null">
#{auditDate,jdbcType=TIMESTAMP},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
<if test="remarks != null">
#{remarks,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalFeedback">
update t_professional_feedback
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="orgCode != null">
org_code = #{orgCode,jdbcType=VARCHAR},
</if>
<if test="categoryCode != null">
category_code = #{categoryCode,jdbcType=VARCHAR},
</if>
<if test="defineCode != null">
define_code = #{defineCode,jdbcType=VARCHAR},
</if>
<if test="score != null">
score = #{score,jdbcType=REAL},
</if>
<if test="specificTask != null">
specific_task = #{specificTask,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="number != null">
`number` = #{number,jdbcType=INTEGER},
</if>
<if test="unitCode != null">
unit_code = #{unitCode,jdbcType=VARCHAR},
</if>
<if test="initiatingDepartment != null">
initiating_department = #{initiatingDepartment,jdbcType=VARCHAR},
</if>
<if test="roleCode != null">
role_code = #{roleCode,jdbcType=VARCHAR},
</if>
<if test="levelCode != null">
level_code = #{levelCode,jdbcType=VARCHAR},
</if>
<if test="proofMaterial != null">
proof_material = #{proofMaterial,jdbcType=VARCHAR},
</if>
<if test="auditStatus != null">
audit_status = #{auditStatus,jdbcType=VARCHAR},
</if>
<if test="auditor != null">
auditor = #{auditor,jdbcType=VARCHAR},
</if>
<if test="auditDate != null">
audit_date = #{auditDate,jdbcType=TIMESTAMP},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
<if test="remarks != null">
remarks = #{remarks,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<!-- <update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalFeedback">-->
<!-- update t_professional_feedback-->
<!-- set user_id = #{userId,jdbcType=BIGINT},-->
<!-- org_code = #{orgCode,jdbcType=VARCHAR},-->
<!-- category_code = #{categoryCode,jdbcType=VARCHAR},-->
<!-- specific_task = #{specificTask,jdbcType=VARCHAR},-->
<!-- start_time = #{startTime,jdbcType=TIMESTAMP},-->
<!-- end_time = #{endTime,jdbcType=TIMESTAMP},-->
<!-- `number` = #{number,jdbcType=INTEGER},-->
<!-- unit_code = #{unitCode,jdbcType=VARCHAR},-->
<!-- initiating_department = #{initiatingDepartment,jdbcType=VARCHAR},-->
<!-- role_code = #{roleCode,jdbcType=VARCHAR},-->
<!-- level_code = #{levelCode,jdbcType=VARCHAR},-->
<!-- proof_material = #{proofMaterial,jdbcType=VARCHAR},-->
<!-- audit_status = #{auditStatus,jdbcType=VARCHAR},-->
<!-- auditor = #{auditor,jdbcType=VARCHAR},-->
<!-- audit_date = #{auditDate,jdbcType=TIMESTAMP},-->
<!-- created_at = #{createdAt,jdbcType=TIMESTAMP},-->
<!-- created_by = #{createdBy,jdbcType=VARCHAR},-->
<!-- updated_at = #{updatedAt,jdbcType=TIMESTAMP},-->
<!-- updated_by = #{updatedBy,jdbcType=VARCHAR},-->
<!-- del_flag = #{delFlag,jdbcType=VARCHAR},-->
<!-- remarks = #{remarks,jdbcType=LONGVARCHAR}-->
<!-- where id = #{id,jdbcType=BIGINT}-->
<!-- </update>-->
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalFeedback">
update t_professional_feedback
set user_id = #{userId,jdbcType=BIGINT},
org_code = #{orgCode,jdbcType=VARCHAR},
category_code = #{categoryCode,jdbcType=VARCHAR},
define_code = #{defineCode,jdbcType=VARCHAR},
score = #{score,jdbcType=REAL},
specific_task = #{specificTask,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
`number` = #{number,jdbcType=INTEGER},
unit_code = #{unitCode,jdbcType=VARCHAR},
initiating_department = #{initiatingDepartment,jdbcType=VARCHAR},
role_code = #{roleCode,jdbcType=VARCHAR},
level_code = #{levelCode,jdbcType=VARCHAR},
proof_material = #{proofMaterial,jdbcType=VARCHAR},
audit_status = #{auditStatus,jdbcType=VARCHAR},
auditor = #{auditor,jdbcType=VARCHAR},
audit_date = #{auditDate,jdbcType=TIMESTAMP},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,16 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.TProfessionalStdRule;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* TProfessionalStdRuleMapper继承基类
*/
@Repository
public interface TProfessionalStdRuleMapper extends MyBatisBaseDao<TProfessionalStdRule, Long> {
List<TProfessionalStdRule> selectByCondition(TProfessionalStdRule tProfessionalStdRule);
}

View File

@@ -0,0 +1,246 @@
<?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="cn.wepact.dfm.training.mapper.TProfessionalStdRuleMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TProfessionalStdRule">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="org_code" jdbcType="VARCHAR" property="orgCode" />
<result column="qualification_level" jdbcType="VARCHAR" property="qualificationLevel" />
<result column="category_code" jdbcType="VARCHAR" property="categoryCode" />
<result column="define_code" jdbcType="VARCHAR" property="defineCode" />
<result column="role_code" jdbcType="VARCHAR" property="roleCode" />
<result column="level_code" jdbcType="VARCHAR" property="levelCode" />
<result column="score" jdbcType="REAL" property="score" />
<result column="required_qlevel" jdbcType="VARCHAR" property="requiredQlevel" />
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
</resultMap>
<sql id="Base_Column_List">
id, org_code, qualification_level, category_code, define_code, role_code, level_code, score, required_qlevel,
parent_id, `type`, created_at, created_by, updated_at, updated_by, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_professional_std_rule
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByCondition" resultMap="BaseResultMap"
parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalStdRule">
SELECT
<include refid="Base_Column_List" />
FROM
t_professional_std_rule
WHERE
del_flag = 0
<if test="orgCode != null and orgCode != ''">
and org_code = #{orgCode,jdbcType=VARCHAR}
</if>
<if test="parentId != null">
and parent_id = #{parentId,jdbcType=BIGINT}
</if>
<if test="type != null">
and type = #{type,jdbcType=VARCHAR}
</if>
<if test="categoryCode != null">
and category_code = #{categoryCode,jdbcType=VARCHAR}
</if>
<if test="defineCode != null">
and define_code = #{defineCode,jdbcType=VARCHAR}
</if>
<if test="roleCode != null">
and role_code = #{roleCode,jdbcType=VARCHAR}
</if>
<if test="levelCode != null">
and level_code = #{levelCode,jdbcType=VARCHAR}
</if>
order by type
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_professional_std_rule
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalStdRule" useGeneratedKeys="true">
insert into t_professional_std_rule (org_code,qualification_level, category_code, define_code,
role_code, level_code, score,
required_qlevel, parent_id, `type`,
created_at, created_by, updated_at,
updated_by, del_flag)
values (#{orgCode,jdbcType=VARCHAR},#{qualificationLevel, jdbcType=VARCHAR}, #{categoryCode,jdbcType=VARCHAR}, #{defineCode,jdbcType=VARCHAR},
#{roleCode,jdbcType=VARCHAR}, #{levelCode,jdbcType=VARCHAR}, #{score,jdbcType=REAL},
#{requiredQlevel,jdbcType=VARCHAR}, #{parentId,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalStdRule" useGeneratedKeys="true">
insert into t_professional_std_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orgCode != null">
org_code,
</if>
<if test="qualificationLevel != null">
qualification_level,
</if>
<if test="categoryCode != null">
category_code,
</if>
<if test="defineCode != null">
define_code,
</if>
<if test="roleCode != null">
role_code,
</if>
<if test="levelCode != null">
level_code,
</if>
<if test="score != null">
score,
</if>
<if test="requiredQlevel != null">
required_qlevel,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="type != null">
`type`,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orgCode != null">
#{orgCode,jdbcType=VARCHAR},
</if>
<if test="qualificationLevel != null">
#{qualificationLevel, jdbcType=VARCHAR},
</if>
<if test="categoryCode != null">
#{categoryCode,jdbcType=VARCHAR},
</if>
<if test="defineCode != null">
#{defineCode,jdbcType=VARCHAR},
</if>
<if test="roleCode != null">
#{roleCode,jdbcType=VARCHAR},
</if>
<if test="levelCode != null">
#{levelCode,jdbcType=VARCHAR},
</if>
<if test="score != null">
#{score,jdbcType=REAL},
</if>
<if test="requiredQlevel != null">
#{requiredQlevel,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
#{parentId,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalStdRule">
update t_professional_std_rule
<set>
<if test="orgCode != null">
org_code = #{orgCode,jdbcType=VARCHAR},
</if>
<if test="qualificationLevel != null">
qualification_level = #{qualificationLevel, jdbcType=VARCHAR},
</if>
<if test="categoryCode != null">
category_code = #{categoryCode,jdbcType=VARCHAR},
</if>
<if test="defineCode != null">
define_code = #{defineCode,jdbcType=VARCHAR},
</if>
<if test="roleCode != null">
role_code = #{roleCode,jdbcType=VARCHAR},
</if>
<if test="levelCode != null">
level_code = #{levelCode,jdbcType=VARCHAR},
</if>
<if test="score != null">
score = #{score,jdbcType=REAL},
</if>
<if test="requiredQlevel != null">
required_qlevel = #{requiredQlevel,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=BIGINT},
</if>
<if test="type != null">
`type` = #{type,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TProfessionalStdRule">
update t_professional_std_rule
set org_code = #{orgCode,jdbcType=VARCHAR},
qualification_level = #{qualificationLevel, jdbcType=VARCHAR},
category_code = #{categoryCode,jdbcType=VARCHAR},
define_code = #{defineCode,jdbcType=VARCHAR},
role_code = #{roleCode,jdbcType=VARCHAR},
level_code = #{levelCode,jdbcType=VARCHAR},
score = #{score,jdbcType=REAL},
required_qlevel = #{requiredQlevel,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=BIGINT},
`type` = #{type,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,34 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.AppliedParam;
import cn.wepact.dfm.training.dto.entity.TQualificationReview;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* TQualificationReviewMapper继承基类
*/
@Mapper
public interface TQualificationReviewMapper extends MyBatisBaseMapper<TQualificationReview, Long> {
List<TQualificationReview> selectByCondition(AppliedParam appliedParam);
List<TQualificationReview> selectWithUserInfoByCondition(AppliedParam condition);
/**
* 根据 user_id 和 project_id 查找唯一记录
* @param userId 用户 ID
* @param projectId 项目 ID
* @return 任职资格审核记录
*/
TQualificationReview findByUserIdAndProjectId(@Param("userId") Long userId, @Param("projectId") Long projectId);
/**
* 插入新的资格审核记录
* @param qualificationReview 资格审核记录
* @return 插入结果
*/
int insertQualificationReview(TQualificationReview qualificationReview);
int updateQualificationReview(TQualificationReview existingReview);
}

View File

@@ -0,0 +1,414 @@
<?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="cn.wepact.dfm.training.mapper.TQualificationReviewMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TQualificationReview">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="current_department" jdbcType="VARCHAR" property="currentDepartment" />
<result column="qualification_standards_id" jdbcType="BIGINT" property="qualificationStandardsId" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="review_time" jdbcType="TIMESTAMP" property="reviewTime" />
<result column="professional_score" jdbcType="DECIMAL" property="professionalScore" />
<result column="professional_tip" jdbcType="VARCHAR" property="professionalTip" />
<result column="elective_course_score" jdbcType="DECIMAL" property="electiveCourseScore" />
<result column="compulsory_course_score" jdbcType="DECIMAL" property="compulsoryCourseScore" />
<result column="offline_score" jdbcType="DECIMAL" property="offlineScore" />
<result column="org_code" jdbcType="VARCHAR" property="orgCode" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
<result column="project_id" jdbcType="BIGINT" property="projectId" /> <!-- 新增的项目ID字段 -->
</resultMap>
<sql id="Base_Column_List">
id, user_id, current_department, qualification_standards_id, `status`, review_time,professional_score,professional_tip, elective_course_score,
compulsory_course_score, offline_score, org_code, created_at, created_by, updated_at, updated_by,
del_flag,project_id <!-- 新增的项目ID字段 -->
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_qualification_review
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByCondition" resultType="cn.wepact.dfm.training.dto.entity.TQualificationReview"
parameterType="cn.wepact.dfm.training.dto.AppliedParam">
SELECT
a.id,
a.user_id as userId,
a.current_department as currentDepartment,
a.`status`,
a.review_time as reviewTime,
b.position_name as positionName,
b.qualification_level as qualificationLevel,
a.compulsory_course_score as compulsoryCourseScore,
a.offline_score as offlineScore,
a.elective_course_score as electiveCourseScore,
a.professional_score as professionalScore,
a.professional_tip as professionalTip,
a.created_at as createdAt,
a.qualification_standards_id as qualificationStandardsId
FROM
t_qualification_review a,
t_qualification_standards b
WHERE
a.qualification_standards_id = b.id
and a.del_flag = 0
<if test="userId != null">
and a.user_id = #{userId}
</if>
<if test="orgCode != null">
and a.org_code = #{orgCode}
</if>
<if test="level != null and level!=''">
and b.qualification_level = #{level}
</if>
<if test="positionName != null and positionName != ''">
and b.position_name = #{positionName}
</if>
<if test="status != null">
and a.`status` = #{status}
</if>
<if test="statusList != null">
<foreach collection="statusList" item="item" open="and a.status in (" separator="," close=")">
#{item}
</foreach>
</if>
<if test="reviewTime != null">
and a.`review_time` = #{reviewTime}
</if>
<if test="startTime != null">
and a.`review_time` >= #{startTime}
</if>
ORDER BY a.created_at desc
</select>
<select id="selectWithUserInfoByCondition" resultType="cn.wepact.dfm.training.dto.entity.TQualificationReview"
parameterType="cn.wepact.dfm.training.dto.AppliedParam">
SELECT
a.id,
a.current_department as currentDepartment,
a.`status`,
a.review_time as reviewTime,
b.position_name as positionName,
b.qualification_level as qualificationLevel,
a.compulsory_course_score as compulsoryCourseScore,
a.offline_score as offlineScore,
a.elective_course_score as electiveCourseScore,
a.professional_score as professionalScore,
a.professional_tip as professionalTip,
a.created_at as createdAt,
c.username,
c.user_no as userNo
FROM
t_qualification_review a,
t_qualification_standards b,
t_user c
WHERE
a.qualification_standards_id = b.id
and a.user_id = c.id
and a.del_flag = 0
<if test="userId != null">
and a.user_id = #{userId}
</if>
<if test="orgCode != null">
and a.org_code = #{orgCode}
</if>
<if test="level != null and level!=''">
and b.qualification_level = #{level}
</if>
<if test="positionName != null and positionName != ''">
and b.position_name = #{positionName}
</if>
<if test="positionNameList != null">
<foreach collection="positionNameList" item="item" open="and b.position_name in (" close=")" separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="status != null and status !=''">
and a.`status` = #{status}
</if>
<if test="username != null and username != ''">
and c.`username` = #{username}
</if>
<if test="userNo != null and userNo != ''">
and c.`user_no` = #{userNo}
</if>
<if test="statusList != null">
<foreach collection="statusList" item="item" open="and a.status in (" separator="," close=")">
#{item}
</foreach>
</if>
<if test="reviewTime != null">
and a.`review_time` = #{reviewTime}
</if>
<if test="startTime != null">
and a.`review_time` >= #{startTime}
</if>
ORDER BY a.created_at desc
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_qualification_review
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationReview" useGeneratedKeys="true">
insert into t_qualification_review (user_id, current_department, qualification_standards_id,
`status`,review_time, professional_score,professional_tip, elective_course_score, compulsory_course_score,
offline_score, org_code, created_at, created_by,
updated_at, updated_by, del_flag,project_id
)
values (#{userId,jdbcType=BIGINT}, #{currentDepartment,jdbcType=VARCHAR}, #{qualificationStandardsId,jdbcType=BIGINT},
#{status,jdbcType=VARCHAR}, #{reviewTime,jdbcType=TIMESTAMP}, #{professionalScore, jdbcType=DECIMAL},#{professionalTip, jdbcType=VARCHAR}, #{electiveCourseScore,jdbcType=DECIMAL}, #{compulsoryCourseScore,jdbcType=DECIMAL},
#{offlineScore,jdbcType=DECIMAL}, #{orgCode,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR}, #{projectId,jdbcType=BIGINT}) <!-- 新增的项目ID字段 -->
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationReview" useGeneratedKeys="true">
insert into t_qualification_review
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="currentDepartment != null">
current_department,
</if>
<if test="qualificationStandardsId != null">
qualification_standards_id,
</if>
<if test="status != null">
`status`,
</if>
<if test="reviewTime != null">
`review_time`,
</if>
<if test="professionalScore !=null">
professional_score,
</if>
<if test="professionalTip !=null">
professional_tip,
</if>
<if test="electiveCourseScore != null">
elective_course_score,
</if>
<if test="compulsoryCourseScore != null">
compulsory_course_score,
</if>
<if test="offlineScore != null">
offline_score,
</if>
<if test="orgCode != null">
org_code,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="projectId != null">
project_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="currentDepartment != null">
#{currentDepartment,jdbcType=VARCHAR},
</if>
<if test="qualificationStandardsId != null">
#{qualificationStandardsId,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="reviewTime != null">
#{reviewTime,jdbcType=TIMESTAMP},
</if>
<if test="professionalScore !=null">
#{professionalScore, jdbcType=DECIMAL},
</if>
<if test="professionalTip != null">
#{professionalTip, jdbcType=VARCHAR},
</if>
<if test="electiveCourseScore != null">
#{electiveCourseScore,jdbcType=DECIMAL},
</if>
<if test="compulsoryCourseScore != null">
#{compulsoryCourseScore,jdbcType=DECIMAL},
</if>
<if test="offlineScore!= null">
#{offlineScore,jdbcType=DECIMAL},
</if>
<if test="orgCode != null">
#{orgCode,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationReview">
update t_qualification_review
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="currentDepartment != null">
current_department = #{currentDepartment,jdbcType=VARCHAR},
</if>
<if test="qualificationStandardsId != null">
qualification_standards_id = #{qualificationStandardsId,jdbcType=BIGINT},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="reviewTime != null">
review_time = #{reviewTime,jdbcType=TIMESTAMP},
</if>
<if test="professionalScore != null">
professional_score = #{professionalScore, jdbcType=DECIMAL},
</if>
<if test="professionalTip != null">
professional_tip = #{professionalTip, jdbcType=VARCHAR},
</if>
<if test="professionalScore != null">
professional_score = #{professionalScore, jdbcType=DECIMAL},
</if>
<if test="professionalTip != null">
professional_tip = #{professionalTip, jdbcType=VARCHAR},
</if>
<if test="electiveCourseScore != null">
elective_course_score = #{electiveCourseScore,jdbcType=DECIMAL},
</if>
<if test="compulsoryCourseScore != null">
compulsory_course_score = #{compulsoryCourseScore,jdbcType=DECIMAL},
</if>
<if test="offlineScore != null">
offline_score = #{offlineScore,jdbcType=DECIMAL},
</if>
<if test="orgCode != null">
org_code = #{orgCode,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationReview">
update t_qualification_review
set user_id = #{userId,jdbcType=BIGINT},
current_department = #{currentDepartment,jdbcType=VARCHAR},
qualification_standards_id = #{qualificationStandardsId,jdbcType=BIGINT},
`status` = #{status,jdbcType=VARCHAR},
review_time = #{reviewTime,jdbcType=TIMESTAMP},
professional_score = #{professionalScore, jdbcType=DECIMAL},
professional_tip = #{professionalTip, jdbcType=VARCHAR},
elective_course_score = #{electiveCourseScore,jdbcType=DECIMAL},
compulsory_course_score = #{compulsoryCourseScore,jdbcType=DECIMAL},
offline_score = #{offlineScore, jdbcType=DECIMAL},
org_code = #{orgCode,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=BIGINT} <!-- 新增的项目ID字段 -->
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findByUserIdAndProjectId" resultMap="BaseResultMap">
SELECT *
FROM t_qualification_review
WHERE user_id = #{userId}
AND project_id = #{projectId}
AND status IN ('0', '1', '2', '3')
AND del_flag = '0' <!-- 假设 "del_flag" 表示删除标记 -->
</select>
<insert id="insertQualificationReview">
INSERT INTO t_qualification_review (
user_id,
current_department,
qualification_standards_id,
status,
review_time,
professional_score,
professional_tip,
elective_course_score,
compulsory_course_score,
offline_score,
org_code,
project_id
) VALUES (
#{userId},
#{currentDepartment},
#{qualificationStandardsId},
#{status},
#{reviewTime},
#{professionalScore},
#{professionalTip},
#{electiveCourseScore},
#{compulsoryCourseScore},
#{offlineScore},
#{orgCode},
#{projectId}
)
</insert>
<!-- 更新资格审核记录 -->
<update id="updateQualificationReview" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationReview">
UPDATE t_qualification_review
SET
professional_score = #{professionalScore},
professional_tip = #{professionalTip},
elective_course_score = #{electiveCourseScore},
compulsory_course_score = #{compulsoryCourseScore},
offline_score = #{offlineScore},
status = #{status},
updated_at = CURRENT_TIMESTAMP
WHERE user_id = #{userId}
AND project_id = #{projectId}
AND del_flag = '0'
AND status IN ('0', '1', '2')
</update>
</mapper>

View File

@@ -0,0 +1,36 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.InternalInfoParam;
import cn.wepact.dfm.training.dto.entity.TQualificationStandards;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* TQualificationStandardsMapper继承基类
*/
@Mapper
public interface TQualificationStandardsMapper extends MyBatisBaseMapper<TQualificationStandards, Long> {
List<TQualificationStandards> selectAllByOrgCode(@Param("orgCode") String orgCode);
List<TQualificationStandards> selectByCondition(InternalInfoParam internalInfoParam);
/**
* 根据ID查找对应的记录
*
* @param id 记录唯一标识符
* @return TQualificationStandards 对象
*/
TQualificationStandards findById(Long id);
/**
* 根据ID和单位编码查找对应的记录
*
* @param qualificationStandardsId 记录唯一标识符
* @param orgCode 单位编码
* @return TQualificationStandards 对象
*/
TQualificationStandards findByIdAndOrgCode(@Param("qualificationStandardsId") Long qualificationStandardsId, @Param("orgCode") String orgCode);
}

View File

@@ -0,0 +1,231 @@
<?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="cn.wepact.dfm.training.mapper.TQualificationStandardsMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TQualificationStandards">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="position_name" jdbcType="VARCHAR" property="positionName" />
<result column="qualification_level" jdbcType="VARCHAR" property="qualificationLevel" />
<result column="org_code" jdbcType="VARCHAR" property="orgCode" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
<result column="qualification_criteria" jdbcType="LONGVARCHAR" property="qualificationCriteria" />
</resultMap>
<sql id="Base_Column_List">
id, position_name, qualification_level, org_code, created_at,
created_by, updated_at, updated_by, del_flag,qualification_criteria
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_qualification_standards
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectAllByOrgCode" resultType="cn.wepact.dfm.training.dto.entity.TQualificationStandards"
parameterType="java.lang.String">
SELECT
id,
position_name as positionName,
qualification_level as qualificationLevel,
qualification_criteria as qualificationCriteria
FROM
t_qualification_standards
WHERE
del_flag = '0'
AND org_code = #{orgCode}
</select>
<select id="selectByCondition" resultType="cn.wepact.dfm.training.dto.entity.TQualificationStandards"
parameterType="cn.wepact.dfm.training.dto.InternalInfoParam">
SELECT
id,
position_name as positionName,
qualification_level as qualificationLevel,
qualification_criteria as qualificationCriteria
FROM
t_qualification_standards
WHERE
del_flag = '0'
<if test="orgCode != null">
AND org_code = #{orgCode}
</if>
<if test="positionName != null">
AND position_name like CONCAT('%',#{positionName},'%')
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_qualification_standards
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationStandards" useGeneratedKeys="true">
insert into t_qualification_standards (position_name, qualification_level,
org_code, created_at,
created_by, updated_at, updated_by,
del_flag, qualification_criteria)
values (#{positionName,jdbcType=VARCHAR}, #{qualificationLevel,jdbcType=VARCHAR},
#{orgCode,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR},
#{delFlag,jdbcType=VARCHAR}, #{qualificationCriteria,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationStandards" useGeneratedKeys="true">
insert into t_qualification_standards
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="positionName != null">
position_name,
</if>
<if test="qualificationLevel != null">
qualification_level,
</if>
<if test="orgCode != null">
org_code,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
<if test="qualificationCriteria != null">
qualification_criteria,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="positionName != null">
#{positionName,jdbcType=VARCHAR},
</if>
<if test="qualificationLevel != null">
#{qualificationLevel,jdbcType=VARCHAR},
</if>
<if test="orgCode != null">
#{orgCode,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
<if test="qualificationCriteria != null">
#{qualificationCriteria,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationStandards">
update t_qualification_standards
<set>
<if test="positionName != null">
position_name = #{positionName,jdbcType=VARCHAR},
</if>
<if test="qualificationLevel != null">
qualification_level = #{qualificationLevel,jdbcType=VARCHAR},
</if>
<if test="orgCode != null">
org_code = #{orgCode,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
<if test="qualificationCriteria != null">
qualification_criteria = #{qualificationCriteria,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<!-- <update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationStandards">-->
<!-- update t_qualification_standards-->
<!-- set position_name = #{positionName,jdbcType=VARCHAR},-->
<!-- qualification_level = #{qualificationLevel,jdbcType=VARCHAR},-->
<!-- org_code = #{orgCode,jdbcType=VARCHAR},-->
<!-- created_at = #{createdAt,jdbcType=TIMESTAMP},-->
<!-- created_by = #{createdBy,jdbcType=VARCHAR},-->
<!-- updated_at = #{updatedAt,jdbcType=TIMESTAMP},-->
<!-- updated_by = #{updatedBy,jdbcType=VARCHAR},-->
<!-- del_flag = #{delFlag,jdbcType=VARCHAR},-->
<!-- qualification_criteria = #{qualificationCriteria,jdbcType=LONGVARCHAR}-->
<!-- where id = #{id,jdbcType=BIGINT}-->
<!-- </update>-->
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TQualificationStandards">
update t_qualification_standards
set position_name = #{positionName,jdbcType=VARCHAR},
qualification_level = #{qualificationLevel,jdbcType=VARCHAR},
org_code = #{orgCode,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="findById" resultMap="BaseResultMap">
SELECT
id,
position_name,
qualification_level,
org_code,
qualification_criteria,
created_at,
created_by,
updated_at,
updated_by,
del_flag
FROM
t_qualification_standards
WHERE
id = #{id}
AND
del_flag = '0'
</select>
<select id="findByIdAndOrgCode" resultMap="BaseResultMap">
SELECT
id,
position_name,
qualification_level,
org_code,
qualification_criteria,
created_at,
created_by,
updated_at,
updated_by,
del_flag
FROM
t_qualification_standards
WHERE
id = #{qualificationStandardsId}
AND org_code = #{orgCode}
AND del_flag = '0'
</select>
</mapper>

View File

@@ -0,0 +1,25 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.TUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* TUserMapper继承基类
*/
@Mapper
public interface TUserMapper extends MyBatisBaseMapper<TUser, Long> {
// 根据用户名查询用户信息
List<TUser> selectByConditions(TUser tUser);
TUser selectByUserNo(String userNo);
/**
* 根据 username 查询用户的 id
* @param username 用户名
* @return 用户 ID
*/
Long findUserIdByUsername(@Param("username") String username);
}

View File

@@ -0,0 +1,193 @@
<?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="cn.wepact.dfm.training.mapper.TUserMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TUser">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="user_avatar" jdbcType="VARCHAR" property="userAvatar" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="user_no" jdbcType="INTEGER" property="userNo" />
<result column="show_tip" jdbcType="VARCHAR" property="showTip" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
</resultMap>
<sql id="Base_Column_List">
id, username, `password`, user_avatar, user_no, show_tip, updated_at, updated_by, created_at,
created_by, del_flag, email
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_user
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TUser" useGeneratedKeys="true">
insert into t_user (username, `password`, user_avatar,
user_no, updated_at, updated_by,
created_at, created_by, del_flag
)
values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{userAvatar,jdbcType=VARCHAR},
#{userNo,jdbcType=INTEGER}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TUser" useGeneratedKeys="true">
insert into t_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="username != null">
username,
</if>
<if test="password != null">
`password`,
</if>
<if test="userAvatar != null">
user_avatar,
</if>
<if test="userNo != null">
user_no,
</if>
<if test="email != null">
email,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="userAvatar != null">
#{userAvatar,jdbcType=VARCHAR},
</if>
<if test="userNo != null">
#{userNo,jdbcType=INTEGER},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TUser">
update t_user
<set>
<if test="username != null">
username = #{username,jdbcType=VARCHAR},
</if>
<if test="password != null">
`password` = #{password,jdbcType=VARCHAR},
</if>
<if test="userAvatar != null">
user_avatar = #{userAvatar,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="userNo != null">
user_no = #{userNo,jdbcType=INTEGER},
</if>
<if test="showTip != null">
show_tip = #{showTip,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TUser">
update t_user
set username = #{username,jdbcType=VARCHAR},
`password` = #{password,jdbcType=VARCHAR},
user_avatar = #{userAvatar,jdbcType=VARCHAR},
user_no = #{userNo,jdbcType=INTEGER},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<!-- 根据用户名查询用户信息 -->
<select id="selectByUserNo" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM t_user
WHERE user_no = #{userNo}
and del_flag='0'
</select>
<select id="selectByConditions" resultType="cn.wepact.dfm.training.dto.entity.TUser">
SELECT
a.user_no as userNo,
a.show_tip as showTip,
a.username,
a.`password`,
a.id,
b.user_type as userType,
b.pre_type as preType,
b.org_code as `orgCode`,
a.email
FROM t_user a,
t_user_permission b
WHERE
a.id = b.user_id
and a.user_no = #{userNo}
and b.org_code = #{orgCode}
and a.del_flag = '0'
and b.del_flag ='0'
</select>
<select id="findUserIdByUsername" resultType="java.lang.Long">
SELECT id FROM t_user WHERE user_no = #{username}
</select>
</mapper>

View File

@@ -0,0 +1,15 @@
package cn.wepact.dfm.training.mapper;
import cn.wepact.dfm.training.dto.entity.TUserPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* TUserPermissionMapper继承基类
*/
@Mapper
public interface TUserPermissionMapper extends MyBatisBaseMapper<TUserPermission, Long> {
List<TUserPermission> selectByUserId(@Param("userId") Long userId);
}

View File

@@ -0,0 +1,154 @@
<?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="cn.wepact.dfm.training.mapper.TUserPermissionMapper">
<resultMap id="BaseResultMap" type="cn.wepact.dfm.training.dto.entity.TUserPermission">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="user_type" jdbcType="VARCHAR" property="userType" />
<result column="org_code" jdbcType="VARCHAR" property="orgCode" />
<result column="pre_type" jdbcType="VARCHAR" property="preType" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, user_type, org_code, pre_type, updated_at, updated_by, created_at,
created_by, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_user_permission
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByUserId" resultMap="BaseResultMap"
parameterType="java.lang.Long">
select
<include refid="Base_Column_List" />
from t_user_permission
where user_id = #{userId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_user_permission
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TUserPermission" useGeneratedKeys="true">
insert into t_user_permission (user_id, user_type, org_code,
pre_type, updated_at, updated_by,
created_at, created_by, del_flag
)
values (#{userId,jdbcType=BIGINT}, #{userType,jdbcType=VARCHAR}, #{orgCode,jdbcType=BIGINT},
#{preType,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="cn.wepact.dfm.training.dto.entity.TUserPermission" useGeneratedKeys="true">
insert into t_user_permission
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="userType != null">
user_type,
</if>
<if test="orgCode != null">
org_code,
</if>
<if test="preType != null">
pre_type,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="userType != null">
#{userType,jdbcType=VARCHAR},
</if>
<if test="orgCode != null">
#{orgCode,jdbcType=BIGINT},
</if>
<if test="preType != null">
#{preType,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
#{delFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.wepact.dfm.training.dto.entity.TUserPermission">
update t_user_permission
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="userType != null">
user_type = #{userType,jdbcType=VARCHAR},
</if>
<if test="orgCode != null">
org_code = #{orgCode,jdbcType=VARCHAR},
</if>
<if test="preType != null">
pre_type = #{preType,jdbcType=VARCHAR},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=VARCHAR},
</if>
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="cn.wepact.dfm.training.dto.entity.TUserPermission">
update t_user_permission
set user_id = #{userId,jdbcType=BIGINT},
user_type = #{userType,jdbcType=VARCHAR},
org_code = #{orgCode,jdbcType=VARCHAR},
pre_type = #{preType,jdbcType=VARCHAR},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>