| | |
| | | import com.doumee.core.erp.model.openapi.request.erp.UserListRequest; |
| | | import com.doumee.core.erp.model.openapi.response.erp.ApproveInfoResponse; |
| | | import com.doumee.core.erp.model.openapi.response.erp.ERPApiResponse; |
| | | import com.doumee.core.erp.model.openapi.response.erp.OrgListRespone; |
| | | import com.doumee.core.erp.model.openapi.response.erp.UserListRespone; |
| | | import com.doumee.core.erp.model.openapi.response.erp.ErpOrgListResponse; |
| | | import com.doumee.core.erp.model.openapi.response.erp.ErpUserListResponse; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | |
| | | * @param param |
| | | * @return |
| | | */ |
| | | public static List<OrgListRespone> getErpOrgList(String url,OrgListRequest param){ |
| | | public static List<ErpOrgListResponse> getErpOrgList(String url, OrgListRequest param){ |
| | | String result = HttpsUtil.postJson(url, JSONObject.toJSONString(param)); |
| | | if(StringUtils.isNotBlank(result)){ |
| | | TypeReference typeReference = |
| | | new TypeReference<ERPApiResponse<List<OrgListRespone>>>(){}; |
| | | ERPApiResponse<List<OrgListRespone>> response = JSONObject.parseObject(result, typeReference.getType()); |
| | | new TypeReference<ERPApiResponse<List<ErpOrgListResponse>>>(){}; |
| | | ERPApiResponse<List<ErpOrgListResponse>> response = JSONObject.parseObject(result, typeReference.getType()); |
| | | if(response!=null){ |
| | | return response.getData(); |
| | | } |
| | |
| | | * @param param |
| | | * @return |
| | | */ |
| | | public static List<UserListRespone> getErpUserList(String url, UserListRequest param){ |
| | | public static List<ErpUserListResponse> getErpUserList(String url, UserListRequest param){ |
| | | String result = HttpsUtil.postJson(url, JSONObject.toJSONString(param)); |
| | | if(StringUtils.isNotBlank(result)){ |
| | | TypeReference typeReference = |
| | | new TypeReference<ERPApiResponse<List<UserListRespone>>>(){}; |
| | | ERPApiResponse<List<UserListRespone>> response = JSONObject.parseObject(result, typeReference.getType()); |
| | | new TypeReference<ERPApiResponse<List<ErpUserListResponse>>>(){}; |
| | | ERPApiResponse<List<ErpUserListResponse>> response = JSONObject.parseObject(result, typeReference.getType()); |
| | | if(response!=null){ |
| | | return response.getData(); |
| | | } |