|
@@ -2,14 +2,12 @@ package com.ruoyi.wx.web.controller;
|
|
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.utils.ExceptionUtil;
|
|
|
+import com.ruoyi.framework.recovery.domain.RecContent;
|
|
|
import com.ruoyi.wx.web.domain.vo.SaleInfoVo;
|
|
|
import com.ruoyi.wx.web.service.IWxHomeService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.concurrent.ExecutionException;
|
|
@@ -64,4 +62,14 @@ public class WxHomeController {
|
|
|
return AjaxResult.error(ExceptionUtil.getExceptionMessage(e));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/add/content")
|
|
|
+ public AjaxResult thumbs(@RequestBody RecContent recContent) {
|
|
|
+ try {
|
|
|
+ int thumbs = wxHomeService.addRecContent(recContent);
|
|
|
+ return AjaxResult.success(thumbs);
|
|
|
+ } catch (Exception e) {
|
|
|
+ return AjaxResult.error(ExceptionUtil.getExceptionMessage(e));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|