From 836ec39fdad422b1a148699a4c5fb8c5b4d395f0 Mon Sep 17 00:00:00 2001
From: zuoxiao <lf_zuo@163.com>
Date: 星期三, 25 六月 2025 11:04:33 +0800
Subject: [PATCH] feat(card): 添加管理类型卡写卡功能并优化卡片相关逻辑- 在 OperateTypeENUM 中添加 SUPPLEMENT 和 MANAGEMENT_CARD_WRITE 枚举值 - 在 SeManagementCard 中添加 cancelTime 和 state 字段 - 更新相关 mapper 和 XML 文件以支持新增字段 - 修改 CardSv 中的回调处理逻辑,支持管理类型卡写卡 - 优化 CreateManagementCardDto 中识别码的示例值
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupUnitMapper.xml | 37 ++++++++++++++++---------------------
1 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupUnitMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupUnitMapper.xml
index 4fa6d92..de655c8 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupUnitMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupUnitMapper.xml
@@ -9,12 +9,11 @@
<result column="unit_id" jdbcType="BIGINT" property="unitId" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="operate_time" jdbcType="TIMESTAMP" property="operateDt" />
- <result column="deleted" jdbcType="TINYINT" property="deleted" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, group_id, unit_id, `operator`,
- operate_time, deleted
+ operate_time
</sql>
<!--娣诲姞-->
@@ -37,9 +36,7 @@
<if test="operateDt != null">
operate_time,
</if>
- <if test="deleted != null">
- deleted,
- </if>
+
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -57,35 +54,33 @@
<if test="operateDt != null">
#{operateDt,jdbcType=TIMESTAMP},
</if>
- <if test="deleted != null">
- #{deleted,jdbcType=TINYINT},
- </if>
+
</trim>
</insert>
- <!--閫昏緫鍒犻櫎-->
- <delete id="deleteLogicById" parameterType="java.lang.Long">
- <!--@mbg.generated-->
- update ir_group_unit
- set deleted = 1
- where id = #{id,jdbcType=BIGINT}
- </delete>
+
<delete id="deleteByUnitIdGroupId" parameterType="com.dy.pipIrrGlobal.pojoIr.IrGroupUnit">
- update ir_group_unit
- set deleted = 1,operator = #{operator,jdbcType=BIGINT},operate_time = #{operateDt,jdbcType=TIMESTAMP}
+ delete from ir_group_unit
where group_id = #{groupId,jdbcType=BIGINT} and unit_id = #{unitId,jdbcType=BIGINT}
</delete>
<delete id="deleteByUnitId">
- update ir_group_unit
- set deleted = 1
+ delete from ir_group_unit
where unit_id = #{unitId,jdbcType=BIGINT}
</delete>
<delete id="deleteByGroupId">
- update ir_group_unit
- set deleted = 1
+ delete from ir_group_unit
where group_id = #{groupId,jdbcType=BIGINT}
</delete>
+
+<!-- //鏌ヤ竴涓疆鐏岀粍缁戝畾鐨勭亴婧夊崟鍏僫d-->
+ <select id="getGroupBindUnits" parameterType="Long" resultType="java.lang.Long">
+ SELECT unit_id AS unitId FROM `ir_group_unit`WHERE group_id = #{groupId,jdbcType=BIGINT}
+ </select>
+
+ <select id="getNotBindUnits" resultType="java.lang.Long">
+ SELECT id FROM ir_irrigate_unit WHERE id NOT IN (SELECT unit_id FROM ir_group_unit)
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0