1
This commit is contained in:
1 parent
c084903129
commit
1518428aa3
2 files changed
+7
-4
No files matched your search
+2
@@ -126,6 +126,8 @@ public class HardDoorFlowController {
|
||||
|
||||
/* ************************************* end app end ************************************* */
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "检修开门", description = "检修开门")
|
||||
@PostMapping("/open-access")
|
||||
@Idempotent(expireTime = 5, info = "正在开门中,请勿重复操作")
|
||||
|
||||
+5
-4
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.common.core.constant.enums.YesNoEnum;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.data.resolver.ParamResolver;
|
||||
import com.bsd.pjcloud.hard.api.constant.spu.HardKsCheckStatusEnum;
|
||||
import com.bsd.pjcloud.hard.api.constant.spu.HardKsSkuTypeEnum;
|
||||
import com.bsd.pjcloud.hard.api.dto.spu.DeductionSpuStockDto;
|
||||
@@ -84,11 +85,11 @@ public class HardSpuServiceImpl extends ServiceImpl<HardSpuMapper, HardSpuEntity
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long create(HardSpuEntity entity) {
|
||||
String pic = entity.getPic();
|
||||
pic = "https://nasa-voyager.oss-cn-beijing.aliyuncs.com/release/merchant_sku_img/watermark/202412021517-173bee3f2637499cb6b46e9b23d286c5.jpg";
|
||||
if (ObjectUtil.isEmpty(pic)) {
|
||||
throw new RuntimeException("请上传图片");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(pic)) throw new RuntimeException("请上传图片");
|
||||
String imageBaseUrl = ParamResolver.getStr("IMAGE_BASE_URL");
|
||||
if (ObjectUtil.isEmpty(imageBaseUrl)) throw new RuntimeException("请配置图片基础路径");
|
||||
List<String> picList = Arrays.asList(pic.split(","));
|
||||
picList = picList.stream().map(v -> String.format("%s%s", imageBaseUrl, v)).toList();
|
||||
entity.setSkuType(HardKsSkuTypeEnum.SELF.getType());
|
||||
baseMapper.insert(entity);
|
||||
if (ObjectUtil.equals(entity.getIsDefault(), YesNoEnum.NO.getCode())) {
|
||||
|
||||
Reference in new issue
Block a user