Commit acf30e84 authored by 李博今's avatar 李博今

修改统计BUG

将佚名修改为游客
页面重分配
parent 07b15be4
......@@ -41,9 +41,6 @@ public class FilesInfoServiceImpl implements FilesInfoService {
public String savePicture(MultipartFile file, String newname, String path) {
String fileUrl = "";
logger.error(">> FilesInfoServiceImpl's file.getOriginalFilename() " + file.getOriginalFilename());
logger.error(">> FilesInfoServiceImpl's newname " + newname);
logger.error(">> FilesInfoServiceImpl's path " + path);
if(StringUtils.isEmpty(file.getOriginalFilename())){
return fileUrl;
}
......@@ -53,7 +50,6 @@ public class FilesInfoServiceImpl implements FilesInfoService {
if(b){
try{
File tempFile = new File(path, newname+"."+name[1]);
logger.error(">> FilesInfoServiceImpl's tempFile.getAbsolutePath() " + tempFile.getAbsolutePath());
FileUtils.copyInputStreamToFile(file.getInputStream(),tempFile );
fileUrl = newname+"."+name[1];
//大图裁剪
......
......@@ -279,12 +279,8 @@ public class ImController extends BaseController {
UserAccountEntity u = getLoginUser();
Long uid = u.getId();
String path = request.getSession().getServletContext().getRealPath("upload/img/temp/");
String path2 = request.getSession().getServletContext().getRealPath("/upload/img/temp/");
String path3 = request.getSession().getServletContext().getRealPath("/");
logger.error(">> ImController's path " + path);
logger.error(">> ImController's path2 " + path2);
logger.error(">> ImController's path3 " + path3);
// String path = request.getSession().getServletContext().getRealPath("upload/img/temp/");
String path = request.getSession().getServletContext().getRealPath("/upload/img/temp/");
String files = filesInfoServiceImpl.savePicture(file, uid.toString() + UUID.randomUUID().toString(), path);
Map<String, Object> map = new HashMap<String, Object>();
Map<String, String> submap = new HashMap<String, String>();
......
......@@ -15,5 +15,7 @@ public interface UserAdminInfoDao extends BaseDao<UserAdminInfoEntity> {
int updateAdminInfo(List list);
int save(long uid);
List<UserAdminInfoEntity> sortOnlineAdmin(List list);
}
......@@ -28,15 +28,24 @@
set reply_message_num =
<foreach collection="list" item="item" index="index"
separator=" " open="case uid" close="end">
when #{item} then (SELECT count(*) from user_message where senduser = #{item} or receiveuser = #{item})
when #{item} then
(SELECT (
(SELECT count(*) num1 from user_message where senduser = #{item} or receiveuser = #{item})
+ (SELECT a.reply_message_num num1 from
(SELECT reply_message_num from user_admin_info a where uid = #{item} ) a
)
))
</foreach>
,reply_user_num =
<foreach collection="list" item="item" index="index"
separator=" " open="case uid" close="end">
when #{item} then (SELECT count(DISTINCT result.a) FROM
(SELECT DISTINCT senduser a from user_message where receiveuser = #{item}
UNION ALL
SELECT DISTINCT receiveuser a from user_message where senduser = #{item} ) result)
when #{item} then (SELECT (
(SELECT count(DISTINCT result.a) FROM
(SELECT DISTINCT senduser a from user_message where receiveuser = #{item}
UNION ALL
SELECT DISTINCT receiveuser a from user_message where senduser = #{item} ) result)
+ (SELECT a.result result from (SELECT reply_user_num result from user_admin_info a where uid = #{item}) a )
))
</foreach>
where uid in
<foreach collection="list" index="index" item="item"
......@@ -45,4 +54,7 @@
</foreach>
</update>
<insert id="save">
INSERT INTO user_admin_info (uid,reply_user_num,reply_message_num) VALUE (#{uid},0,0);
</insert>
</mapper>
\ No newline at end of file
......@@ -16,4 +16,5 @@ public interface UserAdminInfoService {
List<UserAdminInfoEntity> sortOnlineAdmin(List<Long> list);
int save(long uid);
}
......@@ -21,6 +21,8 @@ public class UserAccountServiceImpl implements UserAccountService {
private UserAccountDao userAccountDao;
@Autowired
private UserInfoService userInfoServiceImpl;
@Autowired
private UserAdminInfoServiceImpl userAdminInfoService;
@Override
public UserAccountEntity queryObject(Long id){
......@@ -50,6 +52,7 @@ public class UserAccountServiceImpl implements UserAccountService {
UserInfoEntity userInfo = userAccount.getUserInfo();
userInfo.setUid(userAccount.getId());
userInfoServiceImpl.save(userInfo);
userAdminInfoService.save(userAccount.getId());
}
}
}
......
......@@ -26,4 +26,9 @@ public class UserAdminInfoServiceImpl implements UserAdminInfoService {
System.out.println("进来了");
return userAdminInfoDao.sortOnlineAdmin(list);
}
@Override
public int save(long uid) {
return userAdminInfoDao.save(uid);
}
}
......@@ -39,7 +39,7 @@ public class DeleteUserTimer {
private final static Logger log = LoggerFactory.getLogger(DeleteUserTimer.class);
@Scheduled(cron = "0 0 * * * ?" )
@Scheduled(cron = "30 * * * * ?" )
public void deleteLongTimeUser(){
log.info("----------------------------------统计员工工作情况----------------------------------");
......
......@@ -5,7 +5,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>置业顾问系统</title
<title>置业顾问系统</title>
<link href="img/icon.ico" rel="SHORTCUT ICON" />
<link type="text/css" rel="stylesheet" href="css/im.css"/>
<link rel="stylesheet" href="layui/css/layui.css">
......
......@@ -85,7 +85,7 @@ layui.config({
//基础配置
layim.config({
init: data,
title:"我的IM"
title:"置业顾问系统"
,notice:true
//获取群员接口(返回的数据格式见下文)
,members: {
......
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>QIQIIM-SERVER</display-name>
<welcome-file-list>
<welcome-file>manager.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
......
<%@ 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 loginform" action="login" method="post">
<div class="layui-form-item">
<label class="layui-form-label">账号</label>
<div class="layui-input-block">
<input type="text" name="account" lay-verify="title" autocomplete="off" placeholder="请输入账号" class="layui-input laccount">
</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 lpwd">
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit="" lay-filter="login">立即登录</button>
</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;
});
$(".showform").on("click",function(){
var btntext = $(this).text();
var forms = $(".layui-elem-field");
if(btntext=='去登录'){
forms.eq(0).show();
forms.eq(1).hide();
}else{
forms.eq(1).show();
forms.eq(0).hide();
}
})
//监听提交
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){
$(".laccount").val(data.data.account);
$(".lpwd").val(data.data.password);
$(".loginform").submit();
}else{
layer.msg("注册失败,请检查用户名是否重复!");
}
}
});
return false;
});
});
</script>
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,7 +7,7 @@
<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>
<title>置业顾问系统</title>
<link href="img/icon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" href="layui/css/layui.css">
</head>
......
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>置业顾问系统</title>
<link href="img/icon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" href="layui/css/layui.css">
<style type="text/css">
.index-button{margin-bottom: 30px;}
.index-button div{margin: 20px 30px 10px;}
.index-button .layui-btn+.layui-btn{margin-left: 0;}
.index-button .layui-btn{margin: 0 7px 10px 0; }
</style>
</head>
<body>
<div style="margin: 30px;">
<fieldset class="layui-elem-field index-button" style="margin-top: 30px;">
<legend>管理</legend>
<div>
<a class="layui-btn layui-btn-primary" href="user/imuser/list" target="_blank"><i class="layui-icon">&#xe613;</i>在线用户管理</a>
<a class="layui-btn layui-btn-primary" href="usermessage/page" target="_blank"><i class="layui-icon">&#xe63a;</i>消息管理</a>
<a class="layui-btn layui-btn-primary showform" ><i class="layui-icon">&#xe63a;</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>
</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>
<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 '请输入姓名';
}
}
});
$(".showform").on("click",function(){
var btntext = $(this).text();
var forms = $(".layui-elem-field");
if(btntext=='取消注册'){
forms.eq(0).show();
forms.eq(1).show();
forms.eq(2).hide();
}else{
forms.eq(2).show();
forms.eq(1).hide();
forms.eq(0).hide();
}
})
//监听提交
form.on('submit(reg)', function(data){
/* layer.alert(JSON.stringify(data.field), {
title: '最终的提交信息'
}) */
var forms = $(".layui-elem-field");
$.ajax({
type : "post",
url : "useraccount/save",
data :data.field,
dataType : "json",
async : false,
success : function(data){
if(data.data!=null&&data.data.id!=null){
layer.msg("注册成功!");
forms.eq(0).show();
forms.eq(1).show();
forms.eq(2).hide();
}else{
layer.msg("注册失败,请检查用户名是否重复!");
}
}
});
return false;
});
});
</script>
</html>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<title>置业顾问系统</title>
<link href="img/icon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" href="layui/css/layui.css">
<style type="text/css">
......@@ -72,7 +72,7 @@
<div>
<a class="layui-btn layui-btn-primary" href="user/imuser/list" target="_blank"><i class="layui-icon">&#xe613;</i>在线用户管理</a>
<a class="layui-btn layui-btn-primary" href="usermessage/page" target="_blank"><i class="layui-icon">&#xe63a;</i>消息管理</a>
<a class="layui-btn layui-btn-primary" href="sys/generator/page" target="_blank"><i class="layui-icon">&#xe635;</i>代码生成</a>
<a class="layui-btn layui-btn-primary " ><i class="layui-icon">&#xe635;</i>代码生成</a>
</div>
</fieldset>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment