Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
slm-bi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林锐标
slm-bi
Commits
82414d64
Commit
82414d64
authored
Apr 26, 2021
by
linruibiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口编写
parent
fd40ee3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
80 deletions
+111
-80
RestTemplateUtils.java
.../java/com/syc/slm/common/core/util/RestTemplateUtils.java
+95
-67
VariableController.java
...java/com/syc/slm/slmbi/controller/VariableController.java
+9
-9
BusinessConfigServiceImpl.java
...syc/slm/slmbi/service/impl/BusinessConfigServiceImpl.java
+7
-4
No files found.
src/main/java/com/syc/slm/common/core/util/RestTemplateUtils.java
View file @
82414d64
package
com
.
syc
.
slm
.
common
.
core
.
util
;
package
com
.
syc
.
slm
.
common
.
core
.
util
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.syc.slm.common.core.constant.SlmConstants
;
import
com.syc.slm.common.core.constant.SlmConstants
;
...
@@ -12,11 +11,12 @@ import org.springframework.web.client.RestTemplate;
...
@@ -12,11 +11,12 @@ import org.springframework.web.client.RestTemplate;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.reflect.Type
;
import
java.lang.reflect.Type
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.function.Supplier
;
/**
/**
* slm-bi
* slm-bi
* RestTemplate 远程调用工具类
* RestTemplate 远程调用工具类
*
* @author : lin
* @author : lin
* @date : 2021-04-13 10:15
* @date : 2021-04-13 10:15
**/
**/
...
@@ -25,67 +25,77 @@ public final class RestTemplateUtils {
...
@@ -25,67 +25,77 @@ public final class RestTemplateUtils {
private
static
final
RestTemplate
REST_TEMPLATE
=
new
RestTemplate
();
private
static
final
RestTemplate
REST_TEMPLATE
=
new
RestTemplate
();
public
static
<
TResult
>
TResult
get
(
String
url
,
final
Type
resultType
,
Map
<
String
,
?>
uriVariables
)
{
return
get
(
url
,
null
,
resultType
,
uriVariables
);
}
// public static <TResult>TResult get(String url, Map<String, String> headerMap, final Type resultType, Map<String, ?> uriVariables) {
public
static
<
TResult
>
TResult
get
(
String
url
,
Supplier
<
Map
<
String
,
String
>>
headerHandler
,
final
Type
resultType
,
Map
<
String
,
?>
uriVariables
)
{
// try {
// ResponseEntity<String> response = get(url, headerMap, String.class, uriVariables);
// if(HttpStatus.OK.value() == response.getStatusCodeValue()){
// if(resultType.equals(String.class)) {
// return (TResult)response.getBody();
// }
// return SlmConstants.gson.fromJson(response.getBody(), resultType);
// }
// } catch (Exception e) {
// log.error("出错啦,{}",e);
// throw new SysException("出错啦,请联系管理员",e.toString());
// }
// return null;
// }
public
static
<
TResult
>
TResult
get
(
String
url
,
final
Type
resultType
,
Map
<
String
,
?>
uriVariables
)
{
try
{
try
{
// 获取token以及在请求头加上token
// 获取token以及在请求头加上token
HttpServletRequest
request
=
ServletUtils
.
getHttpServletRequest
();
HttpServletRequest
request
=
ServletUtils
.
getHttpServletRequest
();
Map
<
String
,
String
>
headerMap
=
ServletUtils
.
getHeaderMap
(
request
);
String
token
=
request
.
getHeader
(
SlmConstants
.
TOKEN_PREFIX
);
if
(
CollectionUtils
.
isEmpty
(
headerMap
)){
if
(
StringUtils
.
isBlank
(
token
))
{
throw
new
SysException
(
"头部不能为空"
);
}
String
token
=
request
.
getHeader
(
SlmConstants
.
TOKEN_PREFIX
);
if
(
StringUtils
.
isBlank
(
token
)){
throw
new
SysException
(
"token不能为空"
);
throw
new
SysException
(
"token不能为空"
);
}
}
Map
<
String
,
String
>
headMap
=
Maps
.
newHashMap
();
Map
<
String
,
String
>
headMap
=
Maps
.
newHashMap
();
headMap
.
put
(
SlmConstants
.
TOKEN_PREFIX
,
token
);
headMap
.
put
(
SlmConstants
.
TOKEN_PREFIX
,
token
);
ResponseEntity
<
String
>
response
=
get
(
url
,
headMap
,
String
.
class
,
uriVariables
);
if
(
headerHandler
!=
null
)
{
log
.
info
(
"请求结果是=============:{}"
,
response
.
getBody
());
Map
<
String
,
String
>
header
=
headerHandler
.
get
();
if
(
HttpStatus
.
OK
.
value
()
==
response
.
getStatusCodeValue
()){
header
.
forEach
(
headMap:
:
put
);
if
(
resultType
.
equals
(
String
.
class
))
{
}
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
httpHeaders
.
setAll
(
headMap
);
HttpEntity
<?>
requestEntity
=
new
HttpEntity
<>(
httpHeaders
);
ResponseEntity
<
String
>
response
=
REST_TEMPLATE
.
exchange
(
url
,
HttpMethod
.
GET
,
requestEntity
,
String
.
class
,
uriVariables
);
log
.
info
(
"请求结果是=============:{}"
,
response
.
getBody
());
if
(
HttpStatus
.
OK
.
value
()
==
response
.
getStatusCodeValue
())
{
if
(
resultType
.
equals
(
String
.
class
))
{
return
(
TResult
)
response
.
getBody
();
return
(
TResult
)
response
.
getBody
();
}
}
return
SlmConstants
.
gson
.
fromJson
(
response
.
getBody
(),
resultType
);
return
SlmConstants
.
gson
.
fromJson
(
response
.
getBody
(),
resultType
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"出错啦,{}"
,
e
);
log
.
error
(
"出错啦,{}"
,
e
);
throw
new
SysException
(
"出错啦,请联系管理员"
,
e
.
toString
());
throw
new
SysException
(
"出错啦,请联系管理员"
,
e
.
toString
());
}
}
return
null
;
return
null
;
}
}
public
static
<
TResult
>
TResult
post
(
String
url
,
Map
<
String
,
String
>
headerMap
,
Object
requestBody
,
final
Type
resultType
,
Map
<
String
,
?>
uriVariables
)
{
public
static
<
TResult
>
TResult
post
(
String
url
,
Object
requestBody
,
final
Type
resultType
,
Map
<
String
,
?>
uriVariables
)
{
return
post
(
url
,
null
,
requestBody
,
resultType
,
uriVariables
);
}
public
static
<
TResult
>
TResult
post
(
String
url
,
Supplier
<
Map
<
String
,
String
>>
headerHandler
,
Object
requestBody
,
final
Type
resultType
,
Map
<
String
,
?>
uriVariables
)
{
try
{
try
{
ResponseEntity
<
String
>
response
=
post
(
url
,
headerMap
,
requestBody
,
String
.
class
,
uriVariables
);
// 获取token以及在请求头加上token
if
(
HttpStatus
.
OK
.
value
()
==
response
.
getStatusCodeValue
()){
HttpServletRequest
request
=
ServletUtils
.
getHttpServletRequest
();
if
(
resultType
.
equals
(
String
.
class
))
{
String
token
=
request
.
getHeader
(
SlmConstants
.
TOKEN_PREFIX
);
if
(
StringUtils
.
isBlank
(
token
))
{
throw
new
SysException
(
"token不能为空"
);
}
Map
<
String
,
String
>
headMap
=
Maps
.
newHashMap
();
headMap
.
put
(
SlmConstants
.
TOKEN_PREFIX
,
token
);
if
(
headerHandler
!=
null
)
{
Map
<
String
,
String
>
header
=
headerHandler
.
get
();
header
.
forEach
(
headMap:
:
put
);
}
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
httpHeaders
.
setAll
(
headMap
);
HttpEntity
<
Object
>
requestEntity
=
new
HttpEntity
<>(
requestBody
,
httpHeaders
);
ResponseEntity
<
String
>
response
=
REST_TEMPLATE
.
exchange
(
url
,
HttpMethod
.
POST
,
requestEntity
,
String
.
class
,
uriVariables
);
if
(
HttpStatus
.
OK
.
value
()
==
response
.
getStatusCodeValue
())
{
if
(
resultType
.
equals
(
String
.
class
))
{
return
(
TResult
)
response
.
getBody
();
return
(
TResult
)
response
.
getBody
();
}
}
return
SlmConstants
.
gson
.
fromJson
(
response
.
getBody
(),
resultType
);
return
SlmConstants
.
gson
.
fromJson
(
response
.
getBody
(),
resultType
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"出错啦,{}"
,
e
);
log
.
error
(
"出错啦,{}"
,
e
);
throw
new
SysException
(
"出错啦,请联系管理员"
,
e
.
toString
());
throw
new
SysException
(
"出错啦,请联系管理员"
,
e
.
toString
());
}
}
return
null
;
return
null
;
}
}
...
@@ -94,13 +104,16 @@ public final class RestTemplateUtils {
...
@@ -94,13 +104,16 @@ public final class RestTemplateUtils {
/**
/**
* 带请求头的GET请求调用方式
* 带请求头的GET请求调用方式
*
*
* @param url 请求URL
* @param url
请求URL
* @param headers 请求头参数
* @param headers
请求头参数
* @param responseType 返回对象类型
* @param responseType 返回对象类型
* @param uriVariables URL中的变量,与Map中的key对应
* @param uriVariables URL中的变量,与Map中的key对应
* @return ResponseEntity 响应对象封装类
* @return ResponseEntity 响应对象封装类
*/
*/
public
static
<
T
>
ResponseEntity
<
T
>
get
(
String
url
,
Map
<
String
,
String
>
headers
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
public
static
<
T
>
ResponseEntity
<
T
>
get
(
String
url
,
Map
<
String
,
String
>
headers
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
httpHeaders
.
setAll
(
headers
);
httpHeaders
.
setAll
(
headers
);
return
get
(
url
,
httpHeaders
,
responseType
,
uriVariables
);
return
get
(
url
,
httpHeaders
,
responseType
,
uriVariables
);
...
@@ -109,13 +122,16 @@ public final class RestTemplateUtils {
...
@@ -109,13 +122,16 @@ public final class RestTemplateUtils {
/**
/**
* 带请求头的GET请求调用方式
* 带请求头的GET请求调用方式
*
*
* @param url 请求URL
* @param url
请求URL
* @param headers 请求头参数
* @param headers
请求头参数
* @param responseType 返回对象类型
* @param responseType 返回对象类型
* @param uriVariables URL中的变量,与Map中的key对应
* @param uriVariables URL中的变量,与Map中的key对应
* @return ResponseEntity 响应对象封装类
* @return ResponseEntity 响应对象封装类
*/
*/
public
static
<
T
>
ResponseEntity
<
T
>
get
(
String
url
,
HttpHeaders
headers
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
public
static
<
T
>
ResponseEntity
<
T
>
get
(
String
url
,
HttpHeaders
headers
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
HttpEntity
<?>
requestEntity
=
new
HttpEntity
<>(
headers
);
HttpEntity
<?>
requestEntity
=
new
HttpEntity
<>(
headers
);
return
exchange
(
url
,
HttpMethod
.
GET
,
requestEntity
,
responseType
,
uriVariables
);
return
exchange
(
url
,
HttpMethod
.
GET
,
requestEntity
,
responseType
,
uriVariables
);
}
}
...
@@ -123,7 +139,7 @@ public final class RestTemplateUtils {
...
@@ -123,7 +139,7 @@ public final class RestTemplateUtils {
/**
/**
* POST请求调用方式
* POST请求调用方式
*
*
* @param url 请求URL
* @param url
请求URL
* @param responseType 返回对象类型
* @param responseType 返回对象类型
* @return
* @return
*/
*/
...
@@ -131,18 +147,21 @@ public final class RestTemplateUtils {
...
@@ -131,18 +147,21 @@ public final class RestTemplateUtils {
return
REST_TEMPLATE
.
postForEntity
(
url
,
HttpEntity
.
EMPTY
,
responseType
);
return
REST_TEMPLATE
.
postForEntity
(
url
,
HttpEntity
.
EMPTY
,
responseType
);
}
}
/**
/**
* 带请求头的POST请求调用方式
* 带请求头的POST请求调用方式
*
*
* @param url 请求URL
* @param url
请求URL
* @param headers 请求头参数
* @param headers
请求头参数
* @param requestBody 请求参数体
* @param requestBody
请求参数体
* @param responseType 返回对象类型
* @param responseType 返回对象类型
* @param uriVariables URL中的变量,与Map中的key对应
* @param uriVariables URL中的变量,与Map中的key对应
* @return ResponseEntity 响应对象封装类
* @return ResponseEntity 响应对象封装类
*/
*/
public
static
<
T
>
ResponseEntity
<
T
>
post
(
String
url
,
Map
<
String
,
String
>
headers
,
Object
requestBody
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
public
static
<
T
>
ResponseEntity
<
T
>
post
(
String
url
,
Map
<
String
,
String
>
headers
,
Object
requestBody
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
HttpHeaders
httpHeaders
=
new
HttpHeaders
();
httpHeaders
.
setAll
(
headers
);
httpHeaders
.
setAll
(
headers
);
return
post
(
url
,
httpHeaders
,
requestBody
,
responseType
,
uriVariables
);
return
post
(
url
,
httpHeaders
,
requestBody
,
responseType
,
uriVariables
);
...
@@ -151,44 +170,53 @@ public final class RestTemplateUtils {
...
@@ -151,44 +170,53 @@ public final class RestTemplateUtils {
/**
/**
* 带请求头的POST请求调用方式
* 带请求头的POST请求调用方式
*
*
* @param url 请求URL
* @param url
请求URL
* @param headers 请求头参数
* @param headers
请求头参数
* @param requestBody 请求参数体
* @param requestBody
请求参数体
* @param responseType 返回对象类型
* @param responseType 返回对象类型
* @param uriVariables URL中的变量,与Map中的key对应
* @param uriVariables URL中的变量,与Map中的key对应
* @return ResponseEntity 响应对象封装类
* @return ResponseEntity 响应对象封装类
*/
*/
public
static
<
T
>
ResponseEntity
<
T
>
post
(
String
url
,
HttpHeaders
headers
,
Object
requestBody
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
public
static
<
T
>
ResponseEntity
<
T
>
post
(
String
url
,
HttpHeaders
headers
,
Object
requestBody
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
HttpEntity
<
Object
>
requestEntity
=
new
HttpEntity
<
Object
>(
requestBody
,
headers
);
HttpEntity
<
Object
>
requestEntity
=
new
HttpEntity
<
Object
>(
requestBody
,
headers
);
return
post
(
url
,
requestEntity
,
responseType
,
uriVariables
);
return
post
(
url
,
requestEntity
,
responseType
,
uriVariables
);
}
}
/**
/**
* 自定义请求头和请求体的POST请求调用方式
* 自定义请求头和请求体的POST请求调用方式
*
*
* @param url 请求URL
* @param url
请求URL
* @param requestEntity 请求头和请求体封装对象
* @param requestEntity 请求头和请求体封装对象
* @param responseType 返回对象类型
* @param responseType
返回对象类型
* @param uriVariables URL中的变量,与Map中的key对应
* @param uriVariables
URL中的变量,与Map中的key对应
* @return ResponseEntity 响应对象封装类
* @return ResponseEntity 响应对象封装类
*/
*/
public
static
<
T
>
ResponseEntity
<
T
>
post
(
String
url
,
HttpEntity
<?>
requestEntity
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
public
static
<
T
>
ResponseEntity
<
T
>
post
(
String
url
,
HttpEntity
<?>
requestEntity
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
return
REST_TEMPLATE
.
exchange
(
url
,
HttpMethod
.
POST
,
requestEntity
,
responseType
,
uriVariables
);
return
REST_TEMPLATE
.
exchange
(
url
,
HttpMethod
.
POST
,
requestEntity
,
responseType
,
uriVariables
);
}
}
/**
/**
* 通用调用方式
* 通用调用方式
*
*
* @param url 请求URL
* @param url
请求URL
* @param method 请求方法类型
* @param method
请求方法类型
* @param requestEntity 请求头和请求体封装对象
* @param requestEntity 请求头和请求体封装对象
* @param responseType 返回对象类型
* @param responseType
返回对象类型
* @param uriVariables URL中的变量,与Map中的key对应
* @param uriVariables
URL中的变量,与Map中的key对应
* @return ResponseEntity 响应对象封装类
* @return ResponseEntity 响应对象封装类
*/
*/
public
static
<
T
>
ResponseEntity
<
T
>
exchange
(
String
url
,
HttpMethod
method
,
HttpEntity
<?>
requestEntity
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
public
static
<
T
>
ResponseEntity
<
T
>
exchange
(
String
url
,
HttpMethod
method
,
HttpEntity
<?>
requestEntity
,
Class
<
T
>
responseType
,
Map
<
String
,
?>
uriVariables
)
{
return
REST_TEMPLATE
.
exchange
(
url
,
method
,
requestEntity
,
responseType
,
uriVariables
);
return
REST_TEMPLATE
.
exchange
(
url
,
method
,
requestEntity
,
responseType
,
uriVariables
);
}
}
...
...
src/main/java/com/syc/slm/slmbi/controller/VariableController.java
View file @
82414d64
...
@@ -61,15 +61,15 @@ public class VariableController extends BaseRestController{
...
@@ -61,15 +61,15 @@ public class VariableController extends BaseRestController{
Map
<
String
,
String
>
heads
=
Maps
.
newHashMap
();
Map
<
String
,
String
>
heads
=
Maps
.
newHashMap
();
heads
.
put
(
"token"
,
"345aa488a820448dbb069ea4295d2b15"
);
heads
.
put
(
"token"
,
"345aa488a820448dbb069ea4295d2b15"
);
R
<
List
<
PanelTreeNodeVo
>>
newR
=
new
R
<>();
R
<
List
<
PanelTreeNodeVo
>>
newR
=
new
R
<>();
//
ResponseEntity
<
Map
>
rest
=
RestTemplateUtils
.
get
(
//
ResponseEntity<Map> rest = RestTemplateUtils.get(
"http://localhost:2400/dc/{appId}/equipment/info/name/pull?token={token}&equipment_info_id={equipment_info_id}&customer_id={customer_id}&q_name={q_name}&search_code={search_code}&search_model={search_model}&warranty_status={warranty_status}&page_num={page_num}&page_size={page_size}"
,
//
"http://localhost:2400/dc/{appId}/equipment/info/name/pull?token={token}&equipment_info_id={equipment_info_id}&customer_id={customer_id}&q_name={q_name}&search_code={search_code}&search_model={search_model}&warranty_status={warranty_status}&page_num={page_num}&page_size={page_size}",
heads
,
//
heads,
Map
.
class
,
//
Map.class,
maps
);
//
maps);
if
(
rest
!=
null
){
//
if (rest != null){
return
rest
.
getBody
();
//
return rest.getBody();
}
//
}
return
null
;
return
null
;
}
}
...
...
src/main/java/com/syc/slm/slmbi/service/impl/BusinessConfigServiceImpl.java
View file @
82414d64
...
@@ -106,11 +106,10 @@ public class BusinessConfigServiceImpl extends ServiceImpl<BusinessConfigMapper,
...
@@ -106,11 +106,10 @@ public class BusinessConfigServiceImpl extends ServiceImpl<BusinessConfigMapper,
}
}
});
});
});
});
Map
<
String
,
String
>
heads
=
Maps
.
newHashMap
();
heads
.
put
(
"X-Token"
,
user
.
getToken
());
Map
<
String
,
String
>
uriVariables
=
Maps
.
newHashMap
();
Map
<
String
,
String
>
uriVariables
=
Maps
.
newHashMap
();
uriVariables
.
put
(
"appId"
,
user
.
getAppId
());
uriVariables
.
put
(
"appId"
,
user
.
getAppId
());
R
<
List
<
Map
<
String
,
Object
>>>
result
=
RestTemplateUtils
.
post
(
uri
,
heads
,
dto
,
new
TypeToken
<
R
<
List
<
Map
<
String
,
Object
>>>>()
{}.
getType
(),
uriVariables
);
R
<
List
<
Map
<
String
,
Object
>>>
result
=
RestTemplateUtils
.
post
(
uri
,
null
,
dto
,
new
TypeToken
<
R
<
List
<
Map
<
String
,
Object
>>>>()
{}.
getType
(),
uriVariables
);
return
result
.
detach
();
return
result
.
detach
();
}
}
...
@@ -131,7 +130,11 @@ public class BusinessConfigServiceImpl extends ServiceImpl<BusinessConfigMapper,
...
@@ -131,7 +130,11 @@ public class BusinessConfigServiceImpl extends ServiceImpl<BusinessConfigMapper,
uriVariables
.
put
(
"size"
,
size
);
uriVariables
.
put
(
"size"
,
size
);
uriVariables
.
put
(
"name"
,
name
);
uriVariables
.
put
(
"name"
,
name
);
IPage
<
String
>
page
=
new
Page
<>(
current
,
size
);
IPage
<
String
>
page
=
new
Page
<>(
current
,
size
);
R
<
Map
<
String
,
Object
>>
result
=
RestTemplateUtils
.
get
(
uri
,
new
TypeToken
<
R
<
Map
<
String
,
Object
>>>()
{}.
getType
(),
uriVariables
);
R
<
Map
<
String
,
Object
>>
result
=
RestTemplateUtils
.
get
(
uri
,()->{
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
header
.
put
(
"X-Token"
,
currentUser
.
getToken
());
return
header
;
},
new
TypeToken
<
R
<
Map
<
String
,
Object
>>>()
{}.
getType
(),
uriVariables
);
Map
<
String
,
Object
>
resultMaps
=
result
.
detach
();
Map
<
String
,
Object
>
resultMaps
=
result
.
detach
();
if
(
CollectionUtils
.
isNotEmpty
(
resultMaps
)){
if
(
CollectionUtils
.
isNotEmpty
(
resultMaps
)){
page
.
setTotal
(
new
BigDecimal
(
resultMaps
.
get
(
"total"
)+
""
).
longValue
());
page
.
setTotal
(
new
BigDecimal
(
resultMaps
.
get
(
"total"
)+
""
).
longValue
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment