From 805738c58446817b8a319e458ae466978f9828b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Thu, 7 Mar 2024 13:52:15 +0800 Subject: [PATCH] bug --- .../cardFule/controller/CardFuelDieselController.java | 8 ++++---- .../marketingActivity/cardGift/entity/CardGift.java | 2 ++ .../cardGift/service/impl/CardGiftServiceImpl.java | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java index ed8a7052b..60db42a60 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/controller/CardFuelDieselController.java @@ -127,12 +127,12 @@ public class CardFuelDieselController extends BaseController { /** * 删除数据 * - * @param idList 主键结合 + * @param id 主键结合 * @return 删除结果 */ - @DeleteMapping - public ResponseObject delete(@RequestParam("idList") List idList) { - return getSuccessResult(this.cardFuelDieselService.removeByIds(idList)); + @DeleteMapping("/{id}") + public ResponseObject delete(@PathVariable("id") Long id) { + return getSuccessResult(this.cardFuelDieselService.removeById(id)); } /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/entity/CardGift.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/entity/CardGift.java index 6db5a2eec..add99b221 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/entity/CardGift.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/entity/CardGift.java @@ -65,6 +65,8 @@ public class CardGift extends Model { //创建时间 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") private Date effectiveTimeStart; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") + private Date useTime; //创建时间 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") private Date effectiveTimeEnd; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java index 4926ccff1..2a9f7fc62 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java @@ -199,7 +199,7 @@ public class CardGiftServiceImpl extends ServiceImpl i queryWrapper.eq(CardGift::getActivateStatus,"0"); //验证兑换卡的卡密 CardGift one = getOne(queryWrapper); - if (!one.getSailStatus().equals("1")){ + if (one.getSailStatus().equals("1") || one.getUseStatus().equals("1")){ return cardGift; } if (ObjectUtils.isNotEmpty(one) && ObjectUtils.isNotEmpty(cardGift.getCardPassword()) && cardGift.getCardPassword().equals(one.getCardPassword())){ @@ -208,6 +208,7 @@ public class CardGiftServiceImpl extends ServiceImpl i String mobile = ljUserVo.getMobile(); one.setRemark("姓名:"+name+",手机号:"+mobile); one.setUseStatus("1"); + one.setUseTime(new Date()); updateById(one); //更新用户余额 Double cardAmount = one.getCardAmount();