Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
H
Hgs
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
徐州
Hgs
Commits
9df15cf1
Commit
9df15cf1
authored
Jun 07, 2022
by
徐州
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增客戶查詢需求
parent
fc143b23
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
485 additions
and
0 deletions
+485
-0
CustomerController.java
.../java/com/house365/web/controller/CustomerController.java
+96
-0
topbar.jsp
...hgs-web/src/main/webapp/WEB-INF/common/layouts/topbar.jsp
+3
-0
batchQuery.jsp
...c/main/webapp/WEB-INF/views/customer/pages/batchQuery.jsp
+115
-0
ICloudCustomerInterface.java
...ouse365/ws/interfaces/server/ICloudCustomerInterface.java
+7
-0
ICustomer.java
...ain/java/com/house365/ws/interfaces/server/ICustomer.java
+2
-0
IMarketCustomer.java
...va/com/house365/ws/interfaces/server/IMarketCustomer.java
+5
-0
CloudCustomerMapper.java
.../java/com/house365/ws/dao/mapper/CloudCustomerMapper.java
+2
-0
CustomerMapper.java
.../main/java/com/house365/ws/dao/mapper/CustomerMapper.java
+2
-0
CustomerMergeMapper.java
.../java/com/house365/ws/dao/mapper/CustomerMergeMapper.java
+2
-0
MarketCustomerMapper.java
...java/com/house365/ws/dao/mapper/MarketCustomerMapper.java
+4
-0
CloudCustomerImpl.java
...va/com/house365/ws/interfaces/impl/CloudCustomerImpl.java
+8
-0
CustomerImpl.java
...in/java/com/house365/ws/interfaces/impl/CustomerImpl.java
+37
-0
MarketCustomerImpl.java
...a/com/house365/ws/interfaces/impl/MarketCustomerImpl.java
+5
-0
MarketCustomerServiceImpl.java
...m/house365/ws/service/impl/MarketCustomerServiceImpl.java
+10
-0
MarketingActivityServiceImpl.java
...ouse365/ws/service/impl/MarketingActivityServiceImpl.java
+3
-0
IMarketCustomerService.java
...ouse365/ws/service/interfaces/IMarketCustomerService.java
+2
-0
CloudCustomerMapper.xml
...ain/resources/development/mybatis/CloudCustomerMapper.xml
+13
-0
CustomerMapper.xml
...src/main/resources/development/mybatis/CustomerMapper.xml
+37
-0
CustomerMergeMapper.xml
...ain/resources/development/mybatis/CustomerMergeMapper.xml
+31
-0
MarketCustomerMapper.xml
...in/resources/development/mybatis/MarketCustomerMapper.xml
+11
-0
CloudCustomerMapper.xml
...s/src/main/resources/test/mybatis/CloudCustomerMapper.xml
+14
-0
CustomerMapper.xml
...hgs-ws/src/main/resources/test/mybatis/CustomerMapper.xml
+36
-0
CustomerMergeMapper.xml
...s/src/main/resources/test/mybatis/CustomerMergeMapper.xml
+30
-0
MarketCustomerMapper.xml
.../src/main/resources/test/mybatis/MarketCustomerMapper.xml
+10
-0
No files found.
house365-hgs-web/src/main/java/com/house365/web/controller/CustomerController.java
View file @
9df15cf1
...
...
@@ -34,8 +34,10 @@ import com.house365.ws.beans.request.*;
import
com.house365.ws.beans.response.*
;
import
com.house365.ws.beans.util.HResult
;
import
com.house365.ws.interfaces.server.*
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.http.util.TextUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -3167,6 +3169,100 @@ public class CustomerController extends BaseController {
return
getAutoUrl
(
"transferCreator"
);
}
/**
* 获取批量转移客户人员列表
* @param model
* @param request
* @return
*/
@RequestMapping
(
value
=
"batchQuery"
,
method
=
RequestMethod
.
GET
)
public
String
batchQuery
(
Model
model
,
HttpServletRequest
request
)
{
UserEntity
userEntity
=
(
UserEntity
)
request
.
getSession
().
getAttribute
(
SessionConstants
.
THREAD_USER_KEY
);
String
mobilesStr
=
request
.
getParameter
(
"mobiles"
);
if
(
TextUtils
.
isEmpty
(
mobilesStr
))
{
return
getAutoUrl
();
}
String
[]
mobiles
=
mobilesStr
.
split
(
"\r\n"
);
System
.
out
.
println
(
mobilesStr
+
"----------------------------"
+
mobiles
.
length
);
List
<
String
>
phoneList
=
Arrays
.
stream
(
mobiles
).
filter
(
i
->
!
TextUtils
.
isEmpty
(
i
)).
collect
(
Collectors
.
toList
());
/**
* 公海
*/
// List<String> ghPhones = customer.getExistByPhone(phoneList,0);
List
<
String
>
ghPhones
=
new
ArrayList
<>();
/**
* 待派
*/
List
<
String
>
dpPhones
=
new
ArrayList
<>();
//待派1:客户营销
// List<String> dpKhyx = marketCustomer.getExistPhone(phoneList);
// dpPhones.addAll(dpKhyx);
//待派2:云迹
// List<String> dpYj = cloudCustomerInterface.getExistByPhone(phoneList,0);
// dpPhones.addAll(dpYj);
// 待派3:公海CRM导入
List
<
String
>
dpGh
=
customer
.
getExistByPhone
(
phoneList
,
1
);
dpPhones
.
addAll
(
dpGh
);
/**
* 私客
*/
List
<
String
>
skPhones
=
new
ArrayList
<>();
// skPhones.addAll(customer.getExistByPhone(phoneList,3));
// 待回访
skPhones
.
addAll
(
customer
.
getExistByPhone
(
phoneList
,
2
));
if
(
dpPhones
!=
null
)
{
StringBuilder
dpSb
=
new
StringBuilder
();
dpPhones
.
stream
().
forEach
(
i
->
{
dpSb
.
append
(
i
).
append
(
"\r\n"
);
});
phoneList
.
removeAll
(
dpPhones
);
model
.
addAttribute
(
"dpPhones"
,
dpSb
.
toString
());
}
if
(
skPhones
!=
null
)
{
StringBuilder
skSb
=
new
StringBuilder
();
skPhones
.
stream
().
forEach
(
i
->
{
skSb
.
append
(
i
).
append
(
"\r\n"
);
});
phoneList
.
removeAll
(
skPhones
);
model
.
addAttribute
(
"skPhones"
,
skSb
.
toString
());
}
if
(
ghPhones
!=
null
)
{
StringBuilder
ghSb
=
new
StringBuilder
();
ghPhones
.
stream
().
forEach
(
i
->
{
ghSb
.
append
(
i
).
append
(
"\r\n"
);
});
phoneList
.
removeAll
(
ghPhones
);
model
.
addAttribute
(
"ghPhones"
,
ghSb
.
toString
());
}
if
(
phoneList
!=
null
)
{
StringBuilder
qtSb
=
new
StringBuilder
();
phoneList
.
stream
().
forEach
(
i
->
{
qtSb
.
append
(
i
).
append
(
"\r\n"
);
});
model
.
addAttribute
(
"qtPhones"
,
qtSb
.
toString
());
}
model
.
addAttribute
(
"mobiles"
,
mobilesStr
);
model
.
addAttribute
(
"dpSize"
,
dpPhones
==
null
?
0
:
dpPhones
.
size
());
model
.
addAttribute
(
"skSize"
,
skPhones
==
null
?
0
:
skPhones
.
size
());
model
.
addAttribute
(
"ghSize"
,
ghPhones
==
null
?
0
:
ghPhones
.
size
());
model
.
addAttribute
(
"qtSize"
,
phoneList
.
size
());
return
getAutoUrl
();
}
/**
* 批量转移平台客户创建人
* @param request
...
...
house365-hgs-web/src/main/webapp/WEB-INF/common/layouts/topbar.jsp
View file @
9df15cf1
...
...
@@ -85,6 +85,9 @@
<shiro:hasPermission name="ZYBG">
<li><a href="${ctx}/propertyreport/list">我的置业报告</a></li>
</shiro:hasPermission>
<shiro:hasPermission name="ZYBG">
<li><a href="${ctx}/customer/batchQuery">客户查询</a></li>
</shiro:hasPermission>
</ul>
</li>
</shiro:hasPermission>
...
...
house365-hgs-web/src/main/webapp/WEB-INF/views/customer/pages/batchQuery.jsp
0 → 100644
View file @
9df15cf1
<
%@
include
file=
"/WEB-INF/common/layouts/common.jsp"
%
>
<
%@
page
language=
"java"
pageEncoding=
"UTF-8"
%
>
<html>
<head>
<title>
客户查询
</title>
</head>
<body>
<div
class=
"container"
style=
"width: 1200px;"
>
<form
id=
"input_form"
class=
"form-horizontal valid"
action=
"${ctx}/customer/batchQuery"
method=
"get"
>
<house365:flushMessage/>
<div
class=
"row${fluid}"
>
<div>
<div
class=
"form-horizontal house365Page"
>
<div
class=
"house365Border"
>
<!-- 片段头 begin -->
<div
class=
"sectionTitle"
>
<h5>
客户查询
</h5>
</div>
<div
class=
"row-fluid"
>
<div
class=
"span6 control-group"
>
<label
class=
"control-label"
>
手机号:
</label>
<div
class=
"controls"
>
<textarea
rows=
"10"
cols=
"200"
id=
"mobiles"
style=
"width: 200%"
placeholder=
"请输入手机号码,一行一个"
name=
"mobiles"
class=
"required"
>
${mobiles}
</textarea>
</div>
</div>
</div>
<button
class=
"btn blue"
type=
"submit"
><i
class=
"icon-search"
></i>
查询
</div>
</div>
</div>
</div>
</form>
<br/>
<div
class=
"row${fluid}"
>
<div>
<div
class=
"form-horizontal house365Page"
>
<div
class=
"house365Border"
>
<!-- 片段头 begin -->
<div
class=
"sectionTitle"
>
<h5>
查询结果
</h5>
</div>
<div
class=
"row-fluid"
>
<div
class=
"span6 control-group"
>
<label
class=
"control-label"
>
公海(${ghSize}):
</label>
<div
class=
"controls"
>
<textarea
rows=
"5"
id=
"ghmobiles"
style=
"width: 200%"
name=
"ghmobiles"
class=
"required"
>
${ghPhones}
</textarea>
</div>
</div>
</div>
<div
class=
"row-fluid"
>
<div
class=
"span6 control-group"
>
<label
class=
"control-label"
>
私客池(${skSize}):
</label>
<div
class=
"controls"
>
<textarea
rows=
"5"
id=
"skmobiles"
style=
"width: 200%"
name=
"skmobiles"
class=
"required"
>
${skPhones}
</textarea>
</div>
</div>
</div>
<div
class=
"row-fluid"
>
<div
class=
"span6 control-group"
>
<label
class=
"control-label"
>
待派工(${dpSize}):
</label>
<div
class=
"controls"
>
<textarea
rows=
"5"
id=
"tpmobiles"
style=
"width: 200%"
name=
"tpmobiles"
class=
"required"
>
${dpPhones}
</textarea>
</div>
</div>
</div>
<div
class=
"row-fluid"
>
<div
class=
"span6 control-group"
>
<label
class=
"control-label"
>
其他(${qtSize}):
<br/>
未进入系统的用户
</label>
<div
class=
"controls"
>
<textarea
rows=
"5"
id=
"qtmobiles"
style=
"width: 200%"
name=
"qtmobiles"
class=
"required"
>
${qtPhones}
</textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
function
batchQuery
()
{
/* var $form = $("#input_form");
$.ajax({
url: $form.attr("action")+"?222=111",
type: "GET",
data: $form.serialize(),
success: function (data) {
alert(111);
}
}); */
}
</script>
</div>
</body>
</html>
house365-hgs-ws-interfaces/src/main/java/com/house365/ws/interfaces/server/ICloudCustomerInterface.java
View file @
9df15cf1
...
...
@@ -23,4 +23,11 @@ public interface ICloudCustomerInterface {
HResult
judgeCustomer
(
int
id
);
void
updateById
(
int
customerId
,
UserEntity
userEntity
);
/**
* 查询给定手机号是不是云迹数据
* @param phoneList
* @return
*/
List
<
String
>
getExistByPhone
(
List
<
String
>
phoneList
,
int
status
);
}
house365-hgs-ws-interfaces/src/main/java/com/house365/ws/interfaces/server/ICustomer.java
View file @
9df15cf1
...
...
@@ -273,4 +273,6 @@ public interface ICustomer extends IService {
void
batchTransferCreator
(
String
[]
customerIds
,
String
[]
userIds
,
UserEntity
userEntity
,
int
type
)
throws
Exception
;
int
queryCountById
(
Integer
userId
);
List
<
String
>
getExistByPhone
(
List
<
String
>
phoneList
,
int
type
);
}
house365-hgs-ws-interfaces/src/main/java/com/house365/ws/interfaces/server/IMarketCustomer.java
View file @
9df15cf1
...
...
@@ -13,6 +13,7 @@
*/
package
com
.
house365
.
ws
.
interfaces
.
server
;
import
com.house365.beans.entity.MarketCustomerEntity
;
import
com.house365.rest.context.IService
;
import
com.house365.rest.parameter.House365RestResponse
;
import
com.house365.ws.beans.request.MarketCustomerListRequest
;
...
...
@@ -21,6 +22,8 @@ import com.house365.ws.beans.response.MarketCustomerListResponse;
import
com.house365.ws.beans.response.MarketCustomerResponse
;
import
com.house365.ws.beans.util.HResult
;
import
java.util.List
;
/**
* 客户信息WS接口<br>
...
...
@@ -89,4 +92,6 @@ public interface IMarketCustomer extends IService{
HResult
judgeCustomer
(
int
id
);
List
<
String
>
getExistPhone
(
List
<
String
>
phoneList
);
}
house365-hgs-ws/src/main/java/com/house365/ws/dao/mapper/CloudCustomerMapper.java
View file @
9df15cf1
...
...
@@ -23,4 +23,6 @@ public interface CloudCustomerMapper {
int
queryCount
(
Map
<
String
,
Object
>
map
);
void
update
(
CloudCustomerEntity
entity
);
List
<
String
>
getExistByPhone
(
Map
<
String
,
Object
>
map
);
}
house365-hgs-ws/src/main/java/com/house365/ws/dao/mapper/CustomerMapper.java
View file @
9df15cf1
...
...
@@ -101,4 +101,6 @@ public interface CustomerMapper {
void
updatePtCustomerCreaterMerge
(
Map
<
String
,
Object
>
map
);
int
queryCountById
(
Integer
userId
);
List
<
String
>
getExistByPhone
(
Map
<
String
,
Object
>
map
);
}
house365-hgs-ws/src/main/java/com/house365/ws/dao/mapper/CustomerMergeMapper.java
View file @
9df15cf1
...
...
@@ -82,5 +82,7 @@ public interface CustomerMergeMapper {
List
<
CustomerEntity
>
getAllCustomer3
(
Map
<
String
,
Object
>
map
);
List
<
CustomerEntity
>
getAllCustomer4
(
Map
<
String
,
Object
>
map
);
List
<
String
>
getExistByPhone
(
Map
<
String
,
Object
>
map
);
}
house365-hgs-ws/src/main/java/com/house365/ws/dao/mapper/MarketCustomerMapper.java
View file @
9df15cf1
package
com
.
house365
.
ws
.
dao
.
mapper
;
import
com.house365.beans.entity.MarketCustomerEntity
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -12,4 +14,6 @@ import java.util.Map;
public
interface
MarketCustomerMapper
{
void
updateCustomerId
(
Map
<
String
,
Object
>
map
);
List
<
String
>
getExistByPhone
(
Map
<
String
,
Object
>
map
);
}
house365-hgs-ws/src/main/java/com/house365/ws/interfaces/impl/CloudCustomerImpl.java
View file @
9df15cf1
...
...
@@ -370,4 +370,12 @@ public class CloudCustomerImpl implements ICloudCustomerInterface {
}
}
@Override
public
List
<
String
>
getExistByPhone
(
List
<
String
>
phoneList
,
int
status
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"phoneList"
,
phoneList
);
map
.
put
(
"status"
,
status
);
return
mapper
.
getExistByPhone
(
map
);
}
}
house365-hgs-ws/src/main/java/com/house365/ws/interfaces/impl/CustomerImpl.java
View file @
9df15cf1
...
...
@@ -3226,4 +3226,41 @@ public class CustomerImpl implements ICustomer {
@Override
public
void
commit
()
{
}
/**
* 判断手机号是都在表里
* @param phoneList
* @param type 0,【公海】
* 1,【待派】待派CRM
* 2,【私客】待回访
* 3,【私客】customer_merge表
* @return
*/
@Override
public
List
<
String
>
getExistByPhone
(
List
<
String
>
phoneList
,
int
type
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
10
);
map
.
put
(
"phoneList"
,
phoneList
);
map
.
put
(
"is_delete"
,
0
);
if
(
type
==
0
)
{
map
.
put
(
"manager_id"
,
0
);
//不能有manager_id
}
else
if
(
type
==
1
)
{
// CRM导入
map
.
put
(
"createSource"
,
"CRM导入"
);
map
.
put
(
"isRecycled"
,
0
);
map
.
put
(
"notBuyIntention"
,
"5"
);
map
.
put
(
"manager_id"
,
0
);
}
else
if
(
type
==
2
)
{
map
.
put
(
"hotlone"
,
0
);
map
.
put
(
"isWaitCall"
,
1
);
map
.
put
(
"manager_id"
,
1
);
}
if
(
type
==
3
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"phoneList"
,
phoneList
);
return
customermergemapper
.
getExistByPhone
(
param
);
}
return
customerMapper
.
getExistByPhone
(
map
);
}
}
house365-hgs-ws/src/main/java/com/house365/ws/interfaces/impl/MarketCustomerImpl.java
View file @
9df15cf1
...
...
@@ -334,4 +334,9 @@ public class MarketCustomerImpl implements IMarketCustomer {
@Override
public
void
commit
()
{
}
@Override
public
List
<
String
>
getExistPhone
(
List
<
String
>
phoneList
)
{
return
marketCustomerService
.
getExistPhone
(
phoneList
);
}
}
house365-hgs-ws/src/main/java/com/house365/ws/service/impl/MarketCustomerServiceImpl.java
View file @
9df15cf1
...
...
@@ -26,6 +26,7 @@ import com.house365.ws.dao.interfaces.ICustomerDao;
import
com.house365.ws.dao.interfaces.IMarketCustomerDao
;
import
com.house365.ws.dao.interfaces.IMarketingActivityDao
;
import
com.house365.ws.dao.mapper.CustomerMapper
;
import
com.house365.ws.dao.mapper.MarketCustomerMapper
;
import
com.house365.ws.dao.mapper.UserMapper
;
import
com.house365.ws.interfaces.impl.CustomerImpl
;
import
com.house365.ws.service.interfaces.IMarketCustomerService
;
...
...
@@ -70,6 +71,8 @@ public class MarketCustomerServiceImpl<T extends MarketCustomerEntity> extends D
private
UserMapper
userMapper
;
@Autowired
private
OperateLogUtils
logUtils
;
@Autowired
private
MarketCustomerMapper
marketCustomerMapper
;
@Override
protected
Dao
<
T
>
getDao
()
{
...
...
@@ -166,4 +169,11 @@ public class MarketCustomerServiceImpl<T extends MarketCustomerEntity> extends D
}
}
@Override
public
List
<
String
>
getExistPhone
(
List
<
String
>
phones
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"phoneList"
,
phones
);
List
<
String
>
list
=
marketCustomerMapper
.
getExistByPhone
(
map
);
return
list
;
}
}
house365-hgs-ws/src/main/java/com/house365/ws/service/impl/MarketingActivityServiceImpl.java
View file @
9df15cf1
...
...
@@ -205,4 +205,7 @@ public class MarketingActivityServiceImpl<T extends MarketingActivityEntity> ext
marketingActivityDao
.
addBughtCount
(
id
);
}
}
house365-hgs-ws/src/main/java/com/house365/ws/service/interfaces/IMarketCustomerService.java
View file @
9df15cf1
...
...
@@ -46,4 +46,6 @@ public interface IMarketCustomerService<T extends MarketCustomerEntity> extends
void
removeCustomer
(
CustomerEntity
custmerId
,
Integer
userId
)
throws
ServiceRunException
;
List
<
String
>
getExistPhone
(
List
<
String
>
phones
);
}
house365-hgs-ws/src/main/resources/development/mybatis/CloudCustomerMapper.xml
View file @
9df15cf1
...
...
@@ -384,4 +384,16 @@
</if>
</select>
<select
id=
"getExistByPhone"
parameterType=
"map"
resultType=
"String"
>
SELECT DISTINCT phone FROM cloud_customer where is_delete = 0 and status = #{status}
<if
test=
"phoneList != null and phoneList.size() > 0 "
>
and phone IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
house365-hgs-ws/src/main/resources/development/mybatis/CustomerMapper.xml
View file @
9df15cf1
...
...
@@ -890,4 +890,40 @@
and customer_source_type=8
and creater=#{userId}
</select>
<select
id=
"getExistByPhone"
parameterType=
"map"
resultType=
"String"
>
SELECT DISTINCT phone FROM customer where 1=1
<if
test=
"status != null and status != '' "
>
AND status = #{status}
</if>
<if
test=
"manager_id != null and manager_id == 0"
>
AND manager_id IS NULL
</if>
<if
test=
"manager_id != null and manager_id == 1"
>
AND manager_id IS NOT NULL
</if>
<if
test=
"createSource != null and createSource != '' "
>
AND create_source = #{createSource}
</if>
<if
test=
"isRecycled != null and isRecycled >=0"
>
AND isRecycled = #{isRecycled}
</if>
<if
test=
"notBuyIntention != null and notBuyIntention != ''"
>
AND buy_intention != #{notBuyIntention}
</if>
<if
test=
"hotlone != null and hotlone != ''"
>
AND status in (11,0,99)
</if>
<if
test=
"isWaitCall != null and isWaitCall != ''"
>
AND isWaitCall = #{isWaitCall}
</if>
<if
test=
"phoneList != null and phoneList.size() > 0 "
>
and phone IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
house365-hgs-ws/src/main/resources/development/mybatis/CustomerMergeMapper.xml
View file @
9df15cf1
...
...
@@ -1232,4 +1232,35 @@
</if>
</select>
<select
id=
"getExistByPhone"
parameterType=
"map"
resultType=
"String"
>
SELECT DISTINCT phone FROM customer_merge where is_delete = 0 and
STATUS IN ( 11, 0, 99 ) AND
( isWaitCall = 0 OR isWaitCall IS NULL )
<if
test=
"phoneList != null and phoneList.size() > 0 "
>
and (
phone IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
OR bak_phone1 IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
OR bak_phone2 IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
OR bak_phone3 IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
</if>
</select>
</mapper>
house365-hgs-ws/src/main/resources/development/mybatis/MarketCustomerMapper.xml
View file @
9df15cf1
...
...
@@ -67,4 +67,14 @@
WHERE id = #{id}
</update>
<select
id=
"getExistByPhone"
parameterType=
"map"
resultType=
"String"
>
SELECT DISTINCT phone FROM market_customer where (a.manager_id is null or a.manager_id = '')
<if
test=
"phoneList != null and phoneList.size() > 0 "
>
and phone IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
house365-hgs-ws/src/main/resources/test/mybatis/CloudCustomerMapper.xml
View file @
9df15cf1
...
...
@@ -384,4 +384,17 @@
</if>
</select>
<select
id=
"getExistByPhone"
parameterType=
"map"
resultType=
"String"
>
SELECT DISTINCT phone FROM cloud_customer where is_delete = 0 and status = #{status}
<if
test=
"phoneList != null and phoneList.size() > 0 "
>
and phone IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
house365-hgs-ws/src/main/resources/test/mybatis/CustomerMapper.xml
View file @
9df15cf1
...
...
@@ -868,4 +868,39 @@
and customer_source_type=8
and creater=#{userId}
</select>
<select
id=
"getExistByPhone"
parameterType=
"map"
resultType=
"String"
>
SELECT DISTINCT phone FROM customer where 1=1
<if
test=
"status != null and status != '' "
>
AND status = #{status}
</if>
<if
test=
"manager_id != null and manager_id == 0"
>
AND manager_id IS NULL
</if>
<if
test=
"manager_id != null and manager_id == 1"
>
AND manager_id IS NOT NULL
</if>
<if
test=
"createSource != null and createSource != '' "
>
AND create_source = #{createSource}
</if>
<if
test=
"isRecycled != null and isRecycled >=0"
>
AND isRecycled = #{isRecycled}
</if>
<if
test=
"notBuyIntention != null and notBuyIntention != ''"
>
AND buy_intention != #{notBuyIntention}
</if>
<if
test=
"hotlone != null and hotlone != ''"
>
AND status in (11,0,99)
</if>
<if
test=
"isWaitCall != null and isWaitCall != ''"
>
AND isWaitCall = #{isWaitCall}
</if>
<if
test=
"phoneList != null and phoneList.size() > 0 "
>
and phone IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
house365-hgs-ws/src/main/resources/test/mybatis/CustomerMergeMapper.xml
View file @
9df15cf1
...
...
@@ -1235,4 +1235,34 @@
</if>
</select>
<select
id=
"getExistByPhone"
parameterType=
"map"
resultType=
"String"
>
SELECT DISTINCT phone FROM customer_merge where is_delete = 0 and
STATUS IN ( 11, 0, 99 ) AND
( isWaitCall = 0 OR isWaitCall IS NULL )
<if
test=
"phoneList != null and phoneList.size() > 0 "
>
and (
phone IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
OR bak_phone1 IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
OR bak_phone2 IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
OR bak_phone3 IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
</if>
</select>
</mapper>
house365-hgs-ws/src/main/resources/test/mybatis/MarketCustomerMapper.xml
View file @
9df15cf1
...
...
@@ -66,5 +66,14 @@
customerId = #{customerId}
WHERE id = #{id}
</update>
<select
id=
"getExistByPhone"
parameterType=
"map"
resultType=
"String"
>
SELECT DISTINCT phone FROM market_customer where (a.manager_id is null or a.manager_id = '')
<if
test=
"phoneList != null and phoneList.size() > 0 "
>
and phone IN
<foreach
collection=
"phoneList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</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