Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
d0e204b8
Commit
d0e204b8
authored
Jun 29, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加修改,添加接口
parent
acfc56ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
FireStationController.java
...boot/module/jcs/biz/controller/FireStationController.java
+2
-2
FireStationServiceImpl.java
...t/module/jcs/biz/service/impl/FireStationServiceImpl.java
+12
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FireStationController.java
View file @
d0e204b8
...
@@ -41,7 +41,7 @@ public class FireStationController extends BaseController {
...
@@ -41,7 +41,7 @@ public class FireStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增微型消防站"
,
notes
=
"新增微型消防站"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增微型消防站"
,
notes
=
"新增微型消防站"
)
public
ResponseModel
<
FireStationDto
>
save
(
@RequestBody
FireStationDto
model
)
public
ResponseModel
<
FireStationDto
>
save
(
@RequestBody
FireStationDto
model
)
{
{
model
=
fireStationServiceImpl
.
createWithModel
(
model
);
model
=
fireStationServiceImpl
.
add
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
}
/**
/**
...
@@ -54,7 +54,7 @@ public class FireStationController extends BaseController {
...
@@ -54,7 +54,7 @@ public class FireStationController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新微型消防站"
,
notes
=
"根据sequenceNbr更新微型消防站"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新微型消防站"
,
notes
=
"根据sequenceNbr更新微型消防站"
)
public
ResponseModel
<
FireStationDto
>
updateBySequenceNbrFireStation
(
@RequestBody
FireStationDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
FireStationDto
>
updateBySequenceNbrFireStation
(
@RequestBody
FireStationDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
fireStationServiceImpl
.
updateWithModel
(
model
));
return
ResponseHelper
.
buildResponse
(
fireStationServiceImpl
.
Update
(
model
));
}
}
/**
/**
* 根据sequenceNbr删除
* 根据sequenceNbr删除
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireStationServiceImpl.java
View file @
d0e204b8
...
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
...
@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.FireStationDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.FireStationDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FireStation
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FireStation
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.FireStationMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.FireStationMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFireStationService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFireStationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -25,7 +27,8 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
...
@@ -25,7 +27,8 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
@Autowired
@Autowired
FireStationMapper
fireStationMapper
;
FireStationMapper
fireStationMapper
;
@Autowired
OrgUsrMapper
orgUsrMapper
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -61,7 +64,11 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
...
@@ -61,7 +64,11 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
*
*
* ***/
* ***/
public
FireStationDto
add
(
FireStationDto
model
)
{
public
FireStationDto
add
(
FireStationDto
model
)
{
FireStation
entity
=
this
.
prepareEntity
(
model
);
FireStation
entity
=
this
.
prepareEntity
(
model
);
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
model
.
getBizCompanyId
());
model
.
setBizCompany
(
orgUsr
.
getBizOrgName
());
model
.
setBizCompanyCode
(
orgUsr
.
getBizOrgCode
());
this
.
save
(
entity
);
this
.
save
(
entity
);
return
Bean
.
toModel
(
entity
,
model
);
return
Bean
.
toModel
(
entity
,
model
);
}
}
...
@@ -72,6 +79,9 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
...
@@ -72,6 +79,9 @@ public class FireStationServiceImpl extends BaseService<FireStationDto,FireStati
* ***/
* ***/
public
FireStationDto
Update
(
FireStationDto
model
)
{
public
FireStationDto
Update
(
FireStationDto
model
)
{
FireStation
entity
=
this
.
prepareEntity
(
model
);
FireStation
entity
=
this
.
prepareEntity
(
model
);
OrgUsr
orgUsr
=
orgUsrMapper
.
selectById
(
model
.
getBizCompanyId
());
model
.
setBizCompany
(
orgUsr
.
getBizOrgName
());
model
.
setBizCompanyCode
(
orgUsr
.
getBizOrgCode
());
this
.
updateById
(
entity
);
this
.
updateById
(
entity
);
return
Bean
.
toModel
(
entity
,
model
);
return
Bean
.
toModel
(
entity
,
model
);
}
}
...
...
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