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
ceb7a2e8
Commit
ceb7a2e8
authored
Aug 24, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hz_dev' into base-modify
parents
9052e771
b1b180c9
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
67 additions
and
8 deletions
+67
-8
CampsiteFeign.java
.../java/com/xxfc/platform/campsite/feign/CampsiteFeign.java
+3
-1
CampsiteShopBiz.java
.../java/com/xxfc/platform/campsite/biz/CampsiteShopBiz.java
+24
-0
CampsiteShopMapper.java
...com/xxfc/platform/campsite/mapper/CampsiteShopMapper.java
+8
-0
CampsiteShopController.java
...m/xxfc/platform/campsite/rest/CampsiteShopController.java
+7
-0
CampsiteShopMapper.xml
...e-server/src/main/resources/mapper/CampsiteShopMapper.xml
+7
-0
TourFeign.java
...src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
+3
-0
TourGoodBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
+1
-1
TourGoodVerificationMapper.xml
.../src/main/resources/mapper/TourGoodVerificationMapper.xml
+1
-1
VehicleFeign.java
...in/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
+3
-0
VehicleBookHourInfoBiz.java
...com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
+9
-4
VehicleModelBiz.java
...n/java/com/xxfc/platform/vehicle/biz/VehicleModelBiz.java
+1
-1
No files found.
xx-campsite/xx-campsite-api/src/main/java/com/xxfc/platform/campsite/feign/CampsiteFeign.java
View file @
ceb7a2e8
package
com
.
xxfc
.
platform
.
campsite
.
feign
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.GoodDataVO
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
...
@@ -20,5 +21,6 @@ public interface CampsiteFeign {
@GetMapping
(
value
=
"/campsiteShop/app/shopList"
)
public
List
<
GoodDataVO
>
goodList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"4"
)
Integer
limit
);
@GetMapping
(
value
=
"/campsiteShop/app/unauth/findRandomVehicle"
)
public
ObjectRestResponse
findRandomVehicle
(
@RequestParam
(
value
=
"number"
)
Integer
number
);
}
xx-campsite/xx-campsite-server/src/main/java/com/xxfc/platform/campsite/biz/CampsiteShopBiz.java
View file @
ceb7a2e8
...
...
@@ -2,6 +2,8 @@ package com.xxfc.platform.campsite.biz;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.RandomUtil
;
import
com.github.wxiaoqi.security.common.vo.GoodDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.campsite.dto.*
;
...
...
@@ -330,6 +332,28 @@ public class CampsiteShopBiz extends BaseBiz<CampsiteShopMapper, CampsiteShop> {
.
toEpochMilli
();
}
/**
* 获取指定数量的随机旅游路线
* @return
*/
public
ObjectRestResponse
findRandomVehicle
(
Integer
number
)
{
number
=
number
==
null
?
2
:
number
;
List
<
GoodDataVO
>
list
=
mapper
.
findAll
();
Set
<
GoodDataVO
>
resultList
=
new
HashSet
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
number
==
list
.
size
())
{
return
ObjectRestResponse
.
succ
(
list
);
}
Set
<
Integer
>
set
=
new
HashSet
<>();
RandomUtil
.
randomSet
(
list
.
size
(),
number
,
set
);
for
(
Integer
i
:
set
)
{
resultList
.
add
(
list
.
get
(
i
));
}
}
return
ObjectRestResponse
.
succ
(
resultList
);
}
private
long
transformEndTime
(
Long
endTime
)
{
return
LocalDateTime
.
ofInstant
(
new
Date
(
endTime
).
toInstant
(),
ZoneOffset
.
ofHours
(+
8
))
...
...
xx-campsite/xx-campsite-server/src/main/java/com/xxfc/platform/campsite/mapper/CampsiteShopMapper.java
View file @
ceb7a2e8
...
...
@@ -39,6 +39,8 @@ public interface CampsiteShopMapper extends Mapper<CampsiteShop> {
*/
List
<
GoodDataVO
>
findAllByHome
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"size"
)
Integer
size
);
List
<
GoodDataVO
>
findAll
();
/**
* 根据店铺id查询
*
...
...
@@ -80,5 +82,11 @@ public interface CampsiteShopMapper extends Mapper<CampsiteShop> {
* @param name
* @return
*/
<<<<<<<
HEAD
int
checkNameExist
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"name"
)
String
name
);
=======
int
checkNameExist
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"name"
)
String
name
);
>>>>>>>
dev
}
xx-campsite/xx-campsite-server/src/main/java/com/xxfc/platform/campsite/rest/CampsiteShopController.java
View file @
ceb7a2e8
...
...
@@ -60,11 +60,18 @@ public class CampsiteShopController extends BaseController<CampsiteShopBiz, Camp
return
getBaseBiz
().
getAllByHome
(
page
,
limit
);
}
<<<<<<<
HEAD
@PostMapping
(
value
=
"/app/unauth/webchat_official/campsites"
)
public
ObjectRestResponse
<
PageDataVO
<
CampsiteShopPageVo
>>
findCampsitesForPublicNumber
(
@RequestBody
CampsiteShopFindDTO
campsiteShopFindDTO
){
PageDataVO
<
CampsiteShopPageVo
>
campsiteShops
=
baseBiz
.
findCampsiteShopPageByType
(
campsiteShopFindDTO
);
return
ObjectRestResponse
.
succ
(
campsiteShops
);
=======
@ApiOperation
(
"随机获取营地"
)
@GetMapping
(
value
=
"/app/unauth/findRandomVehicle"
)
public
ObjectRestResponse
findRandomVehicle
(
Integer
number
)
{
return
baseBiz
.
findRandomVehicle
(
number
);
>>>>>>>
dev
}
}
\ No newline at end of file
xx-campsite/xx-campsite-server/src/main/resources/mapper/CampsiteShopMapper.xml
View file @
ceb7a2e8
...
...
@@ -63,6 +63,13 @@
limit #{start,jdbcType=INTEGER},#{size,jdbcType=INTEGER}
</select>
<select
id=
"findAll"
resultType=
"com.github.wxiaoqi.security.common.vo.GoodDataVO"
>
select cs.id as `id`,cs.name as `name`,cs.logo as `imgUrl`,cs.province_name as `name1`,cs.longitude,cs.latitude
FROM `campsite_shop` cs
where cs.sale_state=1 and cs.is_del=0
order by cs.hot desc
</select>
<!--根据id查询详情-->
<select
id=
"findCampsiteShopDetailById"
resultType=
"com.xxfc.platform.campsite.dto.CampsiteShopDetailDTO"
>
select `name` as `name`,`province_name` as `provinceName`,`city_name` as `cityName`,`address` as `address`,`service_phone` as `phone`,`logo` as `logo`,`poster_background` as `posterBackground` ,
...
...
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
View file @
ceb7a2e8
...
...
@@ -104,4 +104,7 @@ public interface TourFeign {
@GetMapping
(
"/spe/departure_date"
)
Date
selectDepartureDataBySpeId
(
@RequestParam
(
value
=
"speIds"
)
Integer
speIds
);
@GetMapping
(
value
=
"/tourGood/app/unauth/findRandomVehicle"
)
public
ObjectRestResponse
findRandomVehicle
(
@RequestParam
(
value
=
"number"
)
Integer
number
);
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
View file @
ceb7a2e8
...
...
@@ -329,7 +329,7 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
* @return
*/
public
ObjectRestResponse
findRandomVehicle
(
Integer
number
)
{
number
=
number
==
null
?
3
:
number
;
number
=
number
==
null
?
2
:
number
;
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
List
<
TourGood
>
list
=
mapper
.
getCoordinateList
(
param
);
Set
<
TourGood
>
resultList
=
new
HashSet
<>();
...
...
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodVerificationMapper.xml
View file @
ceb7a2e8
...
...
@@ -100,7 +100,7 @@
LEFT JOIN tour_good_site s on v.site_id=s.id
LEFT JOIN tour_good_spe_price p ON v.spe_id=p.id
WHERE
v.is_del = 0 and v.good_id=#{goodId}
and DATEDIFF(p.start_time,NOW())>0
v.is_del = 0 and v.good_id=#{goodId}
<!--and DATEDIFF(p.start_time,NOW())>0-->
<if
test=
"siteId!=null and siteId!='' "
>
and v.site_id=#{siteId}
</if>
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
View file @
ceb7a2e8
...
...
@@ -39,6 +39,9 @@ public interface VehicleFeign {
@PostMapping
(
"/active/small/arrival"
)
public
RestResponse
arrivalBySmall
(
@RequestBody
VehicleArrivalVo
arrivalVo
);
@GetMapping
(
value
=
"/vehicleModel/app/unauth/findRandomVehicle"
)
public
ObjectRestResponse
findRandomVehicle
(
@RequestParam
(
value
=
"number"
)
Integer
number
);
//修改评分
@RequestMapping
(
value
=
"/vehicleModel/app/addScore"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
addScore
(
@RequestParam
(
value
=
"id"
)
Integer
id
,
@RequestParam
(
value
=
"score"
)
Integer
score
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
View file @
ceb7a2e8
...
...
@@ -70,19 +70,24 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
endPredictableHour
|=
1
<<
(
curentHour
);
}
}
DateTime
startDay
=
DateTime
.
parse
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
DATE_TIME_FORMATTER
);
DateTime
endDay
=
DateTime
.
parse
(
DateTime
.
parse
(
bookEndDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
DATE_TIME_FORMATTER
);
if
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
).
equals
(
DateTime
.
parse
(
bookEndDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
)))
{
//同一天预定
//如果开始时间是0点开始
if
(
startPredictableHour
==
0
||
endPredictableHour
==
0
)
{
predictableHours
.
put
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
startPredictableHour
|
endPredictableHour
);
}
else
{
predictableHours
.
put
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
startPredictableHour
&
endPredictableHour
);
}
}
else
{
}
else
{
//非同一天开始
if
(
startPredictableHour
==
0
)
{
//如果是0点就直接预订全天
startPredictableHour
=
16777215
;
}
predictableHours
.
put
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
startPredictableHour
);
predictableHours
.
put
(
DateTime
.
parse
(
bookEndDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
endPredictableHour
);
}
DateTime
startDay
=
DateTime
.
parse
(
DateTime
.
parse
(
bookStartDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
DATE_TIME_FORMATTER
);
DateTime
endDay
=
DateTime
.
parse
(
DateTime
.
parse
(
bookEndDate
,
DEFAULT_DATE_TIME_FORMATTER
).
toString
(
DATE_TIME_FORMATTER
),
DATE_TIME_FORMATTER
);
if
(
endDay
.
getDayOfMonth
()
-
startDay
.
getDayOfMonth
()
>
1
){
//
if
(
endDay
.
getDayOfMonth
()
-
startDay
.
getDayOfMonth
()
>
1
){
//
for
(
DateTime
curDate
=
startDay
.
plusDays
(
1
);
curDate
.
compareTo
(
endDay
)
<
0
;
curDate
=
curDate
.
plusDays
(
1
))
{
String
curDateStr
=
curDate
.
toString
(
DATE_TIME_FORMATTER
);
//全天预定
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelBiz.java
View file @
ceb7a2e8
...
...
@@ -78,7 +78,7 @@ public class VehicleModelBiz extends BaseBiz<VehicleModelMapper, VehicleModel> {
* @return
*/
public
ObjectRestResponse
findRandomVehicle
(
Integer
number
)
{
number
=
number
==
null
?
3
:
number
;
number
=
number
==
null
?
2
:
number
;
VehicleModelQueryCondition
vmqc
=
new
VehicleModelQueryCondition
();
List
<
VehicleModelVo
>
list
=
mapper
.
findVehicleModelPage
(
vmqc
);
Set
<
VehicleModelVo
>
resultList
=
new
HashSet
<>();
...
...
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