|
|
@@ -6,6 +6,8 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.UUID;
|
|
|
+import java.util.regex.Matcher;
|
|
|
+import java.util.regex.Pattern;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
@@ -43,6 +45,7 @@ import com.goafanti.common.model.Notice;
|
|
|
import com.goafanti.common.model.User;
|
|
|
import com.goafanti.common.model.UserIdentity;
|
|
|
import com.goafanti.common.utils.LoggerUtils;
|
|
|
+import com.goafanti.common.utils.MobileMessageUtils;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
@@ -76,6 +79,16 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
JtCollectSearchMapper jtCollectSearchMapper;
|
|
|
@Value(value="${collect_flag}")
|
|
|
private Boolean collectFlag ;
|
|
|
+ @Value(value = "${examineAdopt}")
|
|
|
+ private String examineAdopt = null;
|
|
|
+ @Value(value = "${examineNoAdopt}")
|
|
|
+ private String examineNoAdopt = null;
|
|
|
+
|
|
|
+ @Value(value = "${accessKey}")
|
|
|
+ private String accessKey = null;
|
|
|
+
|
|
|
+ @Value(value = "${accessSecret}")
|
|
|
+ private String accessSecret = null;
|
|
|
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(UserIdentityServiceImpl.class);
|
|
|
@@ -592,6 +605,7 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
identity.setAuditStatus(auditStatus);*/
|
|
|
if(collectFlag){
|
|
|
ExpertsListBo u=userIdentityMapper.selectByIdentityId(identity.getId());
|
|
|
+ String str="";
|
|
|
if (identity.getAuditStatus()==2) {
|
|
|
JtCollectSearch r=new JtCollectSearch();
|
|
|
if(u.getExpert()==1){
|
|
|
@@ -600,9 +614,15 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
if(u.getExpert()==2){
|
|
|
if(u.getConsultantType() == 4){
|
|
|
r.setFromTable(collectType.LEGAL_ADVISER.getDesc());
|
|
|
+ str="法律顾问认证";
|
|
|
}else{
|
|
|
r.setFromTable(collectType.ADVISER.getDesc());
|
|
|
+ str="顾问认证";
|
|
|
}
|
|
|
+ //通过后短信通知
|
|
|
+ String code="";
|
|
|
+ examineSendMessage(u, str, examineAdopt);
|
|
|
+
|
|
|
}
|
|
|
r.setKeyword(SocietyTagStatus.getStatus(u.getKeyword()).getDesc());
|
|
|
r.setTitle(u.getUsername());
|
|
|
@@ -617,10 +637,25 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
|
|
|
|
|
|
if (identity.getAuditStatus()==4||identity.getAuditStatus()==3) {
|
|
|
if(collectFlag)jtCollectSearchMapper.deleteByrowId(u.getUid());
|
|
|
+ //不通过短信通知
|
|
|
+ examineSendMessage(u, str, examineNoAdopt);
|
|
|
}
|
|
|
}
|
|
|
return userIdentityMapper.updateAuditing(identity);
|
|
|
}
|
|
|
+
|
|
|
+ private void examineSendMessage(ExpertsListBo u, String str, String code) {
|
|
|
+ //String paramString = "{\"code\":\"" + mobileVerifyCode + "\",\"product\":\"技淘网\"}";
|
|
|
+ String paramString = "{\"audit\":\"" + str + "}";
|
|
|
+ String regex = "^(1[1-9][0-9])\\d{8}$";
|
|
|
+ Pattern p = Pattern.compile(regex);
|
|
|
+ if (null!=u.getMobile()) {
|
|
|
+ Matcher m = p.matcher(u.getMobile());
|
|
|
+ if ( m.matches()) {
|
|
|
+ MobileMessageUtils.sendMessage(code, paramString, u.getMobile(), accessKey, accessSecret);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
@Override
|