Commit 73700e94 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.4' into MVP1.4

parents 89c26461 acee334c
...@@ -196,7 +196,7 @@ public class CustomerBusinessContoller { ...@@ -196,7 +196,7 @@ public class CustomerBusinessContoller {
* @return * @return
**/ **/
private LambdaQueryWrapper<TSettleDomain> getSettleDomainWrapper(List<String> customerIds) { private LambdaQueryWrapper<TSettleDomain> getSettleDomainWrapper(List<String> customerIds) {
return Wrappers.<TSettleDomain>lambdaQuery().in(TSettleDomain::getCustomerId,customerIds).ne(TSettleDomain::getDpAuditFlag, CommonConstants.ONE_STRING); return Wrappers.<TSettleDomain>lambdaQuery().in(TSettleDomain::getCustomerId,customerIds).eq(TSettleDomain::getDeleteFlag,CommonConstants.ZERO_STRING);
} }
/** /**
......
...@@ -171,14 +171,13 @@ public class BusinessUserController { ...@@ -171,14 +171,13 @@ public class BusinessUserController {
**/ **/
@GetMapping("/getRoleAndMenu") @GetMapping("/getRoleAndMenu")
@Operation(description = "获取b端角色信息和菜单,TYPE:类型 0:菜单 1:按钮 2:菜单加按钮(默认查菜单),userId:用户id") @Operation(description = "获取b端角色信息和菜单,TYPE:类型 0:菜单 1:按钮 2:菜单加按钮(默认查菜单),userId:用户id")
public R<RoleMenuR> getRoleAndMenu(String type, Integer userId) { public R<RoleMenuR> getRoleAndMenu(String type, String userId) {
//结果声明 //结果声明
RoleMenuR result = new RoleMenuR(); RoleMenuR result = new RoleMenuR();
//结果初始化 //结果初始化
Map<String,String> roleNameMap = new HashMap<>(); Map<String,String> roleNameMap = new HashMap<>();
Map<String, List<BusinessRoleMenuVo>> roleMenuMap = new HashMap<>(); Map<String, List<BusinessRoleMenuVo>> roleMenuMap = new HashMap<>();
result.setRoleNameMap(roleNameMap);
result.setRoleMenuMap(roleMenuMap);
//默认获取菜单 //默认获取菜单
if(Common.isEmpty(type)){ if(Common.isEmpty(type)){
...@@ -208,6 +207,8 @@ public class BusinessUserController { ...@@ -208,6 +207,8 @@ public class BusinessUserController {
result.setHavaRole(roleService.getRoleByUserIdAndClient(userId, ServiceNameConstants.CLIENT_ID_HR_B)); result.setHavaRole(roleService.getRoleByUserIdAndClient(userId, ServiceNameConstants.CLIENT_ID_HR_B));
} }
} }
result.setRoleNameMap(roleNameMap);
result.setRoleMenuMap(roleMenuMap);
return new R<>(result); return new R<>(result);
} }
/** /**
...@@ -248,7 +249,7 @@ public class BusinessUserController { ...@@ -248,7 +249,7 @@ public class BusinessUserController {
**/ **/
@PostMapping("/saveRoleM") @PostMapping("/saveRoleM")
@Operation(description = "b端用户角色关系保存") @Operation(description = "b端用户角色关系保存")
public R<String> saveRoleM(@RequestBody List<Long> roleList, Integer userId) { public R<String> saveRoleM(@RequestBody List<Long> roleList, String userId) {
if(null == userId){ if(null == userId){
return R.failed("用户id不能为空!"); return R.failed("用户id不能为空!");
} }
...@@ -261,7 +262,7 @@ public class BusinessUserController { ...@@ -261,7 +262,7 @@ public class BusinessUserController {
if( null != role ){ if( null != role ){
userRole = new SysUserRole(); userRole = new SysUserRole();
userRole.setRoleId(role); userRole.setRoleId(role);
userRole.setUserId(Common.isNotNullToStr(userId)); userRole.setUserId(Common.isBlankToNullString(userId));
list.add(userRole); list.add(userRole);
} }
} }
...@@ -303,7 +304,7 @@ public class BusinessUserController { ...@@ -303,7 +304,7 @@ public class BusinessUserController {
*/ */
@Operation(description = "通过ID更新用户锁定状态") @Operation(description = "通过ID更新用户锁定状态")
@GetMapping("/updateLock") @GetMapping("/updateLock")
public R<Boolean> updateLockFlag(@RequestParam("id") Integer id, @RequestParam("lockFlag") String lockFlag) { public R<Boolean> updateLockFlag(@RequestParam("id") String id, @RequestParam("lockFlag") String lockFlag) {
SysUser user = userService.getById(id); SysUser user = userService.getById(id);
if (null == user) { if (null == user) {
return R.failed("操作失败,无此用户!"); return R.failed("操作失败,无此用户!");
......
...@@ -45,5 +45,5 @@ public interface SysRoleMapper extends BaseMapper<SysRole> { ...@@ -45,5 +45,5 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
List<BusinessRoleMenuVo> getRoleAndMenu(@Param("type")String type); List<BusinessRoleMenuVo> getRoleAndMenu(@Param("type")String type);
Set<String> getRoleByUserIdAndClient(@Param("userId")Integer userId, @Param("clientId") String clientId); Set<String> getRoleByUserIdAndClient(@Param("userId")String userId, @Param("clientId") String clientId);
} }
...@@ -41,6 +41,6 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> { ...@@ -41,6 +41,6 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
*/ */
Boolean deleteByUserId(@Param("userId") String userId); Boolean deleteByUserId(@Param("userId") String userId);
Boolean removeByUserAndClientId(@Param("userId")Integer userId,@Param("clientId") String clientId); Boolean removeByUserAndClientId(@Param("userId")String userId,@Param("clientId") String clientId);
} }
...@@ -88,5 +88,5 @@ public interface SysRoleService extends IService<SysRole> { ...@@ -88,5 +88,5 @@ public interface SysRoleService extends IService<SysRole> {
* @param clientId * @param clientId
* @return * @return
**/ **/
Set<String> getRoleByUserIdAndClient(Integer userId, String clientId); Set<String> getRoleByUserIdAndClient(String userId, String clientId);
} }
...@@ -34,6 +34,6 @@ public interface SysUserRoleService extends IService<SysUserRole> { ...@@ -34,6 +34,6 @@ public interface SysUserRoleService extends IService<SysUserRole> {
* @param clientId * @param clientId
* @return * @return
**/ **/
Boolean removeByUserAndClientId(Integer userId, String clientId); Boolean removeByUserAndClientId(String userId, String clientId);
} }
...@@ -235,7 +235,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl ...@@ -235,7 +235,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
} }
@Override @Override
public Set<String> getRoleByUserIdAndClient(Integer userId, String clientId) { public Set<String> getRoleByUserIdAndClient(String userId, String clientId) {
return baseMapper.getRoleByUserIdAndClient(userId,clientId); return baseMapper.getRoleByUserIdAndClient(userId,clientId);
} }
} }
...@@ -33,7 +33,7 @@ import org.springframework.stereotype.Service; ...@@ -33,7 +33,7 @@ import org.springframework.stereotype.Service;
@Service @Service
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService { public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService {
@Override @Override
public Boolean removeByUserAndClientId(Integer userId, String clientId) { public Boolean removeByUserAndClientId(String userId, String clientId) {
return baseMapper.removeByUserAndClientId(userId,clientId); return baseMapper.removeByUserAndClientId(userId,clientId);
} }
} }
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