diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/entity/CardExchange.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/entity/CardExchange.java index 1971723da..5cfe3416b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/entity/CardExchange.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/entity/CardExchange.java @@ -6,6 +6,7 @@ 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 lombok.Data; import java.io.Serializable; @@ -16,6 +17,7 @@ import java.io.Serializable; * @since 2023-11-06 14:14:17 */ @SuppressWarnings("serial") +@Data public class CardExchange extends Model { //主键id @TableId(type = IdType.AUTO) @@ -55,152 +57,5 @@ public class CardExchange extends Model { //更新时间 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date updateTime; - - - 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 getIsonline() { - return isonline; - } - - public void setIsonline(String isonline) { - this.isonline = isonline; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - 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 getGiftName() { - return giftName; - } - - public void setGiftName(String giftName) { - this.giftName = giftName; - } - - public Integer getValidity() { - return validity; - } - - public void setValidity(Integer validity) { - this.validity = validity; - } - - public String getUseInstructions() { - return useInstructions; - } - - public void setUseInstructions(String useInstructions) { - this.useInstructions = useInstructions; - } - - public String getQrCodeLink() { - return qrCodeLink; - } - - public void setQrCodeLink(String qrCodeLink) { - this.qrCodeLink = qrCodeLink; - } - - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public Date getOutTime() { - return outTime; - } - - public void setOutTime(Date outTime) { - this.outTime = outTime; - } - - 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/cardExchange/service/CardExchangeRecordService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/CardExchangeRecordService.java index 95f8db5e9..4cc838c4e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/CardExchangeRecordService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/CardExchangeRecordService.java @@ -40,5 +40,12 @@ public interface CardExchangeRecordService extends IService * @return */ IPage selectCancelRecords (Page page, CardExchangeRecordDTO cardExchangeRecordDTO); + + /** + * 兑换券领取通用接口 + * @param cardExchangeRecord + * @return + */ + boolean addCardExchangeRecord(CardExchangeRecord cardExchangeRecord); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeRecordServiceImpl.java index 9e206a794..4b6e3d48b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeRecordServiceImpl.java @@ -5,9 +5,11 @@ 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.cardExchange.dto.CardExchangeRecordDTO; +import com.fuint.business.marketingActivity.cardExchange.entity.CardExchange; import com.fuint.business.marketingActivity.cardExchange.mapper.CardExchangeRecordMapper; import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord; import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService; +import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeService; import com.fuint.business.marketingActivity.cardExchange.vo.CardExchangeRecordVO; import com.fuint.business.store.service.StoreService; import com.fuint.common.util.TokenUtil; @@ -15,6 +17,7 @@ import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.Date; import java.util.List; /** @@ -29,6 +32,8 @@ public class CardExchangeRecordServiceImpl extends ServiceImpl