| | |
| | | import com.ruoyi.common.utils.NumberUtil; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TbQuestion; |
| | | import com.ruoyi.system.model.TbSystemConfig; |
| | | import com.ruoyi.system.model.TbUser; |
| | | import com.ruoyi.system.service.TbQuestionService; |
| | | import com.ruoyi.system.service.TbSystemConfigService; |
| | | import com.ruoyi.system.service.TbUserService; |
| | | import com.ruoyi.system.vo.InviteUserListVo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Slf4j |
| | |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | |
| | | @ApiOperation(value = "修改用户信息",tags = {"修改用户信息"}) |
| | | @Autowired |
| | | private TbQuestionService questionService; |
| | | |
| | | @Autowired |
| | | private TbSystemConfigService systemConfigService; |
| | | |
| | | @ApiOperation(value = "修改用户信息",tags = {"用户模块"}) |
| | | @PostMapping("/updateUserInfo") |
| | | public R<?> updateUserInfo(String avatar,String username) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取最新用户信息",tags = {"获取最新用户信息"}) |
| | | @ApiOperation(value = "获取最新用户信息",tags = {"用户模块"}) |
| | | @GetMapping("/getUserInfo") |
| | | public R<?> getUserInfo() { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | return R.ok(user); |
| | | } |
| | | |
| | | @ApiOperation(value = "账号注销",tags = {"账号注销"}) |
| | | @GetMapping("/accountCancellation") |
| | | @ApiOperation(value = "账号注销",tags = {"用户模块"}) |
| | | @PostMapping("/accountCancellation") |
| | | public R<?> accountCancellation() { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "常见问题",tags = {"用户模块"}) |
| | | @GetMapping("/getQuestion") |
| | | public R<List<TbQuestion>> getQuestion() { |
| | | List<TbQuestion> list = questionService.list(new LambdaQueryWrapper<TbQuestion>().eq(TbQuestion::getDelFlag,0).orderByDesc(TbQuestion::getOrderNum)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | @ApiOperation(value = "客服",tags = {"用户模块"}) |
| | | @GetMapping("/customerService") |
| | | public R<String> customerService() { |
| | | TbSystemConfig config = systemConfigService.getOne(new LambdaQueryWrapper<TbSystemConfig>().eq(TbSystemConfig::getType, 2)); |
| | | String content = config.getContent(); |
| | | return R.ok(content); |
| | | } |
| | | |
| | | } |