B00003Service.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package com.miniframe.bisiness.system;
  2. import com.miniframe.generate.business.system.model.B00003BaseModel;
  3. import com.miniframe.service.LoginService;
  4. import com.miniframe.core.ExecProcessFlow;
  5. import java.util.Map;
  6. /**
  7. * 基础系统,“修改密码”逻辑处理(重新生成不覆盖)。
  8. */
  9. public class B00003Service extends B00003BaseModel implements ExecProcessFlow {
  10. private static final long serialVersionUID = -7051358269847459502L;
  11. /**
  12. * 基础系统,“修改密码”业务核心处理
  13. */
  14. public void transExecute() throws Exception {
  15. String userId = this.getA_systemhead().getUserId();
  16. String newPassword = this.getA_b00003().getNewPassword();
  17. String oldPassword = this.getA_b00003().getOldPassword();
  18. String clientToken = this.getA_systemhead().getClientToken();
  19. LoginService.changePassWord(userId, oldPassword, newPassword, clientToken);
  20. this.getD_b00003().setUserId(userId);
  21. }
  22. /**
  23. * 基础系统,“修改密码”业务前处理
  24. */
  25. public void preTransFlow() throws Exception {
  26. this.validater();
  27. }
  28. /**
  29. * 基础系统,“修改密码”业务后处理
  30. */
  31. public void afterTransFlow() throws Exception {
  32. }
  33. /**
  34. * 基础系统,“修改密码”逻辑入口处理方法
  35. */
  36. @SuppressWarnings("rawtypes")
  37. @Override
  38. public Map execute(Map vars) throws Exception {
  39. this.setTransMap(vars);
  40. preTransFlow();// 执行业务开始的规则检查和校验
  41. transExecute();// 执行核心业务段
  42. afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
  43. return this.getTransMap();
  44. }
  45. }