Commit e79eaa88 authored by fangxinjiang's avatar fangxinjiang

B端服务添加:接口调整

parent acbf4ae9
......@@ -196,7 +196,7 @@ public class CustomerBusinessContoller {
* @return
**/
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 {
**/
@GetMapping("/getRoleAndMenu")
@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();
//结果初始化
Map<String,String> roleNameMap = new HashMap<>();
Map<String, List<BusinessRoleMenuVo>> roleMenuMap = new HashMap<>();
result.setRoleNameMap(roleNameMap);
result.setRoleMenuMap(roleMenuMap);
//默认获取菜单
if(Common.isEmpty(type)){
......@@ -208,6 +207,8 @@ public class BusinessUserController {
result.setHavaRole(roleService.getRoleByUserIdAndClient(userId, ServiceNameConstants.CLIENT_ID_HR_B));
}
}
result.setRoleNameMap(roleNameMap);
result.setRoleMenuMap(roleMenuMap);
return new R<>(result);
}
/**
......@@ -248,7 +249,7 @@ public class BusinessUserController {
**/
@PostMapping("/saveRoleM")
@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){
return R.failed("用户id不能为空!");
}
......@@ -261,7 +262,7 @@ public class BusinessUserController {
if( null != role ){
userRole = new SysUserRole();
userRole.setRoleId(role);
userRole.setUserId(Common.isNotNullToStr(userId));
userRole.setUserId(Common.isBlankToNullString(userId));
list.add(userRole);
}
}
......@@ -303,7 +304,7 @@ public class BusinessUserController {
*/
@Operation(description = "通过ID更新用户锁定状态")
@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);
if (null == user) {
return R.failed("操作失败,无此用户!");
......
......@@ -45,5 +45,5 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
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> {
*/
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> {
* @param clientId
* @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> {
* @param clientId
* @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
}
@Override
public Set<String> getRoleByUserIdAndClient(Integer userId, String clientId) {
public Set<String> getRoleByUserIdAndClient(String userId, String clientId) {
return baseMapper.getRoleByUserIdAndClient(userId,clientId);
}
}
......@@ -33,7 +33,7 @@ import org.springframework.stereotype.Service;
@Service
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService {
@Override
public Boolean removeByUserAndClientId(Integer userId, String clientId) {
public Boolean removeByUserAndClientId(String userId, String 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