Compare commits

..

No commits in common. "6f7784b1f6108dd8187cc53a61375d31c3f6d7d2" and "7a7412d515bf1915ea663fdc8f87308d90eae611" have entirely different histories.

14 changed files with 818 additions and 1333 deletions

View File

@ -106,19 +106,3 @@ export function looklooklook(id) {
})
}
export function getInfoActivity() {
return request({
url: 'business/marketingActivity/activeConsumption/getInfo',
method: 'get',
})
}
export function addActivity(data) {
return request({
url: 'business/marketingActivity/activeConsumption/add',
method: 'post',
data:data
})
}

File diff suppressed because it is too large Load Diff

View File

@ -110,25 +110,6 @@ public class ActiveConsumptionController extends BaseController {
return getSuccessResult(this.activeConsumptionService.add(activeConsumptionDTO));
}
/**
* 新增数据
*
* @param activeConsumption 实体对象
* @return 新增结果
*/
@PostMapping("add")
public ResponseObject add(@RequestBody ActiveConsumption activeConsumption) {
try {
SysLog sysLog =new SysLog();
sysLog.setSystemName("2");
sysLog.setMoudle("营销中心");
sysLog.setContent("新增名称为"+activeConsumption.getName()+"消费有礼活动");
sysLogService.saveVo(sysLog);
}catch (Exception ignored){}
return getSuccessResult(this.activeConsumptionService.insertActiveConsumption(activeConsumption));
}
/**
* 修改数据
*
@ -238,15 +219,5 @@ public class ActiveConsumptionController extends BaseController {
return getSuccessResult(this.activeConsumptionChildService.detailCount(id));
}
/**
* 统计
*
* @return 单条数据
*/
@GetMapping("/getInfo")
public ResponseObject selectByStoreId() {
return getSuccessResult(this.activeConsumptionService.selectByStoreId());
}
}

View File

@ -11,7 +11,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 消费有礼活动(ActiveConsumption)表实体类
@ -37,10 +36,10 @@ public class ActiveConsumption extends Model<ActiveConsumption> {
//满足金额
private Double participationConditionMoney;
//活动开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date activeStartTime;
//活动结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date activeEndTime;
//适用油品092# 1: 95# 298# 30# 4-10# 5 LNG 6CNG 7京92# 8京95# 9京0#
private String adaptOil;
@ -73,76 +72,15 @@ public class ActiveConsumption extends Model<ActiveConsumption> {
//创建者
private String createBy;
//创建时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date createTime;
//更新者
private String updateBy;
//更新时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date updateTime;
//描述信息
@TableField(exist = false)
private String exchangeFrom;
/**
*活动时间类型0永久有效1自定义
*/
private String activityTimeType;
/**
*活动时间前
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date activityTimeFront;
/**
*活动时间后
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date activityTimeAfter;
/**
*适用时间段类型0每周1每月
*/
private String suitTimeSlotType;
/**
*适用时间段/
*/
private String suitDate;
/**
*适用时间段前
*/
@JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
private Date suitTimeSlotFront;
/**
*适用时间段后
*/
@JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
private Date suitTimeSlotAfter;
/**
*会员标签id
*/
private String userLabelIds;
/**
*每人每天参与上限
*/
private String everyDayCeiling;
/**
*每人每月参与上限
*/
private Integer monthlyCeiling;
/**
*每人累计参与上限
*/
private Integer accumulateCeiling;
/**
*通知内容
*/
private String noticeContent;
/**
*活动详情
*/
private String activityDetails;
/**
* 活动奖品子表信息
*/
@TableField(exist = false)
private List<ActiveConsumptionChild> activityPrize;
}
}

View File

@ -86,20 +86,4 @@ public class ActiveConsumptionChild {
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date updateTime;
/**
*订单类型0订单金额1实收金额3加油升数
*/
private String orderType;
/**
*消费金额
*/
private String consumeAmount;
/**
*赠送积分
*/
private String givePoints;
/**
*赠送成长值
*/
private String giveGrowthValue;
}

View File

@ -63,13 +63,5 @@ public interface ActiveConsumptionService extends IService<ActiveConsumption> {
* @return
*/
List<ActiveConsumptionAppletVO> selectAllApplet(ActiveConsumption activeConsumption);
/**
* 根据storeId查询消费有礼信息
* @return
*/
ActiveConsumption selectByStoreId();
int insertActiveConsumption(ActiveConsumption activeConsumption);
}

View File

@ -2,7 +2,6 @@ package com.fuint.business.marketingActivity.activeConsumption.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -110,9 +109,6 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
@Override
@Transactional
public Boolean add(ActiveConsumptionDTO activeConsumptionDTO) {
ActiveConsumption activeConsumption1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeConsumption1)) return false;
boolean save = false;
ActiveApplet activeApplet = new ActiveApplet();
activeApplet.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
@ -564,34 +560,6 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
return appletVOList;
}
@Override
public ActiveConsumption selectByStoreId() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
ActiveConsumption activeConsumption = baseMapper.selectOne(queryWrapper);
List<ActiveConsumptionChild> activeConsumptionChildren = activeConsumptionChildService.selectList(activeConsumption.getId());
activeConsumption.setActivityPrize(activeConsumptionChildren);
return activeConsumption;
}
@Override
public int insertActiveConsumption(ActiveConsumption activeConsumption) {
ActiveConsumption activeConsumption1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeConsumption1)){
return 0;
}
int row = baseMapper.insert(activeConsumption);
activeConsumption1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeConsumption.getActivityPrize())){
for (ActiveConsumptionChild activeConsumptionChild : activeConsumption.getActivityPrize()) {
activeConsumptionChild.setActiveConsumptionId(activeConsumption1.getId());
activeConsumptionChildService.save(activeConsumptionChild);
}
}
return row;
}
/**
* 数组转字符串
* @param array

View File

@ -194,10 +194,5 @@ public class ActiveNewlywedsController extends BaseController {
}catch (Exception ignored){}
return getSuccessResult(activeNewlywedsChildService.removeByIds(idList));
}
@GetMapping("getInfo")
public ResponseObject selectByStoreId(){
return getSuccessResult(activeNewlywedsService.selectByStoreId());
}
}

View File

@ -3,15 +3,11 @@ package com.fuint.business.marketingActivity.activeNewlyweds.entity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 新人有礼活动(ActiveNewlyweds)表实体类
@ -20,8 +16,6 @@ import java.util.List;
* @since 2023-11-13 13:15:58
*/
@SuppressWarnings("serial")
@Data
@TableName("active_newlyweds")
public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
//主键id
@TableId(type = IdType.AUTO)
@ -32,13 +26,11 @@ public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
private Integer storeId;
//活动名称
private String name;
//活动时间类型0永久有效1自定义
private String activeTimeType;
//活动开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date activeStartTime;
//活动结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date activeEndTime;
//有礼奖励 0优惠券 1兑换券 2成长值 3积分
private String courtesyReward;
@ -59,23 +51,13 @@ public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
//创建者
private String createBy;
//创建时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date createTime;
//更新者
private String updateBy;
//更新时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date updateTime;
//通知内容
private String noticeContent;
//活动详情
private String activityDetails;
/**
* 优惠券列表信息
*/
@TableField(exist = false)
private List<ActiveNewlywedsChild> couponList;
public String getActiveCode() {
return activeCode;
@ -230,5 +212,5 @@ public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
protected Serializable pkVal() {
return this.id;
}
}
}

View File

@ -4,7 +4,6 @@ import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@ -19,7 +18,6 @@ import java.io.Serializable;
*/
@SuppressWarnings("serial")
@Data
@TableName("active_newlyweds_child")
public class ActiveNewlywedsChild extends Model<ActiveNewlywedsChild> {
//主键id
@TableId(type = IdType.AUTO)

View File

@ -3,8 +3,6 @@ package com.fuint.business.marketingActivity.activeNewlyweds.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
import java.util.List;
/**
* 新人有礼活动子表(ActiveNewlywedsChild)表服务接口
*
@ -12,11 +10,6 @@ import java.util.List;
* @since 2023-11-13 13:17:14
*/
public interface ActiveNewlywedsChildService extends IService<ActiveNewlywedsChild> {
/**
* 根据新人有礼id查询子表列表信息
* @param activeNewlywedsId
* @return
*/
List<ActiveNewlywedsChild> selectByActiveId(Integer activeNewlywedsId);
}

View File

@ -64,11 +64,5 @@ public interface ActiveNewlywedsService extends IService<ActiveNewlyweds> {
* @return
*/
List<ActiveNewlywedsAppletVO> selectApplet(ActiveConsumption activeConsumption);
/**
* 根据店铺id查询新人有礼信息
* @return
*/
ActiveNewlyweds selectByStoreId();
}

View File

@ -1,15 +1,12 @@
package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
import com.fuint.business.marketingActivity.activeNewlyweds.mapper.ActiveNewlywedsChildMapper;
import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsChildService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 新人有礼活动子表(ActiveNewlywedsChild)表服务实现类
*
@ -19,11 +16,5 @@ import java.util.List;
@Service("activeNewlywedsChildService")
public class ActiveNewlywedsChildServiceImpl extends ServiceImpl<ActiveNewlywedsChildMapper, ActiveNewlywedsChild> implements ActiveNewlywedsChildService {
@Override
public List<ActiveNewlywedsChild> selectByActiveId(Integer activeNewlywedsId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("active_newlyweds_id",activeNewlywedsId);
return baseMapper.selectList(queryWrapper);
}
}

View File

@ -2,7 +2,6 @@ package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -82,10 +81,6 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
@Override
@Transactional
public Boolean add(ActiveNewlywedsDTO activeNewlywedsDTO) {
// 查看是否存在活动存在则返回
ActiveNewlyweds activeNewlyweds1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeNewlyweds1)) return false;
boolean save = false;
ActiveApplet activeApplet = new ActiveApplet();
activeApplet.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
@ -645,18 +640,6 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
return arrayList;
}
@Override
public ActiveNewlyweds selectByStoreId() {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",TokenUtil.getNowAccountInfo().getStoreId());
ActiveNewlyweds activeNewlyweds = baseMapper.selectOne(queryWrapper);
if (ObjectUtil.isNotEmpty(activeNewlyweds)) {
List<ActiveNewlywedsChild> activeNewlywedsChildren = activeNewlywedsChildService.selectByActiveId(activeNewlyweds.getId());
activeNewlyweds.setCouponList(activeNewlywedsChildren);
}
return activeNewlyweds;
}
/**
* 数组转字符串
* @param array