NotifyTempCarFeeOrderCmd.java 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package com.java110.fee.cmd.tempCarFee;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.java110.core.annotation.Java110Cmd;
  4. import com.java110.core.context.ICmdDataFlowContext;
  5. import com.java110.core.event.cmd.AbstractServiceCmdListener;
  6. import com.java110.core.event.cmd.CmdEvent;
  7. import com.java110.dto.tempCarFeeConfig.TempCarPayOrderDto;
  8. import com.java110.fee.bmo.tempCarFee.IGetTempCarFeeRules;
  9. import com.java110.utils.exception.CmdException;
  10. import com.java110.utils.util.BeanConvertUtil;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.http.ResponseEntity;
  13. /**
  14. * 类表述:通知
  15. * 服务编码:tempCarFee.notifyTempCarFeeOrder
  16. * 请求路劲:/app/tempCarFee.notifyTempCarFeeOrder
  17. * add by 吴学文 at 2021-09-16 22:26:04 mail: 928255095@qq.com
  18. * open source address: https://gitee.com/wuxw7/MicroCommunity
  19. * 官网:http://www.homecommunity.cn
  20. * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
  21. * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
  22. */
  23. @Java110Cmd(serviceCode = "tempCarFee.notifyTempCarFeeOrder")
  24. public class NotifyTempCarFeeOrderCmd extends AbstractServiceCmdListener {
  25. @Autowired
  26. private IGetTempCarFeeRules getTempCarFeeRulesImpl;
  27. //{"amount":20.0,"payType":"2","orderId":"19c4321c-b5d5-405f-b2ff-20e86a2e7f3e",
  28. // "payTime":"2021-10-17 17:29:54","paId":"102021101160020175","carNum":"青A88888","oId":"102021101724760012"}
  29. @Override
  30. public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
  31. }
  32. @Override
  33. public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
  34. TempCarPayOrderDto tempCarPayOrderDto = BeanConvertUtil.covertBean(reqJson, TempCarPayOrderDto.class);
  35. ResponseEntity<String> responseEntity = getTempCarFeeRulesImpl.notifyTempCarFeeOrder(tempCarPayOrderDto);
  36. cmdDataFlowContext.setResponseEntity(responseEntity);
  37. }
  38. }