Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
5b258526
Commit
5b258526
authored
May 14, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://139.224.139.2:9091/AGSH/yd-backend
into dev
parents
f571e692
334cfa07
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
1720 additions
and
154 deletions
+1720
-154
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+233
-9
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/AddRecruitTrackRequestVO.java
+27
-8
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/PractitionerPotentialInfo.java
+0
-36
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/RecruitListRequestVO.java
+5
-5
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/RecruitTrackInfo.java
+76
-0
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/RecruitTrackQueryRequestVO.java
+5
-5
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/RecruitTrackQueryResponseVO.java
+13
-54
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotential.java
+2
-1
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotentialAssignedTrack.java
+6
-1
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotentialAssigneds.java
+70
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclUser.java
+114
-0
yd-api/src/main/java/com/yd/dal/entity/meta/MdDropMaster.java
+54
-0
yd-api/src/main/java/com/yd/dal/entity/meta/MdDropOptions.java
+4
-3
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerMapper.java
+3
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.java
+11
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialAssignedsMapper.java
+23
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialMapper.java
+4
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclUserMapper.java
+23
-0
yd-api/src/main/java/com/yd/dal/mapper/meta/MdDropMasterMapper.java
+18
-0
yd-api/src/main/java/com/yd/dal/mapper/meta/MdDropOptionsMapper.java
+6
-1
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerDALService.java
+7
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialAssignedTrackDALService.java
+11
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialAssignedsDALService.java
+12
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialDALService.java
+15
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclUserDALService.java
+11
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerDALServiceImpl.java
+4
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialAssignedTrackDALServiceImpl.java
+28
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialAssignedsDALServiceImpl.java
+20
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialDALServiceImpl.java
+32
-1
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclUserDALServiceImpl.java
+19
-0
yd-api/src/main/java/com/yd/dal/service/meta/MdDropOptionsDALService.java
+8
-2
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdDropOptionsDALServiceImpl.java
+14
-1
yd-api/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
+10
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.xml
+144
-12
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialAssignedsMapper.xml
+181
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialMapper.xml
+54
-6
yd-api/src/main/resources/mapper/customer/AclUserMapper.xml
+285
-0
yd-api/src/main/resources/mapper/meta/MdDropMasterMapper.xml
+135
-0
yd-api/src/main/resources/mapper/meta/MdDropOptionsMapper.xml
+32
-9
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
5b258526
...
...
@@ -35,13 +35,14 @@ import com.yd.dal.service.meta.*;
import
com.yd.dal.service.order.PoOrderDALService
;
import
com.yd.dal.service.survey.SurveyCustomerAnswersDALService
;
import
com.yd.dal.entity.customer.practitioner.*
;
import
com.yd.dal.service.meta.MdCodeDALService
;
import
com.yd.dal.service.meta.MdDropOptionsDALService
;
import
com.yd.rmi.ali.oss.service.OssService
;
import
com.yd.rmi.tencent.wechat.service.WechatService
;
import
com.yd.rmi.tencent.wechat.vo.WeChatInfoByENV
;
import
com.yd.rmi.tencent.wechatinterf.pojo.ticket.TicketRequest
;
import
com.yd.rmi.tencent.wechatinterf.pojo.token.TokenRequest
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.EncryptUtil
;
import
com.yd.util.HttpUtil
;
import
com.yd.util.config.ZHBErrorConfig
;
import
com.yd.util.deshandler.DESTypeHandler
;
...
...
@@ -109,6 +110,11 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
private
MktLeadsPoolDALService
mktLeadsPoolDALService
;
@Autowired
private
MdDropOptionsDALService
mdDropOptionsDALService
;
@Autowired
private
AclUserDALService
aclUserDALService
;
@Autowired
private
AclPractitionerPotentialAssignedsDALService
aclPractitionerPotentialAssignedsDALService
;
@Override
public
PractitionerLoginResponseVO
practitionerLogin
(
PractitionerLoginRequestVO
requestVO
)
{
PractitionerLoginResponseVO
responseVO
=
new
PractitionerLoginResponseVO
();
...
...
@@ -444,7 +450,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
double
width
=
img
.
getWidth
(
null
);
double
height
=
img
.
getHeight
(
null
);
double
value
=
height
/
width
;
Double
scaleDouble
=
Double
.
valueOf
(
scale
);
double
scaleDouble
=
Double
.
parseDouble
(
scale
);
if
(
value
!=
scaleDouble
)
{
if
(
scaleDouble
==
1
){
//上传头像尺寸比例为1:1
...
...
@@ -699,6 +705,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
infos
;
}
@Override
public
RecruitResponseVO
recruit
(
RecruitRequestVO
requestVO
)
{
RecruitResponseVO
responseVO
=
new
RecruitResponseVO
();
String
name
=
requestVO
.
getName
();
...
...
@@ -729,14 +736,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
practitionerPotential
.
setIsActive
(
1
);
if
(
potentialId
!=
null
){
practitionerPotential
.
setId
(
potentialId
);
}
aclPractitionerPotentialDALService
.
update
(
practitionerPotential
);
}
else
{
aclPractitionerPotentialDALService
.
save
(
practitionerPotential
);
potentialId
=
practitionerPotential
.
getId
();
//如果已经分配团队长,则在追踪表中增加记录
List
<
Long
>
practitionerPotentialIdList
=
new
ArrayList
<>();
practitionerPotentialIdList
.
add
(
potentialId
);
addPractitionerPotentialTrack
(
practitionerPotentialIdList
,
practitionerId
);
}
responseVO
.
setPotentialCustomerId
(
customerId
);
responseVO
.
setPotentialId
(
potentialId
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
...
...
@@ -763,36 +771,252 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
if
(
practitionerId
!=
null
&&
!
practitionerPotentialIdList
.
isEmpty
())
{
List
<
AclPractitionerPotentialAssignedTrack
>
potentialAssignedTrackList
=
new
ArrayList
<>();
AclPractitionerPotentialAssignedTrack
potentialAssignedTrack
;
List
<
AclPractitionerPotentialAssigneds
>
potentialAssignedsList
=
new
ArrayList
<>();
AclPractitionerPotentialAssigneds
potentialAssigneds
;
Long
trackStatusId
=
107L
;
int
trackScore
=
2
;
List
<
MdDropOptions
>
optionsList
=
mdDropOptionsDALService
.
findByMasterCodeAndOrderId
(
"team_building_track"
,
1
);
if
(
optionsList
!=
null
&&
!
optionsList
.
isEmpty
()){
MdDropOptions
options
=
optionsList
.
get
(
0
);
trackStatusId
=
options
.
getId
();
trackScore
=
options
.
getDropOptionScore
();
}
for
(
Long
potentialId
:
practitionerPotentialIdList
)
{
potentialAssignedTrack
=
new
AclPractitionerPotentialAssignedTrack
();
potentialAssignedTrack
.
setPractitionerPotentialId
(
potentialId
);
potentialAssignedTrack
.
setPractitionerAssignedId
(
practitionerId
);
potentialAssignedTrack
.
setTrackStatusId
(
112L
);
//待跟进
potentialAssignedTrack
.
setTrackStatusId
(
trackStatusId
);
//待跟进
potentialAssignedTrack
.
setIsActive
(
1
);
potentialAssignedTrack
.
setIsLasted
(
1
);
potentialAssignedTrack
.
setCreatedAt
(
new
Date
());
potentialAssignedTrack
.
setCreatedBy
(
practitionerId
);
potentialAssignedTrack
.
setCreatorType
(
2
);
potentialAssignedTrack
.
setTrackScore
(
trackScore
);
potentialAssignedTrack
.
setTrackTime
(
new
Date
());
potentialAssignedTrackList
.
add
(
potentialAssignedTrack
);
potentialAssigneds
=
new
AclPractitionerPotentialAssigneds
();
potentialAssigneds
.
setAssignedPractitionerId
(
practitionerId
);
potentialAssigneds
.
setPractitionerPotentialId
(
potentialId
);
potentialAssigneds
.
setIsActive
(
1
);
potentialAssigneds
.
setCreatedAt
(
new
Date
());
potentialAssigneds
.
setCreatedBy
(
practitionerId
);
potentialAssigneds
.
setCreatorType
(
2
);
potentialAssignedsList
.
add
(
potentialAssigneds
);
}
aclPractitionerPotentialAssignedTrackDALService
.
saveAll
(
potentialAssignedTrackList
);
aclPractitionerPotentialAssignedsDALService
.
saveAll
(
potentialAssignedsList
);
}
}
@Override
@Transactional
public
AddRecruitTrackResponseVO
addRecruitTrack
(
AddRecruitTrackRequestVO
requestVO
)
{
return
null
;
AddRecruitTrackResponseVO
responseVO
=
new
AddRecruitTrackResponseVO
();
Long
trackStatusId
=
requestVO
.
getTrackStatusId
();
Long
practitionerId
=
requestVO
.
getPractitionerId
();
Long
potentialId
=
requestVO
.
getPotentialId
();
String
trackTime
=
requestVO
.
getTrackTime
();
if
(
trackStatusId
!=
null
&&
practitionerId
!=
null
&&
potentialId
!=
null
&&
!
Strings
.
isNullOrEmpty
(
trackTime
)){
Date
trackTimeDate
=
CommonUtil
.
stringParseDate
(
trackTime
,
"yyyy-MM-dd"
);
AclPractitionerPotentialAssignedTrack
assignedTrack
=
new
AclPractitionerPotentialAssignedTrack
();
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackIsLastedList
=
aclPractitionerPotentialAssignedTrackDALService
.
findByPotentialIdAndIsLasted
(
potentialId
,
1
);
//1、更新最新的状态
if
(
assignedTrackIsLastedList
!=
null
&&
!
assignedTrackIsLastedList
.
isEmpty
()){
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackUpdateList
=
new
ArrayList
<>();
for
(
AclPractitionerPotentialAssignedTrack
item
:
assignedTrackIsLastedList
){
item
.
setIsLasted
(
0
);
item
.
setUpdatedBy
(
practitionerId
);
item
.
setUpdaterType
(
2
);
item
.
setUpdatedAt
(
new
Date
());
assignedTrackUpdateList
.
add
(
item
);
}
aclPractitionerPotentialAssignedTrackDALService
.
updateAll
(
assignedTrackUpdateList
);
}
//2、查询团队长对该增员所有增员状态
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackList
=
aclPractitionerPotentialAssignedTrackDALService
.
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
practitionerId
,
potentialId
,
trackStatusId
,
trackTimeDate
);
if
(
assignedTrackList
==
null
||
assignedTrackList
.
isEmpty
()){
//3、如果没有,获取增员状态对应的分值,
MdDropOptions
options
=
mdDropOptionsDALService
.
findById
(
trackStatusId
);
assignedTrack
.
setTrackScore
(
options
.
getDropOptionScore
());
}
else
{
assignedTrack
.
setTrackScore
(
0
);
}
assignedTrack
.
setPractitionerAssignedId
(
practitionerId
);
assignedTrack
.
setPractitionerPotentialId
(
potentialId
);
assignedTrack
.
setTrackStatusId
(
trackStatusId
);
assignedTrack
.
setNotice
(
requestVO
.
getNotice
());
assignedTrack
.
setTrackTime
(
trackTimeDate
);
assignedTrack
.
setIsActive
(
1
);
assignedTrack
.
setIsLasted
(
1
);
assignedTrack
.
setCreatorType
(
2
);
assignedTrack
.
setCreatedBy
(
practitionerId
);
assignedTrack
.
setCreatedAt
(
new
Date
());
aclPractitionerPotentialAssignedTrackDALService
.
save
(
assignedTrack
);
responseVO
.
setTrackId
(
assignedTrack
.
getId
());
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
}
else
{
String
[]
paras
=
{
"trackStatusId,practitionerId,potentialId,trackTime"
};
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"610002"
,
paras
)));
}
return
responseVO
;
}
@Override
public
RecruitTrackQueryResponseVO
recruitTrackQuery
(
RecruitTrackQueryRequestVO
requestVO
)
{
return
null
;
RecruitTrackQueryResponseVO
responseVO
=
new
RecruitTrackQueryResponseVO
();
Long
practitionerId
=
requestVO
.
getPractitionerId
();
Long
potentialId
=
requestVO
.
getPotentialId
();
if
(
potentialId
!=
null
&&
practitionerId
!=
null
){
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackList
=
aclPractitionerPotentialAssignedTrackDALService
.
findByPractitionerIdAndPotentialId
(
practitionerId
,
potentialId
);
if
(
assignedTrackList
!=
null
&&
!
assignedTrackList
.
isEmpty
()){
Map
<
Integer
,
Map
<
Long
,
String
>>
nameMap
=
getOperateName
(
assignedTrackList
);
Map
<
Long
,
String
>
userMap
=
nameMap
.
get
(
1
);
Map
<
Long
,
String
>
practitionerMap
=
nameMap
.
get
(
2
);
Map
<
Long
,
String
>
trackStatusMap
=
new
HashMap
<>();
List
<
MdDropOptions
>
dropOptionsList
=
mdDropOptionsDALService
.
findByMasterCode
(
"team_building_track"
);
dropOptionsList
.
forEach
(
i
->
trackStatusMap
.
put
(
i
.
getId
(),
i
.
getDropOptionName
()));
List
<
RecruitTrackInfo
>
recruitTrackInfoList
=
new
ArrayList
<>();
RecruitTrackInfo
recruitTrack
;
Long
operateUserId
,
trackStatusId
;
Integer
operateUserType
;
String
operateUserName
;
for
(
AclPractitionerPotentialAssignedTrack
item
:
assignedTrackList
){
operateUserId
=
item
.
getCreatedBy
();
trackStatusId
=
item
.
getTrackStatusId
();
operateUserType
=
item
.
getCreatorType
();
operateUserName
=
(
operateUserType
==
1
)
?
userMap
.
get
(
operateUserId
)
:
practitionerMap
.
get
(
operateUserId
);
recruitTrack
=
new
RecruitTrackInfo
();
recruitTrack
.
setTrackId
(
item
.
getId
());
recruitTrack
.
setNotice
(
item
.
getNotice
());
recruitTrack
.
setOperateUserId
(
operateUserId
);
recruitTrack
.
setOperateUserName
(
operateUserName
);
recruitTrack
.
setTrackStatusId
(
trackStatusId
);
recruitTrack
.
setTrackStatus
(
trackStatusMap
.
get
(
trackStatusId
));
recruitTrack
.
setCreateAt
(
CommonUtil
.
dateParseString
(
item
.
getCreatedAt
(),
"yyyy-MM-dd HH:mm:ss"
));
recruitTrack
.
setTrackTime
(
CommonUtil
.
dateParseString
(
item
.
getTrackTime
(),
"yyyy-MM-dd"
));
recruitTrackInfoList
.
add
(
recruitTrack
);
responseVO
.
setRecruitTrackInfoList
(
recruitTrackInfoList
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
}
}
else
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"820001"
)));
}
}
else
{
String
[]
paras
=
{
"practitionerId,potentialId"
};
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"610002"
,
paras
)));
}
return
responseVO
;
}
private
Map
<
Integer
,
Map
<
Long
,
String
>>
getOperateName
(
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackList
)
{
Map
<
Integer
,
Map
<
Long
,
String
>>
nameMap
=
new
HashMap
<>();
Map
<
Long
,
String
>
practitionerMap
=
new
HashMap
<>();
Map
<
Long
,
String
>
userMap
=
new
HashMap
<>();
Set
<
Long
>
practitionerIdSet
=
new
HashSet
<>();
Set
<
Long
>
userIdSet
=
new
HashSet
<>();
for
(
AclPractitionerPotentialAssignedTrack
item
:
assignedTrackList
){
if
(
item
.
getCreatorType
()
==
2
){
practitionerIdSet
.
add
(
item
.
getCreatedBy
());
}
else
{
userIdSet
.
add
(
item
.
getCreatedBy
());
}
}
List
<
Long
>
practitionerIdList
=
new
ArrayList
<>(
practitionerIdSet
);
List
<
Long
>
userIdList
=
new
ArrayList
<>(
userIdSet
);
if
(!
practitionerIdList
.
isEmpty
()){
List
<
AclPractitioner
>
practitionerList
=
aclPractitionerDALService
.
findByIds
(
practitionerIdList
);
practitionerList
.
forEach
(
i
->
practitionerMap
.
put
(
i
.
getId
(),
i
.
getName
()));
}
if
(!
userIdList
.
isEmpty
()){
List
<
AclUser
>
userList
=
aclUserDALService
.
findByIds
(
userIdList
);
userList
.
forEach
(
i
->
userMap
.
put
(
i
.
getId
(),
i
.
getName
()));
}
nameMap
.
put
(
1
,
userMap
);
nameMap
.
put
(
2
,
practitionerMap
);
return
nameMap
;
}
@Override
public
RecruitListResponseVO
recruitListQuery
(
RecruitListRequestVO
requestVO
)
{
return
null
;
RecruitListResponseVO
responseVO
=
new
RecruitListResponseVO
();
Long
practitionerId
=
requestVO
.
getPractitionerId
();
if
(
practitionerId
!=
null
){
Integer
status
=
requestVO
.
getStatus
();
//1、获取用户数据
List
<
PractitionerPotentialInfo
>
practitionerPotentialInfoList
=
aclPractitionerPotentialDALService
.
findByPractitionerIdAndLasted
(
practitionerId
);
if
(
practitionerPotentialInfoList
!=
null
&&
!
practitionerPotentialInfoList
.
isEmpty
()){
List
<
MdDropOptions
>
trackStatusList
=
mdDropOptionsDALService
.
findByMasterCode
(
"team_building_track"
);
Map
<
Integer
,
Long
>
trackStatusInfo
=
getTrackStatusInfo
(
trackStatusList
);
Long
firstTrackStatusId
=
trackStatusInfo
.
get
(
1
);
Long
LastStatusId
=
trackStatusInfo
.
get
(
2
);
Map
<
Long
,
String
>
trackStatusMap
=
new
HashMap
<>();
trackStatusList
.
forEach
(
i
->
trackStatusMap
.
put
(
i
.
getId
(),
i
.
getDropOptionName
()));
List
<
MdDropOptions
>
recruitSourceList
=
mdDropOptionsDALService
.
findByMasterCode
(
"team_building_source"
);
Map
<
Long
,
String
>
recruitSourceMap
=
new
HashMap
<>();
recruitSourceList
.
forEach
(
i
->
recruitSourceMap
.
put
(
i
.
getId
(),
i
.
getDropOptionName
()));
List
<
PractitionerPotentialInfo
>
potentialInfoList
=
new
ArrayList
<>();
Long
trackStatusId
;
for
(
PractitionerPotentialInfo
item
:
practitionerPotentialInfoList
){
trackStatusId
=
item
.
getTrackStatusId
();
if
(
status
!=
null
){
if
(
status
==
1
&&
trackStatusId
.
longValue
()
==
firstTrackStatusId
){
getResponseMessage
(
potentialInfoList
,
trackStatusMap
,
recruitSourceMap
,
item
);
}
else
if
(
status
==
3
&&
trackStatusId
.
longValue
()
==
LastStatusId
){
getResponseMessage
(
potentialInfoList
,
trackStatusMap
,
recruitSourceMap
,
item
);
}
else
if
(
status
==
2
&&
trackStatusId
.
longValue
()
!=
LastStatusId
&&
trackStatusId
.
longValue
()
!=
firstTrackStatusId
){
getResponseMessage
(
potentialInfoList
,
trackStatusMap
,
recruitSourceMap
,
item
);
}
}
else
{
getResponseMessage
(
potentialInfoList
,
trackStatusMap
,
recruitSourceMap
,
item
);
}
}
responseVO
.
setPractitionerPotentialInfoList
(
potentialInfoList
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
}
else
{
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"820001"
)));
}
}
else
{
String
[]
paras
=
{
"practitionerId"
};
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"610002"
,
paras
)));
}
return
responseVO
;
}
private
void
getResponseMessage
(
List
<
PractitionerPotentialInfo
>
potentialInfoList
,
Map
<
Long
,
String
>
trackStatusMap
,
Map
<
Long
,
String
>
recruitSourceMap
,
PractitionerPotentialInfo
item
)
{
PractitionerPotentialInfo
potentialInfo
=
new
PractitionerPotentialInfo
();
BeanUtils
.
copyProperties
(
item
,
potentialInfo
);
potentialInfo
.
setTrackStatus
(
trackStatusMap
.
get
(
item
.
getTrackStatusId
()));
potentialInfo
.
setResourceDropMasterName
(
recruitSourceMap
.
get
(
item
.
getResourceDropMasterId
()));
potentialInfoList
.
add
(
potentialInfo
);
}
private
Map
<
Integer
,
Long
>
getTrackStatusInfo
(
List
<
MdDropOptions
>
trackStatusList
)
{
Map
<
Integer
,
Long
>
trackStatusInfo
=
new
HashMap
<>();
Long
firstTrackStatusId
=
null
,
LastStatusId
=
null
,
id
;
Integer
orderId
,
min
=
null
,
max
=
null
;
for
(
MdDropOptions
item
:
trackStatusList
){
id
=
item
.
getId
();
orderId
=
item
.
getDropOptionOrder
();
if
(
orderId
<
50
){
if
(
firstTrackStatusId
==
null
){
firstTrackStatusId
=
LastStatusId
=
id
;
min
=
max
=
orderId
;
}
else
{
if
(
orderId
<
min
){
firstTrackStatusId
=
id
;
min
=
orderId
;
}
else
if
(
orderId
>
max
){
LastStatusId
=
id
;
max
=
orderId
;
}
}
}
}
trackStatusInfo
.
put
(
1
,
firstTrackStatusId
);
trackStatusInfo
.
put
(
2
,
LastStatusId
);
return
trackStatusInfo
;
}
@Override
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/AddRecruitTrackRequestVO.java
View file @
5b258526
package
com
.
yd
.
api
.
practitioner
.
vo
.
recruit
;
public
class
AddRecruitTrackRequestVO
{
private
Long
trackId
;
private
Long
practitionerId
;
private
Long
potentialId
;
private
Long
trackStatusId
;
private
String
notice
;
private
String
trackTime
;
private
Integer
isActive
;
public
Long
getTrackId
()
{
return
trackId
;
}
public
void
setTrackId
(
Long
trackId
)
{
this
.
trackId
=
trackId
;
}
public
Long
getTrackStatusId
()
{
return
trackStatusId
;
...
...
@@ -37,4 +32,28 @@ public class AddRecruitTrackRequestVO {
public
void
setIsActive
(
Integer
isActive
)
{
this
.
isActive
=
isActive
;
}
public
Long
getPractitionerId
()
{
return
practitionerId
;
}
public
void
setPractitionerId
(
Long
practitionerId
)
{
this
.
practitionerId
=
practitionerId
;
}
public
Long
getPotentialId
()
{
return
potentialId
;
}
public
void
setPotentialId
(
Long
potentialId
)
{
this
.
potentialId
=
potentialId
;
}
public
String
getTrackTime
()
{
return
trackTime
;
}
public
void
setTrackTime
(
String
trackTime
)
{
this
.
trackTime
=
trackTime
;
}
}
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/PractitionerPotentialInfo.java
View file @
5b258526
...
...
@@ -16,13 +16,9 @@ public class PractitionerPotentialInfo {
private
String
tag
;
private
String
remark
;
private
String
ossPathResume
;
private
String
assignedId
;
private
String
assignedName
;
private
Long
trackStatusId
;
private
String
trackStatus
;
private
Long
trackId
;
private
Long
operateUserId
;
private
String
operateUserName
;
private
String
createdAt
;
public
Long
getPotentialId
()
{
...
...
@@ -145,22 +141,6 @@ public class PractitionerPotentialInfo {
this
.
ossPathResume
=
ossPathResume
;
}
public
String
getAssignedId
()
{
return
assignedId
;
}
public
void
setAssignedId
(
String
assignedId
)
{
this
.
assignedId
=
assignedId
;
}
public
String
getAssignedName
()
{
return
assignedName
;
}
public
void
setAssignedName
(
String
assignedName
)
{
this
.
assignedName
=
assignedName
;
}
public
Long
getTrackStatusId
()
{
return
trackStatusId
;
}
...
...
@@ -185,22 +165,6 @@ public class PractitionerPotentialInfo {
this
.
trackId
=
trackId
;
}
public
Long
getOperateUserId
()
{
return
operateUserId
;
}
public
void
setOperateUserId
(
Long
operateUserId
)
{
this
.
operateUserId
=
operateUserId
;
}
public
String
getOperateUserName
()
{
return
operateUserName
;
}
public
void
setOperateUserName
(
String
operateUserName
)
{
this
.
operateUserName
=
operateUserName
;
}
public
String
getCreatedAt
()
{
return
createdAt
;
}
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/RecruitListRequestVO.java
View file @
5b258526
package
com
.
yd
.
api
.
practitioner
.
vo
.
recruit
;
public
class
RecruitListRequestVO
{
private
Long
assigned
Id
;
private
Long
practitioner
Id
;
private
Integer
status
;
//1-待跟进,2-跟进中,3-以完成
public
Long
get
Assigned
Id
()
{
return
assigned
Id
;
public
Long
get
Practitioner
Id
()
{
return
practitioner
Id
;
}
public
void
set
AssignedId
(
Long
assigned
Id
)
{
this
.
assignedId
=
assigned
Id
;
public
void
set
PractitionerId
(
Long
practitioner
Id
)
{
this
.
practitionerId
=
practitioner
Id
;
}
public
Integer
getStatus
()
{
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/RecruitTrackInfo.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
api
.
practitioner
.
vo
.
recruit
;
public
class
RecruitTrackInfo
{
private
Long
trackId
;
private
Long
trackStatusId
;
private
String
trackStatus
;
private
String
notice
;
private
String
trackTime
;
private
String
createAt
;
private
Long
operateUserId
;
private
String
operateUserName
;
public
Long
getTrackId
()
{
return
trackId
;
}
public
void
setTrackId
(
Long
trackId
)
{
this
.
trackId
=
trackId
;
}
public
Long
getTrackStatusId
()
{
return
trackStatusId
;
}
public
void
setTrackStatusId
(
Long
trackStatusId
)
{
this
.
trackStatusId
=
trackStatusId
;
}
public
String
getTrackStatus
()
{
return
trackStatus
;
}
public
void
setTrackStatus
(
String
trackStatus
)
{
this
.
trackStatus
=
trackStatus
;
}
public
String
getNotice
()
{
return
notice
;
}
public
void
setNotice
(
String
notice
)
{
this
.
notice
=
notice
;
}
public
String
getCreateAt
()
{
return
createAt
;
}
public
void
setCreateAt
(
String
createAt
)
{
this
.
createAt
=
createAt
;
}
public
Long
getOperateUserId
()
{
return
operateUserId
;
}
public
void
setOperateUserId
(
Long
operateUserId
)
{
this
.
operateUserId
=
operateUserId
;
}
public
String
getOperateUserName
()
{
return
operateUserName
;
}
public
void
setOperateUserName
(
String
operateUserName
)
{
this
.
operateUserName
=
operateUserName
;
}
public
String
getTrackTime
()
{
return
trackTime
;
}
public
void
setTrackTime
(
String
trackTime
)
{
this
.
trackTime
=
trackTime
;
}
}
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/RecruitTrackQueryRequestVO.java
View file @
5b258526
...
...
@@ -2,7 +2,7 @@ package com.yd.api.practitioner.vo.recruit;
public
class
RecruitTrackQueryRequestVO
{
private
Long
potentialId
;
private
Long
assigned
Id
;
private
Long
practitioner
Id
;
public
Long
getPotentialId
()
{
return
potentialId
;
...
...
@@ -12,11 +12,11 @@ public class RecruitTrackQueryRequestVO {
this
.
potentialId
=
potentialId
;
}
public
Long
get
Assigned
Id
()
{
return
assigned
Id
;
public
Long
get
Practitioner
Id
()
{
return
practitioner
Id
;
}
public
void
set
AssignedId
(
Long
assigned
Id
)
{
this
.
assignedId
=
assigned
Id
;
public
void
set
PractitionerId
(
Long
practitioner
Id
)
{
this
.
practitionerId
=
practitioner
Id
;
}
}
yd-api/src/main/java/com/yd/api/practitioner/vo/recruit/RecruitTrackQueryResponseVO.java
View file @
5b258526
package
com
.
yd
.
api
.
practitioner
.
vo
.
recruit
;
public
class
RecruitTrackQueryResponseVO
{
private
Long
trackId
;
private
Long
trackStatusId
;
private
String
trackStatus
;
private
String
notice
;
private
String
createAt
;
private
Long
operateUserId
;
private
String
operateUserName
;
public
Long
getTrackId
()
{
return
trackId
;
}
public
void
setTrackId
(
Long
trackId
)
{
this
.
trackId
=
trackId
;
}
public
Long
getTrackStatusId
()
{
return
trackStatusId
;
}
public
void
setTrackStatusId
(
Long
trackStatusId
)
{
this
.
trackStatusId
=
trackStatusId
;
}
public
String
getTrackStatus
()
{
return
trackStatus
;
}
public
void
setTrackStatus
(
String
trackStatus
)
{
this
.
trackStatus
=
trackStatus
;
}
public
String
getNotice
()
{
return
notice
;
}
import
com.yd.api.result.CommonResult
;
public
void
setNotice
(
String
notice
)
{
this
.
notice
=
notice
;
}
public
String
getCreateAt
()
{
return
createAt
;
}
import
java.util.List
;
public
void
setCreateAt
(
String
createAt
)
{
this
.
createAt
=
createA
t
;
}
public
class
RecruitTrackQueryResponseVO
{
private
List
<
RecruitTrackInfo
>
recruitTrackInfoLis
t
;
private
CommonResult
commonResult
;
public
L
ong
getOperateUserId
()
{
return
operateUserId
;
public
L
ist
<
RecruitTrackInfo
>
getRecruitTrackInfoList
()
{
return
recruitTrackInfoList
;
}
public
void
set
OperateUserId
(
Long
operateUserId
)
{
this
.
operateUserId
=
operateUserId
;
public
void
set
RecruitTrackInfoList
(
List
<
RecruitTrackInfo
>
recruitTrackInfoList
)
{
this
.
recruitTrackInfoList
=
recruitTrackInfoList
;
}
public
String
getOperateUserName
()
{
return
operateUserName
;
public
CommonResult
getCommonResult
()
{
return
commonResult
;
}
public
void
set
OperateUserName
(
String
operateUserName
)
{
this
.
operateUserName
=
operateUserName
;
public
void
set
CommonResult
(
CommonResult
commonResult
)
{
this
.
commonResult
=
commonResult
;
}
}
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotential.java
View file @
5b258526
...
...
@@ -114,7 +114,7 @@ public class AclPractitionerPotential implements Serializable {
private
Integer
creatorType
;
private
Integer
updat
o
rType
;
private
Integer
updat
e
rType
;
private
Long
customerId
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotentialAssignedTrack.java
View file @
5b258526
...
...
@@ -62,9 +62,13 @@ public class AclPractitionerPotentialAssignedTrack implements Serializable {
private
Integer
creatorType
;
private
Integer
updat
o
rType
;
private
Integer
updat
e
rType
;
private
Integer
isLasted
;
private
Integer
trackScore
;
private
Date
trackTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotentialAssigneds.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
entity
.
customer
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* ag_acl_practitioner_potential_assigneds
* @author
*/
@Data
public
class
AclPractitionerPotentialAssigneds
implements
Serializable
{
/**
* serial id
*/
private
Long
id
;
/**
* 经纪人id
*/
private
Long
assignedPractitionerId
;
/**
* FK ag_acl_practitioner_potential.id潜在经纪人表id
*/
private
Long
practitionerPotentialId
;
/**
* 预计报聘时间
*/
private
Date
timeToOnboarding
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
/**
* 分析建置时间
*/
private
Date
createdAt
;
/**
* 建置者 FK ag_acl_user.id
*/
private
Long
createdBy
;
/**
* 更新时间
*/
private
Date
updatedAt
;
/**
* 更新者 FK ag_acl_user.id
*/
private
Long
updatedBy
;
/**
* 更新者类型:1为user id(AGMS),2为本人practitioner id(银盾经纪)
*/
private
Integer
updaterType
;
/**
* 创建者类型:1为user id(AGMS),2为本人practitioner id(银盾经纪)
*/
private
Integer
creatorType
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/customer/AclUser.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
entity
.
customer
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* ag_acl_user
* @author
*/
@Data
public
class
AclUser
implements
Serializable
{
/**
* serial id
*/
private
Long
id
;
/**
* 1= Staff 2.Customer 3.Partner
*/
private
Integer
userRole
;
/**
* 员工编号
*/
private
String
employeeNo
;
/**
* 1= 安吉保 2=银盾
*/
private
Integer
company
;
/**
* FK ag_system_dept.id
*/
private
Long
deptId
;
/**
* FK ag_system_role.id
*/
private
Long
roleId
;
/**
* login ID
*/
private
String
login
;
/**
* 88888888
*/
private
String
password
;
/**
* user name
*/
private
String
name
;
/**
* user nickname
*/
private
String
nickname
;
private
String
mobileNo
;
private
String
idNo
;
/**
* 最后登入时间
*/
private
Date
lastLoginTime
;
/**
* 最后登出时间
*/
private
Date
logoutTime
;
/**
* 1=PC 2=Mobile 3=Pad
*/
private
Integer
loginSource
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
/**
* 员工email
*/
private
String
email
;
/**
* 创建日期
*/
private
Date
createdAt
;
/**
* creator
*/
private
Long
createdBy
;
/**
* 0000-00-00 00:00:00
*/
private
Date
updatedAt
;
/**
* updator, FK ag_acl_user.id
*/
private
Long
updatedBy
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/meta/MdDropMaster.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
entity
.
meta
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* ag_md_drop_master
* @author
*/
@Data
public
class
MdDropMaster
implements
Serializable
{
/**
* 下拉选框编号
*/
private
Long
id
;
/**
* 下拉选框场景编码
*/
private
String
scenarioCode
;
/**
* 下拉选框场景名称:产品维护中文件上传哪里的文件类型
*/
private
String
scenarioName
;
/**
* 下拉选框代码
*/
private
String
dropCode
;
/**
* 下拉选框名称
*/
private
String
dropName
;
/**
* 下拉选框说明
*/
private
String
dropCodeDesc
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
private
Date
createdAt
;
private
Long
createdBy
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/meta/MdDropOptions.java
View file @
5b258526
...
...
@@ -3,9 +3,6 @@ package com.yd.dal.entity.meta;
import
java.util.Date
;
import
lombok.Data
;
/**
* 下拉选框选项资料
*/
@Data
public
class
MdDropOptions
{
/**
...
...
@@ -46,9 +43,12 @@ public class MdDropOptions {
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
private
Date
createdAt
;
private
Long
createdBy
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerMapper.java
View file @
5b258526
...
...
@@ -37,4 +37,6 @@ public interface AclPractitionerMapper {
AclPractitioner
findByCustomerIdIsActive
(
@Param
(
"customerId"
)
Long
customerId
,
@Param
(
"isActive"
)
int
isActive
);
List
<
OwnOpportunityInfo
>
ownOpportunityQuery
(
@Param
(
"practitionerId"
)
Long
practitionerId
);
List
<
AclPractitioner
>
findByIds
(
@Param
(
"practitionerIdList"
)
List
<
Long
>
practitionerIdList
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.java
View file @
5b258526
...
...
@@ -2,6 +2,8 @@ package com.yd.dal.mapper.customer;
import
com.yd.dal.entity.customer.AclPractitionerPotentialAssignedTrack
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
public
interface
AclPractitionerPotentialAssignedTrackMapper
{
...
...
@@ -18,4 +20,12 @@ public interface AclPractitionerPotentialAssignedTrackMapper {
int
updateByPrimaryKey
(
AclPractitionerPotentialAssignedTrack
record
);
void
insertList
(
@Param
(
"potentialAssignedTrackList"
)
List
<
AclPractitionerPotentialAssignedTrack
>
potentialAssignedTrackList
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"potentialId"
)
Long
potentialId
,
@Param
(
"trackStatusId"
)
Long
trackStatusId
,
@Param
(
"trackDate"
)
Date
trackDate
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPotentialIdAndIsLasted
(
@Param
(
"potentialId"
)
Long
potentialId
,
@Param
(
"isLasted"
)
int
isLasted
);
void
updateAll
(
@Param
(
"assignedTrackUpdateList"
)
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackUpdateList
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialId
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"potentialId"
)
Long
potentialId
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialAssignedsMapper.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
mapper
.
customer
;
import
com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
AclPractitionerPotentialAssignedsMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
AclPractitionerPotentialAssigneds
record
);
int
insertSelective
(
AclPractitionerPotentialAssigneds
record
);
AclPractitionerPotentialAssigneds
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
AclPractitionerPotentialAssigneds
record
);
int
updateByPrimaryKey
(
AclPractitionerPotentialAssigneds
record
);
void
insertList
(
@Param
(
"potentialAssignedsList"
)
List
<
AclPractitionerPotentialAssigneds
>
potentialAssignedsList
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialMapper.java
View file @
5b258526
package
com
.
yd
.
dal
.
mapper
.
customer
;
import
com.yd.api.practitioner.vo.recruit.PractitionerPotentialInfo
;
import
com.yd.dal.entity.customer.AclPractitionerPotential
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -19,4 +20,6 @@ public interface AclPractitionerPotentialMapper {
int
updateByPrimaryKey
(
AclPractitionerPotential
record
);
List
<
AclPractitionerPotential
>
findByMobileNo
(
@Param
(
"mobileNo"
)
String
mobileNo
,
@Param
(
"isActive"
)
Integer
isActive
);
List
<
PractitionerPotentialInfo
>
findByPractitionerIdAndLasted
(
@Param
(
"practitionerId"
)
Long
practitionerId
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclUserMapper.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
mapper
.
customer
;
import
com.yd.dal.entity.customer.AclUser
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
AclUserMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
AclUser
record
);
int
insertSelective
(
AclUser
record
);
AclUser
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
AclUser
record
);
int
updateByPrimaryKey
(
AclUser
record
);
List
<
AclUser
>
findByIds
(
@Param
(
"userIdList"
)
List
<
Long
>
userIdList
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/meta/MdDropMasterMapper.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
mapper
.
meta
;
import
com.yd.dal.entity.meta.MdDropMaster
;
public
interface
MdDropMasterMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
MdDropMaster
record
);
int
insertSelective
(
MdDropMaster
record
);
MdDropMaster
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
MdDropMaster
record
);
int
updateByPrimaryKey
(
MdDropMaster
record
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/meta/MdDropOptionsMapper.java
View file @
5b258526
package
com
.
yd
.
dal
.
mapper
.
meta
;
import
com.yd.dal.entity.meta.MdDropOptions
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
MdDropOptionsMapper
{
...
...
@@ -20,4 +20,8 @@ public interface MdDropOptionsMapper {
List
<
MdDropOptions
>
selectByObj
(
MdDropOptions
info
);
List
<
MdDropOptions
>
findByDropMasterCode
(
String
dropMasterCode
);
List
<
MdDropOptions
>
findByMasterCode
(
@Param
(
"masterCode"
)
String
masterCode
);
List
<
MdDropOptions
>
findByMasterCodeAndOrderId
(
@Param
(
"masterCode"
)
String
masterCode
,
@Param
(
"orderId"
)
int
orderId
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerDALService.java
View file @
5b258526
...
...
@@ -75,4 +75,11 @@ public interface AclPractitionerDALService {
*/
List
<
OwnOpportunityInfo
>
ownOpportunityQuery
(
Long
practitionerId
);
void
updatePractitioner
(
AclPractitioner
practitioner
);
/**
* 通过id数组查询
* @param practitionerIdList
* @return
*/
List
<
AclPractitioner
>
findByIds
(
List
<
Long
>
practitionerIdList
);
}
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialAssignedTrackDALService.java
View file @
5b258526
...
...
@@ -3,10 +3,21 @@ package com.yd.dal.service.customer;
import
com.yd.dal.entity.customer.AclPractitionerPotentialAssignedTrack
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
@Service
(
"aclPractitionerPotentialAssignedTrackDALService"
)
public
interface
AclPractitionerPotentialAssignedTrackDALService
{
void
saveAll
(
List
<
AclPractitionerPotentialAssignedTrack
>
potentialAssignedTrackList
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
Long
practitionerId
,
Long
potentialId
,
Long
trackStatusId
,
Date
trackDate
);
void
save
(
AclPractitionerPotentialAssignedTrack
assignedTrack
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPotentialIdAndIsLasted
(
Long
potentialId
,
int
isLasted
);
void
updateAll
(
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackUpdateList
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialId
(
Long
practitionerId
,
Long
potentialId
);
}
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialAssignedsDALService.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
service
.
customer
;
import
com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"aclPractitionerPotentialAssignedsDALService"
)
public
interface
AclPractitionerPotentialAssignedsDALService
{
void
saveAll
(
List
<
AclPractitionerPotentialAssigneds
>
potentialAssignedsList
);
}
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialDALService.java
View file @
5b258526
package
com
.
yd
.
dal
.
service
.
customer
;
import
com.yd.api.practitioner.vo.recruit.PractitionerPotentialInfo
;
import
com.yd.dal.entity.customer.AclPractitionerPotential
;
import
org.springframework.stereotype.Service
;
...
...
@@ -15,6 +16,20 @@ public interface AclPractitionerPotentialDALService {
List
<
AclPractitionerPotential
>
findByMobileNo
(
String
mobileNo
,
Integer
isActive
);
/**
* 更新
* @param practitionerPotential
* @return
*/
int
update
(
AclPractitionerPotential
practitionerPotential
);
/**
* 查询该团队长对于每个增员最新的记录
* @param practitionerId
* @return
*/
List
<
PractitionerPotentialInfo
>
findByPractitionerIdAndLasted
(
Long
practitionerId
);
/**
* 保存
* @param practitionerPotential
* @return
...
...
yd-api/src/main/java/com/yd/dal/service/customer/AclUserDALService.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
service
.
customer
;
import
com.yd.dal.entity.customer.AclUser
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"aclUserDALService"
)
public
interface
AclUserDALService
{
List
<
AclUser
>
findByIds
(
List
<
Long
>
userIdList
);
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerDALServiceImpl.java
View file @
5b258526
...
...
@@ -84,4 +84,8 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
public
List
<
OwnOpportunityInfo
>
ownOpportunityQuery
(
Long
practitionerId
)
{
return
aclPractitionerMapper
.
ownOpportunityQuery
(
practitionerId
);
}
@Override
public
List
<
AclPractitioner
>
findByIds
(
List
<
Long
>
practitionerIdList
)
{
return
aclPractitionerMapper
.
findByIds
(
practitionerIdList
);
}
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialAssignedTrackDALServiceImpl.java
View file @
5b258526
...
...
@@ -6,6 +6,7 @@ import com.yd.dal.service.customer.AclPractitionerPotentialAssignedTrackDALServi
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
@Service
(
"aclPractitionerPotentialAssignedTrackDALService"
)
...
...
@@ -17,4 +18,31 @@ public class AclPractitionerPotentialAssignedTrackDALServiceImpl implements AclP
public
void
saveAll
(
List
<
AclPractitionerPotentialAssignedTrack
>
potentialAssignedTrackList
)
{
aclPractitionerPotentialAssignedTrackMapper
.
insertList
(
potentialAssignedTrackList
);
}
@Override
public
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
Long
practitionerId
,
Long
potentialId
,
Long
trackStatusId
,
Date
trackDate
)
{
return
aclPractitionerPotentialAssignedTrackMapper
.
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
practitionerId
,
potentialId
,
trackStatusId
,
trackDate
);
}
@Override
public
void
save
(
AclPractitionerPotentialAssignedTrack
assignedTrack
)
{
aclPractitionerPotentialAssignedTrackMapper
.
insertSelective
(
assignedTrack
);
}
@Override
public
List
<
AclPractitionerPotentialAssignedTrack
>
findByPotentialIdAndIsLasted
(
Long
potentialId
,
int
isLasted
)
{
return
aclPractitionerPotentialAssignedTrackMapper
.
findByPotentialIdAndIsLasted
(
potentialId
,
isLasted
);
}
@Override
public
void
updateAll
(
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackUpdateList
)
{
for
(
AclPractitionerPotentialAssignedTrack
item
:
assignedTrackUpdateList
){
aclPractitionerPotentialAssignedTrackMapper
.
updateByPrimaryKeySelective
(
item
);
}
}
@Override
public
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialId
(
Long
practitionerId
,
Long
potentialId
)
{
return
aclPractitionerPotentialAssignedTrackMapper
.
findByPractitionerIdAndPotentialId
(
practitionerId
,
potentialId
);
}
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialAssignedsDALServiceImpl.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
service
.
customer
.
impl
;
import
com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds
;
import
com.yd.dal.mapper.customer.AclPractitionerPotentialAssignedsMapper
;
import
com.yd.dal.service.customer.AclPractitionerPotentialAssignedsDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
(
"aclPractitionerPotentialAssignedsDALService"
)
public
class
AclPractitionerPotentialAssignedsDALServiceImpl
implements
AclPractitionerPotentialAssignedsDALService
{
@Resource
private
AclPractitionerPotentialAssignedsMapper
aclPractitionerPotentialAssignedsMapper
;
@Override
public
void
saveAll
(
List
<
AclPractitionerPotentialAssigneds
>
potentialAssignedsList
)
{
aclPractitionerPotentialAssignedsMapper
.
insertList
(
potentialAssignedsList
);
}
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialDALServiceImpl.java
View file @
5b258526
package
com
.
yd
.
dal
.
service
.
customer
.
impl
;
import
com.yd.api.practitioner.vo.recruit.PractitionerPotentialInfo
;
import
com.yd.dal.entity.customer.AclPractitionerPotential
;
import
com.yd.dal.mapper.customer.AclPractitionerPotentialMapper
;
import
com.yd.dal.service.customer.AclPractitionerPotentialDALService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
(
"aclPractitionerPotentialDALService"
)
public
class
AclPractitionerPotentialDALServiceImpl
implements
AclPractitionerPotentialDALService
{
...
...
@@ -18,6 +21,34 @@ public class AclPractitionerPotentialDALServiceImpl implements AclPractitionerPo
}
@Override
public
int
update
(
AclPractitionerPotential
practitionerPotential
)
{
return
aclPractitionerPotentialMapper
.
updateByPrimaryKeySelective
(
practitionerPotential
);
}
@Override
public
List
<
PractitionerPotentialInfo
>
findByPractitionerIdAndLasted
(
Long
practitionerId
)
{
List
<
PractitionerPotentialInfo
>
temp
=
aclPractitionerPotentialMapper
.
findByPractitionerIdAndLasted
(
practitionerId
);
Map
<
Long
,
PractitionerPotentialInfo
>
potentialInfoMap
=
new
HashMap
<>();
Long
potentialId
;
Long
trackId
,
trackMaxId
;
for
(
PractitionerPotentialInfo
item
:
temp
){
potentialId
=
item
.
getPotentialId
();
trackId
=
item
.
getTrackId
();
if
(
potentialInfoMap
.
containsKey
(
potentialId
)){
trackMaxId
=
potentialInfoMap
.
get
(
potentialId
).
getTrackId
();
if
(
trackMaxId
<
trackId
){
potentialInfoMap
.
put
(
potentialId
,
item
);
}
}
else
{
potentialInfoMap
.
put
(
potentialId
,
item
);
}
}
List
<
PractitionerPotentialInfo
>
result
=
new
ArrayList
<>(
potentialInfoMap
.
values
());
result
.
sort
((
o1
,
o2
)
->
o2
.
getPotentialId
().
compareTo
(
o1
.
getPotentialId
()));
return
result
;
}
@Override
public
int
save
(
AclPractitionerPotential
practitionerPotential
)
{
return
aclPractitionerPotentialMapper
.
insert
(
practitionerPotential
);
}
...
...
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclUserDALServiceImpl.java
0 → 100644
View file @
5b258526
package
com
.
yd
.
dal
.
service
.
customer
.
impl
;
import
com.yd.dal.entity.customer.AclUser
;
import
com.yd.dal.mapper.customer.AclUserMapper
;
import
com.yd.dal.service.customer.AclUserDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
(
"aclUserDALService"
)
public
class
AclUserDALServiceImpl
implements
AclUserDALService
{
@Resource
private
AclUserMapper
aclUserMapper
;
@Override
public
List
<
AclUser
>
findByIds
(
List
<
Long
>
userIdList
)
{
return
aclUserMapper
.
findByIds
(
userIdList
);
}
}
yd-api/src/main/java/com/yd/dal/service/meta/MdDropOptionsDALService.java
View file @
5b258526
package
com
.
yd
.
dal
.
service
.
meta
;
import
org.springframework.stereotype.Service
;
import
com.yd.dal.entity.meta.MdDropOptions
;
import
java.util.List
;
@Service
(
"mdDropOptionsDALService"
)
public
interface
MdDropOptionsDALService
{
List
<
MdDropOptions
>
findByDropMasterId
(
long
dropMasterId
);
MdDropOptions
findByDropOptionId
(
Long
dropOptionId
);
List
<
MdDropOptions
>
findByDropMasterCode
(
String
dropMasterCode
);
MdDropOptions
findById
(
Long
trackStatusId
);
List
<
MdDropOptions
>
findByMasterCode
(
String
masterCode
);
List
<
MdDropOptions
>
findByMasterCodeAndOrderId
(
String
masterCode
,
int
orderId
);
}
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdDropOptionsDALServiceImpl.java
View file @
5b258526
...
...
@@ -4,7 +4,6 @@ import com.yd.dal.entity.meta.MdDropOptions;
import
com.yd.dal.mapper.meta.MdDropOptionsMapper
;
import
com.yd.dal.service.meta.MdDropOptionsDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
...
...
@@ -30,4 +29,18 @@ public class MdDropOptionsDALServiceImpl implements MdDropOptionsDALService {
public
List
<
MdDropOptions
>
findByDropMasterCode
(
String
dropMasterCode
)
{
return
mdDropOptionsMapper
.
findByDropMasterCode
(
dropMasterCode
);
}
@Override
public
MdDropOptions
findById
(
Long
trackStatusId
)
{
return
mdDropOptionsMapper
.
selectByPrimaryKey
(
trackStatusId
);
}
@Override
public
List
<
MdDropOptions
>
findByMasterCode
(
String
masterCode
)
{
return
mdDropOptionsMapper
.
findByMasterCode
(
masterCode
);
}
@Override
public
List
<
MdDropOptions
>
findByMasterCodeAndOrderId
(
String
masterCode
,
int
orderId
)
{
return
mdDropOptionsMapper
.
findByMasterCodeAndOrderId
(
masterCode
,
orderId
);
}
}
yd-api/src/main/resources/i18n/messages_zh_CN.properties
View file @
5b258526
...
...
@@ -11,6 +11,7 @@
800000
=
执行成功!
##系统提示信息
810001
=
token无效或者错误!
820001
=
为查询到相应结果。
830001
=
该用户非寿险经纪人。
830002
=
只有寿险经纪人才有权限进入!
...
...
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
View file @
5b258526
...
...
@@ -705,4 +705,13 @@
and a.assigned_practitioner_id = #{practitionerId}
</if>
</select>
<select
id=
"findByIds"
resultType=
"com.yd.dal.entity.customer.AclPractitioner"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_practitioner
where id in
<foreach
collection=
"practitionerIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.xml
View file @
5b258526
...
...
@@ -12,13 +12,15 @@
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
<result
column=
"updat
or_type"
jdbcType=
"INTEGER"
property=
"updato
rType"
/>
<result
column=
"updat
er_type"
jdbcType=
"INTEGER"
property=
"update
rType"
/>
<result
column=
"creator_type"
jdbcType=
"INTEGER"
property=
"creatorType"
/>
<result
column=
"is_lasted"
jdbcType=
"INTEGER"
property=
"isLasted"
/>
<result
column=
"track_score"
jdbcType=
"INTEGER"
property=
"trackScore"
/>
<result
column=
"track_time"
jdbcType=
"TIMESTAMP"
property=
"trackTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, practitioner_potential_id, practitioner_assigned_id, track_status_id,
notice,
is_active, created_at, created_by, updated_at, updated_by, creator_type, updat
or_type,is_lasted
id, practitioner_potential_id, practitioner_assigned_id, track_status_id,
track_score,notice,
is_active, created_at, created_by, updated_at, updated_by, creator_type, updat
er_type,is_lasted,track_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -26,19 +28,47 @@
from ag_acl_practitioner_potential_assigned_track
where id = #{id,jdbcType=BIGINT}
</select>
<select
id=
"findByPractitionerIdAndPotentialIdAndTrackStatusId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_practitioner_potential_assigned_track
where practitioner_assigned_id = #{practitionerId,jdbcType=BIGINT}
AND practitioner_potential_id = #{potentialId,jdbcType=BIGINT}
AND track_status_id = #{trackStatusId,jdbcType=BIGINT}
AND to_days(track_time) = to_days(#{trackDate,jdbcType=TIMESTAMP})
</select>
<select
id=
"findByPotentialIdAndIsLasted"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_practitioner_potential_assigned_track
where practitioner_potential_id = #{potentialId,jdbcType=BIGINT}
AND is_lasted = #{isLasted,jdbcType=INTEGER}
</select>
<select
id=
"findByPractitionerIdAndPotentialId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_practitioner_potential_assigned_track
where practitioner_assigned_id = #{practitionerId,jdbcType=BIGINT}
AND practitioner_potential_id = #{potentialId,jdbcType=BIGINT}
order by track_time desc
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from ag_acl_practitioner_potential_assigned_track
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssignedTrack"
useGeneratedKeys=
"true"
>
insert into ag_acl_practitioner_potential_assigned_track (practitioner_potential_id, practitioner_assigned_id,
track_status_id, notice, is_active,
track_status_id, track_score,notice, is_active,
created_at, created_by, updated_at,
updated_by, updator_type,creator_type,is_lasted
)
updated_by, updater_type,creator_type,is_lasted,track_time
)
values (#{practitionerPotentialId,jdbcType=BIGINT}, #{practitionerAssignedId,jdbcType=BIGINT},
#{trackStatusId,jdbcType=BIGINT}, #{notice,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{trackStatusId,jdbcType=BIGINT},#{trackScore,jdbcType=INTEGER}, #{notice,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT},#{updatorType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER},#{isLasted,jdbcType=INTEGER
})
#{updatedBy,jdbcType=BIGINT},#{updaterType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER},#{isLasted,jdbcType=INTEGER},#{trackTime,jdbcType=TIMESTAMP
})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssignedTrack"
useGeneratedKeys=
"true"
>
insert into ag_acl_practitioner_potential_assigned_track
...
...
@@ -52,6 +82,9 @@
<if
test=
"trackStatusId != null"
>
track_status_id,
</if>
<if
test=
"trackScore != null"
>
track_score,
</if>
<if
test=
"notice != null"
>
notice,
</if>
...
...
@@ -70,6 +103,18 @@
<if
test=
"updatedBy != null"
>
updated_by,
</if>
<if
test=
"creatorType != null"
>
creator_type,
</if>
<if
test=
"updaterType != null"
>
updater_type,
</if>
<if
test=
"isLasted != null"
>
is_lasted,
</if>
<if
test=
"trackTime != null"
>
track_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"practitionerPotentialId != null"
>
...
...
@@ -81,6 +126,9 @@
<if
test=
"trackStatusId != null"
>
#{trackStatusId,jdbcType=BIGINT},
</if>
<if
test=
"trackScore != null"
>
#{trackScore,jdbcType=INTEGER},
</if>
<if
test=
"notice != null"
>
#{notice,jdbcType=VARCHAR},
</if>
...
...
@@ -99,28 +147,42 @@
<if
test=
"updatedBy != null"
>
#{updatedBy,jdbcType=BIGINT},
</if>
<if
test=
"creatorType != null"
>
#{creatorType,jdbcType=INTEGER},
</if>
<if
test=
"updaterType != null"
>
#{updaterType,jdbcType=INTEGER},
</if>
<if
test=
"isLasted != null"
>
#{isLasted,jdbcType=INTEGER},
</if>
<if
test=
"trackTime != null"
>
#{trackTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<insert
id=
"insertList"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
>
insert into ag_acl_practitioner_potential_assigned_track(practitioner_potential_id, practitioner_assigned_id,
track_status_id, notice, is_active,
track_status_id,
track_score,
notice, is_active,
created_at, created_by, updated_at,
updated_by, updat
or_type,creator_type,is_lasted
)
updated_by, updat
er_type,creator_type,is_lasted,track_time
)
values
<foreach
collection=
"potentialAssignedTrackList"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.practitionerPotentialId},
#{item.practitionerAssignedId},
#{item.trackStatusId},
#{item.trackScore},
#{item.notice},
#{item.isActive},
#{item.createdAt},
#{item.createdBy},
#{item.updatedAt},
#{item.updatedBy},
#{item.updato
rType},
#{item.update
rType},
#{item.creatorType},
#{item.isLasted}
#{item.isLasted},
#{item.trackTime}
)
</foreach>
</insert>
...
...
@@ -136,6 +198,9 @@
<if
test=
"trackStatusId != null"
>
track_status_id = #{trackStatusId,jdbcType=BIGINT},
</if>
<if
test=
"trackScore != null"
>
track_score = #{trackScore,jdbcType=INTEGER},
</if>
<if
test=
"notice != null"
>
notice = #{notice,jdbcType=VARCHAR},
</if>
...
...
@@ -154,6 +219,18 @@
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if
test=
"updaterType != null"
>
updater_type = #{updaterType,jdbcType=TIMESTAMP},
</if>
<if
test=
"creatorType != null"
>
creator_type = #{creatorType,jdbcType=BIGINT},
</if>
<if
test=
"isLasted != null"
>
is_lasted = #{isLasted,jdbcType=BIGINT},
</if>
<if
test=
"trackTime != null"
>
track_time = #{trackTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -167,7 +244,61 @@
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
updated_by = #{updatedBy,jdbcType=BIGINT},
updater_type = #{updaterType,jdbcType=INTEGER},
creator_type = #{creatorType,jdbcType=INTEGER},
is_lasted = #{isLasted,jdbcType=INTEGER},
track_time = #{trackTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateAll"
parameterType=
"java.util.List"
>
<foreach
collection=
"assignedTrackUpdateList"
item =
"item"
index=
"index"
separator=
";"
>
update ag_acl_practitioner_potential_assigned_track
<set>
<if
test=
"item.practitionerPotentialId != null"
>
practitioner_potential_id = #{item.practitionerPotentialId,jdbcType=BIGINT},
</if>
<if
test=
"item.practitionerAssignedId != null"
>
practitioner_assigned_id = #{item.practitionerAssignedId,jdbcType=BIGINT},
</if>
<if
test=
"item.trackStatusId != null"
>
track_status_id = #{item.trackStatusId,jdbcType=BIGINT},
</if>
<if
test=
"item.trackScore != null"
>
track_score = #{item.trackScore,jdbcType=INTEGER},
</if>
<if
test=
"item.notice != null"
>
notice = #{item.notice,jdbcType=VARCHAR},
</if>
<if
test=
"item.isActive != null"
>
is_active = #{item.isActive,jdbcType=INTEGER},
</if>
<if
test=
"item.createdAt != null"
>
created_at = #{item.createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"item.createdBy != null"
>
created_by = #{item.createdBy,jdbcType=BIGINT},
</if>
<if
test=
"item.updatedAt != null"
>
updated_at = #{item.updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"item.updatedBy != null"
>
updated_by = #{item.updatedBy,jdbcType=BIGINT},
</if>
<if
test=
"item.creatorType != null"
>
creator_type = #{item.creatorType,jdbcType=INTEGER},
</if>
<if
test=
"item.updaterType != null"
>
updater_type = #{item.updaterType,jdbcType=INTEGER},
</if>
<if
test=
"item.isLasted != null"
>
is_lasted = #{item.isLasted,jdbcType=INTEGER},
</if>
<if
test=
"item.trackTime != null"
>
track_time = #{item.trackTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{item.id,jdbcType=BIGINT}
</foreach>
</update>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialAssignedsMapper.xml
0 → 100644
View file @
5b258526
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.dal.mapper.customer.AclPractitionerPotentialAssignedsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"assigned_practitioner_id"
jdbcType=
"BIGINT"
property=
"assignedPractitionerId"
/>
<result
column=
"practitioner_potential_id"
jdbcType=
"BIGINT"
property=
"practitionerPotentialId"
/>
<result
column=
"time_to_onboarding"
jdbcType=
"TIMESTAMP"
property=
"timeToOnboarding"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
<result
column=
"updater_type"
jdbcType=
"INTEGER"
property=
"updaterType"
/>
<result
column=
"creator_type"
jdbcType=
"INTEGER"
property=
"creatorType"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, assigned_practitioner_id, practitioner_potential_id, time_to_onboarding, is_active,
created_at, created_by, updated_at, updated_by, updater_type, creator_type
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_practitioner_potential_assigneds
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from ag_acl_practitioner_potential_assigneds
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds"
useGeneratedKeys=
"true"
>
insert into ag_acl_practitioner_potential_assigneds (assigned_practitioner_id, practitioner_potential_id,
time_to_onboarding, is_active, created_at,
created_by, updated_at, updated_by,
updater_type, creator_type)
values (#{assignedPractitionerId,jdbcType=BIGINT}, #{practitionerPotentialId,jdbcType=BIGINT},
#{timeToOnboarding,jdbcType=TIMESTAMP}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT},
#{updaterType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds"
useGeneratedKeys=
"true"
>
insert into ag_acl_practitioner_potential_assigneds
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"assignedPractitionerId != null"
>
assigned_practitioner_id,
</if>
<if
test=
"practitionerPotentialId != null"
>
practitioner_potential_id,
</if>
<if
test=
"timeToOnboarding != null"
>
time_to_onboarding,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
<if
test=
"updatedAt != null"
>
updated_at,
</if>
<if
test=
"updatedBy != null"
>
updated_by,
</if>
<if
test=
"updaterType != null"
>
updater_type,
</if>
<if
test=
"creatorType != null"
>
creator_type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"assignedPractitionerId != null"
>
#{assignedPractitionerId,jdbcType=BIGINT},
</if>
<if
test=
"practitionerPotentialId != null"
>
#{practitionerPotentialId,jdbcType=BIGINT},
</if>
<if
test=
"timeToOnboarding != null"
>
#{timeToOnboarding,jdbcType=TIMESTAMP},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
#{updatedBy,jdbcType=BIGINT},
</if>
<if
test=
"updaterType != null"
>
#{updaterType,jdbcType=INTEGER},
</if>
<if
test=
"creatorType != null"
>
#{creatorType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds"
>
update ag_acl_practitioner_potential_assigneds
<set>
<if
test=
"assignedPractitionerId != null"
>
assigned_practitioner_id = #{assignedPractitionerId,jdbcType=BIGINT},
</if>
<if
test=
"practitionerPotentialId != null"
>
practitioner_potential_id = #{practitionerPotentialId,jdbcType=BIGINT},
</if>
<if
test=
"timeToOnboarding != null"
>
time_to_onboarding = #{timeToOnboarding,jdbcType=TIMESTAMP},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if
test=
"updaterType != null"
>
updater_type = #{updaterType,jdbcType=INTEGER},
</if>
<if
test=
"creatorType != null"
>
creator_type = #{creatorType,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds"
>
update ag_acl_practitioner_potential_assigneds
set assigned_practitioner_id = #{assignedPractitionerId,jdbcType=BIGINT},
practitioner_potential_id = #{practitionerPotentialId,jdbcType=BIGINT},
time_to_onboarding = #{timeToOnboarding,jdbcType=TIMESTAMP},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT},
updater_type = #{updaterType,jdbcType=INTEGER},
creator_type = #{creatorType,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<insert
id=
"insertList"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
>
insert into ag_acl_practitioner_potential_assigneds (assigned_practitioner_id, practitioner_potential_id,
time_to_onboarding, is_active, created_at,
created_by, updated_at, updated_by,
updater_type, creator_type)
values
<foreach
collection=
"potentialAssignedsList"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.assignedPractitionerId},
#{item.practitionerPotentialId},
#{item.timeToOnboarding},
#{item.isActive},
#{item.createdAt},
#{item.createdBy},
#{item.updatedAt},
#{item.updatedBy},
#{item.updaterType},
#{item.creatorType}
)
</foreach>
</insert>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialMapper.xml
View file @
5b258526
...
...
@@ -24,12 +24,12 @@
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
<result
column=
"creator_type"
jdbcType=
"BIGINT"
property=
"creatorType"
/>
<result
column=
"updat
or_type"
jdbcType=
"BIGINT"
property=
"updato
rType"
/>
<result
column=
"updat
er_type"
jdbcType=
"BIGINT"
property=
"update
rType"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, customer_id,`name`, age, gender, mobile_no, wechat_id, qq_id, others_contacts, education_level,
introducer, tag, remark, resource_drop_master_id, oss_path_resume, practitioner_assigned_ids,
is_active, created_at, created_by, updated_at, updated_by,creator_type,updat
o
r_type
is_active, created_at, created_by, updated_at, updated_by,creator_type,updat
e
r_type
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -48,14 +48,14 @@
tag, remark, resource_drop_master_id,
oss_path_resume, practitioner_assigned_ids, is_active,
created_at, created_by, updated_at,
updated_by)
updated_by
,updater_type,creator_type
)
values (#{name,jdbcType=VARCHAR},#{customerId,jdbcType=BIGINT}, #{age,jdbcType=BIGINT}, #{gender,jdbcType=INTEGER},
#{mobileNo,jdbcType=VARCHAR}, #{wechatId,jdbcType=VARCHAR}, #{qqId,jdbcType=VARCHAR},
#{othersContacts,jdbcType=VARCHAR}, #{educationLevel,jdbcType=VARCHAR}, #{introducer,jdbcType=VARCHAR},
#{tag,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{resourceDropMasterId,jdbcType=BIGINT},
#{ossPathResume,jdbcType=VARCHAR}, #{practitionerAssignedIds,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT})
#{updatedBy,jdbcType=BIGINT}
,#{updaterType,jdbcType=INTEGER},#{creatorType,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotential"
useGeneratedKeys=
"true"
>
insert into ag_acl_practitioner_potential
...
...
@@ -117,6 +117,12 @@
<if
test=
"updatedBy != null"
>
updated_by,
</if>
<if
test=
"creatorType != null"
>
creator_type,
</if>
<if
test=
"updaterType != null"
>
updater_type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
...
...
@@ -176,6 +182,12 @@
<if
test=
"updatedBy != null"
>
#{updatedBy,jdbcType=BIGINT},
</if>
<if
test=
"creatorType != null"
>
#{creatorType,jdbcType=INTEGER},
</if>
<if
test=
"updaterType != null"
>
#{updaterType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotential"
>
...
...
@@ -220,7 +232,7 @@
<if
test=
"ossPathResume != null"
>
oss_path_resume = #{ossPathResume,jdbcType=VARCHAR},
</if>
<if
test=
"practitionerAssignedId != null"
>
<if
test=
"practitionerAssignedId
s
!= null"
>
practitioner_assigned_ids = #{practitionerAssignedIds,jdbcType=BIGINT},
</if>
<if
test=
"isActive != null"
>
...
...
@@ -238,6 +250,12 @@
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
<if
test=
"creatorType != null"
>
creator_type = #{creatorType,jdbcType=INTEGER},
</if>
<if
test=
"updaterType != null"
>
updater_type = #{updaterType,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -261,7 +279,9 @@
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
updated_by = #{updatedBy,jdbcType=BIGINT},
creator_type = #{creatorType,jdbcType=INTEGER},
updater_type = #{updaterType,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"findByMobileNo"
resultMap=
"BaseResultMap"
>
...
...
@@ -271,4 +291,31 @@
where mobile_no = #{mobileNo,jdbcType=VARCHAR}
and is_active = #{isActive,jdbcType=INTEGER}
</select>
<select
id=
"findByPractitionerIdAndLasted"
resultType=
"com.yd.api.practitioner.vo.recruit.PractitionerPotentialInfo"
>
SELECT
p.id potentialId,
p.`name` NAME,
p.gender gender,
p.age age,
p.mobile_no mobileNo,
p.wechat_id wechatId,
p.qq_id qqId,
p.others_contacts othersContacts,
p.education_level educationLevel,
p.resource_drop_master_id resourceDropMasterId,
p.introducer introducer,
p.tag tag,
p.remark remark,
p.oss_path_resume ossPathResume,
t.track_status_id trackStatusId,
t.id trackId,
date_format(p.created_at,'%Y-%m-%d') createdAt
FROM
ag_acl_practitioner_potential p
INNER JOIN ag_acl_practitioner_potential_assigned_track t ON p.id = t.practitioner_potential_id
WHERE
t.practitioner_assigned_id = #{practitionerId,jdbcType=BIGINT}
order by p.id desc;
</select>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclUserMapper.xml
0 → 100644
View file @
5b258526
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.dal.mapper.customer.AclUserMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.customer.AclUser"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"user_role"
jdbcType=
"INTEGER"
property=
"userRole"
/>
<result
column=
"employee_no"
jdbcType=
"VARCHAR"
property=
"employeeNo"
/>
<result
column=
"company"
jdbcType=
"INTEGER"
property=
"company"
/>
<result
column=
"dept_id"
jdbcType=
"BIGINT"
property=
"deptId"
/>
<result
column=
"role_id"
jdbcType=
"BIGINT"
property=
"roleId"
/>
<result
column=
"login"
jdbcType=
"VARCHAR"
property=
"login"
/>
<result
column=
"password"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"nickname"
jdbcType=
"VARCHAR"
property=
"nickname"
/>
<result
column=
"mobile_no"
jdbcType=
"VARCHAR"
property=
"mobileNo"
/>
<result
column=
"id_no"
jdbcType=
"VARCHAR"
property=
"idNo"
/>
<result
column=
"last_login_time"
jdbcType=
"TIMESTAMP"
property=
"lastLoginTime"
/>
<result
column=
"logout_time"
jdbcType=
"TIMESTAMP"
property=
"logoutTime"
/>
<result
column=
"login_source"
jdbcType=
"INTEGER"
property=
"loginSource"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"email"
jdbcType=
"VARCHAR"
property=
"email"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, user_role, employee_no, company, dept_id, role_id, `login`, `password`, `name`,
nickname, mobile_no, id_no, last_login_time, logout_time, login_source, is_active,
email, created_at, created_by, updated_at, updated_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_user
where id = #{id,jdbcType=BIGINT}
</select>
<select
id=
"findByIds"
resultType=
"com.yd.dal.entity.customer.AclUser"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_user
where id in
<foreach
collection=
"userIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from ag_acl_user
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclUser"
useGeneratedKeys=
"true"
>
insert into ag_acl_user (user_role, employee_no, company,
dept_id, role_id, `login`,
`password`, `name`, nickname,
mobile_no, id_no, last_login_time,
logout_time, login_source, is_active,
email, created_at, created_by,
updated_at, updated_by)
values (#{userRole,jdbcType=INTEGER}, #{employeeNo,jdbcType=VARCHAR}, #{company,jdbcType=INTEGER},
#{deptId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, #{login,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR},
#{mobileNo,jdbcType=VARCHAR}, #{idNo,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=TIMESTAMP},
#{logoutTime,jdbcType=TIMESTAMP}, #{loginSource,jdbcType=INTEGER}, #{isActive,jdbcType=INTEGER},
#{email,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclUser"
useGeneratedKeys=
"true"
>
insert into ag_acl_user
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userRole != null"
>
user_role,
</if>
<if
test=
"employeeNo != null"
>
employee_no,
</if>
<if
test=
"company != null"
>
company,
</if>
<if
test=
"deptId != null"
>
dept_id,
</if>
<if
test=
"roleId != null"
>
role_id,
</if>
<if
test=
"login != null"
>
`login`,
</if>
<if
test=
"password != null"
>
`password`,
</if>
<if
test=
"name != null"
>
`name`,
</if>
<if
test=
"nickname != null"
>
nickname,
</if>
<if
test=
"mobileNo != null"
>
mobile_no,
</if>
<if
test=
"idNo != null"
>
id_no,
</if>
<if
test=
"lastLoginTime != null"
>
last_login_time,
</if>
<if
test=
"logoutTime != null"
>
logout_time,
</if>
<if
test=
"loginSource != null"
>
login_source,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
<if
test=
"email != null"
>
email,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
<if
test=
"updatedAt != null"
>
updated_at,
</if>
<if
test=
"updatedBy != null"
>
updated_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userRole != null"
>
#{userRole,jdbcType=INTEGER},
</if>
<if
test=
"employeeNo != null"
>
#{employeeNo,jdbcType=VARCHAR},
</if>
<if
test=
"company != null"
>
#{company,jdbcType=INTEGER},
</if>
<if
test=
"deptId != null"
>
#{deptId,jdbcType=BIGINT},
</if>
<if
test=
"roleId != null"
>
#{roleId,jdbcType=BIGINT},
</if>
<if
test=
"login != null"
>
#{login,jdbcType=VARCHAR},
</if>
<if
test=
"password != null"
>
#{password,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"nickname != null"
>
#{nickname,jdbcType=VARCHAR},
</if>
<if
test=
"mobileNo != null"
>
#{mobileNo,jdbcType=VARCHAR},
</if>
<if
test=
"idNo != null"
>
#{idNo,jdbcType=VARCHAR},
</if>
<if
test=
"lastLoginTime != null"
>
#{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"logoutTime != null"
>
#{logoutTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"loginSource != null"
>
#{loginSource,jdbcType=INTEGER},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
<if
test=
"email != null"
>
#{email,jdbcType=VARCHAR},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.customer.AclUser"
>
update ag_acl_user
<set>
<if
test=
"userRole != null"
>
user_role = #{userRole,jdbcType=INTEGER},
</if>
<if
test=
"employeeNo != null"
>
employee_no = #{employeeNo,jdbcType=VARCHAR},
</if>
<if
test=
"company != null"
>
company = #{company,jdbcType=INTEGER},
</if>
<if
test=
"deptId != null"
>
dept_id = #{deptId,jdbcType=BIGINT},
</if>
<if
test=
"roleId != null"
>
role_id = #{roleId,jdbcType=BIGINT},
</if>
<if
test=
"login != null"
>
`login` = #{login,jdbcType=VARCHAR},
</if>
<if
test=
"password != null"
>
`password` = #{password,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
`name` = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"nickname != null"
>
nickname = #{nickname,jdbcType=VARCHAR},
</if>
<if
test=
"mobileNo != null"
>
mobile_no = #{mobileNo,jdbcType=VARCHAR},
</if>
<if
test=
"idNo != null"
>
id_no = #{idNo,jdbcType=VARCHAR},
</if>
<if
test=
"lastLoginTime != null"
>
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"logoutTime != null"
>
logout_time = #{logoutTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"loginSource != null"
>
login_source = #{loginSource,jdbcType=INTEGER},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"email != null"
>
email = #{email,jdbcType=VARCHAR},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if
test=
"updatedAt != null"
>
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatedBy != null"
>
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.customer.AclUser"
>
update ag_acl_user
set user_role = #{userRole,jdbcType=INTEGER},
employee_no = #{employeeNo,jdbcType=VARCHAR},
company = #{company,jdbcType=INTEGER},
dept_id = #{deptId,jdbcType=BIGINT},
role_id = #{roleId,jdbcType=BIGINT},
`login` = #{login,jdbcType=VARCHAR},
`password` = #{password,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
mobile_no = #{mobileNo,jdbcType=VARCHAR},
id_no = #{idNo,jdbcType=VARCHAR},
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
logout_time = #{logoutTime,jdbcType=TIMESTAMP},
login_source = #{loginSource,jdbcType=INTEGER},
is_active = #{isActive,jdbcType=INTEGER},
email = #{email,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/meta/MdDropMasterMapper.xml
0 → 100644
View file @
5b258526
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.dal.mapper.meta.MdDropMasterMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.meta.MdDropMaster"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"scenario_code"
jdbcType=
"VARCHAR"
property=
"scenarioCode"
/>
<result
column=
"scenario_name"
jdbcType=
"VARCHAR"
property=
"scenarioName"
/>
<result
column=
"drop_code"
jdbcType=
"VARCHAR"
property=
"dropCode"
/>
<result
column=
"drop_name"
jdbcType=
"VARCHAR"
property=
"dropName"
/>
<result
column=
"drop_code_desc"
jdbcType=
"VARCHAR"
property=
"dropCodeDesc"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, scenario_code, scenario_name, drop_code, drop_name, drop_code_desc, is_active,
created_at, created_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_md_drop_master
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from ag_md_drop_master
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdDropMaster"
useGeneratedKeys=
"true"
>
insert into ag_md_drop_master (scenario_code, scenario_name, drop_code,
drop_name, drop_code_desc, is_active,
created_at, created_by)
values (#{scenarioCode,jdbcType=VARCHAR}, #{scenarioName,jdbcType=VARCHAR}, #{dropCode,jdbcType=VARCHAR},
#{dropName,jdbcType=VARCHAR}, #{dropCodeDesc,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdDropMaster"
useGeneratedKeys=
"true"
>
insert into ag_md_drop_master
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"scenarioCode != null"
>
scenario_code,
</if>
<if
test=
"scenarioName != null"
>
scenario_name,
</if>
<if
test=
"dropCode != null"
>
drop_code,
</if>
<if
test=
"dropName != null"
>
drop_name,
</if>
<if
test=
"dropCodeDesc != null"
>
drop_code_desc,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"scenarioCode != null"
>
#{scenarioCode,jdbcType=VARCHAR},
</if>
<if
test=
"scenarioName != null"
>
#{scenarioName,jdbcType=VARCHAR},
</if>
<if
test=
"dropCode != null"
>
#{dropCode,jdbcType=VARCHAR},
</if>
<if
test=
"dropName != null"
>
#{dropName,jdbcType=VARCHAR},
</if>
<if
test=
"dropCodeDesc != null"
>
#{dropCodeDesc,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.meta.MdDropMaster"
>
update ag_md_drop_master
<set>
<if
test=
"scenarioCode != null"
>
scenario_code = #{scenarioCode,jdbcType=VARCHAR},
</if>
<if
test=
"scenarioName != null"
>
scenario_name = #{scenarioName,jdbcType=VARCHAR},
</if>
<if
test=
"dropCode != null"
>
drop_code = #{dropCode,jdbcType=VARCHAR},
</if>
<if
test=
"dropName != null"
>
drop_name = #{dropName,jdbcType=VARCHAR},
</if>
<if
test=
"dropCodeDesc != null"
>
drop_code_desc = #{dropCodeDesc,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.meta.MdDropMaster"
>
update ag_md_drop_master
set scenario_code = #{scenarioCode,jdbcType=VARCHAR},
scenario_name = #{scenarioName,jdbcType=VARCHAR},
drop_code = #{dropCode,jdbcType=VARCHAR},
drop_name = #{dropName,jdbcType=VARCHAR},
drop_code_desc = #{dropCodeDesc,jdbcType=VARCHAR},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/meta/MdDropOptionsMapper.xml
View file @
5b258526
...
...
@@ -2,8 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.dal.mapper.meta.MdDropOptionsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.meta.MdDropOptions"
>
<!--@mbg.generated-->
<!--@Table ag_md_drop_options-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"drop_master_id"
jdbcType=
"BIGINT"
property=
"dropMasterId"
/>
<result
column=
"drop_option_name"
jdbcType=
"VARCHAR"
property=
"dropOptionName"
/>
...
...
@@ -16,24 +14,36 @@
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, drop_master_id, drop_option_name, drop_option_code, drop_option_order, drop_option_score,
drop_option_remark, is_active, created_at, created_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from ag_md_drop_options
where id = #{id,jdbcType=BIGINT}
</select>
<select
id=
"findByMasterCode"
resultType=
"com.yd.dal.entity.meta.MdDropOptions"
>
select
o.id id,
o.drop_master_id dropMasterId,
o.drop_option_name dropOptionName,
o.drop_option_code dropOptionCode,
o.drop_option_order dropOptionOrder,
o.drop_option_score dropOptionScore,
o.drop_option_remark dropOptionRemark,
o.is_active isActive,
o.created_at createdAt,
o.created_by createdBy
from ag_md_drop_master m left join ag_md_drop_options o on m.id = o.drop_master_id and o.is_active = 1
where m.scenario_code = #{masterCode,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--@mbg.generated-->
delete from ag_md_drop_options
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdDropOptions"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_drop_options (drop_master_id, drop_option_name, drop_option_code,
drop_option_order, drop_option_score, drop_option_remark,
is_active, created_at, created_by
...
...
@@ -44,7 +54,6 @@
)
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdDropOptions"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_drop_options
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"dropMasterId != null"
>
...
...
@@ -106,7 +115,6 @@
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.meta.MdDropOptions"
>
<!--@mbg.generated-->
update ag_md_drop_options
<set>
<if
test=
"dropMasterId != null"
>
...
...
@@ -140,7 +148,6 @@
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.meta.MdDropOptions"
>
<!--@mbg.generated-->
update ag_md_drop_options
set drop_master_id = #{dropMasterId,jdbcType=BIGINT},
drop_option_name = #{dropOptionName,jdbcType=VARCHAR},
...
...
@@ -196,4 +203,19 @@
LEFT JOIN ag_md_drop_master m ON m.id = o.drop_master_id
WHERE m.scenario_code LIKE #{dropMasterCode,jdbcType=VARCHAR}
</select>
<select
id=
"findByMasterCodeAndOrderId"
resultType=
"com.yd.dal.entity.meta.MdDropOptions"
>
select
o.id id,
o.drop_master_id dropMasterId,
o.drop_option_name dropOptionName,
o.drop_option_code dropOptionCode,
o.drop_option_order dropOptionOrder,
o.drop_option_score dropOptionScore,
o.drop_option_remark dropOptionRemark,
o.is_active isActive,
o.created_at createdAt,
o.created_by createdBy
from ag_md_drop_master m left join ag_md_drop_options o on m.id = o.drop_master_id and o.is_active = 1 and o.drop_option_order = #{orderId,jdbcType=INTEGER}
where m.scenario_code = #{masterCode,jdbcType=BIGINT}
</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