|
@@ -33,6 +33,7 @@ import com.cyksj.model.manage.views.OrderDonBackView;
|
|
|
import com.cyksj.model.request.*;
|
|
import com.cyksj.model.request.*;
|
|
|
import com.cyksj.model.views.*;
|
|
import com.cyksj.model.views.*;
|
|
|
import com.cyksj.service.mange.CmsOrderDonService;
|
|
import com.cyksj.service.mange.CmsOrderDonService;
|
|
|
|
|
+import com.cyksj.service.order.OrderDonCommentService;
|
|
|
import com.cyksj.service.user.UserService;
|
|
import com.cyksj.service.user.UserService;
|
|
|
import com.cyksj.web.util.EasyExcelUtils;
|
|
import com.cyksj.web.util.EasyExcelUtils;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
@@ -77,6 +78,8 @@ public class CmsOrderController {
|
|
|
|
|
|
|
|
private final OrderCommentMapper orderCommentMapper;
|
|
private final OrderCommentMapper orderCommentMapper;
|
|
|
|
|
|
|
|
|
|
+ private final OrderDonCommentService orderDonCommentService;
|
|
|
|
|
+
|
|
|
private final GoodsDonSkuMapper skuMapper;
|
|
private final GoodsDonSkuMapper skuMapper;
|
|
|
|
|
|
|
|
private final ChannelPopularizeMapper channelPopularizeMapper;
|
|
private final ChannelPopularizeMapper channelPopularizeMapper;
|
|
@@ -397,6 +400,7 @@ public class CmsOrderController {
|
|
|
if (orderComment.getCommentTime() == null) {
|
|
if (orderComment.getCommentTime() == null) {
|
|
|
orderComment.setCommentTime(DateTime.now().toDateStr());
|
|
orderComment.setCommentTime(DateTime.now().toDateStr());
|
|
|
}
|
|
}
|
|
|
|
|
+ orderComment.setVerifyStatus(OrderComment.VerifyStatus.success);
|
|
|
orderCommentMapper.insert(orderComment);
|
|
orderCommentMapper.insert(orderComment);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult("新增成功");
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult("新增成功");
|
|
|
}
|
|
}
|
|
@@ -406,10 +410,13 @@ public class CmsOrderController {
|
|
|
*/
|
|
*/
|
|
|
@PutMapping("/put/orderComment")
|
|
@PutMapping("/put/orderComment")
|
|
|
public Result<String> updateOrderComment(@RequestBody @Validated OrderComment orderComment) {
|
|
public Result<String> updateOrderComment(@RequestBody @Validated OrderComment orderComment) {
|
|
|
- orderCommentMapper.updateById(orderComment);
|
|
|
|
|
if (orderComment.getCommentTime() == null) {
|
|
if (orderComment.getCommentTime() == null) {
|
|
|
orderComment.setCommentTime(DateTime.now().toDateStr());
|
|
orderComment.setCommentTime(DateTime.now().toDateStr());
|
|
|
}
|
|
}
|
|
|
|
|
+ if (orderComment.getVerifyStatus() == null) {
|
|
|
|
|
+ orderComment.setVerifyStatus(OrderComment.VerifyStatus.success);
|
|
|
|
|
+ }
|
|
|
|
|
+ orderCommentMapper.updateById(orderComment);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult("编辑成功");
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult("编辑成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -431,6 +438,36 @@ public class CmsOrderController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 评论审核
|
|
|
|
|
+ */
|
|
|
|
|
+ @PutMapping("/put/orderComment/status")
|
|
|
|
|
+ @NoSubmit
|
|
|
|
|
+ public Result<String> updateOrderCommentStatus(@RequestBody OrderComment orderCommentReq) throws Exception {
|
|
|
|
|
+ orderDonCommentService.verifyCommentStatus(orderCommentReq.getId(), orderCommentReq.getVerifyStatus());
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 配置订单平台评价列表
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/post/orderComment/reward/config")
|
|
|
|
|
+ public Result<String> saveOrUpdateOrderCommentConfig(@RequestBody List<OrderCommentRewardConfig> configs) {
|
|
|
|
|
+ orderDonCommentService.saveOrUpdateOrderCommentConfig(configs);
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取配置 订单平台评价
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/get/orderComment/reward/config")
|
|
|
|
|
+ public Result<List<OrderCommentRewardConfigView>> getOrderCommentRewardConfig() {
|
|
|
|
|
+ List<OrderCommentRewardConfigView> views = beanSearcher.searchAll(OrderCommentRewardConfigView.class, MapUtils.builder()
|
|
|
|
|
+ .orderBy(OrderCommentRewardConfigView::getGoodsId).desc()
|
|
|
|
|
+ .build());
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(views);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 踢出车队
|
|
* 踢出车队
|
|
|
*/
|
|
*/
|