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
cc8f6c09
Commit
cc8f6c09
authored
Jan 04, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e06d249c
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
79 additions
and
5 deletions
+79
-5
pom.xml
bailuntec-cost-core/pom.xml
+1
-1
AuthIgnore.java
...main/java/com/blt/other/common/annotation/AuthIgnore.java
+17
-0
DictParam.java
.../main/java/com/blt/other/common/annotation/DictParam.java
+23
-0
LoginIgnore.java
...ain/java/com/blt/other/common/annotation/LoginIgnore.java
+17
-0
MvcInterceptorConfig.java
...om/blt/other/common/interceptor/MvcInterceptorConfig.java
+2
-1
SessionHandlerInterceptor.java
...t/other/common/interceptor/SessionHandlerInterceptor.java
+9
-0
CostController.java
.../com/blt/other/module/cost/controller/CostController.java
+3
-0
PurchasingListDetailController.java
...purchasing/controller/PurchasingListDetailController.java
+4
-0
application-prod.yml
bailuntec-cost-core/src/main/resources/application-prod.yml
+3
-3
No files found.
bailuntec-cost-core/pom.xml
View file @
cc8f6c09
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
<artifactId>
mybatis-plus-boot-starter
</artifactId>
<artifactId>
mybatis-plus-boot-starter
</artifactId>
</dependency>
</dependency>
<!--mp 代码生成工具-->
<!--mp 代码生成工具-->
SessionHandlerInterceptor
<dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-generator
</artifactId>
<artifactId>
mybatis-plus-generator
</artifactId>
...
...
bailuntec-cost-core/src/main/java/com/blt/other/common/annotation/AuthIgnore.java
0 → 100644
View file @
cc8f6c09
package
com
.
blt
.
other
.
common
.
annotation
;
import
java.lang.annotation.*
;
/**
* <p>
* 忽略授权校验
* </p>
*
* @author robbendev
* @since 2020/7/23 11:54 上午
*/
@Target
(
ElementType
.
METHOD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
AuthIgnore
{
}
bailuntec-cost-core/src/main/java/com/blt/other/common/annotation/DictParam.java
0 → 100644
View file @
cc8f6c09
package
com
.
blt
.
other
.
common
.
annotation
;
import
java.lang.annotation.*
;
@Target
(
value
=
{
ElementType
.
FIELD
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
DictParam
{
/**
* 字典编码
*
* @return
*/
String
dictCode
()
default
""
;
/**
* 字典翻译列
*
* @return
*/
String
dictValueParam
()
default
""
;
}
bailuntec-cost-core/src/main/java/com/blt/other/common/annotation/LoginIgnore.java
0 → 100644
View file @
cc8f6c09
package
com
.
blt
.
other
.
common
.
annotation
;
import
java.lang.annotation.*
;
/**
* <p>
* 忽略登陆校验
* </p>
*
* @author robbendev
* @since 2020/7/23 11:43 上午
*/
@Target
(
ElementType
.
METHOD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
LoginIgnore
{
}
bailuntec-cost-core/src/main/java/com/blt/other/common/interceptor/MvcInterceptorConfig.java
View file @
cc8f6c09
...
@@ -23,7 +23,8 @@ public class MvcInterceptorConfig extends WebMvcConfigurationSupport {
...
@@ -23,7 +23,8 @@ public class MvcInterceptorConfig extends WebMvcConfigurationSupport {
protected
void
addInterceptors
(
InterceptorRegistry
registry
)
{
protected
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
sessionHandlerInterceptor
);
registry
.
addInterceptor
(
sessionHandlerInterceptor
)
.
excludePathPatterns
();
super
.
addInterceptors
(
registry
);
super
.
addInterceptors
(
registry
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/common/interceptor/SessionHandlerInterceptor.java
View file @
cc8f6c09
package
com
.
blt
.
other
.
common
.
interceptor
;
package
com
.
blt
.
other
.
common
.
interceptor
;
import
com.bailuntec.common.SpringContextUtil
;
import
com.bailuntec.common.SpringContextUtil
;
import
com.blt.other.common.annotation.LoginIgnore
;
import
com.blt.other.common.base.SysUser
;
import
com.blt.other.common.base.SysUser
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.common.util.JwtUtil
;
import
com.blt.other.common.util.JwtUtil
;
...
@@ -9,10 +10,12 @@ import com.google.common.collect.Lists;
...
@@ -9,10 +10,12 @@ import com.google.common.collect.Lists;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.servlet.HandlerInterceptor
;
import
org.springframework.web.servlet.HandlerInterceptor
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.lang.reflect.Method
;
@Component
@Component
@AllArgsConstructor
@AllArgsConstructor
...
@@ -22,6 +25,12 @@ public class SessionHandlerInterceptor implements HandlerInterceptor {
...
@@ -22,6 +25,12 @@ public class SessionHandlerInterceptor implements HandlerInterceptor {
@Override
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
{
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
{
HandlerMethod
handlerMethod
=
(
HandlerMethod
)
handler
;
Method
method
=
handlerMethod
.
getMethod
();
if
(
method
.
isAnnotationPresent
(
LoginIgnore
.
class
))
{
return
true
;
}
try
{
try
{
String
token
=
Lists
.
newArrayList
(
request
.
getHeader
(
"Cookie"
).
split
(
";"
))
String
token
=
Lists
.
newArrayList
(
request
.
getHeader
(
"Cookie"
).
split
(
";"
))
.
stream
()
.
stream
()
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/CostController.java
View file @
cc8f6c09
...
@@ -6,6 +6,7 @@ import com.bailuntec.cost.api.dto.CostListPrintDto;
...
@@ -6,6 +6,7 @@ import com.bailuntec.cost.api.dto.CostListPrintDto;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.blt.other.common.annotation.LoginIgnore
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.dto.request.CheckCostListReq
;
import
com.blt.other.module.cost.dto.request.CheckCostListReq
;
import
com.blt.other.module.cost.dto.response.*
;
import
com.blt.other.module.cost.dto.response.*
;
...
@@ -310,6 +311,7 @@ public class CostController {
...
@@ -310,6 +311,7 @@ public class CostController {
return
CostResult
.
success
();
return
CostResult
.
success
();
}
}
@LoginIgnore
@ApiOperation
(
"财务审核回调"
)
@ApiOperation
(
"财务审核回调"
)
@PostMapping
({
"check/ApplyCallbackUrl"
,
"check/lendCashierCallbackUrl"
})
@PostMapping
({
"check/ApplyCallbackUrl"
,
"check/lendCashierCallbackUrl"
})
public
Map
<
String
,
Object
>
applyCallbackUrl
(
@RequestBody
ApplyCallbackUrlVo
applyCallbackUrlVo
)
{
public
Map
<
String
,
Object
>
applyCallbackUrl
(
@RequestBody
ApplyCallbackUrlVo
applyCallbackUrlVo
)
{
...
@@ -327,6 +329,7 @@ public class CostController {
...
@@ -327,6 +329,7 @@ public class CostController {
return
result
;
return
result
;
}
}
@LoginIgnore
@ApiOperation
(
"财务付款回调接口"
)
@ApiOperation
(
"财务付款回调接口"
)
@PostMapping
(
value
=
{
"check/CashierCallbackUrl"
,
"check/lend/CashierCallbackUrl"
})
@PostMapping
(
value
=
{
"check/CashierCallbackUrl"
,
"check/lend/CashierCallbackUrl"
})
public
Map
<
String
,
Object
>
cashierCallbackUrl
(
@RequestBody
CashierCallbackUrlVo
cashierCallbackUrlVo
)
{
public
Map
<
String
,
Object
>
cashierCallbackUrl
(
@RequestBody
CashierCallbackUrlVo
cashierCallbackUrlVo
)
{
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/purchasing/controller/PurchasingListDetailController.java
View file @
cc8f6c09
...
@@ -2,6 +2,7 @@ package com.blt.other.module.purchasing.controller;
...
@@ -2,6 +2,7 @@ package com.blt.other.module.purchasing.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.bailuntec.cost.api.domain.BuyDomain
;
import
com.bailuntec.cost.api.domain.BuyDomain
;
import
com.blt.other.common.annotation.LoginIgnore
;
import
com.blt.other.common.config.property.CostUrlProperties
;
import
com.blt.other.common.config.property.CostUrlProperties
;
import
com.blt.other.common.util.AxiosUtil
;
import
com.blt.other.common.util.AxiosUtil
;
import
com.blt.other.common.util.IpUtil
;
import
com.blt.other.common.util.IpUtil
;
...
@@ -25,6 +26,7 @@ import com.blt.other.module.purchasing.vo.CashierCallbackUrlVo;
...
@@ -25,6 +26,7 @@ import com.blt.other.module.purchasing.vo.CashierCallbackUrlVo;
import
com.blt.other.module.sku.service.SysProductService
;
import
com.blt.other.module.sku.service.SysProductService
;
import
com.blt.other.module.supplier.service.SupplierService
;
import
com.blt.other.module.supplier.service.SupplierService
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.java.Log
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -449,6 +451,7 @@ public class PurchasingListDetailController {
...
@@ -449,6 +451,7 @@ public class PurchasingListDetailController {
* @param request
* @param request
* @return
* @return
*/
*/
@LoginIgnore
@PostMapping
(
value
=
"ApplyCallbackUrl"
,
consumes
=
"application/json"
)
@PostMapping
(
value
=
"ApplyCallbackUrl"
,
consumes
=
"application/json"
)
public
String
applyCallbackUrl
(
HttpServletRequest
request
)
{
public
String
applyCallbackUrl
(
HttpServletRequest
request
)
{
String
result
=
null
;
String
result
=
null
;
...
@@ -525,6 +528,7 @@ public class PurchasingListDetailController {
...
@@ -525,6 +528,7 @@ public class PurchasingListDetailController {
* @param request
* @param request
* @return
* @return
*/
*/
@LoginIgnore
@PostMapping
(
value
=
"CashierCallbackUrl"
,
consumes
=
"application/json"
)
@PostMapping
(
value
=
"CashierCallbackUrl"
,
consumes
=
"application/json"
)
public
String
cashierCallbackUrl
(
HttpServletRequest
request
)
{
public
String
cashierCallbackUrl
(
HttpServletRequest
request
)
{
String
result
=
null
;
String
result
=
null
;
...
...
bailuntec-cost-core/src/main/resources/application-prod.yml
View file @
cc8f6c09
...
@@ -2,8 +2,8 @@ spring:
...
@@ -2,8 +2,8 @@ spring:
# 数据源配置
# 数据源配置
datasource
:
datasource
:
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
#
url
:
jdbc:mysql://gz-cdb-lnrmt5zh.sql.tencentcdb.com:61369/bailun_other?useUnicode=true&characterEncoding=UTF-8&useSSL=false&rewriteBatchedStatements=true
url
:
jdbc:mysql://gz-cdb-lnrmt5zh.sql.tencentcdb.com:61369/bailun_other?useUnicode=true&characterEncoding=UTF-8&useSSL=false&rewriteBatchedStatements=true
url
:
jdbc:mysql://10.0.8.2:3306/bailun_other?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true
#
url: jdbc:mysql://10.0.8.2:3306/bailun_other?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true
username
:
root
username
:
root
password
:
"
#7kfnymAM$Y9-Ntf"
password
:
"
#7kfnymAM$Y9-Ntf"
hikari
:
hikari
:
...
@@ -13,7 +13,7 @@ spring:
...
@@ -13,7 +13,7 @@ spring:
thymeleaf
:
thymeleaf
:
prefix
:
classpath:/templates/
prefix
:
classpath:/templates/
suffix
:
.html
suffix
:
.html
cost/list/getAllCost
cache
:
false
cache
:
false
resources
:
resources
:
static-locations
:
classpath:/resources/, classpath:/static/
static-locations
:
classpath:/resources/, classpath:/static/
...
...
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