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
90ad5cbd
Commit
90ad5cbd
authored
Nov 05, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-chw' into dev-chw
parents
4d634102
d7470227
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
26 deletions
+70
-26
UserCommentFindDTO.java
...github/wxiaoqi/security/admin/dto/UserCommentFindDTO.java
+3
-1
UserCommentBiz.java
...com/github/wxiaoqi/security/admin/biz/UserCommentBiz.java
+23
-14
AppUserCommentController.java
...wxiaoqi/security/admin/rest/AppUserCommentController.java
+21
-0
UserCommentMapper.xml
...ace-admin/src/main/resources/mapper/UserCommentMapper.xml
+12
-2
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+11
-9
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/UserCommentFindDTO.java
View file @
90ad5cbd
...
@@ -16,7 +16,7 @@ public class UserCommentFindDTO extends PageParam{
...
@@ -16,7 +16,7 @@ public class UserCommentFindDTO extends PageParam{
private
Integer
parentId
;
private
Integer
parentId
;
private
Integer
soureId
;
private
String
soureId
;
private
Integer
rootParentId
;
private
Integer
rootParentId
;
...
@@ -37,5 +37,7 @@ public class UserCommentFindDTO extends PageParam{
...
@@ -37,5 +37,7 @@ public class UserCommentFindDTO extends PageParam{
private
Integer
commentId
;
private
Integer
commentId
;
private
Integer
companyId
;
private
Integer
isDesc
;
private
Integer
isDesc
;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/UserCommentBiz.java
View file @
90ad5cbd
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
cn.hutool.json.JSONUtil
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.dto.CompanyInfoFindDTO
;
import
com.github.wxiaoqi.security.admin.dto.UserCommentFindDTO
;
import
com.github.wxiaoqi.security.admin.dto.UserCommentFindDTO
;
import
com.github.wxiaoqi.security.admin.entity.*
;
import
com.github.wxiaoqi.security.admin.entity.*
;
import
com.github.wxiaoqi.security.admin.mapper.CompanyInfoMapper
;
import
com.github.wxiaoqi.security.admin.mapper.UserCommentMapper
;
import
com.github.wxiaoqi.security.admin.mapper.UserCommentMapper
;
import
com.github.wxiaoqi.security.admin.vo.UserCommentVo
;
import
com.github.wxiaoqi.security.admin.vo.UserCommentVo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.app.entity.Cofig
;
import
com.xxfc.platform.app.feign.ConfigFeign
;
import
com.xxfc.platform.universal.dto.SendMsgDTO
;
import
com.xxfc.platform.universal.feign.MQSenderFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.
ADMIN_TOPIC
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.
KEY_CORPORATION_UPD
;
@Service
@Service
@Slf4j
@Slf4j
...
@@ -116,6 +104,18 @@ public class UserCommentBiz extends BaseBiz<UserCommentMapper, UserComment>{
...
@@ -116,6 +104,18 @@ public class UserCommentBiz extends BaseBiz<UserCommentMapper, UserComment>{
}
}
public
void
setParamByVehicle
(
UserCommentFindDTO
userCommentFindDTO
){
UserComment
comment
=
selectById
(
userCommentFindDTO
.
getCommentId
());
if
(
comment
!=
null
){
userCommentFindDTO
.
setSoureId
(
comment
.
getSoureId
());
userCommentFindDTO
.
setIsShow
(
1
);
userCommentFindDTO
.
setIsDesc
(
1
);
userCommentFindDTO
.
setUserId
(
comment
.
getUserId
());
}
}
public
List
<
UserCommentVo
>
getListByToUserId
(
UserCommentFindDTO
commentFindDTO
){
public
List
<
UserCommentVo
>
getListByToUserId
(
UserCommentFindDTO
commentFindDTO
){
return
mapper
.
selectListByToUserId
(
commentFindDTO
);
return
mapper
.
selectListByToUserId
(
commentFindDTO
);
...
@@ -124,8 +124,17 @@ public class UserCommentBiz extends BaseBiz<UserCommentMapper, UserComment>{
...
@@ -124,8 +124,17 @@ public class UserCommentBiz extends BaseBiz<UserCommentMapper, UserComment>{
public
PageDataVO
<
UserCommentVo
>
selectListV2
(
UserCommentFindDTO
userCommentFindDTO
){
public
PageDataVO
<
UserCommentVo
>
selectListV2
(
UserCommentFindDTO
userCommentFindDTO
){
PageHelper
.
startPage
(
userCommentFindDTO
.
getPage
(),
userCommentFindDTO
.
getLimit
());
PageHelper
.
startPage
(
userCommentFindDTO
.
getPage
(),
userCommentFindDTO
.
getLimit
());
Integer
commentId
=
userCommentFindDTO
.
getCommentId
()
==
null
?
0
:
userCommentFindDTO
.
getCommentId
();
if
(
commentId
>
0
){
setParamByVehicle
(
userCommentFindDTO
);
}
PageInfo
<
UserCommentVo
>
pageInfo
=
new
PageInfo
<>(
getList
(
userCommentFindDTO
));
PageInfo
<
UserCommentVo
>
pageInfo
=
new
PageInfo
<>(
getList
(
userCommentFindDTO
));
PageDataVO
<
UserCommentVo
>
dataVO
=
PageDataVO
.
pageInfo
(
pageInfo
);
PageDataVO
<
UserCommentVo
>
dataVO
=
PageDataVO
.
pageInfo
(
pageInfo
);
List
<
UserCommentVo
>
list
=
dataVO
.
getData
();
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
list
.
sort
(
Comparator
.
comparing
(
UserCommentVo:
:
getId
));
dataVO
.
setData
(
list
);
}
return
dataVO
;
return
dataVO
;
}
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUserCommentController.java
View file @
90ad5cbd
...
@@ -60,6 +60,13 @@ public class AppUserCommentController extends BaseController<UserCommentBiz> {
...
@@ -60,6 +60,13 @@ public class AppUserCommentController extends BaseController<UserCommentBiz> {
@ApiModelProperty
(
"列表"
)
@ApiModelProperty
(
"列表"
)
public
ObjectRestResponse
selectListByToUserId
(
UserCommentFindDTO
commentFindDTO
)
{
public
ObjectRestResponse
selectListByToUserId
(
UserCommentFindDTO
commentFindDTO
)
{
commentFindDTO
.
setUserId
(
getCurrentUserIdInt
());
commentFindDTO
.
setUserId
(
getCurrentUserIdInt
());
Integer
isGoods
=
commentFindDTO
.
getIsGoods
()
==
null
?
0
:
commentFindDTO
.
getIsGoods
();
if
(
isGoods
==
2
&&
(
commentFindDTO
.
getCompanyId
()
==
null
||
commentFindDTO
.
getCompanyId
()
==
0
)){
List
<
Integer
>
companyIds
=
getBusinessUserCompanyIds
();
if
(
companyIds
!=
null
&&
companyIds
.
size
()
>
0
){
commentFindDTO
.
setCompanyId
(
companyIds
.
get
(
0
));
}
}
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectListByToUserId
(
commentFindDTO
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectListByToUserId
(
commentFindDTO
));
}
}
...
@@ -74,5 +81,19 @@ public class AppUserCommentController extends BaseController<UserCommentBiz> {
...
@@ -74,5 +81,19 @@ public class AppUserCommentController extends BaseController<UserCommentBiz> {
}
}
@GetMapping
(
"selectListByCommentId"
)
@ApiModelProperty
(
"列表"
)
public
ObjectRestResponse
selectListByCommentId
(
UserCommentFindDTO
commentFindDTO
)
{
if
(
commentFindDTO
.
getCompanyId
()
==
null
||
commentFindDTO
.
getCompanyId
()
==
0
){
List
<
Integer
>
companyIds
=
getBusinessUserCompanyIds
();
if
(
companyIds
!=
null
&&
companyIds
.
size
()
>
0
){
commentFindDTO
.
setCompanyId
(
companyIds
.
get
(
0
));
}
}
commentFindDTO
.
setIsGoods
(
2
);
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectListV2
(
commentFindDTO
));
}
}
}
ace-modules/ace-admin/src/main/resources/mapper/UserCommentMapper.xml
View file @
90ad5cbd
...
@@ -10,12 +10,17 @@
...
@@ -10,12 +10,17 @@
d1.headimgurl as headimgurl,
d1.headimgurl as headimgurl,
IFNULL(d2.realname,d2.nickname) as toUserName,
IFNULL(d2.realname,d2.nickname) as toUserName,
d2.headimgurl as toHeadimgurl,
d2.headimgurl as toHeadimgurl,
b.`name`as companyName
b.`name`as companyName,
b.`company_pic`as companyPic
FROM user_comment c
FROM user_comment c
LEFT JOIN app_user_detail d1 ON c.user_id=d1.userid
LEFT JOIN app_user_detail d1 ON c.user_id=d1.userid
LEFT JOIN app_user_detail d2 ON c.to_user_id=d2.userid
LEFT JOIN app_user_detail d2 ON c.to_user_id=d2.userid
LEFT JOIN branch_company b ON c.company_id=b.id
LEFT JOIN branch_company b ON c.company_id=b.id
<where>
<where>
c.is_del = 0
<if
test=
"isGoods != null and isGoods == 2 "
>
AND ( c.user_id = #{userId} or (c.to_user_id = #{userId} and c.company_id = #{companyId} ))
</if>
<if
test=
"soureId != null "
>
<if
test=
"soureId != null "
>
AND c.soure_id=#{soureId}
AND c.soure_id=#{soureId}
</if>
</if>
...
@@ -66,12 +71,17 @@
...
@@ -66,12 +71,17 @@
<choose>
<choose>
<when
test=
"isGoods != null and isGoods == 1"
>
<when
test=
"isGoods != null and isGoods == 1"
>
and to_user_id=#{userId}
and to_user_id=#{userId}
GROUP BY soure_id,to_user_id )
</when>
<when
test=
"isGoods != null and isGoods == 2"
>
and company_id = 0 and soure_user_id=#{companyId}
GROUP BY soure_id,user_id )
</when>
</when>
<otherwise>
<otherwise>
and ((soure_type =1 and soure_user_id=#{userId} and parent_id = 0) or to_user_id=#{userId})
and ((soure_type =1 and soure_user_id=#{userId} and parent_id = 0) or to_user_id=#{userId})
GROUP BY soure_id,to_user_id )
</otherwise>
</otherwise>
</choose>
</choose>
GROUP BY soure_id,to_user_id )
) c
) c
LEFT JOIN branch_company b ON c.company_id=b.id
LEFT JOIN branch_company b ON c.company_id=b.id
LEFT JOIN app_user_detail d ON c.user_id=d.userid
LEFT JOIN app_user_detail d ON c.user_id=d.userid
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
90ad5cbd
...
@@ -110,15 +110,15 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -110,15 +110,15 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
}
}
List
<
OrderVehicleCrosstownDto
>
list
=
mapper
.
selectByOrderId
(
orderVehicleCrosstownDto
);
List
<
OrderVehicleCrosstownDto
>
list
=
mapper
.
selectByOrderId
(
orderVehicleCrosstownDto
);
for
(
OrderVehicleCrosstownDto
value
:
list
)
{
for
(
OrderVehicleCrosstownDto
value
:
list
)
{
//
if (value != null && value.getOrperaterId() != null && value.getType() != 1) {
if
(
value
!=
null
&&
value
.
getOrperaterId
()
!=
null
&&
value
.
getType
()
!=
1
)
{
//
UserDTO userDTO = userFeign.userinfoByUid(value.getOrperaterId()).getData();
UserDTO
userDTO
=
userFeign
.
userinfoByUid
(
value
.
getOrperaterId
()).
getData
();
//
if (userDTO != null) {
if
(
userDTO
!=
null
)
{
//
CompanyDetail branchCompany = vehicleFeign.getCompanyDetail(userDTO.getCompanyId()).getData();
CompanyDetail
branchCompany
=
vehicleFeign
.
getCompanyDetail
(
userDTO
.
getCompanyId
()).
getData
();
//
if (branchCompany != null) {
if
(
branchCompany
!=
null
)
{
//
value.setCustomerPhone(branchCompany.getVehiceServicePhone());
value
.
setCustomerPhone
(
branchCompany
.
getVehiceServicePhone
());
//
}
}
//
}
}
//
}
}
if
(
value
.
getType
()
==
2
||
value
.
getType
()
==
3
)
{
if
(
value
.
getType
()
==
2
||
value
.
getType
()
==
3
)
{
List
<
Coupon
>
c
=
baseOrderBiz
.
getReturnCouponByOrderId
(
value
.
getOrderId
());
List
<
Coupon
>
c
=
baseOrderBiz
.
getReturnCouponByOrderId
(
value
.
getOrderId
());
...
@@ -256,10 +256,12 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -256,10 +256,12 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
if
(
null
==
userDTO
.
getCompanyIds
()
||
!
userDTO
.
getCompanyIds
().
contains
(
orderRentVehicleDetail
.
getStartCompanyId
()))
{
if
(
null
==
userDTO
.
getCompanyIds
()
||
!
userDTO
.
getCompanyIds
().
contains
(
orderRentVehicleDetail
.
getStartCompanyId
()))
{
return
ObjectRestResponse
.
createFailedResult
(
3501
,
"无交车权限"
);
return
ObjectRestResponse
.
createFailedResult
(
3501
,
"无交车权限"
);
}
}
userDTO
.
setCompanyId
(
orderRentVehicleDetail
.
getStartCompanyId
());
}
else
{
}
else
{
if
(
null
==
userDTO
.
getCompanyIds
()
||
!
userDTO
.
getCompanyIds
().
contains
(
orderRentVehicleDetail
.
getEndCompanyId
()))
{
if
(
null
==
userDTO
.
getCompanyIds
()
||
!
userDTO
.
getCompanyIds
().
contains
(
orderRentVehicleDetail
.
getEndCompanyId
()))
{
return
ObjectRestResponse
.
createFailedResult
(
3503
,
"无收车权限"
);
return
ObjectRestResponse
.
createFailedResult
(
3503
,
"无收车权限"
);
}
}
userDTO
.
setCompanyId
(
orderRentVehicleDetail
.
getEndCompanyId
());
}
}
Vehicle
vehicle
=
null
;
Vehicle
vehicle
=
null
;
RestResponse
<
Vehicle
>
vehicleRestResponse
=
vehicleFeign
.
findById
(
orderRentVehicleDetail
.
getVehicleId
());
RestResponse
<
Vehicle
>
vehicleRestResponse
=
vehicleFeign
.
findById
(
orderRentVehicleDetail
.
getVehicleId
());
...
...
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