满减折扣活动记录
This commit is contained in:
parent
974264984f
commit
4dc2c4d5ca
@ -0,0 +1,90 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeDiscountRecords.controller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.api.ApiController;
|
||||||
|
import com.baomidou.mybatisplus.extension.api.R;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.service.ActiveDiscountRecordsService;
|
||||||
|
import com.fuint.framework.web.BaseController;
|
||||||
|
import com.fuint.framework.web.ResponseObject;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 折扣活动记录表(ActiveDiscountRecords)表控制层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:13:25
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("business/marketingActivity/activeDiscountRecords")
|
||||||
|
public class ActiveDiscountRecordsController extends BaseController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private ActiveDiscountRecordsService activeDiscountRecordsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询所有数据
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param activeDiscountRecords 查询实体
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@GetMapping
|
||||||
|
public ResponseObject selectAll(Page<ActiveDiscountRecords> page, ActiveDiscountRecords activeDiscountRecords) {
|
||||||
|
return getSuccessResult(this.activeDiscountRecordsService.page(page, new QueryWrapper<>(activeDiscountRecords)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@GetMapping("{id}")
|
||||||
|
public ResponseObject selectOne(@PathVariable Serializable id) {
|
||||||
|
return getSuccessResult(this.activeDiscountRecordsService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param activeDiscountRecords 实体对象
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public ResponseObject insert(@RequestBody ActiveDiscountRecords activeDiscountRecords) {
|
||||||
|
return getSuccessResult(this.activeDiscountRecordsService.save(activeDiscountRecords));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param activeDiscountRecords 实体对象
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
public ResponseObject update(@RequestBody ActiveDiscountRecords activeDiscountRecords) {
|
||||||
|
return getSuccessResult(this.activeDiscountRecordsService.updateById(activeDiscountRecords));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @param idList 主键结合
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||||
|
return getSuccessResult(this.activeDiscountRecordsService.removeByIds(idList));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,107 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeDiscountRecords.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 折扣活动记录表(ActiveDiscountRecords)表实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:13:25
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class ActiveDiscountRecords extends Model<ActiveDiscountRecords> {
|
||||||
|
//主键id
|
||||||
|
private Integer id;
|
||||||
|
//活动id
|
||||||
|
private Integer activeDiscountId;
|
||||||
|
//用户id
|
||||||
|
private Integer userId;
|
||||||
|
//店铺id
|
||||||
|
private Integer storeId;
|
||||||
|
//创建者
|
||||||
|
private String createBy;
|
||||||
|
//创建时间
|
||||||
|
private Date createTime;
|
||||||
|
//更新者
|
||||||
|
private String updateBy;
|
||||||
|
//更新时间
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getActiveDiscountId() {
|
||||||
|
return activeDiscountId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActiveDiscountId(Integer activeDiscountId) {
|
||||||
|
this.activeDiscountId = activeDiscountId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStoreId() {
|
||||||
|
return storeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoreId(Integer storeId) {
|
||||||
|
this.storeId = storeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeDiscountRecords.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 折扣活动记录表(ActiveDiscountRecords)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:13:25
|
||||||
|
*/
|
||||||
|
public interface ActiveDiscountRecordsMapper extends BaseMapper<ActiveDiscountRecords> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeDiscountRecords.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 折扣活动记录表(ActiveDiscountRecords)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:13:26
|
||||||
|
*/
|
||||||
|
public interface ActiveDiscountRecordsService extends IService<ActiveDiscountRecords> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeDiscountRecords.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.mapper.ActiveDiscountRecordsMapper;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.service.ActiveDiscountRecordsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 折扣活动记录表(ActiveDiscountRecords)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:13:26
|
||||||
|
*/
|
||||||
|
@Service("activeDiscountRecordsService")
|
||||||
|
public class ActiveDiscountRecordsServiceImpl extends ServiceImpl<ActiveDiscountRecordsMapper, ActiveDiscountRecords> implements ActiveDiscountRecordsService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,90 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeFullminusRecords.controller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.api.ApiController;
|
||||||
|
import com.baomidou.mybatisplus.extension.api.R;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.service.ActiveFullminusRecordsService;
|
||||||
|
import com.fuint.framework.web.BaseController;
|
||||||
|
import com.fuint.framework.web.ResponseObject;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满减活动记录表(ActiveFullminusRecords)表控制层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:12:45
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("business/marketingActivity/activeFullminusRecords")
|
||||||
|
public class ActiveFullminusRecordsController extends BaseController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private ActiveFullminusRecordsService activeFullminusRecordsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询所有数据
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param activeFullminusRecords 查询实体
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@GetMapping
|
||||||
|
public ResponseObject selectAll(Page<ActiveFullminusRecords> page, ActiveFullminusRecords activeFullminusRecords) {
|
||||||
|
return getSuccessResult(this.activeFullminusRecordsService.page(page, new QueryWrapper<>(activeFullminusRecords)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@GetMapping("{id}")
|
||||||
|
public ResponseObject selectOne(@PathVariable Serializable id) {
|
||||||
|
return getSuccessResult(this.activeFullminusRecordsService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param activeFullminusRecords 实体对象
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public ResponseObject insert(@RequestBody ActiveFullminusRecords activeFullminusRecords) {
|
||||||
|
return getSuccessResult(this.activeFullminusRecordsService.save(activeFullminusRecords));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param activeFullminusRecords 实体对象
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
public ResponseObject update(@RequestBody ActiveFullminusRecords activeFullminusRecords) {
|
||||||
|
return getSuccessResult(this.activeFullminusRecordsService.updateById(activeFullminusRecords));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @param idList 主键结合
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||||
|
return getSuccessResult(this.activeFullminusRecordsService.removeByIds(idList));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,107 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeFullminusRecords.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满减活动记录表(ActiveFullminusRecords)表实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:12:45
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class ActiveFullminusRecords extends Model<ActiveFullminusRecords> {
|
||||||
|
//主键id
|
||||||
|
private Integer id;
|
||||||
|
//活动id
|
||||||
|
private Integer activeFullminusId;
|
||||||
|
//用户id
|
||||||
|
private Integer userId;
|
||||||
|
//店铺id
|
||||||
|
private Integer storeId;
|
||||||
|
//创建者
|
||||||
|
private String createBy;
|
||||||
|
//创建时间
|
||||||
|
private Date createTime;
|
||||||
|
//更新者
|
||||||
|
private String updateBy;
|
||||||
|
//更新时间
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getActiveFullminusId() {
|
||||||
|
return activeFullminusId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActiveFullminusId(Integer activeFullminusId) {
|
||||||
|
this.activeFullminusId = activeFullminusId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStoreId() {
|
||||||
|
return storeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoreId(Integer storeId) {
|
||||||
|
this.storeId = storeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeFullminusRecords.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满减活动记录表(ActiveFullminusRecords)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:12:45
|
||||||
|
*/
|
||||||
|
public interface ActiveFullminusRecordsMapper extends BaseMapper<ActiveFullminusRecords> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeFullminusRecords.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满减活动记录表(ActiveFullminusRecords)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:12:45
|
||||||
|
*/
|
||||||
|
public interface ActiveFullminusRecordsService extends IService<ActiveFullminusRecords> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.fuint.business.marketingActivity.activeFullminusRecords.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.mapper.ActiveFullminusRecordsMapper;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.service.ActiveFullminusRecordsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满减活动记录表(ActiveFullminusRecords)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2024-01-19 17:12:45
|
||||||
|
*/
|
||||||
|
@Service("activeFullminusRecordsService")
|
||||||
|
public class ActiveFullminusRecordsServiceImpl extends ServiceImpl<ActiveFullminusRecordsMapper, ActiveFullminusRecords> implements ActiveFullminusRecordsService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,7 @@ package com.fuint.business.marketingActivity.cardFavorable.controller;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||||
@ -115,6 +116,17 @@ public class CardFavorableRecordController extends BaseController {
|
|||||||
return getSuccessResult(this.cardFavorableRecordService.updateById(cardFavorableRecord));
|
return getSuccessResult(this.cardFavorableRecordService.updateById(cardFavorableRecord));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 核销
|
||||||
|
*
|
||||||
|
* @param paymentActiveVO 实体对象
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
|
@PutMapping("updateCardAndActiveById")
|
||||||
|
public ResponseObject updateCardAndActiveById(@RequestBody PaymentActiveVO paymentActiveVO) {
|
||||||
|
return getSuccessResult(this.cardFavorableRecordService.updateCardAndActiveById(paymentActiveVO));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除数据
|
* 删除数据
|
||||||
*
|
*
|
||||||
|
@ -38,5 +38,7 @@ public interface CardFavorableRecordMapper extends BaseMapper<CardFavorableRecor
|
|||||||
IPage<CouponVO> selectAllByCondition(@Param("page") Page page, @Param("cardFavorableDTOS") CardFavorableDTOS cardFavorableDTOS);
|
IPage<CouponVO> selectAllByCondition(@Param("page") Page page, @Param("cardFavorableDTOS") CardFavorableDTOS cardFavorableDTOS);
|
||||||
|
|
||||||
List<CardFavorableRecordVO> getCanUserCardFavorableList(@Param("paymentActiveDTO") PaymentActiveDTO paymentActiveDTO);
|
List<CardFavorableRecordVO> getCanUserCardFavorableList(@Param("paymentActiveDTO") PaymentActiveDTO paymentActiveDTO);
|
||||||
|
|
||||||
|
boolean updateCardAndActiveById(@Param("cardFavorableId") Integer cardFavorableId, @Param("userId") Integer userId, @Param("storeId") Integer storeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,5 +141,13 @@
|
|||||||
AND cfr.end_time
|
AND cfr.end_time
|
||||||
AND cfr.status = 0
|
AND cfr.status = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateCardAndActiveById" parameterType="Integer">
|
||||||
|
update card_favorable_record
|
||||||
|
set status = 1
|
||||||
|
where card_favorable_id = #{cardFavorableId}
|
||||||
|
and mt_user_id = #{userId}
|
||||||
|
and store_id = #{storeId}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardFavorable.service;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
|
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableRecordVO;
|
||||||
@ -55,5 +56,12 @@ public interface CardFavorableRecordService extends IService<CardFavorableRecord
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean addCardFavorableRecord(CardFavorableRecord cardFavorableRecord);
|
boolean addCardFavorableRecord(CardFavorableRecord cardFavorableRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 核销
|
||||||
|
* @param paymentActiveVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean updateCardAndActiveById(PaymentActiveVO paymentActiveVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,13 @@ 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;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.entity.ActiveDiscountRecords;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.mapper.ActiveDiscountRecordsMapper;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscountRecords.service.ActiveDiscountRecordsService;
|
||||||
|
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.entity.ActiveFullminusRecords;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.mapper.ActiveFullminusRecordsMapper;
|
||||||
|
import com.fuint.business.marketingActivity.activeFullminusRecords.service.ActiveFullminusRecordsService;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
import com.fuint.business.marketingActivity.cardFavorable.dto.IdListDTO;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
|
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
|
||||||
@ -21,6 +28,7 @@ import com.fuint.common.util.TokenUtil;
|
|||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@ -45,6 +53,10 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
|
|||||||
private CardFavorableService cardFavorableService;
|
private CardFavorableService cardFavorableService;
|
||||||
@Resource
|
@Resource
|
||||||
private OilNameService oilNameService;
|
private OilNameService oilNameService;
|
||||||
|
@Resource
|
||||||
|
private ActiveFullminusRecordsService activeFullminusRecordsService;
|
||||||
|
@Resource
|
||||||
|
private ActiveDiscountRecordsService activeDiscountRecordsService;
|
||||||
/**
|
/**
|
||||||
* 分页查询所有数据
|
* 分页查询所有数据
|
||||||
* @param page
|
* @param page
|
||||||
@ -54,6 +66,7 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
|
|||||||
@Override
|
@Override
|
||||||
public IPage select(Page page, CardFavorableRecord cardFavorableRecord) {
|
public IPage select(Page page, CardFavorableRecord cardFavorableRecord) {
|
||||||
|
|
||||||
|
|
||||||
//构建查询条件
|
//构建查询条件
|
||||||
LambdaQueryWrapper<CardFavorableRecord> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CardFavorableRecord> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
if (ObjectUtils.isNotEmpty(cardFavorableRecord.getMobile())){
|
if (ObjectUtils.isNotEmpty(cardFavorableRecord.getMobile())){
|
||||||
@ -214,5 +227,38 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
|
|||||||
}
|
}
|
||||||
return save(cardFavorableRecord);
|
return save(cardFavorableRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 核销
|
||||||
|
* @param paymentActiveVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public boolean updateCardAndActiveById(PaymentActiveVO paymentActiveVO) {
|
||||||
|
//优惠券
|
||||||
|
boolean flag = false;
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
if (ObjectUtils.isNotEmpty(paymentActiveVO.getCardFavorableId())){
|
||||||
|
flag = cardFavorableRecordMapper.updateCardAndActiveById(paymentActiveVO.getCardFavorableId(),nowAccountInfo.getId(),nowAccountInfo.getStoreId());
|
||||||
|
}
|
||||||
|
//满减活动
|
||||||
|
if (ObjectUtils.isNotEmpty(paymentActiveVO.getActiveId()) && paymentActiveVO.getType().equals("1")){
|
||||||
|
ActiveFullminusRecords activeFullminusRecords = new ActiveFullminusRecords();
|
||||||
|
activeFullminusRecords.setActiveFullminusId(paymentActiveVO.getActiveId());
|
||||||
|
activeFullminusRecords.setUserId(nowAccountInfo.getId());
|
||||||
|
activeFullminusRecords.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
flag = activeFullminusRecordsService.save(activeFullminusRecords);
|
||||||
|
}
|
||||||
|
//折扣活动
|
||||||
|
if (ObjectUtils.isNotEmpty(paymentActiveVO.getActiveId()) && paymentActiveVO.getType().equals("2")){
|
||||||
|
ActiveDiscountRecords activeDiscountRecords = new ActiveDiscountRecords();
|
||||||
|
activeDiscountRecords.setActiveDiscountId(paymentActiveVO.getActiveId());
|
||||||
|
activeDiscountRecords.setUserId(nowAccountInfo.getId());
|
||||||
|
activeDiscountRecords.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
flag = activeDiscountRecordsService.save(activeDiscountRecords);
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user