去除字符串前面的空格
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.web.*;
|
||||
import com.gxwebsoft.common.system.entity.Company;
|
||||
@@ -69,6 +70,11 @@ public class MenuController extends BaseController {
|
||||
if (menu.getParentId() == null) {
|
||||
menu.setParentId(0);
|
||||
}
|
||||
// 去除字符串前面的空格
|
||||
menu.setTitle(StrUtil.trimStart(menu.getTitle()));
|
||||
menu.setPath(StrUtil.trimStart(menu.getPath()));
|
||||
menu.setComponent(StrUtil.trimStart(menu.getComponent()));
|
||||
menu.setAuthority(StrUtil.trimStart(menu.getAuthority()));
|
||||
if (menuService.save(menu)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
|
||||
@@ -37,15 +37,18 @@
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.tenantId == null">
|
||||
AND a.tenant_id = #{param.tenantId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.name = #{param.keywords}
|
||||
OR a.comments = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user