D10009Service.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package com.miniframe.bisiness.system;
  2. import java.util.Map;
  3. import com.miniframe.core.ExecProcessFlow;
  4. import com.miniframe.core.exception.BusinessException;
  5. import com.miniframe.core.ext.UtilTools;
  6. import com.miniframe.generate.business.system.model.D10009BaseModel;
  7. import com.miniframe.model.system.DBoundary;
  8. import com.miniframe.model.system.dao.DBoundaryMapper;
  9. /**
  10. * 基础系统,“边界数据删除”逻辑处理(重新生成不覆盖)。
  11. */
  12. public class D10009Service extends D10009BaseModel implements ExecProcessFlow {
  13. private static final long serialVersionUID = -7051358269847459502L;
  14. /**
  15. * 基础系统,“边界数据删除”业务核心处理
  16. */
  17. public void transExecute() throws Exception {
  18. Integer bid =this.getA_d10009().getBid();
  19. DBoundaryMapper bDao = UtilTools.getBean(DBoundaryMapper.class);
  20. DBoundary b =bDao.selectByPrimaryKey(bid);
  21. if(b==null){
  22. throw new BusinessException("EB3100006");
  23. }
  24. bDao.deleteByPrimaryKey(bid);
  25. }
  26. /**
  27. * 基础系统,“边界数据删除”业务前处理
  28. */
  29. public void preTransFlow() throws Exception {
  30. this.validater();
  31. }
  32. /**
  33. * 基础系统,“边界数据删除”业务后处理
  34. */
  35. public void afterTransFlow() throws Exception {
  36. }
  37. /**
  38. * 基础系统,“边界数据删除”逻辑入口处理方法
  39. */
  40. @SuppressWarnings("rawtypes")
  41. @Override
  42. public Map execute(Map vars) throws Exception {
  43. this.setTransMap(vars);
  44. preTransFlow();// 执行业务开始的规则检查和校验
  45. transExecute();// 执行核心业务段
  46. afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
  47. return this.getTransMap();
  48. }
  49. }