Authored by ping

update

... ... @@ -7,3 +7,4 @@ other/.classpath
controller/.settings/
*.classpath
*.project
web/catalina.home_IS_UNDEFINED/
... ...
... ... @@ -292,7 +292,8 @@ public class CocacolaServiceImpl implements ICocacolaService {
String url = "http://www.ztsms.cn/sendSms.do?";
String content = "【 Yoho!Buy有货】恭喜您获得一张可口可乐优惠券,您的登录账号是 "+ mobile +", 密码是"+ password +";下载Yoho!Buy有货手机端 http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho,更多惊喜等着您!【有货】";
try {
url += "username=youhuo&password=" + MD5.md5(AES.decrypt("yoho96461qaz2wsx", this.sendSMSPassword)) + "&mobile=" + mobile + "&content="+ content +"&productid=333333";
String pwd = AES.decrypt("yoho96461qaz2wsx", this.sendSMSPassword);
url += "username=youhuo&password=" + MD5.md5(pwd) + "&mobile=" + mobile + "&content="+ content +"&productid=333333";
} catch (Exception e) {
log.error("AES.decrypt error with code={}", this.sendSMSPassword, e);
return;
... ...
... ... @@ -50,4 +50,4 @@ activity.drawlinelist.redisExpire=10
gateway.url=http://192.168.102.205:8080/gateway
#调用运维发送短信接口时的,需要传入的密码(AES加密)
sendSMS.password=SUKXLLUSyeMIL0sQ7iZkpQ==
\ No newline at end of file
sendSMS.password=7jVEde87bLffoTnt6tGxmw==
\ No newline at end of file
... ...
... ... @@ -12,7 +12,7 @@
<property name="is_debug_enable" defaultValue="false" description="开通接口访问校验" />
<property name="execute.timetask.host" defaultValue="192.168.90.9" description="绑定定时任务IP" />
<property name="gateway.url" defaultValue="http://192.168.102.205:8080/gateway" description="gateway 的地址" />
<property name="sendSMS.password" defaultValue="SUKXLLUSyeMIL0sQ7iZkpQ==" description="调用运维发送短信接口时的,需要传入的密码(AES加密)" />
<property name="sendSMS.password" defaultValue="7jVEde87bLffoTnt6tGxmw==" description="调用运维发送短信接口时的,需要传入的密码(AES加密)" />
</group>
<script>
<generate template="META-INF/autoconf/databases.yml" destfile="WEB-INF/classes/databases.yml" />
... ...
... ... @@ -11,6 +11,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.yoho.activity.common.cache.RedisCache;
import com.yoho.activity.service.ICocacolaService;
import com.yoho.core.common.utils.AES;
/**
* 描述:
... ... @@ -36,5 +37,20 @@ public class Test {
}
}
public static void main(String[] args) {
String str = "I8vX4MtK";
try {
System.out.println(AES.encrypt("yoho96461qaz2wsx", str));
} catch (Exception e) {
e.printStackTrace();
}
try {
System.out.println(AES.decrypt("yoho96461qaz2wsx", "7jVEde87bLffoTnt6tGxmw=="));
} catch (Exception e) {
e.printStackTrace();
}
}
}
... ...