Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
ops
Commits
0458c76e
Commit
0458c76e
authored
Sep 03, 2024
by
wujipeng
Browse files
查询合同详情
parent
d7468f3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/ruzhoukj/sms/controller/ContractController.java
View file @
0458c76e
...
@@ -54,4 +54,10 @@ public class ContractController {
...
@@ -54,4 +54,10 @@ public class ContractController {
public
Result
updateContract
(
@RequestBody
ContractDTO
contractDTO
)
{
public
Result
updateContract
(
@RequestBody
ContractDTO
contractDTO
)
{
return
Result
.
success
(
contractService
.
updateContract
(
contractDTO
));
return
Result
.
success
(
contractService
.
updateContract
(
contractDTO
));
}
}
@ApiOperation
(
value
=
"详情"
)
@GetMapping
(
"/{id}"
)
public
Result
getContract
(
@PathVariable
String
id
)
{
return
Result
.
success
(
contractService
.
getContract
(
id
));
}
}
}
src/main/java/com/ruzhoukj/sms/service/ContractService.java
View file @
0458c76e
...
@@ -53,4 +53,12 @@ public interface ContractService extends IService<ContractEntity> {
...
@@ -53,4 +53,12 @@ public interface ContractService extends IService<ContractEntity> {
* @return Boolean
* @return Boolean
*/
*/
int
updateContract
(
ContractDTO
contractDTO
);
int
updateContract
(
ContractDTO
contractDTO
);
/**
* 查询合同详情
*
* @param id id
* @return ContractVO
*/
ContractVO
getContract
(
String
id
);
}
}
src/main/java/com/ruzhoukj/sms/service/impl/ContractServiceImpl.java
View file @
0458c76e
...
@@ -80,4 +80,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity
...
@@ -80,4 +80,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity
public
int
updateContract
(
ContractDTO
contractDTO
)
{
public
int
updateContract
(
ContractDTO
contractDTO
)
{
return
baseMapper
.
updateById
(
BeanUtil
.
copyProperties
(
contractDTO
,
ContractEntity
.
class
));
return
baseMapper
.
updateById
(
BeanUtil
.
copyProperties
(
contractDTO
,
ContractEntity
.
class
));
}
}
@Override
public
ContractVO
getContract
(
String
id
)
{
return
BeanUtil
.
copyProperties
(
baseMapper
.
selectById
(
id
),
ContractVO
.
class
);
}
}
}
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