Compare commits

..

10 Commits

Author SHA1 Message Date
zcc 02be470cd3 chore(config): 修改默认配置文件激活环境
1 month ago
zcc d57e280c93 docs:移除README中的大厂本硕博单身群相关内容- 删除了README.md文件中的"大厂本硕博单身群"部分
4 months ago
zcc d48a582014 license: 更新许可证信息
6 months ago
czc 5babe81de3 test(ruoyi-admin): 添加 Controller 测试用例并优化OssUtils 下载功能
6 months ago
zcc 19e941a787 test(ruoyi-admin): 添加 Controller 测试用例并优化OssUtils 下载功能
6 months ago
DataCall 7d2f8ce56e test(oss): 更新 OssUtils 类并测试文件下载功能
7 months ago
zcc 0a3885d700 refactor(oss): 重构OssUtils 类并更新测试用例
7 months ago
zccbbg 2ca82c99f5 test(oss): 添加 OSS 文件下载测试用例
7 months ago
zccbbg aef63aa6fd docs:readme.md更新
12 months ago
zccbbg 8fb36b1e9a docs:readme.md更新
1 year ago

@ -1,20 +1,19 @@
The MIT License (MIT) # Open Source License
Copyright (c) 2018 RuoYi ruoyi-mall is licensed under a modified version of the Apache License 2.0, with the following additional conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of 1. ruoyi-mall may be utilized commercially, including as a backend service for other applications or as an application development platform for enterprises. Should the conditions below be met, a commercial license must be obtained from the producer:
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to a. Multi-tenant service: Unless explicitly authorized by ruoyi-mall in writing, you may not use the ruoyi-mall source code to operate a multi-tenant environment.
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so, b. LOGO and copyright information: In the process of using ruoyi-mall's frontend, you may not remove or moruoyi-mall the LOGO or copyright information in the ruoyi-mall console or applications. This restriction is inapplicable to uses of ruoyi-mall that do not involve its frontend.
subject to the following conditions: - Frontend Definition: For the purposes of this license, the "frontend" of ruoyi-mall includes all components located in the web/ directory when running ruoyi-mall from the raw source code, or the "web" image when running ruoyi-mall with Docker.
The above copyright notice and this permission notice shall be included in all 2. As a contributor, you should agree that:
copies or substantial portions of the Software.
a. The producer can adjust the open-source agreement to be more strict or relaxed as deemed necessary.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR b. Your contributed code may be used for commercial purposes, including but not limited to its cloud business operations.
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR Apart from the specific conditions mentioned above, all other rights and restrictions follow the Apache License 2.0. Detailed information about the Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0.
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN The interactive design of this product is protected by appearance patent.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -33,10 +33,7 @@ http://mall.ichengle.top
<img src="doc/h5演示.png" width="200px"> <img src="doc/h5演示.png" width="200px">
## 若依技术专栏 ## 若依技术专栏
- 常见问题https://blog.csdn.net/qq_27575627/category_12336113.html 关注文末公众号回复:星球
- 后端技术https://blog.csdn.net/qq_27575627/category_12331868.html
- 前端技术https://blog.csdn.net/qq_27575627/category_12331867.html
- 运维https://blog.csdn.net/qq_27575627/category_12332546.html
## 若依mall功能 ## 若依mall功能
1. 首页: 1. 首页:
@ -60,7 +57,8 @@ http://mall.ichengle.top
6. CMS内容管理 6. CMS内容管理
![img.png](doc/内容管理.png) ![img.png](doc/内容管理.png)
## 大厂、央国企内推 ## 科技企业招聘、内推渠道
如果投简历经常已读不回,可以试试这个小程序,回复率相对高一点:
![内推](doc/内推.png) ![内推](doc/内推.png)
## 交流群/技术支持 ## 交流群/技术支持

@ -0,0 +1,46 @@
package com.fjp.lc.test.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cyl.h5.controller.H5OrderController;
import com.cyl.h5.domain.form.ApplyRefundForm;
import com.cyl.manager.oms.domain.entity.Order;
import com.cyl.manager.oms.domain.entity.OrderItem;
import com.cyl.manager.oms.mapper.OrderMapper;
import com.cyl.manager.oms.service.OrderService;
import com.ruoyi.RuoYiApplication;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import java.math.BigDecimal;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = RuoYiApplication.class)
@ActiveProfiles("dev")
@Slf4j
public class ControllerTest {
@Autowired
private H5OrderController h5OrderController;
@Autowired
private OrderMapper orderMapper;
@Test
public void test() {
ApplyRefundForm applyRefundForm = new ApplyRefundForm();
QueryWrapper<Order> queryWrapper = new QueryWrapper();
queryWrapper.eq("pay_id", 6226229322123265l);
Order order = orderMapper.selectOne(queryWrapper);
applyRefundForm.setOrderId(order.getId());
applyRefundForm.setApplyRefundType(1);
applyRefundForm.setReason("不要了");
applyRefundForm.setQuantity(1);
applyRefundForm.setRefundAmount(new BigDecimal(0.01));
h5OrderController.applyRefund(applyRefundForm);
}
}

@ -0,0 +1,173 @@
package com.fjp.lc.test.service;
import com.ruoyi.RuoYiApplication;
import com.ruoyi.common.utils.OssUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = RuoYiApplication.class)
@ActiveProfiles("dev")
public class OssTest {
@Autowired
private OssUtils ossUtils;
@Test
public void download() {
ossUtils.downloadFile("2022/12/306da8f7f6491046ba86633e4de8240b84微信图片_20220606114231.jpg");
ossUtils.downloadFile("2022/12/29543652b023af4caeb5d9d74c2f98bdfb微信图片_20220606114231.jpg");
ossUtils.downloadFile("2022/12/30237d83af8f8e494f98caff9ac87d8eed微信图片_20220801215429.png");
ossUtils.downloadFile("2023/03/119682c2bb40d54639b51f9819cb127f44400x400.png");
ossUtils.downloadFile("2023/03/11a67b86d4dd6b4fc687f9044155c34083400x400blue.png");
ossUtils.downloadFile("2023/07/26975a5546e4e14baca40ffde696ee3ffb微信图片_202304151221202.jpg");
ossUtils.downloadFile("2023/07/26e89dd1d370b74598aba6dd7cced81f72微信图片_20230415121747.jpg");
ossUtils.downloadFile("2023/07/2625f4fc4576974035990f35ffae4cbe89微信图片_202305311200104.jpg");
ossUtils.downloadFile("2023/07/269436b74dd01f45a09e0d63c02bc2bc20微信图片_202207241638361.jpg");
ossUtils.downloadFile("2023/07/2609fb7c7b52f04b29893fb7034d5488eb微信图片_20220822144529.jpg");
ossUtils.downloadFile("2023/07/26561982918fbd4269abc1a87ea7c2f09b微信图片_20230518014301.jpg");
ossUtils.downloadFile("2023/05/26572ddcb26dd64ea9aef1615c518311f2main.jpg");
ossUtils.downloadFile("2023/07/26b0e6d79409c047afbf435c2e45b2864e微信图片_202305070430094.jpg");
ossUtils.downloadFile("2023/07/268673a92f29ea4ed9a3503587c658fb7d微信图片_20230304190516.jpg");
ossUtils.downloadFile("2023/08/14ff4bde97153a416e9cdde8035bc7e0f326db1efa38167a4cd5ab392cd7bb6b8fc9ed5b46ef3e460fe27f73aa280993004.jpg.png");
ossUtils.downloadFile("2023/07/269922ae58ef074304a907f6524d13401c微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/26ecce066aa266490b9462dd6326ad1718微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/26ecce066aa266490b9462dd6326ad1718微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/26ecce066aa266490b9462dd6326ad1718微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/26ecce066aa266490b9462dd6326ad1718微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/26ecce066aa266490b9462dd6326ad1718微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/26ecce066aa266490b9462dd6326ad1718微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/26ecce066aa266490b9462dd6326ad1718微信图片_20220801215429.png");
ossUtils.downloadFile("2023/12/03847a4833090f40de9c6b49f7d553608a微信图片_202303082336274.jpg");
ossUtils.downloadFile("2023/12/034459c85e71e3402aba5eb7e0531201fd微信图片_202303082336273.jpg");
ossUtils.downloadFile("2023/12/03d3e5fc569e7d42529c8a3b504ae4d92c微信图片_202303082336271.jpg");
ossUtils.downloadFile("2023/12/0383e8c4d2be284355a07233bc1c38e6d7微信图片_202303082336272.jpg");
ossUtils.downloadFile("2023/06/12539d8d04c72247c4bd4ac3820ae939a3227ddfae236d5a4adca97541f7937488dc033fc965331ca74b3a9d6daa9fd0e48225sy_content_good_stuff@2x.png");
ossUtils.downloadFile("2023/03/113d7ab00580e44f9ab2d274c0e3f9cd89400x400.png");
ossUtils.downloadFile("2023/03/11a1e8bc35653044d2a2012ef1a30dc5d9blue.png");
ossUtils.downloadFile("2023/03/11ca202adcbef54a97879e3b6ca9214729red.png");
ossUtils.downloadFile("2023/03/113be968d872ca4a0bb0d8fc08e13bb81fgrey.png");
ossUtils.downloadFile("2023/03/112f186945ad444e71a6fdaf5a634577d0yellow.png");
ossUtils.downloadFile("2023/03/11703d301ec87448a8ad8c754ca7c043e5blue.png");
ossUtils.downloadFile("2023/06/126850de7100594b2cbe67ba10ac30315e227ddfae236d5a4adca97541f7937488dc033fc965331ca74b3a9d6daa9fd0e48225sy_content_good_stuff@2x.png");
ossUtils.downloadFile("2023/06/1297a4dd69e5b14fe0bc8da968c0b2043f22dea3ccb9cd45412da6300c5ac7d8f68903bae3d53cef7f4dfeb38bbafe109a3755sy_content_digital@2x.png");
ossUtils.downloadFile("2023/06/1261979f808cb04d108727cf3709ffa355226569ab1688ec4eb8a7a2d879f3cd36b303df12b214f50f49928b53ad113e11170bsy_content_apparel@2x.png");
ossUtils.downloadFile("2023/06/123c2915e18c604f3290ff4876954f6aa32213fbf4b69d9041d68da50fdd71aa6b5403afbad6ea2bce46db8108e48eb2bed9d3sy_content_care@2x.png");
ossUtils.downloadFile("2023/06/12beec9af7400c44deb3951fa5be95b0ae22e0ce080252874dd4b22e7559ac1478bf036ce7046f48eb4faba7f43849d2d7814dsy_content_rice@2x.png");
ossUtils.downloadFile("2023/06/12cbeee94461d44d13bba3503682286e382231e1747caf7a4f9f9d54af5789d1d538033d7aaef21b2b4984abd8a07a2b97c49csy_content_drinks@2x.png");
ossUtils.downloadFile("2023/06/121dde34bbb8024ac99e09af20e380d78822b62a9a9f2e8349cc9e0321a53e27bf780322d4a84f6c334c7d984484f04e87dbb1sy_content_sports@2x.png");
ossUtils.downloadFile("2023/06/129a33a0881f4e4d279cc067e592b588612253d01aa5f365420e8b96cd93ee1893f6035a69224ec7904e2b94047f22ddfb5d19sy_content_other@2x.png");
ossUtils.downloadFile("2023/03/119682c2bb40d54639b51f9819cb127f44400x400.png");
ossUtils.downloadFile("2023/03/11a67b86d4dd6b4fc687f9044155c34083400x400blue.png");
ossUtils.downloadFile("2023/07/26975a5546e4e14baca40ffde696ee3ffb微信图片_202304151221202.jpg");
ossUtils.downloadFile("2023/07/26e89dd1d370b74598aba6dd7cced81f72微信图片_20230415121747.jpg");
ossUtils.downloadFile("2023/07/2625f4fc4576974035990f35ffae4cbe89微信图片_202305311200104.jpg");
ossUtils.downloadFile("2023/07/269436b74dd01f45a09e0d63c02bc2bc20微信图片_202207241638361.jpg");
ossUtils.downloadFile("2023/07/2609fb7c7b52f04b29893fb7034d5488eb微信图片_20220822144529.jpg");
ossUtils.downloadFile("2023/07/26561982918fbd4269abc1a87ea7c2f09b微信图片_20230518014301.jpg");
ossUtils.downloadFile("2023/05/26572ddcb26dd64ea9aef1615c518311f2main.jpg");
ossUtils.downloadFile("2023/07/26b0e6d79409c047afbf435c2e45b2864e微信图片_202305070430094.jpg");
ossUtils.downloadFile("2023/07/268673a92f29ea4ed9a3503587c658fb7d微信图片_20230304190516.jpg");
ossUtils.downloadFile("2023/08/14ff4bde97153a416e9cdde8035bc7e0f326db1efa38167a4cd5ab392cd7bb6b8fc9ed5b46ef3e460fe27f73aa280993004.jpg.png");
ossUtils.downloadFile("2023/07/269922ae58ef074304a907f6524d13401c微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/26ecce066aa266490b9462dd6326ad1718微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/264d37c9c96f464a3c9a25cca77312e2a6微信图片_20220801215429.png");
ossUtils.downloadFile("2023/07/263ab3be7a6bb24ad7b809f550e0948939微信图片_20220801215429.png");
ossUtils.downloadFile("2023/06/16f6c3727142d4486089a09dbd19762c39266fb233a90ba449bf9c082ebd592078dd1679204678mm5.jpg");
ossUtils.downloadFile("2023/06/1654b558f7bbc241a8aecd5f017227a3e4266fb233a90ba449bf9c082ebd592078dd1679204678mm5.jpg");
ossUtils.downloadFile("2023/06/1638b241a1b12d4a4ebf8c5eb08bc9986d266fb233a90ba449bf9c082ebd592078dd1679204678mm5.jpg");
ossUtils.downloadFile("2023/06/16da593a9165834cabb4ab5ed2ba580cbd266fb233a90ba449bf9c082ebd592078dd1679204678mm5.jpg");
ossUtils.downloadFile("2023/12/03847a4833090f40de9c6b49f7d553608a微信图片_202303082336274.jpg");
ossUtils.downloadFile("2023/12/034459c85e71e3402aba5eb7e0531201fd微信图片_202303082336273.jpg");
ossUtils.downloadFile("2023/12/03d3e5fc569e7d42529c8a3b504ae4d92c微信图片_202303082336271.jpg");
ossUtils.downloadFile("2023/12/0383e8c4d2be284355a07233bc1c38e6d7微信图片_202303082336272.jpg");
ossUtils.downloadFile("2023/08/148a3892f617f04af3ab2da2dbf50b2219269922ae58ef074304a907f6524d13401c微信图片_20220801215429.png.png");
ossUtils.downloadFile("2023/05/266fb233a90ba449bf9c082ebd592078dd1679204678mm5.jpg");
ossUtils.downloadFile("2023/05/2602dc3dc1e02f44289c89a5426b3922femain.jpg");
ossUtils.downloadFile("2023/05/2688e9a4a5a22847eda09c555a0f16f3a52222.png");
ossUtils.downloadFile("2023/07/26db1efa38167a4cd5ab392cd7bb6b8fc9ed5b46ef3e460fe27f73aa280993004.jpg");
ossUtils.downloadFile("2023/07/26079a8b93ec924d44b11915cc17dfd53e微信图片_20230415122120.jpg");
ossUtils.downloadFile("2023/07/267eaa27402fd44f2ea12801cd263b6a41微信图片_20230507043009.jpg");
ossUtils.downloadFile("2023/07/26d9a42d98a1a244d094b39516be0241c9微信图片_20230415121747.jpg");
ossUtils.downloadFile("2023/07/263c45b789fb254c2fbc6bb639357b3f5f微信图片_202305311200104.jpg");
ossUtils.downloadFile("2023/07/269436b74dd01f45a09e0d63c02bc2bc20微信图片_202207241638361.jpg");
ossUtils.downloadFile("2023/07/2609fb7c7b52f04b29893fb7034d5488eb微信图片_20220822144529.jpg");
ossUtils.downloadFile("2023/07/268673a92f29ea4ed9a3503587c658fb7d微信图片_20230304190516.jpg");
ossUtils.downloadFile("2023/07/26561982918fbd4269abc1a87ea7c2f09b微信图片_20230518014301.jpg");
ossUtils.downloadFile("2023/12/187be2528584434a488b4580c363bc559d作品.jpg");
ossUtils.downloadFile("2023/07/26f73d933b547a4574979ee7ae3ede47f4微信图片_202304151217474.jpg");
ossUtils.downloadFile("2023/05/26972c7a98b6df49dab1fe839232bff5c31679204678mm5.jpg");
ossUtils.downloadFile("2023/05/267c68f6226f2a443485699c8411e299d4main.jpg");
ossUtils.downloadFile("2023/05/26db36f518447d4df98957285931c83d7c1r.jpg");
ossUtils.downloadFile("2023/05/2629464fb14f79418985a99ba3238b8db624.jpg");
ossUtils.downloadFile("2023/05/267c89e30b8f8c45d58161a4e78800d4813.jpg");
ossUtils.downloadFile("2023/05/263a48cd980e5546f8b2db583f1753c6f64.jpg");
ossUtils.downloadFile("2023/05/263252d6187d1647c186b5c3e703615e352222.png");
ossUtils.downloadFile("2023/07/26fb45128fd4e44b049148db359ff53c01a82772585ab081455e14bbe92afbc64.jpg");
ossUtils.downloadFile("2023/07/2619a2b65b4ac54d10a8ccd1078d800a7bc46ad9eba9cd72a0995a1ea0c3f06dd.jpg");
ossUtils.downloadFile("2023/07/26d43585cc52dd43e7b33d29a8812bf766微信图片_202303292142191.jpg");
ossUtils.downloadFile("2023/07/2636761e811dfb4c1192cf3aeaf6c32a78微信图片_20230329214219.jpg");
ossUtils.downloadFile("2023/07/26af858c07e28044baabf4670f0a18d759微信图片_202303292142192.jpg");
ossUtils.downloadFile("2023/07/2681376357d7ae42a5b78f318c23d57e14微信图片_202304151221203.jpg");
ossUtils.downloadFile("2023/07/261e8252d98a2f46698ca78f15107cc49f微信图片_202304151221204.jpg");
ossUtils.downloadFile("2023/07/26abbd8208878349669e0fb7ea6df11350微信图片_202304151221201.jpg");
ossUtils.downloadFile("2023/07/267008c38e1fd54ea593693eed573963f7微信图片_20230415122120.jpg");
ossUtils.downloadFile("2023/07/2635b63ed15d1345d08e6a685701cc58f1微信图片_202304151221202.jpg");
ossUtils.downloadFile("2023/07/260c209bf387f6490db6505aee72e620f5微信图片_20230507043009.jpg");
ossUtils.downloadFile("2023/07/268dcb6126ad73407eabb54baa2fb0ec80微信图片_202305070430091.jpg");
ossUtils.downloadFile("2023/07/262df759a436784bc481080e25a2d9d708微信图片_202305070430092.jpg");
ossUtils.downloadFile("2023/07/26666593a296a64088af4eb0647a4e2f20微信图片_202305070430094.jpg");
ossUtils.downloadFile("2023/07/26e1c4d225037746bea54766d2d947aae2微信图片_202305070430093.jpg");
ossUtils.downloadFile("2023/07/265d82761866ec44a1891a03dc079951de微信图片_20230415121747.jpg");
ossUtils.downloadFile("2023/07/266b3a6d093bc344409937958a83422c4e微信图片_202304151217471.jpg");
ossUtils.downloadFile("2023/07/26c681b61d879d48a8a50f219bf0b45423微信图片_202304151217474.jpg");
ossUtils.downloadFile("2023/07/26c92bd48e55634ed18ce7a49f3488a5e5微信图片_202304151217472.jpg");
ossUtils.downloadFile("2023/07/26160d66ecfa6d4e4480936c0627ab6168微信图片_202304151217473.jpg");
ossUtils.downloadFile("2023/07/26e91ff64478f8405a817964730d35f645微信图片_20230531120010.jpg");
ossUtils.downloadFile("2023/07/262d7e659fc9044a35a00717d927eb6201微信图片_202305311200101.jpg");
ossUtils.downloadFile("2023/07/26b6d799a3e30e43c4900bd726f1d87c39微信图片_202305311200103.jpg");
ossUtils.downloadFile("2023/07/26555fabd98cdf46a58c391898c63f62f2微信图片_202305311200102.jpg");
ossUtils.downloadFile("2023/07/26f44d84cea13f4276b92c75d072aabeea微信图片_202305311200104.jpg");
ossUtils.downloadFile("2023/07/2627916262b7c442a08c04f1b3738a1ccc微信图片_20220724163836.jpg");
ossUtils.downloadFile("2023/07/26ef9876f509e14e0985fb045ea4f8d02f微信图片_202207241638361.jpg");
ossUtils.downloadFile("2023/07/26f2ac39fef9d7491a8a3908df9695ab51微信图片_202207241638362.jpg");
ossUtils.downloadFile("2023/07/2676b97cc6b45a43ba96756e9b21dcf2cb微信图片_202207241638363.jpg");
ossUtils.downloadFile("2023/07/263867f3bf67f248ce9c31fe0985f40523微信图片_202208221445291.jpg");
ossUtils.downloadFile("2023/07/26feafa3cc0e584620855759538098bc4f微信图片_202208221445292.jpg");
ossUtils.downloadFile("2023/07/268699fd3e13bb42c5a941784fe85ff366微信图片_202208221445294.jpg");
ossUtils.downloadFile("2023/07/26b717d87954914c60893fdff0bc6eb83d微信图片_202208221445293.jpg");
ossUtils.downloadFile("2023/07/267af6e46a2119467ab7baf569f57e0136微信图片_202303041905163.jpg");
ossUtils.downloadFile("2023/07/26386743e26a594bdcaaf4d481d5d34b0a微信图片_202303041905164.jpg");
ossUtils.downloadFile("2023/07/26e258e26755474d12967277e16281c0f6微信图片_202303041905165.jpg");
ossUtils.downloadFile("2023/07/267a9d29bb17a3403e84edc968fb2a5133微信图片_202305180143012.jpg");
ossUtils.downloadFile("2023/07/26a1f38481c8784e2782f1857b35dfacc1微信图片_202305180143014.jpg");
ossUtils.downloadFile("2023/07/267bc956e7bb97441e98af9d07aee71f1c微信图片_202305180143013.jpg");
ossUtils.downloadFile("2023/07/26ee7b2f3365a848c6a952a7b9c4582023微信图片_2022080121");
ossUtils.downloadFile("2023/05/268ee9e13df1fb499697550eec576b08af1.png");
ossUtils.downloadFile("2023/05/26795e6f86285a4cc99c21d79f3ad06e1e2.jpg");
ossUtils.downloadFile("2023/05/26772b2920bfd04a1faf85fe6a9ff5bb953.jpg");
ossUtils.downloadFile("2023/05/2600944930702a442583d92c3bd6ba6af94.jpg");
ossUtils.downloadFile("2023/05/26b6ba13ad4ade4ba881466c58cb21bfd8main.jpg");
ossUtils.downloadFile("2023/05/262961530966aa48c5a5f13860b446a0df24.jpg");
ossUtils.downloadFile("2023/05/26d678b548b96b437cb1ca4402771525c23.jpg");
ossUtils.downloadFile("2023/05/264d31c21f18924e02bd386dd7be61809e4.jpg");
ossUtils.downloadFile("2023/05/26ba2304c124294ff6b47e3b7bb9faa900a.jpg");
ossUtils.downloadFile("2023/05/26dcc01da95cb7466095ee4be3e8e57943b.jpg");
ossUtils.downloadFile("2023/05/266a1c5e16e05b45cfbe152af9ca558b70c.png");
ossUtils.downloadFile("2023/07/2665647ec5442d4e72960fa1772b5a2befa82772585ab081455e14bbe92afbc64.jpg");
ossUtils.downloadFile("2023/07/26759113e01b5f4230be78447d733de531微信图片_202304151221205.jpg");
ossUtils.downloadFile("2023/07/264e6e7ee82cb144b498757c8c2b65bf83微信图片_20230507043009.jpg");
ossUtils.downloadFile("2023/07/26898650b538c34de399e831417c4bb69a微信图片_202304151217474.jpg");
ossUtils.downloadFile("2023/07/269e8efd18c2784fe29898d8f0885cc688微信图片_202305311200101.jpg");
ossUtils.downloadFile("2023/07/2688d0c5787ae54b158b88a03a3f874c68微信图片_202305311200102.jpg");
ossUtils.downloadFile("2023/07/26596a8e6b207a474fa4e7cf5560da251d微信图片_202207241638366.jpg");
ossUtils.downloadFile("2023/07/26832713b49dd4488eaf3c3d46b9dfe83d微信图片_202207241638367.jpg");
ossUtils.downloadFile("2023/07/26e9928d05666e47e488491e63d8d4c7d5微信图片_20220822144529.jpg");
ossUtils.downloadFile("2023/07/26c442b5df35c140228dde498ef4b6c1d2微信图片_202303041905161.jpg");
ossUtils.downloadFile("2023/07/26779b5452701140d9927c698825eb93e0微信图片_202305180143011.jpg");
ossUtils.downloadFile("2023/07/26405414f3d4134af1a786585c6780f88c微信图片_202305180143014.jpg");
}
}

@ -3,14 +3,19 @@ package com.ruoyi.common.utils;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import com.aliyun.oss.OSS; import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder; import com.aliyun.oss.OSSClientBuilder;
import com.aliyun.oss.model.DownloadFileRequest;
import com.aliyun.oss.model.GetObjectRequest;
import com.ruoyi.common.utils.uuid.UUID; import com.ruoyi.common.utils.uuid.UUID;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@Slf4j
@Component @Component
public class OssUtils { public class OssUtils {
@ -26,6 +31,20 @@ public class OssUtils {
@Value("${aliyun.oss.bucketName}") @Value("${aliyun.oss.bucketName}")
private String bucketName; private String bucketName;
public void downloadFile(String objectName){
// 创建OSSClient实例。
OSS ossClient = new OSSClientBuilder().build(endPoint, accessKeyId, secretAccessKey);
//截取objectName的第二个/之后的内容作为pathName
String pathName = objectName.substring(objectName.lastIndexOf("/"));
try{
ossClient.getObject(new GetObjectRequest(bucketName, objectName), new File("D:\\oss\\"+pathName));
}catch (Exception e){
log.error(pathName);
}
}
public String uploadOneFile(MultipartFile file) { public String uploadOneFile(MultipartFile file) {
// 创建OSSClient实例。 // 创建OSSClient实例。

@ -5,9 +5,9 @@ spring:
# schema: classpath*:sql/init.sql # schema: classpath*:sql/init.sql
# data: classpath:sql/data.sql # data: classpath:sql/data.sql
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://rm-wz987gwxg397qojlao.mysql.rds.aliyuncs.com:3638/ry_mall?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true&allowMultiQueries=true url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: mall_cyl username: root
password: asdfpCC_sodpfjoDD_piuPOi password: password
jpa: jpa:
properties: properties:
hibernate: hibernate:
@ -27,11 +27,11 @@ gen:
# 作者 # 作者
author: zcc author: zcc
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.cyl.manager.aws packageName: com.cyl.manager.pms
# 自动去除表前缀默认是false # 自动去除表前缀默认是false
autoRemovePre: true autoRemovePre: true
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔) # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
tablePrefix: aws_ tablePrefix: pms_
# 一级权限名 # 一级权限名
rootPermission: mall rootPermission: mall
# 模板根路径 # 模板根路径
@ -39,17 +39,17 @@ gen:
# 路径 # 路径
path: path:
# 后端根目录 # 后端根目录
backPath: D:\workspace\RuoYi-Mall\ backPath: C:\Users\zccbbg\ichengle\ruoyi-mall\
# 后端 service 模块名 # 后端 service 模块名
serviceModule: ruoyi-mall serviceModule: ruoyi-mall
# 后端 api 模块名, 默认与 service 一致 # 后端 api 模块名, 默认与 service 一致
apiModule: ruoyi-mall apiModule: ruoyi-mall
# 前端根目录 # 前端根目录
frontPath: D:\workspace\ruoyi-mall-vue\ frontPath: C:\Users\zccbbg\ichengle\ruoyi-mall-vue\
# 前端 api 目录 # 前端 api 目录
frontApiPath: src/api/aws frontApiPath: src/api/pms
# 前端 view 目录 # 前端 view 目录
frontViewPath: src/views/aws frontViewPath: src/views/pms
# sql 目录 # sql 目录
sql: sql sql: sql
# 环境变量 # 环境变量

Loading…
Cancel
Save