This commit is contained in:
wangh 2024-03-05 16:59:54 +08:00
commit e745341b4a
4 changed files with 16 additions and 1 deletions

View File

@ -165,7 +165,7 @@
</el-radio-group>
<!-- <p v-if="form.type == 2" style="color: red">洗车卡为不限次数卡,仅在有效期内可用,如按次数,请选择洗车券</p>-->
</el-form-item>
<el-form-item label="选择兑换商品" prop="giftId">
<el-form-item label="选择兑换商品" prop="giftId" v-if="form.type==0">
<!-- <el-input type="textarea" v-model="form.giftName" placeholder="请输入兑换礼品名"></el-input>-->
<el-select v-model="form.giftId" placeholder="请选择" @change="change" >
<el-option

View File

@ -89,5 +89,15 @@ public class ActiveOneCouponController extends BaseController {
return getSuccessResult(this.activeOneCouponService.removeByIds(idList));
}
/**
* 删除数据
* @param id
* @return
*/
@DeleteMapping("/delById/{id}")
public ResponseObject deleteById(@PathVariable Long id) {
return getSuccessResult(this.activeOneCouponService.removeById(id));
}
}

View File

@ -18,6 +18,7 @@ import java.io.IOException;
import java.io.Serializable;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -95,6 +96,7 @@ public class CardGiftController extends BaseController {
*/
@PutMapping
public ResponseObject update(@RequestBody CardGift cardGift) {
cardGift.setSailTime(new Date());
return getSuccessResult(this.cardGiftService.updateById(cardGift));
}

View File

@ -159,6 +159,9 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
if(ObjectUtils.isNotEmpty(cardGift.getSailStatus())) {
queryWrapper.eq(CardGift::getSailStatus,cardGift.getSailStatus());
}
if(ObjectUtils.isNotEmpty(cardGift.getActivateStatus())) {
queryWrapper.eq(CardGift::getActivateStatus,cardGift.getActivateStatus());
}
if(ObjectUtils.isNotEmpty(cardGift.getCardAmount())) {
queryWrapper.eq(CardGift::getCardAmount,cardGift.getCardAmount());
}