package cn.com.ctop.crawler.modules.pangolin.service.impl;

import cn.com.ctop.common.module.utils.ResultMapUtils;
import cn.com.ctop.common.module.utils.StatusCode;
import cn.com.ctop.crawler.modules.pangolin.entity.PangolinApp;
import cn.com.ctop.crawler.modules.pangolin.mapper.PangolinAppMapper;
import cn.com.ctop.crawler.modules.pangolin.service.PangolinAppService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class PangolinAppServiceImpl extends ServiceImpl<PangolinAppMapper, PangolinApp> implements PangolinAppService {
    @Autowired
    private PangolinAppMapper pangolinAppMapper;
    @Override
    public Map<String, Object> getListByUserId(String userId) {
        Map<String,Object>result = new HashMap<>();
        List<PangolinApp>appList = pangolinAppMapper.getListByUserId(userId);
        result.put("data",appList);
        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
        return result;
    }
}
