Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
4ea3ef49
Commit
4ea3ef49
authored
Dec 19, 2024
by
honghy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信节点新增备注、目的仓搜索条件
parent
e6a292ef
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
5 deletions
+41
-5
20241120hhy.sql
sql/v2.3/20241120hhy.sql
+1
-0
SmsNodeBackVO.java
...system/controller/admin/sms/vo/smsNode/SmsNodeBackVO.java
+3
-0
SmsNodeBaseVO.java
...system/controller/admin/sms/vo/smsNode/SmsNodeBaseVO.java
+3
-0
SmsNodeQueryVO.java
...ystem/controller/admin/sms/vo/smsNode/SmsNodeQueryVO.java
+6
-0
SmsNodeDO.java
...der/yudao/module/system/dal/dataobject/sms/SmsNodeDO.java
+4
-0
SmsNodeMapper.java
...oder/yudao/module/system/dal/mysql/sms/SmsNodeMapper.java
+22
-4
SmsSendServiceImpl.java
...r/yudao/module/system/service/sms/SmsSendServiceImpl.java
+2
-1
No files found.
sql/v2.3/20241120hhy.sql
View file @
4ea3ef49
...
@@ -37,6 +37,7 @@ create table system_sms_node
...
@@ -37,6 +37,7 @@ create table system_sms_node
template_id_three
bigint
comment
'模板3'
,
template_id_three
bigint
comment
'模板3'
,
template_id_four
bigint
comment
'模板4'
,
template_id_four
bigint
comment
'模板4'
,
`extra`
json
NULL
COMMENT
'扩展字段'
,
`extra`
json
NULL
COMMENT
'扩展字段'
,
remark
varchar
(
255
)
NULL
COMMENT
'备注'
,
`creator`
varchar
(
64
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_ci
NULL
DEFAULT
''
COMMENT
'创建者'
,
`creator`
varchar
(
64
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_ci
NULL
DEFAULT
''
COMMENT
'创建者'
,
`create_time`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'创建时间'
,
`create_time`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'创建时间'
,
`updater`
varchar
(
64
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_ci
NULL
DEFAULT
''
COMMENT
'更新者'
,
`updater`
varchar
(
64
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_ci
NULL
DEFAULT
''
COMMENT
'更新者'
,
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/smsNode/SmsNodeBackVO.java
View file @
4ea3ef49
...
@@ -85,4 +85,7 @@ public class SmsNodeBackVO {
...
@@ -85,4 +85,7 @@ public class SmsNodeBackVO {
@ApiModelProperty
(
value
=
"目的仓(国家,城市,仓库id)"
)
@ApiModelProperty
(
value
=
"目的仓(国家,城市,仓库id)"
)
private
List
<
List
<
Long
>>
receiveAddrList
;
private
List
<
List
<
Long
>>
receiveAddrList
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
}
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/smsNode/SmsNodeBaseVO.java
View file @
4ea3ef49
...
@@ -54,4 +54,7 @@ public class SmsNodeBaseVO {
...
@@ -54,4 +54,7 @@ public class SmsNodeBaseVO {
@ApiModelProperty
(
value
=
"目的仓(国家,城市,仓库id)"
)
@ApiModelProperty
(
value
=
"目的仓(国家,城市,仓库id)"
)
private
List
<
List
<
Long
>>
receiveAddrList
;
private
List
<
List
<
Long
>>
receiveAddrList
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
}
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/smsNode/SmsNodeQueryVO.java
View file @
4ea3ef49
...
@@ -54,4 +54,10 @@ public class SmsNodeQueryVO extends PageParam{
...
@@ -54,4 +54,10 @@ public class SmsNodeQueryVO extends PageParam{
@ApiModelProperty
(
value
=
"多订单"
,
required
=
true
)
@ApiModelProperty
(
value
=
"多订单"
,
required
=
true
)
private
Integer
isOrders
;
private
Integer
isOrders
;
@ApiModelProperty
(
value
=
"extra"
)
private
String
extra
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
}
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/sms/SmsNodeDO.java
View file @
4ea3ef49
...
@@ -78,4 +78,8 @@ public class SmsNodeDO extends BaseDO {
...
@@ -78,4 +78,8 @@ public class SmsNodeDO extends BaseDO {
* 扩展字段
* 扩展字段
*/
*/
private
String
extra
;
private
String
extra
;
/**
* 备注
*/
private
String
remark
;
}
}
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SmsNodeMapper.java
View file @
4ea3ef49
...
@@ -3,9 +3,11 @@ package cn.iocoder.yudao.module.system.dal.mysql.sms;
...
@@ -3,9 +3,11 @@ package cn.iocoder.yudao.module.system.dal.mysql.sms;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.
vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.
query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.SmsNodeQueryVO
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.SmsNodeQueryVO
;
import
cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsNodeDO
;
import
cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsNodeDO
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
@@ -19,7 +21,7 @@ import java.util.List;
...
@@ -19,7 +21,7 @@ import java.util.List;
@Mapper
@Mapper
public
interface
SmsNodeMapper
extends
AbstractMapper
<
SmsNodeDO
>
{
public
interface
SmsNodeMapper
extends
AbstractMapper
<
SmsNodeDO
>
{
default
PageResult
<
SmsNodeDO
>
selectPage
(
SmsNodeQueryVO
vo
)
{
default
PageResult
<
SmsNodeDO
>
selectPage
(
SmsNodeQueryVO
vo
)
{
return
selectPage
(
vo
,
new
LambdaQuery
<
SmsNodeDO
>()
LambdaQueryWrapperX
<
SmsNodeDO
>
smsNodeDOLambdaQueryWrapperX
=
new
LambdaQuery
<
SmsNodeDO
>()
.
eq
(
StringUtils
.
isNotBlank
(
vo
.
getNodeValue
()),
SmsNodeDO:
:
getNodeValue
,
vo
.
getNodeValue
())
.
eq
(
StringUtils
.
isNotBlank
(
vo
.
getNodeValue
()),
SmsNodeDO:
:
getNodeValue
,
vo
.
getNodeValue
())
.
eqIfPresent
(
SmsNodeDO:
:
getTransportId
,
vo
.
getTransportId
())
.
eqIfPresent
(
SmsNodeDO:
:
getTransportId
,
vo
.
getTransportId
())
.
eqIfPresent
(
SmsNodeDO:
:
getCountryId
,
vo
.
getCountryId
())
.
eqIfPresent
(
SmsNodeDO:
:
getCountryId
,
vo
.
getCountryId
())
...
@@ -31,8 +33,24 @@ public interface SmsNodeMapper extends AbstractMapper<SmsNodeDO> {
...
@@ -31,8 +33,24 @@ public interface SmsNodeMapper extends AbstractMapper<SmsNodeDO> {
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdTwo
,
vo
.
getTemplateIdTwo
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdTwo
,
vo
.
getTemplateIdTwo
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdThree
,
vo
.
getTemplateIdThree
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdThree
,
vo
.
getTemplateIdThree
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdFour
,
vo
.
getTemplateIdFour
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdFour
,
vo
.
getTemplateIdFour
())
.
betweenIfPresent
(
SmsNodeDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
betweenIfPresent
(
SmsNodeDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
());
.
orderByDesc
(
SmsNodeDO:
:
getId
));
String
extra
=
vo
.
getExtra
();
if
(
StringUtils
.
isNotBlank
(
extra
))
{
List
<
List
<
Integer
>>
list
=
JSON
.
parseObject
(
extra
,
new
TypeReference
<
List
<
List
<
Integer
>>>()
{});
if
(!
list
.
isEmpty
())
{
String
sql
=
""
;
for
(
List
<
Integer
>
o
:
list
)
{
if
(
StringUtils
.
isBlank
(
sql
))
{
sql
=
" (replace(extra -> '$.receiveAddrList',' ','') LIKE '%"
+
JSON
.
toJSONString
(
o
)
+
"%') "
;
}
else
{
sql
+=
" or (replace(extra -> '$.receiveAddrList',' ','') LIKE '%"
+
JSON
.
toJSONString
(
o
)
+
"%')"
;
}
}
smsNodeDOLambdaQueryWrapperX
.
apply
(
sql
);
}
}
smsNodeDOLambdaQueryWrapperX
.
orderByDesc
(
SmsNodeDO:
:
getId
);
return
selectPage
(
vo
,
smsNodeDOLambdaQueryWrapperX
);
}
}
@Override
@Override
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsSendServiceImpl.java
View file @
4ea3ef49
...
@@ -337,7 +337,8 @@ public class SmsSendServiceImpl implements SmsSendService {
...
@@ -337,7 +337,8 @@ public class SmsSendServiceImpl implements SmsSendService {
// 尝试从缓存中获取短信节点信息
// 尝试从缓存中获取短信节点信息
smsNode
=
getSmsNodeFromCache
(
smsNodeDO
,
receive
);
smsNode
=
getSmsNodeFromCache
(
smsNodeDO
,
receive
);
if
(
smsNode
==
null
)
{
if
(
smsNode
==
null
)
{
throw
exception
(
SMS_NODE_NOT_EXISTS
);
log
.
error
(
SMS_NODE_NOT_EXISTS
.
getMsg
());
return
null
;
}
}
}
}
...
...
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