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