Commit 3af04800 authored by xuxin's avatar xuxin

用户打开店铺记录 添加返回结果

parent 651181c8
...@@ -72,8 +72,14 @@ public class HistoryController { ...@@ -72,8 +72,14 @@ public class HistoryController {
@PostMapping("/url/add") @PostMapping("/url/add")
public void addWinlog(Principal principal, @RequestBody String urlRecord) { public void addWinlog(Principal principal, @RequestBody String urlRecord) {
WinHistory winHistory = new WinHistory(Instant.now().toEpochMilli(), urlRecord); ResultDto resultDto = new ResultDto();
historyService.addBrowserWinLog(principal.getName(), winHistory); try {
WinHistory winHistory = new WinHistory(Instant.now().toEpochMilli(), urlRecord);
historyService.addBrowserWinLog(principal.getName(), winHistory);
resultDto.setStatus(0);
} catch (ClientRequestException e) {
dealClientRequestException(resultDto, e);
}
} }
private void dealClientRequestException(ResultDto resultDto, ClientRequestException e) { private void dealClientRequestException(ResultDto resultDto, ClientRequestException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment