新增公司

This commit is contained in:
sxu 2025-01-05 09:55:58 +08:00
parent e3a6759569
commit fa3016819b
3 changed files with 4 additions and 6 deletions

View File

@ -1,13 +1,11 @@
package com.bonus.system.domain;
import lombok.Getter;
import lombok.Setter;
import lombok.Data;
/**
* @author wangvivi
*/
@Setter
@Getter
@Data
public class UserMenuParams {
private Long userId;
private Long systemType;

View File

@ -301,7 +301,7 @@ public class SysDeptServiceImpl implements ISysDeptService
dept.setAncestors("0");
dept.setStatus("0");//默认启用
dept.setMenuTemplateId(1L);//TODO 将来用前端传的模版ID
dept.setLeader(dept.getSysUser().getUserName());
dept.setInitPassword(SecurityUtils.encryptPassword(dept.getSysUser().getPassword()));
if (StringUtils.isNotNull(dept.getSysUser()) && !userService.checkUserNameUnique(dept.getSysUser())) {
throw new ServiceException("新增公司管理员用户'" + dept.getSysUser().getUserName() + "'失败,登录账号已存在");
}

View File

@ -111,7 +111,7 @@
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0 AND FIND_IN_SET(#{systemType}, m.system_type)
<if test="templateId != null">
AND exists (
select 0 from sys_template_menu stm where stm.temp_id = #{templateId} and stm.menu_id = m.menu_id
select 0 from sys_template_menu stm where stm.temp_id = #{menuTemplateId} and stm.menu_id = m.menu_id
)
</if>
order by m.parent_id, m.order_num