Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
LuJin-Im
Project
Project
Details
Activity
Releases
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
yangzhaojun
LuJin-Im
Commits
5d0127b4
Commit
5d0127b4
authored
Jul 14, 2018
by
李博今
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加客服管理功能
parent
664cb6c5
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1158 additions
and
55 deletions
+1158
-55
layim.js
layui/lay/modules/layim.js
+2
-1
FilesInfoService.java
...va/com/qiqiim/webserver/sys/service/FilesInfoService.java
+2
-0
FilesInfoServiceImpl.java
...qiim/webserver/sys/service/impl/FilesInfoServiceImpl.java
+23
-1
ImController.java
...va/com/qiqiim/webserver/user/controller/ImController.java
+105
-0
SessionController.java
...m/qiqiim/webserver/user/controller/SessionController.java
+2
-1
UserAccountDao.java
...in/java/com/qiqiim/webserver/user/dao/UserAccountDao.java
+10
-0
UserAccountDao.xml
...ain/java/com/qiqiim/webserver/user/dao/UserAccountDao.xml
+27
-0
UserAdminInfoDao.java
.../java/com/qiqiim/webserver/user/dao/UserAdminInfoDao.java
+2
-0
UserAdminInfoDao.xml
...n/java/com/qiqiim/webserver/user/dao/UserAdminInfoDao.xml
+4
-0
UserDepartmentDao.xml
.../java/com/qiqiim/webserver/user/dao/UserDepartmentDao.xml
+5
-5
UserInfoDao.java
src/main/java/com/qiqiim/webserver/user/dao/UserInfoDao.java
+4
-0
UserInfoDao.xml
src/main/java/com/qiqiim/webserver/user/dao/UserInfoDao.xml
+8
-0
ConsultantManagerEntity.java
.../qiqiim/webserver/user/model/ConsultantManagerEntity.java
+76
-0
ImFriendUserInfoData.java
...com/qiqiim/webserver/user/model/ImFriendUserInfoData.java
+9
-3
UserAccountService.java
...com/qiqiim/webserver/user/service/UserAccountService.java
+6
-0
UserAdminInfoService.java
...m/qiqiim/webserver/user/service/UserAdminInfoService.java
+2
-0
UserInfoService.java
...va/com/qiqiim/webserver/user/service/UserInfoService.java
+4
-0
UserAccountServiceImpl.java
...m/webserver/user/service/impl/UserAccountServiceImpl.java
+33
-0
UserAdminInfoServiceImpl.java
...webserver/user/service/impl/UserAdminInfoServiceImpl.java
+5
-0
UserInfoServiceImpl.java
...qiim/webserver/user/service/impl/UserInfoServiceImpl.java
+10
-0
conljjlwsultant.jsp
src/main/webapp/WEB-INF/page/user/conljjlwsultant.jsp
+219
-0
conljjyfsultant.jsp
src/main/webapp/WEB-INF/page/user/conljjyfsultant.jsp
+220
-0
consultantlist.jsp
src/main/webapp/WEB-INF/page/user/consultantlist.jsp
+250
-0
addconsultant.jsp
src/main/webapp/addconsultant.jsp
+127
-0
layim.js
src/main/webapp/layui/lay/modules/layim.js
+2
-1
manager.jsp
src/main/webapp/manager.jsp
+1
-43
No files found.
layui/lay/modules/layim.js
View file @
5d0127b4
This diff is collapsed.
Click to expand it.
src/main/java/com/qiqiim/webserver/sys/service/FilesInfoService.java
View file @
5d0127b4
...
...
@@ -9,5 +9,7 @@ public interface FilesInfoService {
public
String
savePicture
(
MultipartFile
file
,
String
newname
,
String
path
);
public
String
saveFiles
(
MultipartFile
file
,
String
newname
,
String
path
)
;
public
String
saveHeadPic
(
MultipartFile
file
,
String
newname
,
String
path
);
}
src/main/java/com/qiqiim/webserver/sys/service/impl/FilesInfoServiceImpl.java
View file @
5d0127b4
...
...
@@ -79,6 +79,28 @@ public class FilesInfoServiceImpl implements FilesInfoService {
}
}
return
fileUrl
;
}
}
@Override
public
String
saveHeadPic
(
MultipartFile
file
,
String
newname
,
String
path
)
{
String
fileUrl
=
""
;
if
(
StringUtils
.
isEmpty
(
file
.
getOriginalFilename
())){
return
fileUrl
;
}
String
[]
name
=
FileUtil
.
splitFileName
(
file
.
getOriginalFilename
());
boolean
b
=
FileUtil
.
validateImgType
(
name
[
1
]);
//文件类型验证通过
if
(
b
){
try
{
File
tempFile
=
new
File
(
path
,
newname
+
"."
+
name
[
1
]);
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
tempFile
);
fileUrl
=
newname
+
"."
+
name
[
1
];
//大图裁剪
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
return
fileUrl
;
}
}
src/main/java/com/qiqiim/webserver/user/controller/ImController.java
View file @
5d0127b4
...
...
@@ -12,6 +12,7 @@ import com.qiqiim.webserver.user.dao.UserAdminInfoDao;
import
com.qiqiim.webserver.user.model.*
;
import
com.qiqiim.webserver.user.service.*
;
import
org.apache.commons.lang.time.DateFormatUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -61,6 +62,30 @@ public class ImController extends BaseController {
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ImController
.
class
);
/**
* 列表
*/
@RequestMapping
(
"/consultantlist"
)
public
String
consultantlist
(
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
){
request
.
setAttribute
(
"allsession"
,
userAccountServiceImpl
.
getAllConsultant
(
0
l
));
return
"user/consultantlist"
;
}
@RequestMapping
(
"/consultantlist1"
)
public
String
consultantlist1
(
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
){
request
.
setAttribute
(
"allsession"
,
userAccountServiceImpl
.
getAllConsultant
(
1
l
));
return
"user/conljtycsultant"
;
}
@RequestMapping
(
"/consultantlist3"
)
public
String
consultantlist3
(
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
){
request
.
setAttribute
(
"allsession"
,
userAccountServiceImpl
.
getAllConsultant
(
3
l
));
return
"user/conljjlwsultant"
;
}
@RequestMapping
(
"/consultantlist4"
)
public
String
consultantlist4
(
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
){
request
.
setAttribute
(
"allsession"
,
userAccountServiceImpl
.
getAllConsultant
(
4
l
));
return
"user/conljjyfsultant"
;
}
/**
* 单聊
*/
...
...
@@ -491,6 +516,86 @@ public class ImController extends BaseController {
}
return
resultList
;
}
/**
* 头像上传
*
* @param file
* @param response
* @param request
* @param redirectAttributes
* @param uid
* @return
* @throws Exception
*/
@RequestMapping
(
value
=
"/headpicupload"
,
produces
=
"multipart/form-data"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
ModelAndView
uploadHeadPic
(
@RequestParam
MultipartFile
file
,
HttpServletResponse
response
,
HttpServletRequest
request
,
RedirectAttributes
redirectAttributes
,
@Param
(
value
=
"fileName"
)
Long
uid
,
@Param
(
value
=
"whereToGo"
)
String
whereToGo
)
throws
Exception
{
String
fileName
=
uid
+
"hp"
;
String
path
=
request
.
getSession
().
getServletContext
().
getRealPath
(
"/layui/images/headpic/"
);
String
files
=
filesInfoServiceImpl
.
saveHeadPic
(
file
,
fileName
,
path
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
String
>
submap
=
new
HashMap
<
String
,
String
>();
if
(
whereToGo
==
null
){
whereToGo
=
""
;
}
if
(
files
.
length
()
>
0
)
{
userInfoServiceImpl
.
updateHeadPic
(
"layui/images/headpic/"
+
fileName
+
".jpg"
,
uid
);
return
new
ModelAndView
(
"redirect:/consultantlist"
+
whereToGo
);
}
return
new
ModelAndView
(
"redirect:/consultantlist"
+
whereToGo
);
}
@RequestMapping
(
value
=
"/updateConsultantDetail"
,
produces
=
"text/html;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
ModelAndView
userHistoryMessagesPage
(
ConsultantManagerEntity
consultantManagerEntity
)
throws
Exception
{
userAccountServiceImpl
.
updateDetail
(
consultantManagerEntity
);
if
(
consultantManagerEntity
.
getWhereToGo
()
==
null
){
consultantManagerEntity
.
setWhereToGo
(
""
);
}
return
new
ModelAndView
(
"redirect:/consultantlist"
+
consultantManagerEntity
.
getWhereToGo
());
}
@RequestMapping
(
value
=
"/addConsultant"
,
method
=
RequestMethod
.
POST
)
public
ModelAndView
addConsultant
(
@Param
(
value
=
"whereToGo"
)
String
whereToGo
,
@Param
(
value
=
"account"
)
String
account
,
@Param
(
value
=
"password"
)
String
password
,
@Param
(
value
=
"phone"
)
String
phone
,
@Param
(
value
=
"deptid"
)
Long
deptid
,
@Param
(
value
=
"name"
)
String
name
){
UserAccountEntity
userAccountEntity
=
new
UserAccountEntity
();
userAccountEntity
.
setAccount
(
account
);
userAccountEntity
.
setPassword
(
password
);
UserInfoEntity
userInfoEntity
=
new
UserInfoEntity
();
userInfoEntity
.
setDeptid
(
deptid
);
userInfoEntity
.
setName
(
name
);
userInfoEntity
.
setPhone
(
phone
);
userAccountEntity
.
setUserInfo
(
userInfoEntity
);
userAccountServiceImpl
.
save
(
userAccountEntity
);
if
(
whereToGo
==
null
){
whereToGo
=
""
;
}
return
new
ModelAndView
(
"redirect:/consultantlist"
+
whereToGo
);
}
@RequestMapping
(
value
=
"/delConsultant"
,
method
=
RequestMethod
.
POST
)
public
ModelAndView
delConsultant
(
@Param
(
value
=
"whereToGo"
)
String
whereToGo
,
@Param
(
value
=
"id"
)
long
id
){
userAdminInfoServiceImpl
.
delByUid
(
id
);
userInfoServiceImpl
.
delByUid
(
id
);
userAccountServiceImpl
.
delete
(
id
);
if
(
whereToGo
==
null
){
whereToGo
=
""
;
}
return
new
ModelAndView
(
"redirect:/consultantlist"
+
whereToGo
);
}
}
...
...
src/main/java/com/qiqiim/webserver/user/controller/SessionController.java
View file @
5d0127b4
...
...
@@ -35,7 +35,6 @@ public class SessionController extends BaseController{
private
SessionManager
sessionManager
;
@Autowired
private
ImConnertor
connertor
;
/**
...
...
@@ -46,6 +45,8 @@ public class SessionController extends BaseController{
request
.
setAttribute
(
"allsession"
,
sessionManager
.
getSessions
());
return
"user/userlist"
;
}
/**
* 列表
...
...
src/main/java/com/qiqiim/webserver/user/dao/UserAccountDao.java
View file @
5d0127b4
...
...
@@ -3,7 +3,9 @@ import java.util.List;
import
java.util.Map
;
import
com.qiqiim.webserver.base.dao.BaseDao
;
import
com.qiqiim.webserver.user.model.ConsultantManagerEntity
;
import
com.qiqiim.webserver.user.model.UserAccountEntity
;
import
org.apache.ibatis.annotations.Param
;
/**
* 用户帐号
...
...
@@ -20,4 +22,12 @@ public interface UserAccountDao extends BaseDao<UserAccountEntity> {
public
List
getAllLongTimeUserId
();
public
int
deleteLongTimeUser
(
List
<
Long
>
list
);
public
List
<
ConsultantManagerEntity
>
getAllConsultant
(
@Param
(
value
=
"tiaojian"
)
String
tiaojian
);
public
int
updateConsultantDept
(
@Param
(
value
=
"deptName"
)
String
deptName
,
@Param
(
value
=
"id"
)
long
id
);
public
int
updateConsultantPhone
(
@Param
(
value
=
"phone"
)
String
phone
,
@Param
(
value
=
"id"
)
long
id
);
public
int
updateConsultantName
(
@Param
(
value
=
"name"
)
String
name
,
@Param
(
value
=
"id"
)
long
id
);
}
src/main/java/com/qiqiim/webserver/user/dao/UserAccountDao.xml
View file @
5d0127b4
...
...
@@ -21,6 +21,11 @@
<!-- 一对多查询 -->
<!-- <collection property="*list" column="id" select="*"></collection> -->
</resultMap>
<resultMap
id=
"consultantMap"
type=
"com.qiqiim.webserver.user.model.ConsultantManagerEntity"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"account"
column=
"account"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id ,
...
...
@@ -131,4 +136,26 @@
#{arr}
</foreach>
</delete>
<select
id=
"getAllConsultant"
resultMap=
"consultantMap"
>
select ua.id, ua.account, ud.name as deptName, ui.name as name, ui.phone as phone, ui.profilephoto as headPic
from user_account ua
left join user_info ui on ua.id = ui.uid
left join user_department ud on ui.deptid = ud.id
where ${tiaojian}
</select>
<update
id=
"updateConsultantName"
>
update user_info set name = #{name} where uid = #{id}
</update>
<update
id=
"updateConsultantDept"
>
update user_info set deptid =
#{deptName}
where uid = #{id}
</update>
<update
id=
"updateConsultantPhone"
>
update user_info set phone = #{phone} where uid = #{id}
</update>
</mapper>
\ No newline at end of file
src/main/java/com/qiqiim/webserver/user/dao/UserAdminInfoDao.java
View file @
5d0127b4
...
...
@@ -18,4 +18,6 @@ public interface UserAdminInfoDao extends BaseDao<UserAdminInfoEntity> {
int
save
(
long
uid
);
List
<
UserAdminInfoEntity
>
sortOnlineAdmin
(
List
list
);
int
delByUid
(
long
uid
);
}
src/main/java/com/qiqiim/webserver/user/dao/UserAdminInfoDao.xml
View file @
5d0127b4
...
...
@@ -57,4 +57,8 @@
<insert
id=
"save"
>
INSERT INTO user_admin_info (uid,reply_user_num,reply_message_num) VALUE (#{uid},0,0);
</insert>
<delete
id=
"delByUid"
>
delete from user_admin_info where uid = #{uid}
</delete>
</mapper>
\ No newline at end of file
src/main/java/com/qiqiim/webserver/user/dao/UserDepartmentDao.xml
View file @
5d0127b4
...
...
@@ -52,7 +52,7 @@
</select>
<select
id=
"queryFriendUser"
resultType=
"com.qiqiim.webserver.user.model.ImFriendUserInfoData"
>
select uid as id ,name as username , signature as sign , profilephoto as avatar from user_info where deptid = #{id}
select uid as id ,name as username , signature as sign , profilephoto as avatar
, phone as telephone
from user_info where deptid = #{id}
</select>
<select
id=
"queryGroupAndUser"
resultMap=
"userFriendMap"
>
...
...
@@ -68,12 +68,12 @@
</select>
<select
id=
"usersQueryUser"
resultType=
"com.qiqiim.webserver.user.model.ImFriendUserInfoData"
>
select uid as id ,name as username , signature as sign , profilephoto as avatar from user_info where deptid = #{id}
select uid as id ,name as username , signature as sign , profilephoto as avatar
, phone as telephone
from user_info where deptid = #{id}
and uid = #{uid}
</select>
<select
id=
"usersQueryUser2"
resultType=
"com.qiqiim.webserver.user.model.ImFriendUserInfoData"
>
select uid as id ,name as username , signature as sign , profilephoto as avatar from user_info where deptid = #{id}
select uid as id ,name as username , signature as sign , profilephoto as avatar
, phone as telephone
from user_info where deptid = #{id}
</select>
<select
id=
"adminsQueryGroupAndUser"
resultMap=
"userFriendMapWithoutCollection"
>
...
...
@@ -81,13 +81,13 @@
</select>
<select
id=
"adminsGetHistoryUser"
resultType=
"com.qiqiim.webserver.user.model.ImFriendUserInfoData"
>
select DISTINCT uid as id ,name as username , signature as sign , profilephoto as avatar
from user_info
select DISTINCT uid as id ,name as username , signature as sign , profilephoto as avatar
, phone as telephone
from user_info
left join user_message um on um.senduser = user_info.uid or um.receiveuser = user_info.uid
where deptid = #{id} and (senduser = #{userId} or receiveuser =#{userId})
</select>
<select
id=
"adminsGetAllUser"
resultType=
"com.qiqiim.webserver.user.model.ImFriendUserInfoData"
>
select DISTINCT uid as id ,name as username , signature as sign , profilephoto as avatar from user_info
select DISTINCT uid as id ,name as username , signature as sign , profilephoto as avatar
, phone as telephone
from user_info
where deptid = #{id} ${allId}
</select>
...
...
src/main/java/com/qiqiim/webserver/user/dao/UserInfoDao.java
View file @
5d0127b4
...
...
@@ -17,4 +17,8 @@ public interface UserInfoDao extends BaseDao<UserInfoEntity> {
int
deleteLongTimeInfo
(
List
<
Long
>
list
);
List
getAllAdminId
(
@Param
(
value
=
"deptId"
)
String
deptId
);
int
updateHeadPic
(
@Param
(
value
=
"path"
)
String
path
,
@Param
(
value
=
"id"
)
long
id
);
int
delByUid
(
@Param
(
value
=
"id"
)
long
id
);
}
src/main/java/com/qiqiim/webserver/user/dao/UserInfoDao.xml
View file @
5d0127b4
...
...
@@ -81,6 +81,10 @@
<select
id=
"getAllAdminId"
resultType=
"long"
>
select uid from user_info where ${deptId}
</select>
<update
id=
"updateHeadPic"
>
update user_info set profilephoto = #{path} where uid = #{id};
</update>
<insert
id=
"save"
parameterType=
"com.qiqiim.webserver.user.model.UserInfoEntity"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into user_info
...
...
@@ -158,6 +162,10 @@
<delete
id=
"delete"
>
delete from user_info where id = #{value}
</delete>
<delete
id=
"delByUid"
>
delete from user_info where uid = #{id}
</delete>
<delete
id=
"deleteBatch"
>
delete from user_info where id in
...
...
src/main/java/com/qiqiim/webserver/user/model/ConsultantManagerEntity.java
0 → 100644
View file @
5d0127b4
/**
* createby : lbj
* date : 2018/7/13
* desc :
**/
package
com
.
qiqiim
.
webserver
.
user
.
model
;
public
class
ConsultantManagerEntity
{
private
String
id
;
private
String
account
;
private
String
deptName
;
private
String
name
;
private
String
phone
;
private
String
headPic
;
private
String
whereToGo
;
public
String
getWhereToGo
()
{
return
whereToGo
;
}
public
void
setWhereToGo
(
String
whereToGo
)
{
this
.
whereToGo
=
whereToGo
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getAccount
()
{
return
account
;
}
public
void
setAccount
(
String
account
)
{
this
.
account
=
account
;
}
public
String
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getHeadPic
()
{
return
headPic
;
}
public
void
setHeadPic
(
String
headPic
)
{
this
.
headPic
=
headPic
;
}
}
src/main/java/com/qiqiim/webserver/user/model/ImFriendUserInfoData.java
View file @
5d0127b4
...
...
@@ -9,6 +9,7 @@ public class ImFriendUserInfoData {
public
String
avatar
;
//好友头像
public
String
sign
;
//签名
public
String
status
=
"offline"
;
//若值为offline代表离线,online或者不填为在线
public
String
telephone
;
public
Long
getId
()
{
return
id
;
...
...
@@ -42,7 +43,12 @@ public class ImFriendUserInfoData {
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getTelephone
()
{
return
telephone
;
}
public
void
setTelephone
(
String
telephone
)
{
this
.
telephone
=
telephone
;
}
}
src/main/java/com/qiqiim/webserver/user/service/UserAccountService.java
View file @
5d0127b4
package
com
.
qiqiim
.
webserver
.
user
.
service
;
import
com.qiqiim.webserver.user.model.ConsultantManagerEntity
;
import
com.qiqiim.webserver.user.model.UserAccountEntity
;
import
java.io.UnsupportedEncodingException
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -33,4 +35,8 @@ public interface UserAccountService {
int
deleteBatch
(
Long
[]
ids
);
long
getUserDept
(
long
deptId
);
List
<
ConsultantManagerEntity
>
getAllConsultant
(
Long
deptId
);
int
updateDetail
(
ConsultantManagerEntity
consultantManagerEntity
)
throws
UnsupportedEncodingException
;
}
src/main/java/com/qiqiim/webserver/user/service/UserAdminInfoService.java
View file @
5d0127b4
...
...
@@ -17,4 +17,6 @@ public interface UserAdminInfoService {
List
<
UserAdminInfoEntity
>
sortOnlineAdmin
(
List
<
Long
>
list
);
int
save
(
long
uid
);
int
delByUid
(
long
uid
);
}
src/main/java/com/qiqiim/webserver/user/service/UserInfoService.java
View file @
5d0127b4
...
...
@@ -29,4 +29,8 @@ public interface UserInfoService {
int
deleteBatch
(
Long
[]
ids
);
List
getAllAdminId
(
String
deptId
);
int
updateHeadPic
(
String
path
,
long
id
);
int
delByUid
(
long
uid
);
}
src/main/java/com/qiqiim/webserver/user/service/impl/UserAccountServiceImpl.java
View file @
5d0127b4
package
com
.
qiqiim
.
webserver
.
user
.
service
.
impl
;
import
java.io.UnsupportedEncodingException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.qiqiim.webserver.user.model.ConsultantManagerEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -79,6 +81,37 @@ public class UserAccountServiceImpl implements UserAccountService {
return
userAccountDao
.
getUserDept
(
deptId
);
}
@Override
public
List
<
ConsultantManagerEntity
>
getAllConsultant
(
Long
deptId
)
{
String
tiaojian
=
""
;
if
(
deptId
==
1L
){
tiaojian
=
" deptid = 1"
;
}
else
if
(
deptId
==
3L
){
tiaojian
=
" deptid = 3"
;
}
else
if
(
deptId
==
4L
){
tiaojian
=
" deptid = 4"
;
}
else
{
tiaojian
=
" deptid != 2"
;
}
return
userAccountDao
.
getAllConsultant
(
tiaojian
);
}
@Override
public
int
updateDetail
(
ConsultantManagerEntity
consultantManagerEntity
)
throws
UnsupportedEncodingException
{
int
i
=
0
;
if
(
consultantManagerEntity
.
getDeptName
()
!=
null
&&
!
""
.
equals
(
consultantManagerEntity
.
getDeptName
())){
i
+=
userAccountDao
.
updateConsultantDept
(
new
String
(
consultantManagerEntity
.
getDeptName
().
getBytes
(
"iso8859-1"
),
"UTF-8"
),
Long
.
parseLong
(
consultantManagerEntity
.
getId
()));
}
if
(
consultantManagerEntity
.
getName
()
!=
null
&&
!
""
.
equals
(
consultantManagerEntity
.
getName
())){
i
+=
userAccountDao
.
updateConsultantName
(
new
String
(
consultantManagerEntity
.
getName
().
getBytes
(
"iso8859-1"
),
"UTF-8"
),
Long
.
parseLong
(
consultantManagerEntity
.
getId
()));
}
if
(
consultantManagerEntity
.
getPhone
()
!=
null
&&
!
""
.
equals
(
consultantManagerEntity
.
getPhone
())){
i
+=
userAccountDao
.
updateConsultantPhone
(
new
String
(
consultantManagerEntity
.
getPhone
().
getBytes
(
"iso8859-1"
),
"UTF-8"
),
Long
.
parseLong
(
consultantManagerEntity
.
getId
()));
}
return
i
;
}
@Override
public
UserAccountEntity
queryObjectByAccount
(
Map
<
String
,
Object
>
map
)
{
return
userAccountDao
.
queryObjectByAccount
(
map
);
...
...
src/main/java/com/qiqiim/webserver/user/service/impl/UserAdminInfoServiceImpl.java
View file @
5d0127b4
...
...
@@ -31,4 +31,9 @@ public class UserAdminInfoServiceImpl implements UserAdminInfoService {
public
int
save
(
long
uid
)
{
return
userAdminInfoDao
.
save
(
uid
);
}
@Override
public
int
delByUid
(
long
uid
)
{
return
userAdminInfoDao
.
delByUid
(
uid
);
}
}
src/main/java/com/qiqiim/webserver/user/service/impl/UserInfoServiceImpl.java
View file @
5d0127b4
...
...
@@ -57,4 +57,14 @@ public class UserInfoServiceImpl implements UserInfoService {
return
userInfoDao
.
getAllAdminId
(
deptId
);
}
@Override
public
int
updateHeadPic
(
String
path
,
long
id
)
{
return
userInfoDao
.
updateHeadPic
(
path
,
id
);
}
@Override
public
int
delByUid
(
long
uid
)
{
return
userInfoDao
.
delByUid
(
uid
);
}
}
src/main/webapp/WEB-INF/page/user/conljjlwsultant.jsp
0 → 100644
View file @
5d0127b4
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/page/user/conljjyfsultant.jsp
0 → 100644
View file @
5d0127b4
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/page/user/consultantlist.jsp
0 → 100644
View file @
5d0127b4
This diff is collapsed.
Click to expand it.
src/main/webapp/addconsultant.jsp
0 → 100644
View file @
5d0127b4
<%@ page
language=
"java"
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%>
<!doctype html>
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<meta
name=
"renderer"
content=
"webkit"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<title>
置业顾问系统
</title>
<link
href=
"img/icon.ico"
rel=
"SHORTCUT ICON"
/>
<link
rel=
"stylesheet"
href=
"layui/css/layui.css"
>
</head>
<body>
<div
style=
"margin: 30px;"
>
<fieldset
class=
"layui-elem-field index-button"
style=
"margin-top: 30px"
>
<legend>
注册
</legend>
<div>
<form
class=
"layui-form"
action=
""
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
账号
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"account"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"请输入账号"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
密码
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"password"
lay-verify=
"required"
placeholder=
"请输入密码"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
姓名
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"userInfo.name"
lay-verify=
"required"
placeholder=
"请输入姓名"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
所在部门
</label>
<div
class=
"layui-input-block"
>
<select
name=
"userInfo.deptid"
lay-verify=
"required"
>
<option
value=
"1"
>
路劲太阳城
</option>
<option
value=
"3"
>
路劲隽澜湾
</option>
<option
value=
"4"
>
路劲隽悦府
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
>
立即注册
</button>
<a
class=
"layui-btn layui-btn-primary"
href=
"consultantlist"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
返回
</a>
</div>
</div>
</form>
</div>
</fieldset>
</div>
<script
src=
"layui/layui.js"
></script>
<script>
layui
.
use
([
'form'
],
function
(){
var
form
=
layui
.
form
,
$
=
layui
.
jquery
,
layer
=
layui
.
layer
;
//自定义验证规则
form
.
verify
({
account
:
function
(
value
){
if
(
value
.
length
<
1
){
return
'请输入账号'
;
}
}
,
password
:
[
/
(
.+
){6,12}
$/
,
'密码必须6到12位'
]
,
'userInfo.name'
:
function
(
value
){
if
(
value
.
length
<
1
){
return
'请输入姓名'
;
}
}
});
form
.
on
(
'button(loginbtn)'
,
function
(
data
){
layer
.
alert
(
JSON
.
stringify
(
data
.
field
),
{
title
:
'最终的提交信息'
})
return
false
;
})
//监听提交
form
.
on
(
'submit(reg)'
,
function
(
data
){
/* layer.alert(JSON.stringify(data.field), {
title: '最终的提交信息'
}) */
$
.
ajax
({
type
:
"post"
,
url
:
"useraccount/save"
,
data
:
data
.
field
,
dataType
:
"json"
,
async
:
false
,
success
:
function
(
data
){
if
(
data
.
data
!=
null
&&
data
.
data
.
id
!=
null
){
$
.
ajax
({
type
:
"get"
,
url
:
"consultantlist"
});
}
else
{
layer
.
msg
(
"注册失败,请检查用户名是否重复!"
);
}
}
});
return
false
;
});
});
</script>
</body>
</html>
\ No newline at end of file
src/main/webapp/layui/lay/modules/layim.js
View file @
5d0127b4
This diff is collapsed.
Click to expand it.
src/main/webapp/manager.jsp
View file @
5d0127b4
...
...
@@ -21,52 +21,10 @@
<legend>
管理
</legend>
<div>
<a
class=
"layui-btn layui-btn-primary"
href=
"user/imuser/list"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
在线用户管理
</a>
<a
class=
"layui-btn layui-btn-primary"
href=
"consultantlist"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
顾问管理
</a>
<a
class=
"layui-btn layui-btn-primary"
href=
"usermessage/page"
target=
"_blank"
><i
class=
"layui-icon"
>

</i>
消息管理
</a>
<a
class=
"layui-btn layui-btn-primary showform"
><i
class=
"layui-icon"
>

</i>
顾问注册
</a>
</div>
</fieldset>
<fieldset
class=
"layui-elem-field index-button"
style=
"margin-top: 30px;display:none"
>
<legend>
注册
</legend>
<div>
<form
class=
"layui-form"
action=
""
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
账号
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"account"
lay-verify=
"required"
autocomplete=
"off"
placeholder=
"请输入账号"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
密码
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"password"
lay-verify=
"required"
placeholder=
"请输入密码"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
姓名
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"userInfo.name"
lay-verify=
"required"
placeholder=
"请输入姓名"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
所在部门
</label>
<div
class=
"layui-input-block"
>
<select
name=
"userInfo.deptid"
lay-verify=
"required"
>
<option
value=
"1"
>
路劲太阳城置业顾问
</option>
<option
value=
"3"
>
路劲隽澜湾置业顾问
</option>
<option
value=
"4"
>
路劲隽悦府置业顾问
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
class=
"layui-btn"
lay-submit=
""
lay-filter=
"reg"
>
立即注册
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-primary showform"
>
取消注册
</button>
</div>
</div>
</form>
</div>
</fieldset>
</div>
</body>
<script
src=
"layui/layui.js"
></script>
...
...
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