|
|
package com.yohoufo.order.controller;
|
|
|
|
|
|
import com.yohobuy.ufo.model.order.req.AppraiseOrderComputeReq;
|
|
|
import com.yohobuy.ufo.model.order.req.AppraiseOrderDetailReq;
|
|
|
import com.yohobuy.ufo.model.order.req.AppraiseOrderListReq;
|
|
|
import com.yohobuy.ufo.model.order.req.AppraiseOrderSubmitReq;
|
|
|
import com.yohoufo.common.ApiResponse;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@RestController
|
|
|
public class AppraiseOrderController {
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
/**
|
|
|
* 商品付费鉴定费用计算
|
|
|
* @param uid
|
|
|
* @param productId
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(params = "method=ufo.appriseOrder.compute")
|
|
|
public ApiResponse compute(@RequestParam(name = "uid")int uid,
|
|
|
@RequestParam(name = "productId")int productId){
|
|
|
AppraiseOrderComputeReq req = AppraiseOrderComputeReq.builder()
|
|
|
.uid(uid)
|
|
|
.productId(productId)
|
|
|
.build();
|
|
|
logger.info("in ufo.appriseOrder.compute req {}", req);
|
|
|
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder()
|
|
|
.code(200)
|
|
|
.data(null)
|
|
|
.message("鉴定计算成功")
|
|
|
.build();
|
|
|
}
|
|
|
|
|
|
|
|
|
@RequestMapping(params = "method=ufo.appriseOrder.submit")
|
|
|
public ApiResponse submit(@RequestParam(name = "uid")int uid,
|
|
|
@RequestParam(name = "productId")int productId,
|
|
|
@RequestParam(name = "addressId") String addressId){
|
|
|
AppraiseOrderSubmitReq req = AppraiseOrderSubmitReq.builder()
|
|
|
.uid(uid).productId(productId).addressId(addressId).build();
|
|
|
logger.info("in ufo.appriseOrder.submit req {}", req);
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder()
|
|
|
.code(200)
|
|
|
.data(null)
|
|
|
.message("鉴定订单提交成功")
|
|
|
.build();
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 商品付费鉴定列表
|
|
|
* @param uid
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(params = "method=ufo.appriseOrder.list")
|
|
|
public ApiResponse list(@RequestParam(name = "uid")int uid,
|
|
|
@RequestParam(value = "page", required = false, defaultValue = "1") int page,
|
|
|
@RequestParam(value = "limit", required = false, defaultValue = "10") int limit){
|
|
|
|
|
|
AppraiseOrderListReq req = AppraiseOrderListReq.builder()
|
|
|
.uid(uid).limit(limit).page(page).build();
|
|
|
|
|
|
logger.info("in ufo.appriseOrder.list req {}", req);
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder()
|
|
|
.code(200)
|
|
|
.data(null)
|
|
|
.message("鉴定订单列表查询成功")
|
|
|
.build();
|
|
|
}
|
|
|
|
|
|
|
|
|
@RequestMapping(params = "method=ufo.appriseOrder.detail")
|
|
|
public ApiResponse detail(@RequestParam(name = "uid")int uid,
|
|
|
@RequestParam(name = "orderCode")long orderCode){
|
|
|
AppraiseOrderDetailReq req = AppraiseOrderDetailReq.builder().uid(uid).orderCode(orderCode).build();
|
|
|
logger.info("in ufo.appriseOrder.detail req {}", req);
|
|
|
|
|
|
return new ApiResponse.ApiResponseBuilder()
|
|
|
.code(200)
|
|
|
.data(null)
|
|
|
.message("鉴定订单详情查询成功")
|
|
|
.build();
|
|
|
}
|
|
|
} |
...
|
...
|
|