package com.crm.custom.service.impl;

import com.crm.custom.service.CommonService;
import com.crm.custom.service.impl.base.BaseUploadServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

@Slf4j
@Service
public class CommonServiceImpl extends BaseUploadServiceImpl implements CommonService {
    @Override
    public String uploadFile(String middlePath, MultipartFile file) throws Exception {

        String path = saveFile(middlePath, file);

        return path;
    }

    @Override
    public String uploadFile(MultipartFile file) throws Exception {
        String middlePath = "/common";
        return uploadFile(middlePath, file);
    }

}
