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
d7468f3d
Commit
d7468f3d
authored
Sep 03, 2024
by
wujipeng
Browse files
更新合同
parent
e410e003
Changes
3
Show whitespace changes
Inline
Side-by-side
src/main/java/com/ruzhoukj/sms/controller/ContractController.java
View file @
d7468f3d
...
@@ -49,5 +49,9 @@ public class ContractController {
...
@@ -49,5 +49,9 @@ public class ContractController {
return
Result
.
success
(
contractService
.
deleteContract
(
id
));
return
Result
.
success
(
contractService
.
deleteContract
(
id
));
}
}
@ApiOperation
(
value
=
"更新"
)
@PostMapping
(
"/update"
)
public
Result
updateContract
(
@RequestBody
ContractDTO
contractDTO
)
{
return
Result
.
success
(
contractService
.
updateContract
(
contractDTO
));
}
}
}
src/main/java/com/ruzhoukj/sms/service/ContractService.java
View file @
d7468f3d
...
@@ -45,4 +45,12 @@ public interface ContractService extends IService<ContractEntity> {
...
@@ -45,4 +45,12 @@ public interface ContractService extends IService<ContractEntity> {
* @return Boolean
* @return Boolean
*/
*/
Boolean
deleteContract
(
String
id
);
Boolean
deleteContract
(
String
id
);
/**
* 更新合同
*
* @param contractDTO contractDTO
* @return Boolean
*/
int
updateContract
(
ContractDTO
contractDTO
);
}
}
src/main/java/com/ruzhoukj/sms/service/impl/ContractServiceImpl.java
View file @
d7468f3d
...
@@ -75,4 +75,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity
...
@@ -75,4 +75,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity
}
}
return
this
.
removeById
(
id
);
return
this
.
removeById
(
id
);
}
}
@Override
public
int
updateContract
(
ContractDTO
contractDTO
)
{
return
baseMapper
.
updateById
(
BeanUtil
.
copyProperties
(
contractDTO
,
ContractEntity
.
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