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
9f58a3d9
Commit
9f58a3d9
authored
Dec 26, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
员工导入
parent
708f3f51
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
175 additions
and
40 deletions
+175
-40
AppUserJobLevelBiz.java
...github/wxiaoqi/security/admin/biz/AppUserJobLevelBiz.java
+27
-21
AppUserPositionTempBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
+92
-1
AppUserJobLevelMapper.java
.../wxiaoqi/security/admin/mapper/AppUserJobLevelMapper.java
+3
-1
AppUserPositionController.java
.../security/admin/rest/admin/AppUserPositionController.java
+31
-11
VehicleFeign.java
...in/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
+3
-0
BranchCompanyBiz.java
.../java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
+8
-1
BranchCompanyMapper.java
...com/xxfc/platform/vehicle/mapper/BranchCompanyMapper.java
+2
-0
BranchCompanyController.java
...m/xxfc/platform/vehicle/rest/BranchCompanyController.java
+6
-5
BranchCompanyMapper.xml
...-server/src/main/resources/mapper/BranchCompanyMapper.xml
+3
-0
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserJobLevelBiz.java
View file @
9f58a3d9
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
com.github.wxiaoqi.security.admin.dto.UserPostionDTO
;
import
com.github.wxiaoqi.security.admin.entity.AppUserJobLevel
;
import
com.github.wxiaoqi.security.admin.entity.AppUserPosition
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserJobLevelMapper
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserPositionMapper
;
import
com.github.wxiaoqi.security.admin.vo.WalletPostionVo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -33,9 +27,9 @@ public class AppUserJobLevelBiz extends BaseBiz<AppUserJobLevelMapper, AppUserJo
public
Map
<
Integer
,
AppUserJobLevel
>
findJobIdAndJobMapByIds
(
List
<
Integer
>
jobIds
)
{
Map
<
Integer
,
AppUserJobLevel
>
postionMap
=
new
HashMap
<>();
List
<
AppUserJobLevel
>
data
=
mapper
.
selectByIdList
(
jobIds
);
if
(
CollectionUtils
.
isEmpty
(
data
))
{
Map
<
Integer
,
AppUserJobLevel
>
postionMap
=
new
HashMap
<>();
List
<
AppUserJobLevel
>
data
=
mapper
.
selectByIdList
(
jobIds
);
if
(
CollectionUtils
.
isEmpty
(
data
))
{
return
postionMap
;
}
postionMap
=
data
.
stream
().
collect
(
Collectors
.
toMap
(
AppUserJobLevel:
:
getId
,
Function
.
identity
()));
...
...
@@ -44,6 +38,18 @@ public class AppUserJobLevelBiz extends BaseBiz<AppUserJobLevelMapper, AppUserJo
public
Map
<
Integer
,
String
>
findJobIdAndNameMap
()
{
List
<
AppUserJobLevel
>
postions
=
selectListAll
();
return
postions
.
stream
().
collect
(
Collectors
.
toMap
(
AppUserJobLevel:
:
getId
,
AppUserJobLevel:
:
getName
));
return
postions
.
stream
().
collect
(
Collectors
.
toMap
(
AppUserJobLevel:
:
getId
,
AppUserJobLevel:
:
getName
));
}
public
AppUserJobLevel
selectByName
(
String
name
)
{
Example
example
=
new
Example
(
AppUserJobLevel
.
class
);
example
.
createCriteria
().
andEqualTo
(
"name"
,
name
);
return
mapper
.
selectOneByExample
(
example
);
}
public
Integer
selectMaxJobLevel
()
{
Integer
level
=
mapper
.
selectMaxJobLevel
();
return
level
==
null
?
1
:
level
+
1
;
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
View file @
9f58a3d9
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionChangeRecordDTO
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionTempDTO
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionTempFindDTO
;
import
com.github.wxiaoqi.security.admin.entity.*
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserPositionTempMapper
;
import
com.github.wxiaoqi.security.admin.vo.AppUserPositionTempVo
;
import
com.github.wxiaoqi.security.admin.vo.AppUserVo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
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.vo.PageDataVO
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -26,7 +30,6 @@ import org.springframework.transaction.annotation.Transactional;
import
tk.mybatis.mapper.entity.Example
;
import
java.sql.Timestamp
;
import
java.time.Instant
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -302,6 +305,79 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
return
result
;
}
public
Map
<
String
,
Object
>
importUserInfo
(
List
<
String
[]>
userInfo
)
{
Map
<
String
,
Object
>
map
=
Maps
.
newHashMap
();
map
.
put
(
"userInfo"
,
userInfo
);
for
(
int
i
=
0
;
i
<
userInfo
.
size
();
i
++)
{
String
[]
a
=
userInfo
.
get
(
i
);
String
name
=
a
[
1
];
String
phone
=
a
[
2
];
String
jobName
=
a
[
4
];
String
companyName
=
a
[
3
];
String
date
=
a
[
11
];
//处理公司名
if
(
StringUtils
.
isNotBlank
(
companyName
))
{
if
(
companyName
.
contains
(
"集团"
)
||
companyName
.
contains
(
"总部"
))
{
companyName
=
"欣新房车控股集团"
;
}
companyName
=
companyName
.
substring
(
companyName
.
lastIndexOf
(
"-"
)+
1
,
companyName
.
length
());
}
BranchCompany
branchCompany
=
vehicleFeign
.
selectByName
(
companyName
).
getData
();
Integer
companyId
=
0
;
if
(
branchCompany
!=
null
)
{
companyId
=
branchCompany
.
getId
();
}
Integer
jobId
=
1
;
if
(
StringUtils
.
isNotBlank
(
jobName
))
{
AppUserJobLevel
appUserJobLevel
=
jobLevelBiz
.
selectByName
(
jobName
);
if
(
appUserJobLevel
==
null
)
{
//职位不存在,添加
AppUserJobLevel
newValue
=
new
AppUserJobLevel
();
newValue
.
setName
(
jobName
);
newValue
.
setLevel
(
jobLevelBiz
.
selectMaxJobLevel
());
jobLevelBiz
.
insertSelectiveRe
(
newValue
);
jobId
=
jobLevelBiz
.
selectByName
(
jobName
).
getId
();
}
else
{
jobId
=
appUserJobLevel
.
getId
();
}
}
//查询员工表是否存在用户
if
(
StringUtils
.
isNotBlank
(
phone
))
{
AppUserPositionTemp
appUserPositionTemp
=
selectByPhone
(
phone
);
if
(
appUserPositionTemp
==
null
)
{
//不存在
AppUserPositionTemp
newValue
=
new
AppUserPositionTemp
();
AppUserLogin
userLogin
=
loginBiz
.
checkeUserLogin
(
phone
);
if
(
userLogin
==
null
)
{
//未注册
log
.
info
(
"----用户不存在----phone==="
+
phone
);
newValue
.
setUserId
(
0
);
}
else
{
//已注册
AppUserVo
appUserVo
=
detailBiz
.
getUserInfoById
(
userLogin
.
getId
());
appUserVo
.
setPositionId
(
4
);
newValue
.
setUserId
(
appUserVo
.
getUserid
());
detailBiz
.
updateUserPositionByUserId
(
appUserVo
.
getUserid
(),
appUserVo
.
getPositionId
());
}
newValue
.
setPositionId
(
4
);
newValue
.
setPhone
(
phone
);
newValue
.
setName
(
name
);
newValue
.
setJobId
(
jobId
);
newValue
.
setCompanyId
(
companyId
);
newValue
.
setCompanyName
(
companyName
);
AppUserPositionTemp
appUserPositionTemp1
=
selectByName
(
name
);
if
(
appUserPositionTemp1
==
null
)
{
mapper
.
insertSelective
(
newValue
);
}
else
{
BeanUtil
.
copyProperties
(
newValue
,
appUserPositionTemp1
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
updateSelectiveByIdRe
(
appUserPositionTemp1
);
}
}
}
else
{
log
.
info
(
"手机号码缺失》》》》》》"
);
}
}
return
map
;
}
private
enum
DataStatus
{
USERED
(
1
),
NO_USERED
(
0
);
private
int
code
;
...
...
@@ -316,6 +392,15 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
postionIdAndNameMap
=
appUserPositionBiz
.
findPostionIdAndNameMap
()
==
null
?
Collections
.
EMPTY_MAP
:
appUserPositionBiz
.
findPostionIdAndNameMap
();
}
public
AppUserPositionTemp
selectByPhone
(
String
phone
)
{
Example
example
=
new
Example
(
AppUserPositionTemp
.
class
);
example
.
createCriteria
().
andEqualTo
(
"phone"
,
phone
).
andEqualTo
(
"isDel"
,
0
);
List
<
AppUserPositionTemp
>
list
=
selectByExample
(
example
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
null
;
}
return
list
.
get
(
0
);
}
public
void
setPostionIdByPhone
(
String
phone
)
{
try
{
...
...
@@ -365,6 +450,12 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
return
mapper
.
getUserIdByParentCompany
(
parentCompanyId
);
}
public
AppUserPositionTemp
selectByName
(
String
name
)
{
Example
example
=
new
Example
(
AppUserPositionTemp
.
class
);
example
.
createCriteria
().
andEqualTo
(
"name"
,
name
);
return
mapper
.
selectOneByExample
(
example
);
}
/**
* 员工信息修改,插入变更记录表
* zuoyh
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/AppUserJobLevelMapper.java
View file @
9f58a3d9
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
mapper
;
import
com.github.wxiaoqi.security.admin.entity.AppUserJobLevel
;
import
org.apache.ibatis.annotations.Select
;
import
tk.mybatis.mapper.additional.idlist.IdListMapper
;
import
tk.mybatis.mapper.common.Mapper
;
...
...
@@ -14,6 +15,7 @@ import tk.mybatis.mapper.common.Mapper;
public
interface
AppUserJobLevelMapper
extends
Mapper
<
AppUserJobLevel
>,
IdListMapper
<
AppUserJobLevel
,
Integer
>
{
@Select
(
"select max(level) from app_user_job_level"
)
Integer
selectMaxJobLevel
();
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/admin/AppUserPositionController.java
View file @
9f58a3d9
...
...
@@ -9,6 +9,7 @@ import com.github.wxiaoqi.security.admin.dto.UserPostionDTO;
import
com.github.wxiaoqi.security.admin.entity.AppUserPositionTemp
;
import
com.github.wxiaoqi.security.admin.vo.AppUserPositionTempVo
;
import
com.github.wxiaoqi.security.admin.vo.WalletPostionVo
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil
;
import
com.github.wxiaoqi.security.auth.common.util.jwt.IJWTInfo
;
...
...
@@ -58,13 +59,13 @@ public class AppUserPositionController {
}
@GetMapping
(
"/postions"
)
public
ObjectRestResponse
<
List
<
WalletPostionVo
>>
findAllPostions
()
{
public
ObjectRestResponse
<
List
<
WalletPostionVo
>>
findAllPos
i
tions
()
{
List
<
WalletPostionVo
>
walletPostionVos
=
appUserPositionBiz
.
findAllPostions
();
return
ObjectRestResponse
.
succ
(
walletPostionVos
);
}
@PutMapping
public
ObjectRestResponse
updateUserPostionPercentage
(
@RequestBody
List
<
UserPostionDTO
>
userPostionDTOS
)
{
public
ObjectRestResponse
updateUserPos
i
tionPercentage
(
@RequestBody
List
<
UserPostionDTO
>
userPostionDTOS
)
{
appUserPositionBiz
.
updateUserPostionPercentage
(
userPostionDTOS
);
return
ObjectRestResponse
.
succ
();
}
...
...
@@ -76,7 +77,7 @@ public class AppUserPositionController {
* @return
*/
@PostMapping
(
"/addUserPostion"
)
public
ObjectRestResponse
<
Void
>
addUserPostion
(
@RequestBody
AppUserPositionTempDTO
appUserPositionTempDTO
,
HttpServletRequest
request
)
{
public
ObjectRestResponse
<
Void
>
addUserPos
i
tion
(
@RequestBody
AppUserPositionTempDTO
appUserPositionTempDTO
,
HttpServletRequest
request
)
{
try
{
IJWTInfo
infoFromToken
=
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
));
Integer
s
=
Integer
.
valueOf
(
infoFromToken
.
getId
());
...
...
@@ -93,7 +94,7 @@ public class AppUserPositionController {
* @return
*/
@PostMapping
(
"/updUserPostion"
)
public
ObjectRestResponse
<
Void
>
updUserPostion
(
@RequestBody
AppUserPositionTempDTO
appUserPositionTempDTO
,
HttpServletRequest
request
)
{
public
ObjectRestResponse
<
Void
>
updUserPos
i
tion
(
@RequestBody
AppUserPositionTempDTO
appUserPositionTempDTO
,
HttpServletRequest
request
)
{
try
{
IJWTInfo
infoFromToken
=
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
));
return
appUserPositionTempBiz
.
add
(
appUserPositionTempDTO
,
Integer
.
valueOf
(
infoFromToken
.
getId
()));
...
...
@@ -148,17 +149,36 @@ public class AppUserPositionController {
/**
* 批量导入
* @param userPostionExcel
* @param userPos
i
tionExcel
* @return
*/
@PostMapping
(
"/excel/import"
)
public
ObjectRestResponse
<
Map
<
String
,
Object
>>
importUserPos
tion
(
@RequestPart
(
"file"
)
MultipartFile
userPos
tionExcel
)
{
List
<
String
[]>
userPos
tionData
=
ExcelImport
.
getExcelData
(
userPos
tionExcel
);
if
(
userPostionData
.
size
()
<
2
)
{
public
ObjectRestResponse
<
Map
<
String
,
Object
>>
importUserPos
ition
(
@RequestPart
(
"file"
)
MultipartFile
userPosi
tionExcel
)
{
List
<
String
[]>
userPos
itionData
=
ExcelImport
.
getExcelData
(
userPosi
tionExcel
);
if
(
userPos
i
tionData
.
size
()
<
2
)
{
return
ObjectRestResponse
.
createFailedResult
(
1001
,
"导入不能没数据!!!"
);
}
userPostionData
.
remove
(
0
);
Map
<
String
,
Object
>
result
=
appUserPositionTempBiz
.
importUserPostion
(
userPostionData
);
userPositionData
.
remove
(
0
);
Map
<
String
,
Object
>
result
=
appUserPositionTempBiz
.
importUserPostion
(
userPositionData
);
return
ObjectRestResponse
.
succ
(
result
);
}
/**
* 批量导入员工信息
* @param userPositionExcel
* @return
*/
@PostMapping
(
"/app/unauth/excel/importUserInfo"
)
@IgnoreClientToken
public
ObjectRestResponse
<
Map
<
String
,
Object
>>
importUserInfo
(
@RequestPart
(
"file"
)
MultipartFile
userPositionExcel
)
{
List
<
String
[]>
userPositionData
=
ExcelImport
.
getExcelData
(
userPositionExcel
);
if
(
userPositionData
.
size
()
<
2
)
{
return
ObjectRestResponse
.
createFailedResult
(
1001
,
"导入不能没数据!!!"
);
}
userPositionData
.
remove
(
0
);
Map
<
String
,
Object
>
result
=
appUserPositionTempBiz
.
importUserInfo
(
userPositionData
);
return
ObjectRestResponse
.
succ
(
result
);
}
...
...
@@ -168,7 +188,7 @@ public class AppUserPositionController {
* @return
*/
@DeleteMapping
(
"/{id}"
)
public
ObjectRestResponse
<
Void
>
deleteUserPostion
(
@PathVariable
(
value
=
"id"
)
Integer
id
){
public
ObjectRestResponse
<
Void
>
deleteUserPos
i
tion
(
@PathVariable
(
value
=
"id"
)
Integer
id
){
appUserPositionTempBiz
.
updateAppuserPostionStatusById
(
id
,
1
);
return
ObjectRestResponse
.
succ
();
}
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
View file @
9f58a3d9
...
...
@@ -175,6 +175,9 @@ public interface VehicleFeign {
@PostMapping
(
"/branchCompany/app/unauth/companys"
)
PageDataVO
<
BranchCompanyListVO
>
findBranchCompanyWithPage
(
@RequestBody
BranchCompanyFindDTO
branchCompanyFindDTO
);
@GetMapping
(
"/branchCompany/app/unauth/getByName"
)
public
ObjectRestResponse
<
BranchCompany
>
selectByName
(
@RequestParam
(
value
=
"name"
)
String
name
);
@GetMapping
(
"/vehicleInfo/findVehicleIds"
)
List
<
String
>
findbyPlateNumberAndVehicleCod
(
@RequestParam
(
value
=
"plateNumber"
)
String
plateNumber
,
@RequestParam
(
value
=
"vehicleCode"
)
String
vehicleCode
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
View file @
9f58a3d9
...
...
@@ -32,7 +32,6 @@ import com.xxfc.platform.vehicle.util.excel.ExcelImport;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections4.map.HashedMap
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.joda.time.DateTime
;
import
org.joda.time.format.DateTimeFormat
;
...
...
@@ -446,4 +445,12 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
}
return
branchCompanies
.
stream
().
collect
(
Collectors
.
toMap
(
BranchCompany:
:
getId
,
BranchCompany:
:
getName
));
}
public
ObjectRestResponse
<
BranchCompany
>
selectByName
(
String
name
)
{
if
(
StringUtils
.
isBlank
(
name
))
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
return
ObjectRestResponse
.
succ
(
mapper
.
selectByName
(
name
));
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/BranchCompanyMapper.java
View file @
9f58a3d9
...
...
@@ -22,4 +22,6 @@ public interface BranchCompanyMapper extends Mapper<BranchCompany>, SelectByIdLi
@Select
(
"SELECT `code`,count(id) cd FROM `vehicle` WHERE is_del=0 and number_plate LIKE '%测试%' GROUP BY code HAVING cd>=2"
)
List
<
JSONObject
>
getList
();
BranchCompany
selectByName
(
String
name
);
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/BranchCompanyController.java
View file @
9f58a3d9
...
...
@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
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.AreaBiz
;
import
com.xxfc.platform.vehicle.biz.BranchCompanyBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleBiz
;
...
...
@@ -18,26 +19,21 @@ import com.xxfc.platform.vehicle.entity.BranchCompany;
import
com.xxfc.platform.vehicle.pojo.BranchCompanyVo
;
import
com.xxfc.platform.vehicle.pojo.CompanyDetail
;
import
com.xxfc.platform.vehicle.pojo.CompanySearchDTO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyFindDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.BranComanyLeaderVo
;
import
com.xxfc.platform.vehicle.pojo.vo.BranchCompanyListVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.assertj.core.util.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@RestController
@RequestMapping
(
"/branchCompany"
)
...
...
@@ -232,4 +228,9 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
return
baseBiz
.
selectCompanyMap
();
}
@GetMapping
(
"/app/unauth/getByName"
)
public
ObjectRestResponse
<
BranchCompany
>
selectByName
(
String
name
)
{
return
baseBiz
.
selectByName
(
name
);
}
}
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyMapper.xml
View file @
9f58a3d9
...
...
@@ -97,4 +97,7 @@
</if>
) AS `cb` ON cb.id = bc.company_base_id ORDER BY bc.id
</select>
<select
id=
"selectByName"
resultType=
"com.xxfc.platform.vehicle.entity.BranchCompany"
parameterType=
"String"
>
select * from branch_company where name like concat("%", #{name}, "%") and is_del = 0
</select>
</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