反馈-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;
}
public void commit(Byte type, String desc,
public void commit(String type, String desc,
String screenUrl, String contact,
DeviceInfo deviceInfo) {
FeedbackTypeEnum feedbackTypeEnum = FeedbackTypeEnum.valueOf(type);
FeedbackRecord record = new FeedbackRecord();
record.setType(type);
record.setType(feedbackTypeEnum.getType());
record.setDesc(desc);
record.setScreenUrl(screenUrl);
record.setContact(contact);

View File

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