Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qwgame
Project
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
赵国君
qwgame
Commits
398088a6
Commit
398088a6
authored
Nov 28, 2018
by
hxw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无用文件夹
parent
eaf78424
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
0 additions
and
301 deletions
+0
-301
DBUtil.java
src/GameEnvironment/GameEnvironment/DBUtil.java
+0
-40
GameEnv.java
src/GameEnvironment/GameEnvironment/GameEnv.java
+0
-0
Util.java
src/GameEnvironment/GameEnvironment/Util.java
+0
-51
Attr.java
src/GameEnvironment/GameEnvironment/bean/Attr.java
+0
-26
GoodsInstance.java
src/GameEnvironment/GameEnvironment/bean/GoodsInstance.java
+0
-35
NpcInstance.java
src/GameEnvironment/GameEnvironment/bean/NpcInstance.java
+0
-35
Place.java
src/GameEnvironment/GameEnvironment/bean/Place.java
+0
-61
SuperClass.java
src/GameEnvironment/GameEnvironment/bean/SuperClass.java
+0
-53
No files found.
src/GameEnvironment/GameEnvironment/DBUtil.java
deleted
100644 → 0
View file @
eaf78424
package
com
.
qiwu
.
chatbotbackend
.
GameEnvironment
.
GameEnvironment
;
import
com.qiwu.chatbotbackend.db.C3p0Utils
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
public
class
DBUtil
{
public
static
String
queryEnvJsonByBotName
(
String
botName
)
throws
Exception
{
Connection
conn
=
C3p0Utils
.
getConnection
();
String
sql
=
"select * from generate_json_tb where bot_name = ?"
;
String
result
=
"{}"
;
try
{
PreparedStatement
ps
=
conn
.
prepareStatement
(
sql
);
ps
.
setString
(
1
,
String
.
valueOf
(
botName
));
ResultSet
rs
=
ps
.
executeQuery
();
if
(
rs
.
next
())
result
=
rs
.
getString
(
"env_json_text"
);
ps
.
close
();
rs
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(
conn
!=
null
)
{
try
{
conn
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
result
;
}
}
src/GameEnvironment/GameEnvironment/GameEnv.java
deleted
100644 → 0
View file @
eaf78424
This diff is collapsed.
Click to expand it.
src/GameEnvironment/GameEnvironment/Util.java
deleted
100644 → 0
View file @
eaf78424
package
com
.
qiwu
.
chatbotbackend
.
GameEnvironment
.
GameEnvironment
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.io.Reader
;
public
class
Util
{
public
static
String
getJsonString
(
String
fullName
)
{
Reader
reader
=
null
;
String
jsonString
=
""
;
try
{
// System.out.println("以字符为单位读取文件内容,一次读多个字节:");
// 一次读多个字符
char
[]
tempchars
=
new
char
[
256
];
int
charread
=
0
;
reader
=
new
InputStreamReader
(
new
FileInputStream
(
fullName
));
// 读入多个字符到字符数组中,charread为一次读取字符数
while
((
charread
=
reader
.
read
(
tempchars
))
!=
-
1
)
{
// 同样屏蔽掉\r不显示
if
((
charread
==
tempchars
.
length
)
&&
(
tempchars
[
tempchars
.
length
-
1
]
!=
'\r'
))
{
// System.out.println(tempchars);
jsonString
=
jsonString
+
String
.
valueOf
(
tempchars
);
// System.out.print(tempchars);
}
else
{
for
(
int
i
=
0
;
i
<
charread
;
i
++)
{
if
(
tempchars
[
i
]
==
'\r'
)
{
continue
;
}
else
{
jsonString
=
jsonString
+
tempchars
[
i
];
// System.out.print(tempchars[i]);
}
}
}
}
}
catch
(
Exception
e1
)
{
e1
.
printStackTrace
();
}
finally
{
if
(
reader
!=
null
)
{
try
{
reader
.
close
();
}
catch
(
IOException
e1
)
{
}
}
}
return
jsonString
;
}
}
src/GameEnvironment/GameEnvironment/bean/Attr.java
deleted
100644 → 0
View file @
eaf78424
package
com
.
qiwu
.
chatbotbackend
.
GameEnvironment
.
GameEnvironment
.
bean
;
import
java.io.Serializable
;
public
class
Attr
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
name
;
private
String
value
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
@Override
public
String
toString
()
{
return
"Attr [name="
+
name
+
", value="
+
value
+
"]"
;
}
}
src/GameEnvironment/GameEnvironment/bean/GoodsInstance.java
deleted
100644 → 0
View file @
eaf78424
package
com
.
qiwu
.
chatbotbackend
.
GameEnvironment
.
GameEnvironment
.
bean
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
GoodsInstance
extends
SuperClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
Place
place
;
private
NpcInstance
npc
;
public
Place
getPlace
()
{
return
place
;
}
public
void
setPlace
(
Place
place
)
{
this
.
place
=
place
;
}
public
NpcInstance
getNpc
()
{
return
npc
;
}
public
void
setNpc
(
NpcInstance
npc
)
{
this
.
npc
=
npc
;
}
@Override
public
String
toString
()
{
String
placeName
=
""
;
if
(
place
!=
null
)
{
placeName
=
place
.
getName
();
}
String
npcName
=
""
;
if
(
npc
!=
null
)
{
npcName
=
npc
.
getName
();
}
return
super
.
toString
()+
"GoodsInstance [placeName="
+
placeName
+
", npcName="
+
npcName
+
"]"
;
}
}
src/GameEnvironment/GameEnvironment/bean/NpcInstance.java
deleted
100644 → 0
View file @
eaf78424
package
com
.
qiwu
.
chatbotbackend
.
GameEnvironment
.
GameEnvironment
.
bean
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
NpcInstance
extends
SuperClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
Place
place
;
private
List
<
GoodsInstance
>
goodsInstances
;
public
Place
getPlace
()
{
return
place
;
}
public
void
setPlace
(
Place
place
)
{
this
.
place
=
place
;
}
public
List
<
GoodsInstance
>
getGoodsInstances
()
{
return
goodsInstances
;
}
public
void
setGoodsInstances
(
List
<
GoodsInstance
>
goodsInstances
)
{
this
.
goodsInstances
=
goodsInstances
;
}
@Override
public
String
toString
()
{
String
placeName
=
""
;
if
(
place
!=
null
)
{
placeName
=
place
.
getName
();
}
int
goodsInstancesSize
=
0
;
if
(
goodsInstances
!=
null
)
{
goodsInstancesSize
=
goodsInstances
.
size
();
}
return
super
.
toString
()+
"NpcInstance [placeName="
+
placeName
+
", goodsInstancesSize="
+
goodsInstancesSize
+
"]"
;
}
}
src/GameEnvironment/GameEnvironment/bean/Place.java
deleted
100644 → 0
View file @
eaf78424
package
com
.
qiwu
.
chatbotbackend
.
GameEnvironment
.
GameEnvironment
.
bean
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
Place
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
name
;
private
String
intro
;
private
List
<
Place
>
ableGo
;
private
List
<
NpcInstance
>
npcInstances
;
private
List
<
GoodsInstance
>
goodsInstances
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getIntro
()
{
return
intro
;
}
public
void
setIntro
(
String
intro
)
{
this
.
intro
=
intro
;
}
public
List
<
Place
>
getAbleGo
()
{
return
ableGo
;
}
public
void
setAbleGo
(
List
<
Place
>
ableGo
)
{
this
.
ableGo
=
ableGo
;
}
public
List
<
NpcInstance
>
getNpcInstances
()
{
return
npcInstances
;
}
public
void
setNpcInstances
(
List
<
NpcInstance
>
npcInstances
)
{
this
.
npcInstances
=
npcInstances
;
}
public
List
<
GoodsInstance
>
getGoodsInstances
()
{
return
goodsInstances
;
}
public
void
setGoodsInstances
(
List
<
GoodsInstance
>
goodsInstances
)
{
this
.
goodsInstances
=
goodsInstances
;
}
@Override
public
String
toString
()
{
int
ableGoSize
=
0
;
int
npcInstancesSize
=
0
;
int
goodsInstancesSize
=
0
;
if
(
ableGo
!=
null
)
{
ableGoSize
=
ableGo
.
size
();
}
if
(
npcInstances
!=
null
)
{
npcInstancesSize
=
npcInstances
.
size
();
}
if
(
goodsInstances
!=
null
)
{
goodsInstancesSize
=
goodsInstances
.
size
();
}
return
"Place [name="
+
name
+
", intro="
+
intro
+
", ableGo="
+
ableGoSize
+
", npcInstances="
+
npcInstancesSize
+
", goodsInstances="
+
goodsInstancesSize
+
"]"
;
}
}
src/GameEnvironment/GameEnvironment/bean/SuperClass.java
deleted
100644 → 0
View file @
eaf78424
package
com
.
qiwu
.
chatbotbackend
.
GameEnvironment
.
GameEnvironment
.
bean
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
SuperClass
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
name
;
private
String
intro
;
private
List
<
Attr
>
attrs
;
private
List
<
GoodsInstance
>
goodsInstances
;
private
List
<
NpcInstance
>
npcInstances
;
public
List
<
GoodsInstance
>
getGoodsInstances
()
{
return
goodsInstances
;
}
public
void
setGoodsInstances
(
List
<
GoodsInstance
>
goodsInstances
)
{
this
.
goodsInstances
=
goodsInstances
;
}
public
List
<
NpcInstance
>
getNpcInstances
()
{
return
npcInstances
;
}
public
void
setNpcInstances
(
List
<
NpcInstance
>
npcInstances
)
{
this
.
npcInstances
=
npcInstances
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getIntro
()
{
return
intro
;
}
public
void
setIntro
(
String
intro
)
{
this
.
intro
=
intro
;
}
public
List
<
Attr
>
getAttrs
()
{
return
attrs
;
}
public
void
setAttrs
(
List
<
Attr
>
attrs
)
{
this
.
attrs
=
attrs
;
}
@Override
public
String
toString
()
{
int
goodsInstanceSize
=
0
;
if
(
goodsInstances
!=
null
)
{
goodsInstanceSize
=
goodsInstances
.
size
();
}
return
"SuperClass [name="
+
name
+
", intro="
+
intro
+
"goodsInstancesSize="
+
goodsInstanceSize
+
", attrs="
+
attrs
+
"]"
;
}
}
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