修改用户信息bug修复
This commit is contained in:
@@ -480,8 +480,8 @@ public class CashController {
|
||||
@Login
|
||||
@GetMapping(value = "/withdraw")
|
||||
@ApiOperation("发起提现 余额 金钱")
|
||||
public Result withdraw(Long userId, Double amount) {
|
||||
return cashOutService.withdraw(userId, amount, true);
|
||||
public Result withdraw(Long userId, Double money) {
|
||||
return cashOutService.withdraw(userId, money, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.sqx.modules.sys.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -22,7 +23,7 @@ import java.util.List;
|
||||
@TableName("sys_user")
|
||||
public class SysUserEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@@ -39,6 +40,7 @@ public class SysUserEntity implements Serializable {
|
||||
* 密码
|
||||
*/
|
||||
@NotBlank(message="密码不能为空", groups = AddGroup.class)
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String password;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,40 +10,39 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 用户与角色对应关系
|
||||
*
|
||||
* @author GYJ
|
||||
*/
|
||||
@Service("sysUserRoleService")
|
||||
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleDao, SysUserRoleEntity> implements SysUserRoleService {
|
||||
|
||||
@Override
|
||||
public void saveOrUpdate(Long userId, List<Long> roleIdList) {
|
||||
//先删除用户与角色关系
|
||||
this.removeByMap(new MapUtils().put("user_id", userId));
|
||||
@Override
|
||||
public void saveOrUpdate(Long userId, List<Long> roleIdList) {
|
||||
if (roleIdList == null || roleIdList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(roleIdList == null || roleIdList.size() == 0){
|
||||
return ;
|
||||
}
|
||||
//先删除用户与角色关系
|
||||
this.removeByMap(new MapUtils().put("user_id", userId));
|
||||
|
||||
//保存用户与角色关系
|
||||
for(Long roleId : roleIdList){
|
||||
SysUserRoleEntity sysUserRoleEntity = new SysUserRoleEntity();
|
||||
sysUserRoleEntity.setUserId(userId);
|
||||
sysUserRoleEntity.setRoleId(roleId);
|
||||
//保存用户与角色关系
|
||||
for (Long roleId : roleIdList) {
|
||||
SysUserRoleEntity sysUserRoleEntity = new SysUserRoleEntity();
|
||||
sysUserRoleEntity.setUserId(userId);
|
||||
sysUserRoleEntity.setRoleId(roleId);
|
||||
|
||||
this.save(sysUserRoleEntity);
|
||||
}
|
||||
}
|
||||
this.save(sysUserRoleEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> queryRoleIdList(Long userId) {
|
||||
return baseMapper.queryRoleIdList(userId);
|
||||
}
|
||||
@Override
|
||||
public List<Long> queryRoleIdList(Long userId) {
|
||||
return baseMapper.queryRoleIdList(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBatch(Long[] roleIds){
|
||||
return baseMapper.deleteBatch(roleIds);
|
||||
}
|
||||
@Override
|
||||
public int deleteBatch(Long[] roleIds) {
|
||||
return baseMapper.deleteBatch(roleIds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user