From 243041ced915f5730630a5db8b903f7e38b0dc04 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: Wed, 8 Nov 2023 17:08:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=98=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CardFavorableController.java | 7 +- .../CardFavorableRecordController.java | 4 +- .../cardFavorable/dto/CardFavorableDTO.java | 381 ++++++++++++++++++ .../cardFavorable/entity/CardFavorable.java | 81 +++- .../entity/CardFavorableRecord.java | 15 + .../mapper/CardFavorableRecordMapper.java | 4 +- .../mapper/xml/CardFavorableRecordMapper.xml | 9 +- .../service/CardFavorableRecordService.java | 4 +- .../service/CardFavorableService.java | 13 +- .../impl/CardFavorableRecordServiceImpl.java | 10 +- .../impl/CardFavorableServiceImpl.java | 40 +- .../cardFavorable/vo/CardFavorableVO.java | 381 ++++++++++++++++++ 12 files changed, 916 insertions(+), 33 deletions(-) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/dto/CardFavorableDTO.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/vo/CardFavorableVO.java diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/controller/CardFavorableController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/controller/CardFavorableController.java index 85fc2a90c..f434dd4c1 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/controller/CardFavorableController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/controller/CardFavorableController.java @@ -4,6 +4,7 @@ package com.fuint.business.marketingActivity.cardFavorable.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTO; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService; import com.fuint.framework.web.BaseController; @@ -53,7 +54,7 @@ public class CardFavorableController extends BaseController { */ @GetMapping("{id}") public ResponseObject selectOne(@PathVariable Serializable id) { - return getSuccessResult(this.cardFavorableService.getById(id)); + return getSuccessResult(this.cardFavorableService.selectOneById(id)); } /** @@ -63,8 +64,8 @@ public class CardFavorableController extends BaseController { * @return 新增结果 */ @PostMapping - public ResponseObject insert(@RequestBody CardFavorable cardFavorable) { - return getSuccessResult(this.cardFavorableService.add(cardFavorable)); + public ResponseObject insert(@RequestBody CardFavorableDTO cardFavorableDTO) { + return getSuccessResult(this.cardFavorableService.add(cardFavorableDTO)); } /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/controller/CardFavorableRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/controller/CardFavorableRecordController.java index fcfb421d5..7a0d75a7b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/controller/CardFavorableRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/controller/CardFavorableRecordController.java @@ -93,8 +93,8 @@ public class CardFavorableRecordController extends BaseController { * @return */ @GetMapping("count") - public ResponseObject selectCount() { - return getSuccessResult(this.cardFavorableRecordService.selectCount()); + public ResponseObject selectCount(@Param("cardFuelDiesel") CardFavorableRecord cardFavorableRecord) { + return getSuccessResult(this.cardFavorableRecordService.selectCount(cardFavorableRecord)); } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/dto/CardFavorableDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/dto/CardFavorableDTO.java new file mode 100644 index 000000000..4dbd541cf --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/dto/CardFavorableDTO.java @@ -0,0 +1,381 @@ +package com.fuint.business.marketingActivity.cardFavorable.dto; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; + +import java.io.Serializable; +import java.util.Date; + +/** + * (CardFavorable)表实体类 + * + * @author makejava + * @since 2023-11-07 11:02:06 + */ +@SuppressWarnings("serial") +public class CardFavorableDTO extends Model { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //所属连锁店id + private Integer chainStorId; + //所属店铺id + private Integer storeId; + //是否在线 0:在线 1: 下线 + private String isonline; + //优惠券名称 + private String name; + //卡券类型 0:油品券 1:商品券 2:通用券 + private String type; + //优惠类型 0:满减券 1:折扣券 + private String discountType; + //可用油品 0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0# + private String[] oilType; + private String oilTypes; + //满减金额 + private Double fullDeduction; + //优惠金额 + private Double discountAmount; + //满足金额 + private Double satisfiedAmount; + //优惠折扣 + private Double specialDiscount; + //折扣抵消 + private Double discountOffset; + //生效日期类型 0 ,1,2 + private String timeType; + //有效期0 + private Integer validityZero; + //有效期1 + private Integer validityOne; + //有效期2 + private Integer validityTwo; + //固定有效期开始日期 + private Date effectiveDate; + //领券后第几天生效 + private String validityDay; + //生效时间类型 0:领取时间 1:指定时间 + private String effectiveDateType; + //生效时间 + private Date effectiveDateStart; + //可用时段 + private String[] availablePeriod; + //可用周期类型 day:每天可用 week:周可用 month:月可用 + private String checkDateType; + //可用日期 + private String checkTime; + //排除日期 + private Date checkOutTime; + //互斥功能 0:满减活动 1:储值卡付款 + private String exclusiveFunction; + //领取规则 0:每人限领一张 1:每人每日限领一张 + private String claimRule; + //发放数量 + private Integer count; + //二维码链接 + private String qrCodeLink; + //优惠券状态 0:启用 1: 禁用 + private String status; + //创建者 + private String createBy; + //创建时间 + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + private Date updateTime; + + public String[] getOilType() { + return oilType; + } + + public void setOilType(String[] oilType) { + this.oilType = oilType; + } + + public String getOilTypes() { + return oilTypes; + } + + public void setOilTypes(String oilTypes) { + this.oilTypes = oilTypes; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getEffectiveDateType() { + return effectiveDateType; + } + + public void setEffectiveDateType(String effectiveDateType) { + this.effectiveDateType = effectiveDateType; + } + + public Date getEffectiveDateStart() { + return effectiveDateStart; + } + + public void setEffectiveDateStart(Date effectiveDateStart) { + this.effectiveDateStart = effectiveDateStart; + } + + public String getIsonline() { + return isonline; + } + + public void setIsonline(String isonline) { + this.isonline = isonline; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getDiscountType() { + return discountType; + } + + public void setDiscountType(String discountType) { + this.discountType = discountType; + } + + + + public Double getFullDeduction() { + return fullDeduction; + } + + public void setFullDeduction(Double fullDeduction) { + this.fullDeduction = fullDeduction; + } + + public Double getDiscountAmount() { + return discountAmount; + } + + public void setDiscountAmount(Double discountAmount) { + this.discountAmount = discountAmount; + } + + public Double getSatisfiedAmount() { + return satisfiedAmount; + } + + public void setSatisfiedAmount(Double satisfiedAmount) { + this.satisfiedAmount = satisfiedAmount; + } + + public Double getSpecialDiscount() { + return specialDiscount; + } + + public void setSpecialDiscount(Double specialDiscount) { + this.specialDiscount = specialDiscount; + } + + public Double getDiscountOffset() { + return discountOffset; + } + + public void setDiscountOffset(Double discountOffset) { + this.discountOffset = discountOffset; + } + + public String getTimeType() { + return timeType; + } + + public void setTimeType(String timeType) { + this.timeType = timeType; + } + + public Integer getValidityZero() { + return validityZero; + } + + public void setValidityZero(Integer validityZero) { + this.validityZero = validityZero; + } + + public Integer getValidityOne() { + return validityOne; + } + + public void setValidityOne(Integer validityOne) { + this.validityOne = validityOne; + } + + public Integer getValidityTwo() { + return validityTwo; + } + + public void setValidityTwo(Integer validityTwo) { + this.validityTwo = validityTwo; + } + + public Date getEffectiveDate() { + return effectiveDate; + } + + public void setEffectiveDate(Date effectiveDate) { + this.effectiveDate = effectiveDate; + } + + public String getValidityDay() { + return validityDay; + } + + public void setValidityDay(String validityDay) { + this.validityDay = validityDay; + } + + public String[] getAvailablePeriod() { + return availablePeriod; + } + + public void setAvailablePeriod(String[] availablePeriod) { + this.availablePeriod = availablePeriod; + } + + public String getCheckDateType() { + return checkDateType; + } + + public void setCheckDateType(String checkDateType) { + this.checkDateType = checkDateType; + } + + public String getCheckTime() { + return checkTime; + } + + public void setCheckTime(String checkTime) { + this.checkTime = checkTime; + } + + public Date getCheckOutTime() { + return checkOutTime; + } + + public void setCheckOutTime(Date checkOutTime) { + this.checkOutTime = checkOutTime; + } + + public String getExclusiveFunction() { + return exclusiveFunction; + } + + public void setExclusiveFunction(String exclusiveFunction) { + this.exclusiveFunction = exclusiveFunction; + } + + public String getClaimRule() { + return claimRule; + } + + public void setClaimRule(String claimRule) { + this.claimRule = claimRule; + } + + public Integer getCount() { + return count; + } + + public void setCount(Integer count) { + this.count = count; + } + + public String getQrCodeLink() { + return qrCodeLink; + } + + public void setQrCodeLink(String qrCodeLink) { + this.qrCodeLink = qrCodeLink; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorable.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorable.java index 79d915c24..36b645be3 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorable.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorable.java @@ -42,12 +42,22 @@ public class CardFavorable extends Model { private Double specialDiscount; //折扣抵消 private Double discountOffset; - //有效期 - private Integer validity; - //生效日期 - private String effectiveDate; + //生效日期类型 0 ,1,2 + private String timeType; + //有效期0 + private Integer validityZero; + //有效期1 + private Integer validityOne; + //有效期2 + private Integer validityTwo; + //固定有效期开始日期 + private Date effectiveDate; + //领券后第几天生效 + private String validityDay; + //生效时间类型 0:领取时间 1:指定时间 + private String effectiveDateType; //生效时间 - private String effectiveTime; + private Date effectiveDateStart; //可用时段 private String availablePeriod; //可用周期类型 day:每天可用 week:周可用 month:月可用 @@ -100,6 +110,22 @@ public class CardFavorable extends Model { this.storeId = storeId; } + public String getEffectiveDateType() { + return effectiveDateType; + } + + public void setEffectiveDateType(String effectiveDateType) { + this.effectiveDateType = effectiveDateType; + } + + public Date getEffectiveDateStart() { + return effectiveDateStart; + } + + public void setEffectiveDateStart(Date effectiveDateStart) { + this.effectiveDateStart = effectiveDateStart; + } + public String getIsonline() { return isonline; } @@ -132,6 +158,7 @@ public class CardFavorable extends Model { this.discountType = discountType; } + public String getOilType() { return oilType; } @@ -180,28 +207,52 @@ public class CardFavorable extends Model { this.discountOffset = discountOffset; } - public Integer getValidity() { - return validity; + public String getTimeType() { + return timeType; } - public void setValidity(Integer validity) { - this.validity = validity; + public void setTimeType(String timeType) { + this.timeType = timeType; } - public String getEffectiveDate() { + public Integer getValidityZero() { + return validityZero; + } + + public void setValidityZero(Integer validityZero) { + this.validityZero = validityZero; + } + + public Integer getValidityOne() { + return validityOne; + } + + public void setValidityOne(Integer validityOne) { + this.validityOne = validityOne; + } + + public Integer getValidityTwo() { + return validityTwo; + } + + public void setValidityTwo(Integer validityTwo) { + this.validityTwo = validityTwo; + } + + public Date getEffectiveDate() { return effectiveDate; } - public void setEffectiveDate(String effectiveDate) { + public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; } - public String getEffectiveTime() { - return effectiveTime; + public String getValidityDay() { + return validityDay; } - public void setEffectiveTime(String effectiveTime) { - this.effectiveTime = effectiveTime; + public void setValidityDay(String validityDay) { + this.validityDay = validityDay; } public String getAvailablePeriod() { diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorableRecord.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorableRecord.java index 98946b7e3..217f4ca92 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorableRecord.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/entity/CardFavorableRecord.java @@ -5,6 +5,8 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.fasterxml.jackson.annotation.JsonFormat; + import java.io.Serializable; /** @@ -22,6 +24,8 @@ public class CardFavorableRecord extends Model { private Integer mtUserId; //所属连锁店id private Integer chainStorId; + //优惠券id + private Integer cardFavorableId; //所属店铺id private Integer storeId; //会员名字 @@ -33,14 +37,17 @@ public class CardFavorableRecord extends Model { //券状态 0:未使用 1:已使用 private String status; //有效期开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date startTime; //有效期结束时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date endTime; //描述信息 private String exchangeFrom; //创建者 private String createBy; //创建时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; //更新者 private String updateBy; @@ -72,6 +79,14 @@ public class CardFavorableRecord extends Model { this.chainStorId = chainStorId; } + public Integer getCardFavorableId() { + return cardFavorableId; + } + + public void setCardFavorableId(Integer cardFavorableId) { + this.cardFavorableId = cardFavorableId; + } + public Integer getStoreId() { return storeId; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/CardFavorableRecordMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/CardFavorableRecordMapper.java index 2a408de90..c8254584e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/CardFavorableRecordMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/CardFavorableRecordMapper.java @@ -2,7 +2,7 @@ package com.fuint.business.marketingActivity.cardFavorable.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord; - +import org.apache.ibatis.annotations.Param; import java.util.HashMap; /** @@ -16,7 +16,7 @@ public interface CardFavorableRecordMapper extends BaseMapper selectTotal(Integer storeId); + HashMap selectTotal(@Param("storeId")Integer storeId,@Param("id")Integer id); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml index fc1549627..a48f0f07a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml @@ -6,17 +6,18 @@ SELECT count( id ) tatol, ( SELECT count( id ) FROM card_favorable_record - WHERE store_id = #{store_id} + WHERE store_id = #{storeId} and status = "0" ) unTatal, ( SELECT count( id ) FROM card_favorable_record - WHERE store_id = #{store_id} + WHERE store_id = #{storeId} and status = "1" ) usedTatal, ( SELECT count( id ) FROM card_favorable_record - WHERE store_id = #{store_id} + WHERE store_id = #{storeId} and status = "2" ) outTatal FROM card_favorable_record - where store_id = #{store_id} + where store_id = #{storeId} + and card_favorable_id = #{id} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableRecordService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableRecordService.java index c42a3413d..ce1deec1d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableRecordService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableRecordService.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord; +import java.io.Serializable; import java.util.Map; /** @@ -27,6 +28,7 @@ public interface CardFavorableRecordService extends IService selectCount(); + Map selectCount(CardFavorableRecord cardFavorableRecord); + } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableService.java index 1de6dde08..4dbe646fd 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/CardFavorableService.java @@ -3,7 +3,11 @@ package com.fuint.business.marketingActivity.cardFavorable.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTO; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable; +import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO; + +import java.io.Serializable; /** * (CardFavorable)表服务接口 @@ -18,7 +22,7 @@ public interface CardFavorableService extends IService { * @param cardFavorable * @return */ - Boolean add(CardFavorable cardFavorable); + Boolean add(CardFavorableDTO cardFavorableDTO); /** * 分页查询所有数据 @@ -27,5 +31,12 @@ public interface CardFavorableService extends IService { * @return */ IPage select(Page page, CardFavorable cardFavorable); + + /** + * 通过主键查询单条数据 + * @param id + * @return + */ + CardFavorableVO selectOneById(Serializable id); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java index 43e9a761a..e7df6810e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java @@ -13,6 +13,7 @@ import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.io.Serializable; import java.util.Date; import java.util.List; import java.util.Map; @@ -45,8 +46,11 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl selectCount() { + public Map selectCount(CardFavorableRecord cardFavorableRecord) { Integer storeId = TokenUtil.getNowAccountInfo().getStoreId(); - return cardFavorableRecordMapper.selectTotal(storeId); + return cardFavorableRecordMapper.selectTotal(storeId,cardFavorableRecord.getId()); } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java index b70ad95d6..ee34e9a67 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java @@ -4,15 +4,19 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.cardFavorable.dto.CardFavorableDTO; import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableMapper; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService; +import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO; import com.fuint.business.store.service.StoreService; import com.fuint.common.util.TokenUtil; import org.apache.commons.lang3.ObjectUtils; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.io.Serializable; /** * (CardFavorable)表服务实现类 @@ -27,16 +31,31 @@ public class CardFavorableServiceImpl extends ServiceImpl { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //所属连锁店id + private Integer chainStorId; + //所属店铺id + private Integer storeId; + //是否在线 0:在线 1: 下线 + private String isonline; + //优惠券名称 + private String name; + //卡券类型 0:油品券 1:商品券 2:通用券 + private String type; + //优惠类型 0:满减券 1:折扣券 + private String discountType; + //可用油品 0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0# + private String[] oilType; + private String oilTypes; + //满减金额 + private Double fullDeduction; + //优惠金额 + private Double discountAmount; + //满足金额 + private Double satisfiedAmount; + //优惠折扣 + private Double specialDiscount; + //折扣抵消 + private Double discountOffset; + //生效日期类型 0 ,1,2 + private String timeType; + //有效期0 + private Integer validityZero; + //有效期1 + private Integer validityOne; + //有效期2 + private Integer validityTwo; + //固定有效期开始日期 + private Date effectiveDate; + //领券后第几天生效 + private String validityDay; + //生效时间类型 0:领取时间 1:指定时间 + private String effectiveDateType; + //生效时间 + private Date effectiveDateStart; + //可用时段 + private String[] availablePeriod; + //可用周期类型 day:每天可用 week:周可用 month:月可用 + private String checkDateType; + //可用日期 + private String checkTime; + //排除日期 + private Date checkOutTime; + //互斥功能 0:满减活动 1:储值卡付款 + private String exclusiveFunction; + //领取规则 0:每人限领一张 1:每人每日限领一张 + private String claimRule; + //发放数量 + private Integer count; + //二维码链接 + private String qrCodeLink; + //优惠券状态 0:启用 1: 禁用 + private String status; + //创建者 + private String createBy; + //创建时间 + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + private Date updateTime; + + public String[] getOilType() { + return oilType; + } + + public void setOilType(String[] oilType) { + this.oilType = oilType; + } + + public String getOilTypes() { + return oilTypes; + } + + public void setOilTypes(String oilTypes) { + this.oilTypes = oilTypes; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getEffectiveDateType() { + return effectiveDateType; + } + + public void setEffectiveDateType(String effectiveDateType) { + this.effectiveDateType = effectiveDateType; + } + + public Date getEffectiveDateStart() { + return effectiveDateStart; + } + + public void setEffectiveDateStart(Date effectiveDateStart) { + this.effectiveDateStart = effectiveDateStart; + } + + public String getIsonline() { + return isonline; + } + + public void setIsonline(String isonline) { + this.isonline = isonline; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getDiscountType() { + return discountType; + } + + public void setDiscountType(String discountType) { + this.discountType = discountType; + } + + + + public Double getFullDeduction() { + return fullDeduction; + } + + public void setFullDeduction(Double fullDeduction) { + this.fullDeduction = fullDeduction; + } + + public Double getDiscountAmount() { + return discountAmount; + } + + public void setDiscountAmount(Double discountAmount) { + this.discountAmount = discountAmount; + } + + public Double getSatisfiedAmount() { + return satisfiedAmount; + } + + public void setSatisfiedAmount(Double satisfiedAmount) { + this.satisfiedAmount = satisfiedAmount; + } + + public Double getSpecialDiscount() { + return specialDiscount; + } + + public void setSpecialDiscount(Double specialDiscount) { + this.specialDiscount = specialDiscount; + } + + public Double getDiscountOffset() { + return discountOffset; + } + + public void setDiscountOffset(Double discountOffset) { + this.discountOffset = discountOffset; + } + + public String getTimeType() { + return timeType; + } + + public void setTimeType(String timeType) { + this.timeType = timeType; + } + + public Integer getValidityZero() { + return validityZero; + } + + public void setValidityZero(Integer validityZero) { + this.validityZero = validityZero; + } + + public Integer getValidityOne() { + return validityOne; + } + + public void setValidityOne(Integer validityOne) { + this.validityOne = validityOne; + } + + public Integer getValidityTwo() { + return validityTwo; + } + + public void setValidityTwo(Integer validityTwo) { + this.validityTwo = validityTwo; + } + + public Date getEffectiveDate() { + return effectiveDate; + } + + public void setEffectiveDate(Date effectiveDate) { + this.effectiveDate = effectiveDate; + } + + public String getValidityDay() { + return validityDay; + } + + public void setValidityDay(String validityDay) { + this.validityDay = validityDay; + } + + public String[] getAvailablePeriod() { + return availablePeriod; + } + + public void setAvailablePeriod(String[] availablePeriod) { + this.availablePeriod = availablePeriod; + } + + public String getCheckDateType() { + return checkDateType; + } + + public void setCheckDateType(String checkDateType) { + this.checkDateType = checkDateType; + } + + public String getCheckTime() { + return checkTime; + } + + public void setCheckTime(String checkTime) { + this.checkTime = checkTime; + } + + public Date getCheckOutTime() { + return checkOutTime; + } + + public void setCheckOutTime(Date checkOutTime) { + this.checkOutTime = checkOutTime; + } + + public String getExclusiveFunction() { + return exclusiveFunction; + } + + public void setExclusiveFunction(String exclusiveFunction) { + this.exclusiveFunction = exclusiveFunction; + } + + public String getClaimRule() { + return claimRule; + } + + public void setClaimRule(String claimRule) { + this.claimRule = claimRule; + } + + public Integer getCount() { + return count; + } + + public void setCount(Integer count) { + this.count = count; + } + + public String getQrCodeLink() { + return qrCodeLink; + } + + public void setQrCodeLink(String qrCodeLink) { + this.qrCodeLink = qrCodeLink; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} +