Commit fa72d699 authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

Feature zhaji

See merge request fangxinjiang/yifu!174
parents c6ea911f 866b5cd2
......@@ -76,8 +76,8 @@ public class TInsuranceEnclosureController {
/**
* 删除商险附件
*
* @param id
* @return
* @param id 商险id
* @return R
* @Author zhaji
* @Date 2022-08-23
**/
......
......@@ -107,6 +107,9 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
*/
@Override
public R getInsuranceEnclosureUrl(String id) {
if(Common.isEmpty(id)){
return R.failed("附件id为空");
}
TInsuranceEnclosure insuranceEnclosure = getById(id);
if (null == insuranceEnclosure) {
return R.failed("无对应附件信息");
......@@ -126,11 +129,14 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
*/
@Override
public R deleteInsuranceEnclosure(String id) {
if(Common.isEmpty(id)){
return R.failed("附件id为空");
}
TInsuranceEnclosure insuranceEnclosure = getById(id);
if (null == insuranceEnclosure) {
return R.failed("无对应附件信息");
}
try {
TInsuranceEnclosure insuranceEnclosure = getById(id);
if (null == insuranceEnclosure) {
return R.failed("无对应附件信息");
}
if (removeById(id)) {
ossUtil.deleteObject(null, insuranceEnclosure.getEnclosureAddress());
return R.ok("删除成功!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment