| | |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.common.log.enums.OperatorType; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.common.security.auth.AuthUtil; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | |
| | | private VipClient vipClient; |
| | | @Resource |
| | | private TInviteUserService inviteUserService; |
| | | @Resource |
| | | private GiveVipUtil giveVipUtil; |
| | | |
| | | |
| | | /** |
| | |
| | | public R<List<Long>> getUserIdsByPhone(@RequestParam("phone") String phone) { |
| | | return R.ok(appUserService.list(new QueryWrapper<TAppUser>().like("phone",phone)).stream().map(TAppUser::getId).collect(Collectors.toList())); |
| | | } |
| | | @Resource |
| | | private GiveVipUtil giveVipUtil; |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "单位管理列表", tags = {"用户管理-单位管理"}) |
| | | @PostMapping(value = "/unit/page") |
| | | public R<Page<TCompany>> unitPage(@RequestBody UnitListQueryDto unitListQueryDto) { |
| | |
| | | |
| | | @ApiOperation(value = "单位管理添加或编辑", tags = {"用户管理-单位管理"}) |
| | | @PostMapping(value = "/unit/addOrUpdate") |
| | | @Log(title = "【单位管理】添加或编辑单位", businessType = BusinessType.INSERT,operatorType = OperatorType.MANAGE) |
| | | public R add(@RequestBody TCompany tCompany) { |
| | | //拿到单位列表 |
| | | otherClient.unitAddorUpadate(tCompany); |
| | |
| | | |
| | | @ApiOperation(value = "单位管理删除", tags = {"用户管理-单位管理"}) |
| | | @DeleteMapping(value = "/unit/delete") |
| | | @Log(title = "【单位管理】删除单位", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE) |
| | | public R add(@RequestParam String ids) { |
| | | String[] split = ids.split(","); |
| | | for (String s : split) { |
| | |
| | | |
| | | @ApiOperation(value = "用户添加编辑", tags = {"用户管理-用户列表"}) |
| | | @PostMapping(value = "/user/addOrUpdate") |
| | | @Log(title = "【用户列表】添加编辑用户", businessType = BusinessType.INSERT,operatorType = OperatorType.MANAGE) |
| | | public R addOrUpdate(@RequestBody TAppUser tAppUser) { |
| | | if (tAppUser.getId() != null){ |
| | | //为编辑操作,要进行vip的逻辑处理 |
| | |
| | | |
| | | @ApiOperation(value = "冻结解冻用户", tags = {"后台-用户管理-用户列表"}) |
| | | @PostMapping(value = "/user/status/change") |
| | | @Log(title = "【用户列表】冻结解冻用户", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE) |
| | | public R pointsDetail(@RequestBody UserChangeDto userChangeDto) { |
| | | TAppUser appUser = appUserService.getById(userChangeDto.getUserId()); |
| | | appUser.setStatus(userChangeDto.getStatus()); |
| | |
| | | |
| | | @ApiOperation(value = "修改单位", tags = {"后台-用户管理-用户列表"}) |
| | | @PostMapping(value = "/user/unit/change") |
| | | @Log(title = "【用户列表】修改用户单位", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE) |
| | | public R unitChange(@RequestBody UnitChangeDto unitChangeDto) { |
| | | for (String s : unitChangeDto.getIds().split(",")) { |
| | | TAppUser byId = appUserService.getById(s); |
| | |
| | | |
| | | @ApiOperation(value = "删除用户", tags = {"后台-用户管理-用户列表"}) |
| | | @DeleteMapping(value = "/user/delete") |
| | | @Log(title = "【用户列表】删除用户", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE) |
| | | public R userDelete(String ids) { |
| | | String[] split = ids.split(","); |
| | | for (String s : split) { |
| | |
| | | |
| | | @ApiOperation(value = "赠送会员", tags = {"用户管理-用户列表"}) |
| | | @PostMapping(value = "/user/give/vip") |
| | | @Log(title = "【用户列表】赠送会员", businessType = BusinessType.OTHER,operatorType = OperatorType.MANAGE) |
| | | public R giveVip(@RequestBody GiveVipDto giveVipDto) { |
| | | String[] split = giveVipDto.getUserIds().split(","); |
| | | for (String s : split) { |