|
@@ -1,13 +1,20 @@
|
|
|
package com.jy.business.contract.controller;
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.extra.spring.SpringUtil;
|
|
|
+import cn.hutool.http.HttpUtil;
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.jy.business.contract.model.dto.ContractInfoDto;
|
|
|
import com.jy.business.contract.model.dto.ContractInfoSelectDto;
|
|
|
+import com.jy.business.contract.model.dto.OrderListDto;
|
|
|
import com.jy.business.contract.model.vo.ContractInfoVo;
|
|
|
import com.jy.business.contract.model.vo.ContractStatisticsVo;
|
|
|
import com.jy.business.contract.model.vo.TransactionVo;
|
|
|
import com.jy.business.contract.service.ContractInfoService;
|
|
|
import com.jy.framework.model.base.BaseSelectDto;
|
|
|
+import com.jy.framework.model.base.R;
|
|
|
+import com.jy.framework.model.constants.ProfileConstant;
|
|
|
import jakarta.annotation.Resource;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -93,4 +100,31 @@ public class ContractInfoController {
|
|
|
return contractInfoService.getTransactionList(dto.getId());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private static final String devUrl = "http://111.229.165.209:10004/api/";
|
|
|
+ private static final String prodUrl = "http://111.229.165.209:10002/api/";
|
|
|
+
|
|
|
+ @GetMapping("/getOrderList")
|
|
|
+ public Object getOrderList(OrderListDto dto) {
|
|
|
+ dto.setSign("jy_api_request");
|
|
|
+
|
|
|
+ String url = (ProfileConstant.PROD.equals(SpringUtil.getActiveProfile()) ? prodUrl : devUrl)
|
|
|
+ + "api/orderInfo/getOrderList?" + HttpUtil.toParams(BeanUtil.beanToMap(dto));
|
|
|
+ String result = HttpUtil.get(url);
|
|
|
+ try {
|
|
|
+ JSONObject parse = JSONObject.parse(result);
|
|
|
+ if (parse.getInteger("code") == 200) {
|
|
|
+ return parse.get("data");
|
|
|
+ }
|
|
|
+ return R.fail(parse.getString("msg"));
|
|
|
+ } catch (Exception e) {
|
|
|
+ return R.fail("请求失败:" + result);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("settlement")
|
|
|
+ public void settlement(@RequestBody ContractInfoDto dto) {
|
|
|
+ contractInfoService.settlement(dto);
|
|
|
+ }
|
|
|
+
|
|
|
}
|