|
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
-/**
|
|
|
|
|
|
|
+/** admin/平台管理/常见问题
|
|
|
* 项目名: yhlxj2
|
|
* 项目名: yhlxj2
|
|
|
* 文件名: GoodsDonQuestionController
|
|
* 文件名: GoodsDonQuestionController
|
|
|
* 创建者: JavaZou
|
|
* 创建者: JavaZou
|
|
@@ -39,6 +39,9 @@ public class GoodsDonQuestionController {
|
|
|
private final RefreshCacheService refreshCacheService;
|
|
private final RefreshCacheService refreshCacheService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 新增问题
|
|
|
|
|
+ */
|
|
|
@PostMapping("/post")
|
|
@PostMapping("/post")
|
|
|
public Result<String> post(@RequestBody GoodsDonQa goodsDonQa) {
|
|
public Result<String> post(@RequestBody GoodsDonQa goodsDonQa) {
|
|
|
goodsDonQaService.saveOrdUpdateQa(goodsDonQa);
|
|
goodsDonQaService.saveOrdUpdateQa(goodsDonQa);
|
|
@@ -47,6 +50,9 @@ public class GoodsDonQuestionController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 删除问题
|
|
|
|
|
+ */
|
|
|
@DeleteMapping("/del/{id}")
|
|
@DeleteMapping("/del/{id}")
|
|
|
public Result<String> delById(@PathVariable Long id) {
|
|
public Result<String> delById(@PathVariable Long id) {
|
|
|
GoodsDonQa byId = goodsDonQaService.getById(id);
|
|
GoodsDonQa byId = goodsDonQaService.getById(id);
|
|
@@ -58,6 +64,9 @@ public class GoodsDonQuestionController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 更新问题
|
|
|
|
|
+ */
|
|
|
@PutMapping("/update")
|
|
@PutMapping("/update")
|
|
|
public Result<String> update(@RequestBody GoodsDonQa goodsDonQa) {
|
|
public Result<String> update(@RequestBody GoodsDonQa goodsDonQa) {
|
|
|
goodsDonQaService.saveOrdUpdateQa(goodsDonQa);
|
|
goodsDonQaService.saveOrdUpdateQa(goodsDonQa);
|
|
@@ -95,12 +104,18 @@ public class GoodsDonQuestionController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 问题列表
|
|
|
|
|
+ */
|
|
|
@GetMapping("/get")
|
|
@GetMapping("/get")
|
|
|
public Result<SearchResult<GoodsDonQaView>> get() {
|
|
public Result<SearchResult<GoodsDonQaView>> get() {
|
|
|
SearchResult<GoodsDonQaView> search = beanSearcher.search(GoodsDonQaView.class, MapUtils.flatBuilder(request.getParameterMap()).orderBy(GoodsDonQaView::getUpdateTime).desc().build());
|
|
SearchResult<GoodsDonQaView> search = beanSearcher.search(GoodsDonQaView.class, MapUtils.flatBuilder(request.getParameterMap()).orderBy(GoodsDonQaView::getUpdateTime).desc().build());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 问题详情
|
|
|
|
|
+ */
|
|
|
@GetMapping("/get/detail/{id}")
|
|
@GetMapping("/get/detail/{id}")
|
|
|
public Result<GoodsDonQa> getDetailById(@PathVariable Long id) {
|
|
public Result<GoodsDonQa> getDetailById(@PathVariable Long id) {
|
|
|
GoodsDonQa byId = goodsDonQaService.getDetailById(id);
|
|
GoodsDonQa byId = goodsDonQaService.getDetailById(id);
|