Commit 4c8d8ae6 authored by hezhen's avatar hezhen

Merge branch 'hz_master'

parents 112dfb8e 9f91092a
...@@ -30,6 +30,7 @@ import com.github.wxiaoqi.security.common.util.result.JsonResultUtil; ...@@ -30,6 +30,7 @@ import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
import com.xxfc.platform.activity.feign.ActivityFeign; import com.xxfc.platform.activity.feign.ActivityFeign;
import com.xxfc.platform.im.feign.ImFeign; import com.xxfc.platform.im.feign.ImFeign;
import com.xxfc.platform.universal.dto.RegionDTO; import com.xxfc.platform.universal.dto.RegionDTO;
import com.xxfc.platform.universal.dto.SmsTemplateDTO;
import com.xxfc.platform.universal.feign.MQSenderFeign; import com.xxfc.platform.universal.feign.MQSenderFeign;
import com.xxfc.platform.universal.feign.RegionFeign; import com.xxfc.platform.universal.feign.RegionFeign;
import com.xxfc.platform.universal.feign.ThirdFeign; import com.xxfc.platform.universal.feign.ThirdFeign;
...@@ -37,6 +38,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -37,6 +38,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -105,6 +107,9 @@ public class AppPermissionService { ...@@ -105,6 +107,9 @@ public class AppPermissionService {
@Autowired @Autowired
private BaseUserMemberBiz baseUserMemberBiz; private BaseUserMemberBiz baseUserMemberBiz;
@Value("${admin.smallName}")
private String smallName;
public AppUserInfo validate(String username, String password) { public AppUserInfo validate(String username, String password) {
AppUserInfo info = new AppUserInfo(); AppUserInfo info = new AppUserInfo();
...@@ -955,7 +960,15 @@ public class AppPermissionService { ...@@ -955,7 +960,15 @@ public class AppPermissionService {
//上线绑定 //上线绑定
relationBiz.bindByUserId(userid, small_id); relationBiz.bindByUserId(userid, small_id);
//发送短信通知用户 //发送短信通知用户
thirdFeign.sendCode(username, password, SystemConfig.TEMPLATECODE); List<String> smsParams = new ArrayList<String>();
smsParams.add(smallName);
smsParams.add(username);
smsParams.add(password);
thirdFeign.sendTemplate(new SmsTemplateDTO(){{
setPhoneNumbers(username);
setType(SmsTemplateDTO.PWD);
setParams(smsParams.toArray(new String[smsParams.size()]));
}});
//参加新人活动 //参加新人活动
jionActivity(userid); jionActivity(userid);
// 登录结果要做做统一处理 // 登录结果要做做统一处理
......
...@@ -71,6 +71,8 @@ public class SmsTemplateDTO { ...@@ -71,6 +71,8 @@ public class SmsTemplateDTO {
public static final int PAY_I= 26; public static final int PAY_I= 26;
//旅游(上车通知)27 //旅游(上车通知)27
public static final int PAY_J= 27; public static final int PAY_J= 27;
//小程序密码通知
public static final int PWD= 28;
......
...@@ -82,6 +82,9 @@ public class AliYunSmsBiz { ...@@ -82,6 +82,9 @@ public class AliYunSmsBiz {
//旅游(上车通知)27 //旅游(上车通知)27
public static final String TEMPLATE_ID_PAY_J= "SMS_173345606"; public static final String TEMPLATE_ID_PAY_J= "SMS_173345606";
//旅游(上车通知)27
public static final String PWD= "SMS_174990497";
//发送模板消息 //发送模板消息
...@@ -166,6 +169,9 @@ public class AliYunSmsBiz { ...@@ -166,6 +169,9 @@ public class AliYunSmsBiz {
case 27 : case 27 :
SmsService.sendTemplateToJson(phoneNumbers,params,TEMPLATE_ID_PAY_J); SmsService.sendTemplateToJson(phoneNumbers,params,TEMPLATE_ID_PAY_J);
break; break;
case 28 :
SmsService.sendTemplateToJson(phoneNumbers,params,PWD);
break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment