|
|
package com.yohoufo.order.controller;
|
|
|
|
|
|
import com.yoho.core.rest.annotation.ServiceDesc;
|
|
|
import com.yoho.tools.common.beans.ApiResponse;
|
|
|
import com.yohobuy.ufo.model.order.req.BuyerOrderMetaUpdateReq;
|
|
|
import com.yohobuy.ufo.model.user.req.AuthorizeInfoReq;
|
|
|
import com.yohoufo.common.annotation.IgnoreSession;
|
|
|
import com.yohoufo.common.annotation.IgnoreSignature;
|
|
|
import com.yohoufo.dal.user.model.UserAuthorizeInfo;
|
|
|
import com.yohoufo.order.service.IBuyerOrderMetaService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping(value="/order/buyerOrderMeta")
|
|
|
@ServiceDesc("orderBuyerOrderMeta")
|
|
|
public class BuyerOrderMeta4PlatformController {
|
|
|
private final Logger logger = LoggerFactory.getLogger(BuyerOrderMeta4PlatformController.class);
|
|
|
|
|
|
@Autowired
|
|
|
private IBuyerOrderMetaService buyerOrderMetaService;
|
|
|
/**
|
|
|
* 更新物流数据
|
|
|
* 提供给运营平台使用
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value="/updateDeliveryAddress")
|
|
|
@IgnoreSession
|
|
|
@IgnoreSignature
|
|
|
public ApiResponse updateDeliveryAddress(@RequestBody BuyerOrderMetaUpdateReq req) {
|
|
|
logger.info("enter BuyerOrderMeta4PlatformController updateDeliveryAddress param req is {}", req);
|
|
|
//检查
|
|
|
if(req.getUid()<=0||req.getOrderCode()<=0|| StringUtils.isBlank(req.getAddress())){
|
|
|
return new ApiResponse.ApiResponseBuilder().code(400).message("参数校验不通过").build();
|
|
|
}
|
|
|
int result =buyerOrderMetaService.updateDeliveryAddress(req);
|
|
|
if(result>0){
|
|
|
return new ApiResponse.ApiResponseBuilder().code(200)
|
|
|
.data(result).message("").build();
|
|
|
}else{
|
|
|
return new ApiResponse.ApiResponseBuilder().code(400)
|
|
|
.data(result).message("更新失败,影响行数:"+result).build();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|