Commit ad580dda authored by 廖旭伟's avatar 廖旭伟

事项材料保存时增加模板地址校验

parent bbd21dfc
...@@ -60,7 +60,7 @@ exec "$JAVACMD" $JAVA_OPTS \ ...@@ -60,7 +60,7 @@ exec "$JAVACMD" $JAVA_OPTS \
-Dapp.port="$PORT" \ -Dapp.port="$PORT" \
-Dbasedir="$BASEDIR" \ -Dbasedir="$BASEDIR" \
-Djava.io.tmpdir=$TEMP_PATH \ -Djava.io.tmpdir=$TEMP_PATH \
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=15503 \ -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=15504 \
-jar $MAIN_CLASS \ -jar $MAIN_CLASS \
> /dev/null & > /dev/null &
......
...@@ -80,6 +80,15 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD ...@@ -80,6 +80,15 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
@Override @Override
protected void saveBefore(MatterDatumEntity entity, Context context) throws AppException { protected void saveBefore(MatterDatumEntity entity, Context context) throws AppException {
if(StringUtils.isEmpty(entity.getFileUrl())){
throw new AppException("填单附近不能为空");
}
if(StringUtils.isEmpty(entity.getSamplePath())){
throw new AppException("样表地址不能为空");
}
if(StringUtils.isEmpty(entity.getTemplatePath())){
throw new AppException("样表模板地址不能为空");
}
//生成样表预览图片 //生成样表预览图片
String rootPath = this.filePath.endsWith("/") ? this.filePath : this.filePath + "/"; String rootPath = this.filePath.endsWith("/") ? this.filePath : this.filePath + "/";
String samplePath = rootPath + entity.getSamplePath(); String samplePath = rootPath + entity.getSamplePath();
......
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