Skip to content

Commit

Permalink
接口文档使用knife4j
Browse files Browse the repository at this point in the history
  • Loading branch information
李鹏军 committed Sep 20, 2023
1 parent 34b0f14 commit e9cd186
Show file tree
Hide file tree
Showing 313 changed files with 93 additions and 120 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ platform
* /_sql/sys_region.sql

* 导入项目到IDE中
* 导入支付证书至/platform-shop/src/main/resources/cert/目录下(申请商户号、开通微信支付、下载支付证书)
* 导入支付证书至/platform-admin/src/main/resources/cert/目录下(申请商户号、开通微信支付、下载支付证书)
* 修改配置文件 /platform-admin/src/main/resources/dev/platform.properties
* jdbc.url
* jdbc.username
Expand Down Expand Up @@ -116,6 +116,8 @@ platform


## 页面展示
### 接口文档
![](https://platform-wxmall.oss-cn-beijing.aliyuncs.com/image/2023_09_20/15_06_39.png "接口文档")
### 登录页面
![](https://platform-wxmall.oss-cn-beijing.aliyuncs.com/upload/20180708/login.png "登录")
### 首页
Expand All @@ -136,4 +138,4 @@ platform
![](https://platform-wxmall.oss-cn-beijing.aliyuncs.com/upload/20180727/11.png "并联手机")

## 贡献者列表
![](https://platform-wxmall.oss-cn-beijing.aliyuncs.com/image/2023_09_20/UNKNOWN_12_11_57.png "贡献者列表")
![](https://platform-wxmall.oss-cn-beijing.aliyuncs.com/image/2023_09_20/12_11_57.png "贡献者列表")
2 changes: 1 addition & 1 deletion _sql/platform.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3729,7 +3729,7 @@ INSERT INTO `sys_menu` VALUES ('378', '377', '删除', null, 'sys:region:delete'
INSERT INTO `sys_menu` VALUES ('379', '377', '修改', '', 'sys:region:update', '2', null, '0', '0');
INSERT INTO `sys_menu` VALUES ('380', '377', '新增', null, 'sys:region:save', '2', null, '0', '0');
INSERT INTO `sys_menu` VALUES ('381', '377', '查看', null, 'sys:region:list,sys:region:info', '2', null, '0', '0');
INSERT INTO `sys_menu` VALUES ('382', '31', 'swagger-ui.html', 'swagger-ui.html', '', '1', 'fa fa-code', '0', '0');
INSERT INTO `sys_menu` VALUES ('382', '31', 'doc.html', 'doc.html', '', '1', 'fa fa-code', '0', '0');
-- ----------------------------
-- Table structure for `sys_oss`
-- ----------------------------
Expand Down
3 changes: 1 addition & 2 deletions platform-admin/src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@
data-id="main" seamless></iframe>
</div>
<div class="footer">
<div class="pull-right">2018~2018 &copy; <a href="http://fly2you.cn" target="_blank">安徽微同科技有限公司</a>
</div>
2018~2023 &copy; <a href="http://fly2you.cn" target="_blank">安徽微同科技有限公司</a>
</div>
</div>
<!--右侧部分结束-->
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions platform-admin/src/main/webapp/statics/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3567,6 +3567,7 @@ ol.unstyled {
padding: 5px 20px;
margin: 0 -15px;
height: 36px;
text-align: center;
}

.footer.fixed_full {
Expand Down
15 changes: 7 additions & 8 deletions platform-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@
<version>1.0.0</version>
</dependency>

<!--swagger 依赖-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.4.0</version>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-ui</artifactId>
<version>2.0.9</version>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.4.0</version>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring</artifactId>
<version>2.0.9</version>
</dependency>

<dependency>
Expand All @@ -37,4 +36,4 @@
</dependency>
</dependencies>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* 时间: 2017-08-11 08:32<br>
* 描述: ApiIndexController <br>
*/
@Api(tags = "收货地址")
@Api(tags = "收货地址-ApiAddressController")
@RestController
@RequestMapping("/api/address")
public class ApiAddressController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* @date 2017-03-23 15:31
*/
@Api(tags = "API登录授权接口")
@Api(tags = "登录授权-ApiAuthController")
@RestController
@RequestMapping("/api/auth")
public class ApiAuthController extends ApiBaseAction {
Expand Down Expand Up @@ -150,7 +150,7 @@ public Object loginByWeixin() {
*/
@IgnoreAuth
@GetMapping("/{code}")
@ApiOperation(value = "静默登录", notes = "使用code静默登录")
@ApiOperation(value = "微信静默登录", notes = "使用code静默登录")
@ApiImplicitParam(required = true, paramType = "path", name = "code", value = "code", example = "oxaA11ulr9134oBL9Xscon5at_Gc", dataType = "string")
public Object loginByCode(@PathVariable String code) {
//获取openid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "品牌")
@Api(tags = "品牌制造商-ApiBrandController")
@RestController
@RequestMapping("/api/brand")
public class ApiBrandController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @email [email protected]
* @gitee https://gitee.com/fuyang_lipengjun/platform
*/
@Api(tags = "商品购买")
@Api(tags = "商品购买-ApiBuyController")
@RestController
@RequestMapping("/api/buy")
public class ApiBuyController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "购物车")
@Api(tags = "购物车-ApiCartController")
@RestController
@RequestMapping("/api/cart")
public class ApiCartController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "栏目")
@Api(tags = "商品分类-ApiCatalogController")
@RestController
@RequestMapping("/api/catalog")
public class ApiCatalogController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "用户收藏")
@Api(tags = "会员收藏-ApiCollectController")
@RestController
@RequestMapping("/api/collect")
public class ApiCollectController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "评论")
@Api(tags = "会员评论-ApiCommentController")
@RestController
@RequestMapping("/api/comment")
public class ApiCommentController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* @date 2017-03-23 15:31
*/
@Api(tags = "优惠券")
@Api(tags = "优惠券-ApiCouponController")
@RestController
@RequestMapping("/api/coupon")
public class ApiCouponController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiFeedbackController <br>
*/
@Api(tags = "反馈")
@Api(tags = "会员反馈-ApiFeedbackController")
@RestController
@RequestMapping("/api/feedback")
public class ApiFeedbackController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "足迹")
@Api(tags = "会员足迹-ApiFootprintController")
@RestController
@RequestMapping("/api/footprint")
public class ApiFootprintController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "商品管理")
@Api(tags = "商品信息-ApiGoodsController")
@RestController
@RequestMapping("/api/goods")
public class ApiGoodsController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import com.platform.service.ApiHelpIssueService;
import com.platform.service.ApiHelpTypeService;
import com.platform.util.ApiBaseAction;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

Expand All @@ -22,6 +25,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* @date 2018-11-07 11:04:20
*/
@Api(tags = "常见问题|ApiHelpIssueController")
@RestController
@RequestMapping("api/helpissue")
public class ApiHelpIssueController extends ApiBaseAction {
Expand All @@ -33,7 +37,8 @@ public class ApiHelpIssueController extends ApiBaseAction {
/**
* 查看帮助类型列表
*/
@RequestMapping("/typeList")
@ApiOperation(value = "查看帮助类型列表")
@PostMapping("/typeList")
@IgnoreAuth
public Object typeList() {

Expand All @@ -45,7 +50,8 @@ public Object typeList() {
/**
* 查看问题列表
*/
@RequestMapping("/issueList")
@ApiOperation(value = "查看问题列表")
@PostMapping("/issueList")
@IgnoreAuth
public Object issueList(Long typeId) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "首页接口文档")
@Api(tags = "首页接口-ApiIndexController")
@RestController
@RequestMapping("/api/index")
public class ApiIndexController extends ApiBaseAction {
Expand Down Expand Up @@ -187,7 +187,7 @@ public Object hotGoods() {
return toResponseSuccess(resultObj);
}

@ApiOperation(value = "topic")
@ApiOperation(value = "专题")
@IgnoreAuth
@PostMapping(value = "topic")
public Object topic() {
Expand All @@ -203,7 +203,7 @@ public Object topic() {
return toResponseSuccess(resultObj);
}

@ApiOperation(value = "brand")
@ApiOperation(value = "品牌制造商")
@IgnoreAuth
@PostMapping(value = "brand")
public Object brand() {
Expand All @@ -222,7 +222,7 @@ public Object brand() {
return toResponseSuccess(resultObj);
}

@ApiOperation(value = "category")
@ApiOperation(value = "商品分类及分类下的商品")
@IgnoreAuth
@PostMapping(value = "category")
public Object category() {
Expand Down Expand Up @@ -265,7 +265,7 @@ public Object category() {
return toResponseSuccess(resultObj);
}

@ApiOperation(value = "banner")
@ApiOperation(value = "轮播图")
@IgnoreAuth
@PostMapping(value = "banner")
public Object banner() {
Expand All @@ -280,7 +280,7 @@ public Object banner() {
return toResponseSuccess(resultObj);
}

@ApiOperation(value = "channel")
@ApiOperation(value = "快捷类目")
@IgnoreAuth
@PostMapping(value = "channel")
public Object channel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "订单相关")
@Api(tags = "订单-ApiOrderController")
@RestController
@RequestMapping("/api/order")
public class ApiOrderController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @gitee https://gitee.com/fuyang_lipengjun/platform
* 描述: ApiIndexController <br>
*/
@Api(tags = "商户支付")
@Api(tags = "商户支付-ApiPayController")
@RestController
@RequestMapping("/api/pay")
public class ApiPayController extends ApiBaseAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @email [email protected]
* @gitee https://gitee.com/fuyang_lipengjun/platform
*/
@Api(tags = "评论")
@Api(tags = "地区-ApiRegionController")
@RestController
@RequestMapping("/api/region")
public class ApiRegionController extends ApiBaseAction {
Expand All @@ -41,6 +41,7 @@ public Object list(Integer parentId) {
return toResponseSuccess(regionVoList);
}

@ApiOperation(value = "省份列表")
@IgnoreAuth
@PostMapping("provinceList")
public Object provinceList() {
Expand All @@ -54,6 +55,7 @@ public Object provinceList() {
return toResponseSuccess(regionVoList);
}

@ApiOperation(value = "根据省查市")
@IgnoreAuth
@PostMapping("cityList")
public Object provinceList(String proviceName) {
Expand All @@ -67,6 +69,7 @@ public Object provinceList(String proviceName) {
return toResponseSuccess(regionVoList);
}

@ApiOperation(value = "根据省市查区")
@IgnoreAuth
@PostMapping("distinctList")
public Object distinctList(String proviceName, String cityName) {
Expand All @@ -80,13 +83,15 @@ public Object distinctList(String proviceName, String cityName) {
return toResponseSuccess(regionVoList);
}

@ApiOperation(value = "地区详情")
@IgnoreAuth
@PostMapping("info")
public Object info(Integer regionId) {
SysRegionEntity regionEntity = RegionCacheUtil.getAreaByAreaId(regionId);
return toResponseSuccess(new RegionVo(regionEntity));
}

@ApiOperation(value = "区域名称转区域ID")
@IgnoreAuth
@PostMapping("regionIdsByNames")
public Object regionIdsByNames(String provinceName, String cityName, String districtName) {
Expand Down
Loading

0 comments on commit e9cd186

Please sign in to comment.