B00027Service.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package com.miniframe.bisiness.system;
  2. import com.miniframe.core.ExecProcessFlow;
  3. import com.miniframe.core.exception.BusinessException;
  4. import com.miniframe.core.ext.UtilTools;
  5. import com.miniframe.generate.business.system.model.B00027BaseModel;
  6. import com.miniframe.tools.XIFileUtils;
  7. import java.util.Map;
  8. /**
  9. * 基础系统,“获取文件URL”逻辑处理(重新生成不覆盖)。
  10. */
  11. public class B00027Service extends B00027BaseModel implements ExecProcessFlow {
  12. private static final long serialVersionUID = -7051358269847459502L;
  13. /**
  14. * 基础系统,“获取文件URL”业务核心处理
  15. */
  16. public void transExecute() throws Exception {
  17. String fileRelativePath = XIFileUtils.getFileUrl(this.getA_b00027().getFileId());
  18. if (UtilTools.isNullOrBlank(fileRelativePath)) {
  19. throw new BusinessException("EB2000008");
  20. }
  21. this.getD_b00027().setFileUrl(fileRelativePath);
  22. }
  23. /**
  24. * 基础系统,“获取文件URL”业务前处理
  25. */
  26. public void preTransFlow() throws Exception {
  27. this.validater();
  28. }
  29. /**
  30. * 基础系统,“获取文件URL”业务后处理
  31. */
  32. public void afterTransFlow() throws Exception {
  33. }
  34. /**
  35. * 基础系统,“获取文件URL”逻辑入口处理方法
  36. */
  37. @SuppressWarnings("rawtypes")
  38. @Override
  39. public Map execute(Map vars) throws Exception {
  40. this.setTransMap(vars);
  41. preTransFlow();// 执行业务开始的规则检查和校验
  42. transExecute();// 执行核心业务段
  43. afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
  44. return this.getTransMap();
  45. }
  46. }