|
|
@@ -1,6 +1,7 @@
|
|
|
package cn.start.tz.module.pressure2.service.usertemplatelibrary;
|
|
|
|
|
|
import cn.start.tz.framework.security.core.util.SecurityFrameworkUtils;
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import jakarta.annotation.Resource;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -35,6 +36,7 @@ public class UserTemplateLibraryServiceImpl extends ServiceImpl<UserTemplateLibr
|
|
|
public String createUserTemplateLibrary(UserTemplateLibrarySaveReqVO createReqVO) {
|
|
|
// 插入
|
|
|
UserTemplateLibraryDO userTemplateLibrary = BeanUtils.toBean(createReqVO, UserTemplateLibraryDO.class);
|
|
|
+ userTemplateLibrary.setDefaultJson(JSONObject.toJSONString(createReqVO.getDefaultJson()));
|
|
|
userTemplateLibraryMapper.insert(userTemplateLibrary);
|
|
|
// 返回
|
|
|
return userTemplateLibrary.getId();
|
|
|
@@ -46,6 +48,7 @@ public class UserTemplateLibraryServiceImpl extends ServiceImpl<UserTemplateLibr
|
|
|
validateUserTemplateLibraryExists(updateReqVO.getId());
|
|
|
// 更新
|
|
|
UserTemplateLibraryDO updateObj = BeanUtils.toBean(updateReqVO, UserTemplateLibraryDO.class);
|
|
|
+ updateObj.setDefaultJson(JSONObject.toJSONString(updateReqVO.getDefaultJson()));
|
|
|
userTemplateLibraryMapper.updateById(updateObj);
|
|
|
}
|
|
|
|