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
040789ab
Commit
040789ab
authored
Sep 03, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-tiande' into dev-tiande
parents
6b3aaf8a
78c5d50c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
6 deletions
+55
-6
GoodSearchDTO.java
...c/main/java/com/xxfc/platform/tour/dto/GoodSearchDTO.java
+10
-1
TourGoodBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
+2
-2
TourGoodAdminController.java
...xfc/platform/tour/rest/admin/TourGoodAdminController.java
+12
-1
TourGoodMapper.xml
...-tour-server/src/main/resources/mapper/TourGoodMapper.xml
+31
-2
No files found.
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/dto/GoodSearchDTO.java
View file @
040789ab
package
com
.
xxfc
.
platform
.
tour
.
dto
;
package
com
.
xxfc
.
platform
.
tour
.
dto
;
import
com.github.wxiaoqi.security.common.vo.DataInter
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/**
/**
* 旅游商品
* 旅游商品
...
@@ -13,7 +16,7 @@ import lombok.Data;
...
@@ -13,7 +16,7 @@ import lombok.Data;
* @date 2019-06-06 11:41:51
* @date 2019-06-06 11:41:51
*/
*/
@Data
@Data
public
class
GoodSearchDTO
extends
PageParam
{
public
class
GoodSearchDTO
extends
PageParam
implements
DataInter
{
...
@@ -36,5 +39,11 @@ public class GoodSearchDTO extends PageParam {
...
@@ -36,5 +39,11 @@ public class GoodSearchDTO extends PageParam {
List
<
Integer
>
dataCorporationIds
;
List
<
Integer
>
dataCompanyIds
;
}
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
View file @
040789ab
...
@@ -116,7 +116,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
...
@@ -116,7 +116,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
PageInfo
<
TourGoodVo
>
goodPageInfo
=
new
PageInfo
<>(
mapper
.
findGoodList
(
dto
));
PageInfo
<
TourGoodVo
>
goodPageInfo
=
new
PageInfo
<>(
mapper
.
findGoodList
(
dto
));
goodPageInfo
.
getList
();
goodPageInfo
.
getList
();
PageDataVO
<
TourGoodVo
>
dataVO
=
PageDataVO
.
pageInfo
(
goodPageInfo
);
PageDataVO
<
TourGoodVo
>
dataVO
=
PageDataVO
.
pageInfo
(
goodPageInfo
);
List
<
TourGoodVo
>
list
=
dataVO
.
getData
();
/*
List<TourGoodVo> list = dataVO.getData();
if (list != null && list.size() > 0){
if (list != null && list.size() > 0){
List<Long> corporationIds=list.stream().map(TourGoodVo::getCorporationId).distinct().collect(Collectors.toList());
List<Long> corporationIds=list.stream().map(TourGoodVo::getCorporationId).distinct().collect(Collectors.toList());
CompanyInfoFindDTO companyInfoFindDTO=new CompanyInfoFindDTO();
CompanyInfoFindDTO companyInfoFindDTO=new CompanyInfoFindDTO();
...
@@ -156,7 +156,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
...
@@ -156,7 +156,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
tourGoodVo.setCompanyName(companySearchVO.getName());
tourGoodVo.setCompanyName(companySearchVO.getName());
}
}
}
}
}
}
*/
return
dataVO
;
return
dataVO
;
}
}
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/admin/TourGoodAdminController.java
View file @
040789ab
package
com
.
xxfc
.
platform
.
tour
.
rest
.
admin
;
package
com
.
xxfc
.
platform
.
tour
.
rest
.
admin
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
...
@@ -16,14 +18,23 @@ import org.springframework.web.bind.annotation.*;
...
@@ -16,14 +18,23 @@ import org.springframework.web.bind.annotation.*;
@RestController
@RestController
@RequestMapping
(
"good"
)
@RequestMapping
(
"good"
)
@IgnoreClientToken
@IgnoreClientToken
public
class
TourGoodAdminController
extends
BaseController
<
TourGoodBiz
,
TourGood
>
{
public
class
TourGoodAdminController
extends
BaseController
<
TourGoodBiz
,
TourGood
>
implements
UserRestInterface
{
@Autowired
@Autowired
TourGoodDetailBiz
detailBiz
;
TourGoodDetailBiz
detailBiz
;
@Autowired
UserFeign
userFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
@ApiOperation
(
"后台查询旅游路线列表"
)
@ApiOperation
(
"后台查询旅游路线列表"
)
@RequestMapping
(
value
=
"/admin/goodList"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/admin/goodList"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
TourGood
>
goodList
(
@RequestBody
GoodSearchDTO
dto
)
{
public
ObjectRestResponse
<
TourGood
>
goodList
(
@RequestBody
GoodSearchDTO
dto
)
{
setPowerData
(
dto
,
true
);
return
ObjectRestResponse
.
succ
(
baseBiz
.
getAll
(
dto
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
getAll
(
dto
));
}
}
...
...
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodMapper.xml
View file @
040789ab
...
@@ -51,8 +51,10 @@
...
@@ -51,8 +51,10 @@
<result
property=
"unit"
column=
"unit"
/>
<result
property=
"unit"
column=
"unit"
/>
<result
property=
"tagNames"
column=
"tagNames"
/>
<result
property=
"tagNames"
column=
"tagNames"
/>
<result
property=
"isOutside"
column=
"is_outside"
/>
<result
property=
"isOutside"
column=
"is_outside"
/>
<result
property=
"corporationId"
column=
"corporation
_i
d"
/>
<result
property=
"corporationId"
column=
"corporation
I
d"
/>
<result
property=
"companyId"
column=
"company_id"
/>
<result
property=
"companyId"
column=
"company_id"
/>
<result
property=
"companyName"
column=
"companyName"
/>
<result
property=
"corporationName"
column=
"corporationName"
/>
</resultMap>
</resultMap>
<!--查询旅游路线列表-->
<!--查询旅游路线列表-->
...
@@ -109,9 +111,18 @@
...
@@ -109,9 +111,18 @@
<!--后台查询旅游路线列表-->
<!--后台查询旅游路线列表-->
<select
id=
"findGoodList"
resultMap=
"tourGoodVoMap"
>
<select
id=
"findGoodList"
resultMap=
"tourGoodVoMap"
>
SELECT g.*,REPLACE(GROUP_CONCAT( DISTINCT t.`name`),',','|')as tagNames from tour_good g
SELECT
g.*,
REPLACE(GROUP_CONCAT( DISTINCT t.`name`),',','|')as tagNames,
c.`name` as companyName,
IFNULL(i.`name`,ci.`name`) as corporationName,
if(i.id > 0,i.id,g.corporation_id) as corporationId
from tour_good g
LEFT JOIN (SELECT * FROM tour_good_tag WHERE is_del=0) tag ON g.id=tag.good_id
LEFT JOIN (SELECT * FROM tour_good_tag WHERE is_del=0) tag ON g.id=tag.good_id
LEFT JOIN (SELECT * FROM tour_tag WHERE is_del=0) t ON tag.tag_id=t.id
LEFT JOIN (SELECT * FROM tour_tag WHERE is_del=0) t ON tag.tag_id=t.id
LEFT JOIN branch_company c ON g.company_id=c.id
LEFT JOIN company_info i ON c.company_id=i.id
LEFT JOIN company_info ci ON g.corporation_id=ci.id
<where>
<where>
g.is_del=0
g.is_del=0
<if
test=
"params.name != null and params.name != ''"
>
<if
test=
"params.name != null and params.name != ''"
>
...
@@ -127,6 +138,24 @@
...
@@ -127,6 +138,24 @@
and g.id in (SELECT good_id from tour_good_tag
and g.id in (SELECT good_id from tour_good_tag
where tag_id = #{params.tagId} and is_del=0 )
where tag_id = #{params.tagId} and is_del=0 )
</if>
</if>
<if
test=
"params.dataCompanyIds != null and params.dataCompanyIds.size > 0"
>
and g.company_id in
<foreach
collection=
"params.dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
<if
test=
"params.dataCorporationIds != null and params.dataCorporationIds.size > 0"
>
and ( i.id in
<foreach
collection=
"params.dataCorporationIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
or ( g.corporation_id in
<foreach
collection=
"params.dataCorporationIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
and g.company_id = 0 )
)
</if>
</where>
</where>
GROUP BY g.id
GROUP BY g.id
...
...
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