zmd50 5 years ago
parent bd8a678259
commit d155f7318c

@ -72,7 +72,7 @@ public class BookController {
}
return res;
}
/*
//添加型图书 图书表结构更改
@ResponseBody
@PostMapping("/addbook")
@ -106,5 +106,5 @@ public class BookController {
res.data=null;
return res;
}
*/
}

@ -15,7 +15,7 @@ public class CartController {
@Autowired
Result res;
/*
//添加商品进购物车 id为isbn
@ResponseBody
@GetMapping("/addintocart")
@ -51,5 +51,5 @@ public class CartController {
res.data=null;
return res;
}
*/
}

@ -46,13 +46,15 @@ public class UserController {
res.setCode(-2);
res.setMsg("密码错误");
res.data = null;
} else if (user.getUserstatus() == 0) {
} else if (user1.getUserstatus() == 0) {
res.setCode(0);
res.setMsg("用户登录");
res.data.clear();
res.data.add(user1);
} else {
res.setCode(1);
res.setMsg("管理员登录");
res.data.clear();
res.data.add(user1);
}
return res;
@ -82,7 +84,7 @@ public class UserController {
}
return res;
}
/*
//用户管理>删除用户 注销账号
@ResponseBody
@GetMapping("/delete")
@ -123,5 +125,5 @@ public class UserController {
return res;
}
*/
}

@ -11,9 +11,9 @@ import org.springframework.stereotype.Repository;
public interface UserMapper {
//通过username查询用户信息
@Select("select * from user_list where username=#{username}")
@Select("select * from user where username=#{username}")
User queryUserByusername(String username);
@Insert("insert into user_list values(#{username},#{password},#{kind})")
@Insert("insert into user values(#{username},#{password},#{kind})")
int InsertUser(User user);
}

@ -1,6 +1,6 @@
server.port=8090
server.port=8099
spring.datasource.url=jdbc:mysql://localhost:3306/test02?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8
spring.datasource.url=jdbc:mysql://localhost:3306/bookstore?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8
spring.datasource.username=root
spring.datasource.password=root

Loading…
Cancel
Save