|
@@ -8,6 +8,7 @@ import com.flyer.foster.consts.LoginDevice;
|
|
|
import com.flyer.foster.consts.WechatConst;
|
|
|
import com.flyer.foster.dto.app.AppUserQueryDTO;
|
|
|
import com.flyer.foster.dto.app.AppUserRespDTO;
|
|
|
+import com.flyer.foster.dto.app.AppUserUpdateDTO;
|
|
|
import com.flyer.foster.entity.AppUser;
|
|
|
import com.flyer.foster.entity.Garden;
|
|
|
import com.flyer.foster.mapper.IAppUserMapper;
|
|
@@ -87,4 +88,19 @@ public class AppUserServiceImpl extends ServiceImpl<IAppUserMapper, AppUser> imp
|
|
|
respDTO.setToken(StpAppUtil.getTokenValue());
|
|
|
return respDTO;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean updateUser(AppUserUpdateDTO updateDTO) {
|
|
|
+ AppUser appUser = this.lambdaQuery()
|
|
|
+ .eq(AppUser::getId, updateDTO.getUserId())
|
|
|
+ .one();
|
|
|
+ if (appUser == null) {
|
|
|
+ throw new BusinessException("无效的用户id");
|
|
|
+ }
|
|
|
+ BeanUtil.copyProperties(updateDTO, appUser);
|
|
|
+ return this.lambdaUpdate()
|
|
|
+ .set(AppUser::getIsFinishGuide, updateDTO.getIsFinishGuide())
|
|
|
+ .eq(AppUser::getId, appUser.getId())
|
|
|
+ .update();
|
|
|
+ }
|
|
|
}
|