Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-java
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PeiZhen-Java
peizhen-java
Commits
04b6487e
Commit
04b6487e
authored
Sep 22, 2023
by
邹磊浩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
e7041ffb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
pz-applet/src/main/java/com/pz/applet/AppletServicesController.java
+6
-1
pz-system/src/main/java/com/pz/system/service/impl/ServicesServiceImpl.java
+8
-10
No files found.
pz-applet/src/main/java/com/pz/applet/AppletServicesController.java
View file @
04b6487e
package
com
.
pz
.
applet
;
import
cn.dev33.satoken.annotation.SaCheckPermission
;
import
com.pz.applet.util.CityIdUtils
;
import
com.pz.common.annotation.Log
;
import
com.pz.common.annotation.RepeatSubmit
;
import
com.pz.common.core.controller.BaseController
;
...
...
@@ -18,6 +19,7 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
...
...
@@ -42,9 +44,12 @@ public class AppletServicesController extends BaseController {
* 查询服务列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
<
ServicesVo
>
list
(
ServicesBo
bo
,
PageQuery
pageQuery
)
{
public
TableDataInfo
<
ServicesVo
>
list
(
ServicesBo
bo
,
PageQuery
pageQuery
,
HttpServletRequest
request
)
{
Integer
cityId
=
CityIdUtils
.
setCityIdPasInteger
(
request
);
bo
.
setCityId
(
cityId
);
return
iServicesService
.
queryPageList
(
bo
,
pageQuery
);
}
/**
* 获取服务详细信息
*
...
...
pz-system/src/main/java/com/pz/system/service/impl/ServicesServiceImpl.java
View file @
04b6487e
package
com
.
pz
.
system
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.pz.common.core.page.TableDataInfo
;
import
com.pz.common.core.domain.PageQuery
;
...
...
@@ -17,10 +18,7 @@ import com.pz.system.domain.Services;
import
com.pz.system.mapper.ServicesMapper
;
import
com.pz.system.service.IServicesService
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Collection
;
import
java.util.Optional
;
import
java.util.*
;
/**
* 服务Service业务层处理
...
...
@@ -40,7 +38,7 @@ public class ServicesServiceImpl implements IServicesService {
* 查询服务
*/
@Override
public
ServicesVo
queryById
(
Integer
id
){
public
ServicesVo
queryById
(
Integer
id
)
{
return
baseMapper
.
selectVoById
(
id
);
}
...
...
@@ -52,8 +50,8 @@ public class ServicesServiceImpl implements IServicesService {
LambdaQueryWrapper
<
Services
>
lqw
=
buildQueryWrapper
(
bo
);
Page
<
ServicesVo
>
result
=
baseMapper
.
selectVoPage
(
pageQuery
.
build
(),
lqw
);
Optional
.
ofNullable
(
result
.
getRecords
()).
ifPresent
(
records
->
{
List
<
Notice
>
notices
=
noticeMapper
.
selectList
(
new
LambdaQueryWrapper
<
Notice
>().
eq
(
Notice:
:
getSite
,
2
));
if
(
null
!=
notices
&&
notices
.
size
()
!=
0
)
{
List
<
Notice
>
notices
=
noticeMapper
.
selectList
(
new
LambdaQueryWrapper
<
Notice
>().
eq
(
Notice:
:
getSite
,
2
));
if
(
null
!=
notices
&&
notices
.
size
()
!=
0
)
{
records
.
get
(
0
).
setNotice
(
notices
.
get
(
0
).
getInfo
());
}
});
...
...
@@ -75,7 +73,7 @@ public class ServicesServiceImpl implements IServicesService {
lqw
.
eq
(
bo
.
getBid
()
!=
null
,
Services:
:
getBid
,
bo
.
getBid
());
lqw
.
like
(
StringUtils
.
isNotBlank
(
bo
.
getName
()),
Services:
:
getName
,
bo
.
getName
());
lqw
.
eq
(
StringUtils
.
isNotBlank
(
bo
.
getCover
()),
Services:
:
getCover
,
bo
.
getCover
());
lqw
.
eq
(
ObjectUtils
.
isNotEmpty
(
bo
.
getCityId
()),
Services:
:
getCityId
,
bo
.
getCityId
());
lqw
.
eq
(
bo
.
getFenmo
()
!=
null
,
Services:
:
getFenmo
,
bo
.
getFenmo
());
lqw
.
eq
(
bo
.
getDuration
()
!=
null
,
Services:
:
getDuration
,
bo
.
getDuration
());
lqw
.
eq
(
bo
.
getOvertime
()
!=
null
,
Services:
:
getOvertime
,
bo
.
getOvertime
());
...
...
@@ -112,7 +110,7 @@ public class ServicesServiceImpl implements IServicesService {
/**
* 保存前的数据校验
*/
private
void
validEntityBeforeSave
(
Services
entity
){
private
void
validEntityBeforeSave
(
Services
entity
)
{
//TODO 做一些数据校验,如唯一约束
}
...
...
@@ -121,7 +119,7 @@ public class ServicesServiceImpl implements IServicesService {
*/
@Override
public
Boolean
deleteWithValidByIds
(
Collection
<
Integer
>
ids
,
Boolean
isValid
)
{
if
(
isValid
)
{
if
(
isValid
)
{
//TODO 做一些业务上的校验,判断是否需要校验
}
return
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
...
...
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