Showing
5 changed files
with
21 additions
and
3 deletions
@@ -292,7 +292,8 @@ public class CocacolaServiceImpl implements ICocacolaService { | @@ -292,7 +292,8 @@ public class CocacolaServiceImpl implements ICocacolaService { | ||
292 | String url = "http://www.ztsms.cn/sendSms.do?"; | 292 | String url = "http://www.ztsms.cn/sendSms.do?"; |
293 | String content = "【 Yoho!Buy有货】恭喜您获得一张可口可乐优惠券,您的登录账号是 "+ mobile +", 密码是"+ password +";下载Yoho!Buy有货手机端 http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho,更多惊喜等着您!【有货】"; | 293 | String content = "【 Yoho!Buy有货】恭喜您获得一张可口可乐优惠券,您的登录账号是 "+ mobile +", 密码是"+ password +";下载Yoho!Buy有货手机端 http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho,更多惊喜等着您!【有货】"; |
294 | try { | 294 | try { |
295 | - url += "username=youhuo&password=" + MD5.md5(AES.decrypt("yoho96461qaz2wsx", this.sendSMSPassword)) + "&mobile=" + mobile + "&content="+ content +"&productid=333333"; | 295 | + String pwd = AES.decrypt("yoho96461qaz2wsx", this.sendSMSPassword); |
296 | + url += "username=youhuo&password=" + MD5.md5(pwd) + "&mobile=" + mobile + "&content="+ content +"&productid=333333"; | ||
296 | } catch (Exception e) { | 297 | } catch (Exception e) { |
297 | log.error("AES.decrypt error with code={}", this.sendSMSPassword, e); | 298 | log.error("AES.decrypt error with code={}", this.sendSMSPassword, e); |
298 | return; | 299 | return; |
@@ -50,4 +50,4 @@ activity.drawlinelist.redisExpire=10 | @@ -50,4 +50,4 @@ activity.drawlinelist.redisExpire=10 | ||
50 | gateway.url=http://192.168.102.205:8080/gateway | 50 | gateway.url=http://192.168.102.205:8080/gateway |
51 | 51 | ||
52 | #调用运维发送短信接口时的,需要传入的密码(AES加密) | 52 | #调用运维发送短信接口时的,需要传入的密码(AES加密) |
53 | -sendSMS.password=SUKXLLUSyeMIL0sQ7iZkpQ== | ||
53 | +sendSMS.password=7jVEde87bLffoTnt6tGxmw== |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <property name="is_debug_enable" defaultValue="false" description="开通接口访问校验" /> | 12 | <property name="is_debug_enable" defaultValue="false" description="开通接口访问校验" /> |
13 | <property name="execute.timetask.host" defaultValue="192.168.90.9" description="绑定定时任务IP" /> | 13 | <property name="execute.timetask.host" defaultValue="192.168.90.9" description="绑定定时任务IP" /> |
14 | <property name="gateway.url" defaultValue="http://192.168.102.205:8080/gateway" description="gateway 的地址" /> | 14 | <property name="gateway.url" defaultValue="http://192.168.102.205:8080/gateway" description="gateway 的地址" /> |
15 | - <property name="sendSMS.password" defaultValue="SUKXLLUSyeMIL0sQ7iZkpQ==" description="调用运维发送短信接口时的,需要传入的密码(AES加密)" /> | 15 | + <property name="sendSMS.password" defaultValue="7jVEde87bLffoTnt6tGxmw==" description="调用运维发送短信接口时的,需要传入的密码(AES加密)" /> |
16 | </group> | 16 | </group> |
17 | <script> | 17 | <script> |
18 | <generate template="META-INF/autoconf/databases.yml" destfile="WEB-INF/classes/databases.yml" /> | 18 | <generate template="META-INF/autoconf/databases.yml" destfile="WEB-INF/classes/databases.yml" /> |
@@ -11,6 +11,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; | @@ -11,6 +11,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; | ||
11 | 11 | ||
12 | import com.yoho.activity.common.cache.RedisCache; | 12 | import com.yoho.activity.common.cache.RedisCache; |
13 | import com.yoho.activity.service.ICocacolaService; | 13 | import com.yoho.activity.service.ICocacolaService; |
14 | +import com.yoho.core.common.utils.AES; | ||
14 | 15 | ||
15 | /** | 16 | /** |
16 | * 描述: | 17 | * 描述: |
@@ -36,5 +37,20 @@ public class Test { | @@ -36,5 +37,20 @@ public class Test { | ||
36 | } | 37 | } |
37 | } | 38 | } |
38 | 39 | ||
40 | + public static void main(String[] args) { | ||
41 | + String str = "I8vX4MtK"; | ||
42 | + try { | ||
43 | + System.out.println(AES.encrypt("yoho96461qaz2wsx", str)); | ||
44 | + } catch (Exception e) { | ||
45 | + e.printStackTrace(); | ||
46 | + } | ||
47 | + | ||
48 | + try { | ||
49 | + System.out.println(AES.decrypt("yoho96461qaz2wsx", "7jVEde87bLffoTnt6tGxmw==")); | ||
50 | + } catch (Exception e) { | ||
51 | + e.printStackTrace(); | ||
52 | + } | ||
53 | + } | ||
54 | + | ||
39 | 55 | ||
40 | } | 56 | } |
-
Please register or login to post a comment