|
@@ -6,6 +6,7 @@ import java.util.Map;
|
|
import javax.validation.constraints.Min;
|
|
import javax.validation.constraints.Min;
|
|
|
|
|
|
import com.chelvc.cloud.vehicle.client.AssessClient;
|
|
import com.chelvc.cloud.vehicle.client.AssessClient;
|
|
|
|
+import com.chelvc.cloud.vehicle.client.dto.AssessMessageDto;
|
|
import com.chelvc.cloud.vehicle.client.dto.GoodsAssessDto;
|
|
import com.chelvc.cloud.vehicle.client.dto.GoodsAssessDto;
|
|
import com.chelvc.cloud.vehicle.client.param.AssessModifyParam;
|
|
import com.chelvc.cloud.vehicle.client.param.AssessModifyParam;
|
|
import com.chelvc.cloud.vehicle.client.param.AssessQueryParam;
|
|
import com.chelvc.cloud.vehicle.client.param.AssessQueryParam;
|
|
@@ -17,10 +18,7 @@ import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 评价管理
|
|
* 评价管理
|
|
@@ -73,10 +71,16 @@ public class AssessController {
|
|
* 客戶-评价查询
|
|
* 客戶-评价查询
|
|
*/
|
|
*/
|
|
@GetMapping("/assess/query")
|
|
@GetMapping("/assess/query")
|
|
- public List<GoodsAssessDto> query(@RequestBody AssessQueryParam param) {
|
|
|
|
|
|
+ public AssessMessageDto query(@RequestBody AssessQueryParam param) {
|
|
return assessClient.query(param);
|
|
return assessClient.query(param);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @GetMapping("/assess/detail")
|
|
|
|
+ public GoodsAssessDto detail(@Min(value = 1, message = "评价id必须大于0") Long assessId) {
|
|
|
|
+ return assessClient.getDetail(assessId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 商家端-评价查询
|
|
* 商家端-评价查询
|
|
*/
|
|
*/
|
|
@@ -105,7 +109,7 @@ public class AssessController {
|
|
* 获取商品分数,包含总平均分、各周期平均分
|
|
* 获取商品分数,包含总平均分、各周期平均分
|
|
*/
|
|
*/
|
|
@GetMapping("/goodsScore")
|
|
@GetMapping("/goodsScore")
|
|
- public Map<String, BigDecimal> getGoodsScore(@Min(value = 0, message = "商品id必须大于0") Long goodsId) {
|
|
|
|
|
|
+ public Map<String, BigDecimal> getGoodsScore(@Min(value = 1, message = "商品id必须大于0") Long goodsId) {
|
|
return assessClient.getGoodsScore(goodsId);
|
|
return assessClient.getGoodsScore(goodsId);
|
|
}
|
|
}
|
|
}
|
|
}
|