package com.xhpc.file.service;

import com.xhpc.file.domain.XhpcImg;
import com.xhpc.file.mapper.XhpcImgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 上传图片 服务实现类
 *
 * @author BladeX
 * @since 2020-06-17
 */
@Service
public class XhpcImgServiceImpl implements IXhpcImgService {

    @Autowired
    private XhpcImgMapper xhpcImgMapper;

    /**
     * 新增
     *
     * @param xhpcImg 上传图片信息
     * @return 结果
     */
    public int insert(XhpcImg xhpcImg) {
        return xhpcImgMapper.insert(xhpcImg);
    }

    /**
     * 更新
     *
     * @param xhpcImg 上传图片信息
     * @return 结果
     */
    public int update(XhpcImg xhpcImg) {
        return xhpcImgMapper.update(xhpcImg);
    }

    /**
     * 查询
     *
     * @param imgId 上传图片id
     * @return 结果
     */
    public XhpcImg info(Long imgId) {
        return xhpcImgMapper.info(imgId);
    }
}
