商品bug
This commit is contained in:
@@ -141,8 +141,8 @@ jobs:
|
||||
cd ${{ env.REMOTE_DEPLOY_PATH }}
|
||||
echo "停止旧容器..."
|
||||
docker compose down || true
|
||||
echo "清理Docker资源..."
|
||||
docker system prune -f
|
||||
# echo "清理Docker资源..."
|
||||
# docker system prune -f
|
||||
echo "构建镜像..."
|
||||
docker compose build --no-cache
|
||||
echo "启动服务..."
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -24,7 +24,7 @@
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<mybatis-plus.version>3.5.6</mybatis-plus.version>
|
||||
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
||||
<minio.version>8.5.7</minio.version>
|
||||
<jwt.version>0.12.3</jwt.version>
|
||||
<hutool.version>5.8.26</hutool.version>
|
||||
|
||||
@@ -25,13 +25,13 @@ public class MyBatisPlusConfig {
|
||||
return new MetaObjectHandler() {
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
|
||||
this.strictInsertFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
|
||||
this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime::now);
|
||||
this.strictInsertFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime::now);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
|
||||
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime::now);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public class ListingServiceImpl extends ServiceImpl<ListingMapper, ListingEntity
|
||||
List<ListingImageDTO> imageDTOs = images.stream().map(img -> {
|
||||
ListingImageDTO imgDto = new ListingImageDTO();
|
||||
BeanUtils.copyProperties(img, imgDto);
|
||||
imgDto.setImageUrl(minioUtil.processMinioResource(imgDto.getImageUrl(),CommonConstants.MINIO_PATH_TIMEOUT));
|
||||
imgDto.setImageUrl(minioUtil.processMinioResource(imgDto.getImageUrl(), CommonConstants.MINIO_PATH_TIMEOUT));
|
||||
imgDto.setIsSelected(img.getIsSelected() != null && img.getIsSelected() == 1);
|
||||
return imgDto;
|
||||
}).collect(Collectors.toList());
|
||||
@@ -224,9 +224,11 @@ public class ListingServiceImpl extends ServiceImpl<ListingMapper, ListingEntity
|
||||
|
||||
for (int i = 0; i < categoryImages.size(); i++) {
|
||||
ListingImageDTO imgDto = categoryImages.get(i);
|
||||
if (imgDto.getImageUrl() != null && !imgDto.getImageUrl().isEmpty()) {
|
||||
ListingImageEntity imgEntity = new ListingImageEntity();
|
||||
imgEntity.setListingId(listingId);
|
||||
imgEntity.setCategory(category);
|
||||
|
||||
imgEntity.setImageUrl(minioUtil.convertToLogicalPath(imgDto.getImageUrl()));
|
||||
imgEntity.setSortOrder(imgDto.getSortOrder() != null ? imgDto.getSortOrder() : i);
|
||||
|
||||
@@ -239,6 +241,7 @@ public class ListingServiceImpl extends ServiceImpl<ListingMapper, ListingEntity
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String extractCover(List<ListingImageDTO> images) {
|
||||
if (CollectionUtils.isEmpty(images)) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# ============================================================
|
||||
|
||||
nacos:
|
||||
namespace: ltx
|
||||
namespace: dev
|
||||
host: 18.167.251.121:28848
|
||||
username: nacos
|
||||
password: Aidlab123123!
|
||||
@@ -22,7 +22,8 @@ spring:
|
||||
namespace: ${nacos.namespace}
|
||||
username: ${nacos.username}
|
||||
password: ${nacos.password}
|
||||
hostname: master-aida-seller
|
||||
# ip: ${HOSTNAME}
|
||||
# hostname: master-aida-seller
|
||||
config:
|
||||
server-addr: ${nacos.host}
|
||||
namespace: ${nacos.namespace}
|
||||
|
||||
Reference in New Issue
Block a user