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
c5dcfed9
Commit
c5dcfed9
authored
Oct 25, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Appbanner接口
parent
32d574a6
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
84 additions
and
14 deletions
+84
-14
BannerBiz.java
...er/src/main/java/com/xxfc/platform/app/biz/BannerBiz.java
+2
-2
BannerMapper.java
.../main/java/com/xxfc/platform/app/mapper/BannerMapper.java
+1
-1
BannerController.java
...ain/java/com/xxfc/platform/app/rest/BannerController.java
+5
-3
BannerMapper.xml
.../xx-app-server/src/main/resources/mapper/BannerMapper.xml
+8
-0
VehicleBookRecordVO2.java
.../com/xxfc/platform/vehicle/pojo/VehicleBookRecordVO2.java
+12
-0
VehicleBookRecordBiz.java
...a/com/xxfc/platform/vehicle/biz/VehicleBookRecordBiz.java
+16
-0
VehicleMapper.java
.../java/com/xxfc/platform/vehicle/mapper/VehicleMapper.java
+3
-0
ChwAppVehicleController.java
...m/xxfc/platform/vehicle/rest/ChwAppVehicleController.java
+4
-4
RentVehicleController.java
...com/xxfc/platform/vehicle/rest/RentVehicleController.java
+25
-4
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+8
-0
No files found.
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/BannerBiz.java
View file @
c5dcfed9
...
...
@@ -22,9 +22,9 @@ import java.util.List;
@Service
public
class
BannerBiz
extends
BaseBiz
<
BannerMapper
,
Banner
>
{
public
List
<
BannerVo
>
findBannerList
(
Integer
type
,
Integer
location
,
Integer
platform
)
{
public
List
<
BannerVo
>
findBannerList
(
Integer
type
,
Integer
location
,
String
multiLocation
,
Integer
platform
)
{
List
<
BannerVo
>
bannerVos
=
new
ArrayList
<>();
List
<
Banner
>
banners
=
mapper
.
findBannerListByType
(
type
,
location
,
platform
);
List
<
Banner
>
banners
=
mapper
.
findBannerListByType
(
type
,
location
,
multiLocation
,
platform
);
banners
.
forEach
(
banner
->
{
BannerVo
bannerVo
=
new
BannerVo
();
BeanUtils
.
copyProperties
(
banner
,
bannerVo
);
...
...
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/mapper/BannerMapper.java
View file @
c5dcfed9
...
...
@@ -27,5 +27,5 @@ public interface BannerMapper extends Mapper<Banner> {
List
<
Banner
>
findBannerListByType
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"location"
)
Integer
location
,
@Param
(
"platform"
)
Integer
platform
);
List
<
Banner
>
findBannerListByType
(
@Param
(
"type"
)
Integer
type
,
@Param
(
"location"
)
Integer
location
,
@Param
(
"multiLocation"
)
String
multiLocation
,
@Param
(
"platform"
)
Integer
platform
);
}
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/BannerController.java
View file @
c5dcfed9
package
com
.
xxfc
.
platform
.
app
.
rest
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.app.biz.BannerBiz
;
import
com.xxfc.platform.app.entity.vo.BannerVo
;
...
...
@@ -30,13 +31,14 @@ public class BannerController {
* @return
*/
@GetMapping
(
"/app/unauth/findBannerlist"
)
public
ObjectRestResponse
findBannerlist
(
@RequestParam
(
value
=
"type"
)
Integer
type
,
public
ObjectRestResponse
findBannerlist
(
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
required
=
false
,
value
=
"location"
)
Integer
location
,
@RequestParam
(
required
=
false
,
value
=
"location"
)
String
multiLocation
,
@RequestParam
(
value
=
"platform"
,
required
=
false
,
defaultValue
=
"0"
)
Integer
platform
)
{
if
(
type
==
null
)
{
if
(
null
==
location
||
StrUtil
.
isBlank
(
multiLocation
)
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
List
<
BannerVo
>
bannerList
=
bannerBiz
.
findBannerList
(
type
,
location
,
platform
);
List
<
BannerVo
>
bannerList
=
bannerBiz
.
findBannerList
(
type
,
location
,
multiLocation
,
platform
);
return
ObjectRestResponse
.
succ
(
bannerList
);
}
}
xx-app/xx-app-server/src/main/resources/mapper/BannerMapper.xml
View file @
c5dcfed9
...
...
@@ -23,6 +23,14 @@
<if
test=
"location != null"
>
and `location`=#{location}
</if>
<if
test=
"multiLocation != null"
>
and
(
<foreach
collection=
"multiLocation.split(',')"
index=
"lIndex"
item=
"locationEntity"
separator=
" or "
>
location = #{locationEntity}
</foreach>
)
</if>
<if
test=
"platform != null"
>
and `platform`=#{platform}
</if>
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/VehicleBookRecordVO2.java
0 → 100644
View file @
c5dcfed9
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
import
com.xxfc.platform.vehicle.entity.VehicleBookRecord
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
VehicleBookRecordVO2
extends
VehicleBookRecord
{
private
Date
bookStartDate
;
private
Date
bookEndDate
;
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookRecordBiz.java
View file @
c5dcfed9
package
com
.
xxfc
.
platform
.
vehicle
.
biz
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
...
...
@@ -41,8 +42,11 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.function.Supplier
;
import
java.util.stream.Collectors
;
import
static
com
.
github
.
wxiaoqi
.
security
.
auth
.
common
.
constatns
.
CommonConstants
.
DATA_ALL_FALSE
;
...
...
@@ -718,4 +722,16 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
}
return
data
.
subList
(
fromIndex
,
toIndex
);
}
// public List<VehicleBookRecord> selectByWeekendsOr() {
// WeekendSqls whereSqls = WeekendSqls.<VehicleBookRecord>custom();
// whereSqls.
// Example.Builder builder = new Example.Builder(entityClass)
// .where(whereSqls);
// Example example = builder.build();
// if(StrUtil.isNotBlank(orderStr)) {
// example.setOrderByClause(orderStr);
// }
// return selectByExample(example);
// }
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleMapper.java
View file @
c5dcfed9
...
...
@@ -72,4 +72,7 @@ public interface VehicleMapper extends Mapper<Vehicle> {
@Select
(
"SELECT goods_type FROM vehicle WHERE subordinate_branch=#{commpanyId} AND is_del=0 GROUP BY goods_type"
)
List
<
Integer
>
goodTypes
(
@Param
(
"commpanyId"
)
Integer
commpanyId
);
List
<
VehicleBookRecordVO2
>
calendarPriceList
(
@Param
(
"commpanyId"
)
Integer
commpanyId
);
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/ChwAppVehicleController.java
View file @
c5dcfed9
...
...
@@ -79,9 +79,9 @@ public class ChwAppVehicleController extends BaseController<VehicleBiz> implemen
@RequestMapping
(
value
=
"/vehicleBrand/alls"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@IgnoreUserToken
public
List
<
VehicleBrand
>
all
(
VehicleBrand
vehicleBrand
)
{
public
ObjectRestResponse
<
List
<
VehicleBrand
>
>
all
(
VehicleBrand
vehicleBrand
)
{
vehicleBrand
.
setIsDel
(
SYS_FALSE
);
return
vehicleBrandBiz
.
selectList
(
vehicleBrand
);
return
ObjectRestResponse
.
succ
(
vehicleBrandBiz
.
selectList
(
vehicleBrand
)
);
}
@ApiOperation
(
"vehicleCategory查询分页"
)
...
...
@@ -98,9 +98,9 @@ public class ChwAppVehicleController extends BaseController<VehicleBiz> implemen
@RequestMapping
(
value
=
"/vehicleCategory/alls"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@IgnoreUserToken
public
List
<
VehicleCategory
>
vehicleCategoryAll
(
VehicleCategory
vehicleCategory
)
{
public
ObjectRestResponse
<
List
<
VehicleCategory
>
>
vehicleCategoryAll
(
VehicleCategory
vehicleCategory
)
{
vehicleCategory
.
setIsDel
(
SYS_FALSE
);
return
vehicleCategoryBiz
.
selectList
(
vehicleCategory
);
return
ObjectRestResponse
.
succ
(
vehicleCategoryBiz
.
selectList
(
vehicleCategory
)
);
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/RentVehicleController.java
View file @
c5dcfed9
...
...
@@ -14,6 +14,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.vehicle.biz.VehicleBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleBookRecordBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleHolidayPriceInfoBiz
;
import
com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz
;
import
com.xxfc.platform.vehicle.common.BaseController
;
...
...
@@ -72,6 +73,9 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
@Autowired
VehicleBiz
vehicleBiz
;
@Autowired
VehicleBookRecordBiz
vehicleBookRecordBiz
;
@Autowired
VehicleHolidayPriceInfoBiz
vehicleHolidayPriceInfoBiz
;
...
...
@@ -408,10 +412,6 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
cn
.
hutool
.
core
.
date
.
DateTime
beginOfStartDate
=
DateUtil
.
beginOfDay
(
DateUtil
.
parse
(
startDate
));
cn
.
hutool
.
core
.
date
.
DateTime
endOfStartDate
=
DateUtil
.
endOfDay
(
DateUtil
.
parse
(
endDate
));
//获取基本和周末价格
// VehicleCommonPriceInfo vehicleCommonPriceInfo = vehicleCommonPriceInfoBiz.selectOne(new VehicleCommonPriceInfo(){{
// setCompanyId(companyId);
// setVehicleId(vehicleId);
// }});
Vehicle
vehicle
=
vehicleBiz
.
selectOne
(
new
Vehicle
(){{
setParkBranchCompanyId
(
companyId
);
setId
(
vehicleId
);
...
...
@@ -492,4 +492,25 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
return
priceDTOS
;
}
// /**获取价格日历**/
// public List getChwCalendarPrice (String vehicleId, String startDate, String endDate, Integer userId, Integer startCompanyId, Integer endCompanyId) {
// //根据时间获取预约记录
// vehicleBookRecordBiz.selectByWeekend(w -> {
// w.andLessThanOrEqualTo(VehicleBookRecord::getBookStartDate,)
// })
//
// return null;
// }
//
// @Data
// public static class CalendarPriceChwDTO {
// private List<String> dateStrs;
// }
//
// @Data
// public static class CalendarPriceChwDTO {
// private String dateStrs;
// private
// }
}
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
c5dcfed9
...
...
@@ -1290,6 +1290,14 @@
on sevbr.vehicle_id = vbrs.vehicle_id and sevbr.min_book_start_date = IFNULL(vbrs.actual_start_date, vbrs.book_start_date) and vbrs.status != 4 and vbrs.status != 6
</sql>
<select
id=
"calendarPriceList"
resultType=
"com.xxfc.platform.vehicle.pojo.VehicleBookRecordVO2"
>
select *,
if(IFNULL(actual_end_date, book_end_date)
<
#{startDateExtend}, IFNULL(actual_end_date,book_end_date), null) as book_end_date,
if(IFNULL(actual_start_date, book_start_date)
>
#{endDateExtend}, IFNULL(actual_start_date, book_start_date), null) as book_start_date
from vehicle_book_record
where status != 4 and status != 6
order by book_start_date asc;
</select>
<select
id=
"selectList"
resultType=
"com.xxfc.platform.vehicle.pojo.vo.VehicleVO"
parameterType=
"com.xxfc.platform.vehicle.pojo.dto.VehicleFindDTO"
>
...
...
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