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
ce1c6969
Commit
ce1c6969
authored
Nov 20, 2024
by
honghy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正短信节点分页查询
parent
9d90be84
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
53 deletions
+55
-53
SmsNodeController.java
...module/system/controller/admin/sms/SmsNodeController.java
+23
-17
SmsNodeQueryVO.java
...ystem/controller/admin/sms/vo/smsNode/SmsNodeQueryVO.java
+6
-4
SmsNodeMapper.java
...oder/yudao/module/system/dal/mysql/sms/SmsNodeMapper.java
+15
-21
SmsNodeService.java
...coder/yudao/module/system/service/sms/SmsNodeService.java
+9
-8
SmsNodeServiceImpl.java
...r/yudao/module/system/service/sms/SmsNodeServiceImpl.java
+2
-3
No files found.
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/SmsNodeController.java
View file @
ce1c6969
package
cn
.
iocoder
.
yudao
.
module
.
system
.
controller
.
admin
.
sms
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.SmsNodeBackVO
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.SmsNodeCreateReqVO
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.SmsNodeQueryVO
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.SmsNodeUpdateReqVO
;
import
cn.iocoder.yudao.module.system.convert.sms.SmsNodeConvert
;
import
cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsNodeDO
;
import
cn.iocoder.yudao.module.system.service.sms.SmsNodeService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.annotations.*
;
import
javax.validation.constraints.*
;
import
javax.validation.*
;
import
javax.servlet.http.*
;
import
java.util.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.io.IOException
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
java.util.Collection
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.*;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.*
;
import
cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsNodeDO
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
@Validated
@RestController
...
...
@@ -76,8 +82,8 @@ public class SmsNodeController {
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得短信节点分页"
)
@PreAuthorize
(
"@ss.hasPermission('system:sms-node:query')"
)
public
CommonResult
<
PageResult
<
SmsNodeBackVO
>>
getSmsNodePage
(
@Valid
SmsNodeQueryVO
query
,
PageVO
page
)
{
PageResult
<
SmsNodeDO
>
pageResult
=
smsNodeService
.
getSmsNodePage
(
query
,
page
);
public
CommonResult
<
PageResult
<
SmsNodeBackVO
>>
getSmsNodePage
(
@Valid
SmsNodeQueryVO
query
)
{
PageResult
<
SmsNodeDO
>
pageResult
=
smsNodeService
.
getSmsNodePage
(
query
);
return
success
(
SmsNodeConvert
.
INSTANCE
.
convertPage
(
pageResult
));
}
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sms/vo/smsNode/SmsNodeQueryVO.java
View file @
ce1c6969
package
cn
.
iocoder
.
yudao
.
module
.
system
.
controller
.
admin
.
sms
.
vo
.
smsNode
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
@ApiModel
(
"管理后台 - 短信节点查询 VO"
)
public
class
SmsNodeQueryVO
{
public
class
SmsNodeQueryVO
extends
PageParam
{
@ApiModelProperty
(
value
=
"节点"
)
private
String
nodeValue
;
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/sms/SmsNodeMapper.java
View file @
ce1c6969
...
...
@@ -18,27 +18,21 @@ import java.util.List;
*/
@Mapper
public
interface
SmsNodeMapper
extends
AbstractMapper
<
SmsNodeDO
>
{
@Override
default
PageResult
<
SmsNodeDO
>
selectPage
(
PageVO
page
,
Object
object
)
{
if
(
object
instanceof
SmsNodeQueryVO
)
{
SmsNodeQueryVO
vo
=
(
SmsNodeQueryVO
)
object
;
return
selectPage
(
page
,
new
LambdaQuery
<
SmsNodeDO
>()
.
eq
(
StringUtils
.
isNotBlank
(
vo
.
getNodeValue
()),
SmsNodeDO:
:
getNodeValue
,
vo
.
getNodeValue
())
.
eqIfPresent
(
SmsNodeDO:
:
getTransportId
,
vo
.
getTransportId
())
.
eqIfPresent
(
SmsNodeDO:
:
getCountryId
,
vo
.
getCountryId
())
.
eqIfPresent
(
SmsNodeDO:
:
getCountryCode
,
vo
.
getCountryCode
())
.
eqIfPresent
(
SmsNodeDO:
:
getIsTransport
,
vo
.
getIsTransport
())
.
eqIfPresent
(
SmsNodeDO:
:
getIsOrders
,
vo
.
getIsOrders
())
.
eqIfPresent
(
SmsNodeDO:
:
getStatus
,
vo
.
getStatus
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdOne
,
vo
.
getTemplateIdOne
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdTwo
,
vo
.
getTemplateIdTwo
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdThree
,
vo
.
getTemplateIdThree
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdFour
,
vo
.
getTemplateIdFour
())
.
betweenIfPresent
(
SmsNodeDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
orderByDesc
(
SmsNodeDO:
:
getId
));
}
return
null
;
default
PageResult
<
SmsNodeDO
>
selectPage
(
SmsNodeQueryVO
vo
)
{
return
selectPage
(
vo
,
new
LambdaQuery
<
SmsNodeDO
>()
.
eq
(
StringUtils
.
isNotBlank
(
vo
.
getNodeValue
()),
SmsNodeDO:
:
getNodeValue
,
vo
.
getNodeValue
())
.
eqIfPresent
(
SmsNodeDO:
:
getTransportId
,
vo
.
getTransportId
())
.
eqIfPresent
(
SmsNodeDO:
:
getCountryId
,
vo
.
getCountryId
())
.
eqIfPresent
(
SmsNodeDO:
:
getCountryCode
,
vo
.
getCountryCode
())
.
eqIfPresent
(
SmsNodeDO:
:
getIsTransport
,
vo
.
getIsTransport
())
.
eqIfPresent
(
SmsNodeDO:
:
getIsOrders
,
vo
.
getIsOrders
())
.
eqIfPresent
(
SmsNodeDO:
:
getStatus
,
vo
.
getStatus
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdOne
,
vo
.
getTemplateIdOne
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdTwo
,
vo
.
getTemplateIdTwo
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdThree
,
vo
.
getTemplateIdThree
())
.
eqIfPresent
(
SmsNodeDO:
:
getTemplateIdFour
,
vo
.
getTemplateIdFour
())
.
betweenIfPresent
(
SmsNodeDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
orderByDesc
(
SmsNodeDO:
:
getId
));
}
@Override
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsNodeService.java
View file @
ce1c6969
package
cn
.
iocoder
.
yudao
.
module
.
system
.
service
.
sms
;
import
java.util.*
;
import
javax.validation.*
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.service.IService
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.*
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.SmsNodeCreateReqVO
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.SmsNodeQueryVO
;
import
cn.iocoder.yudao.module.system.controller.admin.sms.vo.smsNode.SmsNodeUpdateReqVO
;
import
cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsNodeDO
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
javax.validation.Valid
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 短信节点 Service 接口
...
...
@@ -57,11 +59,10 @@ public interface SmsNodeService extends IService<SmsNodeDO> {
/**
* 获得短信节点分页
*
* @param page 分页查询
* @param query 查询
* @return 短信节点分页
*/
PageResult
<
SmsNodeDO
>
getSmsNodePage
(
SmsNodeQueryVO
query
,
PageVO
page
);
PageResult
<
SmsNodeDO
>
getSmsNodePage
(
SmsNodeQueryVO
query
);
/**
* 获得短信节点列表, 用于 Excel 导出
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/sms/SmsNodeServiceImpl.java
View file @
ce1c6969
...
...
@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.system.service.sms;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.redis.helper.RedisHelper
;
import
cn.iocoder.yudao.framework.sms.core.client.SmsClient
;
import
cn.iocoder.yudao.framework.sms.core.client.SmsClientFactory
;
...
...
@@ -223,8 +222,8 @@ public class SmsNodeServiceImpl extends AbstractService<SmsNodeMapper, SmsNodeDO
}
@Override
public
PageResult
<
SmsNodeDO
>
getSmsNodePage
(
SmsNodeQueryVO
query
,
PageVO
page
)
{
return
smsNodeMapper
.
selectPage
(
page
,
query
);
public
PageResult
<
SmsNodeDO
>
getSmsNodePage
(
SmsNodeQueryVO
query
)
{
return
smsNodeMapper
.
selectPage
(
query
);
}
@Override
...
...
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