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
d7501b6b
Commit
d7501b6b
authored
May 23, 2022
by
徐州
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手機號碼隱藏需求
parent
84620e31
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
251 additions
and
37 deletions
+251
-37
UserEntity.java
...s/src/main/java/com/house365/beans/entity/UserEntity.java
+14
-0
CallbackRecordController.java
...com/house365/web/controller/CallbackRecordController.java
+15
-1
CloudCustomerController.java
.../com/house365/web/controller/CloudCustomerController.java
+14
-5
CustomerController.java
.../java/com/house365/web/controller/CustomerController.java
+40
-5
CustomerManagementController.java
...house365/web/controller/CustomerManagementController.java
+25
-1
ExternalCustomerController.java
...m/house365/web/controller/ExternalCustomerController.java
+12
-1
InterfaceController.java
...java/com/house365/web/controller/InterfaceController.java
+1
-1
ManagerController.java
...n/java/com/house365/web/controller/ManagerController.java
+1
-1
MarketCustomerController.java
...com/house365/web/controller/MarketCustomerController.java
+23
-4
PlatformManagementController.java
...house365/web/controller/PlatformManagementController.java
+10
-0
PropertyReportController.java
...com/house365/web/controller/PropertyReportController.java
+6
-1
UserController.java
...main/java/com/house365/web/controller/UserController.java
+1
-0
form.jsp
...hgs-web/src/main/webapp/WEB-INF/views/user/pages/form.jsp
+19
-0
ICustomer.java
...ain/java/com/house365/ws/interfaces/server/ICustomer.java
+1
-1
CustomerImpl.java
...in/java/com/house365/ws/interfaces/impl/CustomerImpl.java
+2
-1
CustomerWechat.java
.../java/com/house365/ws/interfaces/rest/CustomerWechat.java
+20
-5
ProjectWechat.java
...n/java/com/house365/ws/interfaces/rest/ProjectWechat.java
+6
-0
User.xml
...365-hgs-ws/src/main/resources/development/ibatis/User.xml
+15
-3
UserMapper.xml
...-ws/src/main/resources/development/mybatis/UserMapper.xml
+6
-2
User.xml
house365-hgs-ws/src/main/resources/test/ibatis/User.xml
+14
-3
UserMapper.xml
...365-hgs-ws/src/main/resources/test/mybatis/UserMapper.xml
+6
-2
No files found.
house365-hgs-beans/src/main/java/com/house365/beans/entity/UserEntity.java
View file @
d7501b6b
...
...
@@ -228,6 +228,20 @@ public class UserEntity extends DomainObject implements Cloneable {
private
Integer
onlineStatus
;
private
Integer
isOpen
;
/**
* 用户是否可以看到完整的客户手机号码
* 1,可以
*/
private
Integer
showMobile
;
public
void
setShowMobile
(
Integer
showMobile
)
{
this
.
showMobile
=
showMobile
;
}
public
Integer
getShowMobile
()
{
return
showMobile
;
}
public
String
getManagerName
()
{
return
managerName
;
}
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/CallbackRecordController.java
View file @
d7501b6b
package
com
.
house365
.
web
.
controller
;
import
com.google.common.base.Strings
;
import
com.house365.beans.entity.CustomerCallbackRecordEntity
;
import
com.house365.beans.entity.DepartmentEntity
;
import
com.house365.beans.entity.UserEntity
;
import
com.house365.beans.system.Page
;
import
com.house365.web.system.controller.BaseController
;
import
com.house365.web.util.MobileUtil
;
import
com.house365.web.util.SessionConstants
;
import
com.house365.ws.beans.request.CustomerCallbackRecordListRequest
;
import
com.house365.ws.beans.response.CustomerCallbackRecordListResponse
;
...
...
@@ -19,7 +21,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springside.modules.web.Servlets
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 回访录音controller
...
...
@@ -93,7 +97,17 @@ public class CallbackRecordController extends BaseController {
CustomerCallbackRecordListResponse
response
=
customerCallbackRecord
.
getCustomerCallbackRecordList
(
listRequest
);
model
.
addAttribute
(
"page"
,
response
.
getPaging
());
List
<
CustomerCallbackRecordEntity
>
entities
=
response
.
getObjectList
();
/**
* 用户无权查看完整手机号
*/
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
entities
=
entities
.
stream
().
map
(
i
->
{
i
.
setPhone
(
MobileUtil
.
hidePhone
(
i
.
getPhone
()));
return
i
;
}).
collect
(
Collectors
.
toList
());
}
model
.
addAttribute
(
"page"
,
entities
);
model
.
addAttribute
(
"callbackrecords"
,
response
.
getObjectList
());
model
.
addAttribute
(
"searchParams"
,
Servlets
.
encodeParameterStringWithPrefix
(
searchParams
,
"search_"
));
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/CloudCustomerController.java
View file @
d7501b6b
package
com
.
house365
.
web
.
controller
;
import
com.google.common.base.Strings
;
import
com.house365.beans.entity.CloudActivityEntity
;
import
com.house365.beans.entity.CloudCustomerEntity
;
import
com.house365.beans.entity.DepartmentEntity
;
import
com.house365.beans.entity.UserEntity
;
import
com.house365.beans.entity.*
;
import
com.house365.beans.system.Page
;
import
com.house365.rest.parameter.House365RestObject
;
import
com.house365.rest.parameter.House365RestResponse
;
import
com.house365.web.system.controller.BaseController
;
import
com.house365.web.util.MobileUtil
;
import
com.house365.web.util.SessionConstants
;
import
com.house365.ws.beans.request.MapListRequest
;
import
com.house365.ws.beans.response.MapListResponse
;
...
...
@@ -31,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 云迹客户controller
...
...
@@ -81,11 +80,21 @@ public class CloudCustomerController extends BaseController {
listRequest
.
setPaging
(
page
);
listRequest
.
setSearchParams
(
searchParams
);
MapListResponse
response
=
cloudCustomerInterface
.
list
(
listRequest
,
activeId
);
List
<
Map
<
String
,
Object
>>
objectList
=
response
.
getObjectList
();
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
for
(
Map
<
String
,
Object
>
i
:
objectList
)
{
if
(
i
!=
null
&&
i
.
containsKey
(
"phone"
))
{
i
.
replace
(
"phone"
,
MobileUtil
.
hidePhone
(
String
.
valueOf
(
i
.
get
(
"phone"
))));
}
}
}
model
.
addAttribute
(
"waitCount"
,
response
.
getWaitCount
());
model
.
addAttribute
(
"sentCount"
,
response
.
getSentCount
());
model
.
addAttribute
(
"customerCount"
,
response
.
getCustomerCount
());
model
.
addAttribute
(
"page"
,
response
.
getPaging
());
model
.
addAttribute
(
"dataList"
,
response
.
getObjectList
()
);
model
.
addAttribute
(
"dataList"
,
objectList
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"查询云迹客户信息列表失败"
,
e
);
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/CustomerController.java
View file @
d7501b6b
...
...
@@ -52,6 +52,7 @@ import javax.servlet.http.HttpServletResponse;
import
javax.validation.Valid
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 客户信息控制器<br>
...
...
@@ -1141,6 +1142,14 @@ public class CustomerController extends BaseController {
labelFlag
=
false
;
model
.
addAttribute
(
"hasOwnlabel"
,
"0"
);
}
/**
* 用户无权查看完整手机号
*/
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
customerEntity
.
setPhone
(
MobileUtil
.
hidePhone
(
customerEntity
.
getPhone
()));
}
model
.
addAttribute
(
"userLabelList"
,
userLabelList
);
model
.
addAttribute
(
"labelFlag"
,
labelFlag
);
model
.
addAttribute
(
"action"
,
action
);
...
...
@@ -1899,9 +1908,19 @@ public class CustomerController extends BaseController {
}
}
List
<
CustomerEntity
>
customers
=
response
.
getObjectList
();
/**
* 用户无权查看完整手机号
*/
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
customers
=
customers
.
stream
().
map
(
i
->
{
i
.
setPhone
(
MobileUtil
.
hidePhone
(
i
.
getPhone
()));
return
i
;
}).
collect
(
Collectors
.
toList
());
}
model
.
addAttribute
(
"page"
,
response
.
getPaging
());
model
.
addAttribute
(
"customers"
,
response
.
getObjectList
()
);
model
.
addAttribute
(
"customers"
,
customers
);
//未曾使用
model
.
addAttribute
(
"searchParams"
,
Servlets
.
encodeParameterStringWithPrefix
(
searchParams
,
"search_"
));
...
...
@@ -2098,6 +2117,7 @@ public class CustomerController extends BaseController {
public
String
myRecordedCustomer
(
Integer
number
,
Model
model
,
HttpServletRequest
request
)
{
// 获取查询条件
Map
<
String
,
Object
>
searchParams
=
Servlets
.
getParametersStartingWith
(
request
,
"search_"
);
UserEntity
userEntity
=
(
UserEntity
)
request
.
getSession
().
getAttribute
(
SessionConstants
.
THREAD_USER_KEY
);
Page
page
=
new
Page
(
20
);
if
(
null
!=
number
)
{
page
.
setCurrentPage
(
number
);
...
...
@@ -2245,10 +2265,20 @@ public class CustomerController extends BaseController {
// 处理前台显示客户类型
handleDisplayCustomerType
(
response
.
getObjectList
());
List
<
CustomerEntity
>
customers
=
response
.
getObjectList
();
/**
* 用户无权查看完整手机号
*/
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
customers
=
customers
.
stream
().
map
(
i
->
{
i
.
setPhone
(
MobileUtil
.
hidePhone
(
i
.
getPhone
()));
return
i
;
}).
collect
(
Collectors
.
toList
());
}
model
.
addAttribute
(
"projectId"
,
projectId
);
model
.
addAttribute
(
"page"
,
response
.
getPaging
());
model
.
addAttribute
(
"customers"
,
response
.
getObjectList
()
);
model
.
addAttribute
(
"customers"
,
customers
);
model
.
addAttribute
(
"searchParams"
,
Servlets
.
encodeParameterStringWithPrefix
(
searchParams
,
"search_"
));
return
getAutoUrl
();
}
...
...
@@ -2312,7 +2342,9 @@ public class CustomerController extends BaseController {
* @return
*/
@RequestMapping
(
value
=
"updateProjectInfo/{cpId}"
,
method
=
RequestMethod
.
GET
)
public
String
updateProjectInfo
(
Model
model
,
@PathVariable
Integer
cpId
)
{
public
String
updateProjectInfo
(
Model
model
,
@PathVariable
Integer
cpId
,
HttpServletRequest
request
)
{
UserEntity
userEntity
=
(
UserEntity
)
request
.
getSession
().
getAttribute
(
SessionConstants
.
THREAD_USER_KEY
);
CustomerProjectResponse
cpr
=
customerProject
.
getCustomerProjectById
(
cpId
);
CustomerProjectEntity
cp
=
cpr
.
getEntity
();
...
...
@@ -2448,6 +2480,9 @@ public class CustomerController extends BaseController {
// 处理前台显示客户类型
handleDisplayCustomerType
(
ce
);
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
ce
.
setPhone
(
MobileUtil
.
hidePhone
(
ce
.
getPhone
()));
}
model
.
addAttribute
(
"entity"
,
cp
);
model
.
addAttribute
(
"customer"
,
ce
);
model
.
addAttribute
(
"project"
,
pe
);
...
...
@@ -2521,7 +2556,7 @@ public class CustomerController extends BaseController {
if
(!
Strings
.
isNullOrEmpty
(
customerId
)
&&
userEntity
!=
null
)
{
try
{
House365RestObject
<
String
>
hro
=
new
House365RestObject
();
String
url
=
customer
.
getCRMCustomerURL
(
Integer
.
valueOf
(
customerId
),
curid
,
curname
);
String
url
=
customer
.
getCRMCustomerURL
(
Integer
.
valueOf
(
customerId
),
curid
,
curname
,
userEntity
.
getShowMobile
()
);
hro
.
setEntity
(
url
);
restResponse
.
setData
(
hro
);
}
catch
(
Exception
e
)
{
...
...
@@ -2664,7 +2699,7 @@ public class CustomerController extends BaseController {
if
(!
Strings
.
isNullOrEmpty
(
customerId
)
&&
userEntity
!=
null
)
{
try
{
House365RestObject
<
String
>
hro
=
new
House365RestObject
();
String
url
=
customer
.
getCRMCustomerURL
(
Integer
.
valueOf
(
customerId
),
curid
,
curname
);
String
url
=
customer
.
getCRMCustomerURL
(
Integer
.
valueOf
(
customerId
),
curid
,
curname
,
userEntity
.
getShowMobile
()
);
hro
.
setEntity
(
url
);
restResponse
.
setData
(
hro
);
}
catch
(
Exception
e
)
{
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/CustomerManagementController.java
View file @
d7501b6b
...
...
@@ -23,6 +23,7 @@ import com.house365.rest.parameter.House365RestResponse;
import
com.house365.web.cached.RedisUtilsInterface
;
import
com.house365.web.system.controller.BaseController
;
import
com.house365.web.util.DateTimeUtils
;
import
com.house365.web.util.MobileUtil
;
import
com.house365.web.util.SessionConstants
;
import
com.house365.web.util.StringUtils
;
import
com.house365.ws.beans.request.*
;
...
...
@@ -44,6 +45,7 @@ import javax.servlet.http.HttpServletRequest;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 客户信息控制器<br>
...
...
@@ -897,6 +899,18 @@ public class CustomerManagementController extends BaseController {
}
}
}
/**
* 用户无权查看完整手机号
*/
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
customers
=
customers
.
stream
().
map
(
i
->
{
i
.
setPhone
(
MobileUtil
.
hidePhone
(
i
.
getPhone
()));
return
i
;
}).
collect
(
Collectors
.
toList
());
}
logger
.
error
(
"-------------------------4:"
+
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
model
.
addAttribute
(
"page"
,
response
.
getPaging
());
model
.
addAttribute
(
"customers"
,
customers
);
...
...
@@ -1424,8 +1438,18 @@ public class CustomerManagementController extends BaseController {
listRequest
.
setPaging
(
page
);
listRequest
.
setSearchParams
(
searchParams
);
MapListResponse
response
=
customer
.
successList
(
listRequest
,
userEntity
);
List
<
Map
<
String
,
Object
>>
objectList
=
response
.
getObjectList
();
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
for
(
Map
<
String
,
Object
>
i
:
objectList
)
{
if
(
i
!=
null
&&
i
.
containsKey
(
"phone"
))
{
i
.
replace
(
"phone"
,
MobileUtil
.
hidePhone
(
String
.
valueOf
(
i
.
get
(
"phone"
))));
}
}
}
model
.
addAttribute
(
"page"
,
response
.
getPaging
());
model
.
addAttribute
(
"dataList"
,
response
.
getObjectList
()
);
model
.
addAttribute
(
"dataList"
,
objectList
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"查询成交客户列表失败"
,
e
);
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/ExternalCustomerController.java
View file @
d7501b6b
...
...
@@ -6,6 +6,7 @@ import com.house365.beans.system.Page;
import
com.house365.rest.parameter.House365RestObject
;
import
com.house365.rest.parameter.House365RestResponse
;
import
com.house365.web.system.controller.BaseController
;
import
com.house365.web.util.MobileUtil
;
import
com.house365.web.util.SessionConstants
;
import
com.house365.ws.beans.request.MapListRequest
;
import
com.house365.ws.beans.response.AttachmentListResponse
;
...
...
@@ -264,8 +265,18 @@ public class ExternalCustomerController extends BaseController {
listRequest
.
setPaging
(
page
);
listRequest
.
setSearchParams
(
searchParams
);
MapListResponse
response
=
customerInterface
.
list
(
listRequest
);
List
<
Map
<
String
,
Object
>>
objectList
=
response
.
getObjectList
();
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
for
(
Map
<
String
,
Object
>
i
:
objectList
)
{
if
(
i
!=
null
&&
i
.
containsKey
(
"phone"
))
{
i
.
replace
(
"phone"
,
MobileUtil
.
hidePhone
(
String
.
valueOf
(
i
.
get
(
"phone"
))));
}
}
}
model
.
addAttribute
(
"page"
,
response
.
getPaging
());
model
.
addAttribute
(
"dataList"
,
response
.
getObjectList
()
);
model
.
addAttribute
(
"dataList"
,
objectList
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"查询外部客户列表失败"
,
e
);
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/InterfaceController.java
View file @
d7501b6b
...
...
@@ -196,5 +196,5 @@ public class InterfaceController {
throw
new
ServiceConfigException
(
"配置执行服务异常:配置的执行服务没有发布!"
);
}
return
iService
;
}
}
}
house365-hgs-web/src/main/java/com/house365/web/controller/ManagerController.java
View file @
d7501b6b
...
...
@@ -205,7 +205,7 @@ public class ManagerController extends BaseController {
if
(!
Strings
.
isNullOrEmpty
(
customerId
))
{
try
{
House365RestObject
<
String
>
hro
=
new
House365RestObject
();
String
url
=
customer
.
getCRMCustomerURL
(
Integer
.
valueOf
(
customerId
),
curId
,
curName
);
String
url
=
customer
.
getCRMCustomerURL
(
Integer
.
valueOf
(
customerId
),
curId
,
curName
,
userEntity
.
getShowMobile
()
);
hro
.
setEntity
(
url
);
restResponse
.
setData
(
hro
);
}
catch
(
Exception
e
)
{
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/MarketCustomerController.java
View file @
d7501b6b
...
...
@@ -24,6 +24,7 @@ import com.house365.rest.parameter.House365RestObject;
import
com.house365.rest.parameter.House365RestResponse
;
import
com.house365.web.cached.RedisUtilsInterface
;
import
com.house365.web.system.controller.BaseController
;
import
com.house365.web.util.MobileUtil
;
import
com.house365.web.util.SessionConstants
;
import
com.house365.web.util.StringUtils
;
import
com.house365.ws.beans.request.MarketCustomerListRequest
;
...
...
@@ -49,9 +50,11 @@ import org.springside.modules.web.Servlets;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 客户信息控制器<br>
...
...
@@ -277,20 +280,36 @@ public class MarketCustomerController extends BaseController {
}
}
List
<
MarketCustomerEntity
>
marketCustomers
=
new
ArrayList
<>();
if
(
"assigned"
.
equalsIgnoreCase
(
type
))
{
model
.
addAttribute
(
"page"
,
assignResponse
.
getPaging
());
model
.
addAttribute
(
"marketCustomers"
,
assignResponse
.
getObjectList
());
marketCustomers
.
addAll
(
assignResponse
.
getObjectList
());
// model.addAttribute("marketCustomers", );
}
else
if
(
"notassignandovertime"
.
equalsIgnoreCase
(
type
))
{
model
.
addAttribute
(
"page"
,
notassignandovertimeResponse
.
getPaging
());
model
.
addAttribute
(
"marketCustomers"
,
notassignandovertimeResponse
.
getObjectList
());
marketCustomers
.
addAll
(
notassignandovertimeResponse
.
getObjectList
());
// model.addAttribute("marketCustomers", notassignandovertimeResponse.getObjectList());
}
else
if
(
"abandon"
.
equalsIgnoreCase
(
type
))
{
model
.
addAttribute
(
"page"
,
abandonListResponse
.
getPaging
());
model
.
addAttribute
(
"marketCustomers"
,
abandonListResponse
.
getObjectList
());
marketCustomers
.
addAll
(
abandonListResponse
.
getObjectList
());
// model.addAttribute("marketCustomers", abandonListResponse.getObjectList());
}
else
{
model
.
addAttribute
(
"page"
,
response
.
getPaging
());
model
.
addAttribute
(
"marketCustomers"
,
response
.
getObjectList
());
marketCustomers
.
addAll
(
response
.
getObjectList
());
// model.addAttribute("marketCustomers", response.getObjectList());
}
/**
* 用户无权查看完整手机号
*/
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
marketCustomers
=
marketCustomers
.
stream
().
map
(
i
->
{
i
.
setPhone
(
MobileUtil
.
hidePhone
(
i
.
getPhone
()));
return
i
;
}).
collect
(
Collectors
.
toList
());
}
model
.
addAttribute
(
"marketCustomers"
,
marketCustomers
);
String
actId
=
String
.
valueOf
(
searchParams
.
get
(
"EQ_activeId"
));
if
(!
Strings
.
isNullOrEmpty
(
actId
))
{
MarketingActivityResponse
activity
=
marketingActivity
.
getMarketingActivityById
(
Integer
.
valueOf
(
actId
));
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/PlatformManagementController.java
View file @
d7501b6b
...
...
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Controller
@RequestMapping
(
"/platformmanagement"
)
...
...
@@ -419,6 +420,15 @@ public class PlatformManagementController extends BaseController {
}
}
}
/**
* 用户无权查看完整手机号
*/
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
customers
=
customers
.
stream
().
map
(
i
->
{
i
.
setPhone
(
MobileUtil
.
hidePhone
(
i
.
getPhone
()));
return
i
;
}).
collect
(
Collectors
.
toList
());
}
model
.
addAttribute
(
"page"
,
response
.
getPaging
());
model
.
addAttribute
(
"customers"
,
customers
);
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/PropertyReportController.java
View file @
d7501b6b
...
...
@@ -10,6 +10,7 @@ import com.house365.beans.vo.PropertyReportVo;
import
com.house365.commons.system.HttpClientUtil
;
import
com.house365.web.system.controller.BaseController
;
import
com.house365.web.util.MemoryPropertyPlaceholderConfigurer
;
import
com.house365.web.util.MobileUtil
;
import
com.house365.web.util.SessionConstants
;
import
com.house365.ws.beans.request.MapListRequest
;
import
com.house365.ws.beans.response.MapListResponse
;
...
...
@@ -91,8 +92,12 @@ public class PropertyReportController extends BaseController {
* @return 结果视图
*/
@RequestMapping
(
value
=
"toAdd/{customerId}"
)
public
String
toAdd
(
Model
model
,
@PathVariable
int
customerId
)
{
public
String
toAdd
(
Model
model
,
@PathVariable
int
customerId
,
HttpServletRequest
request
)
{
UserEntity
userEntity
=
(
UserEntity
)
request
.
getSession
().
getAttribute
(
SessionConstants
.
THREAD_USER_KEY
);
CustomerEntity
entity
=
customer
.
queryById
(
customerId
);
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
entity
.
setPhone
(
MobileUtil
.
hidePhone
(
entity
.
getPhone
()));
}
model
.
addAttribute
(
"data"
,
entity
);
return
getAutoUrl
(
"add"
);
}
...
...
house365-hgs-web/src/main/java/com/house365/web/controller/UserController.java
View file @
d7501b6b
...
...
@@ -533,6 +533,7 @@ public class UserController extends BaseController {
oldEntity
.
setMobile
(
entity
.
getMobile
());
oldEntity
.
setPosition
(
entity
.
getPosition
());
oldEntity
.
setIsFreeMan
(
entity
.
getIsFreeMan
());
oldEntity
.
setShowMobile
(
entity
.
getShowMobile
());
oldEntity
.
setLimitLogin
(
entity
.
getLimitLogin
());
request
.
setEntity
(
oldEntity
);
...
...
house365-hgs-web/src/main/webapp/WEB-INF/views/user/pages/form.jsp
View file @
d7501b6b
...
...
@@ -211,6 +211,25 @@
</c:if>
</div>
<div
class=
"span6 control-group"
>
<label
class=
"control-label"
>
数据安全:
</label>
<div
class=
"controls"
>
<c:choose>
<c:when
test=
"${action!='create' and action!='edit'}"
>
<span
class=
"inline"
>
<c:if
test=
"${'1' eq entity.showMobile}"
>
是
</c:if>
<c:if
test=
"${'1' ne entity.showMobile}"
>
否
</c:if></span>
</c:when>
<c:otherwise>
<input
type=
"checkbox"
name=
"entity.showMobile"
<
c:if
test=
"${'1' eq entity.showMobile}"
>
checked
</c:if>
value="1"/> 授权明文查看手机号(未授权用户仅可查看加密手机号)
</c:otherwise>
</c:choose>
</div>
</div>
<div
class=
"span6 control-group"
>
<label
class=
"control-label"
>
限制外网登录:
</label>
<div
class=
"controls"
>
...
...
house365-hgs-ws-interfaces/src/main/java/com/house365/ws/interfaces/server/ICustomer.java
View file @
d7501b6b
...
...
@@ -159,7 +159,7 @@ public interface ICustomer extends IService {
String
getCRMViewURL
(
String
city
,
String
phone
);
String
getCRMCustomerURL
(
Integer
customerId
,
String
curid
,
String
curname
);
String
getCRMCustomerURL
(
Integer
customerId
,
String
curid
,
String
curname
,
Integer
showMobile
);
String
crmAddCallBack
(
Integer
customerId
);
...
...
house365-hgs-ws/src/main/java/com/house365/ws/interfaces/impl/CustomerImpl.java
View file @
d7501b6b
...
...
@@ -2449,7 +2449,7 @@ public class CustomerImpl implements ICustomer {
}
@Override
public
String
getCRMCustomerURL
(
Integer
customerId
,
String
curid
,
String
cunname
)
{
public
String
getCRMCustomerURL
(
Integer
customerId
,
String
curid
,
String
cunname
,
Integer
showMobile
)
{
String
url
=
""
;
CustomerEntity
ce
=
customerService
.
getById
(
customerId
);
...
...
@@ -2460,6 +2460,7 @@ public class CustomerImpl implements ICustomer {
List
<
NameValuePair
>
pairs
=
new
ArrayList
<>();
pairs
.
add
(
new
BasicNameValuePair
(
"city"
,
ce
.
getCityCode
()
)
);
pairs
.
add
(
new
BasicNameValuePair
(
"memphone"
,
ce
.
getPhone
()
)
);
pairs
.
add
(
new
BasicNameValuePair
(
"showMobile"
,
String
.
valueOf
(
showMobile
)
)
);
crmUrl
+=
"&signature="
+
MD5
(
""
+
(
date
.
getTime
()
/
1000
)
+
"hgs"
)
+
"×tamp="
+
(
date
.
getTime
()
/
1000
);
crmUrl
+=
"&admin_id="
+
curid
+
"&admin_name="
+
cunname
;
...
...
house365-hgs-ws/src/main/java/com/house365/ws/interfaces/rest/CustomerWechat.java
View file @
d7501b6b
...
...
@@ -24,10 +24,7 @@ import com.house365.ws.dao.mapper.CustomerMergeMapper;
import
com.house365.ws.interfaces.server.*
;
import
com.house365.ws.service.interfaces.*
;
import
com.house365.ws.system.ReturnAppResult
;
import
com.house365.ws.util.Constant
;
import
com.house365.ws.util.MergeCustomerUtil
;
import
com.house365.ws.util.OperateLogUtils
;
import
com.house365.ws.util.PathUtil
;
import
com.house365.ws.util.*
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -42,6 +39,7 @@ import java.text.SimpleDateFormat;
import
java.util.*
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.stream.Collectors
;
import
static
com
.
house365
.
beans
.
common
.
MessageTypeEnum
.
NEWCUSTOMER
;
import
static
com
.
house365
.
ws
.
util
.
Constant
.
PAGENO
;
...
...
@@ -353,10 +351,14 @@ public class CustomerWechat implements ICustomerWechat {
// 取得所需参数
Map
<
String
,
Object
>
map
=
parameter
.
getArgs
();
House365RestResponse
<
CustomerEntity
>
response
=
new
House365RestResponse
<>();
String
phone
=
getMapValueByKey
(
Constant
.
CUSTOMER_PHONE
,
map
,
""
);
UserEntity
entity
=
getUserEntity
(
phone
);
// 业务层统一处理
try
{
House365RestObject
<
CustomerEntity
>
data
=
doGetHotLineCustomer
(
map
);
if
(
entity
.
getShowMobile
()
!=
1
)
{
data
.
getEntity
().
setPhone
(
MobileUtil
.
hidePhone
(
data
.
getEntity
().
getPhone
()));
}
response
.
setResult
(
ReturnAppResult
.
APP_SUCCESS
.
getResultCode
());
response
.
setMsg
(
ReturnAppResult
.
APP_SUCCESS
.
getResultMessage
());
response
.
setData
(
data
);
...
...
@@ -1196,7 +1198,14 @@ public class CustomerWechat implements ICustomerWechat {
customers
.
add
(
customerListVO
);
}
}
House365RestObject
object
=
new
House365RestObject
();
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
customers
=
customers
.
stream
().
map
(
i
->
{
i
.
setPhone
(
MobileUtil
.
hidePhone
(
i
.
getPhone
()));
return
i
;
}).
collect
(
Collectors
.
toList
());
}
object
.
setList
(
customers
);
response
.
setResult
(
ReturnAppResult
.
APP_SUCCESS
.
getResultCode
());
...
...
@@ -1537,6 +1546,12 @@ public class CustomerWechat implements ICustomerWechat {
}
House365RestObject
object
=
new
House365RestObject
();
if
(
userEntity
.
getShowMobile
()
!=
1
)
{
customerVOList
=
customerVOList
.
stream
().
map
(
i
->
{
i
.
setPhone
(
MobileUtil
.
hidePhone
(
i
.
getPhone
()));
return
i
;
}).
collect
(
Collectors
.
toList
());
}
object
.
setList
(
customerVOList
);
response
.
setResult
(
ReturnAppResult
.
APP_SUCCESS
.
getResultCode
());
...
...
house365-hgs-ws/src/main/java/com/house365/ws/interfaces/rest/ProjectWechat.java
View file @
d7501b6b
...
...
@@ -35,6 +35,7 @@ import com.house365.ws.system.ReturnAppResult;
import
com.house365.ws.system.ReturnResult
;
import
com.house365.ws.util.Constant
;
import
com.house365.ws.util.MergeCustomerUtil
;
import
com.house365.ws.util.MobileUtil
;
import
com.house365.ws.util.OperateLogUtils
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -270,10 +271,15 @@ public class ProjectWechat implements IProjectWechat {
// 取得所需参数
Map
<
String
,
Object
>
map
=
parameter
.
getArgs
();
House365RestResponse
<
CustomerEntity
>
response
=
new
House365RestResponse
<>();
String
phone
=
getMapValueByKey
(
Constant
.
CUSTOMER_PHONE
,
map
,
""
);
UserEntity
entity
=
getUserEntity
(
phone
);
// 业务层统一处理
try
{
House365RestObject
<
CustomerEntity
>
data
=
doGetCustomers
(
map
);
if
(
entity
.
getShowMobile
()
!=
1
)
{
data
.
getEntity
().
setPhone
(
MobileUtil
.
hidePhone
(
data
.
getEntity
().
getPhone
()));
}
response
.
setResult
(
ReturnAppResult
.
APP_SUCCESS
.
getResultCode
());
response
.
setMsg
(
ReturnAppResult
.
APP_SUCCESS
.
getResultMessage
());
response
.
setData
(
data
);
...
...
house365-hgs-ws/src/main/resources/development/ibatis/User.xml
View file @
d7501b6b
...
...
@@ -53,6 +53,7 @@
<result
property=
"wxCodeImgUrl"
column=
"wx_code_imgUrl"
/>
<result
property=
"promoteId"
column=
"promote_id"
/>
<result
property=
"onlineStatus"
column=
"online_status"
/>
<result
property=
"showMobile"
column=
"show_mobile"
/>
</resultMap>
<!-- 用于select查询公用抽取的列 -->
...
...
@@ -62,7 +63,7 @@
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin,
wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId,online_status AS onlineStatus
wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId,online_status AS onlineStatus
,show_mobile AS showMobile
]]>
</sql>
...
...
@@ -101,7 +102,7 @@
updateIp,
preLoginTime,
lastLoginTime,
hotlinephone, goodat, description, headImgURL, fullImgURL,isFreeMan,limitLogin,promote_id
hotlinephone, goodat, description, headImgURL, fullImgURL,isFreeMan,limitLogin,promote_id
,show_mobile
) VALUES (
#id#,
#name#,
...
...
@@ -129,7 +130,7 @@
#updateIp#,
#preLoginTime#,
#lastLoginTime#,
#hotlinephone#, #goodat#, #description#, #headImgURL#, #fullImgURL#,#isFreeMan#,#limitLogin#,#promoteId#
#hotlinephone#, #goodat#, #description#, #headImgURL#, #fullImgURL#,#isFreeMan#,#limitLogin#,#promoteId#
,#showMobile#
)
]]>
<selectKey
resultClass=
"java.lang.Integer"
type=
"post"
keyProperty=
"id"
>
...
...
@@ -347,6 +348,11 @@
promote_id = #promoteId#
]]>
</isNotEmpty>
<isNotEmpty
prepend=
","
property=
"showMobile"
>
<![CDATA[
show_mobile = #showMobile#
]]>
</isNotEmpty>
</dynamic>
WHERE
id = #id#
...
...
@@ -652,6 +658,12 @@
]]>
</isNotEmpty>
<isNotEmpty
prepend=
"AND"
property=
"searchFilters.showMobile"
>
<![CDATA[
showMobile $searchFilters.showMobile.operation$ #searchFilters.showMobile.value#
]]>
</isNotEmpty>
</isNotNull>
</dynamic>
<dynamic
prepend=
"ORDER BY"
>
...
...
house365-hgs-ws/src/main/resources/development/mybatis/UserMapper.xml
View file @
d7501b6b
...
...
@@ -47,6 +47,7 @@
<result
property=
"wxCodeImgUrl"
column=
"wx_code_imgUrl"
/>
<result
property=
"promoteId"
column=
"promote_id"
/>
<result
property=
"onlineStatus"
column=
"online_status"
/>
<result
property=
"showMobile"
column=
"show_mobile"
/>
</resultMap>
<resultMap
id=
"infoMap2"
type=
"com.house365.beans.entity.UserSimpleEntity"
>
...
...
@@ -91,7 +92,7 @@
SELECT id, name,realName, password, weiXinId, mediaId, mobile, cornet, deptId, deptUrlPath, position, gender,
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,wx_number,wx_code_imgUrl
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,wx_number,wx_code_imgUrl
,show_mobile
FROM user
where id = #{id} AND enabled = 1
</select>
...
...
@@ -147,6 +148,9 @@
<if
test=
"onlineStatus != null and onlineStatus >= 0"
>
AND online_status = #{onlineStatus}
</if>
<if
test=
"showMobile != null and showMobile >= 0"
>
AND show_mobile = #{showMobile}
</if>
<if
test=
"deptId != null and deptId >= 0 "
>
AND deptId = #{deptId}
</if>
...
...
@@ -227,7 +231,7 @@
select id, name,realName, password, weiXinId, mediaId, mobile, cornet, deptId, deptUrlPath, position, gender,
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin
,show_mobile
from user where name = #{name}
</select>
...
...
house365-hgs-ws/src/main/resources/test/ibatis/User.xml
View file @
d7501b6b
...
...
@@ -53,6 +53,7 @@
<result
property=
"wxCodeImgUrl"
column=
"wx_code_imgUrl"
/>
<result
property=
"promoteId"
column=
"promote_id"
/>
<result
property=
"onlineStatus"
column=
"online_status"
/>
<result
property=
"showMobile"
column=
"show_mobile"
/>
</resultMap>
<!-- 用于select查询公用抽取的列 -->
...
...
@@ -62,7 +63,7 @@
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin,
wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId,online_status AS onlineStatus
wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId,online_status AS onlineStatus
,show_mobile AS showMobile
]]>
</sql>
...
...
@@ -101,7 +102,7 @@
updateIp,
preLoginTime,
lastLoginTime,
hotlinephone, goodat, description, headImgURL, fullImgURL,isFreeMan,limitLogin,promote_id
hotlinephone, goodat, description, headImgURL, fullImgURL,isFreeMan,limitLogin,promote_id
,show_mobile
) VALUES (
#id#,
#name#,
...
...
@@ -129,7 +130,7 @@
#updateIp#,
#preLoginTime#,
#lastLoginTime#,
#hotlinephone#, #goodat#, #description#, #headImgURL#, #fullImgURL#,#isFreeMan#,#limitLogin#,#promoteId#
#hotlinephone#, #goodat#, #description#, #headImgURL#, #fullImgURL#,#isFreeMan#,#limitLogin#,#promoteId#
,#showMobile#
)
]]>
<selectKey
resultClass=
"java.lang.Integer"
type=
"post"
keyProperty=
"id"
>
...
...
@@ -347,6 +348,11 @@
promote_id = #promoteId#
]]>
</isNotEmpty>
<isNotEmpty
prepend=
","
property=
"showMobile"
>
<![CDATA[
show_mobile = #showMobile#
]]>
</isNotEmpty>
</dynamic>
WHERE
id = #id#
...
...
@@ -646,6 +652,11 @@
identityType $searchFilters.identityType.operation$ #searchFilters.identityType.value#
]]>
</isNotEmpty>
<isNotEmpty
prepend=
"AND"
property=
"searchFilters.showMobile"
>
<![CDATA[
showMobile $searchFilters.showMobile.operation$ #searchFilters.showMobile.value#
]]>
</isNotEmpty>
</isNotNull>
</dynamic>
...
...
house365-hgs-ws/src/main/resources/test/mybatis/UserMapper.xml
View file @
d7501b6b
...
...
@@ -47,6 +47,7 @@
<result
property=
"wxCodeImgUrl"
column=
"wx_code_imgUrl"
/>
<result
property=
"promoteId"
column=
"promote_id"
/>
<result
property=
"onlineStatus"
column=
"online_status"
/>
<result
property=
"showMobile"
column=
"show_mobile"
/>
</resultMap>
<resultMap
id=
"infoMap2"
type=
"com.house365.beans.entity.UserSimpleEntity"
>
...
...
@@ -91,7 +92,7 @@
SELECT id, name,realName, password, weiXinId, mediaId, mobile, cornet, deptId, deptUrlPath, position, gender,
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,wx_number,wx_code_imgUrl
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,wx_number,wx_code_imgUrl
,show_mobile
FROM user
where id = #{id} AND enabled = 1
</select>
...
...
@@ -150,6 +151,9 @@
<if
test=
"deptId != null and deptId >= 0 "
>
AND deptId = #{deptId}
</if>
<if
test=
"showMobile != null and showMobile >= 0"
>
AND show_mobile = #{showMobile}
</if>
<if
test=
"deptIdList != null and deptIdList.size() > 0 "
>
AND deptId in
<foreach
collection=
"deptIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
...
...
@@ -227,7 +231,7 @@
select id, name,realName, password, weiXinId, mediaId, mobile, cornet, deptId, deptUrlPath, position, gender,
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin
,show_mobile
from user where name = #{name}
</select>
...
...
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