jiangqs
2023-05-10 d3abd08d49bd74000d57bd3ba97537f4fc14fa2b
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
package com.ruoyi.shop.service.impl.shop;
 
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.shop.domain.dto.MerShopSuggestDto;
import com.ruoyi.shop.domain.pojo.shop.ShopSuggest;
import com.ruoyi.shop.domain.vo.MerShopSuggestVo;
import com.ruoyi.shop.mapper.shop.ShopSuggestMapper;
import com.ruoyi.shop.service.shop.ShopSuggestService;
import com.ruoyi.system.api.domain.dto.MerPageDto;
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 ShopSuggestServiceImpl extends ServiceImpl<ShopSuggestMapper, ShopSuggest> implements ShopSuggestService {
 
    @Resource
    private ShopSuggestMapper shopSuggestMapper;
 
    /**
     *
     * @param page
     * @param merPageDto
     * @return
     */
    @Override
    public List<MerShopSuggestVo> pageMerShopSuggest(Page page, MerPageDto merPageDto){
        return shopSuggestMapper.pageMerShopSuggest(page, merPageDto);
    }
 
    /**
     *
     * @param merShopSuggestDto
     */
    @Override
    public void suggest(MerShopSuggestDto merShopSuggestDto){
        ShopSuggest shopSuggest = new ShopSuggest();
        shopSuggest.setDelFlag(0);
        shopSuggest.setCreateUserId(merShopSuggestDto.getUserId());
        shopSuggest.setShopId(merShopSuggestDto.getShopId());
        shopSuggest.setSuggestContent(merShopSuggestDto.getSuggestContent());
        shopSuggest.setCreateTime(new Date());
        this.save(shopSuggest);
    }
}