|
|
@@ -38,12 +38,22 @@ public class PortalOrderApiController extends CertifyApiController {
|
|
|
private DemandService demandService;
|
|
|
@Resource
|
|
|
private DemandOrderLogService demandOrderLogService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 科技成果购买
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/orderAchievement", method = RequestMethod.POST)
|
|
|
+ public Result orderAchievement(){
|
|
|
+ Result res = new Result();
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 科技需求订单log
|
|
|
*/
|
|
|
@RequestMapping(value = "/demandOrderLog", method = RequestMethod.GET)
|
|
|
- public Result demandOrderDetail(String demandOrderId) {
|
|
|
+ public Result demandOrderLog(String demandOrderId) {
|
|
|
Result res = new Result();
|
|
|
if (StringUtils.isEmpty(demandOrderId)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "科技需求订单ID"));
|
|
|
@@ -119,13 +129,14 @@ public class PortalOrderApiController extends CertifyApiController {
|
|
|
* "我要接单"
|
|
|
*/
|
|
|
@RequestMapping(value = "/orderDemand", method = RequestMethod.POST)
|
|
|
- public Result order(@Valid InputDemandOrder inputDemandOrder, BindingResult bindingResult) {
|
|
|
+ public Result orderDemand(@Valid InputDemandOrder inputDemandOrder, BindingResult bindingResult) {
|
|
|
Result res = new Result();
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
|
|
|
DemandOrderFields.getFieldDesc(bindingResult.getFieldError().getField())));
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
if (StringUtils.isBlank(inputDemandOrder.getDemandId())) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
|
|
|
return res;
|
|
|
@@ -133,7 +144,7 @@ public class PortalOrderApiController extends CertifyApiController {
|
|
|
DemandOrder demandOrder = demandOrderService.selectDemandOrderByUidAndDemandId(TokenManager.getUserId(),
|
|
|
inputDemandOrder.getDemandId());
|
|
|
if (null != demandOrder) {
|
|
|
- res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "当前科技需求已接单!"));
|
|
|
+ res.getError().add(buildError("", "当前科技需求已接单!"));
|
|
|
return res;
|
|
|
}
|
|
|
Demand d = demandService.selectByPrimaryKey(inputDemandOrder.getDemandId());
|