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

修改bug

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