浏览代码

Merge remote-tracking branch 'origin/master'

周箭河 6 年之前
父节点
当前提交
6a9026c86b

+ 25 - 2
src/main/java/com/ym/mec/collectfee/entity/ApplyInfo.java

@@ -290,7 +290,30 @@ public class ApplyInfo {
 
 	@Override
 	public String toString() {
-		return ToStringBuilder.reflectionToString(this);
+		return "ApplyInfo{" +
+				"id=" + id +
+				", userId=" + userId +
+				", mobile='" + mobile + '\'' +
+				", name='" + name + '\'' +
+				", realName='" + realName + '\'' +
+				", classId=" + classId +
+				", branchId=" + branchId +
+				", sex=" + sex +
+				", birthday=" + birthday +
+				", city='" + city + '\'' +
+				", schoolId=" + schoolId +
+				", grade='" + grade + '\'' +
+				", gClass='" + gClass + '\'' +
+				", subId=" + subId +
+				", isAdjust=" + isAdjust +
+				", patriarchPhone='" + patriarchPhone + '\'' +
+				", patriarchName='" + patriarchName + '\'' +
+				", patriarchUnit='" + patriarchUnit + '\'' +
+				", status=" + status +
+				", pushStatus=" + pushStatus +
+				", updateTime=" + updateTime +
+				", createTime=" + createTime +
+				", courseId=" + courseId +
+				'}';
 	}
-
 }

+ 9 - 0
src/main/java/com/ym/mec/collectfee/service/impl/ApplyInfoServiceImpl.java

@@ -11,6 +11,7 @@ import com.ym.mec.collectfee.utils.CDesECB;
 import com.ym.mec.collectfee.utils.HttpUtil;
 import com.ym.mec.collectfee.utils.MapUtil;
 import com.ym.mec.collectfee.utils.XStreamUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -22,6 +23,7 @@ import java.io.Writer;
 import java.util.*;
 
 @Service
+@Slf4j
 public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> implements ApplyInfoService {
 	
 	@Autowired
@@ -71,6 +73,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注册接口
+				log.info("推送到用户数据到mec注册 body: " + body);
 				body = getBody(body,121301);
 				Date date = new Date();
 				try {
@@ -82,6 +85,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
 					body = xs.toXML(applyClass);
 					body = body.substring(body.indexOf("<body>")+6,body.indexOf("</body>"));
 					//推送mec用户缴费
+					log.info("推送到用户数据到mec缴费 body: " + body);
 					getBody(body,125218);
 					applyInfoDao.update(applyInfo);
 					return true;
@@ -256,6 +260,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
 			MecUser mecUser = mecUserDao.get(userId);
 			if(mecUser == null){
 				String body = "<body><userId>" + userId + "</userId></body>";
+				log.info("获取学员信息mec body: " + body);
 				body = getBody(body, 121313);
 				if(!StringUtils.isEmpty(body)){
 					body = new String(Base64.getDecoder().decode(body));
@@ -278,6 +283,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
 			xs.autodetectAnnotations(true);
 			String body = xs.toXML(renewBean);
 			body = body.substring(body.indexOf("<body>")+6,body.indexOf("</body>"));
+			log.info("推送续费数据到mec body: " + body);
 			body = CDesECB.encode(key,body);
 			RequestParamBean requestParamBean = new RequestParamBean();
 			requestParamBean.setBody(body);
@@ -288,6 +294,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
 			xs.autodetectAnnotations(true);
 			xs.toXML(requestParamBean,writer);
 			body = HttpUtil.postXmlData(writer.toString(), url);
+			log.info("mec响应的续费数据 body: " + body);
 			body = body.substring(body.indexOf("<errCode>") + 9, body.indexOf("</errCode>"));
 //			body = new String(CDesECB.decode(key,body.getBytes()));
 //			body = CDesECB.decodeValue(key,body);
@@ -314,6 +321,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
 	public boolean mecUserIsExist(String phone) {
 		try {
 			String body = "<body><uType>1</uType><uName>" + phone +"</uName></body>";
+			log.info("用户是否存在mec系统 body: " + body);
 			body = getBody(body, 120431);
 			body = new String(Base64.getDecoder().decode(body));
 			if(StringUtils.isEmpty(body)){
@@ -351,6 +359,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
 		xs.autodetectAnnotations(true);
 		xs.toXML(requestParamBean,writer);
 		body = HttpUtil.postXmlData(writer.toString(), url);
+		log.info("mec响应参数 body: " + body + " ,cmd: " + cmd);
 		return body.substring(body.indexOf("<body>")+6,body.indexOf("</body>"));
 	}