|
|
@@ -27,6 +27,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.bouncycastle.crypto.Signer;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import jakarta.annotation.Resource;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -95,6 +96,10 @@ public class DynamicTbServiceImpl extends ServiceImpl<DynamicTbMapper, DynamicTb
|
|
|
@Resource
|
|
|
private FileApi fileApi;
|
|
|
|
|
|
+ @Value("${tz.env.name}")
|
|
|
+ private String env;
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public String createDynamicTb(DynamicTbSaveReqVO createReqVO) {
|
|
|
// 校验tbCode唯一性
|
|
|
@@ -600,7 +605,11 @@ public class DynamicTbServiceImpl extends ServiceImpl<DynamicTbMapper, DynamicTb
|
|
|
byte[] fileBytes = fileMap.get(oldId);
|
|
|
if (fileBytes != null && fileBytes.length > 0) {
|
|
|
String newFileUrl = fileApi.createFile(fileBytes);
|
|
|
- templateDO.setFileUrl(newFileUrl);
|
|
|
+ if (env.equals("uat")) {
|
|
|
+ templateDO.setFileUrl("cyjw" + newFileUrl);
|
|
|
+ } else if (env.equals("hst") || env.equals("hsd")) {
|
|
|
+ templateDO.setFileUrl("dexdev" + newFileUrl);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
StandardTemplateDO existingTemplate = standardTemplateMapper.selectById(oldId);
|