|
@@ -98,18 +98,18 @@ public class MySysUserBrandService extends SysUserBrandServiceImpl {
|
|
|
return brands;
|
|
|
}
|
|
|
|
|
|
-// public void reBindUser(Long fromUserId,SysUserEntity toUser) {
|
|
|
-// if ( ObjectUtils.isEmpty(fromUserId)) {
|
|
|
-// throw new RuntimeException("参数有误!");
|
|
|
-// }
|
|
|
-//
|
|
|
-// UpdateWrapper<SysUserBrand> updateWrapper = new UpdateWrapper<>();
|
|
|
-// updateWrapper.set("user_id",toUser.getUserId());
|
|
|
-// updateWrapper.set("phone_num",toUser.getMobile());
|
|
|
-// updateWrapper.eq("user_id" , fromUserId);
|
|
|
-// updateWrapper.eq("enable" , 1);
|
|
|
-// update(updateWrapper);
|
|
|
-// }
|
|
|
+ public void reBindUser(Long fromUserId,Long userId ,String phone) {
|
|
|
+ if ( ObjectUtils.isEmpty(fromUserId)) {
|
|
|
+ throw new RuntimeException("参数有误!");
|
|
|
+ }
|
|
|
+
|
|
|
+ UpdateWrapper<SysUserBrand> updateWrapper = new UpdateWrapper<>();
|
|
|
+ updateWrapper.set("user_id",userId);
|
|
|
+ updateWrapper.set("phone_num",phone);
|
|
|
+ updateWrapper.eq("user_id" , fromUserId);
|
|
|
+ updateWrapper.eq("enable" , 1);
|
|
|
+ update(updateWrapper);
|
|
|
+ }
|
|
|
|
|
|
public void deleteByBrandIds(Integer[] ids) {
|
|
|
QueryWrapper wrapper = new QueryWrapper();
|