主数据通用接口修改兼容mysql
This commit is contained in:
parent
9faaafafa9
commit
256e616fe5
|
@ -916,7 +916,7 @@ where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 根据表名称查询所有的字段,返回小写个是-->
|
<!-- 根据表名称查询所有的字段,返回小写个是-->
|
||||||
<select id="queryMdMFields" resultType="String" parameterType="java.util.HashMap" >
|
<select id="queryMdMFields" databaseId="oracle" resultType="String" parameterType="java.util.HashMap" >
|
||||||
SELECT
|
SELECT
|
||||||
LOWER(COLUMN_NAME) as fileds
|
LOWER(COLUMN_NAME) as fileds
|
||||||
FROM
|
FROM
|
||||||
|
@ -925,6 +925,13 @@ where id = #{id}
|
||||||
TABLE_NAME = #{tableName}
|
TABLE_NAME = #{tableName}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据表名称查询所有的字段,返回小写个是-->
|
||||||
|
<select id="queryMdMFields" databaseId="mysql" resultType="String" parameterType="java.util.HashMap" >
|
||||||
|
SELECT LOWER(COLUMN_NAME)
|
||||||
|
FROM information_schema.columns
|
||||||
|
WHERE table_name = #{tableName}
|
||||||
|
</select>
|
||||||
<!-- 分页查询列表 采用like格式 -->
|
<!-- 分页查询列表 采用like格式 -->
|
||||||
<select id="queryMdmST" resultType="com.alibaba.fastjson.JSONObject" parameterType="java.util.HashMap">
|
<select id="queryMdmST" resultType="com.alibaba.fastjson.JSONObject" parameterType="java.util.HashMap">
|
||||||
select
|
select
|
||||||
|
|
|
@ -81,11 +81,16 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--根据mdm_module的id和mdm_module_db的id查询单据规则-->
|
<!--根据mdm_module的id和mdm_module_db的id查询单据规则-->
|
||||||
<select id="queryComparisonById" resultMap="get-ComparisonEntity-result">
|
<select id="queryComparisonById" databaseId="oracle" resultMap="get-ComparisonEntity-result">
|
||||||
<!-- select group_concat(db_value SEPARATOR '') as documentRule from mdm_table_code_rule-->
|
|
||||||
select replace(WM_CONCAT(db_value),',','') as documentRule from mdm_table_code_rule
|
select replace(WM_CONCAT(db_value),',','') as documentRule from mdm_table_code_rule
|
||||||
where mdm_id=#{mId} and sts='Y'
|
where mdm_id=#{mId} and sts='Y'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--根据mdm_module的id和mdm_module_db的id查询单据规则-->
|
||||||
|
<select id="queryComparisonById" databaseId="mysql" resultMap="get-ComparisonEntity-result">
|
||||||
|
select group_concat(db_value SEPARATOR '') as documentRule from mdm_table_code_rule
|
||||||
|
where mdm_id=#{mId} and sts='Y'
|
||||||
|
</select>
|
||||||
|
|
||||||
<!--生成单据规则-->
|
<!--生成单据规则-->
|
||||||
<select id="queryComparisonRule" resultMap="get-ComparisonEntity-result"
|
<select id="queryComparisonRule" resultMap="get-ComparisonEntity-result"
|
||||||
|
|
|
@ -326,6 +326,7 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
|
||||||
} else {
|
} else {
|
||||||
jsonObjectList.put(comparisonDetailsEntity.getDbName(), new ArrayList<>());
|
jsonObjectList.put(comparisonDetailsEntity.getDbName(), new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
jsonObjectList.remove(null);
|
||||||
list.add(jsonObjectList);
|
list.add(jsonObjectList);
|
||||||
//保存操作日志
|
//保存操作日志
|
||||||
controlsLogDaoimpl.saveControlsLog(uuid,jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口新增",jsonObject.getString("optionName"),tableName+"_option_log","1");
|
controlsLogDaoimpl.saveControlsLog(uuid,jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口新增",jsonObject.getString("optionName"),tableName+"_option_log","1");
|
||||||
|
@ -460,6 +461,7 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
|
||||||
}else{
|
}else{
|
||||||
jsonObjectList.put(comparisonDetailsEntity.getDbName(),new ArrayList<>());
|
jsonObjectList.put(comparisonDetailsEntity.getDbName(),new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
jsonObjectList.remove(null);
|
||||||
jsonObjects.add(jsonObjectList);
|
jsonObjects.add(jsonObjectList);
|
||||||
//保存操作日志
|
//保存操作日志
|
||||||
controlsLogDaoimpl.saveControlsLog(comparisonEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口更新",jsonObject.getString("optionName"),comparisonEntity.getDbName()+"_option_log","1");
|
controlsLogDaoimpl.saveControlsLog(comparisonEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口更新",jsonObject.getString("optionName"),comparisonEntity.getDbName()+"_option_log","1");
|
||||||
|
|
Loading…
Reference in New Issue