| | |
| | | import com.stylefeng.guns.modular.system.service.ITVersionManagementService; |
| | | import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.NCOSSUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.QianYunTongProperties; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.QianYunTongConfig; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | @Resource |
| | | @Autowired |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | @Autowired |
| | | private QianYunTongConfig qianYunTongConfig; |
| | | |
| | | /** |
| | | * 跳转到版本管理首页 |
| | |
| | | Map<String, Object> m = new HashMap<>(); |
| | | try { |
| | | String pictureName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(myfile.getOriginalFilename()); |
| | | String bucketName = QianYunTongProperties.bucketName; |
| | | String bucketName = qianYunTongConfig.getBucketName(); |
| | | Bucket grjyTest = NCOSSUtil.getBucketInfo(bucketName); |
| | | if (null == grjyTest) { |
| | | //创建桶 |
| | |
| | | if (null == object) { |
| | | throw new RuntimeException("上传图片失败"); |
| | | } |
| | | m.put("imgUrl", "https://traffic.qytzt.cn/v1/AUTH_" + QianYunTongProperties.account + "/" + bucketName + "/" + key); |
| | | m.put("imgUrl", "https://traffic.qytzt.cn/v1/AUTH_" + qianYunTongConfig.getAccount() + "/" + bucketName + "/" + key); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |