Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
3a0dab50
Commit
3a0dab50
authored
Jul 11, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改,逻辑优化
parent
d4720609
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
41 deletions
+64
-41
CustomerController.java
...a/com/dsk/web/controller/customer/CustomerController.java
+7
-8
CustomerFollowRecordListVo.java
...system/domain/customer/vo/CustomerFollowRecordListVo.java
+6
-0
CustomerMapper.java
...m/src/main/java/com/dsk/system/mapper/CustomerMapper.java
+1
-1
ICustomerService.java
...rc/main/java/com/dsk/system/service/ICustomerService.java
+3
-3
CustomerServiceImpl.java
...java/com/dsk/system/service/impl/CustomerServiceImpl.java
+14
-10
UrbanInvestmentPlatformServiceImpl.java
...stem/service/impl/UrbanInvestmentPlatformServiceImpl.java
+22
-8
CustomerMapper.xml
.../main/resources/mapper/system/customer/CustomerMapper.xml
+11
-11
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/customer/CustomerController.java
View file @
3a0dab50
...
@@ -196,8 +196,7 @@ public class CustomerController extends BaseController {
...
@@ -196,8 +196,7 @@ public class CustomerController extends BaseController {
/**
/**
* 客户状态
* 客户状态
*/
*/
@GetMapping
(
"/status/{customerId}"
)
@GetMapping
(
"/status/{companyName}"
)
@RepeatSubmit
public
AjaxResult
status
(
@PathVariable
String
companyName
)
{
public
AjaxResult
status
(
@PathVariable
String
companyName
)
{
return
AjaxResult
.
success
(
baseService
.
status
(
companyName
));
return
AjaxResult
.
success
(
baseService
.
status
(
companyName
));
}
}
...
@@ -206,18 +205,18 @@ public class CustomerController extends BaseController {
...
@@ -206,18 +205,18 @@ public class CustomerController extends BaseController {
/**
/**
* 取消认领
* 取消认领
*/
*/
@PutMapping
(
"/cancelClaim/{c
ustomerId
}"
)
@PutMapping
(
"/cancelClaim/{c
ompanyName
}"
)
@RepeatSubmit
@RepeatSubmit
public
AjaxResult
cancelClaim
(
@PathVariable
String
c
ustomerId
)
{
public
AjaxResult
cancelClaim
(
@PathVariable
String
c
ompanyName
)
{
return
toAjax
(
baseService
.
cancelClaim
(
c
ustomerId
));
return
toAjax
(
baseService
.
cancelClaim
(
c
ompanyName
));
}
}
/**
/**
* 历史认领
* 历史认领
*/
*/
@PutMapping
(
"/historyClaim/{c
ustomerId
}"
)
@PutMapping
(
"/historyClaim/{c
ompanyName
}"
)
@RepeatSubmit
@RepeatSubmit
public
AjaxResult
historyClaim
(
@PathVariable
String
c
ustomerId
)
{
public
AjaxResult
historyClaim
(
@PathVariable
String
c
ompanyName
)
{
return
toAjax
(
baseService
.
historyClaim
(
c
ustomerId
));
return
toAjax
(
baseService
.
historyClaim
(
c
ompanyName
));
}
}
}
}
dsk-system/src/main/java/com/dsk/system/domain/customer/vo/CustomerFollowRecordListVo.java
View file @
3a0dab50
...
@@ -40,9 +40,15 @@ public class CustomerFollowRecordListVo implements Serializable {
...
@@ -40,9 +40,15 @@ public class CustomerFollowRecordListVo implements Serializable {
* 拜访方式(visit_mode_type)
* 拜访方式(visit_mode_type)
*/
*/
private
String
visitMode
;
private
String
visitMode
;
/**
* 拜访时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
visitTime
;
/**
/**
* 下次拜访时间
* 下次拜访时间
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
nextVisitTime
;
private
Date
nextVisitTime
;
/**
/**
* 拜访对象姓名
* 拜访对象姓名
...
...
dsk-system/src/main/java/com/dsk/system/mapper/CustomerMapper.java
View file @
3a0dab50
...
@@ -28,7 +28,7 @@ public interface CustomerMapper extends BaseMapper<Customer> {
...
@@ -28,7 +28,7 @@ public interface CustomerMapper extends BaseMapper<Customer> {
List
<
CustomerStatusListVo
>
selectStatusList
(
@Param
(
"uipIds"
)
List
<
String
>
uipIds
,
@Param
(
"userId"
)
Long
userId
);
List
<
CustomerStatusListVo
>
selectStatusList
(
@Param
(
"uipIds"
)
List
<
String
>
uipIds
,
@Param
(
"userId"
)
Long
userId
);
List
<
String
>
selectUipIdList
(
@Param
(
"uipIds"
)
List
<
String
>
uipIds
,
@Param
(
"userId"
)
Long
userId
);
//
List<String> selectUipIdList(@Param("uipIds") List<String> uipIds, @Param("userId") Long userId);
}
}
dsk-system/src/main/java/com/dsk/system/service/ICustomerService.java
View file @
3a0dab50
...
@@ -29,12 +29,12 @@ public interface ICustomerService {
...
@@ -29,12 +29,12 @@ public interface ICustomerService {
List
<
CustomerStatusListVo
>
selectStatusList
(
List
<
String
>
uipIds
);
List
<
CustomerStatusListVo
>
selectStatusList
(
List
<
String
>
uipIds
);
List
<
String
>
selectUipIdList
(
List
<
String
>
uipIds
);
//
List<String> selectUipIdList(List<String> uipIds);
Integer
status
(
String
companyName
);
Integer
status
(
String
companyName
);
boolean
cancelClaim
(
String
c
ustomerId
);
boolean
cancelClaim
(
String
c
ompanyName
);
boolean
historyClaim
(
String
c
ustomerId
);
boolean
historyClaim
(
String
c
ompanyName
);
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/CustomerServiceImpl.java
View file @
3a0dab50
...
@@ -120,10 +120,10 @@ public class CustomerServiceImpl implements ICustomerService {
...
@@ -120,10 +120,10 @@ public class CustomerServiceImpl implements ICustomerService {
}
}
@Override
//
@Override
public
List
<
String
>
selectUipIdList
(
List
<
String
>
uipIds
)
{
//
public List<String> selectUipIdList(List<String> uipIds) {
return
baseMapper
.
selectUipIdList
(
uipIds
,
SecurityUtils
.
getUserId
());
//
return baseMapper.selectUipIdList(uipIds, SecurityUtils.getUserId());
}
//
}
@Override
@Override
public
Integer
status
(
String
companyName
)
{
public
Integer
status
(
String
companyName
)
{
...
@@ -139,18 +139,22 @@ public class CustomerServiceImpl implements ICustomerService {
...
@@ -139,18 +139,22 @@ public class CustomerServiceImpl implements ICustomerService {
}
}
@Override
@Override
public
boolean
cancelClaim
(
String
c
ustomerId
)
{
public
boolean
cancelClaim
(
String
c
ompanyName
)
{
return
updateClaimStatus
(
c
ustomerId
,
1
);
return
updateClaimStatus
(
c
ompanyName
,
1
);
}
}
@Override
@Override
public
boolean
historyClaim
(
String
c
ustomerId
)
{
public
boolean
historyClaim
(
String
c
ompanyName
)
{
return
updateClaimStatus
(
c
ustomerId
,
0
);
return
updateClaimStatus
(
c
ompanyName
,
0
);
}
}
//修改客户认领状态
//修改客户认领状态
private
boolean
updateClaimStatus
(
String
customerId
,
Integer
status
)
{
private
boolean
updateClaimStatus
(
String
companyName
,
Integer
status
)
{
CustomerUser
customerUser
=
customerUserMapper
.
selectByCustomerIdAndUserId
(
customerId
,
SecurityUtils
.
getUserId
());
Customer
cus
=
baseMapper
.
selectByCompanyNameAndUserId
(
companyName
,
SecurityUtils
.
getUserId
());
if
(
ObjectUtils
.
isEmpty
(
cus
))
{
throw
new
ServiceException
(
"数据错误!"
);
}
CustomerUser
customerUser
=
customerUserMapper
.
selectByCustomerIdAndUserId
(
cus
.
getCustomerId
(),
SecurityUtils
.
getUserId
());
if
(
ObjectUtils
.
isEmpty
(
customerUser
))
{
if
(
ObjectUtils
.
isEmpty
(
customerUser
))
{
throw
new
ServiceException
(
"数据错误!"
);
throw
new
ServiceException
(
"数据错误!"
);
}
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/UrbanInvestmentPlatformServiceImpl.java
View file @
3a0dab50
...
@@ -5,6 +5,7 @@ import com.dsk.acc.openapi.client.util.CommonUtils;
...
@@ -5,6 +5,7 @@ import com.dsk.acc.openapi.client.util.CommonUtils;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.dtos.UrbanInvestmentPlatformDto
;
import
com.dsk.common.dtos.UrbanInvestmentPlatformDto
;
import
com.dsk.common.utils.DskOpenApiUtil
;
import
com.dsk.common.utils.DskOpenApiUtil
;
import
com.dsk.system.domain.customer.vo.CustomerStatusListVo
;
import
com.dsk.system.service.ICustomerService
;
import
com.dsk.system.service.ICustomerService
;
import
com.dsk.system.service.UrbanInvestmentPlatformService
;
import
com.dsk.system.service.UrbanInvestmentPlatformService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
...
@@ -51,19 +52,32 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
...
@@ -51,19 +52,32 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
for
(
Object
dataMap
:
list
)
{
for
(
Object
dataMap
:
list
)
{
uipIds
.
add
(
MapUtils
.
getString
(
CommonUtils
.
assertAsMap
(
dataMap
),
"uipId"
));
uipIds
.
add
(
MapUtils
.
getString
(
CommonUtils
.
assertAsMap
(
dataMap
),
"uipId"
));
}
}
List
<
String
>
claimStatusList
=
iCustomerService
.
selectUipIdList
(
uipIds
);
// List<String> claimStatusList = iCustomerService.selectUipIdList(uipIds);
List
<
CustomerStatusListVo
>
customerStatusListVos
=
iCustomerService
.
selectStatusList
(
uipIds
);
//按照城投企业id合并两个list
//按照城投企业id合并两个list
//按照城投企业id合并两个list
for
(
Object
companyObj
:
list
)
{
for
(
Object
companyObj
:
list
)
{
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
String
uipId
=
MapUtils
.
getString
(
companyMap
,
"uipId"
,
"uipId"
);
String
uipId
=
MapUtils
.
getString
(
companyMap
,
"uipId"
);
if
(
CollectionUtils
.
isEmpty
(
claimStatusList
))
{
companyMap
.
put
(
"claimStatus"
,
0
);
companyMap
.
put
(
"claimStatus"
,
0
);
}
else
if
(
claimStatusList
.
contains
(
uipId
))
{
for
(
CustomerStatusListVo
vo
:
customerStatusListVos
)
{
if
(
uipId
.
equals
(
vo
.
getUipId
()))
{
companyMap
.
put
(
"claimStatus"
,
1
);
companyMap
.
put
(
"claimStatus"
,
1
);
}
else
{
companyMap
.
put
(
"claimStatus"
,
0
);
}
}
}
}
}
// for (Object companyObj : list) {
// Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
// String uipId = MapUtils.getString(companyMap, "uipId","uipId");
// if (CollectionUtils.isEmpty(claimStatusList)) {
// companyMap.put("claimStatus", 0);
// } else if (claimStatusList.contains(uipId)) {
// companyMap.put("claimStatus", 1);
// } else {
// companyMap.put("claimStatus", 0);
// }
// }
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
}
...
...
dsk-system/src/main/resources/mapper/system/customer/CustomerMapper.xml
View file @
3a0dab50
...
@@ -52,22 +52,22 @@
...
@@ -52,22 +52,22 @@
ct.customer_id, ct.uip_id
ct.customer_id, ct.uip_id
from customer ct
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
join customer_user ctu on ct.customer_id = ctu.customer_id
where ctu.user_id = #{userId} and ct.uip_id in
where ctu.user_id = #{userId} and ct
u.status = 0 and ct
.uip_id in
<foreach
collection=
"uipIds"
item=
"uipId"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"uipIds"
item=
"uipId"
open=
"("
separator=
","
close=
")"
>
#{uipId}
#{uipId}
</foreach>
</foreach>
</select>
</select>
<select
id=
"selectUipIdList"
resultType=
"java.lang.String"
>
<!-- <select id="selectUipIdList" resultType="java.lang.String">--
>
select
<!-- select-->
ct.uip_id
<!-- ct.uip_id-->
from customer ct
<!-- from customer ct-->
join customer_user ctu on ct.customer_id = ctu.customer_id
<!-- join customer_user ctu on ct.customer_id = ctu.customer_id-->
where ctu.user_id = #{userId} and ct.uip_id in
<!-- where ctu.user_id = #{userId} and ctu.status = 0 and ct.uip_id in-->
<foreach
collection=
"uipIds"
item=
"uipId"
open=
"("
separator=
","
close=
")"
>
<!-- <foreach collection="uipIds" item="uipId" open="(" separator="," close=")">--
>
#{uipId}
<!-- #{uipId}-->
</foreach
>
<!-- </foreach>--
>
</select
>
<!-- </select>--
>
</mapper>
</mapper>
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