反馈-vo-接受参数-转换type枚举

This commit is contained in:
2025-09-02 14:11:25 +08:00
parent 324711f35a
commit 87497109ff
2 changed files with 6 additions and 4 deletions

View File

@@ -51,11 +51,13 @@ public class FeedbackService {
return vo; return vo;
} }
public void commit(Byte type, String desc, public void commit(String type, String desc,
String screenUrl, String contact, String screenUrl, String contact,
DeviceInfo deviceInfo) { DeviceInfo deviceInfo) {
FeedbackTypeEnum feedbackTypeEnum = FeedbackTypeEnum.valueOf(type);
FeedbackRecord record = new FeedbackRecord(); FeedbackRecord record = new FeedbackRecord();
record.setType(type); record.setType(feedbackTypeEnum.getType());
record.setDesc(desc); record.setDesc(desc);
record.setScreenUrl(screenUrl); record.setScreenUrl(screenUrl);
record.setContact(contact); record.setContact(contact);

View File

@@ -41,9 +41,9 @@ public class FeedbackController {
@ApiImplicitParam(name="contact", value="联系方式"), @ApiImplicitParam(name="contact", value="联系方式"),
}) })
@PostMapping("/commit") @PostMapping("/commit")
public BusiResult<Void> commit(Byte type, String desc, public BusiResult<Void> commit(String type, String desc,
String screenUrl, String contact){ String screenUrl, String contact){
if (null == type || !StringUtils.hasText(desc)){ if (!StringUtils.hasText(type) || !StringUtils.hasText(desc)){
throw new ServiceException(BusiStatus.PARAMETERILLEGAL); throw new ServiceException(BusiStatus.PARAMETERILLEGAL);
} }
DeviceInfo deviceInfo = DeviceInfoContextHolder.get(); DeviceInfo deviceInfo = DeviceInfoContextHolder.get();