提交 a00f0416 作者: 刘明祎-运维用途

Merge branch 'develop'

流水线 #7557 已通过 于阶段
in 2 分 27 秒
......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag: d4393990f8ddf438e5fc11f110caeee3c8bf2a69
newTag: a7b1837ada52647282e0ce5e1e4c4d2dec8eaf0b
......@@ -108,7 +108,7 @@ public class UploadController {
// 填写本地文件的完整路径,例如D:\\localpath\\examplefile.txt。如果未指定本地路径,则默认从示例程序所属项目对应本地路径中上传文件。
uploadFileRequest.setUploadFile(file.toString());
// 指定上传并发线程数,默认值为1。
uploadFileRequest.setTaskNum(15);
uploadFileRequest.setTaskNum(30);
// 指定上传的分片大小,单位为字节,取值范围为100 KB~5 GB。默认值为100 KB。
uploadFileRequest.setPartSize(1 * 1024 * 1024);
// 开启断点续传,默认关闭。
......
package com.mmc.pms.service.mall.impl;
import com.mmc.pms.auth.dto.CompanyInfoVO;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.dao.category.CategoryDao;
import com.mmc.pms.dao.mall.AppMallGoodsDao;
......@@ -7,6 +8,7 @@ import com.mmc.pms.dao.mall.MallGoodsDao;
import com.mmc.pms.entity.category.CategoryPrimaryDO;
import com.mmc.pms.entity.mall.MallGoodsDO;
import com.mmc.pms.entity.mall.PriceStockDO;
import com.mmc.pms.feign.UserAppApi;
import com.mmc.pms.model.category.dto.CategoryPrimaryDTO;
import com.mmc.pms.model.mall.GoodsListVO;
import com.mmc.pms.model.mall.MallGoodsVO;
......@@ -16,6 +18,7 @@ import com.mmc.pms.model.qo.mall.PriceStockQO;
import com.mmc.pms.service.mall.AppMallGoodsService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -38,6 +41,9 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
@Resource
private CategoryDao categoryDao;
@Autowired
private UserAppApi userAppApi;
@Override
public ResultBody<MallGoodsVO> queryBrandGoods(Integer userAccountId) {
List<MallGoodsDO> mallGoodsList = appMallGoodsDao.queryGoodsInfo(userAccountId, null);
......@@ -48,15 +54,32 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
@Override
public ResultBody<MallGoodsVO> queryGoodsInfoByCategorySub(List<Integer> categorySubIds) {
List<MallGoodsDO> mallGoodsList = appMallGoodsDao.queryGoodsInfo(null, categorySubIds);
for(MallGoodsDO mallGoodsDO : mallGoodsList) {
List<PriceStockDO> priceStockDOS = mallGoodsDao.listPriceStock(mallGoodsDO.getId());
if(priceStockDOS != null) {
mallGoodsDO.setPriceStockDOS(priceStockDOS);
}
}
return checkGoodsInfo(mallGoodsList);
}
private ResultBody<MallGoodsVO> checkGoodsInfo(List<MallGoodsDO> mallGoodsList) {
if (CollectionUtils.isNotEmpty(mallGoodsList)) {
return ResultBody.success(mallGoodsList.stream().map(MallGoodsDO::buildListMallGoodsVO).collect(Collectors.toList()));
List<MallGoodsVO> collect = mallGoodsList.stream().map(MallGoodsDO::buildListMallGoodsVO).collect(Collectors.toList());
setCompanyName(collect);
return ResultBody.success(collect);
}
return ResultBody.success();
}
private void setCompanyName(List<MallGoodsVO> pageList) {
List<Integer> userAccountIds = pageList.stream().map(MallGoodsVO::getUserAccountId).collect(Collectors.toList());
List<CompanyInfoVO> companyInfoVOS = userAppApi.listCompanyInfoByBUIds(userAccountIds);
if (CollectionUtils.isNotEmpty(companyInfoVOS)) {
Map<Integer, String> collect = companyInfoVOS.stream().collect(Collectors.toMap(CompanyInfoVO::getBackUserAccountId, CompanyInfoVO::getCompanyName));
pageList.forEach(i -> i.setCompanyName(collect.get(i.getUserAccountId())));
}
}
@Override
public ResultBody<GoodsListVO> brandStoreList(List<Integer> userAccountIds) {
......
......@@ -26,7 +26,7 @@ springfox:
aliyun:
oss:
endpoint: oss-cn-hangzhou.aliyuncs.com
endpoint: oss-cn-hangzhou-internal.aliyuncs.com
access-key-id: LTAI5tK6UG2LzMkf1FKZBkBU
access-key-secret: ${OSS_ACCESS_KEY_SECRET}
bucket: share-fly
......
......@@ -7,9 +7,8 @@ spring:
password: IUAV_DEV@2023&MYSQL
redis:
database: 1
host: r-wz9ke310fs684hacn1pd.redis.rds.aliyuncs.com
host: 127.0.0.1
port: 6379
password: MMC@2022&REDIS
servlet:
multipart:
max-file-size: 512MB
......@@ -39,6 +38,7 @@ aliyun:
access-key-id: LTAI5tK6UG2LzMkf1FKZBkBU
access-key-secret: UrXws5uVH6JMf0jCwipjOug4nHQvAz
bucket: share-fly
domain: https://file.iuav.com
mmcflying:
download:
......
......@@ -26,7 +26,7 @@ springfox:
aliyun:
oss:
endpoint: oss-cn-hangzhou.aliyuncs.com
endpoint: oss-cn-hangzhou-internal.aliyuncs.com
access-key-id: LTAI5tK6UG2LzMkf1FKZBkBU
access-key-secret: ${OSS_ACCESS_KEY_SECRET}
bucket: share-fly
......
......@@ -15,6 +15,7 @@
mg.goods_label,
mg.label_show,
mg.recommend,
mg.price_show,
mg.category_sub_id,
mg.goods_label,
img.id as imgId, img.url,
......
......@@ -39,3 +39,7 @@ data-filter:
- /pms/lease/goods/feignLeaseGoodsInfoByAddressId
- /pms/industry/listIndustry
- /pms/app/goods/recommend
- /pms/brand/listBrandInfo
- queryGoodsInfoByCategorySub
- /pms/brand/listBrandInfo
- queryGoodsInfoByCategorySub
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论