This commit is contained in:
2026-07-20 11:48:06 +08:00
parent 7119dc76a9
commit f379291e4f
409 changed files with 150227 additions and 8557 deletions
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.ClassInfo;
/**
* 班级管理Mapper
*/
public interface ClassInfoMapper extends BaseMapper<ClassInfo> {
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.College;
/**
* 学院管理Mapper
*/
public interface CollegeMapper extends BaseMapper<College> {
}
@@ -0,0 +1,24 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.CrossSchoolActivityArticle;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 跨校活动情报文章Mapper
*
* @author Codex
* @since 2026-07-04
*/
public interface CrossSchoolActivityArticleMapper extends BaseMapper<CrossSchoolActivityArticle> {
/**
* 批量新增或更新
*
* @param list 文章列表
* @return 影响行数
*/
int batchUpsert(@Param("list") List<CrossSchoolActivityArticle> list);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.gxmu.entity.Declare;
import com.gxwebsoft.gxmu.param.DeclareParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 申报管理Mapper
*
* @author LX
* @since 2026-03-28 15:06:52
*/
public interface DeclareMapper extends BaseMapper<Declare> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<Declare>
*/
List<Declare> selectPageRel(@Param("page") IPage<Declare> page,
@Param("param") DeclareParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<Declare> selectListRel(@Param("param") DeclareParam param);
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.QmgcForm;
/**
* 青马工程培训班学员登记表Mapper
*/
public interface QmgcFormMapper extends BaseMapper<QmgcForm> {
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.gxmu.entity.ReviewFlowConfig;
import com.gxwebsoft.gxmu.param.ReviewFlowConfigParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* Mapper
*
* @author LX
* @since 2026-03-18 10:37:18
*/
public interface ReviewFlowConfigMapper extends BaseMapper<ReviewFlowConfig> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<ReviewFlowConfig>
*/
List<ReviewFlowConfig> selectPageRel(@Param("page") IPage<ReviewFlowConfig> page,
@Param("param") ReviewFlowConfigParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<ReviewFlowConfig> selectListRel(@Param("param") ReviewFlowConfigParam param);
}
@@ -0,0 +1,37 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.gxmu.entity.ReviewFlow;
import com.gxwebsoft.gxmu.param.ReviewFlowParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 审核流Mapper
*
* @author LX
* @since 2026-03-18 10:37:18
*/
public interface ReviewFlowMapper extends BaseMapper<ReviewFlow> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<ReviewFlow>
*/
List<ReviewFlow> selectPageRel(@Param("page") IPage<ReviewFlow> page,
@Param("param") ReviewFlowParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<ReviewFlow> selectListRel(@Param("param") ReviewFlowParam param);
}
@@ -0,0 +1,47 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.gxmu.entity.ReviewList;
import com.gxwebsoft.gxmu.param.ReviewListParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 审核列表Mapper
*
* @author LX
* @since 2026-03-18 15:50:51
*/
public interface ReviewListMapper extends BaseMapper<ReviewList> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<ReviewList>
*/
List<ReviewList> selectPageRel(@Param("page") IPage<ReviewList> page,
@Param("param") ReviewListParam param);
/**
* 分页查询聚合后的审核列表
*
* @param page 分页对象
* @param param 查询参数
* @return List<ReviewList>
*/
List<ReviewList> selectPageGroupRel(@Param("page") IPage<ReviewList> page,
@Param("param") ReviewListParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<ReviewList> selectListRel(@Param("param") ReviewListParam param);
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.SjqnForm;
/**
* 十佳青年申报表Mapper
*/
public interface SjqnFormMapper extends BaseMapper<SjqnForm> {
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.SjtbzbsjForm;
/**
* 十佳团支部书记申报表Mapper
*/
public interface SjtbzbsjFormMapper extends BaseMapper<SjtbzbsjForm> {
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.TyglForm;
/**
* 团员管理Mapper
*/
public interface TyglFormMapper extends BaseMapper<TyglForm> {
}
@@ -0,0 +1,24 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.TzbProjectListRecord;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 挑战杯项目库列表记录Mapper
*
* @author Codex
* @since 2026-04-14
*/
public interface TzbProjectListRecordMapper extends BaseMapper<TzbProjectListRecord> {
/**
* 批量新增或更新
*
* @param list 列表记录
* @return 影响行数
*/
int batchUpsert(@Param("list") List<TzbProjectListRecord> list);
}
@@ -0,0 +1,24 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.TzbTalentListRecord;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 挑战杯人才库列表记录Mapper
*
* @author Codex
* @since 2026-04-14
*/
public interface TzbTalentListRecordMapper extends BaseMapper<TzbTalentListRecord> {
/**
* 批量新增或更新
*
* @param list 列表记录
* @return 影响行数
*/
int batchUpsert(@Param("list") List<TzbTalentListRecord> list);
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.TzbcyForm;
/**
* 挑战杯创业计划竞赛申报表Mapper
*/
public interface TzbcyFormMapper extends BaseMapper<TzbcyForm> {
}
@@ -0,0 +1,19 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.gxmu.entity.TzbcyMaterial;
import com.gxwebsoft.gxmu.param.TzbcyMaterialParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 挑战杯申报材料Mapper
*/
public interface TzbcyMaterialMapper extends BaseMapper<TzbcyMaterial> {
List<TzbcyMaterial> selectPageRel(@Param("page") IPage<TzbcyMaterial> page,
@Param("param") TzbcyMaterialParam param);
List<TzbcyMaterial> selectListRel(@Param("param") TzbcyMaterialParam param);
}
@@ -0,0 +1,7 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.WorkLedger;
public interface WorkLedgerMapper extends BaseMapper<WorkLedger> {
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.WshqtwForm;
/**
* 五四红旗团委申报表Mapper
*/
public interface WshqtwFormMapper extends BaseMapper<WshqtwForm> {
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.WshqtzbForm;
/**
* 五四红旗团支部申报表Mapper
*/
public interface WshqtzbFormMapper extends BaseMapper<WshqtzbForm> {
}
@@ -0,0 +1,7 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.WxxzxApplicant;
public interface WxxzxApplicantMapper extends BaseMapper<WxxzxApplicant> {
}
@@ -0,0 +1,7 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.WxxzxArchiveRecord;
public interface WxxzxArchiveRecordMapper extends BaseMapper<WxxzxArchiveRecord> {
}
@@ -0,0 +1,7 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.WxxzxBudgetItem;
public interface WxxzxBudgetItemMapper extends BaseMapper<WxxzxBudgetItem> {
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.WxxzxForm;
/**
* 未来学术之星课题申报表Mapper
*/
public interface WxxzxFormMapper extends BaseMapper<WxxzxForm> {
}
@@ -0,0 +1,7 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.WxxzxGuidanceTeacher;
public interface WxxzxGuidanceTeacherMapper extends BaseMapper<WxxzxGuidanceTeacher> {
}
@@ -0,0 +1,7 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.WxxzxReviewMemberEntity;
public interface WxxzxReviewMemberEntityMapper extends BaseMapper<WxxzxReviewMemberEntity> {
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.YxgqtdgbForm;
/**
* 优秀共青团干部申报表Mapper
*/
public interface YxgqtdgbFormMapper extends BaseMapper<YxgqtdgbForm> {
}
@@ -0,0 +1,10 @@
package com.gxwebsoft.gxmu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gxwebsoft.gxmu.entity.YxgqtyForm;
/**
* 优秀共青团员申报表Mapper
*/
public interface YxgqtyFormMapper extends BaseMapper<YxgqtyForm> {
}
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gxwebsoft.gxmu.mapper.CrossSchoolActivityArticleMapper">
<insert id="batchUpsert">
INSERT INTO gxmu_cross_school_activity_article (
source_key,
title,
school_name,
category,
heat_level,
source_name,
publish_time,
summary,
tags,
cover_image,
detail_url,
source_url,
highlight,
content_text,
last_sync_time,
create_time,
update_time,
deleted
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.sourceKey},
#{item.title},
#{item.schoolName},
#{item.category},
#{item.heatLevel},
#{item.sourceName},
#{item.publishTime},
#{item.summary},
#{item.tags},
#{item.coverImage},
#{item.detailUrl},
#{item.sourceUrl},
#{item.highlight},
#{item.contentText},
#{item.lastSyncTime},
#{item.createTime},
#{item.updateTime},
#{item.deleted}
)
</foreach>
ON DUPLICATE KEY UPDATE
title = VALUES(title),
school_name = VALUES(school_name),
category = VALUES(category),
heat_level = VALUES(heat_level),
source_name = VALUES(source_name),
publish_time = VALUES(publish_time),
summary = VALUES(summary),
tags = VALUES(tags),
cover_image = VALUES(cover_image),
detail_url = VALUES(detail_url),
source_url = VALUES(source_url),
highlight = VALUES(highlight),
content_text = VALUES(content_text),
last_sync_time = VALUES(last_sync_time),
update_time = VALUES(update_time),
deleted = VALUES(deleted)
</insert>
</mapper>
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gxwebsoft.gxmu.mapper.DeclareMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM gxmu_declare a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.year != null">
AND a.year = #{param.year}
</if>
<if test="param.module != null">
AND a.module LIKE CONCAT('%', #{param.module}, '%')
</if>
<if test="param.projectType != null">
AND a.project_type LIKE CONCAT('%', #{param.projectType}, '%')
</if>
<if test="param.projectGroup != null">
AND a.project_group LIKE CONCAT('%', #{param.projectGroup}, '%')
</if>
<if test="param.formProjectType != null">
AND a.form_project_type LIKE CONCAT('%', #{param.formProjectType}, '%')
</if>
<if test="param.formProjectGroup != null">
AND a.form_project_group LIKE CONCAT('%', #{param.formProjectGroup}, '%')
</if>
<if test="param.publicProjectType != null">
AND a.public_project_type LIKE CONCAT('%', #{param.publicProjectType}, '%')
</if>
<if test="param.publicProjectGroup != null">
AND a.public_project_group LIKE CONCAT('%', #{param.publicProjectGroup}, '%')
</if>
<if test="param.startTime != null">
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
</if>
<if test="param.endTime != null">
AND a.end_time LIKE CONCAT('%', #{param.endTime}, '%')
</if>
<if test="param.userId != null">
AND a.user_id LIKE CONCAT('%', #{param.userId}, '%')
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.usable != null">
AND a.start_time &lt;= now() AND a.end_time &gt;= now()
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.keywords != null">
AND (a.title LIKE CONCAT('%', #{param.keywords}, '%')
OR a.project_type LIKE CONCAT('%', #{param.keywords}, '%')
OR a.project_group LIKE CONCAT('%', #{param.keywords}, '%')
OR a.form_project_type LIKE CONCAT('%', #{param.keywords}, '%')
OR a.form_project_group LIKE CONCAT('%', #{param.keywords}, '%')
OR a.public_project_type LIKE CONCAT('%', #{param.keywords}, '%')
OR a.public_project_group LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.Declare">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.Declare">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gxwebsoft.gxmu.mapper.ReviewFlowConfigMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM gxmu_review_flow_config a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.flowId != null">
AND a.flow_id = #{param.flowId}
</if>
<if test="param.module != null">
AND a.module LIKE CONCAT('%', #{param.module}, '%')
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.ReviewFlowConfig">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.ReviewFlowConfig">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gxwebsoft.gxmu.mapper.ReviewFlowMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM gxmu_review_flow a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.organizationId != null">
AND a.organization_id = #{param.organizationId}
</if>
<if test="param.level != null">
AND a.level = #{param.level}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.keywords != null">
AND (a.title LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
<if test="param.withGroup != null">
GROUP BY a.title
</if>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.ReviewFlow">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.ReviewFlow">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,484 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gxwebsoft.gxmu.mapper.ReviewListMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM gxmu_review_list a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.module != null">
AND a.module LIKE CONCAT('%', #{param.module}, '%')
</if>
<if test="param.pk != null">
AND a.pk = #{param.pk}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.content != null">
AND a.content LIKE CONCAT('%', #{param.content}, '%')
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.organizationIds != null and param.organizationIds.size() > 0">
AND (
(a.module = 'gxmu_tzbcy_form' AND EXISTS (
SELECT 1
FROM gxmu_tzbcy_form f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_sjqn' AND EXISTS (
SELECT 1
FROM gxmu_sjqn f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_sjtbzbsj' AND EXISTS (
SELECT 1
FROM gxmu_sjtbzbsj f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_wshqtw' AND EXISTS (
SELECT 1
FROM gxmu_wshqtw f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_wshqtzb' AND EXISTS (
SELECT 1
FROM gxmu_wshqtzb f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_yxgqtdgb' AND EXISTS (
SELECT 1
FROM gxmu_yxgqtdgb f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_yxgqty' AND EXISTS (
SELECT 1
FROM gxmu_yxgqty f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_qmgc_form' AND EXISTS (
SELECT 1
FROM gxmu_qmgc_form f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_wxxzx_project' AND EXISTS (
SELECT 1
FROM gxmu_wxxzx_project f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_tygl_form' AND EXISTS (
SELECT 1
FROM gxmu_tygl_form f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
)
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.ReviewList">
<include refid="selectSql"></include>
</select>
<!-- 分页查询聚合后的审核列表 -->
<select id="selectPageGroupRel" resultType="com.gxwebsoft.gxmu.entity.ReviewList">
SELECT latest.id,
latest.module,
latest.pk,
CASE
WHEN latest.module = 'gxmu_tzbcy_form' THEN (
SELECT IFNULL(f.project_name, '')
FROM gxmu_tzbcy_form f
WHERE f.id = latest.pk AND f.deleted = 0
)
WHEN latest.module = 'gxmu_sjqn' THEN (
SELECT IFNULL(f.name, '')
FROM gxmu_sjqn f
WHERE f.id = latest.pk AND f.deleted = 0
)
WHEN latest.module = 'gxmu_sjtbzbsj' THEN (
SELECT IFNULL(f.name, '')
FROM gxmu_sjtbzbsj f
WHERE f.id = latest.pk AND f.deleted = 0
)
WHEN latest.module = 'gxmu_qmgc_form' THEN (
SELECT IFNULL(f.name, '')
FROM gxmu_qmgc_form f
WHERE f.id = latest.pk AND f.deleted = 0
)
WHEN latest.module = 'gxmu_yxgqtdgb' THEN (
SELECT IFNULL(f.name, '')
FROM gxmu_yxgqtdgb f
WHERE f.id = latest.pk AND f.deleted = 0
)
WHEN latest.module = 'gxmu_yxgqty' THEN (
SELECT IFNULL(f.name, '')
FROM gxmu_yxgqty f
WHERE f.id = latest.pk AND f.deleted = 0
)
WHEN latest.module = 'gxmu_wshqtw' THEN (
SELECT IFNULL(f.org_name, '')
FROM gxmu_wshqtw f
WHERE f.id = latest.pk AND f.deleted = 0
)
WHEN latest.module = 'gxmu_wshqtzb' THEN (
SELECT IFNULL(f.branch_name, '')
FROM gxmu_wshqtzb f
WHERE f.id = latest.pk AND f.deleted = 0
)
WHEN latest.module = 'gxmu_wxxzx_project' THEN (
SELECT IFNULL(f.topic_name, '')
FROM gxmu_wxxzx_project f
WHERE f.id = latest.pk AND f.deleted = 0
)
ELSE ''
END AS business_name,
latest.status,
latest.content,
latest.deleted,
latest.tenant_id,
grouped.first_create_time AS create_time,
latest.update_time,
latest.user_id,
latest.sort_number
FROM (
SELECT a.module,
a.pk,
MIN(a.create_time) AS first_create_time
FROM gxmu_review_list a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.module != null">
AND a.module LIKE CONCAT('%', #{param.module}, '%')
</if>
<if test="param.pk != null">
AND a.pk = #{param.pk}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND a.deleted = 0
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.organizationIds != null and param.organizationIds.size() > 0">
AND (
(a.module = 'gxmu_tzbcy_form' AND EXISTS (
SELECT 1
FROM gxmu_tzbcy_form f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_sjqn' AND EXISTS (
SELECT 1
FROM gxmu_sjqn f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_sjtbzbsj' AND EXISTS (
SELECT 1
FROM gxmu_sjtbzbsj f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_wshqtw' AND EXISTS (
SELECT 1
FROM gxmu_wshqtw f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_wshqtzb' AND EXISTS (
SELECT 1
FROM gxmu_wshqtzb f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_yxgqtdgb' AND EXISTS (
SELECT 1
FROM gxmu_yxgqtdgb f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_yxgqty' AND EXISTS (
SELECT 1
FROM gxmu_yxgqty f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_qmgc_form' AND EXISTS (
SELECT 1
FROM gxmu_qmgc_form f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_wxxzx_project' AND EXISTS (
SELECT 1
FROM gxmu_wxxzx_project f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
OR (a.module = 'gxmu_tygl_form' AND EXISTS (
SELECT 1
FROM gxmu_tygl_form f
LEFT JOIN sys_user su ON su.user_id = f.user_id
WHERE f.id = a.pk
AND f.deleted = 0
AND su.deleted = 0
AND su.organization_id IN
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
#{item}
</foreach>
))
)
</if>
<if test="param.keywords != null and param.keywords != ''">
AND (
a.content LIKE CONCAT('%', #{param.keywords}, '%')
OR (a.module = 'gxmu_tzbcy_form' AND EXISTS (
SELECT 1 FROM gxmu_tzbcy_form f
WHERE f.id = a.pk AND f.deleted = 0
AND f.project_name LIKE CONCAT('%', #{param.keywords}, '%')
))
OR (a.module IN ('gxmu_sjqn', 'gxmu_sjtbzbsj', 'gxmu_qmgc_form', 'gxmu_yxgqtdgb', 'gxmu_yxgqty') AND (
(a.module = 'gxmu_sjqn' AND EXISTS (
SELECT 1 FROM gxmu_sjqn f
WHERE f.id = a.pk AND f.deleted = 0
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
))
OR (a.module = 'gxmu_sjtbzbsj' AND EXISTS (
SELECT 1 FROM gxmu_sjtbzbsj f
WHERE f.id = a.pk AND f.deleted = 0
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
))
OR (a.module = 'gxmu_qmgc_form' AND EXISTS (
SELECT 1 FROM gxmu_qmgc_form f
WHERE f.id = a.pk AND f.deleted = 0
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
))
OR (a.module = 'gxmu_yxgqtdgb' AND EXISTS (
SELECT 1 FROM gxmu_yxgqtdgb f
WHERE f.id = a.pk AND f.deleted = 0
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
))
OR (a.module = 'gxmu_yxgqty' AND EXISTS (
SELECT 1 FROM gxmu_yxgqty f
WHERE f.id = a.pk AND f.deleted = 0
AND f.name LIKE CONCAT('%', #{param.keywords}, '%')
))
))
OR (a.module = 'gxmu_wshqtw' AND EXISTS (
SELECT 1 FROM gxmu_wshqtw f
WHERE f.id = a.pk AND f.deleted = 0
AND f.org_name LIKE CONCAT('%', #{param.keywords}, '%')
))
OR (a.module = 'gxmu_wshqtzb' AND EXISTS (
SELECT 1 FROM gxmu_wshqtzb f
WHERE f.id = a.pk AND f.deleted = 0
AND f.branch_name LIKE CONCAT('%', #{param.keywords}, '%')
))
OR (a.module = 'gxmu_wxxzx_project' AND EXISTS (
SELECT 1 FROM gxmu_wxxzx_project f
WHERE f.id = a.pk AND f.deleted = 0
AND f.topic_name LIKE CONCAT('%', #{param.keywords}, '%')
))
)
</if>
</where>
GROUP BY a.module, a.pk
) grouped
INNER JOIN (
SELECT b.module,
b.pk,
MAX(b.id) AS latest_id
FROM gxmu_review_list b
<where>
<if test="param.deleted != null">
AND b.deleted = #{param.deleted}
</if>
<if test="param.deleted == null">
AND b.deleted = 0
</if>
</where>
GROUP BY b.module, b.pk
) latest_group ON latest_group.module = grouped.module
AND latest_group.pk = grouped.pk
INNER JOIN gxmu_review_list latest ON latest.id = latest_group.latest_id
<where>
<if test="param.status != null">
AND latest.status = #{param.status}
</if>
<if test="param.content != null">
AND latest.content LIKE CONCAT('%', #{param.content}, '%')
</if>
</where>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.ReviewList">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gxwebsoft.gxmu.mapper.TzbProjectListRecordMapper">
<insert id="batchUpsert">
INSERT INTO gxmu_tzb_project_list (
source_id,
project_name,
school_name,
award_name,
match_year,
match_term,
match_level,
cover_image,
detail_url,
source_url,
page_no,
last_sync_time,
create_time,
update_time,
deleted
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.sourceId},
#{item.projectName},
#{item.schoolName},
#{item.awardName},
#{item.matchYear},
#{item.matchTerm},
#{item.matchLevel},
#{item.coverImage},
#{item.detailUrl},
#{item.sourceUrl},
#{item.pageNo},
#{item.lastSyncTime},
#{item.createTime},
#{item.updateTime},
#{item.deleted}
)
</foreach>
ON DUPLICATE KEY UPDATE
project_name = VALUES(project_name),
school_name = VALUES(school_name),
award_name = VALUES(award_name),
match_year = VALUES(match_year),
match_term = VALUES(match_term),
match_level = VALUES(match_level),
cover_image = VALUES(cover_image),
detail_url = VALUES(detail_url),
source_url = VALUES(source_url),
page_no = VALUES(page_no),
last_sync_time = VALUES(last_sync_time),
update_time = VALUES(update_time),
deleted = VALUES(deleted)
</insert>
</mapper>
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gxwebsoft.gxmu.mapper.TzbTalentListRecordMapper">
<insert id="batchUpsert">
INSERT INTO gxmu_tzb_talent_list (
source_id,
person_name,
school_name,
talent_type,
project_name,
award_name,
match_term,
match_level,
cover_image,
detail_url,
source_url,
page_no,
last_sync_time,
create_time,
update_time,
deleted
) VALUES
<foreach collection="list" item="item" separator=",">
(
#{item.sourceId},
#{item.personName},
#{item.schoolName},
#{item.talentType},
#{item.projectName},
#{item.awardName},
#{item.matchTerm},
#{item.matchLevel},
#{item.coverImage},
#{item.detailUrl},
#{item.sourceUrl},
#{item.pageNo},
#{item.lastSyncTime},
#{item.createTime},
#{item.updateTime},
#{item.deleted}
)
</foreach>
ON DUPLICATE KEY UPDATE
person_name = VALUES(person_name),
school_name = VALUES(school_name),
talent_type = VALUES(talent_type),
project_name = VALUES(project_name),
award_name = VALUES(award_name),
match_term = VALUES(match_term),
match_level = VALUES(match_level),
cover_image = VALUES(cover_image),
detail_url = VALUES(detail_url),
source_url = VALUES(source_url),
page_no = VALUES(page_no),
last_sync_time = VALUES(last_sync_time),
update_time = VALUES(update_time),
deleted = VALUES(deleted)
</insert>
</mapper>
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gxwebsoft.gxmu.mapper.TzbcyMaterialMapper">
<sql id="Base_Column_List">
m.id,
m.form_id,
m.material_type,
m.file_id,
m.file_name,
m.file_path,
m.file_url,
m.download_url,
m.file_size,
m.content_type,
m.status,
m.reject_reason,
m.audit_user_id,
m.audit_time,
m.user_id,
m.deleted,
m.tenant_id,
m.create_time,
m.update_time,
f.project_name AS project_name,
f.leader AS leader
</sql>
<sql id="Where_Clause">
WHERE m.deleted = 0
<if test="param != null">
<if test="param.id != null">
AND m.id = #{param.id}
</if>
<if test="param.formId != null">
AND m.form_id = #{param.formId}
</if>
<if test="param.status != null">
AND m.status = #{param.status}
</if>
<if test="param.userId != null">
AND m.user_id = #{param.userId}
</if>
<if test="param.userIds != null and param.userIds.size() > 0">
AND m.user_id IN
<foreach collection="param.userIds" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</if>
<if test="param.materialType != null and param.materialType != ''">
AND m.material_type LIKE CONCAT('%', #{param.materialType}, '%')
</if>
<if test="param.keywords != null and param.keywords != ''">
AND (
m.material_type LIKE CONCAT('%', #{param.keywords}, '%')
OR m.file_name LIKE CONCAT('%', #{param.keywords}, '%')
OR f.project_name LIKE CONCAT('%', #{param.keywords}, '%')
OR f.leader LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</if>
</sql>
<select id="selectPageRel" resultType="com.gxwebsoft.gxmu.entity.TzbcyMaterial">
SELECT
<include refid="Base_Column_List"/>
FROM gxmu_tzbcy_material m
LEFT JOIN gxmu_tzbcy_form f ON f.id = m.form_id AND f.deleted = 0
<include refid="Where_Clause"/>
ORDER BY m.id DESC
</select>
<select id="selectListRel" resultType="com.gxwebsoft.gxmu.entity.TzbcyMaterial">
SELECT
<include refid="Base_Column_List"/>
FROM gxmu_tzbcy_material m
LEFT JOIN gxmu_tzbcy_form f ON f.id = m.form_id AND f.deleted = 0
<include refid="Where_Clause"/>
ORDER BY m.id DESC
</select>
</mapper>