提交 109aa090 authored 作者: zgy's avatar zgy

修改bug

上级 034bd8e3
......@@ -113,6 +113,8 @@ public class SMSUtil {
String code = RandomStringUtils.randomNumeric(6);// 生成6位随机验证码
String tpl_value = URLEncoder.encode("#code#", ENCODING) + "="
+ URLEncoder.encode(code, ENCODING);
String s = SMSUtil.tplSendSms(API_KEY, tpl_id, tpl_value, phone);
System.out.println(s);
return code;
}
......@@ -133,6 +135,7 @@ public class SMSUtil {
params.put("tpl_value", tpl_value);
params.put("mobile", mobile);
return post(URI_TPL_SEND_SMS, params);
}
......@@ -179,11 +182,25 @@ public class SMSUtil {
sendMessageByText(phone, message);
}
public static void main(String[] args) throws IOException {
String phone = "13751400455,18607444177";
SMSUtil.sendLogisticsMessage(phone);
/**
* 发送验证码
*
* @param phone
*/
public static void sendAfricode(String phone) {
String code = RandomStringUtils.randomNumeric(6);// 生成6位随机验证码
String message = "【Afrishop】you are logging in for verification, and the verification code is " + code + ".Do not disclose the verification code to others.";
sendMessageByText(phone, message);
}
public static void main(String[] args) throws IOException {
String phone = "+8613751400455";
String code = RandomStringUtils.randomNumeric(6);// 生成6位随机验证码
String message = "【Afrishop】you are logging in for verification, and the verification code is " + code + ".Do not disclose the verification code to others.";
// sendMessageByText(phone,message);
// sendMessageByTpl(phone,"3253208",message);
String s = yzCode(phone);
System.out.println(s);
}
}
......@@ -14,7 +14,7 @@
<result property="enableFlag" column="enable_flag"/>
</resultMap>
<select id="queryObject" resultType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
<select id="queryObject" resultType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
select
`page_id`,
`img_name`,
......@@ -28,43 +28,43 @@
where page_id = #{id}
</select>
<select id="queryList" resultType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
select
`page_id`,
`img_name`,
`sort`,
`link_url`,
`img_url`,
`scan_flag`,
`redirect_flag`,
`enable_flag`
from tb_cf_home_page
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%')
</if>
<select id="queryList" resultType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
select
`page_id`,
`img_name`,
`sort`,
`link_url`,
`img_url`,
`scan_flag`,
`redirect_flag`,
`enable_flag`
from tb_cf_home_page
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
<otherwise>
order by page_id desc
</otherwise>
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from tb_cf_home_page
WHERE 1=1
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from tb_cf_home_page
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert id="save" parameterType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
</select>
<insert id="save" parameterType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
insert into tb_cf_home_page(
`page_id`,
`img_name`,
......@@ -84,35 +84,35 @@
#{redirectFlag},
#{enableFlag})
</insert>
<update id="update" parameterType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
update tb_cf_home_page
<set>
<if test="imgName != null">`img_name` = #{imgName}, </if>
<if test="sort != null">`sort` = #{sort}, </if>
<if test="linkUrl != null">`link_url` = #{linkUrl}, </if>
<if test="imgUrl != null">`img_url` = #{imgUrl}, </if>
<if test="scanFlag != null">`scan_flag` = #{scanFlag}, </if>
<if test="redirectFlag != null">`redirect_flag` = #{redirectFlag}, </if>
<if test="enableFlag != null">`enable_flag` = #{enableFlag}</if>
</set>
where page_id = #{pageId}
</update>
<delete id="delete">
<update id="update" parameterType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
update tb_cf_home_page
<set>
<if test="imgName != null">`img_name` = #{imgName},</if>
<if test="sort != null">`sort` = #{sort},</if>
<if test="linkUrl != null">`link_url` = #{linkUrl},</if>
<if test="imgUrl != null">`img_url` = #{imgUrl},</if>
<if test="scanFlag != null">`scan_flag` = #{scanFlag},</if>
<if test="redirectFlag != null">`redirect_flag` = #{redirectFlag},</if>
<if test="enableFlag != null">`enable_flag` = #{enableFlag}</if>
</set>
where page_id = #{pageId}
</update>
<delete id="delete">
delete from tb_cf_home_page where page_id = #{value}
</delete>
<delete id="deleteBatch">
delete from tb_cf_home_page where page_id in
<foreach item="pageId" collection="array" open="(" separator="," close=")">
#{pageId}
</foreach>
</delete>
<delete id="deleteBatch">
delete from tb_cf_home_page where page_id in
<foreach item="pageId" collection="array" open="(" separator="," close=")">
#{pageId}
</foreach>
</delete>
<!--获取有效的启动页图片-->
<select id="getStartPageImage" resultType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
select * from tb_cf_home_page where enable_flag=1 order by sort desc;
<select id="getStartPageImage" resultType="com.diaoyun.zion.chinafrica.entity.TbCfHomePageEntity">
select * from tb_cf_home_page where enable_flag=1 order by sort desc
</select>
</mapper>
\ No newline at end of file
......@@ -72,12 +72,12 @@ paypal.client.secret=EIyDryMDyM0BDWp2mtuGFdSU2WOkWtmSuGGaRnUiIom7kxuM7JhuSFfETbC
#flutterwave.encryption.key=38ec6860f49e0d9d488a83b1
#flutterwave.merchant.id=3950728
#################################flutterwave真实(miumiu@afrieshop.com)######################################################
#flutterwave.public.key=FLWPUBK-ee0f5d653f5f33fc89e6caf9de6a4c34-X
#flutterwave.secret.key=FLWSECK-c06cdc19526077f3855b76045ca77de3-X
#flutterwave.encryption.key=c06cdc1952600626ec8779ed
#flutterwave.merchant.id=6577084
flutterwave.public.key=FLWPUBK-ee0f5d653f5f33fc89e6caf9de6a4c34-X
flutterwave.secret.key=FLWSECK-c06cdc19526077f3855b76045ca77de3-X
flutterwave.encryption.key=c06cdc1952600626ec8779ed
flutterwave.merchant.id=6577084
#################################flutterwave测试(TEST)######################################################
flutterwave.public.key=FLWPUBK_TEST-e3cc948e7cb24b2128fca3b781f6fce0-X
flutterwave.secret.key=FLWSECK_TEST-f88371ca63a989a4af95625475a0d22d-X
flutterwave.encryption.key=FLWSECK_TEST001d4c34f798
flutterwave.merchant.id=1508207
#flutterwave.public.key=FLWPUBK_TEST-e3cc948e7cb24b2128fca3b781f6fce0-X
#flutterwave.secret.key=FLWSECK_TEST-f88371ca63a989a4af95625475a0d22d-X
#flutterwave.encryption.key=FLWSECK_TEST001d4c34f798
#flutterwave.merchant.id=1508207
......@@ -527,18 +527,18 @@ public class ZionApplicationTests {
}*/
@Test
public void sendMessageToAll() {
String phone = "";
List<TbCfUserInfoEntity> list = tbCfUserInfoService.selectUserByPhone();
for (TbCfUserInfoEntity user : list) {
phone += user.getPhone();
phone += ",";
}
System.out.println(phone);
String text = "We've updated!\n" +
// String phone = "";
// List<TbCfUserInfoEntity> list = tbCfUserInfoService.selectUserByPhone();
// for (TbCfUserInfoEntity user : list) {
// phone += user.getPhone();
// phone += ",";
// }
// System.out.println(phone);
String text = "【Afrishop】We've updated!\n" +
"Thank you for downloading Afrishop. If you get a 'Server Busy' notification as you are trying to shop, be sure to sign out and sign in again. Be sure to check your device store for the lastest app updates.\n" +
"You can also shop using our website www.afrieshop.com\n" +
"Happy Shopping!";
SMSUtil.sendMessageByText(/*phone.trim()*/"+8613751400455,+8618607444177", text);
SMSUtil.sendMessageByText(/*phone.trim()*/"+8613751400455,18607444177", text);
}
@Resource
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论