TestCallBackController.java 850 B

123456789101112131415161718192021222324252627
  1. package com.hr.controller;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.hr.externelSystem.BizHandlerFactory;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.web.bind.annotation.RequestBody;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RestController;
  8. @RestController
  9. @RequestMapping("/callback")
  10. public class TestCallBackController {
  11. @Autowired
  12. private BizHandlerFactory bizHandlerFactory;
  13. @RequestMapping("/test")
  14. public Boolean test(@RequestBody JSONObject json) {
  15. // 根据序列号查询到对应的业务id
  16. String businessNo = "aabbccddee";
  17. String interfaceNo = "aiwen";
  18. Boolean result = bizHandlerFactory.doCallBack(interfaceNo,businessNo,json);
  19. return result;
  20. }
  21. }