修正快递查询
This commit is contained in:
parent
83bce07713
commit
69d476e628
|
|
@ -13,7 +13,6 @@ import com.kuaidi100.sdk.response.SubscribePushData;
|
|||
import com.kuaidi100.sdk.response.SubscribePushParamResp;
|
||||
import com.kuaidi100.sdk.response.SubscribePushResult;
|
||||
import com.kuaidi100.sdk.response.SubscribeResp;
|
||||
import com.kuaidi100.sdk.utils.PropertiesReader;
|
||||
import com.kuaidi100.sdk.utils.SignUtils;
|
||||
import com.ruoyi.bps.domain.ExpSubsPushResp;
|
||||
import com.ruoyi.bps.domain.ExpSubscribe;
|
||||
|
|
@ -282,10 +281,13 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
|
|||
String phone = contentJson.getString("phone");
|
||||
//如果出货单号或者快递单号为空,则返回错误信息,并写入Logo
|
||||
if(StringUtils.isEmpty(deliveryNo) || StringUtils.isEmpty(expressNo)){
|
||||
SubscribeResp subscribeResp=new SubscribeResp();
|
||||
subscribeResp.setMessage("快递单号或出货单号为空");
|
||||
subscribeResp.setResult(false);
|
||||
subscribeResp.setReturnCode("700");
|
||||
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("result",false);
|
||||
map.put("returnCode",700);
|
||||
map.put("message","快递单号或出货单号为空!");
|
||||
map.put("subscribeResp",subscribeResp);
|
||||
map.put("deliveryNo",deliveryNo);
|
||||
map.put("expressNo",expressNo);
|
||||
//写入Logo
|
||||
|
|
@ -303,8 +305,10 @@ public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService {
|
|||
expSubscribe.setSalt("topgp"); //偷懒,把请求来源记录到salt栏位,不再增加exp_subscribe字段了。。以后找时间改吧
|
||||
SubscribeResp subscribeResp= ExpressSubscribe(expSubscribe);
|
||||
|
||||
Object object = JSONObject.toJSON(subscribeResp);
|
||||
Map map=JSONObject.parseObject(object.toString(), Map.class);
|
||||
/*Object object = JSONObject.toJSON(subscribeResp);
|
||||
Map map=JSONObject.parseObject(object.toString(), Map.class);*/
|
||||
Map<String,Object> map= new HashMap<>();
|
||||
map.put("expSubscribe",subscribeResp);
|
||||
map.put("deliveryNo",deliveryNo);
|
||||
map.put("expressNo",expressNo);
|
||||
return JSONObject.toJSONString(map);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import com.kuaidi100.sdk.response.QueryTrackResp;
|
|||
import com.kuaidi100.sdk.utils.PropertiesReader;
|
||||
import com.kuaidi100.sdk.utils.SignUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -37,13 +38,6 @@ import java.util.List;
|
|||
public class ExpressInfoServiceImpl implements IExpressInfoService
|
||||
{
|
||||
/*
|
||||
String key = "Jydbrxsm2311";
|
||||
String customer = "2DD48B3469B82F2B7700569093AB792B";
|
||||
String secret = "8781ed9b35a7438499eb02fee915915a";
|
||||
String userid = "2a62da2192c24d17a943ff78ee64f8c6";
|
||||
|
||||
*/
|
||||
|
||||
String key = PropertiesReader.get("key");
|
||||
String customer = PropertiesReader.get("customer");
|
||||
String secret = PropertiesReader.get("secret");
|
||||
|
|
@ -52,6 +46,13 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
|||
String tid = PropertiesReader.get("tid");
|
||||
String secret_key = PropertiesReader.get("secret_key");
|
||||
String secret_secret = PropertiesReader.get("secret_secret");
|
||||
*/
|
||||
@Value("${express.key}")
|
||||
private String key;
|
||||
|
||||
@Value("${express.customer}")
|
||||
private String customer;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -132,7 +133,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService
|
|||
//如果没有输入快递公司编号,则查询快递公司编号
|
||||
if(StringUtils.isEmpty(com)){
|
||||
if(AutoGetExpressCom(nu)==null){
|
||||
callbackExpressInfo.setData("根据快递单号查询不到快递公司,请确认快递单号是否正确!");
|
||||
callbackExpressInfo.setData("请提供要查询的快递所属物流公司编号!");
|
||||
return callbackExpressInfo;
|
||||
}
|
||||
com=AutoGetExpressCom(nu).getComCode();
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.kuaidi100.sdk.utils.SignUtils;
|
|||
import com.ruoyi.bps.service.IExpressService;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -27,14 +28,21 @@ public class ExpressServiceImpl implements IExpressService {
|
|||
String secret = "8781ed9b35a7438499eb02fee915915a";
|
||||
String userid = "2a62da2192c24d17a943ff78ee64f8c6";
|
||||
*/
|
||||
String key = PropertiesReader.get("key");
|
||||
/*String key = PropertiesReader.get("key");
|
||||
String customer = PropertiesReader.get("customer");
|
||||
String secret = PropertiesReader.get("secret");
|
||||
String siid = PropertiesReader.get("siid");
|
||||
String userid = PropertiesReader.get("userid");
|
||||
String tid = PropertiesReader.get("tid");
|
||||
String secret_key = PropertiesReader.get("secret_key");
|
||||
String secret_secret = PropertiesReader.get("secret_secret");
|
||||
String secret_secret = PropertiesReader.get("secret_secret");*/
|
||||
|
||||
@Value("${express.key}")
|
||||
private String key;
|
||||
|
||||
@Value("${express.customer}")
|
||||
private String customer;
|
||||
|
||||
String msg="";
|
||||
@Autowired
|
||||
IExpressService expressService;
|
||||
|
|
|
|||
Loading…
Reference in New Issue