fix[用户模块]:配置文件优化
This commit is contained in:
+2
-3
@@ -330,9 +330,8 @@ public class SysUserController {
|
||||
*/
|
||||
@PutMapping("/code/mobile")
|
||||
@CachePut(value = "user", key = "#sysUser.username", unless="#result == null")
|
||||
//@AuditLog(operation = "'更新用户:' + #sysUser")
|
||||
@AuditLog(operation = "'更新用户:' + #sysUser")
|
||||
public void updateSysUserMobile(@RequestParam String code) {
|
||||
|
||||
SysUser sysUser = getLoginAppUser().getDatas();
|
||||
sysUser.setMobile(getUserPhoneNumber(code));
|
||||
appUserService.updateById(sysUser);
|
||||
@@ -363,7 +362,7 @@ public class SysUserController {
|
||||
HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(params, headers);
|
||||
|
||||
ResponseEntity<String> responseEntity = restTemplate
|
||||
.exchange("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + tencentProperties.getAppId()+"&secret=" + tencentProperties.getAppSecret(),
|
||||
.exchange(tencentProperties.getGetPhonenumberUrl()+"?grant_type=client_credential&appid=" + tencentProperties.getAppId()+"&secret=" + tencentProperties.getAppSecret(),
|
||||
HttpMethod.GET,
|
||||
requestEntity,
|
||||
String.class);
|
||||
|
||||
+2
-1
@@ -21,5 +21,6 @@ import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
public class TencentProperties {
|
||||
private String appId;
|
||||
private String appSecret;
|
||||
private String url;
|
||||
private String accessTokenUrl;
|
||||
private String getPhonenumberUrl;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ zlt:
|
||||
tencent:
|
||||
app-id: ${zlt.security.tencent.app-id}
|
||||
app-secret: ${zlt.security.tencent.app-secret}
|
||||
access-token-url: https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=
|
||||
get-phonenumber-url: https://api.weixin.qq.com/cgi-bin/token
|
||||
#审计日志
|
||||
# audit-log:
|
||||
# enabled: true
|
||||
|
||||
Reference in New Issue
Block a user