模版编制的相关实现
This commit is contained in:
@@ -30,4 +30,6 @@ public interface TemplateInstanceDataMapper extends BaseMapperX<TemplateInstance
|
||||
}
|
||||
int deleteByTemplateInstanceId(@Param("templateInstanceId") Long templateInstanceId);
|
||||
|
||||
int updateFldValBatchById(@Param("id") Long id, @Param("fldVal") String fldVal);
|
||||
|
||||
}
|
||||
|
||||
@@ -103,7 +103,8 @@ public class TemplateInstanceDataServiceImpl implements TemplateInstanceDataServ
|
||||
if (CollUtil.isEmpty(pageReqVOS)) {
|
||||
throw exception(PARAMS_IS_NULL_OR_ERR);
|
||||
}
|
||||
return templateInstanceDataMapper.updateBatch(pageReqVOS);
|
||||
pageReqVOS.forEach(i->templateInstanceDataMapper.updateFldValBatchById(i.getId(),i.getFldVal()));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zt.plat.module.base.util;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
|
||||
@@ -231,7 +232,7 @@ public class ClassInfoScanner {
|
||||
|
||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||
Field[] fields = targetClass.getDeclaredFields();
|
||||
|
||||
// PreAuthorize preAuthorize = targetClass.getAnnotation(PreAuthorize.class);
|
||||
for (Field field : fields) {
|
||||
if (field.isAnnotationPresent(Schema.class)) {
|
||||
Schema schema = field.getAnnotation(Schema.class);
|
||||
@@ -261,7 +262,7 @@ public class ClassInfoScanner {
|
||||
String protocol = url.getProtocol();
|
||||
|
||||
if ("file".equals(protocol)) {
|
||||
String filePath = URLDecoder.decode(url.getFile(), StandardCharsets.UTF_8.name());
|
||||
String filePath = URLDecoder.decode(url.getFile(), StandardCharsets.UTF_8);
|
||||
findAndAddClassesInPackageByFile(basePackage, filePath);
|
||||
} else if ("jar".equals(protocol)) {
|
||||
JarFile jar = ((JarURLConnection) url.openConnection()).getJarFile();
|
||||
|
||||
@@ -10,7 +10,13 @@
|
||||
-->
|
||||
|
||||
<update id="deleteByTemplateInstanceId">
|
||||
update BSE_TMPL_INSC_DAT set deleted = 1
|
||||
update BSE_TMPL_INSC_DAT
|
||||
set deleted = 1
|
||||
WHERE INSC_ID = #{templateInstanceId}
|
||||
</update>
|
||||
<update id="updateFldValBatchById">
|
||||
update BSE_TMPL_INSC_DAT
|
||||
set FLD_VAL = #{fldVal}
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user