|
|
@ -623,7 +623,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
String bindResult = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_OPEN_GET + authorizerAccessToken, JSON.toJSONString(bindInfoForm)).getData(); |
|
|
|
Map<String, Object> bindInfo = JSON.parseObject(bindResult, Map.class); |
|
|
|
boolean bindStatus = bindInfo.containsKey(ModuleConstant.OPEN_APP_ID); |
|
|
|
if (bindStatus != true) { |
|
|
|
if (!bindStatus) { |
|
|
|
Integer authCount = customerMpDao.selectAuthCount(customerId); |
|
|
|
String openPlatformId = null; |
|
|
|
if (authCount > 0) { |
|
|
@ -658,6 +658,8 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
throw new RenException(INVALID_APP_ID); |
|
|
|
case ModuleConstant.EIGHTY_NINE_THOUSAND: |
|
|
|
throw new RenException(ACCOUNT_HAS_BOUND_OPEN); |
|
|
|
default: |
|
|
|
|
|
|
|
} |
|
|
|
} else if (authCount > NumConstant.ZERO) { |
|
|
|
log.info("该客户已创建过开放平台账号,直接绑定"); |
|
|
@ -685,6 +687,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
throw new RenException(NOT_ALLOWED_OPERATE); |
|
|
|
case ModuleConstant.EIGHTY_NINE_THOUSAND_AND_FOUR: |
|
|
|
throw new RenException(TO_LIMIT); |
|
|
|
default: |
|
|
|
} |
|
|
|
} |
|
|
|
//插入 binding_account
|
|
|
@ -706,7 +709,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
public Date countExpirationTime(String expiresIn) { |
|
|
|
expiresIn = expiresIn + "000"; |
|
|
|
Date date = new Date(); |
|
|
|
long l = date.getTime() + Long.valueOf(expiresIn); |
|
|
|
long l = date.getTime() + Long.parseLong(expiresIn); |
|
|
|
date.setTime(l); |
|
|
|
return date; |
|
|
|
} |
|
|
@ -727,7 +730,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe |
|
|
|
* @author zxc |
|
|
|
*/ |
|
|
|
public Date sToDate(String t) { |
|
|
|
Long aLong = Long.valueOf(t + "000"); |
|
|
|
long aLong = Long.parseLong(t + "000"); |
|
|
|
Date date = new Date(); |
|
|
|
date.setTime(aLong); |
|
|
|
return date; |
|
|
|