反馈-vo-接受参数-转换type枚举
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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();
|
||||||
|
Reference in New Issue
Block a user