数据同步接口 不走es

This commit is contained in:
yuezhihang
2022-04-29 14:42:32 +08:00
parent 540d1ba218
commit 14f67dda61
9 changed files with 461 additions and 183 deletions
@@ -62,11 +62,14 @@
<select id="searchStandDataThree" resultMap="BaseResultMap">
SELECT
t.standId,
t.standType
t.standType,
t.standNum
FROM (
SELECT
sar_standards_info.id AS standId,
sar_standards_info.STAND_TYPE AS standType
sar_standards_info.STAND_TYPE AS standType,
concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
SAR_STANDARDS_INFO.STAND_YEAR) as standNum
FROM
sar_standards_info
LEFT JOIN SAR_STAND_ATTR_INFO ON (
@@ -82,6 +85,9 @@
and (SAR_STAND_ATTR_INFO.KCCVPPSCN like concat('%',#{vppsName},'%') or SAR_STAND_ATTR_INFO.CYCVPPSCN like
concat('%',#{vppsName},'%'))
</if>
<if test="standId != null and standId != ''">
and sar_standards_info.ID = #{standId}
</if>
<if test="standCode != null and standCode != ''">
and (
(trim(replace(concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
@@ -93,7 +99,8 @@
UNION
SELECT
sar_bussioness_stand.id AS standId,
'BUSINESS_STAND' AS standType
'BUSINESS_STAND' AS standType,
SAR_BUSSIONESS_STAND.STAND_CODE as standNum
FROM
sar_bussioness_stand
LEFT JOIN sar_buss_stand_attr_info ON (
@@ -113,11 +120,15 @@
and (SAR_BUSSIONESS_STAND.STAND_CODE = #{standCode}
or REPLACE( SAR_BUSSIONESS_STAND.STAND_CODE,' ','') = REPLACE( #{standCode},' ',''))
</if>
<if test="standId != null and standId != ''">
and sar_bussioness_stand.ID = #{standId}
</if>
UNION
SELECT
SAR_LAWS_STAND_INFO.id AS standId,
'LAWS_TYPE' AS standType
'LAWS_TYPE' AS standType,
SAR_LAWS_STAND_INFO.LAWS_NUMBER as standNum
FROM
SAR_LAWS_STAND_INFO
LEFT JOIN sar_laws_attr_info ON (
@@ -129,7 +140,9 @@
<if test="standCode != null and standCode != ''">
and SAR_LAWS_STAND_INFO.LAWS_NUMBER = #{standCode}
</if>
<if test="standId != null and standId != ''">
and SAR_LAWS_STAND_INFO.ID = #{standId}
</if>
) t
</select>
</mapper>