Commit 49ab5823 by 王家辉

修改生产的返回code,fix bug

parent b4acd6b2
...@@ -17,7 +17,6 @@ import com.freemud.Service.OrdersService; ...@@ -17,7 +17,6 @@ import com.freemud.Service.OrdersService;
import com.freemud.dto.OrderProductDTO; import com.freemud.dto.OrderProductDTO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
......
...@@ -47,6 +47,9 @@ public class OrdersServiceImpl implements OrdersService { ...@@ -47,6 +47,9 @@ public class OrdersServiceImpl implements OrdersService {
@Value("${order.FileDir}") @Value("${order.FileDir}")
private String FileDir; private String FileDir;
@Value("${order.returnCode}")
private String returnCode;
@Override @Override
public List<OrderProductDTO> getOrderProductDTOByOrderId(String orderId) { public List<OrderProductDTO> getOrderProductDTOByOrderId(String orderId) {
...@@ -71,7 +74,8 @@ public class OrdersServiceImpl implements OrdersService { ...@@ -71,7 +74,8 @@ public class OrdersServiceImpl implements OrdersService {
MultiValueMap<String, Object> param = new LinkedMultiValueMap<>(); MultiValueMap<String, Object> param = new LinkedMultiValueMap<>();
param.add("file",resource); param.add("file",resource);
String code = restTemplate.postForObject(url,param,String.class); String code = restTemplate.postForObject(url,param,String.class);
if (code.equals("100")){ log.info("调用接口{}返回的code:{}",url,code);
if (code.equals(returnCode)){
log.info("修改sku成功{},{}",id,sku); log.info("修改sku成功{},{}",id,sku);
return true; return true;
} }
......
...@@ -20,5 +20,6 @@ mybatis.mapper-locations=classpath:Mapper/*.xml ...@@ -20,5 +20,6 @@ mybatis.mapper-locations=classpath:Mapper/*.xml
order.RequestUrl=http://172.16.15.179:3017 order.RequestUrl=http://172.16.15.179:3017
order.FileDir=D://test.xls order.FileDir=D://test.xls
order.returnCode=100
...@@ -20,5 +20,6 @@ mybatis.mapper-locations=classpath:Mapper/*.xml ...@@ -20,5 +20,6 @@ mybatis.mapper-locations=classpath:Mapper/*.xml
order.RequestUrl=http://10.50.1.40:9929 order.RequestUrl=http://10.50.1.40:9929
order.FileDir=/data/smalltools/test.xls order.FileDir=/data/smalltools/test.xls
order.returnCode=Success
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment