|
@@ -38,6 +38,7 @@ import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -330,6 +331,15 @@ public class BizPaymentController extends BaseController {
|
|
public AjaxResult verified(@RequestBody BizPayment payment) {
|
|
public AjaxResult verified(@RequestBody BizPayment payment) {
|
|
try {
|
|
try {
|
|
payment.setVerifyDate(payment.getVerifyDate() == null ? DateTime.now().toTimestamp() : payment.getVerifyDate());
|
|
payment.setVerifyDate(payment.getVerifyDate() == null ? DateTime.now().toTimestamp() : payment.getVerifyDate());
|
|
|
|
+ if(!CollectionUtils.isEmpty(payment.getEvidenceFiles())){
|
|
|
|
+ List<SysFileStorage> fileStorageList = payment.getEvidenceFiles();
|
|
|
|
+ fileStorageList.forEach(l -> {
|
|
|
|
+ l.setId(l.getId() == null || l.getId().equals(0L) ? snowflakeIdWorker.nextId() : l.getId());
|
|
|
|
+ l.setMasterId(payment.getId());
|
|
|
|
+ l.setMasterTableName("biz_payment");
|
|
|
|
+ });
|
|
|
|
+ fileStorageService.saveBatch(fileStorageList);
|
|
|
|
+ }
|
|
return paymentService.saveOrUpdate(payment) ? success(payment) : error();
|
|
return paymentService.saveOrUpdate(payment) ? success(payment) : error();
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw new ServiceException(e.getMessage());
|
|
throw new ServiceException(e.getMessage());
|