Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
civil
civil-bigdata
Commits
af6443eb
Commit
af6443eb
authored
Sep 19, 2022
by
wqc
Committed by
王健飞
Sep 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
共享平台接口
parent
c0f37581
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
165 additions
and
8 deletions
+165
-8
api-server/src/main/resources/application.yml
+1
-1
oauth-server/src/main/resources/application.yml
+1
-1
open-server/src/main/java/com/zq/open/controller/api/ShareApi.java
+27
-0
open-server/src/main/java/com/zq/open/dao/ShareDataDao.java
+14
-0
open-server/src/main/java/com/zq/open/entity/ShareData.java
+30
-0
open-server/src/main/java/com/zq/open/service/ShareService.java
+53
-0
open-server/src/main/java/com/zq/open/vo/CustomVo.java
+27
-0
open-server/src/main/resources/application.yml
+7
-1
portal-server/src/main/resources/application.yml
+1
-1
resource-server/src/main/resources/application.yml
+1
-1
sync-server/src/main/resources/application.yml
+1
-1
sys-server/src/main/resources/application.yml
+1
-1
user-server/src/main/resources/application.yml
+1
-1
No files found.
api-server/src/main/resources/application.yml
View file @
af6443eb
...
...
@@ -47,7 +47,7 @@ spring:
test-on-borrow
:
false
test-on-return
:
false
# 检测连接是否有效
validation-query
:
select 1
validation-query
:
SELECT 1 FROM DUAL
# 配置监控统计
webStatFilter
:
enabled
:
true
...
...
oauth-server/src/main/resources/application.yml
View file @
af6443eb
...
...
@@ -60,7 +60,7 @@ spring:
test-on-borrow
:
false
test-on-return
:
false
# 检测连接是否有效
validation-query
:
SELECT 1
validation-query
:
SELECT 1
FROM DUAL
filters
:
stat
stat
:
merge-sql
:
true
...
...
open-server/src/main/java/com/zq/open/controller/api/ShareApi.java
0 → 100644
View file @
af6443eb
package
com
.
zq
.
open
.
controller
.
api
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.vo.ResultVo
;
import
com.zq.open.entity.ShareData
;
import
com.zq.open.service.ShareService
;
import
com.zq.open.vo.CustomVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
@Api
(
tags
=
"数据共享相关接口"
)
@RequiredArgsConstructor
@RestController
@RequestMapping
(
value
=
"/open/api/share"
)
public
class
ShareApi
{
private
final
ShareService
shareService
;
@ApiOperation
(
"数据共享接口"
)
@PostMapping
(
value
=
"/shareData"
)
public
ResultVo
destituteInfo
(
@RequestBody
CustomVo
vo
)
{
return
ResultVo
.
success
(
shareService
.
shareData
(
vo
));
}
}
open-server/src/main/java/com/zq/open/dao/ShareDataDao.java
0 → 100644
View file @
af6443eb
package
com
.
zq
.
open
.
dao
;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zq.common.constant.DBName
;
import
com.zq.open.entity.ShareData
;
import
org.springframework.stereotype.Repository
;
@DS
(
DBName
.
GXSHJZ
)
@Repository
public
interface
ShareDataDao
extends
BaseMapper
<
ShareData
>
{
}
open-server/src/main/java/com/zq/open/entity/ShareData.java
0 → 100644
View file @
af6443eb
package
com
.
zq
.
open
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName
(
value
=
"share_data"
)
public
class
ShareData
{
/**
* 服务号
*/
private
String
serviceid
;
/**
* 总数
*/
private
BigDecimal
datacount
;
}
\ No newline at end of file
open-server/src/main/java/com/zq/open/service/ShareService.java
0 → 100644
View file @
af6443eb
package
com
.
zq
.
open
.
service
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zq.common.vo.ResultVo
;
import
com.zq.open.dao.ShareDataDao
;
import
com.zq.open.entity.ShareData
;
import
com.zq.open.vo.CustomVo
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
@RequiredArgsConstructor
public
class
ShareService
{
private
final
ShareDataDao
shareDataDao
;
public
ResultVo
shareData
(
CustomVo
vo
)
{
if
(
vo
.
getServiceid
().
equals
(
""
)
||
vo
.
getServiceid
()==
null
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
ShareData
>
share
=
new
ArrayList
<>();
List
<
ShareData
>
dataList
=
shareDataDao
.
selectList
(
Wrappers
.
lambdaQuery
(
ShareData
.
builder
().
serviceid
(
""
).
build
()));
for
(
ShareData
list:
dataList
)
{
share
.
add
(
list
);
}
map
.
put
(
"code"
,
1
);
map
.
put
(
"text"
,
"获取成功"
);
map
.
put
(
"dataList"
,
share
);
return
ResultVo
.
success
(
map
);
}
else
if
(
vo
.
getServiceid
()!=
null
){
Map
<
String
,
Object
>
custom
=
new
HashMap
<>();
List
<
ShareData
>
share
=
new
ArrayList
<>();
ShareData
shareData
=
shareDataDao
.
selectOne
(
Wrappers
.
lambdaQuery
(
ShareData
.
builder
().
serviceid
(
vo
.
getServiceid
()).
build
()));
if
(
shareData
!=
null
)
{
share
.
add
(
shareData
);
custom
.
put
(
"code"
,
1
);
custom
.
put
(
"text"
,
"获取成功"
);
custom
.
put
(
"dataList"
,
share
);
}
else
{
return
ResultVo
.
fail
(
"抱歉,您传的服务号不对"
);
}
return
ResultVo
.
success
(
custom
);
}
else
{
return
ResultVo
.
fail
(
"抱歉,您传的服务号不对"
);
}
}
}
open-server/src/main/java/com/zq/open/vo/CustomVo.java
0 → 100644
View file @
af6443eb
package
com
.
zq
.
open
.
vo
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
public
class
CustomVo
{
/**
* 服务号
*/
private
String
serviceid
;
/**
* 总数
*/
private
BigDecimal
datacount
;
}
open-server/src/main/resources/application.yml
View file @
af6443eb
...
...
@@ -47,6 +47,12 @@ spring:
username
:
${jdbc.username}
password
:
${jdbc.password}
url
:
${jdbc.gxhy.url}
gxshjz
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
${jdbc.driver-class-name}
username
:
${jdbc.username}
password
:
${jdbc.password}
url
:
${jdbc.gxshjz.url}
ozt
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
${ojdbc.driver-class-name}
...
...
@@ -72,7 +78,7 @@ spring:
test-on-borrow
:
false
test-on-return
:
false
# 检测连接是否有效
validation-query
:
SELECT 1
validation-query
:
SELECT 1
FROM DUAL
filters
:
stat
stat
:
merge-sql
:
true
...
...
portal-server/src/main/resources/application.yml
View file @
af6443eb
...
...
@@ -110,7 +110,7 @@ spring:
test-on-borrow
:
false
test-on-return
:
false
# 检测连接是否有效
validation-query
:
select 1
validation-query
:
SELECT 1 FROM DUAL
filters
:
stat
stat
:
merge-sql
:
true
...
...
resource-server/src/main/resources/application.yml
View file @
af6443eb
...
...
@@ -60,7 +60,7 @@ spring:
test-on-borrow
:
false
test-on-return
:
false
# 检测连接是否有效
validation-query
:
SELECT 1
validation-query
:
SELECT 1
FROM DUAL
filters
:
stat
stat
:
merge-sql
:
true
...
...
sync-server/src/main/resources/application.yml
View file @
af6443eb
...
...
@@ -42,7 +42,7 @@ spring:
test-on-borrow
:
false
test-on-return
:
false
# 检测连接是否有效
validation-query
:
SELECT 1
validation-query
:
SELECT 1
FROM DUAL
filters
:
stat
stat
:
merge-sql
:
true
...
...
sys-server/src/main/resources/application.yml
View file @
af6443eb
...
...
@@ -58,7 +58,7 @@ spring:
test-on-borrow
:
false
test-on-return
:
false
# 检测连接是否有效
validation-query
:
select 1
validation-query
:
SELECT 1 FROM DUAL
filters
:
stat
stat
:
merge-sql
:
true
...
...
user-server/src/main/resources/application.yml
View file @
af6443eb
...
...
@@ -52,7 +52,7 @@ spring:
test-on-borrow
:
false
test-on-return
:
false
# 检测连接是否有效
validation-query
:
select 1
validation-query
:
SELECT 1 FROM DUAL
filters
:
stat
stat
:
merge-sql
:
true
...
...
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