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
13e76815
Commit
13e76815
authored
Jul 02, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改-经纪人申请专家逻辑
parent
017b24e1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
29 deletions
+81
-29
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+3
-2
yd-api/src/main/java/com/yd/api/practitioner/vo/opportunity/ApplyForExpertSupportRequestVO.java
+2
-0
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsExpertRequest.java
+22
-16
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsExpertRequestMapper.java
+3
-0
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsExpertRequestDALServiceImpl.java
+5
-0
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsExpertRequestDALService.java
+2
-0
yd-api/src/main/resources/mapper/marketing/MktLeadsExpertRequestMapper.xml
+44
-11
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
13e76815
...
...
@@ -731,7 +731,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
//查询此商机是否有申请专家
info
.
setExpertType
(
0L
);
MktLeadsExpertRequest
mktLeadsExpertRequest
=
mktLeadsExpertRequestDALService
.
findBy
LeadsAssignedId
(
mktLeadsAssigneds
.
get
Id
());
MktLeadsExpertRequest
mktLeadsExpertRequest
=
mktLeadsExpertRequestDALService
.
findBy
CustomerId
(
mktLeadsAssigneds
.
getCustomer
Id
());
if
(
mktLeadsExpertRequest
!=
null
){
//有申请专家 查询是否指派专家
info
.
setExpertType
(
1L
);
...
...
@@ -3009,7 +3009,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
public
ApplyForExpertSupportResponseVO
applyForExpertSupport
(
ApplyForExpertSupportRequestVO
requestVO
)
{
ApplyForExpertSupportResponseVO
resp
=
new
ApplyForExpertSupportResponseVO
();
//判断此商机专家支持是否已经申请
MktLeadsExpertRequest
isExpertRequest
=
mktLeadsExpertRequestDALService
.
findBy
LeadsAssignedId
(
requestVO
.
getLeadsAssigned
Id
());
MktLeadsExpertRequest
isExpertRequest
=
mktLeadsExpertRequestDALService
.
findBy
CustomerId
(
requestVO
.
getOpportunity
Id
());
if
(
isExpertRequest
!=
null
){
resp
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830019"
)));
return
resp
;
...
...
@@ -3018,6 +3018,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
//保存ag_mkt_leads_expert_request
MktLeadsExpertRequest
mktLeadsExpertRequest
=
new
MktLeadsExpertRequest
();
mktLeadsExpertRequest
.
setLeadsAssignedId
(
requestVO
.
getLeadsAssignedId
());
mktLeadsExpertRequest
.
setCustomerId
(
requestVO
.
getOpportunityId
());
mktLeadsExpertRequest
.
setIsActive
(
1
);
mktLeadsExpertRequest
.
setCreatedAt
(
new
Date
());
mktLeadsExpertRequest
.
setUpdatedAt
(
new
Date
());
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/opportunity/ApplyForExpertSupportRequestVO.java
View file @
13e76815
...
...
@@ -13,4 +13,6 @@ public class ApplyForExpertSupportRequestVO {
* 申请经纪人id
*/
private
Long
practitionerId
;
private
Long
opportunityId
;
}
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsExpertRequest.java
View file @
13e76815
...
...
@@ -4,42 +4,47 @@ import java.util.Date;
import
lombok.Data
;
/**
* 经纪人申请专家辅助开发商机
*/
* 经纪人申请专家辅助开发商机
*/
@Data
public
class
MktLeadsExpertRequest
{
/**
* serial id
*/
* serial id
*/
private
Long
id
;
/**
* FK ag_mkt_leads_assigneds.id 商机指派表id
*/
* FK ag_mkt_leads_assigneds.id 商机指派表id
*/
private
Long
leadsAssignedId
;
/**
* 0=No, 1=Yes
*/
* 商机用户id
*/
private
Long
customerId
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
/**
* 分析建置时间
*/
* 分析建置时间
*/
private
Date
createdAt
;
/**
* 建置者 FK ag_acl_user.id
*/
* 建置者 FK ag_acl_user.id
*/
private
Long
createdBy
;
/**
* 更新时间
*/
* 更新时间
*/
private
Date
updatedAt
;
/**
* 更新者 FK ag_acl_user.id
*/
* 更新者 FK ag_acl_user.id
*/
private
Long
updatedBy
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsExpertRequestMapper.java
View file @
13e76815
...
...
@@ -24,4 +24,6 @@ public interface MktLeadsExpertRequestMapper {
int
batchInsert
(
@Param
(
"list"
)
List
<
MktLeadsExpertRequest
>
list
);
MktLeadsExpertRequest
selectByAassignedId
(
Long
assignedId
);
MktLeadsExpertRequest
selectByCustomerId
(
Long
customerId
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsExpertRequestDALServiceImpl.java
View file @
13e76815
...
...
@@ -22,4 +22,9 @@ public class MktLeadsExpertRequestDALServiceImpl implements MktLeadsExpertReques
public
MktLeadsExpertRequest
findByLeadsAssignedId
(
Long
assignedId
)
{
return
mktLeadsExpertRequestMapper
.
selectByAassignedId
(
assignedId
);
}
@Override
public
MktLeadsExpertRequest
findByCustomerId
(
Long
customerId
)
{
return
mktLeadsExpertRequestMapper
.
selectByCustomerId
(
customerId
);
}
}
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsExpertRequestDALService.java
View file @
13e76815
...
...
@@ -6,4 +6,6 @@ public interface MktLeadsExpertRequestDALService {
int
save
(
MktLeadsExpertRequest
mktLeadsExpertRequest
);
MktLeadsExpertRequest
findByLeadsAssignedId
(
Long
assignedId
);
MktLeadsExpertRequest
findByCustomerId
(
Long
customerId
);
}
yd-api/src/main/resources/mapper/marketing/MktLeadsExpertRequestMapper.xml
View file @
13e76815
...
...
@@ -6,6 +6,7 @@
<!--@Table ag_mkt_leads_expert_request-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"leads_assigned_id"
jdbcType=
"BIGINT"
property=
"leadsAssignedId"
/>
<result
column=
"customer_id"
jdbcType=
"BIGINT"
property=
"customerId"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
...
...
@@ -14,7 +15,8 @@
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, leads_assigned_id, is_active, created_at, created_by, updated_at, updated_by
id, leads_assigned_id, customer_id, is_active, created_at, created_by, updated_at,
updated_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
...
...
@@ -30,12 +32,12 @@
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.marketing.MktLeadsExpertRequest"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_mkt_leads_expert_request (leads_assigned_id,
is_active, created_at
,
created_
by, updated_at, updated_by
)
values (#{leadsAssignedId,jdbcType=BIGINT}, #{
isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP
},
#{created
By,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}
)
insert into ag_mkt_leads_expert_request (leads_assigned_id,
customer_id, is_active
,
created_
at, created_by, updated_at,
updated_by
)
values (#{leadsAssignedId,jdbcType=BIGINT}, #{
customerId,jdbcType=BIGINT}, #{isActive,jdbcType=INTEGER
},
#{created
At,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT}
)
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.marketing.MktLeadsExpertRequest"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
...
...
@@ -44,6 +46,9 @@
<if
test=
"leadsAssignedId != null"
>
leads_assigned_id,
</if>
<if
test=
"customerId != null"
>
customer_id,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
...
...
@@ -64,6 +69,9 @@
<if
test=
"leadsAssignedId != null"
>
#{leadsAssignedId,jdbcType=BIGINT},
</if>
<if
test=
"customerId != null"
>
#{customerId,jdbcType=BIGINT},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
...
...
@@ -88,6 +96,9 @@
<if
test=
"leadsAssignedId != null"
>
leads_assigned_id = #{leadsAssignedId,jdbcType=BIGINT},
</if>
<if
test=
"customerId != null"
>
customer_id = #{customerId,jdbcType=BIGINT},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
...
...
@@ -110,6 +121,7 @@
<!--@mbg.generated-->
update ag_mkt_leads_expert_request
set leads_assigned_id = #{leadsAssignedId,jdbcType=BIGINT},
customer_id = #{customerId,jdbcType=BIGINT},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
...
...
@@ -126,6 +138,11 @@
when id = #{item.id,jdbcType=BIGINT} then #{item.leadsAssignedId,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"customer_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.customerId,jdbcType=BIGINT}
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
...
...
@@ -168,6 +185,13 @@
</if>
</foreach>
</trim>
<trim
prefix=
"customer_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.customerId != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.customerId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim
prefix=
"is_active = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.isActive != null"
>
...
...
@@ -212,12 +236,13 @@
<insert
id=
"batchInsert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"map"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_mkt_leads_expert_request
(leads_assigned_id, is_active, created_at, created_by, updated_at, updated_by)
(leads_assigned_id, customer_id, is_active, created_at, created_by, updated_at, updated_by
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.leadsAssignedId,jdbcType=BIGINT}, #{item.
isActive,jdbcType=INTEGER}, #{item.createdAt,jdbcType=TIMESTAMP
},
#{item.created
By,jdbcType=BIGINT}, #{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT}
)
(#{item.leadsAssignedId,jdbcType=BIGINT}, #{item.
customerId,jdbcType=BIGINT}, #{item.isActive,jdbcType=INTEGER
},
#{item.created
At,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT}, #{item.updatedAt,jdbcType=TIMESTAMP},
#{item.updatedBy,jdbcType=BIGINT}
)
</foreach>
</insert>
...
...
@@ -228,4 +253,11 @@
where leads_assigned_id = #{assignedId,jdbcType=BIGINT}
and is_active = 1
</select>
<select
id=
"selectByCustomerId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_mkt_leads_expert_request
where customer_id = #{customerId,jdbcType=BIGINT}
and is_active = 1
</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