From 32f823f3109fe7c4a2e5967150476ecd9346b783 Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 2 Mar 2024 18:16:54 +0800 Subject: [PATCH] fix --- .../market/WxCashBackActivityController.java | 10 +++++----- .../controller/WxCashBackActivityController.java | 9 ++++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCashBackActivityController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCashBackActivityController.java index b23c16edf..a1b39a1fa 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCashBackActivityController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCashBackActivityController.java @@ -237,7 +237,7 @@ public class WxCashBackActivityController extends BaseController { return new ResultData(activity); } - @ApiOperation("新增修改接口") + @ApiOperation("审核") @PostMapping("recordAudit") public ResultData recordAudit(@RequestBody WxCashBackActivityRecord wxCashBackActivityRecord) { TenantEntity tenantEntity = getTenantInfo(); @@ -246,16 +246,16 @@ public class WxCashBackActivityController extends BaseController { return new ResultData(); } - @ApiOperation("新增修改接口") + @ApiOperation("计算金额") @PostMapping("calRecordMoney") public ResultData calRecordMoney(@RequestBody WxCashBackActivityRecord wxCashBackActivityRecord) { TenantEntity tenantEntity = getTenantInfo(); wxCashBackActivityRecord.updateTenantInfo(tenantEntity); - wxCashBackActivityService.auditRecord(wxCashBackActivityRecord); + wxCashBackActivityService.calcuteMoney(wxCashBackActivityRecord); return new ResultData(wxCashBackActivityRecord); } - @ApiOperation("查询当前提现信息") + @ApiOperation("当前统计") @GetMapping("total") public ResultData total() { TenantEntity tenantInfo = getTenantInfo(); @@ -277,7 +277,7 @@ public class WxCashBackActivityController extends BaseController { return new ResultData(retMap); } - @ApiOperation("查询当前提现信息") + @ApiOperation("商户统计") @GetMapping("activityMerchantTotal") public ResultData activityMerchantTotal(@ModelAttribute WxCashBackActivityRecord wxCashBackActivityRecord) { if (null == wxCashBackActivityRecord.getActivityId()) { diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxCashBackActivityController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxCashBackActivityController.java index 21eab5a51..8fe0c89cd 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxCashBackActivityController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxCashBackActivityController.java @@ -167,7 +167,7 @@ public class WxCashBackActivityController extends BaseController { } @ApiOperation("新增修改接口") - @PostMapping("saveOrUpdate") + @PostMapping("saveOrUpdateRecord") public ResultData saveOrUpdate(@RequestBody WxCashBackActivityRecord wxCashBackActivityRecord) { if (null == wxCashBackActivityRecord.getOrderMoney() ) { @@ -175,6 +175,13 @@ public class WxCashBackActivityController extends BaseController { } TenantEntity tenantEntity = getTenantInfo(); wxCashBackActivityRecord.updateTenantInfo(tenantEntity); + WxCashBackActivity a = wxCashBackActivityService.getActivityById(wxCashBackActivityRecord.getActivityId(), tenantEntity.getTenantId()); + if (null == a) { + return new ResultData(Result.ERROR,"参数错误"); + } + if (wxCashBackActivityRecord.getOrderMoney().compareTo(a.getLimitMoney()) < 0) { + return new ResultData(Result.ERROR,"该金额低于活动标准"); + } wxCashBackActivityService.saveOrUpdateRecord(wxCashBackActivityRecord); return new ResultData(); }