This commit is contained in:
愉快的大福 2024-09-08 19:44:23 +08:00
parent 0a743eb2ed
commit 1273e8c66f
5 changed files with 17 additions and 154 deletions

View File

@ -27,7 +27,7 @@ export function listActiveConsumption(query) {
//优惠券
export function listFavorable(query) {
return request({
url: 'business/marketingActivity/cardFavorable',
url: 'cardCoupon',
method: 'get',
params: query
})

View File

@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
import java.util.Optional;
/**
* 储值卡规则(CardValueRule)表控制层
@ -56,7 +57,7 @@ public class CardValueRuleController extends BaseController {
public ResponseObject selectOne() {
LambdaQueryWrapper<CardValueRule> queryWrapper =new LambdaQueryWrapper<CardValueRule>();
queryWrapper.eq(CardValueRule::getStoreId, TokenUtil.getNowAccountInfo().getStoreId()).last("limit 1");
return getSuccessResult(this.cardValueRuleService.getOne(queryWrapper));
return getSuccessResult(Optional.ofNullable(this.cardValueRuleService.getOne(queryWrapper)).orElse(new CardValueRule()));
}
/**

View File

@ -1,7 +1,12 @@
package com.fuint.business.marketingActivity.cardValueRule.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import java.io.Serializable;
/**
@ -10,9 +15,10 @@ import java.io.Serializable;
* @author makejava
* @since 2024-09-08 18:19:04
*/
@SuppressWarnings("serial")
@Data
public class CardValueRule extends Model<CardValueRule> {
//主键
@TableId(type = IdType.AUTO)
private Integer id;
//所属连锁店id
private Integer chainStoreId;
@ -47,151 +53,5 @@ public class CardValueRule extends Model<CardValueRule> {
//更新时间
private Date updateTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getChainStoreId() {
return chainStoreId;
}
public void setChainStoreId(Integer chainStoreId) {
this.chainStoreId = chainStoreId;
}
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getQyDetail() {
return qyDetail;
}
public void setQyDetail(String qyDetail) {
this.qyDetail = qyDetail;
}
public String getGzDetail() {
return gzDetail;
}
public void setGzDetail(String gzDetail) {
this.gzDetail = gzDetail;
}
public String getOilLimit() {
return oilLimit;
}
public void setOilLimit(String oilLimit) {
this.oilLimit = oilLimit;
}
public String getOilNumber() {
return oilNumber;
}
public void setOilNumber(String oilNumber) {
this.oilNumber = oilNumber;
}
public String getProductLimit() {
return productLimit;
}
public void setProductLimit(String productLimit) {
this.productLimit = productLimit;
}
public String getProductIds() {
return productIds;
}
public void setProductIds(String productIds) {
this.productIds = productIds;
}
public String getTimeLimit() {
return timeLimit;
}
public void setTimeLimit(String timeLimit) {
this.timeLimit = timeLimit;
}
public Date getEffectiveDateStart() {
return effectiveDateStart;
}
public void setEffectiveDateStart(Date effectiveDateStart) {
this.effectiveDateStart = effectiveDateStart;
}
public Date getEffectiveDateEnd() {
return effectiveDateEnd;
}
public void setEffectiveDateEnd(Date effectiveDateEnd) {
this.effectiveDateEnd = effectiveDateEnd;
}
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;
}
}
}

View File

@ -1,7 +1,8 @@
package com.fuint.business.marketingActivity.cardValueRule.dao;
package com.fuint.business.marketingActivity.cardValueRule.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.marketingActivity.cardValueRule.entity.CardValueRule;
import org.apache.ibatis.annotations.Mapper;
/**
* 储值卡规则(CardValueRule)表数据库访问层
@ -9,7 +10,8 @@ import com.fuint.business.marketingActivity.cardValueRule.entity.CardValueRule;
* @author makejava
* @since 2024-09-08 18:19:04
*/
public interface CardValueRuleDao extends BaseMapper<CardValueRule> {
@Mapper
public interface CardValueRuleMapper extends BaseMapper<CardValueRule> {
}

View File

@ -1,7 +1,7 @@
package com.fuint.business.marketingActivity.cardValueRule.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.cardValueRule.dao.CardValueRuleDao;
import com.fuint.business.marketingActivity.cardValueRule.mapper.CardValueRuleMapper;
import com.fuint.business.marketingActivity.cardValueRule.entity.CardValueRule;
import com.fuint.business.marketingActivity.cardValueRule.service.CardValueRuleService;
import org.springframework.stereotype.Service;
@ -13,7 +13,7 @@ import org.springframework.stereotype.Service;
* @since 2024-09-08 18:19:04
*/
@Service("cardValueRuleService")
public class CardValueRuleServiceImpl extends ServiceImpl<CardValueRuleDao, CardValueRule> implements CardValueRuleService {
public class CardValueRuleServiceImpl extends ServiceImpl<CardValueRuleMapper, CardValueRule> implements CardValueRuleService {
}