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
746d6da4
Commit
746d6da4
authored
May 13, 2020
by
Water Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize
parent
d7c661fc
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
391 additions
and
59 deletions
+391
-59
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+30
-10
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotentialAssigneds.java
+70
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.java
+3
-1
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialAssignedsMapper.java
+23
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialAssignedTrackDALService.java
+2
-1
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialAssignedsDALService.java
+12
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialAssignedTrackDALServiceImpl.java
+3
-2
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialAssignedsDALServiceImpl.java
+20
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.xml
+44
-44
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialAssignedsMapper.xml
+181
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialMapper.xml
+3
-1
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
746d6da4
...
...
@@ -75,6 +75,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
private
MdDropOptionsDALService
mdDropOptionsDALService
;
@Autowired
private
AclUserDALService
aclUserDALService
;
@Autowired
private
AclPractitionerPotentialAssignedsDALService
aclPractitionerPotentialAssignedsDALService
;
@Override
...
...
@@ -432,7 +434,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
mediaGetRespVO
;
}
@Override
public
RecruitResponseVO
recruit
(
RecruitRequestVO
requestVO
)
{
RecruitResponseVO
responseVO
=
new
RecruitResponseVO
();
String
name
=
requestVO
.
getName
();
...
...
@@ -497,6 +498,8 @@ 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
);
...
...
@@ -516,9 +519,21 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
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
);
}
}
...
...
@@ -530,7 +545,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
Long
practitionerId
=
requestVO
.
getPractitionerId
();
Long
potentialId
=
requestVO
.
getPotentialId
();
String
trackTime
=
requestVO
.
getTrackTime
();
if
(
trackStatusId
!=
null
&&
practitionerId
!=
null
&&
potentialId
!=
null
&&
Strings
.
isNullOrEmpty
(
trackTime
)){
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、更新最新的状态
...
...
@@ -546,7 +562,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
aclPractitionerPotentialAssignedTrackDALService
.
updateAll
(
assignedTrackUpdateList
);
}
//2、查询团队长对该增员所有增员状态
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackList
=
aclPractitionerPotentialAssignedTrackDALService
.
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
practitionerId
,
potentialId
,
trackStatusId
);
List
<
AclPractitionerPotentialAssignedTrack
>
assignedTrackList
=
aclPractitionerPotentialAssignedTrackDALService
.
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
practitionerId
,
potentialId
,
trackStatusId
,
trackTimeDate
);
if
(
assignedTrackList
==
null
||
assignedTrackList
.
isEmpty
()){
//3、如果没有,获取增员状态对应的分值,
MdDropOptions
options
=
mdDropOptionsDALService
.
findById
(
trackStatusId
);
assignedTrack
.
setTrackScore
(
options
.
getDropOptionScore
());
...
...
@@ -557,7 +573,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
assignedTrack
.
setPractitionerPotentialId
(
potentialId
);
assignedTrack
.
setTrackStatusId
(
trackStatusId
);
assignedTrack
.
setNotice
(
requestVO
.
getNotice
());
assignedTrack
.
setTrackTime
(
CommonUtil
.
stringParseDate
(
trackTime
,
"yyyy-MM-dd"
)
);
assignedTrack
.
setTrackTime
(
trackTimeDate
);
assignedTrack
.
setIsActive
(
1
);
assignedTrack
.
setIsLasted
(
1
);
assignedTrack
.
setCreatorType
(
2
);
...
...
@@ -654,7 +670,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
Long
practitionerId
=
requestVO
.
getPractitionerId
();
if
(
practitionerId
!=
null
){
Integer
status
=
requestVO
.
getStatus
();
status
=
(
status
==
null
)
?
1
:
status
;
//1、获取用户数据
List
<
PractitionerPotentialInfo
>
practitionerPotentialInfoList
=
aclPractitionerPotentialDALService
.
findByPractitionerIdAndLasted
(
practitionerId
);
if
(
practitionerPotentialInfoList
!=
null
&&
!
practitionerPotentialInfoList
.
isEmpty
()){
...
...
@@ -671,11 +686,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
Long
trackStatusId
;
for
(
PractitionerPotentialInfo
item
:
practitionerPotentialInfoList
){
trackStatusId
=
item
.
getTrackStatusId
();
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
){
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
);
}
}
...
...
@@ -691,6 +710,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
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
);
...
...
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerPotentialAssigneds.java
0 → 100644
View file @
746d6da4
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/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.java
View file @
746d6da4
...
...
@@ -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
{
...
...
@@ -19,7 +21,7 @@ public interface AclPractitionerPotentialAssignedTrackMapper {
void
insertList
(
@Param
(
"potentialAssignedTrackList"
)
List
<
AclPractitionerPotentialAssignedTrack
>
potentialAssignedTrackList
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"potentialId"
)
Long
potentialId
,
@Param
(
"trackStatusId"
)
Long
trackStatusId
);
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
);
...
...
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerPotentialAssignedsMapper.java
0 → 100644
View file @
746d6da4
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/service/customer/AclPractitionerPotentialAssignedTrackDALService.java
View file @
746d6da4
...
...
@@ -3,6 +3,7 @@ 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"
)
...
...
@@ -10,7 +11,7 @@ public interface AclPractitionerPotentialAssignedTrackDALService {
void
saveAll
(
List
<
AclPractitionerPotentialAssignedTrack
>
potentialAssignedTrackList
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
Long
practitionerId
,
Long
potentialId
,
Long
trackStatusId
);
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
Long
practitionerId
,
Long
potentialId
,
Long
trackStatusId
,
Date
trackDate
);
void
save
(
AclPractitionerPotentialAssignedTrack
assignedTrack
);
...
...
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerPotentialAssignedsDALService.java
0 → 100644
View file @
746d6da4
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/impl/AclPractitionerPotentialAssignedTrackDALServiceImpl.java
View file @
746d6da4
...
...
@@ -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"
)
...
...
@@ -19,8 +20,8 @@ public class AclPractitionerPotentialAssignedTrackDALServiceImpl implements AclP
}
@Override
public
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
Long
practitionerId
,
Long
potentialId
,
Long
trackStatusId
)
{
return
aclPractitionerPotentialAssignedTrackMapper
.
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
practitionerId
,
potentialId
,
trackStatusId
);
public
List
<
AclPractitionerPotentialAssignedTrack
>
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
Long
practitionerId
,
Long
potentialId
,
Long
trackStatusId
,
Date
trackDate
)
{
return
aclPractitionerPotentialAssignedTrackMapper
.
findByPractitionerIdAndPotentialIdAndTrackStatusId
(
practitionerId
,
potentialId
,
trackStatusId
,
trackDate
);
}
@Override
...
...
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialAssignedsDALServiceImpl.java
0 → 100644
View file @
746d6da4
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/resources/mapper/customer/AclPractitionerPotentialAssignedTrackMapper.xml
View file @
746d6da4
...
...
@@ -23,7 +23,7 @@
is_active, created_at, created_by, updated_at, updated_by, creator_type, updater_type,is_lasted,track_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_practitioner_potential_assigned_track
where id = #{id,jdbcType=BIGINT}
...
...
@@ -31,12 +31,12 @@
<select
id=
"findByPractitionerIdAndPotentialIdAndTrackStatusId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
<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(created_at) = to_days(now()
)
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"
>
...
...
@@ -47,13 +47,13 @@
AND is_lasted = #{isLasted,jdbcType=INTEGER}
</select>
<select
id=
"findByPractitionerIdAndPotentialId"
resultMap=
"BaseResultMap"
>
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
created_at
desc
order by
track_time
desc
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
...
...
@@ -61,14 +61,14 @@
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, track_score,notice, is_active,
created_at, created_by, updated_at,
updated_by, updater_type,creator_type,is_lasted,track_time )
values (#{practitionerPotentialId,jdbcType=BIGINT}, #{practitionerAssignedId,jdbcType=BIGINT},
#{trackStatusId,jdbcType=BIGINT},#{trackScore,jdbcType=INTEGER}, #{notice,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT},#{updaterType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER},#{isLasted,jdbcType=INTEGER},#{trackTime,jdbcType=TIMESTAMP})
insert into ag_acl_practitioner_potential_assigned_track (practitioner_potential_id, practitioner_assigned_id,
track_status_id, track_score,notice, is_active,
created_at, created_by, updated_at,
updated_by, updater_type,creator_type,is_lasted,track_time )
values (#{practitionerPotentialId,jdbcType=BIGINT}, #{practitionerAssignedId,jdbcType=BIGINT},
#{trackStatusId,jdbcType=BIGINT},#{trackScore,jdbcType=INTEGER}, #{notice,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{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
...
...
@@ -169,20 +169,20 @@
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.updaterType},
#{item.creatorType},
#{item.isLasted},
#{item.trackTime}
#{item.practitionerPotentialId},
#{item.practitionerAssignedId},
#{item.trackStatusId},
#{item.trackScore},
#{item.notice},
#{item.isActive},
#{item.createdAt},
#{item.createdBy},
#{item.updatedAt},
#{item.updatedBy},
#{item.updaterType},
#{item.creatorType},
#{item.isLasted},
#{item.trackTime}
)
</foreach>
</insert>
...
...
@@ -237,18 +237,18 @@
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.customer.AclPractitionerPotentialAssignedTrack"
>
update ag_acl_practitioner_potential_assigned_track
set practitioner_potential_id = #{practitionerPotentialId,jdbcType=BIGINT},
practitioner_assigned_id = #{practitionerAssignedId,jdbcType=BIGINT},
track_status_id = #{trackStatusId,jdbcType=BIGINT},
notice = #{notice,jdbcType=VARCHAR},
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},
is_lasted = #{isLasted,jdbcType=INTEGER},
track_time = #{trackTime,jdbcType=TIMESTAMP}
practitioner_assigned_id = #{practitionerAssignedId,jdbcType=BIGINT},
track_status_id = #{trackStatusId,jdbcType=BIGINT},
notice = #{notice,jdbcType=VARCHAR},
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},
is_lasted = #{isLasted,jdbcType=INTEGER},
track_time = #{trackTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateAll"
parameterType=
"java.util.List"
>
...
...
@@ -288,8 +288,8 @@
<if
test=
"item.creatorType != null"
>
creator_type = #{item.creatorType,jdbcType=INTEGER},
</if>
<if
test=
"item.updat
o
rType != null"
>
updat
or_type = #{item.updato
rType,jdbcType=INTEGER},
<if
test=
"item.updat
e
rType != null"
>
updat
er_type = #{item.update
rType,jdbcType=INTEGER},
</if>
<if
test=
"item.isLasted != null"
>
is_lasted = #{item.isLasted,jdbcType=INTEGER},
...
...
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialAssignedsMapper.xml
0 → 100644
View file @
746d6da4
<?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 @
746d6da4
...
...
@@ -318,6 +318,7 @@
WHERE
t.practitioner_assigned_id = #{practitionerId,jdbcType=BIGINT}
GROUP BY
p.id;
p.id
order by p.id desc;
</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