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
dcf98fac
Commit
dcf98fac
authored
Nov 07, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
d57816db
1e32b312
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
1 deletion
+90
-1
MsgQueryDto.java
...i/src/main/java/com/xxfc/platform/im/dto/MsgQueryDto.java
+16
-0
MsgBiz.java
...server/src/main/java/com/xxfc/platform/im/biz/MsgBiz.java
+66
-0
MsgController.java
...rc/main/java/com/xxfc/platform/im/rest/MsgController.java
+6
-0
VehicleModelCalendarPriceBiz.java
...fc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
+2
-0
VehicleBookRecordMapper.xml
...ver/src/main/resources/mapper/VehicleBookRecordMapper.xml
+0
-1
No files found.
xx-im/xx-im-api/src/main/java/com/xxfc/platform/im/dto/MsgQueryDto.java
0 → 100644
View file @
dcf98fac
package
com
.
xxfc
.
platform
.
im
.
dto
;
import
lombok.Data
;
@Data
public
class
MsgQueryDto
{
private
Integer
page
;
private
Integer
limit
;
private
Integer
source
;
private
Long
startTime
;
private
Long
endTime
;
private
Integer
praise
;
private
Integer
comment
;
private
String
username
;
private
Integer
type
;
}
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/MsgBiz.java
View file @
dcf98fac
...
@@ -5,6 +5,8 @@ import cn.hutool.core.bean.BeanUtil;
...
@@ -5,6 +5,8 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.vo.ImiVo
;
import
com.github.wxiaoqi.security.admin.vo.ImiVo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
...
@@ -13,6 +15,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
...
@@ -13,6 +15,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import
com.mongodb.client.result.DeleteResult
;
import
com.mongodb.client.result.DeleteResult
;
import
com.mongodb.client.result.UpdateResult
;
import
com.mongodb.client.result.UpdateResult
;
import
com.xxfc.platform.im.dto.CommentVo
;
import
com.xxfc.platform.im.dto.CommentVo
;
import
com.xxfc.platform.im.dto.MsgQueryDto
;
import
com.xxfc.platform.im.dto.PraiseVo
;
import
com.xxfc.platform.im.dto.PraiseVo
;
import
com.xxfc.platform.im.dto.QuestionParamDto
;
import
com.xxfc.platform.im.dto.QuestionParamDto
;
import
com.xxfc.platform.im.model.*
;
import
com.xxfc.platform.im.model.*
;
...
@@ -53,6 +56,8 @@ public class MsgBiz {
...
@@ -53,6 +56,8 @@ public class MsgBiz {
@Autowired
@Autowired
ThirdFeign
thirdFeign
;
ThirdFeign
thirdFeign
;
@Autowired
UserFeign
userFeign
;
/**
/**
* 获取消息列表
* 获取消息列表
*
*
...
@@ -339,6 +344,67 @@ public class MsgBiz {
...
@@ -339,6 +344,67 @@ public class MsgBiz {
* 后台管理接口
* 后台管理接口
*/
*/
public
ObjectRestResponse
getMsgList
(
MsgQueryDto
msgQueryDto
){
//获取所有朋友圈
Integer
page
=
msgQueryDto
.
getPage
()
==
null
?
1
:
msgQueryDto
.
getPage
();
Integer
limit
=
msgQueryDto
.
getLimit
()
==
null
?
10
:
msgQueryDto
.
getLimit
();
Pageable
pageable
=
PageRequest
.
of
(--
page
,
limit
);
Query
query
=
null
;
List
<
Msg
>
msgList
=
null
;
if
(
msgQueryDto
.
getType
()
!=
null
)
{
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
is
(
msgQueryDto
.
getType
()));
//评论数
if
(
msgQueryDto
.
getComment
()
!=
null
)
{
query
.
addCriteria
(
Criteria
.
where
(
"count.comment"
).
gte
(
msgQueryDto
.
getComment
()));
}
//点赞数
if
(
msgQueryDto
.
getPraise
()
!=
null
)
{
query
.
addCriteria
(
Criteria
.
where
(
"count.praise"
).
gte
(
msgQueryDto
.
getPraise
()));
}
//来源
if
(
msgQueryDto
.
getSource
()
!=
null
)
{
if
(
msgQueryDto
.
getSource
()
==
1
)
{
query
.
addCriteria
(
Criteria
.
where
(
"source"
).
is
(
msgQueryDto
.
getSource
()));
}
else
{
query
.
addCriteria
(
Criteria
.
where
(
"source"
).
is
(
msgQueryDto
.
getSource
()).
orOperator
(
Criteria
.
where
(
"source"
).
is
(
null
)));
}
}
//下单时间
if
(
msgQueryDto
.
getStartTime
()
!=
null
)
{
query
.
addCriteria
(
Criteria
.
where
(
"body.time"
).
gte
(
msgQueryDto
.
getStartTime
()).
orOperator
(
Criteria
.
where
(
"body.time"
).
lte
(
msgQueryDto
.
getEndTime
())));
}
//用户名
if
(
StringUtils
.
isNotBlank
(
msgQueryDto
.
getUsername
()))
{
AppUserLogin
appUserLogin
=
userFeign
.
one
(
msgQueryDto
.
getUsername
());
if
(
appUserLogin
!=
null
)
{
query
.
addCriteria
(
Criteria
.
where
(
"userId"
).
is
(
appUserLogin
.
getImUserid
()));
}
}
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
query
.
with
(
pageable
);
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"time"
));
msgList
=
fetchAndAttach
(
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
),
null
);
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
goodPageInfo
.
setPageSize
(
totalSize
%
limit
==
0
?
totalSize
/
limit
:
totalSize
/
limit
+
1
);
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
}
else
{
List
<
Integer
>
ids
=
new
ArrayList
<>();
ids
.
add
(
2
);
ids
.
add
(
4
);
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
));
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
query
.
with
(
pageable
);
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"time"
));
msgList
=
fetchAndAttach
(
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
),
null
);
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
goodPageInfo
.
setPageSize
(
totalSize
%
limit
==
0
?
totalSize
/
limit
:
totalSize
/
limit
+
1
);
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
}
}
/**
/**
* 新增消息接口
* 新增消息接口
* @param param
* @param param
...
...
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/rest/MsgController.java
View file @
dcf98fac
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.im.rest;
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.im.rest;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.im.biz.MsgBiz
;
import
com.xxfc.platform.im.biz.MsgBiz
;
import
com.xxfc.platform.im.dto.MsgQueryDto
;
import
com.xxfc.platform.im.model.AddMsgParam
;
import
com.xxfc.platform.im.model.AddMsgParam
;
import
com.xxfc.platform.im.model.Msg
;
import
com.xxfc.platform.im.model.Msg
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -50,4 +51,9 @@ public class MsgController {
...
@@ -50,4 +51,9 @@ public class MsgController {
public
ObjectRestResponse
updateMsg
(
@RequestBody
Msg
msg
)
{
public
ObjectRestResponse
updateMsg
(
@RequestBody
Msg
msg
)
{
return
msgBiz
.
update
(
msg
);
return
msgBiz
.
update
(
msg
);
}
}
@PostMapping
(
value
=
"/bg/app/unauth/list"
)
public
ObjectRestResponse
getMsgList
(
@RequestBody
MsgQueryDto
msgQueryDto
)
{
return
msgBiz
.
getMsgList
(
msgQueryDto
);
}
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
View file @
dcf98fac
...
@@ -290,6 +290,8 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
...
@@ -290,6 +290,8 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
* @return
* @return
*/
*/
private
List
<
VehicleModelCalendarPriceDTO
>
findVehicleModelCalendarPrice
(
Date
startDate
,
Date
endDate
,
Integer
vehicleModelId
,
Integer
userId
)
{
private
List
<
VehicleModelCalendarPriceDTO
>
findVehicleModelCalendarPrice
(
Date
startDate
,
Date
endDate
,
Integer
vehicleModelId
,
Integer
userId
)
{
startDate
=
DateUtils
.
localDateToDate
(
DateUtils
.
dateToLocalDate
(
startDate
).
atStartOfDay
(
ZoneId
.
systemDefault
()).
toLocalDate
());
endDate
=
DateUtils
.
localDateToDate
(
DateUtils
.
dateToLocalDate
(
endDate
).
atStartOfDay
(
ZoneId
.
systemDefault
()).
toLocalDate
());
List
<
VehicleModelCalendarPriceDTO
>
vehicleModelCalendarPriceVos
=
new
ArrayList
<>();
List
<
VehicleModelCalendarPriceDTO
>
vehicleModelCalendarPriceVos
=
new
ArrayList
<>();
//默认折扣
//默认折扣
Integer
discount
=
DEFAULT_DISCOUNT
;
Integer
discount
=
DEFAULT_DISCOUNT
;
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleBookRecordMapper.xml
View file @
dcf98fac
...
@@ -537,7 +537,6 @@
...
@@ -537,7 +537,6 @@
<if
test=
"flag == true and status == 2"
>
<if
test=
"flag == true and status == 2"
>
and ( (v4.id IS NOT NULL and DATE_ADD(v1.book_end_date,INTERVAL '2' DAY) >= now()) OR (v4.id IS NULL AND v1.book_end_date
>
= now()))
and ( (v4.id IS NOT NULL and DATE_ADD(v1.book_end_date,INTERVAL '2' DAY) >= now()) OR (v4.id IS NULL AND v1.book_end_date
>
= now()))
</if>
</if>
and v1.book_user != -2
</where>
</where>
group by v1.id
group by v1.id
order by create_time DESC
order by create_time DESC
...
...
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