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
d2efd970
Commit
d2efd970
authored
Jul 13, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改-经纪人添加自己的商机,打上标签
parent
09394238
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
0 deletions
+40
-0
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+4
-0
yd-api/src/main/java/com/yd/dal/mapper/meta/MdMkCampaignMapper.java
+3
-0
yd-api/src/main/java/com/yd/dal/service/meta/MdMkCampaignDALService.java
+2
-0
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdMkCampaignDALServiceImpl.java
+5
-0
yd-api/src/main/java/com/yd/rmi/cache/SystemConfigService.java
+19
-0
yd-api/src/main/resources/mapper/meta/MdMkCampaignMapper.xml
+7
-0
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
d2efd970
...
...
@@ -1251,6 +1251,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
//校验商机号码,手机号码对应的customer是否存在
String
mobileNo
=
requestVO
.
getMobileNo
();
AclCustomer
aclCustomer
=
aclCustomerDALService
.
findByMobileNo
(
mobileNo
);
Long
mdMkCampaignId
=
systemConfigService
.
getMdMkCampaignId
(
"leadaddedbypractioner"
);
//判断是否通过手机号码找到客户
if
(
aclCustomer
!=
null
){
MktLeadsAssigneds
mktLeadsAssigneds
=
new
MktLeadsAssigneds
();
...
...
@@ -1284,6 +1286,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
aclCustomer
.
setUpdatedAt
(
new
Date
());
aclCustomer
.
setUpdatedBy
(-
1L
);
aclCustomer
.
setChannelReferralRateId
(
3L
);
aclCustomer
.
setMktCampaign
(
String
.
valueOf
(
mdMkCampaignId
));
aclCustomerDALService
.
save
(
aclCustomer
);
}
customerId
=
aclCustomer
.
getId
();
...
...
@@ -1292,6 +1295,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
if
(
pool
==
null
){
//线索池为空时,保存线索池
pool
=
new
MktLeadsPool
();
pool
.
setMktCampaign
(
String
.
valueOf
(
mdMkCampaignId
));
pool
.
setCustomerId
(
customerId
);
pool
.
setHasAssigned
(
1
);
pool
.
setSourceFrom
(
requestVO
.
getSourceFrom
());
...
...
yd-api/src/main/java/com/yd/dal/mapper/meta/MdMkCampaignMapper.java
View file @
d2efd970
...
...
@@ -14,4 +14,6 @@ public interface MdMkCampaignMapper {
int
updateByPrimaryKeySelective
(
MdMkCampaign
record
);
int
updateByPrimaryKey
(
MdMkCampaign
record
);
MdMkCampaign
selectByCampaignCode
(
String
campaignCode
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/meta/MdMkCampaignDALService.java
View file @
d2efd970
...
...
@@ -4,4 +4,6 @@ import com.yd.dal.entity.meta.MdMkCampaign;
public
interface
MdMkCampaignDALService
{
MdMkCampaign
findByMktCampaignId
(
Long
mktCampaignId
);
MdMkCampaign
findByCampaignCode
(
String
campaignCode
);
}
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdMkCampaignDALServiceImpl.java
View file @
d2efd970
...
...
@@ -16,4 +16,9 @@ public class MdMkCampaignDALServiceImpl implements MdMkCampaignDALService {
public
MdMkCampaign
findByMktCampaignId
(
Long
mktCampaignId
)
{
return
mdMkCampaignMapper
.
selectByPrimaryKey
(
mktCampaignId
);
}
@Override
public
MdMkCampaign
findByCampaignCode
(
String
campaignCode
)
{
return
mdMkCampaignMapper
.
selectByCampaignCode
(
campaignCode
);
}
}
yd-api/src/main/java/com/yd/rmi/cache/SystemConfigService.java
View file @
d2efd970
package
com
.
yd
.
rmi
.
cache
;
import
com.yd.dal.entity.meta.MdCode
;
import
com.yd.dal.entity.meta.MdMkCampaign
;
import
com.yd.dal.service.meta.MdCodeDALService
;
import
com.yd.dal.service.meta.MdMkCampaignDALService
;
import
com.yd.rmi.ali.ossinterf.service.AliOssInterfService
;
import
com.yd.util.CommonUtil
;
import
net.sf.ehcache.Cache
;
...
...
@@ -13,6 +15,7 @@ import org.springframework.stereotype.Service;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Optional
;
@Service
(
"systemConfigService"
)
@org
.
springframework
.
core
.
annotation
.
Order
(
1
)
...
...
@@ -201,4 +204,20 @@ public class SystemConfigService implements CommandLineRunner{
SystemConstants
.
COMMON_SO_TIMEOUT
=
Integer
.
parseInt
(
getSingleConfigValue
(
"COMMON_SO_TIMEOUT"
));
aliOssInterfService
.
initAttribute
();
}
@Autowired
private
MdMkCampaignDALService
mdMkCampaignDALService
;
public
Long
getMdMkCampaignId
(
String
campaignCode
)
{
Long
configValue
=
null
;
Element
element
=
systemConfigCache
.
get
(
"campaignCode:"
+
campaignCode
);
if
(
element
!=
null
&&
element
.
getObjectValue
()
!=
null
){
configValue
=
(
Long
)
element
.
getObjectValue
();
}
else
{
MdMkCampaign
mkCampaign
=
mdMkCampaignDALService
.
findByCampaignCode
(
campaignCode
);
configValue
=
Optional
.
ofNullable
(
mkCampaign
).
map
(
c
->
c
.
getId
()).
orElse
(
null
);
element
=
new
Element
(
"campaignCode:"
+
campaignCode
,
configValue
);
systemConfigCache
.
put
(
element
);
}
return
configValue
;
}
}
yd-api/src/main/resources/mapper/meta/MdMkCampaignMapper.xml
View file @
d2efd970
...
...
@@ -166,4 +166,10 @@
created_by = #{createdBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectByCampaignCode"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_md_mk_campaign
where code = #{campaignCode,jdbcType=VARCHAR}
</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