package com.ruoyi.system.service.impl.config;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.ruoyi.common.core.utils.bean.BeanUtils;
|
import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo;
|
import com.ruoyi.system.domain.dto.MerRecommendCooperationDto;
|
import com.ruoyi.system.domain.dto.MerShopRecommendPageDto;
|
import com.ruoyi.system.domain.dto.MgtAllotRecommendDto;
|
import com.ruoyi.system.domain.dto.MgtAllotRecommendPageDto;
|
import com.ruoyi.system.domain.pojo.config.RecommendCooperation;
|
import com.ruoyi.system.domain.vo.MerShopRecommendPageVo;
|
import com.ruoyi.system.domain.vo.MgtAllotRecommendPageVo;
|
import com.ruoyi.system.mapper.config.RecommendCooperationMapper;
|
import com.ruoyi.system.service.config.RecommendCooperationService;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
import java.util.Date;
|
import java.util.List;
|
|
/**
|
* <p>
|
* 服务实现类
|
* </p>
|
*
|
* @author jqs
|
* @since 2023-05-09
|
*/
|
@Service
|
public class RecommendCooperationServiceImpl extends ServiceImpl<RecommendCooperationMapper, RecommendCooperation> implements RecommendCooperationService {
|
|
@Resource
|
private RecommendCooperationMapper recommendCooperationMapper;
|
|
/**
|
* @description 分页获取商户推荐列表
|
* @param page
|
* @param merShopRecommendPageDto
|
* @return List<MerShopRecommendPageVo>
|
* @author jqs34
|
* @date 2023/6/18 14:27
|
*/
|
@Override
|
public List<MerShopRecommendPageVo> pageMerShopRecommend(Page page, MerShopRecommendPageDto merShopRecommendPageDto){
|
return recommendCooperationMapper.pageMerShopRecommend(page,merShopRecommendPageDto);
|
}
|
|
/**
|
* @description 推荐合作
|
* @param merRecommendCooperationDto
|
* @return void
|
* @author jqs34
|
* @date 2023/6/18 14:27
|
*/
|
@Override
|
public void recommendCooperation(MerRecommendCooperationDto merRecommendCooperationDto){
|
RecommendCooperation recommendCooperation = new RecommendCooperation();
|
BeanUtils.copyProperties(merRecommendCooperationDto,recommendCooperation);
|
recommendCooperation.setDelFlag(0);
|
recommendCooperation.setRecommendUserId(merRecommendCooperationDto.getUserId());
|
recommendCooperation.setShopId(merRecommendCooperationDto.getShopId());
|
recommendCooperation.setCorpStatus(1);
|
recommendCooperation.setCreateTime(new Date());
|
this.save(recommendCooperation);
|
}
|
|
/**
|
* @description pageAllotRecommend
|
* @param page
|
* @param mgtAllotRecommendPageDto
|
* @return List<MgtAllotRecommendPageVo>
|
* @author jqs34
|
* @date 2023/6/18 14:26
|
*/
|
@Override
|
public List<MgtAllotRecommendPageVo> pageAllotRecommend(Page page, MgtAllotRecommendPageDto mgtAllotRecommendPageDto){
|
List<MgtAllotRecommendPageVo> allotRecommendPageVoList = recommendCooperationMapper.pageAllotRecommend(page, mgtAllotRecommendPageDto);
|
return allotRecommendPageVoList;
|
}
|
|
/**
|
* @description 分配推荐
|
* @param mgtAllotRecommendDto
|
* @return void
|
* @author jqs34
|
* @date 2023/6/18 14:39
|
*/
|
@Override
|
public void allotRecommend(MgtAllotRecommendDto mgtAllotRecommendDto){
|
recommendCooperationMapper.allotRecommend(mgtAllotRecommendDto);
|
}
|
|
|
/**
|
* @description boardMemberTotal
|
* @param
|
* @return MgtBulletinBoardVo
|
* @author jqs34
|
* @date 2023/6/18 16:47
|
*/
|
@Override
|
public MgtBulletinBoardVo boardMemberTotal(){
|
MgtBulletinBoardVo mgtBulletinBoardVo = new MgtBulletinBoardVo();
|
mgtBulletinBoardVo.setCustomToday(recommendCooperationMapper.customToday());
|
mgtBulletinBoardVo.setCustomTotal(recommendCooperationMapper.customTotal());
|
return mgtBulletinBoardVo;
|
}
|
}
|