From b9e9e4acf8b27dca8b4bd316295c8563b73f2db3 Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期二, 28 三月 2023 18:26:25 +0800
Subject: [PATCH] omd微服务的配置
---
Source/BladeX/blade-service/blade-system/src/main/java/org/springblade/system/mapper/StrategyMapper.xml | 83 +++++++++++++----------------------------
1 files changed, 26 insertions(+), 57 deletions(-)
diff --git a/Source/BladeX/blade-service/blade-system/src/main/java/org/springblade/system/mapper/StrategyMapper.xml b/Source/BladeX/blade-service/blade-system/src/main/java/org/springblade/system/mapper/StrategyMapper.xml
index fdd77f4..385b072 100644
--- a/Source/BladeX/blade-service/blade-system/src/main/java/org/springblade/system/mapper/StrategyMapper.xml
+++ b/Source/BladeX/blade-service/blade-system/src/main/java/org/springblade/system/mapper/StrategyMapper.xml
@@ -7,7 +7,7 @@
<result property="strategyName" column="STRATEGY_NAME" jdbcType="VARCHAR"/>
<result property="minPwdLen" column="MIN_PWD_LEN" jdbcType="VARCHAR"/>
<result property="maxPwdLen" column="MAX_PWD_LEN" jdbcType="VARCHAR"/>
- <result property="combinationIds" column="COMBINATION " jdbcType="VARCHAR"/>
+ <result property="combinationIds" column="COMBINATION_IDS" jdbcType="VARCHAR"/>
<result property="requiredType" column="REQUIRED_TYPE" jdbcType="VARCHAR"/>
<result property="expirationTime" column="EXPIRATION_TIME" jdbcType="TIMESTAMP"/>
<result property="reminderTime" column="REMINDER_TIME" jdbcType="TIMESTAMP"/>
@@ -87,63 +87,32 @@
</where>
</select>
- <!--閫氳繃涓婚敭淇敼鏁版嵁-->
- <!--<update id="update">
- update PL_SYS_STRATEGY
- <set>
- <if test="strategyName != null and strategyName != ''">
- STRATEGY_NAME = #{strategyName},
- </if>
- <if test="minPwdLen != null and minPwdLen != ''">
- MIN_PWD_LEN = #{minPwdLen},
- </if>
- <if test="maxPwdLen != null and maxPwdLen != ''">
- MAX_PWD_LEN = #{maxPwdLen},
- </if>
- <if test="combination != null and combination != ''">
- COMBINATION = #{combination },
- </if>
- <if test="requiredType != null and requiredType != ''">
- REQUIRED_TYPE = #{requiredType},
- </if>
- <if test="expirationTime != null">
- EXPIRATION_TIME = #{expirationTime},
- </if>
- <if test="reminderTime != null">
- REMINDER_TIME = #{reminderTime},
- </if>
- <if test="lockingNum != null and lockingNum != ''">
- LOCKING_NUM = #{lockingNum},
- </if>
- <if test="lockingTime != null">
- LOCKING_TIME = #{lockingTime},
- </if>
- <if test="desc != null and desc != ''">
- DESC = #{desc},
- </if>
- <if test="isDefault != null and isDefault != ''">
- IS_DEFAULT = #{isDefault},
- </if>
- <if test="createDate != null">
- CREATE_DATE = #{createDate},
- </if>
- <if test="createUser != null">
- CREATE_USER = #{createUser},
- </if>
- <if test="updateDate != null">
- UPDATE_DATE = #{updateDate},
- </if>
- <if test="updateUser != null">
- UPDATE_USER = #{updateUser},
- </if>
- </set>
- where ID = #{id}
- </update>
- <!–閫氳繃涓婚敭鍒犻櫎–>
- <delete id="deleteById">
- delete from PL_SYS_STRATEGY where ID = #{id}
- </delete>-->
+ <select id="queryByNameAndTenantId" resultMap="StrategyMap">
+ SELECT PSS.*,(select WM_CONCAT(psc.NAME)
+ from PL_SYS_COMBINATION psc
+ where instr(pss.COMBINATION_IDS,psc.ID) > 0) COMBINATIONNAMES
+ FROM PL_SYS_STRATEGY PSS
+ LEFT JOIN PL_SYS_USER_PWDSTRATEGY PSUP ON PSS.ID=PSUP.PWDSTRATEGY_ID
+ LEFT JOIN PL_ORG_USER POU ON POU.ID=PSUP.USER_ID
+ WHERE POU.TENANT_ID = #{tenantId} AND POU.NAME=#{name};
+ </select>
+
+ <select id="queryByUserId" resultMap="StrategyMap">
+ SELECT PSS.*,(select WM_CONCAT(psc.NAME)
+ from PL_SYS_COMBINATION psc
+ where instr(pss.COMBINATION_IDS,psc.ID) > 0) COMBINATIONNAMES
+ FROM PL_SYS_STRATEGY PSS LEFT JOIN PL_SYS_USER_PWDSTRATEGY PSUP ON PSS.ID=psup.PWDSTRATEGY_ID
+ WHERE PSUP.USER_ID = #{userId}
+ </select>
+
+ <select id="queryByIsDefault" resultType="org.springblade.system.entity.Strategy">
+ SELECT PSS.*,(SELECT WM_CONCAT(psc.NAME)
+ FROM PL_SYS_COMBINATION psc
+ WHERE instr(pss.COMBINATION_IDS, psc.ID) > 0) COMBINATIONNAMES
+ FROM PL_SYS_STRATEGY PSS
+ WHERE is_default = 1
+ </select>
</mapper>
--
Gitblit v1.9.3