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
f529ad6b
Commit
f529ad6b
authored
May 15, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推客短信发送调试
parent
6d8287bc
Pipeline
#75536
passed with stages
in 1 minute 20 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
41 deletions
+9
-41
UasClientImpl.java
...x/store/sharer/integration/client/impl/UasClientImpl.java
+5
-11
UasFacade.java
...yanxuan/wx/store/sharer/integration/facade/UasFacade.java
+4
-5
SendSmsCodeBO.java
...store/sharer/integration/meta/model/bo/SendSmsCodeBO.java
+0
-25
No files found.
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/client/impl/UasClientImpl.java
View file @
f529ad6b
...
@@ -7,15 +7,12 @@
...
@@ -7,15 +7,12 @@
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
client
.
impl
;
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
client
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.netease.yanxuan.
wx.store.sharer.common.exception.BizException
;
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.SendSmsCodeBO
;
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
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -45,17 +42,14 @@ public class UasClientImpl implements IUasClient {
...
@@ -45,17 +42,14 @@ public class UasClientImpl implements IUasClient {
Map
<
String
,
Object
>
params
=
assembleSmsArg
(
uid
,
phone
,
code
,
scenes
,
scenesConfigBO
);
Map
<
String
,
Object
>
params
=
assembleSmsArg
(
uid
,
phone
,
code
,
scenes
,
scenesConfigBO
);
log
.
error
(
"[op:UasClientImpl:sendSmsCode] params:{}"
,
JSON
.
toJSONString
(
params
));
log
.
error
(
"[op:UasClientImpl:sendSmsCode] params:{}"
,
JSON
.
toJSONString
(
params
));
try
{
try
{
SendSmsCodeBO
rpcResult
=
uasFacade
.
pushSmsCode
(
params
);
MissaResponse
<
Void
>
missaResponse
=
uasFacade
.
pushSmsCode
(
params
);
log
.
error
(
"[op:UasClientImpl:sendSmsCode] rpcResult:{}"
,
JSON
.
toJSONString
(
rpcResult
));
log
.
error
(
"[op:UasClientImpl:sendSmsCode] rpcResult:{}"
,
JSON
.
toJSONString
(
missaResponse
));
if
(
null
==
rpcResult
)
{
if
(
null
==
missaResponse
)
{
return
false
;
return
false
;
}
}
if
(
HttpStatus
.
OK
.
value
()
==
rpcResult
.
getCode
())
{
if
(
missaResponse
.
isOK
())
{
return
true
;
return
true
;
}
}
if
(
StringUtils
.
isNotBlank
(
rpcResult
.
getErrorCode
()))
{
throw
new
BizException
(
rpcResult
.
getErrorCode
());
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"[op:UasClientImpl:sendSmsCode] is error"
,
e
);
log
.
error
(
"[op:UasClientImpl:sendSmsCode] is error"
,
e
);
}
}
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/facade/UasFacade.java
View file @
f529ad6b
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.
wx.store.sharer.integration.meta.model.bo.SendSmsCodeBO
;
import
com.netease.yanxuan.
missa.specs.interfaces.response.MissaResponse
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
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.RequestMethod
;
import
java.util.Map
;
import
java.util.Map
;
@MissaClient
(
serviceCode
=
"logistics-uas"
)
@MissaClient
(
serviceCode
=
"logistics-uas"
)
public
interface
UasFacade
{
public
interface
UasFacade
{
@
RequestMapping
(
value
=
"/push/sms/yanxuan-wx-store-sharer"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
)
@
PostMapping
(
value
=
"/push/sms/yanxuan-wx-store-sharer"
,
produces
=
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
)
SendSmsCodeBO
pushSmsCode
(
@RequestBody
Map
<
String
,
Object
>
param
);
MissaResponse
<
Void
>
pushSmsCode
(
@RequestBody
Map
<
String
,
Object
>
param
);
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/meta/model/bo/SendSmsCodeBO.java
deleted
100644 → 0
View file @
6d8287bc
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
meta
.
model
.
bo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Description 微信凭证-核心对象
* @Author fanjiaxin
* @Date 2025/3/11 19:05
*/
@Data
public
class
SendSmsCodeBO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 响应码
*/
private
Integer
code
;
/**
* 错误编码
*/
private
String
errorCode
;
}
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