diff --git a/pom.xml b/pom.xml
index 707d8d3f403fc470fcd982db4b21c1ba6cc9f04d..fc1f4481d6a382b5398485d9869bc9f063d8b428 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,10 +20,10 @@
1.8
-
+
org.springframework.boot
spring-boot-starter-web
@@ -74,11 +74,11 @@
2.3.1
test
-
+
org.aspectj
@@ -97,6 +97,32 @@
fastjson
1.2.78
+
+ org.springframework.security
+ spring-security-config
+ 5.7.11
+
+
+ com.auth0
+ java-jwt
+ 3.11.0
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+ org.apache.commons
+ commons-pool2
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
diff --git a/src/main/java/com/suse/jd_system_server/Vo/HotelPageListVo.java b/src/main/java/com/suse/jd_system_server/Vo/HotelPageListVo.java
new file mode 100644
index 0000000000000000000000000000000000000000..b63d841c24726fe3082f612538a7779308d5316a
--- /dev/null
+++ b/src/main/java/com/suse/jd_system_server/Vo/HotelPageListVo.java
@@ -0,0 +1,25 @@
+package com.suse.jd_system_server.Vo;
+
+
+import com.suse.jd_system_server.auto.entity.Hotel;
+import lombok.Data;
+
+@Data
+public class HotelPageListVo extends Hotel {
+ /**
+ * 酒店对应的评论数量
+ */
+ private Integer commentCount;
+ /**
+ * 酒店对应的好评数量
+ */
+ private Integer goodCommentCount;
+ /**
+ * 酒店中房间价格最小的
+ */
+ private Integer minPrice;
+ /**
+ * 酒店对应的一条评论
+ */
+ private String com_text;
+}
diff --git a/src/main/java/com/suse/jd_system_server/Vo/RolesVo.java b/src/main/java/com/suse/jd_system_server/Vo/RolesVo.java
new file mode 100644
index 0000000000000000000000000000000000000000..5cd7c0c4c7e007cd5f0237d0b5979a848fecf01d
--- /dev/null
+++ b/src/main/java/com/suse/jd_system_server/Vo/RolesVo.java
@@ -0,0 +1,13 @@
+package com.suse.jd_system_server.Vo;
+
+import com.suse.jd_system_server.entity.Authority;
+import com.suse.jd_system_server.entity.Role;
+
+import java.util.List;
+
+public class RolesVo extends Role {
+ /**
+ * 权限列表
+ */
+ private List authorityList;
+}
diff --git a/src/main/java/com/suse/jd_system_server/aspect/logAspect.java b/src/main/java/com/suse/jd_system_server/aspect/logAspect.java
index f0c2ce3b0d52a5e03c1120113aec302c1b6b93aa..633e61603239622e3ea37ee03b48894148f0c103 100644
--- a/src/main/java/com/suse/jd_system_server/aspect/logAspect.java
+++ b/src/main/java/com/suse/jd_system_server/aspect/logAspect.java
@@ -45,6 +45,8 @@ public class logAspect {
//获取用户信息,用户信息在登录存入session
String userName = (String) request.getSession().getAttribute("userName");
Long userId = (Long) request.getSession().getAttribute("userId");
+// System.out.println("userName:"+userName);
+// System.out.println("userId:"+userId);
//获取用户操作信息。通过反射注解中的value获取
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/AuthorityController.java b/src/main/java/com/suse/jd_system_server/auto/controller/AuthorityController.java
index cb7c5bcbb65c466bd5ee36de4fb551e4dacdd046..cab9383eecf6d31abccf1f05c126fb76cddf0467 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/AuthorityController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/AuthorityController.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.controller;
import com.suse.jd_system_server.auto.service.AuthorityService;
-import com.suse.jd_system_server.entity.Authority;
+import com.suse.jd_system_server.auto.entity.Authority;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@@ -16,6 +16,8 @@ import java.util.List;
*/
@RestController
@RequestMapping("/AuthorityURL")
+
+@CrossOrigin
public class AuthorityController {
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/BedController.java b/src/main/java/com/suse/jd_system_server/auto/controller/BedController.java
index 7a78da4db66e993a631f73bd966540721f3bbba0..b35e2fafcbd5540db6e24bbdf87f87b37e70f82f 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/BedController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/BedController.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.controller;
-import com.suse.jd_system_server.entity.Bed;
+import com.suse.jd_system_server.auto.entity.Bed;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@@ -16,6 +16,7 @@ import com.suse.jd_system_server.auto.service.BedService;
*/
@RestController
@RequestMapping("/BedURL")
+@CrossOrigin
public class BedController {
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/CommentsController.java b/src/main/java/com/suse/jd_system_server/auto/controller/CommentsController.java
index 2bc84cfd47f7289da10eb9b8530afb3702ba1e59..36c5f8f4cb86e4611be9245c234fcd34ff36949c 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/CommentsController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/CommentsController.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.controller;
import com.suse.jd_system_server.auto.service.CommentsService;
-import com.suse.jd_system_server.entity.Comments;
+import com.suse.jd_system_server.auto.entity.Comments;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
@@ -18,6 +18,7 @@ import com.suse.jd_system_server.auto.service.CommentsService;
*/
@RestController
@RequestMapping("/CommentsURL")
+@CrossOrigin
public class CommentsController {
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/HotelController.java b/src/main/java/com/suse/jd_system_server/auto/controller/HotelController.java
index bc754a957a2a99d9a5fc5192250ce08efb0024eb..5398204243267b1ea966999ada36a2d2ab25ea1f 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/HotelController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/HotelController.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.controller;
-import com.suse.jd_system_server.entity.Hotel;
+import com.suse.jd_system_server.auto.entity.Hotel;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
@@ -18,6 +18,7 @@ import com.suse.jd_system_server.auto.service.HotelService;
*/
@RestController
@RequestMapping("/HotelURL")
+@CrossOrigin
public class HotelController {
@@ -102,6 +103,7 @@ public class HotelController {
*/
@PostMapping("/selectList")
public Result selectList(@RequestBody Map param){
+ System.out.println(param);
return Result.buildSuccess(hotelservice.selectList(param),hotelservice.selectCount(param));
}
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/ImgController.java b/src/main/java/com/suse/jd_system_server/auto/controller/ImgController.java
index 53b1f766ed1b879b4e494e8713b2e3d3a831d78c..9476a9938c23e330ab7782795f92d2ae1e089114 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/ImgController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/ImgController.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.controller;
-import com.suse.jd_system_server.entity.Img;
+import com.suse.jd_system_server.auto.entity.Img;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
@@ -17,6 +17,7 @@ import com.suse.jd_system_server.auto.service.ImgService;
*/
@RestController
@RequestMapping("/ImgURL")
+@CrossOrigin
public class ImgController {
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/LogsController.java b/src/main/java/com/suse/jd_system_server/auto/controller/LogsController.java
index 7acfd1126f6926cba22d81c5650b17187fe5c5af..a2c353b702643b5e28415890f90c8f572ede6ead 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/LogsController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/LogsController.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.controller;
-import com.suse.jd_system_server.entity.Logs;
+import com.suse.jd_system_server.auto.entity.Logs;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@@ -16,6 +16,7 @@ import com.suse.jd_system_server.auto.service.LogsService;
*/
@RestController
@RequestMapping("/LogsURL")
+@CrossOrigin
public class LogsController {
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/OrdersController.java b/src/main/java/com/suse/jd_system_server/auto/controller/OrdersController.java
index 80401bab49000b26fb36ed7da487e59f11ffad2c..cdd7a39ca057d7600e41221e1319db918d1d96e4 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/OrdersController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/OrdersController.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.controller;
-import com.suse.jd_system_server.entity.Orders;
+import com.suse.jd_system_server.auto.entity.Orders;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@@ -16,6 +16,7 @@ import com.suse.jd_system_server.auto.service.OrdersService;
*/
@RestController
@RequestMapping("/OrdersURL")
+@CrossOrigin
public class OrdersController {
@@ -115,4 +116,4 @@ public class OrdersController {
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/RoleController.java b/src/main/java/com/suse/jd_system_server/auto/controller/RoleController.java
index 915e451db48fb5f170a299f18cfb224ed6ab5108..0491242bc25e8e2fa9568f0cbf9a9bd2dec23992 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/RoleController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/RoleController.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.controller;
-import com.suse.jd_system_server.entity.Role;
+import com.suse.jd_system_server.auto.entity.Role;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@@ -16,6 +16,7 @@ import com.suse.jd_system_server.auto.service.RoleService;
*/
@RestController
@RequestMapping("/RoleURL")
+@CrossOrigin
public class RoleController {
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/RoomController.java b/src/main/java/com/suse/jd_system_server/auto/controller/RoomController.java
index 8d08f9b9e8042fdb0f332ab5aaaf78fa2b1cca9a..cc03b9d70549daee3e44e305f2a684b262084be9 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/RoomController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/RoomController.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.controller;
-import com.suse.jd_system_server.entity.Room;
+import com.suse.jd_system_server.auto.entity.Room;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@@ -16,6 +16,7 @@ import com.suse.jd_system_server.auto.service.RoomService;
*/
@RestController
@RequestMapping("/RoomURL")
+@CrossOrigin
public class RoomController {
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/TestyController.java b/src/main/java/com/suse/jd_system_server/auto/controller/TestyController.java
index f883a271f3e75ca14f7e9070c61942b01825059b..68a7f219c38b7ffc25c0e2bf85f1536940ad232f 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/TestyController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/TestyController.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.controller;
-import com.suse.jd_system_server.entity.Testy;
+import com.suse.jd_system_server.auto.entity.Testy;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@@ -16,6 +16,7 @@ import com.suse.jd_system_server.auto.service.TestyService;
*/
@RestController
@RequestMapping("/TestyURL")
+@CrossOrigin
public class TestyController {
diff --git a/src/main/java/com/suse/jd_system_server/auto/controller/UserController.java b/src/main/java/com/suse/jd_system_server/auto/controller/UserController.java
index 1452f7a79b3393833b652a7c55802ade9c63657e..547d6a4bdf4a9a0d9b97703c1416155957dcf9f0 100644
--- a/src/main/java/com/suse/jd_system_server/auto/controller/UserController.java
+++ b/src/main/java/com/suse/jd_system_server/auto/controller/UserController.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.controller;
-import com.suse.jd_system_server.entity.User;
+import com.suse.jd_system_server.auto.entity.User;
import com.suse.jd_system_server.auto.empty.Result;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@@ -16,6 +16,7 @@ import com.suse.jd_system_server.auto.service.UserService;
*/
@RestController
@RequestMapping("/UserURL")
+@CrossOrigin
public class UserController {
@@ -37,6 +38,7 @@ public class UserController {
*/
@PostMapping("/updateByUser_id")
public Result updateByUser_id(@RequestBody User demo){
+ System.out.println(demo);
return Result.buildSuccess(userservice.updateByUser_id( demo));
}
@@ -59,6 +61,7 @@ public class UserController {
*/
@PostMapping("/insert")
public Result insert(@RequestBody User demo){
+ System.out.println(demo);
Result.buildSuccess(userservice.insert(demo));
return Result.buildSuccess(demo);
}
@@ -100,6 +103,7 @@ public class UserController {
*/
@PostMapping("/selectList")
public Result selectList(@RequestBody Map param){
+ System.out.println(param);
return Result.buildSuccess(userservice.selectList(param),userservice.selectCount(param));
}
@@ -115,4 +119,4 @@ public class UserController {
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/suse/jd_system_server/auto/empty/Result.java b/src/main/java/com/suse/jd_system_server/auto/empty/Result.java
index a5573b0b1de826826047898ecc2fd80baa1b9e05..9507982a5247e3ec18e8488e32c3e965e25c82dd 100644
--- a/src/main/java/com/suse/jd_system_server/auto/empty/Result.java
+++ b/src/main/java/com/suse/jd_system_server/auto/empty/Result.java
@@ -4,6 +4,9 @@ package com.suse.jd_system_server.auto.empty;
import lombok.Data;
+import java.util.HashMap;
+import java.util.Map;
+
@Data
public class Result {
@@ -32,6 +35,8 @@ public class Result {
private Long count;
+ //动态数据
+ private Map map = new HashMap();//动态数据,根据需要为返回值添加信息
/**
* 构建带分页的返回
@@ -81,5 +86,13 @@ public class Result {
return result;
}
+ /**
+ * 动态添加数据
+ */
+ public Result add(String key, Object value){
+ this.map.put(key,value);
+ return this;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/suse/jd_system_server/auto/entity/Comments.java b/src/main/java/com/suse/jd_system_server/auto/entity/Comments.java
index f03018ac2f0f14d03cbb5daf39f532aabafa7efb..fb0af19f510138c287bddd2555d2e115e726cdf9 100644
--- a/src/main/java/com/suse/jd_system_server/auto/entity/Comments.java
+++ b/src/main/java/com/suse/jd_system_server/auto/entity/Comments.java
@@ -77,4 +77,10 @@ public class Comments implements Serializable{
private Integer status;
+ /**
+ * 字段解释:评价性质,0好1差-
+ */
+
+ private Integer com_status;
+
}
\ No newline at end of file
diff --git a/src/main/java/com/suse/jd_system_server/auto/entity/Hotel.java b/src/main/java/com/suse/jd_system_server/auto/entity/Hotel.java
index 5c428205d4bf46bd601e6c039c2def3950ce7a0d..b1130749b4b7a3c846f068c4d188ea51d18d39de 100644
--- a/src/main/java/com/suse/jd_system_server/auto/entity/Hotel.java
+++ b/src/main/java/com/suse/jd_system_server/auto/entity/Hotel.java
@@ -114,7 +114,7 @@ public class Hotel implements Serializable{
* 字段解释:
*/
- private Integer telphone;
+ private String telphone;
diff --git a/src/main/java/com/suse/jd_system_server/auto/entity/Img.java b/src/main/java/com/suse/jd_system_server/auto/entity/Img.java
index 9fade44baec1ee87c3d53df9d647860abdec0ac2..668bfa74c6ec0975d6b5bae9b6dd80f9e0a7f6a7 100644
--- a/src/main/java/com/suse/jd_system_server/auto/entity/Img.java
+++ b/src/main/java/com/suse/jd_system_server/auto/entity/Img.java
@@ -52,4 +52,9 @@ public class Img implements Serializable{
private String img_url;
+ /**
+ * 字段解释:是否属于酒店,0酒店1房间
+ */
+ private Integer is_hotel;
+
}
\ No newline at end of file
diff --git a/src/main/java/com/suse/jd_system_server/auto/mapper/CommentsMapper.java b/src/main/java/com/suse/jd_system_server/auto/mapper/CommentsMapper.java
index 5bcea55797dcd509240f690daa0995a686eba930..59e5742cc091cb9f49de6ef8eaf527b288f400e8 100644
--- a/src/main/java/com/suse/jd_system_server/auto/mapper/CommentsMapper.java
+++ b/src/main/java/com/suse/jd_system_server/auto/mapper/CommentsMapper.java
@@ -12,6 +12,7 @@ import java.util.List;
*/
public interface CommentsMapper extends BaseMapper{
+
/**
根据Com_id查询
*/
diff --git a/src/main/java/com/suse/jd_system_server/auto/mapper/LoginMapper.java b/src/main/java/com/suse/jd_system_server/auto/mapper/LoginMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..33fe3bd676b2b6bdf54e6c6a6d06fc7f200baf97
--- /dev/null
+++ b/src/main/java/com/suse/jd_system_server/auto/mapper/LoginMapper.java
@@ -0,0 +1,27 @@
+package com.suse.jd_system_server.auto.mapper;
+
+import com.suse.jd_system_server.entity.Authority;
+import com.suse.jd_system_server.entity.User;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface LoginMapper {
+ User selectByname(String username);
+ List selectAuthority(Long userid);
+
+ List selectAuthorityList(Long role_id);
+
+ List selectallAuthority();
+
+ void deleteau(@Param("param") Map param);
+
+ void register(Map param);
+
+ List selectProvince();
+
+ List selectCity(@Param("cityName") String cityName);
+}
diff --git a/src/main/java/com/suse/jd_system_server/auto/mapper/Shb_hotelPageMapper.java b/src/main/java/com/suse/jd_system_server/auto/mapper/Shb_hotelPageMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..84ebb2bf1f4b9f53b7ab26e92f4fcb867d6d4897
--- /dev/null
+++ b/src/main/java/com/suse/jd_system_server/auto/mapper/Shb_hotelPageMapper.java
@@ -0,0 +1,14 @@
+package com.suse.jd_system_server.auto.mapper;
+
+import com.suse.jd_system_server.Vo.HotelPageListVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface Shb_hotelPageMapper {
+
+ List selectHotelLists(@Param("map") Map map);
+}
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/AuthorityService.java b/src/main/java/com/suse/jd_system_server/auto/service/AuthorityService.java
index 7b8e9afe49fcb9f43b549468d91cce01674ce04c..1244472bbf038a0f2baef13cd29d5d762e25d5a6 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/AuthorityService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/AuthorityService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Authority;
+import com.suse.jd_system_server.auto.entity.Authority;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/BedService.java b/src/main/java/com/suse/jd_system_server/auto/service/BedService.java
index 956c38b7eee0aec1cc7cdb5fb8698387deb8fcbb..529d220031676e4be1d958d5c44155d53510b4d5 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/BedService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/BedService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Bed;
+import com.suse.jd_system_server.auto.entity.Bed;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/CommentsService.java b/src/main/java/com/suse/jd_system_server/auto/service/CommentsService.java
index 6085f2c8539f9bd3d0167279f6212ee5636008d6..4484f3c65186d626d0b07f3799139c57d5666a0e 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/CommentsService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/CommentsService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Comments;
+import com.suse.jd_system_server.auto.entity.Comments;
import java.util.Map;
import java.util.List;
/**
@@ -62,4 +62,5 @@ public interface CommentsService {
selectCount:(根据集合查询数量)
*/
public Long selectCount(Map param);
+
}
\ No newline at end of file
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/HotelService.java b/src/main/java/com/suse/jd_system_server/auto/service/HotelService.java
index 6ae907418a89a3d02ddc1e96a9715d474f79adbf..59aee0f365a349e2d2bf0a8eceea1fab2adae0b0 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/HotelService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/HotelService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Hotel;
+import com.suse.jd_system_server.auto.entity.Hotel;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/ImgService.java b/src/main/java/com/suse/jd_system_server/auto/service/ImgService.java
index bb72890ea8b8265c74d78bfc8436af59eae79f1d..8d707213ed731fde3eb01a644d0872a9d264dc9f 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/ImgService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/ImgService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Img;
+import com.suse.jd_system_server.auto.entity.Img;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/LogsService.java b/src/main/java/com/suse/jd_system_server/auto/service/LogsService.java
index 3c69c1c3af61f4c8109bfb91a4f547ff588a8723..8ab0fb4fc3c0a5a7bb7c5967ce23f086380bb727 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/LogsService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/LogsService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Logs;
+import com.suse.jd_system_server.auto.entity.Logs;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/OrdersService.java b/src/main/java/com/suse/jd_system_server/auto/service/OrdersService.java
index 605326bd6a06ec3f8509e1b47303f4ad9de341d2..7f0ae0c6c67a11a7986ad565c5daf653994119f7 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/OrdersService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/OrdersService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Orders;
+import com.suse.jd_system_server.auto.entity.Orders;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/RoleService.java b/src/main/java/com/suse/jd_system_server/auto/service/RoleService.java
index 57ec61d149791ab711e8c58bf72a33f67a529103..9d703c92c41bcf0f20c2659b6936b38f7d178aa2 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/RoleService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/RoleService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Role;
+import com.suse.jd_system_server.auto.entity.Role;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/RoomService.java b/src/main/java/com/suse/jd_system_server/auto/service/RoomService.java
index df27a2d29860bf562c49ae44174d2a2a8b3f1bc7..d91db19aa9fb9ca8b7a8815f12ea707b40edc169 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/RoomService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/RoomService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Room;
+import com.suse.jd_system_server.auto.entity.Room;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/TestyService.java b/src/main/java/com/suse/jd_system_server/auto/service/TestyService.java
index 7ec4eb473adda688d56211c3d6c19692f95cbade..48b9592d1682d1482363fd3150c0fd5a4ae75784 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/TestyService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/TestyService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.Testy;
+import com.suse.jd_system_server.auto.entity.Testy;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/UserService.java b/src/main/java/com/suse/jd_system_server/auto/service/UserService.java
index b35776828ff3fbd6790881deeff2cba79b9c55c4..ef2fd51bdeee083269dccb28a21c334262f1f11e 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/UserService.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/UserService.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service;
-import com.suse.jd_system_server.entity.User;
+import com.suse.jd_system_server.auto.entity.User;
import java.util.Map;
import java.util.List;
/**
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/AuthorityServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/AuthorityServiceImpl.java
index a5371a59db593bf4ef17148a77b22eb636d74f28..d3fdfb96d673dd100489deeb8bfb09459217a94a 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/AuthorityServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/AuthorityServiceImpl.java
@@ -1,7 +1,7 @@
package com.suse.jd_system_server.auto.service.impl;
-import com.suse.jd_system_server.entity.Authority;
+import com.suse.jd_system_server.auto.entity.Authority;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/BedServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/BedServiceImpl.java
index 96b520176e57784b125728b48248182e0066d38c..6d8c6526b35115ccd2c9a6d7d6f07b9acac251af 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/BedServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/BedServiceImpl.java
@@ -1,7 +1,8 @@
package com.suse.jd_system_server.auto.service.impl;
-import com.suse.jd_system_server.entity.Bed;
+import com.suse.jd_system_server.annotation.logWeaving;
+import com.suse.jd_system_server.auto.entity.Bed;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
@@ -42,6 +43,7 @@ public class BedServiceImpl implements BedService{
/**
根据Bed_id删除
*/
+ @logWeaving("对床型表的一次删除操作")
public Integer deleteByBed_id(Long bed_id){
return beddao.deleteByBed_id(bed_id);
}
@@ -53,6 +55,7 @@ public class BedServiceImpl implements BedService{
/**
insert:(插入)
*/
+ @logWeaving("对床型表的一次插入操作")
public Object insert(Bed demo){
beddao.insert(demo);
return demo;
@@ -63,6 +66,7 @@ public class BedServiceImpl implements BedService{
/**
insertOrUpdate(插入或更新(根据主键或唯一索引更新,主键和唯一索引不会改变))
*/
+ @logWeaving("对床型表的一次修改操作")
public Integer insertOrUpdate(Bed demo){
return beddao.insertOrUpdate(demo);
}
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/CommentsServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/CommentsServiceImpl.java
index e6984b5dc57c838ae6ea46d6af874cbcc8987bf3..122b7c2048239585a1d4d0287d0fa8e67fa9f8e3 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/CommentsServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/CommentsServiceImpl.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.service.impl;
import com.suse.jd_system_server.auto.mapper.CommentsMapper;
-import com.suse.jd_system_server.entity.Comments;
+import com.suse.jd_system_server.auto.entity.Comments;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/HotelServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/HotelServiceImpl.java
index f0d3af9353a0877177218b7b7b51d54c51a9cee6..e494fd5d920e11da0a273d2238deb73d4f47bc8a 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/HotelServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/HotelServiceImpl.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.service.impl;
import com.suse.jd_system_server.auto.mapper.HotelMapper;
-import com.suse.jd_system_server.entity.Hotel;
+import com.suse.jd_system_server.auto.entity.Hotel;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/ImgServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/ImgServiceImpl.java
index 1a4422876ae83a187375041fdab50f6dc2780285..a8cec3a576abdc0a441a8cc64f3bcdec3d4fea50 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/ImgServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/ImgServiceImpl.java
@@ -1,8 +1,9 @@
package com.suse.jd_system_server.auto.service.impl;
+import com.suse.jd_system_server.annotation.logWeaving;
import com.suse.jd_system_server.auto.mapper.ImgMapper;
-import com.suse.jd_system_server.entity.Img;
+import com.suse.jd_system_server.auto.entity.Img;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
@@ -42,6 +43,7 @@ public class ImgServiceImpl implements ImgService{
/**
根据Img_id删除
*/
+ @logWeaving("对图片表的一次删除操作")
public Integer deleteByImg_id(Long img_id){
return imgdao.deleteByImg_id(img_id);
}
@@ -53,6 +55,7 @@ public class ImgServiceImpl implements ImgService{
/**
insert:(插入)
*/
+ @logWeaving("对图片表的一次插入操作")
public Object insert(Img demo){
imgdao.insert(demo);
return demo;
@@ -63,6 +66,7 @@ public class ImgServiceImpl implements ImgService{
/**
insertOrUpdate(插入或更新(根据主键或唯一索引更新,主键和唯一索引不会改变))
*/
+ @logWeaving("对图片表的一次修改操作")
public Integer insertOrUpdate(Img demo){
return imgdao.insertOrUpdate(demo);
}
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/LogsServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/LogsServiceImpl.java
index a50409a879ce3874a4c1ffca436f16ed062076a0..a6d8fe0eacaffa649664b33dcecb4f292b0fcbbd 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/LogsServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/LogsServiceImpl.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.service.impl;
import com.suse.jd_system_server.auto.mapper.LogsMapper;
-import com.suse.jd_system_server.entity.Logs;
+import com.suse.jd_system_server.auto.entity.Logs;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/OrdersServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/OrdersServiceImpl.java
index 38f4f9b14d35ece770f45f1e77e87a356abe2c96..cd9c9dfaf9312e4d573cdb76e4f40fd2b80cedfe 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/OrdersServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/OrdersServiceImpl.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.service.impl;
import com.suse.jd_system_server.auto.mapper.OrdersMapper;
-import com.suse.jd_system_server.entity.Orders;
+import com.suse.jd_system_server.auto.entity.Orders;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/RoleServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/RoleServiceImpl.java
index 21851d5867505178a12f42f709f1a2a01508e110..a89b53d0c0e2ab965a271319d03a643cefeb07eb 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/RoleServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/RoleServiceImpl.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.service.impl;
import com.suse.jd_system_server.auto.mapper.RoleMapper;
-import com.suse.jd_system_server.entity.Role;
+import com.suse.jd_system_server.auto.entity.Role;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/RoomServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/RoomServiceImpl.java
index e63a57416a44cc809aeeb908d8ed7a16c1f6afe4..7527f3efdd4db6d842fe4f023a0e90b87b35bb77 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/RoomServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/RoomServiceImpl.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.service.impl;
import com.suse.jd_system_server.auto.mapper.RoomMapper;
-import com.suse.jd_system_server.entity.Room;
+import com.suse.jd_system_server.auto.entity.Room;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/TestyServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/TestyServiceImpl.java
index 10d440f33a33b2b12527fdcbfa090dc1868bb6b4..92f1ef390276a6d1248ac672c08d02e86fb98f37 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/TestyServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/TestyServiceImpl.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.service.impl;
import com.suse.jd_system_server.auto.mapper.TestyMapper;
-import com.suse.jd_system_server.entity.Testy;
+import com.suse.jd_system_server.auto.entity.Testy;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
diff --git a/src/main/java/com/suse/jd_system_server/auto/service/impl/UserServiceImpl.java b/src/main/java/com/suse/jd_system_server/auto/service/impl/UserServiceImpl.java
index 318bcb68caf324814c18b2be1a050943b51e0da3..0a76785a08495f364bfddd93b100600151c99e0a 100644
--- a/src/main/java/com/suse/jd_system_server/auto/service/impl/UserServiceImpl.java
+++ b/src/main/java/com/suse/jd_system_server/auto/service/impl/UserServiceImpl.java
@@ -2,7 +2,7 @@ package com.suse.jd_system_server.auto.service.impl;
import com.suse.jd_system_server.auto.mapper.UserMapper;
-import com.suse.jd_system_server.entity.User;
+import com.suse.jd_system_server.auto.entity.User;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
diff --git a/src/main/java/com/suse/jd_system_server/controller/BedController_lhj.java b/src/main/java/com/suse/jd_system_server/controller/BedController_lhj.java
new file mode 100644
index 0000000000000000000000000000000000000000..7b38bdbfc438622df1133975d693033760faef15
--- /dev/null
+++ b/src/main/java/com/suse/jd_system_server/controller/BedController_lhj.java
@@ -0,0 +1,21 @@
+package com.suse.jd_system_server.controller;
+
+import com.suse.jd_system_server.auto.empty.Result;
+import com.suse.jd_system_server.service.BedService_lhj;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/BedURLlhj")
+@CrossOrigin
+public class BedController_lhj {
+ @Autowired
+ private BedService_lhj bedservice;
+ /**
+ 根据Com_id查询
+ */
+ @GetMapping("/searchbed/{room_id}")
+ public Result searchbed(@PathVariable(value = "room_id") Long room_id){
+ return Result.buildSuccess(bedservice.searchbed(room_id));
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/suse/jd_system_server/controller/CommentsController_lhj.java b/src/main/java/com/suse/jd_system_server/controller/CommentsController_lhj.java
new file mode 100644
index 0000000000000000000000000000000000000000..8f989f110bbdf0673dbe0c7b2938c106392c0223
--- /dev/null
+++ b/src/main/java/com/suse/jd_system_server/controller/CommentsController_lhj.java
@@ -0,0 +1,22 @@
+package com.suse.jd_system_server.controller;
+
+import com.suse.jd_system_server.auto.empty.Result;
+import com.suse.jd_system_server.auto.service.CommentsService;
+import com.suse.jd_system_server.service.CommentsService_lhj;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/CommentsURL1")
+@CrossOrigin
+public class CommentsController_lhj {
+ @Autowired
+ private CommentsService_lhj commentsservice;
+ /**
+ 根据Com_id查询
+ */
+ @GetMapping("/connect/{hotelId}")
+ public Result connect(@PathVariable(value = "hotelId") Long hotelId){
+ return Result.buildSuccess(commentsservice.connect(hotelId));
+ }
+}
diff --git a/src/main/java/com/suse/jd_system_server/controller/HotelController_lhj.java b/src/main/java/com/suse/jd_system_server/controller/HotelController_lhj.java
new file mode 100644
index 0000000000000000000000000000000000000000..7704bd202b8cfc5662db75262fb4a7a535b8035d
--- /dev/null
+++ b/src/main/java/com/suse/jd_system_server/controller/HotelController_lhj.java
@@ -0,0 +1,22 @@
+package com.suse.jd_system_server.controller;
+
+import com.suse.jd_system_server.auto.empty.Result;
+import com.suse.jd_system_server.service.HotelService_lhj;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/HotelURLlhj")
+@CrossOrigin
+public class HotelController_lhj {
+ @Autowired
+ private HotelService_lhj hotelservice;
+ /**
+ 根据Com_id查询
+ */
+ @GetMapping("/searchhotel/{hotelId}")
+ public Result searchhotel(@PathVariable(value = "hotelId") Long hotelId){
+ return Result.buildSuccess(hotelservice.searchhotel(hotelId));
+ }
+}
diff --git a/src/main/java/com/suse/jd_system_server/controller/MapController.java b/src/main/java/com/suse/jd_system_server/controller/MapController.java
new file mode 100644
index 0000000000000000000000000000000000000000..2aacba132d39e8f79c10163ed013e6e03f5121b7
--- /dev/null
+++ b/src/main/java/com/suse/jd_system_server/controller/MapController.java
@@ -0,0 +1,88 @@
+package com.suse.jd_system_server.controller;
+
+import com.suse.jd_system_server.dao.MapDao;
+import com.suse.jd_system_server.dao.UserDao;
+import com.suse.jd_system_server.entity.Hotel;
+import com.suse.jd_system_server.entity.User;
+import com.suse.jd_system_server.epmty.Locations;
+import com.suse.jd_system_server.utils.BaiduMapUtil;
+import com.suse.jd_system_server.utils.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Map组件Controller层
+ */
+@RestController
+@RequestMapping("/map")
+@CrossOrigin()
+public class MapController {
+ @Autowired
+ private UserDao userDao;
+ @Autowired
+ private MapDao mapDao;
+ //为前端地址批量解析JSP提供用户所在城市的酒店名列表
+ @GetMapping("/getHotels")
+ public Result> getHotels(Long userId){
+// System.out.println("成功进入...");
+ User user = userDao.selects(userId);
+
+ String userCity = BaiduMapUtil.getUserCity(user);//获取用户城市部分字段
+ ArrayList hotels = BaiduMapUtil.getHotels(userCity);
+
+ if(hotels.isEmpty())return Result.buildFail("暂无此城市酒店信息,请告知客服等待网站数据更新!");
+ else{
+ Result> result = Result.buildSuccess(hotels);
+ result.add("userLng",user.getAddrx());
+ result.add("userLat",user.getAddry());
+ result.add("city",userCity);
+ return result;
+ }
+ }
+
+ //为导航提供必要的数据
+ //输入:userId,hotelName
+ //输出:用户经纬度、用户地址名、酒店经纬度
+ @PostMapping("/guide")
+ public Result guide(@RequestBody Map map){
+
+ //获取参数
+ String userId = String.valueOf(map.get("userId"));
+ String hotelName = (String) map.get("ends");
+ if(userId.isEmpty() || hotelName.isEmpty())return Result.buildFail("参数缺失!");
+ //业务查询
+ User user = userDao.selects(Long.parseLong(userId));
+ Hotel hotel = mapDao.getHotelInfo("hotel_name", hotelName);
+
+ //设置并返回结果集
+ if(user == null || hotel == null)return Result.buildFail("查无此地!");
+ else{
+ Result