Commit c507bd6d authored by alex yao's avatar alex yao

feat:Agent应用配置保存 参数验证和转换

parent f10dae8a
......@@ -79,7 +79,8 @@ public class BizAgentApplicationInfoServiceImpl extends BaseServiceImpl
entity.setId(null);
entity.setIsDeleted("N");
entity.setAgentId(UUIDTool.getUUID());
BizAgentApplicationInfoModel model = AgentApplicationInfoConvert.entityToModel(entity);
BizAgentApplicationInfoModel model = new BizAgentApplicationInfoModel();
paramVerificationAndConvert(entity, model);
BizAgentApplicationInfoModel saveModel = this.repository.save(model);
return AgentApplicationInfoConvert.modelToEntity(saveModel);
}
......@@ -116,6 +117,12 @@ public class BizAgentApplicationInfoServiceImpl extends BaseServiceImpl
return true;
}
/**
* 参数验证和转换 Entity To Model
*
* @param entity
* @param model
*/
private void paramVerificationAndConvert(BizAgentApplicationInfoEntity entity, BizAgentApplicationInfoModel model) {
if (StringUtils.isNotBlank(entity.getAgentTitle())) {
model.setAgentTitle(entity.getAgentTitle());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment