Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
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
huluobin
gogirl-miniapp-backend
Commits
8a3c2fc9
Commit
8a3c2fc9
authored
Oct 06, 2021
by
liyanlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、新增跟进appId获取小程序配置接口;
2、增加swagger header配置。
parent
eaa1f9b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
Swagger2Config.java
...l/infrastructure/common/config/config/Swagger2Config.java
+3
-0
MiniappBrandConfigController.java
...ogirl/interfaces/common/MiniappBrandConfigController.java
+20
-1
No files found.
src/main/java/com/gogirl/infrastructure/common/config/config/Swagger2Config.java
View file @
8a3c2fc9
...
...
@@ -54,9 +54,12 @@ public class Swagger2Config {
appType
.
name
(
"sourceFrom"
).
description
(
"应用类型"
).
modelRef
(
new
ModelRef
(
"string"
)).
parameterType
(
"header"
).
required
(
false
).
build
();
ParameterBuilder
appToken
=
new
ParameterBuilder
();
appToken
.
name
(
"token"
).
description
(
"令牌"
).
modelRef
(
new
ModelRef
(
"string"
)).
parameterType
(
"header"
).
required
(
false
).
build
();
ParameterBuilder
appBrandId
=
new
ParameterBuilder
();
appBrandId
.
name
(
"brandId"
).
description
(
"品牌ID"
).
modelRef
(
new
ModelRef
(
"integer"
)).
parameterType
(
"header"
).
required
(
false
).
build
();
List
<
Parameter
>
pars
=
new
ArrayList
<>();
pars
.
add
(
appType
.
build
());
pars
.
add
(
appToken
.
build
());
pars
.
add
(
appBrandId
.
build
());
return
pars
;
}
...
...
src/main/java/com/gogirl/interfaces/common/MiniappBrandConfigController.java
View file @
8a3c2fc9
package
com
.
gogirl
.
interfaces
.
common
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.gogirl.application.common.xcx.impl.MiniappBrandConfigService
;
import
com.gogirl.domain.common.xcx.MiniappBrandConfig
;
import
com.gogirl.infrastructure.common.base.JsonResult
;
import
com.gogirl.infrastructure.common.config.config.WxPayConfig
;
import
com.gogirl.shared.user.ReadMessageCommand
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.data.web.JsonPath
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.websocket.server.PathParam
;
import
java.lang.reflect.Field
;
/**
...
...
@@ -25,10 +30,24 @@ import java.lang.reflect.Field;
@Slf4j
public
class
MiniappBrandConfigController
{
@ApiModelProperty
(
"获取小程序模板"
)
@Resource
private
MiniappBrandConfigService
miniappBrandConfigService
;
@Deprecated
@ApiOperation
(
"获取小程序模板,不建议使用"
)
@GetMapping
(
value
=
{
"/customer/miniapp/brand/config/tpl"
,
"/technician/miniapp/brand/config/tpl"
})
public
JsonResult
<
MiniappBrandConfig
>
tpl
(
@RequestHeader
(
"brandId"
)
Integer
brandId
)
{
MiniappBrandConfig
config
=
WxPayConfig
.
brandMap
.
get
(
brandId
);
return
JsonResult
.
success
(
config
);
}
@ApiOperation
(
"获取小程序模板"
)
@GetMapping
(
value
=
{
"/customer/miniapp/brand/configuration/tpl"
,
"/technician/miniapp/brand/configuration/tpl"
})
public
JsonResult
<
MiniappBrandConfig
>
tpl
(
@RequestParam
String
appId
)
{
MiniappBrandConfig
config
=
miniappBrandConfigService
.
getOne
(
new
LambdaQueryWrapper
<
MiniappBrandConfig
>()
.
eq
(
MiniappBrandConfig:
:
getStoreMiniappId
,
appId
)
);
return
JsonResult
.
success
(
config
);
}
}
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