|
@@ -5,7 +5,6 @@ import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.model.entity.GoodsDonQa;
|
|
import com.cyksj.model.entity.GoodsDonQa;
|
|
|
import com.cyksj.model.views.GoodsDonQaView;
|
|
import com.cyksj.model.views.GoodsDonQaView;
|
|
|
-import com.cyksj.redis.RedisService;
|
|
|
|
|
import com.cyksj.service.mange.GoodsDonQaService;
|
|
import com.cyksj.service.mange.GoodsDonQaService;
|
|
|
import com.cyksj.service.mange.RefreshCacheService;
|
|
import com.cyksj.service.mange.RefreshCacheService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
@@ -34,8 +33,6 @@ public class GoodsDonQuestionController {
|
|
|
|
|
|
|
|
private final HttpServletRequest request;
|
|
private final HttpServletRequest request;
|
|
|
|
|
|
|
|
- private final RedisService redisService;
|
|
|
|
|
-
|
|
|
|
|
private final RefreshCacheService refreshCacheService;
|
|
private final RefreshCacheService refreshCacheService;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -121,4 +118,19 @@ public class GoodsDonQuestionController {
|
|
|
GoodsDonQa byId = goodsDonQaService.getDetailById(id);
|
|
GoodsDonQa byId = goodsDonQaService.getDetailById(id);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(byId);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(byId);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 排序
|
|
|
|
|
+ */
|
|
|
|
|
+ @PutMapping("/sorted")
|
|
|
|
|
+ public Result<String> sorted(@RequestBody GoodsDonQa goodsDonQa) {
|
|
|
|
|
+ Long id = goodsDonQa.getId();
|
|
|
|
|
+ Integer sorted = goodsDonQa.getSorted();
|
|
|
|
|
+ GoodsDonQa byId = goodsDonQaService.getById(id);
|
|
|
|
|
+ if (byId != null) {
|
|
|
|
|
+ byId.setSorted(sorted);
|
|
|
|
|
+ refreshCacheService.goodsQuestionCache();
|
|
|
|
|
+ }
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|