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
91c83e99
Commit
91c83e99
authored
May 18, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改-商机跟进保存
parent
a148a4ea
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
7 deletions
+88
-7
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+15
-3
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssignedTrack.java
+3
-0
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsAssignedTrackMapper.java
+5
-0
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsAssignedTrackDALServiceImpl.java
+5
-0
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsAssignedTrackDALService.java
+2
-0
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedTrackMapper.xml
+58
-4
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
91c83e99
...
@@ -694,7 +694,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
...
@@ -694,7 +694,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
OpportunityRecordInfo
info
=
new
OpportunityRecordInfo
();
OpportunityRecordInfo
info
=
new
OpportunityRecordInfo
();
CommonUtil
.
simpleObjectCopy
(
track
,
info
);
CommonUtil
.
simpleObjectCopy
(
track
,
info
);
info
.
setOpportunityId
(
track
.
getCustomerId
());
info
.
setOpportunityId
(
track
.
getCustomerId
());
info
.
setNoticeDate
(
CommonUtil
.
dateParseString
(
track
.
get
CreatedAt
(),
"yyyy-MM-dd"
));
info
.
setNoticeDate
(
CommonUtil
.
dateParseString
(
track
.
get
TrackTime
(),
"yyyy-MM-dd"
));
BeanPropertyValueEqualsPredicate
predicate
=
new
BeanPropertyValueEqualsPredicate
(
"id"
,
track
.
getMdDropOptionId
());
BeanPropertyValueEqualsPredicate
predicate
=
new
BeanPropertyValueEqualsPredicate
(
"id"
,
track
.
getMdDropOptionId
());
List
<
MdDropOptions
>
select
=
(
List
<
MdDropOptions
>)
CollectionUtils
.
select
(
dropOptionsList
,
predicate
);
List
<
MdDropOptions
>
select
=
(
List
<
MdDropOptions
>)
CollectionUtils
.
select
(
dropOptionsList
,
predicate
);
if
(!
select
.
isEmpty
()){
if
(!
select
.
isEmpty
()){
...
@@ -1207,10 +1207,13 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
...
@@ -1207,10 +1207,13 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
MktLeadsAssignedTrack
track
=
new
MktLeadsAssignedTrack
();
MktLeadsAssignedTrack
track
=
new
MktLeadsAssignedTrack
();
CommonUtil
.
simpleObjectCopy
(
requestVO
,
track
);
CommonUtil
.
simpleObjectCopy
(
requestVO
,
track
);
track
.
setCustomerId
(
requestVO
.
getOpportunityId
());
track
.
setCustomerId
(
requestVO
.
getOpportunityId
());
track
.
setTrackTime
(
CommonUtil
.
stringParseDate
(
requestVO
.
getNoticeDate
()+
" 00:00:00"
,
"yyyy-MM-dd HH:mm:ss"
));
track
.
setCreatedBy
(-
1L
);
track
.
setCreatedBy
(-
1L
);
track
.
setCreatedAt
(
CommonUtil
.
stringParseDate
(
requestVO
.
getNoticeDate
()+
" 00:00:00"
,
"yyyy-MM-dd HH:mm:ss"
));
track
.
setCreatedAt
(
new
Date
());
track
.
setCreatorType
(
2
);
track
.
setUpdatedBy
(-
1L
);
track
.
setUpdatedBy
(-
1L
);
track
.
setUpdatedAt
((
new
Date
()));
track
.
setUpdatorType
(
2
);
track
.
setUpdatedAt
(
new
Date
());
MdDropOptions
dropOtions
=
mdDropOptionsDALService
.
findByDropOptionId
(
requestVO
.
getMdDropOptionId
());
MdDropOptions
dropOtions
=
mdDropOptionsDALService
.
findByDropOptionId
(
requestVO
.
getMdDropOptionId
());
track
.
setTrackScore
(
dropOtions
.
getDropOptionScore
());
track
.
setTrackScore
(
dropOtions
.
getDropOptionScore
());
if
(
CommonUtil
.
isNullOrZero
(
requestVO
.
getId
())){
if
(
CommonUtil
.
isNullOrZero
(
requestVO
.
getId
())){
...
@@ -1234,6 +1237,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
...
@@ -1234,6 +1237,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
if
(
CommonUtil
.
isNullOrBlank
(
salesNotice
)){
if
(
CommonUtil
.
isNullOrBlank
(
salesNotice
)){
return
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830013"
));
return
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830013"
));
}
}
//判断此经纪人当天是否已为此商机经行了此项跟进
if
(
CommonUtil
.
isNullOrZero
(
requestVO
.
getId
())){
MktLeadsAssignedTrack
mktLeadsAssignedTrack
=
new
MktLeadsAssignedTrack
();
mktLeadsAssignedTrack
.
setPractitionerId
(
requestVO
.
getPractitionerId
());
mktLeadsAssignedTrack
.
setCustomerId
(
requestVO
.
getOpportunityId
());
mktLeadsAssignedTrack
.
setLeadsAssignedId
(
requestVO
.
getLeadsAssignedId
());
mktLeadsAssignedTrack
.
setMdDropOptionId
(
requestVO
.
getMdDropOptionId
());
List
<
MktLeadsAssignedTrack
>
trackList
=
mktLeadsAssignedTrackDALService
.
findByTrackTimeForNew
(
mktLeadsAssignedTrack
);
}
return
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
));
return
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
));
}
}
...
...
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssignedTrack.java
View file @
91c83e99
...
@@ -90,5 +90,7 @@ public class MktLeadsAssignedTrack implements Serializable {
...
@@ -90,5 +90,7 @@ public class MktLeadsAssignedTrack implements Serializable {
*/
*/
private
Long
leadsAssignedId
;
private
Long
leadsAssignedId
;
private
Date
trackTime
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsAssignedTrackMapper.java
View file @
91c83e99
...
@@ -3,6 +3,8 @@ package com.yd.dal.mapper.marketing;
...
@@ -3,6 +3,8 @@ package com.yd.dal.mapper.marketing;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.yd.dal.entity.marketing.MktLeadsAssignedTrack
;
import
com.yd.dal.entity.marketing.MktLeadsAssignedTrack
;
import
java.util.List
;
public
interface
MktLeadsAssignedTrackMapper
{
public
interface
MktLeadsAssignedTrackMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
deleteByPrimaryKey
(
Long
id
);
...
@@ -17,4 +19,6 @@ public interface MktLeadsAssignedTrackMapper {
...
@@ -17,4 +19,6 @@ public interface MktLeadsAssignedTrackMapper {
int
updateByPrimaryKey
(
MktLeadsAssignedTrack
record
);
int
updateByPrimaryKey
(
MktLeadsAssignedTrack
record
);
Page
<
MktLeadsAssignedTrack
>
selectByPrimaryKeySelective
(
MktLeadsAssignedTrack
mktLeadsAssignedTrack
);
Page
<
MktLeadsAssignedTrack
>
selectByPrimaryKeySelective
(
MktLeadsAssignedTrack
mktLeadsAssignedTrack
);
List
<
MktLeadsAssignedTrack
>
findByTrackTimeForNew
(
MktLeadsAssignedTrack
mktLeadsAssignedTrack
);
}
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsAssignedTrackDALServiceImpl.java
View file @
91c83e99
...
@@ -32,4 +32,9 @@ public class MktLeadsAssignedTrackDALServiceImpl implements MktLeadsAssignedTrac
...
@@ -32,4 +32,9 @@ public class MktLeadsAssignedTrackDALServiceImpl implements MktLeadsAssignedTrac
public
void
updateTrack
(
MktLeadsAssignedTrack
track
)
{
public
void
updateTrack
(
MktLeadsAssignedTrack
track
)
{
mktLeadsAssignedTrackMapper
.
updateByPrimaryKeySelective
(
track
);
mktLeadsAssignedTrackMapper
.
updateByPrimaryKeySelective
(
track
);
}
}
@Override
public
List
<
MktLeadsAssignedTrack
>
findByTrackTimeForNew
(
MktLeadsAssignedTrack
mktLeadsAssignedTrack
)
{
return
mktLeadsAssignedTrackMapper
.
findByTrackTimeForNew
(
mktLeadsAssignedTrack
);
}
}
}
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsAssignedTrackDALService.java
View file @
91c83e99
...
@@ -10,4 +10,6 @@ public interface MktLeadsAssignedTrackDALService {
...
@@ -10,4 +10,6 @@ public interface MktLeadsAssignedTrackDALService {
void
saveTrack
(
MktLeadsAssignedTrack
track
);
void
saveTrack
(
MktLeadsAssignedTrack
track
);
void
updateTrack
(
MktLeadsAssignedTrack
track
);
void
updateTrack
(
MktLeadsAssignedTrack
track
);
List
<
MktLeadsAssignedTrack
>
findByTrackTimeForNew
(
MktLeadsAssignedTrack
mktLeadsAssignedTrack
);
}
}
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedTrackMapper.xml
View file @
91c83e99
...
@@ -18,11 +18,12 @@
...
@@ -18,11 +18,12 @@
<result
column=
"md_drop_option_id"
jdbcType=
"BIGINT"
property=
"mdDropOptionId"
/>
<result
column=
"md_drop_option_id"
jdbcType=
"BIGINT"
property=
"mdDropOptionId"
/>
<result
column=
"track_score"
jdbcType=
"INTEGER"
property=
"trackScore"
/>
<result
column=
"track_score"
jdbcType=
"INTEGER"
property=
"trackScore"
/>
<result
column=
"leads_assigned_id"
jdbcType=
"BIGINT"
property=
"leadsAssignedId"
/>
<result
column=
"leads_assigned_id"
jdbcType=
"BIGINT"
property=
"leadsAssignedId"
/>
<result
column=
"track_time"
jdbcType=
"TIMESTAMP"
property=
"trackTime"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, order_id, order_no, sales_notice, is_active, created_at, created_by, creator_type,
id, order_id, order_no, sales_notice, is_active, created_at, created_by, creator_type,
updated_at, updated_by, updator_type, practitioner_id, customer_id, md_drop_option_id,
updated_at, updated_by, updator_type, practitioner_id, customer_id, md_drop_option_id,
track_score, leads_assigned_id
track_score, leads_assigned_id
,track_time
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -39,13 +40,14 @@
...
@@ -39,13 +40,14 @@
is_active, created_at, created_by,
is_active, created_at, created_by,
creator_type, updated_at, updated_by,
creator_type, updated_at, updated_by,
updator_type, practitioner_id, customer_id,
updator_type, practitioner_id, customer_id,
md_drop_option_id, track_score, leads_assigned_id
md_drop_option_id, track_score, leads_assigned_id
,track_time
)
)
values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, #{salesNotice,jdbcType=VARCHAR},
values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, #{salesNotice,jdbcType=VARCHAR},
#{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{creatorType,jdbcType=INTEGER}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT},
#{creatorType,jdbcType=INTEGER}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT},
#{updatorType,jdbcType=INTEGER}, #{practitionerId,jdbcType=BIGINT}, #{customerId,jdbcType=BIGINT},
#{updatorType,jdbcType=INTEGER}, #{practitionerId,jdbcType=BIGINT}, #{customerId,jdbcType=BIGINT},
#{mdDropOptionId,jdbcType=BIGINT}, #{trackScore,jdbcType=INTEGER}, #{leadsAssignedId,jdbcType=BIGINT}
#{mdDropOptionId,jdbcType=BIGINT}, #{trackScore,jdbcType=INTEGER}, #{leadsAssignedId,jdbcType=BIGINT},
#{trackTime,jdbcType=TIMESTAMP}
)
)
</insert>
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.marketing.MktLeadsAssignedTrack"
useGeneratedKeys=
"true"
>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.marketing.MktLeadsAssignedTrack"
useGeneratedKeys=
"true"
>
...
@@ -96,6 +98,9 @@
...
@@ -96,6 +98,9 @@
<if
test=
"leadsAssignedId != null"
>
<if
test=
"leadsAssignedId != null"
>
leads_assigned_id,
leads_assigned_id,
</if>
</if>
<if
test=
"trackTime != null"
>
track_time,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderId != null"
>
<if
test=
"orderId != null"
>
...
@@ -143,6 +148,9 @@
...
@@ -143,6 +148,9 @@
<if
test=
"leadsAssignedId != null"
>
<if
test=
"leadsAssignedId != null"
>
#{leadsAssignedId,jdbcType=BIGINT},
#{leadsAssignedId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"trackTime != null"
>
#{trackTime,jdbcType=TIMESTAMP},
</if>
</trim>
</trim>
</insert>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.marketing.MktLeadsAssignedTrack"
>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.marketing.MktLeadsAssignedTrack"
>
...
@@ -193,6 +201,9 @@
...
@@ -193,6 +201,9 @@
<if
test=
"leadsAssignedId != null"
>
<if
test=
"leadsAssignedId != null"
>
leads_assigned_id = #{leadsAssignedId,jdbcType=BIGINT},
leads_assigned_id = #{leadsAssignedId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"trackTime != null"
>
track_time = #{trackTime,jdbcType=TIMESTAMP},
</if>
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
...
@@ -212,7 +223,8 @@
...
@@ -212,7 +223,8 @@
customer_id = #{customerId,jdbcType=BIGINT},
customer_id = #{customerId,jdbcType=BIGINT},
md_drop_option_id = #{mdDropOptionId,jdbcType=BIGINT},
md_drop_option_id = #{mdDropOptionId,jdbcType=BIGINT},
track_score = #{trackScore,jdbcType=INTEGER},
track_score = #{trackScore,jdbcType=INTEGER},
leads_assigned_id = #{leadsAssignedId,jdbcType=BIGINT}
leads_assigned_id = #{leadsAssignedId,jdbcType=BIGINT},
track_time = #{trackTime,jdbcType=TIMESTAMP},
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<select
id=
"selectByPrimaryKeySelective"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKeySelective"
resultMap=
"BaseResultMap"
>
...
@@ -268,6 +280,47 @@
...
@@ -268,6 +280,47 @@
<if
test=
"leadsAssignedId != null"
>
<if
test=
"leadsAssignedId != null"
>
and leads_assigned_id = #{leadsAssignedId,jdbcType=BIGINT}
and leads_assigned_id = #{leadsAssignedId,jdbcType=BIGINT}
</if>
</if>
<if
test=
"trackTime != null"
>
and track_time = #{trackTime,jdbcType=TIMESTAMP}
</if>
</where>
</where>
</select>
</select>
<select
id=
"findByTrackTimeForNew"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_mkt_leads_assigned_track
<where>
to_days(track_time) = to_days(now())
<if
test=
"id != null"
>
and id = #{id}
</if>
<if
test=
"orderId != null"
>
and order_id = #{orderId,jdbcType=BIGINT}
</if>
<if
test=
"orderNo != null"
>
and order_no = #{orderNo,jdbcType=VARCHAR}
</if>
<if
test=
"salesNotice != null"
>
and sales_notice = #{salesNotice,jdbcType=VARCHAR}
</if>
<if
test=
"isActive != null"
>
and is_active = #{isActive,jdbcType=INTEGER}
</if>
<if
test=
"practitionerId != null"
>
and practitioner_id = #{practitionerId,jdbcType=BIGINT}
</if>
<if
test=
"customerId != null"
>
and customer_id = #{customerId,jdbcType=BIGINT}
</if>
<if
test=
"mdDropOptionId != null"
>
and md_drop_option_id = #{mdDropOptionId,jdbcType=BIGINT}
</if>
<if
test=
"trackScore != null"
>
and track_score = #{trackScore,jdbcType=INTEGER}
</if>
<if
test=
"leadsAssignedId != null"
>
and leads_assigned_id = #{leadsAssignedId,jdbcType=BIGINT}
</if>
</where>
</select>
</mapper>
</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