同步删除账户
This commit is contained in:
parent
d86b20c246
commit
72615f513f
|
|
@ -6,16 +6,24 @@ import io.swagger.annotations.ApiOperation;
|
|||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(value="bonus-smart-canteen")
|
||||
@Service
|
||||
@Component
|
||||
public interface SmartCanteenClient {
|
||||
|
||||
@ApiOperation(value = "新增账户")
|
||||
@RequestMapping(value = "/acc_info/sync",method = RequestMethod.POST)
|
||||
AjaxResult syncAccInfo(SysUser sysUser);
|
||||
|
||||
@ApiOperation(value = "删除账户")
|
||||
@RequestMapping(value = "/acc_info/deleteAccInfoByUserIds",method = RequestMethod.POST)
|
||||
AjaxResult deleteAccInfoByUserIds(List<SysUser> users);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -525,6 +525,15 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||
userRoleMapper.deleteUserRole(userIds);
|
||||
// 删除用户与岗位关联
|
||||
userPostMapper.deleteUserPost(userIds);
|
||||
// 同步删除账户信息
|
||||
List<SysUser> users = new ArrayList<>();
|
||||
for (int i = 0; i < userIds.length; i++) {
|
||||
SysUser user = new SysUser();
|
||||
user.setUserId(userIds[i]);
|
||||
users.add(user);
|
||||
}
|
||||
smartCanteenClient.deleteAccInfoByUserIds(users);
|
||||
|
||||
return userMapper.deleteUserByIds(userIds);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue