package cn.com.qmth.examcloud.core.questions.service;

import java.util.UUID;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.qmth.examcloud.core.questions.service.config.SysProperty;

@Service
public class UpYunService {
    private static final Logger log = LoggerFactory.getLogger(UpYunService.class);

    public static final String TEMP_FILE_EXP = "docxExport/";

    @Autowired
    private SysProperty sysProperty;

//    public UpYun getInstance() {
//        UpYun upyun = new UpYun(sysProperty.getBucketName(), sysProperty.getUserName(), sysProperty.getPassword());
//        upyun.setDebug(true);
//        upyun.setTimeout(15);
//        upyun.setApiDomain(UpYun.ED_AUTO);
//        return upyun;
//    }

    public String randomUUID() {
        return UUID.randomUUID().toString().replaceAll("-", "");
    }

}