| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package com.uas.platform.home.controller;
- import com.uas.platform.home.core.support.SystemSession;
- import com.uas.platform.home.core.util.HttpUtil;
- import com.uas.platform.home.model.HttpAddress;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.Map;
- /**
- * created by shicr on 2017/11/23
- **/
- @RestController
- @RequestMapping("/finance")
- public class FinanceController {
- @Autowired
- private HttpAddress httpAddress;
- @RequestMapping(value = "/loan")
- public String loan(String jsonStr) {
- String url = httpAddress.getLoanAddress();
- if (null != SystemSession.getUser() && null != SystemSession.getUser().getDialectUID()) {
- url = url + "?UID=" + Long.parseLong(SystemSession.getUser().getDialectUID());
- }
- try {
- HttpUtil.Response response = HttpUtil.doPost(url + "?UID=" + "", jsonStr, 5000);
- if(200 == response.getStatusCode())
- return "success";
- } catch (Exception e) {
- e.printStackTrace();
- }
- return "申请失败";
- }
- }
|