新增 用户反馈信息表

This commit is contained in:
Lemon
2025-06-30 14:09:47 +08:00
parent fd527e0467
commit 0f2f25ef0b
16 changed files with 690 additions and 579 deletions

View File

@@ -17,7 +17,7 @@ import com.jsowell.pile.domain.MemberPlateNumberRelation;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.service.*;
import com.jsowell.pile.vo.base.MemberWalletVO;
import com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO;
import com.jsowell.pile.vo.uniapp.customer.MemberFeedbackInfoVO;
import com.jsowell.pile.vo.uniapp.customer.InvoiceTitleVO;
import com.jsowell.pile.vo.uniapp.customer.MemberVO;
import com.jsowell.pile.vo.uniapp.customer.MemberWalletInfoVO;
@@ -60,7 +60,7 @@ public class MemberController extends BaseController {
private PileStationInfoService pileStationInfoService;
@Autowired
private MemberFeedbackService memberFeedbackService;
private MemberFeedbackInfoService memberFeedbackInfoService;
/**
* 下发短信接口 business
@@ -688,12 +688,12 @@ public class MemberController extends BaseController {
* @return
*/
@PostMapping("/saveFeedback")
public RestApiResponse<?> saveFeedback(HttpServletRequest request, @RequestBody MemberFeedbackDTO dto) {
public RestApiResponse<?> saveFeedback(HttpServletRequest request, @RequestBody MemberFeedbackInfoDTO dto) {
RestApiResponse<?> response = null;
try {
String memberId = getMemberIdByAuthorization(request);
dto.setMemberId(memberId);
memberFeedbackService.saveFeedback(dto);
memberFeedbackInfoService.saveFeedbackInfo(dto);
response = new RestApiResponse<>();
}catch (Exception e) {
logger.error("用户反馈信息保存 error", e);
@@ -714,7 +714,7 @@ public class MemberController extends BaseController {
RestApiResponse<?> response = null;
try {
String memberId = getMemberIdByAuthorization(request);
List<MemberFeedbackVO> list = memberFeedbackService.getFeedbackList(memberId);
List<MemberFeedbackInfoVO> list = memberFeedbackInfoService.getInfoListByMemberId(memberId);
logger.info("用户获取反馈信息列表 list:{}", JSON.toJSONString(list));
response = new RestApiResponse<>(ImmutableMap.of("list", list));
}catch (Exception e) {

View File

@@ -1,72 +0,0 @@
package com.jsowell.web.controller.pile;
import com.jsowell.common.annotation.Log;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.core.page.TableDataInfo;
import com.jsowell.common.enums.BusinessType;
import com.jsowell.pile.dto.MemberFeedbackDTO;
import com.jsowell.pile.dto.QueryMemberFeedbackDTO;
import com.jsowell.pile.service.MemberFeedbackService;
import com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 会员反馈信息Controller
*
* @author jsowell
* @date 2023-10-12
*/
@RestController
@RequestMapping("/member/feedback")
public class MemberFeedbackController extends BaseController {
@Autowired
private MemberFeedbackService memberFeedbackService;
/**
* 分页查询会员反馈列表
*/
@PreAuthorize("@ss.hasPermi('member:feedback:list')")
@PostMapping("/list")
public TableDataInfo list(@RequestBody QueryMemberFeedbackDTO dto) {
List<MemberFeedbackVO> list = memberFeedbackService.selectFeedbackList(dto);
return getDataTable(list);
}
/**
* 根据ID获取反馈详情
*/
@PreAuthorize("@ss.hasPermi('member:feedback:query')")
@GetMapping("/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
MemberFeedbackVO feedback = memberFeedbackService.getFeedbackById(id);
return AjaxResult.success(feedback);
}
/**
* 修改反馈内容(回复)
*/
@PreAuthorize("@ss.hasPermi('member:feedback:edit')")
@Log(title = "修改会员反馈", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody QueryMemberFeedbackDTO dto) {
memberFeedbackService.updateFeedback(dto);
return AjaxResult.success();
}
/**
* 删除反馈信息
*/
@PreAuthorize("@ss.hasPermi('member:feedback:remove')")
@Log(title = "删除会员反馈", businessType = BusinessType.DELETE)
@DeleteMapping
public AjaxResult remove(@RequestParam List<Long> ids) {
memberFeedbackService.deleteFeedbackByIds(ids);
return AjaxResult.success();
}
}

View File

@@ -0,0 +1,109 @@
package com.jsowell.web.controller.pile;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.jsowell.pile.service.MemberFeedbackInfoService;
import com.jsowell.pile.vo.uniapp.customer.MemberFeedbackInfoVO;
import org.springframework.security.access.prepost.PreAuthorize;
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.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jsowell.common.annotation.Log;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.enums.BusinessType;
import com.jsowell.pile.domain.MemberFeedbackInfo;
import com.jsowell.common.util.poi.ExcelUtil;
import com.jsowell.common.core.page.TableDataInfo;
/**
* 用户问题反馈Controller
*
* @author jsowell
* @date 2025-06-26
*/
@RestController
@RequestMapping("/pile/memberFeedbackInfo")
public class MemberFeedbackInfoController extends BaseController {
@Autowired
private MemberFeedbackInfoService memberFeedbackInfoService;
/**
* 查询用户问题反馈列表
*/
@PreAuthorize("@ss.hasPermi('pile:info:list')")
@GetMapping("/list")
public TableDataInfo list(MemberFeedbackInfo memberFeedbackInfo) {
startPage();
List<MemberFeedbackInfo> list = memberFeedbackInfoService.selectMemberFeedbackInfoList(memberFeedbackInfo);
return getDataTable(list);
}
/**
* 导出用户问题反馈列表
*/
@PreAuthorize("@ss.hasPermi('pile:info:export')")
@Log(title = "用户问题反馈", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MemberFeedbackInfo memberFeedbackInfo) {
List<MemberFeedbackInfo> list = memberFeedbackInfoService.selectMemberFeedbackInfoList(memberFeedbackInfo);
ExcelUtil<MemberFeedbackInfo> util = new ExcelUtil<MemberFeedbackInfo>(MemberFeedbackInfo.class);
util.exportExcel(response, list, "用户问题反馈数据");
}
/**
* 获取用户问题反馈详细信息
*/
@PreAuthorize("@ss.hasPermi('pile:info:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(memberFeedbackInfoService.selectMemberFeedbackInfoById(id));
}
/**
* 新增用户问题反馈
*/
@PreAuthorize("@ss.hasPermi('pile:info:add')")
@Log(title = "用户问题反馈", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MemberFeedbackInfo memberFeedbackInfo) {
return toAjax(memberFeedbackInfoService.insertMemberFeedbackInfo(memberFeedbackInfo));
}
/**
* 修改用户问题反馈
*/
@PreAuthorize("@ss.hasPermi('pile:info:edit')")
@Log(title = "用户问题反馈", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MemberFeedbackInfo memberFeedbackInfo) {
return toAjax(memberFeedbackInfoService.updateMemberFeedbackInfo(memberFeedbackInfo));
}
/**
* 删除用户问题反馈
*/
@PreAuthorize("@ss.hasPermi('pile:info:remove')")
@Log(title = "用户问题反馈", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(memberFeedbackInfoService.deleteMemberFeedbackInfoByIds(ids));
}
/**
* 通过feedbackCode查询信息详情
* @param feedbackCode
* @return
*/
@GetMapping("/getMemberFeedbackDetailByCode/{feedbackCode}")
public MemberFeedbackInfoVO getMemberFeedbackDetailByCode(@PathVariable("feedbackCode") String feedbackCode) {
return memberFeedbackInfoService.getMemberFeedbackDetailByCode(feedbackCode);
}
}