Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
吴迪
gs1-office-web-sit
Commits
47f779ab
Commit
47f779ab
authored
May 15, 2022
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
048b8b2c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
16 deletions
+99
-16
PlanBranchController.java
...ffice/modules/manage/controller/PlanBranchController.java
+21
-11
PlanBranchDao.java
...main/java/io/office/modules/manage/dao/PlanBranchDao.java
+4
-2
PlanBranchService.java
...a/io/office/modules/manage/service/PlanBranchService.java
+4
-0
PlanBranchServiceImpl.java
...ce/modules/manage/service/impl/PlanBranchServiceImpl.java
+15
-3
PlanBranchVo.java
...ava/io/office/modules/manage/vo/request/PlanBranchVo.java
+22
-0
PlanBranchDao.xml
src/main/resources/mapper/manage/PlanBranchDao.xml
+33
-0
No files found.
src/main/java/io/office/modules/manage/controller/PlanBranchController.java
View file @
47f779ab
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.PlanBranchEntity
;
import
io.office.modules.manage.service.PlanBranchService
;
import
io.office.modules.manage.vo.request.PlanBranchVo
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.PlanBranchEntity
;
import
io.office.modules.manage.service.PlanBranchService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
java.util.Arrays
;
import
java.util.Map
;
/**
...
...
@@ -28,7 +26,7 @@ import io.office.common.utils.R;
*/
@RestController
@RequestMapping
(
"/planbranch"
)
public
class
PlanBranchController
{
public
class
PlanBranchController
extends
AbstractController
{
@Autowired
private
PlanBranchService
planBranchService
;
...
...
@@ -104,4 +102,16 @@ public class PlanBranchController {
@RequestMapping
(
"/batchUpdateStatus"
)
// @RequiresPermissions("manage:planbranch:delete")
public
R
batchUpdateStatus
(
@RequestBody
PlanBranchVo
planBranchVo
){
planBranchService
.
batchUpdateStatus
(
planBranchVo
,
getUser
());
return
R
.
ok
();
}
}
src/main/java/io/office/modules/manage/dao/PlanBranchDao.java
View file @
47f779ab
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.PlanBranchEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.PlanBranchEntity
;
import
io.office.modules.manage.vo.request.PlanBranchVo
;
import
org.apache.ibatis.annotations.Mapper
;
/**
...
...
@@ -13,5 +14,6 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public
interface
PlanBranchDao
extends
BaseMapper
<
PlanBranchEntity
>
{
void
batchUpdateStatus
(
PlanBranchVo
planBranchVo
);
}
src/main/java/io/office/modules/manage/service/PlanBranchService.java
View file @
47f779ab
...
...
@@ -3,6 +3,8 @@ package io.office.modules.manage.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.PlanBranchEntity
;
import
io.office.modules.manage.vo.request.PlanBranchVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
java.util.Map
;
...
...
@@ -16,5 +18,7 @@ import java.util.Map;
public
interface
PlanBranchService
extends
IService
<
PlanBranchEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
void
batchUpdateStatus
(
PlanBranchVo
planBranchVo
,
SysUserEntity
user
);
}
src/main/java/io/office/modules/manage/service/impl/PlanBranchServiceImpl.java
View file @
47f779ab
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.PlanBranchDao
;
import
io.office.modules.manage.entity.PlanBranchEntity
;
import
io.office.modules.manage.service.PlanBranchService
;
import
io.office.modules.manage.vo.request.PlanBranchVo
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Map
;
@Service
(
"planBranchService"
)
...
...
@@ -28,4 +31,12 @@ public class PlanBranchServiceImpl extends ServiceImpl<PlanBranchDao, PlanBranch
return
new
PageUtils
(
page
);
}
@Override
public
void
batchUpdateStatus
(
PlanBranchVo
planBranchVo
,
SysUserEntity
user
)
{
planBranchVo
.
setLasteditor
(
user
.
getUsername
());
planBranchVo
.
setUpdatetime
(
new
Date
());
baseMapper
.
batchUpdateStatus
(
planBranchVo
);
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/vo/request/PlanBranchVo.java
0 → 100644
View file @
47f779ab
package
io
.
office
.
modules
.
manage
.
vo
.
request
;
import
io.office.modules.manage.entity.PlanBranchEntity
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
*
* @description:
*
* @author wudi
* @date 21:05 2022/5/5
*/
@Data
public
class
PlanBranchVo
extends
PlanBranchEntity
implements
Serializable
{
private
List
<
String
>
ids
;
}
src/main/resources/mapper/manage/PlanBranchDao.xml
View file @
47f779ab
...
...
@@ -18,4 +18,36 @@
</resultMap>
<update
id=
"batchUpdateStatus"
parameterType=
"io.office.modules.manage.vo.request.PlanBranchVo"
>
update Plan_branch set updatetime = #{updatetime}
<if
test=
"state!=null and state!=''"
>
, state =#{state}
</if>
<if
test=
"lasteditor!=null and lasteditor!=''"
>
, lasteditor =#{lasteditor}
</if>
<if
test=
"ppath!=null"
>
, ppath =#{ppath}
</if>
<if
test=
"checkflag!=null and checkflag!=''"
>
, checkflag =#{checkflag}
</if>
<where>
<if
test=
"ids!=null and ids.size>0"
>
id in(
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
#{id}
</foreach>
)
</if>
</where>
</update>
</mapper>
\ No newline at end of file
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