|
|
@@ -197,4 +197,37 @@ public class LifeUserController {
|
|
|
log.info("LifeUserController.getUserByPhone?phone={}", phone);
|
|
|
return R.data(service.getUserByPhone(phone));
|
|
|
}
|
|
|
+
|
|
|
+ //查询用户弹窗状态
|
|
|
+ @GetMapping("/getUserByIsPopup")
|
|
|
+ public R<Boolean> getUserByIsPopup(@RequestParam("id") String id) {
|
|
|
+ log.info("LifeUserController.getUserByIsPopup?userId={}", id);
|
|
|
+ LifeUser user = lifeUserMapper.selectById(id);
|
|
|
+ if (user == null){
|
|
|
+ return R.fail("用户不存在");
|
|
|
+ }
|
|
|
+ if (user.getIsPopup() == 1){
|
|
|
+ return R.data(false);
|
|
|
+ }
|
|
|
+ return R.data(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ //保存用户弹窗状态
|
|
|
+ @GetMapping("/saveUserByIsPopup")
|
|
|
+ public R<Boolean> saveUserByIsPopup(@RequestParam("id") String id, @RequestParam("isPopup") int isPopup) {
|
|
|
+ log.info("LifeUserController.getUserByIsPopup?userId={}", id);
|
|
|
+ LifeUser user = lifeUserMapper.selectById(id);
|
|
|
+ if (user == null){
|
|
|
+ return R.fail("用户不存在");
|
|
|
+ }
|
|
|
+ user.setIsPopup(isPopup);
|
|
|
+ // 更新用户弹窗状态
|
|
|
+ int a =lifeUserMapper.updateById(user);
|
|
|
+ if (a <= 0){
|
|
|
+ return R.fail("更新用户弹窗状态失败");
|
|
|
+ }
|
|
|
+ return R.data(true);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|