Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
ce55c639
Commit
ce55c639
authored
Jun 08, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
31a74322
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
17 deletions
+30
-17
PageDataVO.java
...ava/com/github/wxiaoqi/security/common/vo/PageDataVO.java
+3
-4
pom.xml
xx-common/xx-common-platform-web/pom.xml
+5
-0
pom.xml
xx-common/xx-common-platform/pom.xml
+0
-5
BaseOrderController.java
...ava/com/xxfc/platform/order/rest/BaseOrderController.java
+14
-6
TourGoodBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
+8
-2
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/vo/PageDataVO.java
View file @
ce55c639
...
@@ -34,10 +34,9 @@ public class PageDataVO<T> {
...
@@ -34,10 +34,9 @@ public class PageDataVO<T> {
return
pageDataVo
;
return
pageDataVo
;
}
}
public
static
<
M
>
PageDataVO
<
M
>
pageInfo
(
Integer
page
,
Integer
limit
,
List
<
M
>
list
){
public
static
<
M
>
PageDataVO
<
M
>
pageInfo
(
List
<
M
>
list
){
PageHelper
.
startPage
(
page
,
limit
);
PageInfo
<
M
>
pageInfo
=
new
PageInfo
<
M
>(
list
);
PageInfo
<
M
>
listPageInfo
=
new
PageInfo
<
M
>(
list
);
return
PageDataVO
.
pageInfo
(
pageInfo
);
return
pageInfo
(
listPageInfo
);
}
}
}
}
xx-common/xx-common-platform-web/pom.xml
View file @
ce55c639
...
@@ -53,6 +53,11 @@
...
@@ -53,6 +53,11 @@
<artifactId>
mybatis-spring-boot-starter
</artifactId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
<version>
1.3.4
</version>
<version>
1.3.4
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<version>
1.2.10
</version>
</dependency>
<!-- druid -->
<!-- druid -->
<dependency>
<dependency>
<groupId>
com.github.drtrang
</groupId>
<groupId>
com.github.drtrang
</groupId>
...
...
xx-common/xx-common-platform/pom.xml
View file @
ce55c639
...
@@ -48,11 +48,6 @@
...
@@ -48,11 +48,6 @@
<groupId>
mysql
</groupId>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<version>
1.2.10
</version>
</dependency>
<!-- excel 组件 -->
<!-- excel 组件 -->
<dependency>
<dependency>
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BaseOrderController.java
View file @
ce55c639
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.order.rest;
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.order.rest;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.github.pagehelper.PageHelper
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.context.BaseContextHandler
;
import
com.github.wxiaoqi.security.common.context.BaseContextHandler
;
...
@@ -69,7 +70,8 @@ public class BaseOrderController extends CommonBaseController {
...
@@ -69,7 +70,8 @@ public class BaseOrderController extends CommonBaseController {
}
}
dto
.
setCrtUser
(
Integer
.
valueOf
(
BaseContextHandler
.
getUserID
()));
dto
.
setCrtUser
(
Integer
.
valueOf
(
BaseContextHandler
.
getUserID
()));
Query
query
=
new
Query
(
dto
);
Query
query
=
new
Query
(
dto
);
return
new
ObjectRestResponse
<>().
data
(
PageDataVO
.
pageInfo
(
query
.
getPage
(),
query
.
getLimit
(),
baseOrderBiz
.
pageByParm
(
query
.
getSuper
())));
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
return
new
ObjectRestResponse
<>().
data
(
PageDataVO
.
pageInfo
(
baseOrderBiz
.
pageByParm
(
query
.
getSuper
())));
}
}
@ApiOperation
(
"订单详情"
)
@ApiOperation
(
"订单详情"
)
...
@@ -81,17 +83,23 @@ public class BaseOrderController extends CommonBaseController {
...
@@ -81,17 +83,23 @@ public class BaseOrderController extends CommonBaseController {
if
(
StringUtils
.
isBlank
(
BaseContextHandler
.
getUserID
()))
{
if
(
StringUtils
.
isBlank
(
BaseContextHandler
.
getUserID
()))
{
throw
new
BaseException
(
ResultCode
.
AJAX_WECHAT_NOTEXIST_CODE
);
throw
new
BaseException
(
ResultCode
.
AJAX_WECHAT_NOTEXIST_CODE
);
}
}
Query
query
=
initQuery
(
no
);
PageDataVO
<
OrderPageVO
>
page
=
PageDataVO
.
pageInfo
(
baseOrderBiz
.
pageByParm
(
query
.
getSuper
()));
if
(
page
.
getData
().
isEmpty
())
{
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
);
}
return
new
ObjectRestResponse
<>().
data
(
page
.
getData
().
get
(
0
));
}
private
Query
initQuery
(
String
no
)
{
QueryOrderDetailDTO
qodd
=
new
QueryOrderDetailDTO
();
QueryOrderDetailDTO
qodd
=
new
QueryOrderDetailDTO
();
qodd
.
setCrtUser
(
Integer
.
valueOf
(
BaseContextHandler
.
getUserID
()));
qodd
.
setCrtUser
(
Integer
.
valueOf
(
BaseContextHandler
.
getUserID
()));
qodd
.
setNo
(
no
);
qodd
.
setNo
(
no
);
qodd
.
setLimit
(
1
);
qodd
.
setLimit
(
1
);
qodd
.
setPage
(
1
);
qodd
.
setPage
(
1
);
Query
query
=
new
Query
(
qodd
);
Query
query
=
new
Query
(
qodd
);
PageDataVO
<
OrderPageVO
>
page
=
PageDataVO
.
pageInfo
(
query
.
getPage
(),
query
.
getLimit
(),
baseOrderBiz
.
pageByParm
(
query
.
getSuper
()));
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
if
(
page
.
getData
().
isEmpty
())
{
return
query
;
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
);
}
return
new
ObjectRestResponse
<>().
data
(
page
.
getData
().
get
(
0
));
}
}
@RequestMapping
(
value
=
"/pay"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/pay"
,
method
=
RequestMethod
.
POST
)
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
View file @
ce55c639
package
com
.
xxfc
.
platform
.
tour
.
biz
;
package
com
.
xxfc
.
platform
.
tour
.
biz
;
import
com.github.pagehelper.PageHelper
;
import
com.github.wxiaoqi.security.common.msg.BaseResponse
;
import
com.github.wxiaoqi.security.common.msg.BaseResponse
;
import
com.github.wxiaoqi.security.common.msg.ListRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ListRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
...
@@ -29,13 +30,18 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper,TourGood> {
...
@@ -29,13 +30,18 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper,TourGood> {
private
TourGoodMapper
tourGoodMapper
;
private
TourGoodMapper
tourGoodMapper
;
public
PageDataVO
<
TourGood
>
getGoodList
(
int
page
,
int
limit
,
String
query
,
Double
latitude
,
Double
longitude
,
Integer
tagId
,
Double
distance
){
public
PageDataVO
<
TourGood
>
getGoodList
(
int
page
,
int
limit
,
String
query
,
Double
latitude
,
Double
longitude
,
Integer
tagId
,
Double
distance
){
Map
<
String
,
Object
>
params
=
initParam
(
page
,
limit
,
query
,
latitude
,
longitude
,
tagId
,
distance
);
return
PageDataVO
.
pageInfo
(
mapper
.
getGoodList
(
params
));
}
private
Map
<
String
,
Object
>
initParam
(
int
page
,
int
limit
,
String
query
,
Double
latitude
,
Double
longitude
,
Integer
tagId
,
Double
distance
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"query"
,
query
);
params
.
put
(
"query"
,
query
);
params
.
put
(
"latitude"
,
latitude
);
params
.
put
(
"latitude"
,
latitude
);
params
.
put
(
"longitude"
,
longitude
);
params
.
put
(
"longitude"
,
longitude
);
params
.
put
(
"tagId"
,
tagId
);
params
.
put
(
"tagId"
,
tagId
);
params
.
put
(
"distance"
,
distance
);
params
.
put
(
"distance"
,
distance
);
// List<TourGood> list = tourGoodMapper.getGoodList(params
);
PageHelper
.
startPage
(
page
,
limit
);
return
PageDataVO
.
pageInfo
(
page
,
limit
,
mapper
.
getGoodList
(
params
))
;
return
params
;
}
}
}
}
\ No newline at end of file
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