update 标签更新

This commit is contained in:
lijiarao
2023-11-10 09:56:12 +08:00
parent e414997db8
commit 3760080d15
2 changed files with 31 additions and 89 deletions
@@ -137,94 +137,36 @@
<update id="updateAllById"> <update id="updateAllById">
update laws_tag update laws_tag
<set> <set>
<if test="updated.isModel != null and updated.isModel != ''"> is_model = #{updated.isModel},
is_model = #{updated.isModel}, db_field_txt = #{updated.dbFieldTxt},
</if> db_field_en_name = #{updated.dbFieldEnName},
<if test="updated.dbFieldTxt != null and updated.dbFieldTxt != ''"> field_show_type = #{updated.fieldShowType},
db_field_txt = #{updated.dbFieldTxt}, db_length = #{updated.dbLength},
</if> order_num = #{updated.orderNum},
<if test="updated.dbFieldEnName != null and updated.dbFieldEnName != ''"> field_must_input = #{updated.fieldMustInput},
db_field_en_name = #{updated.dbFieldEnName}, is_show_form = #{updated.isShowForm},
</if> is_show_list = #{updated.isShowList},
<if test="updated.fieldShowType != null and updated.fieldShowType != ''"> is_read_only = #{updated.isReadOnly},
field_show_type = #{updated.fieldShowType}, show_area = #{updated.showArea},
</if> is_query = #{updated.isQuery},
<if test="updated.dbLength != null"> is_show_laws_list = #{updated.isShowLawsList},
db_length = #{updated.dbLength}, is_show_search = #{updated.isShowSearch},
</if> del_flag = #{updated.delFlag},
<if test="updated.orderNum != null"> table_name = #{updated.tableName},
order_num = #{updated.orderNum}, db_field_name = #{updated.dbFieldName},
</if> db_field_name_old = #{updated.dbFieldNameOld},
<if test="updated.fieldMustInput != null and updated.fieldMustInput != ''"> dict_id = #{updated.dictId},
field_must_input = #{updated.fieldMustInput}, dict_field = #{updated.dictField},
</if> dict_table = #{updated.dictTable},
<if test="updated.isShowForm != null"> dict_text = #{updated.dictText},
is_show_form = #{updated.isShowForm}, sort_flag = #{updated.sortFlag},
</if> is_show_form_create = #{updated.isShowFormCreate},
<if test="updated.isShowList != null"> db_is_key = #{updated.dbIsKey},
is_show_list = #{updated.isShowList}, db_is_null = #{updated.dbIsNull},
</if> db_point_length = #{updated.dbPointLength},
<if test="updated.isReadOnly != null"> db_type = #{updated.dbType},
is_read_only = #{updated.isReadOnly}, field_href = #{updated.fieldHref},
</if>
<if test="updated.showArea != null and updated.showArea != ''">
show_area = #{updated.showArea},
</if>
<if test="updated.isQuery != null">
is_query = #{updated.isQuery},
</if>
<if test="updated.isShowLawsList != null">
is_show_laws_list = #{updated.isShowLawsList},
</if>
<if test="updated.isShowSearch != null">
is_show_search = #{updated.isShowSearch},
</if>
<if test="updated.delFlag != null">
del_flag = #{updated.delFlag},
</if>
<if test="updated.tableName != null and updated.tableName != ''">
table_name = #{updated.tableName},
</if>
<if test="updated.dbFieldName != null and updated.dbFieldName != ''">
db_field_name = #{updated.dbFieldName},
</if>
<if test="updated.dbFieldNameOld != null and updated.dbFieldNameOld != ''">
db_field_name_old = #{updated.dbFieldNameOld},
</if>
<if test="updated.dictId != null and updated.dictId != ''">
dict_id = #{updated.dictId},
</if>
<if test="updated.dictField != null and updated.dictField != ''">
dict_field = #{updated.dictField},
</if>
<if test="updated.dictTable != null and updated.dictTable != ''">
dict_table = #{updated.dictTable},
</if>
<if test="updated.dictText != null and updated.dictText != ''">
dict_text = #{updated.dictText},
</if>
<if test="updated.sortFlag != null">
sort_flag = #{updated.sortFlag},
</if>
<if test="updated.isShowFormCreate != null">
is_show_form_create = #{updated.isShowFormCreate},
</if>
<if test="updated.dbIsKey != null">
db_is_key = #{updated.dbIsKey},
</if>
<if test="updated.dbIsNull != null">
db_is_null = #{updated.dbIsNull},
</if>
<if test="updated.dbPointLength != null">
db_point_length = #{updated.dbPointLength},
</if>
<if test="updated.dbType != null and updated.dbType != ''">
db_type = #{updated.dbType},
</if>
<if test="updated.fieldHref != null and updated.fieldHref != ''">
field_href = #{updated.fieldHref},
</if>
</set> </set>
where id=#{updated.id} where id = #{updated.id}
</update> </update>
</mapper> </mapper>
@@ -179,7 +179,7 @@ public class ILawsTagServiceImpl extends ServiceImpl<LawsTagMapper, LawsTag> imp
} }
executeDDL(lawsTag,"modify"); executeDDL(lawsTag,"modify");
lawsTag.setDbFieldNameOld(dbFieldName); lawsTag.setDbFieldNameOld(dbFieldName);
saveOrUpdate(lawsTag); lawsTagMapper.updateAllById(lawsTag);
} }
private void executeDDL(LawsTag lawsTag, String modifyOrAdd) { private void executeDDL(LawsTag lawsTag, String modifyOrAdd) {