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
ef098ff0
Commit
ef098ff0
authored
Dec 16, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
7e6b74e3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
0 deletions
+95
-0
Vehicle.java
...c/main/java/com/xxfc/platform/vehicle/entity/Vehicle.java
+5
-0
VehicleApplyFindDTO.java
...m/xxfc/platform/vehicle/pojo/dto/VehicleApplyFindDTO.java
+4
-0
VehicleApplyBiz.java
...n/java/com/xxfc/platform/vehicle/biz/VehicleApplyBiz.java
+23
-0
VehicleApplyMapper.java
.../com/xxfc/platform/vehicle/mapper/VehicleApplyMapper.java
+3
-0
AdminVehicleApplyController.java
...tform/vehicle/rest/admin/AdminVehicleApplyController.java
+23
-0
VehicleApplyMapper.xml
...e-server/src/main/resources/mapper/VehicleApplyMapper.xml
+37
-0
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/Vehicle.java
View file @
ef098ff0
...
@@ -344,6 +344,11 @@ public class Vehicle {
...
@@ -344,6 +344,11 @@ public class Vehicle {
private
String
categoryName
;
private
String
categoryName
;
@Transient
@ApiModelProperty
(
"操作类型:1-商家;2-店铺"
)
private
Integer
operateType
;
@Transient
@Transient
@ApiModelProperty
(
"改变的json"
)
@ApiModelProperty
(
"改变的json"
)
private
JSONObject
json
;
private
JSONObject
json
;
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/dto/VehicleApplyFindDTO.java
View file @
ef098ff0
...
@@ -44,4 +44,8 @@ public class VehicleApplyFindDTO extends PageParam implements DataInter {
...
@@ -44,4 +44,8 @@ public class VehicleApplyFindDTO extends PageParam implements DataInter {
List
<
Integer
>
dataCompanyIds
;
List
<
Integer
>
dataCompanyIds
;
Integer
bizType
;
Integer
bizType
;
@ApiModelProperty
(
"商品id"
)
private
String
vehicleId
;
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleApplyBiz.java
View file @
ef098ff0
...
@@ -117,6 +117,18 @@ public class VehicleApplyBiz extends BaseBiz<VehicleApplyMapper, VehicleApply>{
...
@@ -117,6 +117,18 @@ public class VehicleApplyBiz extends BaseBiz<VehicleApplyMapper, VehicleApply>{
return
selectCount
(
vehicleApply
);
return
selectCount
(
vehicleApply
);
}
}
public
void
canelApply
(
String
vehicleId
){
VehicleApply
vehicleApply
=
new
VehicleApply
();
vehicleApply
.
setVehicleId
(
vehicleId
);
vehicleApply
.
setApplyStatus
(
0
);
vehicleApply
.
setIsDel
(
0
);
vehicleApply
=
selectOne
(
vehicleApply
);
if
(
vehicleApply
!=
null
){
vehicleApply
.
setApplyStatus
(
2
);
updateSelectiveById
(
vehicleApply
);
}
}
...
@@ -226,6 +238,17 @@ public class VehicleApplyBiz extends BaseBiz<VehicleApplyMapper, VehicleApply>{
...
@@ -226,6 +238,17 @@ public class VehicleApplyBiz extends BaseBiz<VehicleApplyMapper, VehicleApply>{
}
}
public
List
<
VehicleApplyVo
>
getListByAdmin
(
VehicleApplyFindDTO
vehicleApplyFindDTO
){
return
mapper
.
selectListByAdmin
(
vehicleApplyFindDTO
);
}
public
ObjectRestResponse
selectListByAdmin
(
VehicleApplyFindDTO
vehicleApplyFindDTO
){
PageHelper
.
startPage
(
vehicleApplyFindDTO
.
getPage
(),
vehicleApplyFindDTO
.
getLimit
());
PageInfo
<
VehicleApplyVo
>
pageInfo
=
new
PageInfo
<>(
getListByAdmin
(
vehicleApplyFindDTO
));
return
ObjectRestResponse
.
succ
(
PageDataVO
.
pageInfo
(
pageInfo
));
}
//自动审核
//自动审核
public
void
authAudit
(){
public
void
authAudit
(){
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleApplyMapper.java
View file @
ef098ff0
...
@@ -21,6 +21,9 @@ public interface VehicleApplyMapper extends Mapper<VehicleApply>, SelectByIdList
...
@@ -21,6 +21,9 @@ public interface VehicleApplyMapper extends Mapper<VehicleApply>, SelectByIdList
List
<
VehicleApplyVo
>
selectListByApp
(
VehicleApplyFindDTO
vehicleApplyFindDTO
);
List
<
VehicleApplyVo
>
selectListByApp
(
VehicleApplyFindDTO
vehicleApplyFindDTO
);
List
<
VehicleApplyVo
>
selectListByAdmin
(
VehicleApplyFindDTO
vehicleApplyFindDTO
);
@Select
(
"SELECT * FROM vehicle_apply WHERE `apply_status` = 0 "
)
@Select
(
"SELECT * FROM vehicle_apply WHERE `apply_status` = 0 "
)
//AND DATE_SUB(CURDATE(),INTERVAL 7 DAY) >= date(from_unixtime(crt_time/1000))
//AND DATE_SUB(CURDATE(),INTERVAL 7 DAY) >= date(from_unixtime(crt_time/1000))
List
<
VehicleApply
>
getListByDay
();
List
<
VehicleApply
>
getListByDay
();
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/AdminVehicleApplyController.java
View file @
ef098ff0
...
@@ -3,8 +3,10 @@ package com.xxfc.platform.vehicle.rest.admin;
...
@@ -3,8 +3,10 @@ package com.xxfc.platform.vehicle.rest.admin;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
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
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.vehicle.aop.GlobalLog
;
import
com.xxfc.platform.vehicle.aop.GlobalLog
;
import
com.xxfc.platform.vehicle.biz.VehicleApplyBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleApplyBiz
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
...
@@ -14,6 +16,7 @@ import com.xxfc.platform.vehicle.pojo.vo.VehicleApplyVo;
...
@@ -14,6 +16,7 @@ import com.xxfc.platform.vehicle.pojo.vo.VehicleApplyVo;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -48,6 +51,12 @@ public class AdminVehicleApplyController extends BaseController<VehicleApplyBiz,
...
@@ -48,6 +51,12 @@ public class AdminVehicleApplyController extends BaseController<VehicleApplyBiz,
return
baseBiz
.
selectList
(
vehicleApplyFindDTO
);
return
baseBiz
.
selectList
(
vehicleApplyFindDTO
);
}
}
@GetMapping
(
"apply/selectListV2"
)
@ApiModelProperty
(
"营运商品审核列表"
)
public
ObjectRestResponse
selectListV2
(
VehicleApplyFindDTO
vehicleApplyFindDTO
)
{
return
baseBiz
.
selectListByAdmin
(
vehicleApplyFindDTO
);
}
@GetMapping
(
"apply/info/{id}"
)
@GetMapping
(
"apply/info/{id}"
)
@ApiModelProperty
(
"信息"
)
@ApiModelProperty
(
"信息"
)
...
@@ -112,6 +121,20 @@ public class AdminVehicleApplyController extends BaseController<VehicleApplyBiz,
...
@@ -112,6 +121,20 @@ public class AdminVehicleApplyController extends BaseController<VehicleApplyBiz,
}
}
@PostMapping
(
"addOrUpdV2"
)
@ApiModelProperty
(
"营运申请审核"
)
public
ObjectRestResponse
addOrUpdV2
(
@RequestBody
Vehicle
vehicle
)
{
String
vehicleId
=
StringUtils
.
isBlank
(
vehicle
.
getId
())
?
""
:
vehicle
.
getId
();
if
(
StringUtils
.
isNotBlank
(
vehicleId
)){
baseBiz
.
canelApply
(
vehicleId
);
}
VehicleApply
vehicleApply
=
baseBiz
.
saveApply
(
vehicle
);
vehicleApply
.
setApplyStatus
(
1
);
baseBiz
.
audit
(
vehicleApply
);
return
ObjectRestResponse
.
succ
();
}
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleApplyMapper.xml
View file @
ef098ff0
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
<if
test=
"branchId != null and branchId > 0"
>
<if
test=
"branchId != null and branchId > 0"
>
AND a.`subordinate_branch`= #{branchId}
AND a.`subordinate_branch`= #{branchId}
</if>
</if>
<if
test=
"vehicleId != null and vehicleId != ''"
>
AND a.`vehicle_id`= #{vehicleId}
</if>
<if
test=
"id != null and id > 0 "
>
<if
test=
"id != null and id > 0 "
>
AND a.`id`= #{id}
AND a.`id`= #{id}
</if>
</if>
...
@@ -82,4 +85,38 @@
...
@@ -82,4 +85,38 @@
</where>
</where>
order by v.crt_time DESC
order by v.crt_time DESC
</select>
</select>
<select
id=
"selectListByAdmin"
resultType=
"com.xxfc.platform.vehicle.pojo.vo.VehicleApplyVo"
parameterType=
"com.xxfc.platform.vehicle.pojo.dto.VehicleApplyFindDTO"
>
SELECT
v.*,
b.cn_name as brandName,
c.`name` categoryName
FROM
(SELECT v.* FROM
(SELECT * FROM vehicle_apply
WHERE (vehicle_id is NOT NULL and vehicle_id != '' )
ORDER BY id desc) v
GROUP BY v.vehicle_id
UNION ALL
SELECT * FROM vehicle_apply WHERE (vehicle_id is NULL OR vehicle_id = '' )) v
LEFT JOIN vehicle_brand b ON v.brand_id=b.id
LEFT JOIN vehicle_category c ON v.category_id=c.id
LEFT JOIN branch_company i on v.subordinate_branch=i.id
<where>
v.is_del = 0
<if
test=
"dataCompanyIds != null and dataCompanyIds.size > 0"
>
and i.id in
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
<if
test=
"dataCorporationIds != null and dataCorporationIds.size > 0"
>
and i.company_id in
<foreach
collection=
"dataCorporationIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
</where>
order by v.crt_time DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
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