Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-yunqueyilian
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.wechat
pica-cloud-yunqueyilian
提交
56146c64
提交
56146c64
编写于
9月 20, 2018
作者:
yongbo.wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mapper
上级
ade76635
变更
4
展开全部
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
0 行增加
和
696 行删除
+0
-696
DemoController.java
...wechat/yunqueyilian/server/controller/DemoController.java
+0
-73
Hospital.java
...ica/cloud/wechat/yunqueyilian/server/entity/Hospital.java
+0
-265
HospitalMapper.java
...oud/wechat/yunqueyilian/server/mapper/HospitalMapper.java
+0
-17
HospitalMapper.xml
server/src/main/resources/mybatis/HospitalMapper.xml
+0
-341
未找到文件。
server/src/main/java/com/pica/cloud/wechat/yunqueyilian/server/controller/DemoController.java
已删除
100644 → 0
浏览文件 @
ade76635
package
com
.
pica
.
cloud
.
wechat
.
yunqueyilian
.
server
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.client.loadbalancer.LoadBalancerClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.pica.cloud.wechat.yunqueyilian.server.client.IConfigServiceClient
;
import
com.pica.cloud.wechat.yunqueyilian.server.configuration.PropertiesConfiguration
;
import
com.pica.cloud.wechat.yunqueyilian.server.mapper.HospitalMapper
;
import
com.pica.cloud.wechat.yunqueyilian.server.entity.Hospital
;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
com.pica.cloud.foundation.redis.RedisClient
;
@RestController
@RequestMapping
(
"/demo"
)
@Api
(
value
=
"冒烟测试"
,
description
=
"测试 db,redis,读取自定义配置 以及使用 feign 调用微服务"
)
public
class
DemoController
{
@Autowired
private
HospitalMapper
personMapper
;
@Autowired
private
RedisClient
redisClient
;
@Autowired
private
PropertiesConfiguration
properties
;
@Autowired
private
LoadBalancerClient
slb
;
@Autowired
private
IConfigServiceClient
client
;
@ApiOperation
(
value
=
"DB连接测试:更新Person对象"
,
response
=
PicaResponse
.
class
)
@RequestMapping
(
value
=
"/db"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
PicaResponse
<
Hospital
>
saveToDB
()
{
// 创建一个ResponseBuilder
PicaResponse
.
Builder
<
Hospital
>
builder
=
new
PicaResponse
.
Builder
<>();
builder
.
setData
(
personMapper
.
selectByPrimaryKey
(
1008
));
// 返回Response
return
builder
.
build
();
}
@ApiOperation
(
value
=
"Redis连接测试:插入一个Person对象到Redis"
,
response
=
PicaResponse
.
class
)
@RequestMapping
(
value
=
"/redis"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
PicaResponse
<
String
>
saveToCache
()
{
PicaResponse
.
Builder
<
String
>
builder
=
new
PicaResponse
.
Builder
<>();
redisClient
.
set
(
"keyname"
,
personMapper
.
selectByPrimaryKey
(
1008
));
return
builder
.
setData
(
redisClient
.
get
(
"keyname"
)).
build
();
}
@ApiOperation
(
value
=
"读取配置测试"
,
response
=
PicaResponse
.
class
)
@RequestMapping
(
value
=
"/config"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
PicaResponse
<
String
>
readFromConfiguration
()
{
PicaResponse
.
Builder
<
String
>
builder
=
new
PicaResponse
.
Builder
<>();
builder
.
setData
(
properties
.
toString
());
return
builder
.
build
();
}
@ApiOperation
(
value
=
"Feign调用微服务"
,
response
=
PicaResponse
.
class
)
@RequestMapping
(
value
=
"/beans"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
String
beans
()
{
return
client
.
beans
();
}
}
server/src/main/java/com/pica/cloud/wechat/yunqueyilian/server/entity/Hospital.java
已删除
100644 → 0
浏览文件 @
ade76635
package
com
.
pica
.
cloud
.
wechat
.
yunqueyilian
.
server
.
entity
;
import
java.util.Date
;
public
class
Hospital
{
private
Integer
id
;
private
Integer
provinceId
;
private
String
provinceName
;
private
Long
cityId
;
private
String
cityName
;
private
Long
countyId
;
private
String
countyName
;
private
Long
townId
;
private
String
townName
;
private
Long
villageId
;
private
String
villageName
;
private
String
name
;
private
String
hospitalAddress
;
private
Integer
type
;
private
Integer
deleteFlag
;
private
Integer
creatId
;
private
Date
creatTime
;
private
Integer
modifyId
;
private
Date
modifyTime
;
private
Integer
hospitalStatisticsType
;
private
Integer
hospitalRank
;
private
String
hospitalAlias
;
private
Integer
parentId
;
private
String
hospitalClass
;
private
String
hospitalLevel
;
private
String
hospitalGrade
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getProvinceId
()
{
return
provinceId
;
}
public
void
setProvinceId
(
Integer
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
public
String
getProvinceName
()
{
return
provinceName
;
}
public
void
setProvinceName
(
String
provinceName
)
{
this
.
provinceName
=
provinceName
==
null
?
null
:
provinceName
.
trim
();
}
public
Long
getCityId
()
{
return
cityId
;
}
public
void
setCityId
(
Long
cityId
)
{
this
.
cityId
=
cityId
;
}
public
String
getCityName
()
{
return
cityName
;
}
public
void
setCityName
(
String
cityName
)
{
this
.
cityName
=
cityName
==
null
?
null
:
cityName
.
trim
();
}
public
Long
getCountyId
()
{
return
countyId
;
}
public
void
setCountyId
(
Long
countyId
)
{
this
.
countyId
=
countyId
;
}
public
String
getCountyName
()
{
return
countyName
;
}
public
void
setCountyName
(
String
countyName
)
{
this
.
countyName
=
countyName
==
null
?
null
:
countyName
.
trim
();
}
public
Long
getTownId
()
{
return
townId
;
}
public
void
setTownId
(
Long
townId
)
{
this
.
townId
=
townId
;
}
public
String
getTownName
()
{
return
townName
;
}
public
void
setTownName
(
String
townName
)
{
this
.
townName
=
townName
==
null
?
null
:
townName
.
trim
();
}
public
Long
getVillageId
()
{
return
villageId
;
}
public
void
setVillageId
(
Long
villageId
)
{
this
.
villageId
=
villageId
;
}
public
String
getVillageName
()
{
return
villageName
;
}
public
void
setVillageName
(
String
villageName
)
{
this
.
villageName
=
villageName
==
null
?
null
:
villageName
.
trim
();
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
==
null
?
null
:
name
.
trim
();
}
public
String
getHospitalAddress
()
{
return
hospitalAddress
;
}
public
void
setHospitalAddress
(
String
hospitalAddress
)
{
this
.
hospitalAddress
=
hospitalAddress
==
null
?
null
:
hospitalAddress
.
trim
();
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
public
Integer
getCreatId
()
{
return
creatId
;
}
public
void
setCreatId
(
Integer
creatId
)
{
this
.
creatId
=
creatId
;
}
public
Date
getCreatTime
()
{
return
creatTime
;
}
public
void
setCreatTime
(
Date
creatTime
)
{
this
.
creatTime
=
creatTime
;
}
public
Integer
getModifyId
()
{
return
modifyId
;
}
public
void
setModifyId
(
Integer
modifyId
)
{
this
.
modifyId
=
modifyId
;
}
public
Date
getModifyTime
()
{
return
modifyTime
;
}
public
void
setModifyTime
(
Date
modifyTime
)
{
this
.
modifyTime
=
modifyTime
;
}
public
Integer
getHospitalStatisticsType
()
{
return
hospitalStatisticsType
;
}
public
void
setHospitalStatisticsType
(
Integer
hospitalStatisticsType
)
{
this
.
hospitalStatisticsType
=
hospitalStatisticsType
;
}
public
Integer
getHospitalRank
()
{
return
hospitalRank
;
}
public
void
setHospitalRank
(
Integer
hospitalRank
)
{
this
.
hospitalRank
=
hospitalRank
;
}
public
String
getHospitalAlias
()
{
return
hospitalAlias
;
}
public
void
setHospitalAlias
(
String
hospitalAlias
)
{
this
.
hospitalAlias
=
hospitalAlias
==
null
?
null
:
hospitalAlias
.
trim
();
}
public
Integer
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Integer
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getHospitalClass
()
{
return
hospitalClass
;
}
public
void
setHospitalClass
(
String
hospitalClass
)
{
this
.
hospitalClass
=
hospitalClass
==
null
?
null
:
hospitalClass
.
trim
();
}
public
String
getHospitalLevel
()
{
return
hospitalLevel
;
}
public
void
setHospitalLevel
(
String
hospitalLevel
)
{
this
.
hospitalLevel
=
hospitalLevel
==
null
?
null
:
hospitalLevel
.
trim
();
}
public
String
getHospitalGrade
()
{
return
hospitalGrade
;
}
public
void
setHospitalGrade
(
String
hospitalGrade
)
{
this
.
hospitalGrade
=
hospitalGrade
==
null
?
null
:
hospitalGrade
.
trim
();
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/wechat/yunqueyilian/server/mapper/HospitalMapper.java
已删除
100644 → 0
浏览文件 @
ade76635
package
com
.
pica
.
cloud
.
wechat
.
yunqueyilian
.
server
.
mapper
;
import
com.pica.cloud.wechat.yunqueyilian.server.entity.Hospital
;
public
interface
HospitalMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
Hospital
record
);
int
insertSelective
(
Hospital
record
);
Hospital
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
Hospital
record
);
int
updateByPrimaryKey
(
Hospital
record
);
}
\ No newline at end of file
server/src/main/resources/mybatis/HospitalMapper.xml
已删除
100644 → 0
浏览文件 @
ade76635
此差异已折叠。
点击以展开。
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录