Commit 5e84c730 by jinfeng.wang

fix

parent 8a9bf83c
...@@ -2,7 +2,6 @@ package com.mobvista.apptag.controller; ...@@ -2,7 +2,6 @@ package com.mobvista.apptag.controller;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageHelper;
import com.mobvista.apptag.config.WebSecurityConfig; import com.mobvista.apptag.config.WebSecurityConfig;
import com.mobvista.apptag.entity.Feat; import com.mobvista.apptag.entity.Feat;
import com.mobvista.apptag.entity.Tag; import com.mobvista.apptag.entity.Tag;
...@@ -25,7 +24,6 @@ import org.springframework.stereotype.Controller; ...@@ -25,7 +24,6 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -142,7 +140,8 @@ public class ResultController { ...@@ -142,7 +140,8 @@ public class ResultController {
public PageUtil list(@SessionAttribute(WebSecurityConfig.SESSION_KEY) String username, @RequestBody Query query) { public PageUtil list(@SessionAttribute(WebSecurityConfig.SESSION_KEY) String username, @RequestBody Query query) {
// PageHelper.startPage(query.getOffset() / query.getLimit() + 1, query.getLimit()); // PageHelper.startPage(query.getOffset() / query.getLimit() + 1, query.getLimit());
List<TagResult> results = resultService.list(username, query); List<TagResult> results = resultService.list(username, query);
int total = resultService.count(username); String search = query.getSearch();
int total = resultService.count(username, search);
PageUtil pageUtil = new PageUtil(results, total); PageUtil pageUtil = new PageUtil(results, total);
return pageUtil; return pageUtil;
} }
......
package com.mobvista.apptag.controller; package com.mobvista.apptag.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
...@@ -18,22 +14,18 @@ import com.mobvista.apptag.service.TagService; ...@@ -18,22 +14,18 @@ import com.mobvista.apptag.service.TagService;
import com.mobvista.apptag.utils.PageUtil; import com.mobvista.apptag.utils.PageUtil;
import com.mobvista.apptag.utils.Query; import com.mobvista.apptag.utils.Query;
import com.mobvista.apptag.utils.R; import com.mobvista.apptag.utils.R;
import net.sf.json.JSONArray;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.SessionAttribute;
import net.sf.json.JSONArray; import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author wangjf * @author wangjf
...@@ -147,8 +139,9 @@ public class TagController { ...@@ -147,8 +139,9 @@ public class TagController {
public PageUtil list(@RequestBody Query query, public PageUtil list(@RequestBody Query query,
@RequestParam(name = "tag", required = false, defaultValue = "0") int tag) { @RequestParam(name = "tag", required = false, defaultValue = "0") int tag) {
PageHelper.startPage(query.getOffset() / query.getLimit() + 1, query.getLimit()); PageHelper.startPage(query.getOffset() / query.getLimit() + 1, query.getLimit());
List<Tag> tags = tagDao.list(tag); String search = query.getSearch();
int total = tagDao.count(tag); List<Tag> tags = tagDao.list(search, tag);
int total = tagDao.count(search, tag);
PageUtil pageUtil = new PageUtil(tags, total); PageUtil pageUtil = new PageUtil(tags, total);
return pageUtil; return pageUtil;
} }
......
package com.mobvista.apptag.controller; package com.mobvista.apptag.controller;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpSession;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.mobvista.apptag.config.WebSecurityConfig; import com.mobvista.apptag.config.WebSecurityConfig;
import com.mobvista.apptag.entity.User; import com.mobvista.apptag.entity.User;
...@@ -13,18 +8,16 @@ import com.mobvista.apptag.service.UserService; ...@@ -13,18 +8,16 @@ import com.mobvista.apptag.service.UserService;
import com.mobvista.apptag.utils.PageUtil; import com.mobvista.apptag.utils.PageUtil;
import com.mobvista.apptag.utils.Query; import com.mobvista.apptag.utils.Query;
import com.mobvista.apptag.utils.R; import com.mobvista.apptag.utils.R;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import javax.servlet.http.HttpSession;
import org.springframework.web.bind.annotation.RequestParam; import java.util.List;
import org.springframework.web.bind.annotation.ResponseBody; import java.util.Map;
import org.springframework.web.bind.annotation.SessionAttribute;
/** /**
* @author wangjf * @author wangjf
...@@ -55,7 +48,7 @@ public class UserController { ...@@ -55,7 +48,7 @@ public class UserController {
@PostMapping(path = "/loginPost") @PostMapping(path = "/loginPost")
@ResponseBody @ResponseBody
R loginPost(@RequestParam(name = "username") String username, @RequestParam(name = "password") String password, R loginPost(@RequestParam(name = "username") String username, @RequestParam(name = "password") String password,
HttpSession session) { HttpSession session) {
if (!userService.validate(username, password)) { if (!userService.validate(username, password)) {
return R.error("用户名或密码错误,请重新登录!"); return R.error("用户名或密码错误,请重新登录!");
} }
...@@ -117,8 +110,9 @@ public class UserController { ...@@ -117,8 +110,9 @@ public class UserController {
@ResponseBody @ResponseBody
public PageUtil list(@SessionAttribute(WebSecurityConfig.SESSION_KEY) String username, @RequestBody Query query) { public PageUtil list(@SessionAttribute(WebSecurityConfig.SESSION_KEY) String username, @RequestBody Query query) {
PageHelper.startPage(query.getOffset() / query.getLimit() + 1, query.getLimit()); PageHelper.startPage(query.getOffset() / query.getLimit() + 1, query.getLimit());
List<User> users = userDao.list(); String search = query.getSearch();
int total = userDao.count(); List<User> users = userDao.list(search.toLowerCase());
int total = userDao.count(search);
PageUtil pageUtil = new PageUtil(users, total); PageUtil pageUtil = new PageUtil(users, total);
return pageUtil; return pageUtil;
} }
......
package com.mobvista.apptag.mapper; package com.mobvista.apptag.mapper;
import java.util.List;
import com.mobvista.apptag.entity.TagResult; import com.mobvista.apptag.entity.TagResult;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Insert; import java.util.List;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
/** /**
* @author wangjf * @author wangjf
...@@ -28,6 +25,7 @@ public interface ResultDao { ...@@ -28,6 +25,7 @@ public interface ResultDao {
@Result(property = "updateTime", column = "update_time")}) @Result(property = "updateTime", column = "update_time")})
TagResult find(String packageName); TagResult find(String packageName);
/*
@Select("SELECT * FROM tag_result WHERE user_id = #{userId}") @Select("SELECT * FROM tag_result WHERE user_id = #{userId}")
@Results({@Result(property = "packageName", column = "package_name"), @Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"), @Result(property = "appName", column = "app_name"),
...@@ -37,7 +35,29 @@ public interface ResultDao { ...@@ -37,7 +35,29 @@ public interface ResultDao {
@Result(property = "userId", column = "user_id"), @Result(property = "userId", column = "user_id"),
@Result(property = "updateTime", column = "update_time")}) @Result(property = "updateTime", column = "update_time")})
List<TagResult> list(String userId); List<TagResult> list(String userId);
*/
@SelectProvider(type = ListMapperProvider.class, method = "list")
@Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"),
@Result(property = "platform", column = "platform"),
@Result(property = "featId", column = "feat_id"),
@Result(property = "comments", column = "comments"),
@Result(property = "userId", column = "user_id"),
@Result(property = "updateTime", column = "update_time")})
List<TagResult> list(String userId, String search);
class ListMapperProvider {
public String list(String userId, String search) {
String sql = "SELECT * FROM tag_result WHERE user_id = #{userId}";
if (StringUtils.isNotBlank(search)) {
sql += " AND LOWER(package_name) LIKE '%" + search + "%'";
}
return sql;
}
}
/*
@Select("SELECT * FROM tag_result") @Select("SELECT * FROM tag_result")
@Results({@Result(property = "packageName", column = "package_name"), @Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"), @Result(property = "appName", column = "app_name"),
...@@ -46,11 +66,62 @@ public interface ResultDao { ...@@ -46,11 +66,62 @@ public interface ResultDao {
@Result(property = "comments", column = "comments"), @Result(property = "comments", column = "comments"),
@Result(property = "userId", column = "user_id"), @Result(property = "userId", column = "user_id"),
@Result(property = "updateTime", column = "update_time")}) @Result(property = "updateTime", column = "update_time")})
List<TagResult> listAll(); List<TagResult> listAll(String search);
*/
@SelectProvider(type = ListAllMapperProvider.class, method = "listAll")
@Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"),
@Result(property = "platform", column = "platform"),
@Result(property = "featId", column = "feat_id"),
@Result(property = "comments", column = "comments"),
@Result(property = "userId", column = "user_id"),
@Result(property = "updateTime", column = "update_time")})
List<TagResult> listAll(String search);
class ListAllMapperProvider {
public String listAll(String search) {
String sql = "SELECT * FROM tag_result";
if (StringUtils.isNotBlank(search)) {
sql += " WHERE LOWER(package_name) LIKE '%" + search + "%'";
}
return sql;
}
}
/*
@Select("SELECT COUNT(1) FROM tag_result WHERE user_id = #{userId}") @Select("SELECT COUNT(1) FROM tag_result WHERE user_id = #{userId}")
int count(String userId); int count(String userId);
*/
@SelectProvider(type = CountMapperProvider.class, method = "count")
int count(String userId, String search);
class CountMapperProvider {
public String count(String userId, String search) {
String sql = "SELECT COUNT(1) FROM tag_result WHERE user_id = #{userId}";
if (StringUtils.isNotBlank(search)) {
sql += " AND LOWER(package_name) LIKE '%" + search + "%'";
}
return sql;
}
}
/*
@Select("SELECT COUNT(1) FROM tag_result") @Select("SELECT COUNT(1) FROM tag_result")
int countAll(); int countAll(String search);
*/
@SelectProvider(type = CountAllMapperProvider.class, method = "countAll")
int countAll(String search);
class CountAllMapperProvider {
public String countAll(String search) {
String sql = "SELECT COUNT(1) FROM tag_result";
if (StringUtils.isNotBlank(search)) {
sql += " WHERE LOWER(package_name) LIKE '%" + search + "%'";
}
return sql;
}
}
} }
\ No newline at end of file
package com.mobvista.apptag.mapper; package com.mobvista.apptag.mapper;
import java.util.List;
import com.mobvista.apptag.entity.Tag; import com.mobvista.apptag.entity.Tag;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Result; import java.util.List;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
/** /**
* @author wangjf * @author wangjf
*/ */
public interface TagDao { public interface TagDao {
@Update("UPDATE tag_list SET user_id = #{userId}, tag = #{tag},update_time = #{updateTime} WHERE package_name = #{packageName}") @Update("UPDATE tag_list SET user_id = #{userId}, tag = #{tag},update_time = #{updateTime} WHERE package_name = #{packageName}")
boolean update(Tag tag); boolean update(Tag tag);
@Select("SELECT * FROM tag_list WHERE tag = #{tag} ORDER BY install DESC") /*
@Results({ @Result(property = "packageName", column = "package_name"), @Select("SELECT * FROM tag_list WHERE tag = #{tag} ORDER BY install DESC")
@Result(property = "appName", column = "app_name"), @Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "platform", column = "platform"), @Result(property = "appName", column = "app_name"),
@Result(property = "category", column = "category"), @Result(property = "url", column = "url"), @Result(property = "platform", column = "platform"),
@Result(property = "install", column = "install"), @Result(property = "tag", column = "tag"), @Result(property = "category", column = "category"), @Result(property = "url", column = "url"),
@Result(property = "userId", column = "user_id"), @Result(property = "install", column = "install"), @Result(property = "tag", column = "tag"),
@Result(property = "updateTime", column = "update_time") }) @Result(property = "userId", column = "user_id"),
List<Tag> list(int tag); @Result(property = "updateTime", column = "update_time")})
List<Tag> list(int tag);
@Select("SELECT * FROM tag_list WHERE tag = #{tag} ORDER BY install DESC") */
@Results({ @Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"), @SelectProvider(type = ListMapperProvider.class, method = "list")
@Result(property = "platform", column = "platform"), @Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "category", column = "category"), @Result(property = "url", column = "url"), @Result(property = "appName", column = "app_name"),
@Result(property = "install", column = "install"), @Result(property = "tag", column = "tag"), @Result(property = "platform", column = "platform"),
@Result(property = "userId", column = "user_id"), @Result(property = "category", column = "category"), @Result(property = "url", column = "url"),
@Result(property = "updateTime", column = "update_time") }) @Result(property = "install", column = "install"), @Result(property = "tag", column = "tag"),
List<Tag> listAll(int tag); @Result(property = "userId", column = "user_id"),
@Result(property = "updateTime", column = "update_time")})
@Select("SELECT * FROM tag_list ORDER BY install DESC LIMIT 1") List<Tag> list(String search, int tag);
@Results({ @Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"), class ListMapperProvider {
@Result(property = "platform", column = "platform"), public String list(String search, int tag) {
@Result(property = "category", column = "category"), @Result(property = "url", column = "url"), String sql = "SELECT * FROM tag_list WHERE tag = #{tag}";
@Result(property = "install", column = "install"), @Result(property = "tag", column = "tag"), if (StringUtils.isNotBlank(search)) {
@Result(property = "userId", column = "user_id"), sql += " AND LOWER(package_name) LIKE '%" + search + "%'";
@Result(property = "updateTime", column = "update_time") }) }
Tag one(); return sql + " ORDER BY install DESC";
}
@Select("SELECT * FROM tag_list WHERE package_name = #{packageName}") }
@Results({ @Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"), @Select("SELECT * FROM tag_list WHERE tag = #{tag} ORDER BY install DESC")
@Result(property = "platform", column = "platform"), @Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "category", column = "category"), @Result(property = "url", column = "url"), @Result(property = "appName", column = "app_name"),
@Result(property = "install", column = "install"), @Result(property = "tag", column = "tag"), @Result(property = "platform", column = "platform"),
@Result(property = "userId", column = "user_id"), @Result(property = "category", column = "category"), @Result(property = "url", column = "url"),
@Result(property = "updateTime", column = "update_time") }) @Result(property = "install", column = "install"), @Result(property = "tag", column = "tag"),
Tag find(String package_name); @Result(property = "userId", column = "user_id"),
@Result(property = "updateTime", column = "update_time")})
@Select("SELECT COUNT(1) FROM tag_list WHERE tag = #{tag}") List<Tag> listAll(int tag);
int count(int tag);
@Select("SELECT * FROM tag_list ORDER BY install DESC LIMIT 1")
@Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"),
@Result(property = "platform", column = "platform"),
@Result(property = "category", column = "category"), @Result(property = "url", column = "url"),
@Result(property = "install", column = "install"), @Result(property = "tag", column = "tag"),
@Result(property = "userId", column = "user_id"),
@Result(property = "updateTime", column = "update_time")})
Tag one();
@Select("SELECT * FROM tag_list WHERE package_name = #{packageName}")
@Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"),
@Result(property = "platform", column = "platform"),
@Result(property = "category", column = "category"), @Result(property = "url", column = "url"),
@Result(property = "install", column = "install"), @Result(property = "tag", column = "tag"),
@Result(property = "userId", column = "user_id"),
@Result(property = "updateTime", column = "update_time")})
Tag find(String package_name);
/*
@Select("SELECT COUNT(1) FROM tag_list WHERE tag = #{tag}")
int count(int tag);
*/
@SelectProvider(type = CountMapperProvider.class, method = "count")
int count(String search, int tag);
class CountMapperProvider {
public String count(String search, int tag) {
String sql = "SELECT COUNT(1) FROM tag_list WHERE tag = #{tag}";
if (StringUtils.isNotBlank(search)) {
sql += " AND LOWER(package_name) LIKE '%" + search + "%'";
}
return sql;
}
}
} }
\ No newline at end of file
package com.mobvista.apptag.mapper; package com.mobvista.apptag.mapper;
import java.util.List;
import com.mobvista.apptag.entity.User; import com.mobvista.apptag.entity.User;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Insert; import java.util.List;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
/** /**
* @author wangjf * @author wangjf
...@@ -16,28 +12,63 @@ import org.apache.ibatis.annotations.Update; ...@@ -16,28 +12,63 @@ import org.apache.ibatis.annotations.Update;
public interface UserDao { public interface UserDao {
@Insert("REPLACE INTO user(user_id,user_name,password,state,role,update_time,count) VALUES(#{userId},#{userName},#{password},#{state},#{role},#{updateTime},${count})") @Insert("REPLACE INTO user(user_id,user_name,password,state,role,update_time,count) VALUES(#{userId},#{userName},#{password},#{state},#{role},#{updateTime},${count})")
boolean save(User user); boolean save(User user);
@Update("UPDATE user SET role = #{role}, update_time = #{updateTime}, count = #{count} WHERE user_id = #{userId}") @Update("UPDATE user SET role = #{role}, update_time = #{updateTime}, count = #{count} WHERE user_id = #{userId}")
void update(User user); void update(User user);
@Select("SELECT * FROM user WHERE user_id = #{userId}") @Select("SELECT * FROM user WHERE user_id = #{userId}")
@Results({ @Result(property = "userId", column = "user_id"), @Results({@Result(property = "userId", column = "user_id"),
@Result(property = "userName", column = "user_name"), @Result(property = "userName", column = "user_name"),
@Result(property = "count", column = "count"), @Result(property = "count", column = "count"),
@Result(property = "updateTime", column = "update_time"), @Result(property = "updateTime", column = "update_time"),
@Result(property = "role", column = "role") }) @Result(property = "role", column = "role")})
User find(String userId); User find(String userId);
@Select("SELECT * FROM user") /*
@Results({ @Result(property = "userId", column = "user_id"), @Select("SELECT * FROM user")
@Result(property = "userName", column = "user_name"), @Results({@Result(property = "userId", column = "user_id"),
@Result(property = "count", column = "count"), @Result(property = "userName", column = "user_name"),
@Result(property = "updateTime", column = "update_time"), @Result(property = "count", column = "count"),
@Result(property = "role", column = "role") }) @Result(property = "updateTime", column = "update_time"),
List<User> list(); @Result(property = "role", column = "role")})
List<User> list(String search);
@Select("SELECT COUNT(1) FROM user") */
int count();
@SelectProvider(type = ListMapperProvider.class, method = "list")
@Results({@Result(property = "userId", column = "user_id"),
@Result(property = "userName", column = "user_name"),
@Result(property = "count", column = "count"),
@Result(property = "updateTime", column = "update_time"),
@Result(property = "role", column = "role")})
List<User> list(String search);
class ListMapperProvider {
public String list(String search) {
String sql = "SELECT * FROM user";
if (StringUtils.isNotBlank(search)) {
sql += " WHERE LOWER(user_name) LIKE '%" + search + "%'";
}
return sql;
}
}
/*
@Select("SELECT COUNT(1) FROM user")
int count();
*/
@SelectProvider(type = CountMapperProvider.class, method = "count")
int count(String search);
class CountMapperProvider {
public String count(String search) {
String sql = "SELECT count(1) FROM user ";
if (StringUtils.isNotBlank(search)) {
sql += " WHERE LOWER(user_name) LIKE '%" + search + "%'";
}
return sql;
}
}
} }
\ No newline at end of file
...@@ -18,5 +18,5 @@ public interface ResultService { ...@@ -18,5 +18,5 @@ public interface ResultService {
List<TagResult> list(String userId, Query query); List<TagResult> list(String userId, Query query);
int count(String userId); int count(String userId, String search);
} }
\ No newline at end of file
package com.mobvista.apptag.service; package com.mobvista.apptag.service;
import java.util.List;
import com.mobvista.apptag.entity.Tag; import com.mobvista.apptag.entity.Tag;
/** /**
...@@ -13,5 +11,5 @@ public interface TagService { ...@@ -13,5 +11,5 @@ public interface TagService {
Tag find(String packageName); Tag find(String packageName);
List<Tag> list(int pageNum, int pageSize); // List<Tag> list(int pageNum, int pageSize);
} }
\ No newline at end of file
package com.mobvista.apptag.service; package com.mobvista.apptag.service;
import java.util.Map;
import com.mobvista.apptag.entity.User; import com.mobvista.apptag.entity.User;
import java.util.Map;
/** /**
* @author wangjf * @author wangjf
*/ */
public interface UserService { public interface UserService {
boolean createUser(Map<String,Object> uMap, String userId); boolean createUser(Map<String, Object> uMap, String userId);
void updateUser(User user); void updateUser(User user);
Map<String, Object> find(String userId); Map<String, Object> find(String userId);
/*
Map<String, Object> list(); Map<String, Object> list();
*/
Boolean validate(String userId, String password); Boolean validate(String userId, String password);
......
package com.mobvista.apptag.service.impl; package com.mobvista.apptag.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.mobvista.apptag.entity.Tag; import com.mobvista.apptag.entity.Tag;
...@@ -13,11 +9,14 @@ import com.mobvista.apptag.mapper.ResultDao; ...@@ -13,11 +9,14 @@ import com.mobvista.apptag.mapper.ResultDao;
import com.mobvista.apptag.mapper.TagDao; import com.mobvista.apptag.mapper.TagDao;
import com.mobvista.apptag.mapper.UserDao; import com.mobvista.apptag.mapper.UserDao;
import com.mobvista.apptag.service.ResultService; import com.mobvista.apptag.service.ResultService;
import com.mobvista.apptag.utils.Query; import com.mobvista.apptag.utils.Query;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/** /**
* @author wangjf * @author wangjf
*/ */
...@@ -69,9 +68,9 @@ public class ResultServiceImpl implements ResultService { ...@@ -69,9 +68,9 @@ public class ResultServiceImpl implements ResultService {
List<TagResult> results; List<TagResult> results;
PageHelper.startPage(query.getOffset() / query.getLimit() + 1, query.getLimit()); PageHelper.startPage(query.getOffset() / query.getLimit() + 1, query.getLimit());
if (user.getRole() == 0) { if (user.getRole() == 0) {
results = resultDao.list(userId); results = resultDao.list(userId, query.getSearch().toLowerCase());
} else { } else {
results = resultDao.listAll(); results = resultDao.listAll(query.getSearch().toLowerCase());
} }
List<TagResult> results2 = new ArrayList<>(); List<TagResult> results2 = new ArrayList<>();
...@@ -84,12 +83,12 @@ public class ResultServiceImpl implements ResultService { ...@@ -84,12 +83,12 @@ public class ResultServiceImpl implements ResultService {
} }
@Override @Override
public int count(String userId) { public int count(String userId, String search) {
User user = userDao.find(userId); User user = userDao.find(userId);
if (user.getRole() == 0) { if (user.getRole() == 0) {
return resultDao.count(userId); return resultDao.count(userId, search);
} else { } else {
return resultDao.countAll(); return resultDao.countAll(search);
} }
} }
} }
\ No newline at end of file
...@@ -41,9 +41,11 @@ public class TagServiceImpl implements TagService { ...@@ -41,9 +41,11 @@ public class TagServiceImpl implements TagService {
return tagDao.find(packageName); return tagDao.find(packageName);
} }
/*
@Override @Override
public List<Tag> list(int pageNum, int pageSize) { public List<Tag> list(int pageNum, int pageSize) {
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
return tagDao.list(1); return tagDao.list(1);
} }
*/
} }
\ No newline at end of file
...@@ -54,6 +54,7 @@ public class UserServiceImpl implements UserService { ...@@ -54,6 +54,7 @@ public class UserServiceImpl implements UserService {
return attributes; return attributes;
} }
/*
@Override @Override
public Map<String, Object> list() { public Map<String, Object> list() {
Map<String, Object> attributes = new HashMap<>(); Map<String, Object> attributes = new HashMap<>();
...@@ -62,6 +63,7 @@ public class UserServiceImpl implements UserService { ...@@ -62,6 +63,7 @@ public class UserServiceImpl implements UserService {
attributes.put("userDto", new User()); attributes.put("userDto", new User());
return attributes; return attributes;
} }
*/
@Override @Override
public Boolean validate(String user_id, String password) { public Boolean validate(String user_id, String password) {
......
...@@ -22,4 +22,9 @@ public class MD5Util { ...@@ -22,4 +22,9 @@ public class MD5Util {
throw new Exception("MD5加密出现错误," + e.toString()); throw new Exception("MD5加密出现错误," + e.toString());
} }
} }
public static void main(String[] args) throws Exception {
String str = getMD5Str("123456");
System.out.println(str);
}
} }
\ No newline at end of file
...@@ -16,6 +16,8 @@ public class Query implements Serializable { ...@@ -16,6 +16,8 @@ public class Query implements Serializable {
private String order; private String order;
private String search;
/** /**
* @return the limit * @return the limit
*/ */
...@@ -58,4 +60,17 @@ public class Query implements Serializable { ...@@ -58,4 +60,17 @@ public class Query implements Serializable {
this.offset = offset; this.offset = offset;
} }
/**
* @return the search
*/
public String getSearch() {
return search;
}
/**
* @param search the search to set
*/
public void setSearch(String search) {
this.search = search;
}
} }
\ No newline at end of file
var prefix = "result"; var prefix = "result";
$(function () { $(function () {
load(); load();
}); });
function load() { function load() {
$("#exampleTable").bootstrapTable({ $("#exampleTable").bootstrapTable({
method: "post", // 服务器数据的请求方式 get or post method: "post", // 服务器数据的请求方式 get or post
url: prefix + "/list", // 服务器数据的加载地址 url: prefix + "/list", // 服务器数据的加载地址
striped: true, // 设置为true会有隔行变色效果 striped: true, // 设置为true会有隔行变色效果
dataType: "json", // 服务器返回的数据类型 dataType: "json", // 服务器返回的数据类型
pagination: true, // 设置为true会在底部显示分页条 pagination: true, // 设置为true会在底部显示分页条
// queryParamsType : "limit", // queryParamsType : "limit",
// //设置为limit则会发送符合RESTFull格式的参数 // //设置为limit则会发送符合RESTFull格式的参数
singleSelect: false, // 设置为true将禁止多选 singleSelect: false, // 设置为true将禁止多选
iconSize: "outline", iconSize: "outline",
toolbar: "#exampleToolbar", toolbar: "#exampleToolbar",
// contentType : "application/x-www-form-urlencoded", // contentType : "application/x-www-form-urlencoded",
// //发送到服务器的数据编码类型 // //发送到服务器的数据编码类型
pageSize: 10, // 如果设置了分页,每页数据条数 pageSize: 10, // 如果设置了分页,每页数据条数
pageNumber: 1, // 如果设置了分布,首页页码 pageNumber: 1, // 如果设置了分布,首页页码
// search: true, // 是否显示搜索框 // search: true, // 是否显示搜索框
showColumns: true, // 是否显示内容下拉框(选择显示的列) showColumns: true, // 是否显示内容下拉框(选择显示的列)
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server" sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
// queryParams : queryParams, // queryParams : queryParams,
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果 queryParams: function (params) {
// queryParamsType = 'limit' ,返回参数必须包含 return {
// limit, offset, search, sort, order 否则, 需要包含: // 说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
// pageSize, pageNumber, searchText, sortName, limit: params.limit,
// sortOrder. offset: params.offset,
// 返回false将会终止请求 search: $('#searchName').val()
columns: [{ };
// 列配置项 },
// 数据类型,详细参数配置参见文档http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/ // //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
checkbox: true // queryParamsType = 'limit' ,返回参数必须包含
// 列表中显示复选框 // limit, offset, search, sort, order 否则, 需要包含:
}, // pageSize, pageNumber, searchText, sortName,
{ // sortOrder.
field: "packageName", // 列字段名 // 返回false将会终止请求
title: "包名", // 列标题 columns: [{
align: "center" // 列配置项
}, // 数据类型,详细参数配置参见文档http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/
{ checkbox: true
field: "appName", // 列表中显示复选框
title: "应用名称", },
align: "center" {
}, field: "packageName", // 列字段名
{ title: "包名", // 列标题
field: "platform", align: "center"
title: "平台", },
align: "center" {
}, field: "appName",
{ title: "应用名称",
field: "featId", align: "center"
title: "已标标签", },
align: "center" {
}, field: "platform",
{ title: "平台",
title: "操作", align: "center"
field: "packageName", },
align: "center", {
formatter: function (value, row, index) { field: "featId",
var e = title: "已标标签",
'<a class="btn btn-primary btn-sm ' + align: "center"
s_edit_h + },
'" href="#" mce_href="#" title="编辑" onclick="edit(\'' + {
row.packageName + title: "操作",
'\')"><i class="fa fa-edit"></i></a> '; field: "packageName",
return e; align: "center",
} formatter: function (value, row, index) {
} var e =
] '<a class="btn btn-primary btn-sm ' +
}); s_edit_h +
'" href="#" mce_href="#" title="编辑" onclick="edit(\'' +
row.packageName +
'\')"><i class="fa fa-edit"></i></a> ';
return e;
}
}
]
});
} }
function reLoad(type) { function reLoad(type) {
if (type == 1) { if (type == 1) {
var opt = { var opt = {
query: { query: {
offset: 0 offset: 0
} }
}; };
$("#exampleTable").bootstrapTable("refresh", opt); $("#exampleTable").bootstrapTable("refresh", opt);
} else { } else {
$("#exampleTable").bootstrapTable("refresh"); $("#exampleTable").bootstrapTable("refresh");
} }
} }
function edit(package_name) { function edit(package_name) {
layer.open({ layer.open({
type: 2, type: 2,
title: "标签标注", title: "标签标注",
maxmin: true, maxmin: true,
shadeClose: true, // 点击遮罩关闭层 shadeClose: true, // 点击遮罩关闭层
area: ["800px", "580px"], area: ["800px", "580px"],
content: prefix + "/edit?packageName=" + package_name // iframe的url content: prefix + "/edit?packageName=" + package_name // iframe的url
}); });
} }
\ No newline at end of file
var prefix = "tag"; var prefix = "tag";
$(function () { $(function () {
load(); load();
}); });
function load() { function load() {
$("#exampleTable").bootstrapTable({ $("#exampleTable").bootstrapTable({
method: "post", // 服务器数据的请求方式 get or post method: "post", // 服务器数据的请求方式 get or post
url: prefix + "/list", // 服务器数据的加载地址 url: prefix + "/list", // 服务器数据的加载地址
striped: true, // 设置为true会有隔行变色效果 striped: true, // 设置为true会有隔行变色效果
dataType: "json", // 服务器返回的数据类型 dataType: "json", // 服务器返回的数据类型
pagination: true, // 设置为true会在底部显示分页条 pagination: true, // 设置为true会在底部显示分页条
// queryParamsType : "limit", // queryParamsType : "limit",
// //设置为limit则会发送符合RESTFull格式的参数 // //设置为limit则会发送符合RESTFull格式的参数
singleSelect: false, // 设置为true将禁止多选 singleSelect: false, // 设置为true将禁止多选
iconSize: "outline", iconSize: "outline",
toolbar: "#exampleToolbar", toolbar: "#exampleToolbar",
// contentType : "application/x-www-form-urlencoded", // contentType : "application/x-www-form-urlencoded",
// //发送到服务器的数据编码类型 // //发送到服务器的数据编码类型
pageSize: 10, // 如果设置了分页,每页数据条数 pageSize: 10, // 如果设置了分页,每页数据条数
pageNumber: 1, // 如果设置了分布,首页页码 pageNumber: 1, // 如果设置了分布,首页页码
// search: true, // 是否显示搜索框 // search: true, // 是否显示搜索框
showColumns: true, // 是否显示内容下拉框(选择显示的列) showColumns: true, // 是否显示内容下拉框(选择显示的列)
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server" sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
// queryParams : queryParams, // queryParams : queryParams,
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果 queryParams: function (params) {
// queryParamsType = 'limit' ,返回参数必须包含 return {
// limit, offset, search, sort, order 否则, 需要包含: // 说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
// pageSize, pageNumber, searchText, sortName, limit: params.limit,
// sortOrder. offset: params.offset,
// 返回false将会终止请求 search: $('#searchName').val()
columns: [{ };
// 列配置项 },
// 数据类型,详细参数配置参见文档http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/ // //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
checkbox: true // queryParamsType = 'limit' ,返回参数必须包含
// 列表中显示复选框 // limit, offset, search, sort, order 否则, 需要包含:
}, // pageSize, pageNumber, searchText, sortName,
{ // sortOrder.
field: "packageName", // 列字段名 // 返回false将会终止请求
title: "包名", // 列标题 columns: [{
align: "center" // 列配置项
}, // 数据类型,详细参数配置参见文档http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/
{ checkbox: true
field: "appName", // 列表中显示复选框
title: "应用名称", },
align: "center" {
}, field: "packageName", // 列字段名
{ title: "包名", // 列标题
field: "platform", align: "center"
title: "平台", },
align: "center" {
}, field: "appName",
{ title: "应用名称",
field: "category", align: "center"
title: "商店类别", },
align: "center" {
}, field: "platform",
{ title: "平台",
field: "install", align: "center"
title: "安装量", },
align: "center" {
}, field: "category",
{ title: "商店类别",
title: "操作", align: "center"
field: "packageName", },
align: "center", {
formatter: function (value, row, index) { field: "install",
var e = title: "安装量",
'<a class="btn btn-primary btn-sm ' + align: "center"
s_edit_h + },
'" href="#" mce_href="#" title="编辑" onclick="edit(\'' + {
row.packageName + title: "操作",
'\')"><i class="fa fa-edit"></i></a> '; field: "packageName",
return e; align: "center",
} formatter: function (value, row, index) {
} var e =
] '<a class="btn btn-primary btn-sm ' +
}); s_edit_h +
'" href="#" mce_href="#" title="编辑" onclick="edit(\'' +
row.packageName +
'\')"><i class="fa fa-edit"></i></a> ';
return e;
}
}
]
});
} }
function reLoad(type) { function reLoad(type) {
if (type == 1) { if (type == 1) {
var opt = { var opt = {
query: { query: {
offset: 0 offset: 0
} }
}; };
$("#exampleTable").bootstrapTable("refresh", opt); $("#exampleTable").bootstrapTable("refresh", opt);
} else { } else {
$("#exampleTable").bootstrapTable("refresh"); $("#exampleTable").bootstrapTable("refresh");
} }
} }
function edit(package_name) { function edit(package_name) {
layer.open({ layer.open({
type: 2, type: 2,
title: "标签标注", title: "标签标注",
maxmin: true, maxmin: true,
shadeClose: false, // 点击遮罩关闭层 shadeClose: false, // 点击遮罩关闭层
area: ["800px", "580px"], area: ["800px", "580px"],
content: prefix + "/edit?packageName=" + package_name // iframe的url content: prefix + "/edit?packageName=" + package_name // iframe的url
}); });
} }
\ No newline at end of file
var prefix = "user"; var prefix = "user";
$(function () { $(function () {
load(); load();
}); });
function load() { function load() {
$("#exampleTable").bootstrapTable({ $("#exampleTable").bootstrapTable({
method: "post", // 服务器数据的请求方式 get or post method: "post", // 服务器数据的请求方式 get or post
url: prefix + "/list", // 服务器数据的加载地址 url: prefix + "/list", // 服务器数据的加载地址
striped: true, // 设置为true会有隔行变色效果 striped: true, // 设置为true会有隔行变色效果
dataType: "json", // 服务器返回的数据类型 dataType: "json", // 服务器返回的数据类型
pagination: true, // 设置为true会在底部显示分页条 pagination: true, // 设置为true会在底部显示分页条
// queryParamsType : "limit", // queryParamsType : "limit",
// //设置为limit则会发送符合RESTFull格式的参数 // //设置为limit则会发送符合RESTFull格式的参数
singleSelect: false, // 设置为true将禁止多选 singleSelect: false, // 设置为true将禁止多选
iconSize: "outline", iconSize: "outline",
toolbar: "#exampleToolbar", toolbar: "#exampleToolbar",
// contentType : "application/x-www-form-urlencoded", // contentType : "application/x-www-form-urlencoded",
// //发送到服务器的数据编码类型 // //发送到服务器的数据编码类型
pageSize: 10, // 如果设置了分页,每页数据条数 pageSize: 10, // 如果设置了分页,每页数据条数
pageNumber: 1, // 如果设置了分布,首页页码 pageNumber: 1, // 如果设置了分布,首页页码
// search: true, // 是否显示搜索框 // search: true, // 是否显示搜索框
showColumns: true, // 是否显示内容下拉框(选择显示的列) showColumns: true, // 是否显示内容下拉框(选择显示的列)
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server" sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
// queryParams : queryParams, // queryParams : queryParams,
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
// queryParamsType = 'limit' ,返回参数必须包含 queryParams: function (params) {
// limit, offset, search, sort, order 否则, 需要包含: return {
// pageSize, pageNumber, searchText, sortName, // 说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
// sortOrder. limit: params.limit,
// 返回false将会终止请求 offset: params.offset,
columns: [{ search: $('#searchName').val()
// 列配置项 };
// 数据类型,详细参数配置参见文档http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/ },
checkbox: true // //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
// 列表中显示复选框 // queryParamsType = 'limit' ,返回参数必须包含
}, // limit, offset, search, sort, order 否则, 需要包含:
{ // pageSize, pageNumber, searchText, sortName,
field: "userName", // 列字段名 // sortOrder.
title: "用户名", // 列标题 // 返回false将会终止请求
align: "center" columns: [{
}, // 列配置项
{ // 数据类型,详细参数配置参见文档http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/
field: "state", checkbox: true
title: "用户状态", // 列表中显示复选框
align: "center", },
formatter: function (value, row, index) { {
if (row.state == 0) { field: "userName", // 列字段名
return "禁用"; title: "用户名", // 列标题
} else { align: "center"
return "正常"; },
} {
} field: "state",
}, title: "用户状态",
{ align: "center",
field: "role", formatter: function (value, row, index) {
title: "角色", if (row.state == 0) {
align: "center", return "禁用";
formatter: function (value, row, index) { } else {
if (row.role == 0) { return "正常";
return "普通用户"; }
} else { }
return "管理员"; },
} {
} field: "role",
}, title: "角色",
{ align: "center",
field: "count", formatter: function (value, row, index) {
title: "标注数量", if (row.role == 0) {
align: "center" return "普通用户";
}, } else {
{ return "管理员";
title: "操作", }
field: "userId", }
align: "center", },
formatter: function (value, row, index) { {
var e = field: "count",
'<a class="btn btn-primary btn-sm ' + title: "标注数量",
s_edit_h + align: "center"
'" href="#" mce_href="#" title="编辑" onclick="edit(\'' + },
row.userId + {
'\')"><i class="fa fa-edit"></i></a> '; title: "操作",
return e; field: "userId",
} align: "center",
} formatter: function (value, row, index) {
] var e =
}); '<a class="btn btn-primary btn-sm ' +
s_edit_h +
'" href="#" mce_href="#" title="编辑" onclick="edit(\'' +
row.userId +
'\')"><i class="fa fa-edit"></i></a> ';
return e;
}
}
]
});
} }
function reLoad(type) { function reLoad(type) {
if (type == 1) { if (type == 1) {
var opt = { var opt = {
query: { query: {
offset: 0 offset: 0
} }
}; };
$("#exampleTable").bootstrapTable("refresh", opt); $("#exampleTable").bootstrapTable("refresh", opt);
} else { } else {
$("#exampleTable").bootstrapTable("refresh"); $("#exampleTable").bootstrapTable("refresh");
} }
} }
function edit(userId) { function edit(userId) {
layer.open({ layer.open({
type: 2, type: 2,
title: "编辑用户", title: "编辑用户",
maxmin: true, maxmin: true,
shadeClose: false, // 点击遮罩关闭层 shadeClose: false, // 点击遮罩关闭层
area: ["800px", "300px"], area: ["800px", "300px"],
content: prefix + "/edit?userId=" + userId // iframe的url content: prefix + "/edit?userId=" + userId // iframe的url
}); });
} }
function add() { function add() {
// iframe层 // iframe层
layer.open({ layer.open({
type : 2, type: 2,
title : '增加用户', title: '增加用户',
maxmin : true, maxmin: true,
shadeClose : false, // 点击遮罩关闭层 shadeClose: false, // 点击遮罩关闭层
area : [ '800px', '450px' ], area: ['800px', '450px'],
content : prefix + '/add' content: prefix + '/add'
}); });
} }
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org" <html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<body class="gray-bg"> <body class="gray-bg">
<div class="wrapper wrapper-content "> <div class="wrapper wrapper-content ">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="ibox"> <div class="ibox">
<div class="ibox-body"> <div class="ibox-body">
<table id="exampleTable" data-mobile-responsive="true"> <div class="fixed-table-toolbar">
</table> <div class="columns pull-right">
</div> <button class="btn btn-success" onclick="reLoad(1)">查询</button>
</div> </div>
</div> <div class="columns pull-right col-md-2 nopadding">
<div> <input id="searchName" type="text" class="form-control"
<script type="text/javascript"> placeholder="packageName">
var s_edit_h = 'hidden'; </div>
</script> </div>
</div> <table id="exampleTable" data-mobile-responsive="true">
<div shiro:hasPermission="sys:user:edit"> </table>
<script type="text/javascript"> </div>
s_edit_h = ''; </div>
</script> </div>
</div> <div>
</div> <script type="text/javascript">
<div th:include="include :: footer"></div> var s_edit_h = 'hidden';
<script type="text/javascript" src="/js/appjs/result/list.js"></script> </script>
</div>
<div shiro:hasPermission="sys:user:edit">
<script type="text/javascript">
s_edit_h = '';
</script>
</div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="/js/appjs/result/list.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org" <html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<body class="gray-bg"> <body class="gray-bg">
<div class="wrapper wrapper-content "> <div class="wrapper wrapper-content ">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="ibox"> <div class="ibox">
<div class="ibox-body"> <div class="ibox-body">
<table id="exampleTable" data-mobile-responsive="true"> <div class="fixed-table-toolbar">
</table> <div class="columns pull-right">
</div> <button class="btn btn-success" onclick="reLoad(1)">查询</button>
</div> </div>
</div> <div class="columns pull-right col-md-2 nopadding">
<div> <input id="searchName" type="text" class="form-control"
<script type="text/javascript"> placeholder="packageName">
var s_edit_h = 'hidden'; </div>
</script> </div>
</div> <table id="exampleTable" data-mobile-responsive="true">
<div shiro:hasPermission="sys:user:edit"> </table>
<script type="text/javascript"> </div>
s_edit_h = ''; </div>
</script> </div>
</div> <div>
</div> <script type="text/javascript">
<div th:include="include :: footer"></div> var s_edit_h = 'hidden';
<script type="text/javascript" src="/js/appjs/tag/list.js"></script> </script>
</div>
<div shiro:hasPermission="sys:user:edit">
<script type="text/javascript">
s_edit_h = '';
</script>
</div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="/js/appjs/tag/list.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org" <html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<body class="gray-bg"> <body class="gray-bg">
<div class="wrapper wrapper-content "> <div class="wrapper wrapper-content ">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="ibox"> <div class="ibox">
<div class="ibox-body"> <div class="ibox-body">
<div id="exampleToolbar" role="group"> <div class="fixed-table-toolbar">
<button type="button" <div id="exampleToolbar" role="group">
class="btn btn-primary" onclick="add()"> <button type="button"
<i class="fa fa-plus" aria-hidden="true"></i>增加用户 class="btn btn-primary" onclick="add()">
</button> <i class="fa fa-plus" aria-hidden="true"></i>增加用户
</div> </button>
<table id="exampleTable" data-mobile-responsive="true"> </div>
</table> <div class="columns pull-right">
</div> <button class="btn btn-success" onclick="reLoad(1)">查询</button>
</div> </div>
</div> <div class="columns pull-right col-md-2 nopadding">
<div> <input id="searchName" type="text" class="form-control"
<script type="text/javascript"> placeholder="姓名">
var s_edit_h = 'hidden'; </div>
</script> </div>
</div> <table id="exampleTable" data-mobile-responsive="true">
<div shiro:hasPermission="sys:user:edit"> </table>
<script type="text/javascript"> </div>
s_edit_h = ''; </div>
</script> </div>
</div> <div>
</div> <script type="text/javascript">
<div th:include="include :: footer"></div> var s_edit_h = 'hidden';
<script type="text/javascript" src="/js/appjs/user/list.js"></script> </script>
</div>
<div shiro:hasPermission="sys:user:edit">
<script type="text/javascript">
s_edit_h = '';
</script>
</div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="/js/appjs/user/list.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
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