Skip to content

Commit

Permalink
update readme and fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
xenv committed Mar 2, 2018
1 parent ab752c5 commit 8ffb742
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
20 changes: 19 additions & 1 deletion README.md
Expand Up @@ -25,6 +25,17 @@
* 通过 参数注解 进行方法级**数据校验**,无需额外配置校验类 (通过 AOP 切面实现)
* 统一的错误处理


讲解文章:
* [小小商城项目概述 —— 需求分析、数据表设计、原型设计、多层结构设计、项目规划][4]
* [SSM开发 | 合理配置 mybatis-generator,隔离机器生成代码和额外增加代码][5]
* [SSM开发 | 开发自定义插件,使 mybatis-generator 支持软删除][6]
* [SSM开发 | 实现 Mybatis 的通用 Mapper,免写 SQL 自动处理关联查询 (类hibernate)(mybatis-generator+自定义插件+自定义注解+静态代理+泛型+反射)][7]
* [SSM开发 | 配合Mybatis,通过泛型实现 BaseService ,抽象增改删查方法][8]
* [SSM开发 | 配合自定义注解 和 SpringMVC拦截器,实现 方法级粒度 用户鉴权][9]
* [SSM开发 | 对 SpringMVC 传入参数 进行参数校验 (使用自定义AOP切面+自定义参数注解)][10]


功能:

- [x] 首页、分类页、搜索页、产品页
Expand All @@ -47,4 +58,11 @@

[1]: http://small.ડ.com
[2]: https://github.com/xenv/S-mall-servlet
[3]: https://github.com/xenv/S-mall-ssh
[3]: https://github.com/xenv/S-mall-ssh
[4]: http://www.cnblogs.com/bukong/p/small-start.html
[5]: http://www.cnblogs.com/bukong/p/mybatis-generator-insulate.html
[6]: http://www.cnblogs.com/bukong/p/mybatis-generator-delete-flag.html
[7]: http://www.cnblogs.com/bukong/p/mybatis-general-mapper.html
[8]: http://www.cnblogs.com/bukong/p/ssm-BaseService.html
[9]: http://www.cnblogs.com/bukong/p/ssm-auth.html
[10]: http://www.cnblogs.com/bukong/p/ssm-aop-verification.html
20 changes: 1 addition & 19 deletions pom.xml
@@ -1,23 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!-- $Id: pom.xml 642118 2008-03-28 08:04:16Z reinhard $ -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tmall/controller/admin/UserController.java
Expand Up @@ -5,6 +5,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import tmall.annotation.Auth;
import tmall.pojo.User;
import tmall.util.Pagination;

import java.util.List;

Expand All @@ -13,8 +14,8 @@
public class UserController extends AdminBaseController {
@Auth(User.Group.admin)
@RequestMapping("list")
public String list(Model model) throws Exception {
List<User> users = userService.list();
public String list(Model model, Pagination pagination) throws Exception {
List<User> users = userService.list("pagination", pagination);
model.addAttribute("users", users);
return "/admin/listUser";
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/tmall/service/impl/BaseServiceImpl.java
Expand Up @@ -131,6 +131,9 @@ public BasePOJO get(int id) throws Exception {
@Override
public BasePOJO get(int id, int depth) throws Exception {
BasePOJO object = (BasePOJO) mapper.selectByPrimaryKey(id, depth);
if (object == null) {
throw new NoSuchObjectException("访问的id不存在或已经被删除");
}
return object;
}

Expand Down

0 comments on commit 8ffb742

Please sign in to comment.