基础代码生成

This commit is contained in:
lu7213 committed 2026-10-14 11:22:52 -04:00
1 parent 5e63bb6add
commit f69926dee6
21 files changed
+2827 -4

No files matched your search

@@ -0,0 +1,101 @@
<?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.ruoyi.system.mapper.TelegramAuditLogMapper">
<resultMap type="TelegramAuditLog" id="TelegramAuditLogResult">
<result property="id" column="id" />
<result property="auditNo" column="audit_no" />
<result property="telegramUpdateId" column="telegram_update_id" />
<result property="telegramCallbackQueryId" column="telegram_callback_query_id" />
<result property="telegramUserId" column="telegram_user_id" />
<result property="telegramUsername" column="telegram_username" />
<result property="action" column="action" />
<result property="oldStatus" column="old_status" />
<result property="newStatus" column="new_status" />
<result property="comment" column="comment" />
<result property="createdAt" column="created_at" />
</resultMap>
<sql id="selectTelegramAuditLogVo">
select id, audit_no, telegram_update_id, telegram_callback_query_id, telegram_user_id, telegram_username, action, old_status, new_status, comment, created_at from telegram_audit_log
</sql>
<select id="selectTelegramAuditLogList" parameterType="TelegramAuditLog" resultMap="TelegramAuditLogResult">
<include refid="selectTelegramAuditLogVo"/>
<where>
<if test="auditNo != null and auditNo != ''"> and audit_no = #{auditNo}</if>
<if test="telegramUpdateId != null "> and telegram_update_id = #{telegramUpdateId}</if>
<if test="telegramCallbackQueryId != null and telegramCallbackQueryId != ''"> and telegram_callback_query_id = #{telegramCallbackQueryId}</if>
<if test="telegramUserId != null and telegramUserId != ''"> and telegram_user_id = #{telegramUserId}</if>
<if test="telegramUsername != null and telegramUsername != ''"> and telegram_username like concat('%', #{telegramUsername}, '%')</if>
<if test="action != null and action != ''"> and action = #{action}</if>
<if test="oldStatus != null and oldStatus != ''"> and old_status = #{oldStatus}</if>
<if test="newStatus != null and newStatus != ''"> and new_status = #{newStatus}</if>
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
</where>
</select>
<select id="selectTelegramAuditLogById" parameterType="Long" resultMap="TelegramAuditLogResult">
<include refid="selectTelegramAuditLogVo"/>
where id = #{id}
</select>
<insert id="insertTelegramAuditLog" parameterType="TelegramAuditLog" useGeneratedKeys="true" keyProperty="id">
insert into telegram_audit_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditNo != null and auditNo != ''">audit_no,</if>
<if test="telegramUpdateId != null">telegram_update_id,</if>
<if test="telegramCallbackQueryId != null">telegram_callback_query_id,</if>
<if test="telegramUserId != null">telegram_user_id,</if>
<if test="telegramUsername != null">telegram_username,</if>
<if test="action != null and action != ''">action,</if>
<if test="oldStatus != null">old_status,</if>
<if test="newStatus != null">new_status,</if>
<if test="comment != null">comment,</if>
<if test="createdAt != null">created_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditNo != null and auditNo != ''">#{auditNo},</if>
<if test="telegramUpdateId != null">#{telegramUpdateId},</if>
<if test="telegramCallbackQueryId != null">#{telegramCallbackQueryId},</if>
<if test="telegramUserId != null">#{telegramUserId},</if>
<if test="telegramUsername != null">#{telegramUsername},</if>
<if test="action != null and action != ''">#{action},</if>
<if test="oldStatus != null">#{oldStatus},</if>
<if test="newStatus != null">#{newStatus},</if>
<if test="comment != null">#{comment},</if>
<if test="createdAt != null">#{createdAt},</if>
</trim>
</insert>
<update id="updateTelegramAuditLog" parameterType="TelegramAuditLog">
update telegram_audit_log
<trim prefix="SET" suffixOverrides=",">
<if test="auditNo != null and auditNo != ''">audit_no = #{auditNo},</if>
<if test="telegramUpdateId != null">telegram_update_id = #{telegramUpdateId},</if>
<if test="telegramCallbackQueryId != null">telegram_callback_query_id = #{telegramCallbackQueryId},</if>
<if test="telegramUserId != null">telegram_user_id = #{telegramUserId},</if>
<if test="telegramUsername != null">telegram_username = #{telegramUsername},</if>
<if test="action != null and action != ''">action = #{action},</if>
<if test="oldStatus != null">old_status = #{oldStatus},</if>
<if test="newStatus != null">new_status = #{newStatus},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTelegramAuditLogById" parameterType="Long">
delete from telegram_audit_log where id = #{id}
</delete>
<delete id="deleteTelegramAuditLogByIds" parameterType="String">
delete from telegram_audit_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.TelegramAuditPushTaskMapper">
<resultMap type="TelegramAuditPushTask" id="TelegramAuditPushTaskResult">
<result property="id" column="id" />
<result property="auditNo" column="audit_no" />
<result property="taskStatus" column="task_status" />
<result property="retryCount" column="retry_count" />
<result property="nextRetryAt" column="next_retry_at" />
<result property="lastError" column="last_error" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectTelegramAuditPushTaskVo">
select id, audit_no, task_status, retry_count, next_retry_at, last_error, created_at, updated_at from telegram_audit_push_task
</sql>
<select id="selectTelegramAuditPushTaskList" parameterType="TelegramAuditPushTask" resultMap="TelegramAuditPushTaskResult">
<include refid="selectTelegramAuditPushTaskVo"/>
<where>
<if test="auditNo != null and auditNo != ''"> and audit_no = #{auditNo}</if>
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus}</if>
<if test="retryCount != null "> and retry_count = #{retryCount}</if>
<if test="nextRetryAt != null "> and next_retry_at = #{nextRetryAt}</if>
<if test="lastError != null and lastError != ''"> and last_error = #{lastError}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
</where>
</select>
<select id="selectTelegramAuditPushTaskById" parameterType="Long" resultMap="TelegramAuditPushTaskResult">
<include refid="selectTelegramAuditPushTaskVo"/>
where id = #{id}
</select>
<insert id="insertTelegramAuditPushTask" parameterType="TelegramAuditPushTask" useGeneratedKeys="true" keyProperty="id">
insert into telegram_audit_push_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditNo != null and auditNo != ''">audit_no,</if>
<if test="taskStatus != null and taskStatus != ''">task_status,</if>
<if test="retryCount != null">retry_count,</if>
<if test="nextRetryAt != null">next_retry_at,</if>
<if test="lastError != null">last_error,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditNo != null and auditNo != ''">#{auditNo},</if>
<if test="taskStatus != null and taskStatus != ''">#{taskStatus},</if>
<if test="retryCount != null">#{retryCount},</if>
<if test="nextRetryAt != null">#{nextRetryAt},</if>
<if test="lastError != null">#{lastError},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateTelegramAuditPushTask" parameterType="TelegramAuditPushTask">
update telegram_audit_push_task
<trim prefix="SET" suffixOverrides=",">
<if test="auditNo != null and auditNo != ''">audit_no = #{auditNo},</if>
<if test="taskStatus != null and taskStatus != ''">task_status = #{taskStatus},</if>
<if test="retryCount != null">retry_count = #{retryCount},</if>
<if test="nextRetryAt != null">next_retry_at = #{nextRetryAt},</if>
<if test="lastError != null">last_error = #{lastError},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTelegramAuditPushTaskById" parameterType="Long">
delete from telegram_audit_push_task where id = #{id}
</delete>
<delete id="deleteTelegramAuditPushTaskByIds" parameterType="String">
delete from telegram_audit_push_task where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,121 @@
<?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.ruoyi.system.mapper.TelegramAuditRecordMapper">
<resultMap type="TelegramAuditRecord" id="TelegramAuditRecordResult">
<result property="id" column="id" />
<result property="auditNo" column="audit_no" />
<result property="businessType" column="business_type" />
<result property="businessId" column="business_id" />
<result property="title" column="title" />
<result property="payload" column="payload" />
<result property="auditStatus" column="audit_status" />
<result property="telegramChatId" column="telegram_chat_id" />
<result property="telegramMessageId" column="telegram_message_id" />
<result property="reviewerTelegramId" column="reviewer_telegram_id" />
<result property="reviewerName" column="reviewer_name" />
<result property="reviewComment" column="review_comment" />
<result property="reviewedAt" column="reviewed_at" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectTelegramAuditRecordVo">
select id, audit_no, business_type, business_id, title, payload, audit_status, telegram_chat_id, telegram_message_id, reviewer_telegram_id, reviewer_name, review_comment, reviewed_at, created_at, updated_at from telegram_audit_record
</sql>
<select id="selectTelegramAuditRecordList" parameterType="TelegramAuditRecord" resultMap="TelegramAuditRecordResult">
<include refid="selectTelegramAuditRecordVo"/>
<where>
<if test="auditNo != null and auditNo != ''"> and audit_no = #{auditNo}</if>
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
<if test="businessId != null and businessId != ''"> and business_id = #{businessId}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="payload != null and payload != ''"> and payload = #{payload}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="telegramChatId != null and telegramChatId != ''"> and telegram_chat_id = #{telegramChatId}</if>
<if test="telegramMessageId != null "> and telegram_message_id = #{telegramMessageId}</if>
<if test="reviewerTelegramId != null and reviewerTelegramId != ''"> and reviewer_telegram_id = #{reviewerTelegramId}</if>
<if test="reviewerName != null and reviewerName != ''"> and reviewer_name like concat('%', #{reviewerName}, '%')</if>
<if test="reviewComment != null and reviewComment != ''"> and review_comment = #{reviewComment}</if>
<if test="reviewedAt != null "> and reviewed_at = #{reviewedAt}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
</where>
</select>
<select id="selectTelegramAuditRecordById" parameterType="Long" resultMap="TelegramAuditRecordResult">
<include refid="selectTelegramAuditRecordVo"/>
where id = #{id}
</select>
<insert id="insertTelegramAuditRecord" parameterType="TelegramAuditRecord" useGeneratedKeys="true" keyProperty="id">
insert into telegram_audit_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditNo != null and auditNo != ''">audit_no,</if>
<if test="businessType != null and businessType != ''">business_type,</if>
<if test="businessId != null and businessId != ''">business_id,</if>
<if test="title != null and title != ''">title,</if>
<if test="payload != null and payload != ''">payload,</if>
<if test="auditStatus != null and auditStatus != ''">audit_status,</if>
<if test="telegramChatId != null">telegram_chat_id,</if>
<if test="telegramMessageId != null">telegram_message_id,</if>
<if test="reviewerTelegramId != null">reviewer_telegram_id,</if>
<if test="reviewerName != null">reviewer_name,</if>
<if test="reviewComment != null">review_comment,</if>
<if test="reviewedAt != null">reviewed_at,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditNo != null and auditNo != ''">#{auditNo},</if>
<if test="businessType != null and businessType != ''">#{businessType},</if>
<if test="businessId != null and businessId != ''">#{businessId},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="payload != null and payload != ''">#{payload},</if>
<if test="auditStatus != null and auditStatus != ''">#{auditStatus},</if>
<if test="telegramChatId != null">#{telegramChatId},</if>
<if test="telegramMessageId != null">#{telegramMessageId},</if>
<if test="reviewerTelegramId != null">#{reviewerTelegramId},</if>
<if test="reviewerName != null">#{reviewerName},</if>
<if test="reviewComment != null">#{reviewComment},</if>
<if test="reviewedAt != null">#{reviewedAt},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateTelegramAuditRecord" parameterType="TelegramAuditRecord">
update telegram_audit_record
<trim prefix="SET" suffixOverrides=",">
<if test="auditNo != null and auditNo != ''">audit_no = #{auditNo},</if>
<if test="businessType != null and businessType != ''">business_type = #{businessType},</if>
<if test="businessId != null and businessId != ''">business_id = #{businessId},</if>
<if test="title != null and title != ''">title = #{title},</if>
<if test="payload != null and payload != ''">payload = #{payload},</if>
<if test="auditStatus != null and auditStatus != ''">audit_status = #{auditStatus},</if>
<if test="telegramChatId != null">telegram_chat_id = #{telegramChatId},</if>
<if test="telegramMessageId != null">telegram_message_id = #{telegramMessageId},</if>
<if test="reviewerTelegramId != null">reviewer_telegram_id = #{reviewerTelegramId},</if>
<if test="reviewerName != null">reviewer_name = #{reviewerName},</if>
<if test="reviewComment != null">review_comment = #{reviewComment},</if>
<if test="reviewedAt != null">reviewed_at = #{reviewedAt},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTelegramAuditRecordById" parameterType="Long">
delete from telegram_audit_record where id = #{id}
</delete>
<delete id="deleteTelegramAuditRecordByIds" parameterType="String">
delete from telegram_audit_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>