| | |
| | | package com.xiaopeng.operation.controller; |
| | | |
| | | |
| | | import cn.hutool.core.util.DesensitizedUtil; |
| | | import com.xiaopeng.api.feignClient.account.SysGroupMenuClient; |
| | | import com.xiaopeng.api.model.operation.XpUserFeedback; |
| | | import com.xiaopeng.api.vo.account.LoginUser; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import com.xiaopeng.operation.dto.XpUserFeedbackDto; |
| | | import com.xiaopeng.operation.query.UserFeedBackQuery; |
| | | import com.xiaopeng.operation.service.IXpUserFeedbackService; |
| | | import com.xiaopeng.operation.vo.XpUserFeedbackVO; |
| | | import com.xiaopeng.unifiedverification.interceptor.XpClientCheck; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | |
| | | |
| | | @Api(tags = "用户意见反馈") |
| | | @RestController |
| | | @RequestMapping("/base/v1/mini-program") |
| | | @RequestMapping("") |
| | | public class XpUserFeedbackController { |
| | | |
| | | private final IXpUserFeedbackService xpUserFeedbackService; |
| | | @Resource |
| | | private SysGroupMenuClient groupMenuClient; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | public XpUserFeedbackController(IXpUserFeedbackService xpUserFeedbackService) { |
| | | this.xpUserFeedbackService = xpUserFeedbackService; |
| | |
| | | * 添加用户意见反馈 |
| | | */ |
| | | @ApiOperation(value = "用户意见反馈",tags = {"小程序-用户意见反馈"},response = XpUserFeedback.class) |
| | | @PostMapping(value = "/api/v1/complaint/submit") |
| | | @PostMapping(value = "/base/v1/mini-program/complaint/submit") |
| | | @XpClientCheck(checkToken = false, checkOtpToken = true) |
| | | public R<?> addXpUserFeedback(@RequestBody XpUserFeedbackDto dto, HttpServletRequest request) { |
| | | String uid = request.getHeader("Xp-Uid"); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取意见反馈分页列表", tags = {"管理后台-服务中心"}) |
| | | @PostMapping(value = "/api/v1/userFeedBack/pageList") |
| | | public R<PageInfo<XpUserFeedbackVO>> getPageList(@RequestBody UserFeedBackQuery query) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | PageInfo<XpUserFeedbackVO> pageList = xpUserFeedbackService.getPageList(query); |
| | | if(!loginUser.getPhoneDesensitizationExempt()){ |
| | | pageList.getRecords().forEach(s->s.setPhone(DesensitizedUtil.mobilePhone(s.getPhone()))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |