|
@@ -218,17 +218,7 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
public Object queryUserCourse(Integer userId) {
|
|
|
try {
|
|
|
//获取学员信息
|
|
|
- MecUser mecUser = mecUserDao.get(userId);
|
|
|
- if(mecUser == null){
|
|
|
- String body = "<body><userId>" + userId + "</userId></body>";
|
|
|
- body = getBody(body, 121313);
|
|
|
- if(!StringUtils.isEmpty(body)){
|
|
|
- body = new String(Base64.getDecoder().decode(body));
|
|
|
- mecUser = XStreamUtil.xmlToObject("student", MecUser.class, body);
|
|
|
- //同步mec用户数据
|
|
|
- mecUserDao.insert(mecUser);
|
|
|
- }
|
|
|
- }
|
|
|
+ findMecUser(userId);
|
|
|
//获取学员课程班数据
|
|
|
//1小课,2乐团
|
|
|
String body = "<body><userId>" + userId + "</userId><classType>1</classType></body>";
|
|
@@ -258,6 +248,28 @@ public class ApplyInfoServiceImpl extends BaseServiceImpl<Integer, ApplyInfo> im
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public MecUser findMecUser(Integer userId) {
|
|
|
+ try {
|
|
|
+ //获取学员信息
|
|
|
+ MecUser mecUser = mecUserDao.get(userId);
|
|
|
+ if(mecUser == null){
|
|
|
+ String body = "<body><userId>" + userId + "</userId></body>";
|
|
|
+ body = getBody(body, 121313);
|
|
|
+ if(!StringUtils.isEmpty(body)){
|
|
|
+ body = new String(Base64.getDecoder().decode(body));
|
|
|
+ mecUser = XStreamUtil.xmlToObject("student", MecUser.class, body);
|
|
|
+ //同步mec用户数据
|
|
|
+ mecUserDao.insert(mecUser);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return mecUser;
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public boolean pushRenew(RenewBean renewBean) {
|
|
|
try {
|
|
|
XStream xs = new XStream();
|