Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
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
bltdc
dc-cost-system
Commits
10966fa6
Commit
10966fa6
authored
Oct 28, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api
parent
2b302fa7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
39 deletions
+49
-39
pom.xml
bailuntec-cost-api/pom.xml
+16
-10
CostApi.java
...ost-api/src/main/java/com/bailuntec/cost/api/CostApi.java
+3
-6
CostListApi.java
...api/src/main/java/com/bailuntec/cost/api/CostListApi.java
+1
-1
pom.xml
bailuntec-cost-core/pom.xml
+10
-0
MybatisPlusConfig.java
...n/java/com/blt/other/common/config/MybatisPlusConfig.java
+15
-12
CostApiController.java
...m/blt/other/module/cost/controller/CostApiController.java
+3
-9
deploy-miniapp-prod.sh
bailuntec-cost-core/src/main/shell/deploy-miniapp-prod.sh
+1
-1
No files found.
bailuntec-cost-api/pom.xml
View file @
10966fa6
...
...
@@ -114,18 +114,24 @@
</configuration>
</plugin>
<plugin>
<artifactId>
maven-source-plugin
</artifactId>
<version>
3.0.1
</version>
<configuration>
<attach>
true
</attach>
</configuration>
<executions>
<execution>
<phase>
compile
</phase>
<goals>
<goal>
jar
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- omitted xml -->
<distributionManagement>
<repository>
<!--必须与 settings.xml 的 id 一致-->
<id>
bailuntec-bailuntec-java-java
</id>
<name>
java
</name>
<url>
https://bailuntec-maven.pkg.coding.net/repository/bailuntec-java/java/
</url>
</repository>
</distributionManagement>
</project>
bailuntec-cost-api/src/main/java/com/bailuntec/cost/api/CostApi.java
View file @
10966fa6
...
...
@@ -13,8 +13,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
@RestController
@FeignClient
(
name
=
"bailuntec-cost-api"
,
url
=
"http://api.fee.bailuntec.com/fee/api/cost/api"
)
@FeignClient
(
name
=
"bailuntec-cost-api"
,
url
=
"http://api.fee.bailuntec.com/purchase/other/cost/api"
)
public
interface
CostApi
{
...
...
@@ -71,8 +70,6 @@ public interface CostApi {
@ApiOperation
(
"获取费用系统列表"
)
@GetMapping
({
"/getCostList"
})
CostResult
<
PageInfo
<
CostDto
>>
getCostList
(
@RequestParam
String
startDate
,
@RequestParam
String
endDate
,
@RequestParam
(
name
=
"pageIndex"
)
Integer
pageIndex
,
@RequestParam
(
name
=
"pageSize"
)
Integer
pageSize
);
CostResult
<
List
<
CostDto
>>
getCostList
(
@RequestParam
(
name
=
"startDate"
)
String
startDate
,
@RequestParam
(
name
=
"endDate"
)
String
endDate
);
}
bailuntec-cost-api/src/main/java/com/bailuntec/cost/api/CostListApi.java
View file @
10966fa6
...
...
@@ -10,6 +10,6 @@ import org.springframework.cloud.openfeign.FeignClient;
* @author robbendev
* @since 2020/10/12 9:32 上午
*/
@FeignClient
(
name
=
"bailuntec-cost-api"
,
url
=
""
)
@FeignClient
(
name
=
"bailuntec-cost-
list-
api"
,
url
=
""
)
public
interface
CostListApi
{
}
bailuntec-cost-core/pom.xml
View file @
10966fa6
...
...
@@ -156,9 +156,19 @@
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis-spring
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper
</artifactId>
<version>
5.1.2
</version>
</dependency>
<!--spring boot自动配置-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
bailuntec-cost-core/src/main/java/com/blt/other/common/config/MybatisPlusConfig.java
View file @
10966fa6
...
...
@@ -2,9 +2,12 @@ package com.blt.other.common.config;
import
com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
;
import
com.github.pagehelper.PageHelper
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
java.util.Properties
;
/**
* mybatis plus配置
*
...
...
@@ -13,20 +16,20 @@ import org.springframework.context.annotation.Configuration;
@Configuration
public
class
MybatisPlusConfig
{
/**
* mp分页配置
*
* @return
*/
@Bean
public
PageHelper
pageHelper
()
{
PageHelper
pageHelper
=
new
PageHelper
();
Properties
p
=
new
Properties
();
p
.
setProperty
(
"offsetAsPageNum"
,
"true"
);
p
.
setProperty
(
"rowBoundsWithCount"
,
"true"
);
p
.
setProperty
(
"reasonable"
,
"true"
);
pageHelper
.
setProperties
(
p
);
return
pageHelper
;
}
@Bean
public
PaginationInterceptor
paginationInterceptor
()
{
PaginationInterceptor
paginationInterceptor
=
new
PaginationInterceptor
();
// 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false
paginationInterceptor
.
setOverflow
(
false
);
// 设置最大单页限制数量,默认 500 条,-1 不受限制
// paginationInterceptor.setLimit(500);
// 开启 count 的 join 优化,只针对部分 left join
return
paginationInterceptor
;
return
new
PaginationInterceptor
();
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostApiController.java
View file @
10966fa6
...
...
@@ -8,8 +8,6 @@ import com.bailuntec.cost.api.dto.WageCostDto;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.blt.other.module.cost.service.CostApiService
;
import
com.blt.other.module.database.model.CostDomain
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -129,14 +127,10 @@ public class CostApiController implements CostApi {
@ApiOperation
(
"根据最后更新时间查询费用单"
)
@Override
@GetMapping
({
"/getCostList"
})
public
CostResult
<
PageInfo
<
CostDto
>>
getCostList
(
@RequestParam
String
startDate
,
@RequestParam
String
endDate
,
@RequestParam
(
name
=
"pageIndex"
)
Integer
pageIndex
,
@RequestParam
(
name
=
"pageSize"
)
Integer
pageSize
)
{
PageHelper
.
startPage
(
pageIndex
,
pageSize
);
public
CostResult
<
List
<
CostDto
>>
getCostList
(
@RequestParam
String
startDate
,
@RequestParam
String
endDate
)
{
List
<
CostDto
>
costDtoList
=
this
.
costApiService
.
getCostList
(
startDate
,
endDate
);
PageInfo
<
CostDto
>
pageInfo
=
new
PageInfo
<>(
costDtoList
);
return
CostResult
.
success
(
pageInfo
);
return
CostResult
.
success
(
costDtoList
);
}
...
...
bailuntec-cost-core/src/main/shell/deploy-miniapp-prod.sh
View file @
10966fa6
...
...
@@ -4,7 +4,7 @@ git pull
# 拉取开发分支代码
git checkout cost-check-flow-master
#打包
mvn clean package
-Dmaven
.test.skip
=
true
-Dmaven
.compile.fork
=
true
mvn clean package
-
U
-
Dmaven
.test.skip
=
true
-Dmaven
.compile.fork
=
true
# kill测试进程
# shellcheck disable=SC2009
ps
-ef
|
grep
cost-core |
grep
-v
grep
|
grep
prod | awk
'{print $2}'
| xargs
kill
-9
...
...
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