|
|
@@ -41,7 +41,7 @@ public class RateController {
|
|
|
* @return the result map
|
|
|
*/
|
|
|
@RequestMapping(value = "/rateVendor/{orderId}", method = RequestMethod.POST)
|
|
|
- public ResultMap saveRateVendor(@PathVariable("orderId") Long orderId, @RequestBody String json) {
|
|
|
+ public ResultMap saveRateVendor(@PathVariable("orderId") String orderId, @RequestBody String json) {
|
|
|
RateVendor rateVendor = FastjsonUtils.fromJson(json, RateVendor.class);
|
|
|
rateVendor.setUserUU(SystemSession.getUser().getUserUU());
|
|
|
rateVendor.setUserEnuu(SystemSession.getUser().getEnterprise().getUu());
|
|
|
@@ -119,6 +119,7 @@ public class RateController {
|
|
|
rateBuyer.setPurchaseId(purchaseId);
|
|
|
rateBuyer.setVendorRateTime(new Date(System.currentTimeMillis()));
|
|
|
RateBuyer result = rateService.saveRateBuyer(rateBuyer);
|
|
|
+ //TODO 改变采购单状态
|
|
|
|
|
|
return new ResultMap(CodeType.OK.code(), "评价成功",result);
|
|
|
|
|
|
@@ -161,6 +162,30 @@ public class RateController {
|
|
|
return new ResultMap(CodeType.OK.code(), "创建成功",result);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 卖家为商品评价添加回复(初评)
|
|
|
+ *
|
|
|
+ * @param returnMeg
|
|
|
+ * @return the result map
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/rateReply/{orderId}", method = RequestMethod.POST)
|
|
|
+ public ResultMap saveReply(@PathVariable("orderId") String orderId, @RequestParam String goodsId, @RequestParam String returnMeg) {
|
|
|
+ RateGoods result = rateService.saveReply(orderId,goodsId,returnMeg);
|
|
|
+ return new ResultMap(CodeType.OK.code(), "回复成功",result);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 卖家为商品评价添加回复(追评)
|
|
|
+ *
|
|
|
+ * @param returnMeg
|
|
|
+ * @return the result map
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/rateReply/{orderId}", method = RequestMethod.POST)
|
|
|
+ public ResultMap saveAfterReply(@PathVariable("orderId") String orderId, @RequestParam String goodsId, @RequestParam String returnMeg) {
|
|
|
+ RateGoods result = rateService.saveAfterReply(orderId,goodsId,returnMeg);
|
|
|
+ return new ResultMap(CodeType.OK.code(), "回复成功",result);
|
|
|
+ }
|
|
|
+
|
|
|
/***************************查询操作******************************************/
|
|
|
|
|
|
/**
|
|
|
@@ -175,9 +200,47 @@ public class RateController {
|
|
|
return new ResultMap(CodeType.OK.code(), "查询成功",result);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询该订单的买家评价卖家
|
|
|
+ * @param orderId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@RequestMapping(value = "/rateVendor/{orderId}", method = RequestMethod.GET)
|
|
|
public ResultMap getRateVendor(@PathVariable("orderId")String orderId){
|
|
|
- return null;
|
|
|
+ RateVendor result = rateService.getRateVendorByOrderId(orderId);
|
|
|
+ return new ResultMap(CodeType.OK.code(), "查询成功",result);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询该订单的买家评价商品(根据订单id)
|
|
|
+ * @param orderId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/rateGoods/{orderId}", method = RequestMethod.GET)
|
|
|
+ public ResultMap getRateGoodsByOrderId(@PathVariable("orderId")String orderId){
|
|
|
+ List<RateGoods> result = rateService.getRateGoodsByOrderId(orderId);
|
|
|
+ return new ResultMap(CodeType.OK.code(), "查询成功",result);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 查询该订单的买家评价商品(根据goodsId)
|
|
|
+ * @param goodsId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/rateGoods/{goodsId}", method = RequestMethod.GET)
|
|
|
+ public ResultMap getRateGoodsByGoodsId(@PathVariable("goodsId")Long goodsId){
|
|
|
+ RateGoods result = rateService.getRateGoodsByGoodsId(goodsId);
|
|
|
+ return new ResultMap(CodeType.OK.code(), "查询成功",result);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询该订单的卖家评价买家
|
|
|
+ * @param orderId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/rateBuyer/{orderId}", method = RequestMethod.GET)
|
|
|
+ public ResultMap getRateBuyer(@PathVariable("orderId")String orderId){
|
|
|
+ RateBuyer result = rateService.getRateBuyerByOrderId(orderId);
|
|
|
+ return new ResultMap(CodeType.OK.code(), "查询成功",result);
|
|
|
}
|
|
|
|
|
|
}
|