Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-wx-store-sharer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wx
yanxuan-wx-store-sharer
Commits
95f53b92
Commit
95f53b92
authored
May 15, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推客短信发送调试
parent
f529ad6b
Pipeline
#75538
passed with stages
in 1 minute 7 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
28 deletions
+52
-28
UasClientImpl.java
...x/store/sharer/integration/client/impl/UasClientImpl.java
+6
-17
UserInfoClientImpl.java
...re/sharer/integration/client/impl/UserInfoClientImpl.java
+4
-5
UasFacade.java
...yanxuan/wx/store/sharer/integration/facade/UasFacade.java
+2
-4
UserInfoFacade.java
...an/wx/store/sharer/integration/facade/UserInfoFacade.java
+2
-2
UasPushSmsCodeParamBO.java
...arer/integration/meta/model/bo/UasPushSmsCodeParamBO.java
+38
-0
No files found.
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/client/impl/UasClientImpl.java
View file @
95f53b92
...
@@ -11,13 +11,11 @@ import com.netease.yanxuan.missa.specs.interfaces.response.MissaResponse;
...
@@ -11,13 +11,11 @@ import com.netease.yanxuan.missa.specs.interfaces.response.MissaResponse;
import
com.netease.yanxuan.wx.store.sharer.integration.client.IUasClient
;
import
com.netease.yanxuan.wx.store.sharer.integration.client.IUasClient
;
import
com.netease.yanxuan.wx.store.sharer.integration.facade.UasFacade
;
import
com.netease.yanxuan.wx.store.sharer.integration.facade.UasFacade
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.SmsCodeScenesConfigBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.SmsCodeScenesConfigBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.UasPushSmsCodeParamBO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.Map
;
@Slf4j
@Slf4j
@RequiredArgsConstructor
@RequiredArgsConstructor
...
@@ -39,7 +37,11 @@ public class UasClientImpl implements IUasClient {
...
@@ -39,7 +37,11 @@ public class UasClientImpl implements IUasClient {
@Override
@Override
public
boolean
sendSmsCode
(
String
uid
,
String
phone
,
String
code
,
public
boolean
sendSmsCode
(
String
uid
,
String
phone
,
String
code
,
String
scenes
,
SmsCodeScenesConfigBO
scenesConfigBO
)
{
String
scenes
,
SmsCodeScenesConfigBO
scenesConfigBO
)
{
Map
<
String
,
Object
>
params
=
assembleSmsArg
(
uid
,
phone
,
code
,
scenes
,
scenesConfigBO
);
// 构建入参
UasPushSmsCodeParamBO
params
=
UasPushSmsCodeParamBO
.
builder
()
.
phone
(
phone
)
.
message
(
String
.
format
(
scenesConfigBO
.
getMessageFormat
(),
code
,
scenesConfigBO
.
getCodeValidMinutes
()))
.
level
(
1
).
uid
(
uid
).
topic
(
String
.
format
(
TOPIC_FORMAT
,
scenes
)).
build
();
log
.
error
(
"[op:UasClientImpl:sendSmsCode] params:{}"
,
JSON
.
toJSONString
(
params
));
log
.
error
(
"[op:UasClientImpl:sendSmsCode] params:{}"
,
JSON
.
toJSONString
(
params
));
try
{
try
{
MissaResponse
<
Void
>
missaResponse
=
uasFacade
.
pushSmsCode
(
params
);
MissaResponse
<
Void
>
missaResponse
=
uasFacade
.
pushSmsCode
(
params
);
...
@@ -55,17 +57,4 @@ public class UasClientImpl implements IUasClient {
...
@@ -55,17 +57,4 @@ public class UasClientImpl implements IUasClient {
}
}
return
false
;
return
false
;
}
}
private
Map
<
String
,
Object
>
assembleSmsArg
(
String
uid
,
String
phone
,
String
code
,
String
scenes
,
SmsCodeScenesConfigBO
scenesConfigBO
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"phone"
,
phone
);
params
.
put
(
"message"
,
String
.
format
(
scenesConfigBO
.
getMessageFormat
(),
code
,
scenesConfigBO
.
getCodeValidMinutes
()));
params
.
put
(
"level"
,
1
);
params
.
put
(
"uid"
,
uid
);
params
.
put
(
"topic"
,
String
.
format
(
TOPIC_FORMAT
,
scenes
));
return
params
;
}
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/client/impl/UserInfoClientImpl.java
View file @
95f53b92
...
@@ -6,13 +6,12 @@
...
@@ -6,13 +6,12 @@
*/
*/
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
client
.
impl
;
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
client
.
impl
;
import
com.netease.yanxuan.
userinfo.client.meta.CommonResult
;
import
com.netease.yanxuan.
missa.specs.interfaces.response.MissaResponse
;
import
com.netease.yanxuan.wx.store.sharer.integration.client.IUserInfoClient
;
import
com.netease.yanxuan.wx.store.sharer.integration.client.IUserInfoClient
;
import
com.netease.yanxuan.wx.store.sharer.integration.facade.UserInfoFacade
;
import
com.netease.yanxuan.wx.store.sharer.integration.facade.UserInfoFacade
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.UserInfoVerifyByIdentityNoBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.UserInfoVerifyByIdentityNoBO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -27,9 +26,9 @@ public class UserInfoClientImpl implements IUserInfoClient {
...
@@ -27,9 +26,9 @@ public class UserInfoClientImpl implements IUserInfoClient {
log
.
info
(
"[op:verifyByIdentityNo] realName:{}, identityNo:{}"
,
realName
,
identityNo
);
log
.
info
(
"[op:verifyByIdentityNo] realName:{}, identityNo:{}"
,
realName
,
identityNo
);
try
{
try
{
UserInfoVerifyByIdentityNoBO
bo
=
UserInfoVerifyByIdentityNoBO
.
builder
().
realName
(
realName
).
identityNo
(
identityNo
).
build
();
UserInfoVerifyByIdentityNoBO
bo
=
UserInfoVerifyByIdentityNoBO
.
builder
().
realName
(
realName
).
identityNo
(
identityNo
).
build
();
CommonResult
<
Boolean
>
result
=
userInfoFacade
.
verifyByIdentityNo
(
bo
);
MissaResponse
<
Boolean
>
missaResponse
=
userInfoFacade
.
verifyByIdentityNo
(
bo
);
if
(
HttpStatus
.
OK
.
value
()
==
result
.
getCode
())
{
if
(
null
!=
missaResponse
&&
missaResponse
.
isOK
())
{
return
result
.
getResult
();
return
missaResponse
.
getData
();
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"[op:verifyByIdentityNo] is exception"
,
e
);
log
.
error
(
"[op:verifyByIdentityNo] is exception"
,
e
);
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/facade/UasFacade.java
View file @
95f53b92
...
@@ -2,15 +2,13 @@ package com.netease.yanxuan.wx.store.sharer.integration.facade;
...
@@ -2,15 +2,13 @@ package com.netease.yanxuan.wx.store.sharer.integration.facade;
import
com.netease.yanxuan.missa.client.annotation.MissaClient
;
import
com.netease.yanxuan.missa.client.annotation.MissaClient
;
import
com.netease.yanxuan.missa.specs.interfaces.response.MissaResponse
;
import
com.netease.yanxuan.missa.specs.interfaces.response.MissaResponse
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.UasPushSmsCodeParamBO
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.Map
;
@MissaClient
(
serviceCode
=
"logistics-uas"
)
@MissaClient
(
serviceCode
=
"logistics-uas"
)
public
interface
UasFacade
{
public
interface
UasFacade
{
@PostMapping
(
value
=
"/push/sms/yanxuan-wx-store-sharer"
,
produces
=
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
)
@PostMapping
(
value
=
"/push/sms/yanxuan-wx-store-sharer"
,
produces
=
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
)
MissaResponse
<
Void
>
pushSmsCode
(
@RequestBody
Map
<
String
,
Object
>
param
);
MissaResponse
<
Void
>
pushSmsCode
(
UasPushSmsCodeParamBO
param
);
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/facade/UserInfoFacade.java
View file @
95f53b92
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
facade
;
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
facade
;
import
com.netease.yanxuan.missa.client.annotation.MissaClient
;
import
com.netease.yanxuan.missa.client.annotation.MissaClient
;
import
com.netease.yanxuan.
userinfo.client.meta.CommonResult
;
import
com.netease.yanxuan.
missa.specs.interfaces.response.MissaResponse
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.UserInfoVerifyByIdentityNoBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.UserInfoVerifyByIdentityNoBO
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -11,5 +11,5 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -11,5 +11,5 @@ import org.springframework.web.bind.annotation.RequestMethod;
public
interface
UserInfoFacade
{
public
interface
UserInfoFacade
{
@RequestMapping
(
value
=
"/user/realName/verifyByIdentityNo"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/user/realName/verifyByIdentityNo"
,
method
=
RequestMethod
.
POST
)
CommonResult
<
Boolean
>
verifyByIdentityNo
(
@RequestBody
UserInfoVerifyByIdentityNoBO
bo
);
MissaResponse
<
Boolean
>
verifyByIdentityNo
(
@RequestBody
UserInfoVerifyByIdentityNoBO
bo
);
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/meta/model/bo/UasPushSmsCodeParamBO.java
0 → 100644
View file @
95f53b92
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
meta
.
model
.
bo
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Description UAS-发送短信-配置-业务对象
* @Author fanjiaxin
* @Date 2025/3/11 18:43
*/
@Data
@Builder
public
class
UasPushSmsCodeParamBO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 手机号
*/
private
String
phone
;
/**
* 信息
*/
private
String
message
;
/**
* 级别
*/
private
Integer
level
;
/**
* UID
*/
private
String
uid
;
/**
* 主题
*/
private
String
topic
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment