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.DateUtils;
|
import com.ruoyi.common.core.utils.bean.BeanUtils;
|
import com.ruoyi.system.domain.dto.MerRecommendCooperationDto;
|
import com.ruoyi.system.domain.dto.MerShopRecommendPageDto;
|
import com.ruoyi.system.domain.pojo.config.RecommendCooperation;
|
import com.ruoyi.system.domain.vo.MerShopRecommendPageVo;
|
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;
|
|
/**
|
*
|
* @param page
|
* @param merShopRecommendPageDto
|
* @return
|
*/
|
@Override
|
public List<MerShopRecommendPageVo> pageMerShopRecommend(Page page, MerShopRecommendPageDto merShopRecommendPageDto){
|
return recommendCooperationMapper.pageMerShopRecommend(page,merShopRecommendPageDto);
|
}
|
|
/**
|
*
|
* @param merRecommendCooperationDto
|
*/
|
@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(DateUtils.getNowDate());
|
this.save(recommendCooperation);
|
}
|
}
|