Compare commits
No commits in common. "6f7784b1f6108dd8187cc53a61375d31c3f6d7d2" and "7a7412d515bf1915ea663fdc8f87308d90eae611" have entirely different histories.
6f7784b1f6
...
7a7412d515
@ -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
@ -110,25 +110,6 @@ public class ActiveConsumptionController extends BaseController {
|
|||||||
return getSuccessResult(this.activeConsumptionService.add(activeConsumptionDTO));
|
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 getSuccessResult(this.activeConsumptionChildService.detailCount(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计
|
|
||||||
*
|
|
||||||
* @return 单条数据
|
|
||||||
*/
|
|
||||||
@GetMapping("/getInfo")
|
|
||||||
public ResponseObject selectByStoreId() {
|
|
||||||
return getSuccessResult(this.activeConsumptionService.selectByStoreId());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消费有礼活动(ActiveConsumption)表实体类
|
* 消费有礼活动(ActiveConsumption)表实体类
|
||||||
@ -37,10 +36,10 @@ public class ActiveConsumption extends Model<ActiveConsumption> {
|
|||||||
//满足金额
|
//满足金额
|
||||||
private Double participationConditionMoney;
|
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;
|
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;
|
private Date activeEndTime;
|
||||||
//适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#
|
//适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#
|
||||||
private String adaptOil;
|
private String adaptOil;
|
||||||
@ -73,76 +72,15 @@ public class ActiveConsumption extends Model<ActiveConsumption> {
|
|||||||
//创建者
|
//创建者
|
||||||
private String createBy;
|
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 Date createTime;
|
||||||
//更新者
|
//更新者
|
||||||
private String updateBy;
|
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 Date updateTime;
|
||||||
//描述信息
|
//描述信息
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String exchangeFrom;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -86,20 +86,4 @@ public class ActiveConsumptionChild {
|
|||||||
*/
|
*/
|
||||||
@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 Date updateTime;
|
||||||
/**
|
|
||||||
*订单类型:0订单金额、1实收金额、3加油升数
|
|
||||||
*/
|
|
||||||
private String orderType;
|
|
||||||
/**
|
|
||||||
*消费金额
|
|
||||||
*/
|
|
||||||
private String consumeAmount;
|
|
||||||
/**
|
|
||||||
*赠送积分
|
|
||||||
*/
|
|
||||||
private String givePoints;
|
|
||||||
/**
|
|
||||||
*赠送成长值
|
|
||||||
*/
|
|
||||||
private String giveGrowthValue;
|
|
||||||
}
|
}
|
||||||
|
@ -63,13 +63,5 @@ public interface ActiveConsumptionService extends IService<ActiveConsumption> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ActiveConsumptionAppletVO> selectAllApplet(ActiveConsumption activeConsumption);
|
List<ActiveConsumptionAppletVO> selectAllApplet(ActiveConsumption activeConsumption);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据storeId查询消费有礼信息
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
ActiveConsumption selectByStoreId();
|
|
||||||
|
|
||||||
int insertActiveConsumption(ActiveConsumption activeConsumption);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package com.fuint.business.marketingActivity.activeConsumption.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
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.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -110,9 +109,6 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Boolean add(ActiveConsumptionDTO activeConsumptionDTO) {
|
public Boolean add(ActiveConsumptionDTO activeConsumptionDTO) {
|
||||||
ActiveConsumption activeConsumption1 = selectByStoreId();
|
|
||||||
if (ObjectUtil.isNotEmpty(activeConsumption1)) return false;
|
|
||||||
|
|
||||||
boolean save = false;
|
boolean save = false;
|
||||||
ActiveApplet activeApplet = new ActiveApplet();
|
ActiveApplet activeApplet = new ActiveApplet();
|
||||||
activeApplet.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
|
activeApplet.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
|
||||||
@ -564,34 +560,6 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
|||||||
return appletVOList;
|
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
|
* @param array
|
||||||
|
@ -194,10 +194,5 @@ public class ActiveNewlywedsController extends BaseController {
|
|||||||
}catch (Exception ignored){}
|
}catch (Exception ignored){}
|
||||||
return getSuccessResult(activeNewlywedsChildService.removeByIds(idList));
|
return getSuccessResult(activeNewlywedsChildService.removeByIds(idList));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("getInfo")
|
|
||||||
public ResponseObject selectByStoreId(){
|
|
||||||
return getSuccessResult(activeNewlywedsService.selectByStoreId());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,15 +3,11 @@ package com.fuint.business.marketingActivity.activeNewlyweds.entity;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新人有礼活动(ActiveNewlyweds)表实体类
|
* 新人有礼活动(ActiveNewlyweds)表实体类
|
||||||
@ -20,8 +16,6 @@ import java.util.List;
|
|||||||
* @since 2023-11-13 13:15:58
|
* @since 2023-11-13 13:15:58
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@Data
|
|
||||||
@TableName("active_newlyweds")
|
|
||||||
public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
|
public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
|
||||||
//主键id
|
//主键id
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
@ -32,13 +26,11 @@ public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
|
|||||||
private Integer storeId;
|
private Integer storeId;
|
||||||
//活动名称
|
//活动名称
|
||||||
private String name;
|
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;
|
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;
|
private Date activeEndTime;
|
||||||
//有礼奖励 0:优惠券 1:兑换券 2:成长值 3:积分
|
//有礼奖励 0:优惠券 1:兑换券 2:成长值 3:积分
|
||||||
private String courtesyReward;
|
private String courtesyReward;
|
||||||
@ -59,23 +51,13 @@ public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
|
|||||||
//创建者
|
//创建者
|
||||||
private String createBy;
|
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 Date createTime;
|
||||||
//更新者
|
//更新者
|
||||||
private String updateBy;
|
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 Date updateTime;
|
||||||
//通知内容
|
|
||||||
private String noticeContent;
|
|
||||||
//活动详情
|
|
||||||
private String activityDetails;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 优惠券列表信息
|
|
||||||
*/
|
|
||||||
@TableField(exist = false)
|
|
||||||
private List<ActiveNewlywedsChild> couponList;
|
|
||||||
|
|
||||||
public String getActiveCode() {
|
public String getActiveCode() {
|
||||||
return activeCode;
|
return activeCode;
|
||||||
@ -230,5 +212,5 @@ public class ActiveNewlyweds extends Model<ActiveNewlyweds> {
|
|||||||
protected Serializable pkVal() {
|
protected Serializable pkVal() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import java.util.Date;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -19,7 +18,6 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@Data
|
@Data
|
||||||
@TableName("active_newlyweds_child")
|
|
||||||
public class ActiveNewlywedsChild extends Model<ActiveNewlywedsChild> {
|
public class ActiveNewlywedsChild extends Model<ActiveNewlywedsChild> {
|
||||||
//主键id
|
//主键id
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
|
@ -3,8 +3,6 @@ package com.fuint.business.marketingActivity.activeNewlyweds.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
|
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新人有礼活动子表(ActiveNewlywedsChild)表服务接口
|
* 新人有礼活动子表(ActiveNewlywedsChild)表服务接口
|
||||||
*
|
*
|
||||||
@ -12,11 +10,6 @@ import java.util.List;
|
|||||||
* @since 2023-11-13 13:17:14
|
* @since 2023-11-13 13:17:14
|
||||||
*/
|
*/
|
||||||
public interface ActiveNewlywedsChildService extends IService<ActiveNewlywedsChild> {
|
public interface ActiveNewlywedsChildService extends IService<ActiveNewlywedsChild> {
|
||||||
/**
|
|
||||||
* 根据新人有礼id查询子表列表信息
|
|
||||||
* @param activeNewlywedsId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ActiveNewlywedsChild> selectByActiveId(Integer activeNewlywedsId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,11 +64,5 @@ public interface ActiveNewlywedsService extends IService<ActiveNewlyweds> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ActiveNewlywedsAppletVO> selectApplet(ActiveConsumption activeConsumption);
|
List<ActiveNewlywedsAppletVO> selectApplet(ActiveConsumption activeConsumption);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据店铺id查询新人有礼信息
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
ActiveNewlyweds selectByStoreId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
|
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
|
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
|
||||||
import com.fuint.business.marketingActivity.activeNewlyweds.mapper.ActiveNewlywedsChildMapper;
|
import com.fuint.business.marketingActivity.activeNewlyweds.mapper.ActiveNewlywedsChildMapper;
|
||||||
import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsChildService;
|
import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsChildService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新人有礼活动子表(ActiveNewlywedsChild)表服务实现类
|
* 新人有礼活动子表(ActiveNewlywedsChild)表服务实现类
|
||||||
*
|
*
|
||||||
@ -19,11 +16,5 @@ import java.util.List;
|
|||||||
@Service("activeNewlywedsChildService")
|
@Service("activeNewlywedsChildService")
|
||||||
public class ActiveNewlywedsChildServiceImpl extends ServiceImpl<ActiveNewlywedsChildMapper, ActiveNewlywedsChild> implements 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package com.fuint.business.marketingActivity.activeNewlyweds.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
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.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -82,10 +81,6 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Boolean add(ActiveNewlywedsDTO activeNewlywedsDTO) {
|
public Boolean add(ActiveNewlywedsDTO activeNewlywedsDTO) {
|
||||||
// 查看是否存在活动,存在则返回
|
|
||||||
ActiveNewlyweds activeNewlyweds1 = selectByStoreId();
|
|
||||||
if (ObjectUtil.isNotEmpty(activeNewlyweds1)) return false;
|
|
||||||
|
|
||||||
boolean save = false;
|
boolean save = false;
|
||||||
ActiveApplet activeApplet = new ActiveApplet();
|
ActiveApplet activeApplet = new ActiveApplet();
|
||||||
activeApplet.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
|
activeApplet.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
|
||||||
@ -645,18 +640,6 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
return arrayList;
|
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
|
* @param array
|
||||||
|
Loading…
Reference in New Issue
Block a user