diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java new file mode 100644 index 000000000..2cd6dbf7f --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java @@ -0,0 +1,115 @@ +package com.fuint.business.marketingActivity.activeNewlyweds.controller; + + + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +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.activeNewlyweds.entity.ActiveNewlyweds; +import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords; +import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsRecordsService; +import com.fuint.common.dto.AccountInfo; +import com.fuint.common.util.TokenUtil; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 新人有礼记录表(ActiveNewlywedsRecords)表控制层 + * + * @author makejava + * @since 2023-12-20 14:12:53 + */ +@RestController +@RequestMapping("business/marketingActivity/activeNewlywedsRecords") +public class ActiveNewlywedsRecordsController extends BaseController { + /** + * 服务对象 + */ + @Resource + private ActiveNewlywedsRecordsService activeNewlywedsRecordsService; + + /** + * 分页查询所有数据 + * @param pageNo + * @param pageSize + * @param activeNewlywedsRecords + * @return + */ + @GetMapping + public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("activeNewlywedsRecords") ActiveNewlywedsRecords activeNewlywedsRecords) { + Page page = new Page(pageNo, pageSize); + return getSuccessResult(this.activeNewlywedsRecordsService.page(page, new QueryWrapper<>(activeNewlywedsRecords))); + } + + /** + * 判断是否已经参加过新人有礼活动接口 + * @param activeNewlywedsRecords + * @return + */ + @GetMapping("applet") + public ResponseObject isJoined(@Param("activeNewlywedsRecords") ActiveNewlywedsRecords activeNewlywedsRecords) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ActiveNewlywedsRecords::getInviteeUserId,TokenUtil.getNowAccountInfo().getId()); + List list = this.activeNewlywedsRecordsService.list(queryWrapper); + if (list.size() == 0){ + return getSuccessResult("可以参加新人活动"); + }else { + return getSuccessResult("不可以参加新人活动"); + } + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.activeNewlywedsRecordsService.getById(id)); + } + + /** + * 新增数据 + * + * @param activeNewlywedsRecords 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody ActiveNewlywedsRecords activeNewlywedsRecords) { + return getSuccessResult(this.activeNewlywedsRecordsService.save(activeNewlywedsRecords)); + } + + /** + * 修改数据 + * + * @param activeNewlywedsRecords 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody ActiveNewlywedsRecords activeNewlywedsRecords) { + return getSuccessResult(this.activeNewlywedsRecordsService.updateById(activeNewlywedsRecords)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.activeNewlywedsRecordsService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java new file mode 100644 index 000000000..3a777b50e --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/entity/ActiveNewlywedsRecords.java @@ -0,0 +1,127 @@ +package com.fuint.business.marketingActivity.activeNewlyweds.entity; + +import java.util.Date; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; + +/** + * 新人有礼记录表(ActiveNewlywedsRecords)表实体类 + * + * @author makejava + * @since 2023-12-20 14:12:54 + */ +@SuppressWarnings("serial") +public class ActiveNewlywedsRecords extends Model { + //主键id + private Integer id; + //活动id + private Integer activeNewlywedsId; + //所属连锁店id + private Integer chainStoreId; + //所属店铺id + private Integer storeId; + //用户id + private String userId; + //被邀请人id + private String inviteeUserId; + //创建者 + 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 getActiveNewlywedsId() { + return activeNewlywedsId; + } + + public void setActiveNewlywedsId(Integer activeNewlywedsId) { + this.activeNewlywedsId = activeNewlywedsId; + } + + 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 getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getInviteeUserId() { + return inviteeUserId; + } + + public void setInviteeUserId(String inviteeUserId) { + this.inviteeUserId = inviteeUserId; + } + + 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/activeNewlyweds/mapper/ActiveNewlywedsRecordsMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/mapper/ActiveNewlywedsRecordsMapper.java new file mode 100644 index 000000000..baad355a1 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/mapper/ActiveNewlywedsRecordsMapper.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.activeNewlyweds.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords; + +/** + * 新人有礼记录表(ActiveNewlywedsRecords)表数据库访问层 + * + * @author makejava + * @since 2023-12-20 14:12:53 + */ +public interface ActiveNewlywedsRecordsMapper extends BaseMapper { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java new file mode 100644 index 000000000..840cb84ce --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.activeNewlyweds.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords; + +/** + * 新人有礼记录表(ActiveNewlywedsRecords)表服务接口 + * + * @author makejava + * @since 2023-12-20 14:12:54 + */ +public interface ActiveNewlywedsRecordsService extends IService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java new file mode 100644 index 000000000..893a38682 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsRecordsServiceImpl.java @@ -0,0 +1,19 @@ +package com.fuint.business.marketingActivity.activeNewlyweds.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.activeNewlyweds.mapper.ActiveNewlywedsRecordsMapper; +import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords; +import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsRecordsService; +import org.springframework.stereotype.Service; + +/** + * 新人有礼记录表(ActiveNewlywedsRecords)表服务实现类 + * + * @author makejava + * @since 2023-12-20 14:12:54 + */ +@Service("activeNewlywedsRecordsService") +public class ActiveNewlywedsRecordsServiceImpl extends ServiceImpl implements ActiveNewlywedsRecordsService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java new file mode 100644 index 000000000..a9bb4b1d8 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java @@ -0,0 +1,94 @@ +package com.fuint.business.marketingActivity.activeRecommend.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.activeRecommend.entity.ActiveRecommendRecords; +import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendRecordsService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 邀请有礼记录表(ActiveRecommendRecords)表控制层 + * + * @author makejava + * @since 2023-12-20 14:13:16 + */ +@RestController +@RequestMapping("business/marketingActivity/activeRecommendRecords") +public class ActiveRecommendRecordsController extends BaseController { + /** + * 服务对象 + */ + @Resource + private ActiveRecommendRecordsService activeRecommendRecordsService; + + /** + * 分页查询所有数据 + * @param pageNo + * @param pageSize + * @param activeRecommendRecords + * @return + */ + @GetMapping + public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("activeRecommendRecords") ActiveRecommendRecords activeRecommendRecords) { + Page page = new Page(pageNo, pageSize); + return getSuccessResult(this.activeRecommendRecordsService.page(page, new QueryWrapper<>(activeRecommendRecords))); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.activeRecommendRecordsService.getById(id)); + } + + /** + * 新增数据 + * + * @param activeRecommendRecords 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody ActiveRecommendRecords activeRecommendRecords) { + return getSuccessResult(this.activeRecommendRecordsService.save(activeRecommendRecords)); + } + + /** + * 修改数据 + * + * @param activeRecommendRecords 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody ActiveRecommendRecords activeRecommendRecords) { + return getSuccessResult(this.activeRecommendRecordsService.updateById(activeRecommendRecords)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.activeRecommendRecordsService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java new file mode 100644 index 000000000..9de2253b3 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java @@ -0,0 +1,127 @@ +package com.fuint.business.marketingActivity.activeRecommend.entity; + +import java.util.Date; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; + +/** + * 邀请有礼记录表(ActiveRecommendRecords)表实体类 + * + * @author makejava + * @since 2023-12-20 14:13:16 + */ +@SuppressWarnings("serial") +public class ActiveRecommendRecords extends Model { + //主键id + private Integer id; + //活动id + private Integer activeNewlywedsId; + //所属连锁店id + private Integer chainStoreId; + //所属店铺id + private Integer storeId; + //用户id + private String userId; + //被邀请人id + private String inviteeUserId; + //创建者 + 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 getActiveNewlywedsId() { + return activeNewlywedsId; + } + + public void setActiveNewlywedsId(Integer activeNewlywedsId) { + this.activeNewlywedsId = activeNewlywedsId; + } + + 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 getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getInviteeUserId() { + return inviteeUserId; + } + + public void setInviteeUserId(String inviteeUserId) { + this.inviteeUserId = inviteeUserId; + } + + 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/activeRecommend/mapper/ActiveRecommendRecordsMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/mapper/ActiveRecommendRecordsMapper.java new file mode 100644 index 000000000..9363f1f3e --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/mapper/ActiveRecommendRecordsMapper.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.activeRecommend.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords; + +/** + * 邀请有礼记录表(ActiveRecommendRecords)表数据库访问层 + * + * @author makejava + * @since 2023-12-20 14:13:16 + */ +public interface ActiveRecommendRecordsMapper extends BaseMapper { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java new file mode 100644 index 000000000..af06d3de9 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.activeRecommend.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords; + +/** + * 邀请有礼记录表(ActiveRecommendRecords)表服务接口 + * + * @author makejava + * @since 2023-12-20 14:13:16 + */ +public interface ActiveRecommendRecordsService extends IService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java new file mode 100644 index 000000000..31a3a97f4 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java @@ -0,0 +1,19 @@ +package com.fuint.business.marketingActivity.activeRecommend.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.activeRecommend.mapper.ActiveRecommendRecordsMapper; +import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords; +import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendRecordsService; +import org.springframework.stereotype.Service; + +/** + * 邀请有礼记录表(ActiveRecommendRecords)表服务实现类 + * + * @author makejava + * @since 2023-12-20 14:13:16 + */ +@Service("activeRecommendRecordsService") +public class ActiveRecommendRecordsServiceImpl extends ServiceImpl implements ActiveRecommendRecordsService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java index ddc34a210..7d6284521 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueRecordController.java @@ -74,7 +74,7 @@ public class CardValueRecordController extends BaseController { /** * 储值卡充值 * - * @param cardValueRecord 实体对象 + * @param cardValueRecordDTO 实体对象 * @return 新增结果 */ @PostMapping diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java index 81c9a9c52..398a6cb02 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java @@ -26,6 +26,8 @@ import com.fuint.business.userManager.vo.LJUserVo; import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.RocketUtil; import com.fuint.common.util.TokenUtil; +import com.fuint.repository.mapper.MtStaffMapper; +import com.fuint.repository.model.MtStaff; import io.lettuce.core.dynamic.annotation.Param; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -73,6 +75,8 @@ public class CardValueRecordServiceImpl extends ServiceImpl