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
7c6ccd01
Commit
7c6ccd01
authored
Jul 06, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改车型列表接口,提供app和小程序接口
parent
7f8e774a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
39 deletions
+59
-39
AppUserDetailMapper.xml
...e-admin/src/main/resources/mapper/AppUserDetailMapper.xml
+1
-1
AppVersionController.java
...java/com/xxfc/platform/app/rest/AppVersionController.java
+5
-7
ThirdFeign.java
...in/java/com/xxfc/platform/universal/feign/ThirdFeign.java
+18
-0
VehicleFeign.java
...in/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
+8
-2
VehicleModelController.java
...om/xxfc/platform/vehicle/rest/VehicleModelController.java
+27
-27
TimedTaskTest.java
...rc/test/java/com/xxfc/platform/vehicle/TimedTaskTest.java
+0
-2
No files found.
ace-modules/ace-admin/src/main/resources/mapper/AppUserDetailMapper.xml
View file @
7c6ccd01
...
...
@@ -32,7 +32,7 @@
where d.userid = #{userId} limit 1
</select>
<select
id=
"selectAppUserManage"
parameterType=
"com.github.wxiaoqi.security.admin.dto.AppUserDTO"
<select
id=
"selectAppUserManage"
parameterType=
"com.github.wxiaoqi.security.admin.dto.AppUser
Manage
DTO"
resultType=
"com.github.wxiaoqi.security.admin.vo.AppUserManageVo"
>
select
d.userid,
...
...
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/AppVersionController.java
View file @
7c6ccd01
...
...
@@ -13,8 +13,10 @@ import com.xxfc.platform.vehicle.common.RestResponse;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
...
...
@@ -49,8 +51,7 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
@Override
@ApiOperation
(
"添加"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
AppVersion
>
add
(
@RequestBody
AppVersion
appVersion
){
baseBiz
.
insertAppVersion
(
appVersion
);
return
new
ObjectRestResponse
<
AppVersion
>();
...
...
@@ -59,23 +60,20 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
@ApiOperation
(
"查询"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ObjectRestResponse
<
AppVersion
>
get
(
@PathVariable
Integer
id
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
get
(
id
));
}
@Override
@ApiOperation
(
"修改"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
PUT
)
public
ObjectRestResponse
<
AppVersion
>
update
(
@RequestBody
AppVersion
appVersion
){
baseBiz
.
updateAppVersionById
(
appVersion
);
return
new
ObjectRestResponse
<
AppVersion
>();
}
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
@DeleteMapping
(
value
=
"/remove/{id}"
)
public
ObjectRestResponse
<
AppVersion
>
remove
(
@PathVariable
Integer
id
){
baseBiz
.
remove
(
id
);
return
new
ObjectRestResponse
<
AppVersion
>();
...
...
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/feign/ThirdFeign.java
View file @
7c6ccd01
...
...
@@ -57,6 +57,24 @@ public interface ThirdFeign {
@GetMapping
(
"/LicensePlateType"
)
ObjectRestResponse
getLicensePlateType
();
/***************************************** 数据字典 ********************************************/
// @GetMapping(value = "/dictionary/getParents")
@RequestMapping
(
value
=
"/dictionary/getParents"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
Dictionary
>>
dictionaryGetParent
(
@RequestParam
(
value
=
"type"
)
String
type
);
// @GetMapping(value = "/dictionary/get")
@RequestMapping
(
value
=
"/dictionary/get"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
Dictionary
>>
dictionaryGet
(
@RequestParam
(
value
=
"dictionary"
)
Map
<
String
,
Object
>
dictionary
);
@RequestMapping
(
value
=
"/dictionary/getAll4Map"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
Map
<
String
,
Dictionary
>>
dictionaryGetAll4Map
();
/***************************************** 违章 ********************************************/
@GetMapping
(
"/3p/tv/getRentViolation"
)
public
ObjectRestResponse
<
List
<
ViolationVO
>>
getRentViolation
(
@RequestParam
(
value
=
"rentViolationDTO"
)
Map
<
String
,
Object
>
rentViolationDTO
);
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
View file @
7c6ccd01
...
...
@@ -65,6 +65,12 @@ public interface VehicleFeign {
public
RestResponse
<
VehicleUserLicense
>
getOne
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
@GetMapping
(
value
=
"/goodList"
)
List
<
GoodDataVO
>
goodList
(
Integer
page
,
Integer
limit
);
/**
* 获取优质车型接口
* @param page
* @param limit
* @return 返回
*/
@GetMapping
(
value
=
"/vehicleModel/goodList"
)
List
<
GoodDataVO
>
goodList
(
@RequestParam
(
value
=
"page"
)
Integer
page
,
@RequestParam
(
"limit"
)
Integer
limit
);
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleModelController.java
View file @
7c6ccd01
...
...
@@ -96,28 +96,22 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
* @return
*/
@ApiOperation
(
"车型列表"
)
@PostMapping
(
value
=
"/app/
find
VehicleModelPage"
)
public
ObjectRestResponse
<
VehicleModelVo
>
findVehicleModelPage
(
@PostMapping
(
value
=
"/app/
unauthfind/
VehicleModelPage"
)
public
ObjectRestResponse
<
VehicleModelVo
>
findVehicleModelPage
Unauthfind
(
@RequestBody
@ApiParam
(
"查询条件"
)
VehicleModelQueryCondition
vmqc
,
HttpServletRequest
request
)
{
// UserDTO user = userFeign.userinfoByToken(userAuthConfig.getToken(request)).getData();
//
// if (user!=null) {
// if (user.getDataAll()==2) {
//
// }
// }
if
(
vmqc
.
getIsDel
()==
null
)
{
vmqc
.
setIsDel
(
0
);
}
if
(
vmqc
==
null
||
vmqc
.
getPage
()
==
null
||
vmqc
.
getLimit
()
==
null
||
vmqc
.
getPage
()
<
0
||
vmqc
.
getLimit
()
<=
0
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
return
vehicleModelBiz
.
findVehicleModelPage
(
vmqc
);
}
/**
* 添加车型
*
...
...
@@ -257,22 +251,6 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
@Transactional
public
ObjectRestResponse
<
VehicleModel
>
remove
(
@PathVariable
int
id
)
{
//1.先判断是否有属于该车型可用的车辆,有不能删除,无可以进行删除
//根据车型查询对应的车辆
// Example exa = Example.builder(Vehicle.class).where(
// WeekendSqls.<Vehicle>custom()
// .andEqualTo(Vehicle::getModelId, id)
// .andEqualTo(Vehicle::getStatus, 1)
// .orEqualTo(Vehicle::getStatus,"2")
// ).build();
//
// List<Vehicle> vehicles = vehicleBiz.selectByExample(exa);
//
// //判断是查询到对应的车辆
// if (vehicles != null) {
// ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "该车型,无法删除");
// }
if
(
id
==
1
||
id
==
14
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"The label cannot be deleted"
);
}
...
...
@@ -306,9 +284,31 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
@ApiOperation
(
"查询所有"
)
@GetMapping
(
value
=
"/goodList"
)
public
List
<
GoodDataVO
>
goodList
(
Integer
page
,
Integer
limit
){
public
List
<
GoodDataVO
>
goodList
(
@RequestParam
(
"page"
)
Integer
page
,
@RequestParam
(
"limit"
)
Integer
limit
){
return
baseBiz
.
goodList
(
page
,
limit
);
}
/**
* 车型列表查
*
* @param vmqc 条件
* @return
*/
@ApiOperation
(
"车型列表"
)
@PostMapping
(
value
=
"/app/VehicleModelPage"
)
public
ObjectRestResponse
<
VehicleModelVo
>
findVehicleModelPage
(
@RequestBody
@ApiParam
(
"查询条件"
)
VehicleModelQueryCondition
vmqc
,
HttpServletRequest
request
)
{
if
(
vmqc
.
getIsDel
()==
null
)
{
vmqc
.
setIsDel
(
0
);
}
if
(
vmqc
==
null
||
vmqc
.
getPage
()
==
null
||
vmqc
.
getLimit
()
==
null
||
vmqc
.
getPage
()
<
0
||
vmqc
.
getLimit
()
<=
0
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
return
vehicleModelBiz
.
findVehicleModelPage
(
vmqc
);
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/test/java/com/xxfc/platform/vehicle/TimedTaskTest.java
View file @
7c6ccd01
...
...
@@ -13,8 +13,6 @@ public class TimedTaskTest {
public
static
void
main
(
String
[]
args
)
{
ScheduledExecutorService
executorService
=
Executors
.
newSingleThreadScheduledExecutor
();
executorService
.
scheduleWithFixedDelay
(
new
MyRunnable
(),
0
,
4000
,
TimeUnit
.
MILLISECONDS
);
executorService
.
}
// @Test
...
...
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