|
@@ -70,7 +70,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
String body = xs.toXML(applyInfo);
|
|
|
body = body.substring(body.indexOf("<user>")+6,body.indexOf("</user>"));
|
|
|
//推送mec注册接口
|
|
|
- body = getBody(body,12301,null);
|
|
|
+ body = getBody(body,12301,null,null);
|
|
|
Date date = new Date();
|
|
|
try {
|
|
|
applyInfo.setUpdateTime(date);
|
|
@@ -81,7 +81,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
body = xs.toXML(applyClass);
|
|
|
body = body.substring(body.indexOf("<body>")+6,body.indexOf("</body>"));
|
|
|
//推送mec用户缴费
|
|
|
- getBody(body,125218,null);
|
|
|
+ getBody(body,125218,null,null);
|
|
|
applyInfoDao.update(applyInfo);
|
|
|
return true;
|
|
|
}catch (Exception e){
|
|
@@ -146,7 +146,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
List<Branch> branchList = branchDao.findAll(null);
|
|
|
if(branchList == null || branchList.size() < 1){
|
|
|
String body = "<province>0</province>";
|
|
|
- body = getBody(body,121002,null);
|
|
|
+ body = getBody(body,121002,null,null);
|
|
|
body = "<body><branches>" + new String(Base64.getDecoder().decode(body)) + "</branches></body>";
|
|
|
ResponseBranchesBean branches = XStreamUtil.xmlToObject("body", ResponseBranchesBean.class, body);
|
|
|
branchDao.batchInsert(branches.getBranches());
|
|
@@ -169,7 +169,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
break;
|
|
|
}
|
|
|
String body = "<branchId>" + branch.getBranchId() + "</branchId>";
|
|
|
- body = getBody(body,121107,null);
|
|
|
+ body = getBody(body,121107,null,null);
|
|
|
body = "<body><schools>" + new String(Base64.getDecoder().decode(body)) + "</schools></body>";
|
|
|
ResponseSeminariesBean seminaries = XStreamUtil.xmlToObject("body", ResponseSeminariesBean.class, body);
|
|
|
if(seminaries.getSchools() == null || seminaries.getSchools().size() < 1){
|
|
@@ -221,7 +221,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
MecUser mecUser = mecUserDao.get(userId);
|
|
|
if(mecUser == null){
|
|
|
String body = "<body><userId>" + userId + "</userId></body>";
|
|
|
- body = getBody(body, 121313,null);
|
|
|
+ body = getBody(body, 121313,null,null);
|
|
|
if(!StringUtils.isEmpty(body)){
|
|
|
body = new String(Base64.getDecoder().decode(body));
|
|
|
mecUser = XStreamUtil.xmlToObject("student", MecUser.class, body);
|
|
@@ -268,7 +268,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
// body = body+"0";
|
|
|
// }
|
|
|
byte[] encrypt = DES.encrypt(body.getBytes(), key.getBytes());
|
|
|
- body = getBody(new String(encrypt), 123255, 2);
|
|
|
+ body = getBody(new String(encrypt), 123255, 2,1);
|
|
|
body = new String(Base64.getDecoder().decode(body),"UTF-8");
|
|
|
if(StringUtils.isEmpty(body)){
|
|
|
return false;
|
|
@@ -282,7 +282,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
|
|
|
|
|
|
private List<MecCourse> getCourses(String body) throws Exception{
|
|
|
- body = getBody(body,123031,null);
|
|
|
+ body = getBody(body,123031,null,null);
|
|
|
if(StringUtils.isEmpty(body)){
|
|
|
return null;
|
|
|
}
|
|
@@ -291,11 +291,11 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
return parseMecCourse.getCourses();
|
|
|
}
|
|
|
|
|
|
- private String getBody(String body,Integer cmd,Integer uid) throws Exception{
|
|
|
+ private String getBody(String body,Integer cmd,Integer uid,Integer encrypt) throws Exception{
|
|
|
body = Base64.getEncoder().encodeToString(body.getBytes());
|
|
|
RequestParamBean requestParamBean = new RequestParamBean();
|
|
|
requestParamBean.setBody(body);
|
|
|
- requestParamBean.setHead(XStreamUtil.getOrdersHead(body,cmd,publicKey,uid));
|
|
|
+ requestParamBean.setHead(XStreamUtil.getOrdersHead(body,cmd,publicKey,uid,encrypt));
|
|
|
Writer writer = new StringWriter();
|
|
|
writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
|
|
|
XStream xs = new XStream();
|