Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wxh
spring-boot-material
Commits
152c3237
Commit
152c3237
authored
Nov 09, 2019
by
wxh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了房间接口的问题
parent
655e11f6
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
28 additions
and
35 deletions
+28
-35
src/main/java/com/orhon/smartcampus/material/modules/management/entity/RoomEntity.java
+2
-0
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/BuildingsListFetcher.java
+1
-1
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/GoodsManageListFetcher.java
+3
-3
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/SeleFloorListFetcher.java
+1
-1
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/SeleRoomListFetcher.java
+1
-1
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/SiteListFetcher.java
+1
-1
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/UnitListFetcher.java
+3
-3
src/main/java/com/orhon/smartcampus/material/modules/management/gqlInputModel/GQLRoomInput.java
+1
-0
src/main/java/com/orhon/smartcampus/material/modules/management/gqlModel/RoomGqlModel.java
+1
-0
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddBuildingsMutation.java
+1
-3
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddFloorMutation.java
+0
-2
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddGoodsClassifyMutation.java
+0
-4
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddGoodsManageMutation.java
+3
-6
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddRoomMutation.java
+3
-2
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddRootSiteMutation.java
+0
-4
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddUnitMutation.java
+0
-2
src/main/resources/application.yml
+1
-0
src/main/resources/graphql/material.graphqls
+1
-1
src/main/resources/graphql/room.graphqls
+5
-1
No files found.
src/main/java/com/orhon/smartcampus/material/modules/management/entity/RoomEntity.java
View file @
152c3237
...
...
@@ -26,6 +26,8 @@ public class RoomEntity {
private
Integer
room_number
;
@Column
(
name
=
"room_name"
,
nullable
=
false
)
private
String
room_name
;
@Column
(
name
=
"room_user"
,
nullable
=
false
)
private
String
room_user
;
@Column
(
name
=
"room_status"
,
nullable
=
false
)
private
Integer
room_status
;
@Column
(
name
=
"add_id"
,
nullable
=
false
)
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/BuildingsListFetcher.java
View file @
152c3237
...
...
@@ -31,7 +31,7 @@ public class BuildingsListFetcher implements DataFetcher {
public
Object
get
(
DataFetchingEnvironment
env
)
throws
Exception
{
// + schoolId
String
hql
=
"from Buildings 1=1 "
;
String
hql
=
"from Buildings
where
1=1 "
;
GQLPageParam
page
=
EnvArgsMapper
.
MAPPER
.
fromArgs
(
env
);
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/GoodsManageListFetcher.java
View file @
152c3237
...
...
@@ -28,7 +28,7 @@ public class GoodsManageListFetcher implements DataFetcher {
public
Object
get
(
DataFetchingEnvironment
env
)
throws
Exception
{
// + schoolId
String
hql
=
"from GoodsManage 1=1 "
;
String
hql
=
"from GoodsManage
where
1=1 "
;
GQLPageParam
page
=
EnvArgsMapper
.
MAPPER
.
fromArgs
(
env
);
...
...
@@ -40,8 +40,8 @@ public class GoodsManageListFetcher implements DataFetcher {
if
(
map
.
get
(
"goods_name"
)!=
null
)
{
hql
+=
" and goods_name "
+
Util
.
decide
(
"like_"
+
map
.
get
(
"goods_name"
));
}
if
(
map
.
get
(
"good_status"
)!=
null
)
{
hql
+=
" and good
_status "
+
Util
.
decide
(
map
.
get
(
"good
_status"
));
if
(
map
.
get
(
"good
s
_status"
)!=
null
)
{
hql
+=
" and good
s_status "
+
Util
.
decide
(
map
.
get
(
"goods
_status"
));
}
}
hql
+=
" ORDER BY created_at DESC "
;
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/SeleFloorListFetcher.java
View file @
152c3237
...
...
@@ -31,7 +31,7 @@ public class SeleFloorListFetcher implements DataFetcher {
public
Object
get
(
DataFetchingEnvironment
env
)
throws
Exception
{
// + schoolId
String
hql
=
"from FloorEntity 1=1 "
;
String
hql
=
"from FloorEntity
where
1=1 "
;
GQLPageParam
page
=
EnvArgsMapper
.
MAPPER
.
fromArgs
(
env
);
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/SeleRoomListFetcher.java
View file @
152c3237
...
...
@@ -31,7 +31,7 @@ public class SeleRoomListFetcher implements DataFetcher {
public
Object
get
(
DataFetchingEnvironment
env
)
throws
Exception
{
// + schoolId
String
hql
=
"from RoomEntity 1=1 "
;
String
hql
=
"from RoomEntity
where
1=1 "
;
GQLPageParam
page
=
EnvArgsMapper
.
MAPPER
.
fromArgs
(
env
);
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/SiteListFetcher.java
View file @
152c3237
...
...
@@ -32,7 +32,7 @@ public class SiteListFetcher implements DataFetcher {
public
Object
get
(
DataFetchingEnvironment
env
)
throws
Exception
{
// + schoolId
String
hql
=
"from RootEntity 1=1 "
;
String
hql
=
"from RootEntity
where
1=1 "
;
GQLPageParam
page
=
EnvArgsMapper
.
MAPPER
.
fromArgs
(
env
);
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/fetcher/UnitListFetcher.java
View file @
152c3237
...
...
@@ -27,7 +27,7 @@ public class UnitListFetcher implements DataFetcher {
public
Object
get
(
DataFetchingEnvironment
env
)
throws
Exception
{
// + schoolId
String
hql
=
"from Unit 1=1 "
;
String
hql
=
"from Unit
where
1=1 "
;
GQLPageParam
page
=
EnvArgsMapper
.
MAPPER
.
fromArgs
(
env
);
...
...
@@ -36,10 +36,10 @@ public class UnitListFetcher implements DataFetcher {
if
(
map
.
get
(
"id"
)
!=
null
)
{
hql
+=
" and id "
+
Util
.
decide
(
map
.
get
(
"id"
));
}
if
(
map
.
get
(
"
building_id
"
)
!=
null
)
{
if
(
map
.
get
(
"
unit_name
"
)
!=
null
)
{
hql
+=
" and unit_name "
+
Util
.
decide
(
"like_"
+
map
.
get
(
"unit_name"
));
}
if
(
map
.
get
(
"
floor
_status"
)
!=
null
)
{
if
(
map
.
get
(
"
unit
_status"
)
!=
null
)
{
hql
+=
" and unit_status "
+
Util
.
decide
(
map
.
get
(
"unit_status"
));
}
}
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/gqlInputModel/GQLRoomInput.java
View file @
152c3237
...
...
@@ -12,6 +12,7 @@ public class GQLRoomInput {
private
Integer
room_key
;
private
Integer
room_number
;
private
String
room_name
;
private
String
room_user
;
private
Integer
room_status
;
private
String
add_id
;
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/gqlModel/RoomGqlModel.java
View file @
152c3237
...
...
@@ -14,6 +14,7 @@ public class RoomGqlModel {
private
Integer
room_number
;
private
String
room_name
;
private
Integer
room_status
;
private
String
room_user
;
private
String
add_id
;
private
Date
created_at
;
private
Date
updated_at
;
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddBuildingsMutation.java
View file @
152c3237
...
...
@@ -72,9 +72,7 @@ public class AddBuildingsMutation implements DataFetcher {
if
(
input
.
getBuildings_status
()
!=
null
){
buildings
.
setBuildings_status
(
input
.
getBuildings_status
());
}
if
(
input
.
getAdd_id
()
!=
null
){
buildings
.
setAdd_id
(
String
.
valueOf
(
userId
));
}
buildings
.
setAdd_id
(
String
.
valueOf
(
userId
));
try
{
buildingsDao
.
saveOrUpdate
(
buildings
);
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddFloorMutation.java
View file @
152c3237
...
...
@@ -68,9 +68,7 @@ public class AddFloorMutation implements DataFetcher {
if
(
input
.
getFloor_status
()
!=
null
){
roomEntity
.
setFloor_status
(
input
.
getFloor_status
());
}
if
(
input
.
getAdd_id
()
!=
null
){
roomEntity
.
setAdd_id
(
String
.
valueOf
(
userId
));
}
try
{
floorDao
.
saveOrUpdate
(
roomEntity
);
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddGoodsClassifyMutation.java
View file @
152c3237
...
...
@@ -66,12 +66,8 @@ public class AddGoodsClassifyMutation implements DataFetcher {
if
(
input
.
getSort_order
()
!=
null
){
goodsClassify
.
setSort_order
(
input
.
getSort_order
());
}
if
(
input
.
getSchool_id
()
!=
null
){
goodsClassify
.
setSchool_id
(
String
.
valueOf
(
schoolId
));
}
if
(
input
.
getAdd_id
()
!=
null
){
goodsClassify
.
setAdd_id
(
String
.
valueOf
(
userId
));
}
try
{
goodsClassifyDao
.
saveOrUpdate
(
goodsClassify
);
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddGoodsManageMutation.java
View file @
152c3237
...
...
@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.UUID
;
@Component
public
class
AddGoodsManageMutation
implements
DataFetcher
{
...
...
@@ -71,9 +72,7 @@ public class AddGoodsManageMutation implements DataFetcher {
if
(
input
.
getGoods_price
()
!=
null
){
goodsManage
.
setGoods_price
(
input
.
getGoods_price
());
}
if
(
input
.
getGoods_number
()
!=
null
){
goodsManage
.
setGoods_number
(
input
.
getGoods_number
());
}
goodsManage
.
setGoods_number
(
UUID
.
randomUUID
().
toString
().
substring
(
24
));
if
(
input
.
getGoods_stock
()
!=
null
){
goodsManage
.
setGoods_stock
(
input
.
getGoods_stock
());
}
...
...
@@ -83,9 +82,7 @@ public class AddGoodsManageMutation implements DataFetcher {
if
(
input
.
getGoods_status
()
!=
null
){
goodsManage
.
setGoods_status
(
input
.
getGoods_status
());
}
if
(
input
.
getAdd_id
()
!=
null
){
goodsManage
.
setAdd_id
(
String
.
valueOf
(
userId
));
}
goodsManage
.
setAdd_id
(
String
.
valueOf
(
userId
));
if
(
input
.
getEmploy_time
()
!=
null
){
goodsManage
.
setEmploy_time
(
input
.
getEmploy_time
());
}
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddRoomMutation.java
View file @
152c3237
...
...
@@ -70,12 +70,13 @@ public class AddRoomMutation implements DataFetcher {
if
(
input
.
getRoom_name
()
!=
null
){
roomEntity
.
setRoom_name
(
input
.
getRoom_name
());
}
if
(
input
.
getRoom_user
()
!=
null
){
roomEntity
.
setRoom_user
(
input
.
getRoom_user
());
}
if
(
input
.
getRoom_status
()
!=
null
){
roomEntity
.
setRoom_status
(
input
.
getRoom_status
());
}
if
(
input
.
getAdd_id
()
!=
null
){
roomEntity
.
setAdd_id
(
String
.
valueOf
(
userId
));
}
try
{
roomDao
.
saveOrUpdate
(
roomEntity
);
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddRootSiteMutation.java
View file @
152c3237
...
...
@@ -117,12 +117,8 @@ public class AddRootSiteMutation implements DataFetcher {
if
(
input
.
getSort_order
()
!=
null
){
rootEntity
.
setSort_order
(
input
.
getSort_order
());
}
if
(
input
.
getSchool_id
()
!=
null
){
rootEntity
.
setSchool_id
(
String
.
valueOf
(
schoolId
));
}
if
(
input
.
getAdd_id
()
!=
null
){
rootEntity
.
setAdd_id
(
String
.
valueOf
(
userId
));
}
try
{
rootDao
.
saveOrUpdate
(
rootEntity
);
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/orhon/smartcampus/material/modules/management/mutation/AddUnitMutation.java
View file @
152c3237
...
...
@@ -72,9 +72,7 @@ public class AddUnitMutation implements DataFetcher {
if
(
input
.
getFloor_end
()
!=
null
){
unit
.
setFloor_end
(
input
.
getFloor_end
());
}
if
(
input
.
getAdd_id
()
!=
null
){
unit
.
setAdd_id
(
String
.
valueOf
(
userId
));
}
try
{
unitDao
.
saveOrUpdate
(
unit
);
}
catch
(
Exception
e
)
{
...
...
src/main/resources/application.yml
View file @
152c3237
...
...
@@ -8,6 +8,7 @@ server:
port
:
8088
connection-timeout
:
5000
spring
:
application
:
name
:
smartcampus-material
...
...
src/main/resources/graphql/material.graphqls
View file @
152c3237
...
...
@@ -88,7 +88,7 @@ input GoodsManageInput {
input GoodsManageCondition {
id:Int
goods_name:String
good_status:Int
good
s
_status:Int
}
type GoodsManageResponse {
code:Int
...
...
src/main/resources/graphql/room.graphqls
View file @
152c3237
...
...
@@ -7,6 +7,7 @@ input MaterialRoomAdd{
room_name:String
room_status:Int
add_id:String
room_user:String
}
type MaterialRoomListResult {
code:Int
...
...
@@ -25,8 +26,10 @@ type MaterialRoomBean{
room_key:Int
"房间人数"
room_number:Int
"房间
人数
名称"
"房间名称"
room_name:String
"房间人数名称"
room_user:String
"房间状态"
room_status:Int
"添加人ID"
...
...
@@ -43,6 +46,7 @@ type MaterialRoomResultType{
room_key:Int
room_number:Int
room_name:String
room_user:String
room_status:Int
add_id:String
created_at:Date
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment