YqRegController.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.ym.mec.collectfee.controller;
  2. import com.ym.mec.collectfee.utils.yqpay.YqPayUtil;
  3. import org.springframework.stereotype.Controller;
  4. import org.springframework.ui.ModelMap;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import springfox.documentation.annotations.ApiIgnore;
  8. import java.util.LinkedHashMap;
  9. import java.util.Map;
  10. @ApiIgnore
  11. @Controller
  12. @RequestMapping("yqreg")
  13. public class YqRegController {
  14. /**
  15. * 用户(商户)注册
  16. *
  17. * @param map
  18. * @return
  19. * @throws Exception
  20. */
  21. @GetMapping("/register")
  22. public String register(ModelMap map) throws Exception {
  23. String notifyUrl = "http://47.99.212.176:9000/yqpay/notify"; //主动通知地址
  24. Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
  25. resultMap.put("type", "H5");
  26. resultMap.put("returnUrl", "https://www.baidu.com");
  27. resultMap.put("seraialNumber", "785679");
  28. resultMap.put("merType", "per");
  29. Map<String, Object> requestMap = new YqPayUtil(notifyUrl, resultMap).getRequestMap();
  30. map.addAttribute("info", requestMap);
  31. return "/reg/register";
  32. }
  33. }