Commit d40a0024 authored by 赵啸非's avatar 赵啸非

添加查询存在业务的部门

parent fb7f9bdd
......@@ -348,5 +348,6 @@ PRIMARY KEY (`id`)
ALTER TABLE mortals_sys_dept ADD COLUMN `inNum` int(9) DEFAULT '0' COMMENT '入驻事项数量' AFTER updateTime;
INSERT INTO mortals_xhx_task VALUES (null, '同步全部站点事项材料附件', 'SyncMatterTask', 0, 'SyncMatterTask', '', '', 1, 3600, '16:05', '', '192.168.1.107', '2024-05-18 16:05:00', 0, '2024-03-01 10:59:53', 1, '系统管理员');
......@@ -17,6 +17,7 @@ import com.mortals.xhx.common.code.UserStatus;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
......@@ -60,7 +61,7 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
@Override
protected void saveBefore(UserEntity entity, Map<String, Object> model, Context context) throws AppException {
if (service.existUser(entity.getLoginName(), entity.getId())) {
if (!ObjectUtils.isEmpty(entity.getLoginName())&&service.existUser(entity.getLoginName(), entity.getId())) {
throw new AppException("登录名已存在!");
}
super.saveBefore(entity, model, context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment