jiangqs
2023-06-01 fab844ecb6ff7c55a625b54e5481e0a2ab13abff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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);
    }
}