From 4dad1e871c7d564258ce926593f78174357e5688 Mon Sep 17 00:00:00 2001 From: XinYi Song <2037158277@qq.com> Date: Tue, 21 Dec 2021 16:58:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91=E7=9F=AD=E4=BF=A1=E6=9C=8D=E5=8A=A1=E7=9A=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E5=AF=B9=E5=95=86=E5=AE=B6=E5=85=A5=E9=A9=BB=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E7=9A=84=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=9D=83=E9=99=90=E8=AE=A4?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/controller/MerchantSettlementController.java | 6 ++++-- src/main/java/com/xkrs/utils/AliYunSmsUtils.java | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/xkrs/controller/MerchantSettlementController.java b/src/main/java/com/xkrs/controller/MerchantSettlementController.java index 04c62ac..6aa798f 100644 --- a/src/main/java/com/xkrs/controller/MerchantSettlementController.java +++ b/src/main/java/com/xkrs/controller/MerchantSettlementController.java @@ -125,7 +125,8 @@ public class MerchantSettlementController { * @return */ @PostMapping("/updatePassBusiness") - public String updatePassBusiness(@RequestBody Map map) throws ClientException { + @PreAuthorize("hasAnyAuthority('auth_administor')") + public String updatePassBusiness(@RequestBody Map map,@RequestHeader(value="Authorization") String token) throws ClientException { Integer id = (Integer) map.get("id"); String username = (String) map.get("username"); String province = (String) map.get("province"); @@ -141,7 +142,8 @@ public class MerchantSettlementController { * @throws ClientException */ @PostMapping("/updateNotPassBusiness") - public String updateNotPassBusiness(@RequestBody Map map) throws ClientException { + @PreAuthorize("hasAnyAuthority('auth_administor')") + public String updateNotPassBusiness(@RequestBody Map map,@RequestHeader(value="Authorization") String token) throws ClientException { Integer id = (Integer) map.get("id"); String phone = (String) map.get("phone"); return merchantSettlementService.updateNotPassBusiness(id,phone); diff --git a/src/main/java/com/xkrs/utils/AliYunSmsUtils.java b/src/main/java/com/xkrs/utils/AliYunSmsUtils.java index d789572..daec625 100644 --- a/src/main/java/com/xkrs/utils/AliYunSmsUtils.java +++ b/src/main/java/com/xkrs/utils/AliYunSmsUtils.java @@ -46,7 +46,7 @@ public class AliYunSmsUtils { //必填:待发送手机号 request.setPhoneNumbers(telephone); //必填:短信签名-可在短信控制台中找到 - request.setSignName("乐益行"); + request.setSignName("乐益播"); //必填:短信模板-可在短信控制台中找到 request.setTemplateCode("SMS_209265027"); //可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 @@ -86,12 +86,12 @@ public class AliYunSmsUtils { //必填:待发送手机号 request.setPhoneNumbers(telephone); //必填:短信签名-可在短信控制台中找到 - request.setSignName("乐益行"); + request.setSignName("乐益播"); //必填:短信模板-可在短信控制台中找到 request.setTemplateCode("SMS_230656617"); //可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 //如果为发送验证码 无需修改 - request.setTemplateParam("{\"account\":\"" + account + "\",\"account\":\"" + account + "\"}"); + request.setTemplateParam("{\"account\":\"" + account + "\",\"password\":\"" + password + "\"}"); //选填-上行短信扩展码(无特殊需求用户请忽略此字段) //request.setSmsUpExtendCode("90997"); //可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者 @@ -124,9 +124,9 @@ public class AliYunSmsUtils { //必填:待发送手机号 request.setPhoneNumbers(telephone); //必填:短信签名-可在短信控制台中找到 - request.setSignName("乐益行"); + request.setSignName("乐益播"); //必填:短信模板-可在短信控制台中找到 - request.setTemplateCode("SMS_230656617"); + request.setTemplateCode("SMS_230656625"); //可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为 //如果为发送验证码 无需修改 //request.setTemplateParam("{\"account\":\"" + account + "\",\"account\":\"" + account + "\"}");