Merge branch 'refs/heads/dev'

This commit is contained in:
zegezy 2024-05-17 07:36:08 +08:00
commit 8d1d103d1b
3 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,7 @@
"groupId" : "9ec6f9ec92d24a369952bb13eddc134f",
"name" : "操作日志",
"createTime" : null,
"updateTime" : 1649001507013,
"updateTime" : 1713861312162,
"lock" : "0",
"createBy" : null,
"updateBy" : null,
@ -260,5 +260,5 @@ return db.page("""
?{createDate && createDate.split(',')[1], and sol.create_date <= #{createDate.split(',')[1]}}
?{costTime && costTime.split(',')[0], and sol.cost_time >= #{costTime.split(',')[0]}}
?{costTime && costTime.split(',')[1], and sol.cost_time <= #{costTime.split(',')[1]}}
order by create_date desc
order by sol.create_date desc
""")

View File

@ -65,4 +65,4 @@ if(id){
}
data.type = type
data.remark = remark
return db.table("sys_dynamic_component").primary("id").saveOrUpdate(data)
return db.table("sys_dynamic_component").primary("id").withBlank().saveOrUpdate(data)

View File

@ -18,7 +18,8 @@ public class NamedTableHandlerInterceptor implements NamedTableInterceptor {
public void preHandle(SqlMode sqlMode, NamedTable namedTable) {
if(Boolean.TRUE == namedTable.getAttribute(COMMON_FIELD)){
if(sqlMode == SqlMode.INSERT) {
String id = IdUtil.simpleUUID();
Object primaryValue = namedTable.getColumns().get(namedTable.getPrimary());
String id = null != primaryValue && !"".equals(primaryValue.toString()) ? primaryValue.toString() : IdUtil.simpleUUID();
namedTable.setAttribute(namedTable.getPrimary(), id);
namedTable.column(namedTable.getPrimary(), id);
namedTable.column(CREATE_BY, StpUtil.getLoginId());