winter 2 лет назад
Родитель
Сommit
32f823f310
2 измененных файлов: 13 добавлений и 6 удалений
  1. +5
    -5
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCashBackActivityController.java
  2. +8
    -1
      mallinkBApi/src/main/java/com/iformall/controller/WxCashBackActivityController.java

+ 5
- 5
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()) {


+ 8
- 1
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();
}


Загрузка…
Отмена
Сохранить