Explorar o código

增加对接应用签名校验

xuchao hai 1 mes
pai
achega
d14ac3419e
Modificáronse 16 ficheiros con 948 adicións e 3 borrados
  1. 192 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/core/sign/interceptor/SignAuthInterceptor.java
  2. 123 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/controller/BizOpenInterfaceController.java
  3. 79 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/entity/BizOpenInterface.java
  4. 34 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/enums/BizOpenInterfaceEnum.java
  5. 25 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/mapper/BizOpenInterfaceMapper.java
  6. 5 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/mapper/mapping/BizOpenInterfaceMapper.xml
  7. 53 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/param/BizOpenInterfaceAddParam.java
  8. 58 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/param/BizOpenInterfaceEditParam.java
  9. 35 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/param/BizOpenInterfaceIdParam.java
  10. 51 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/param/BizOpenInterfacePageParam.java
  11. 80 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/service/BizOpenInterfaceService.java
  12. 94 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/service/impl/BizOpenInterfaceServiceImpl.java
  13. 72 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/controller/BizUserController.java
  14. 38 0
      snowy-web-app/src/main/java/vip/xiaonuo/core/config/GlobalConfigure.java
  15. 5 2
      snowy-web-app/src/main/resources/application-local.properties
  16. 4 0
      snowy-web-app/src/main/resources/application-prod.properties

+ 192 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/core/sign/interceptor/SignAuthInterceptor.java

@@ -0,0 +1,192 @@
+package vip.xiaonuo.biz.core.sign.interceptor;
+
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.servlet.HandlerInterceptor;
+import org.springframework.web.servlet.ModelAndView;
+import vip.xiaonuo.biz.core.sign.utils.GenerateSignatureUtil;
+import vip.xiaonuo.biz.core.sign.utils.ServletUtils;
+import vip.xiaonuo.biz.modular.openinterface.entity.BizOpenInterface;
+import vip.xiaonuo.biz.modular.openinterface.service.BizOpenInterfaceService;
+import vip.xiaonuo.common.cache.CommonCacheOperator;
+import vip.xiaonuo.common.pojo.CommonResult;
+import vip.xiaonuo.dev.api.DevConfigApi;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * @Author 徐超
+ * @Date 2021/4/20 15:53
+ * @Version 1.0
+ */
+@Slf4j
+public class SignAuthInterceptor implements HandlerInterceptor {
+
+    private static final String NONCE_KEY_STR = "nonce-";
+
+    private static final String OpenInterfaceKey = "open-interface-";
+
+    private static final int apiExpireTime = 120;
+
+    @Resource
+    private BizOpenInterfaceService bizOpenInterfaceService;
+
+    @Resource
+    private CommonCacheOperator commonCacheOperator;
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+
+        /***
+         * 1、获取请求参数appId
+         */
+        String appKey = request.getHeader("appKey");
+        if (StringUtils.isBlank(appKey)) {
+            log.info("appKey不能为空");
+            ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("appKey不能为空")));
+            return false;
+        }
+
+        /***
+         * 2、获取请求参数secret
+         */
+        String secret = request.getHeader("appSecret");
+        if (StringUtils.isBlank(secret)){
+            log.info("appSecret不能为空...........");
+            ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("appSecret不能为空")));
+            return false;
+        }
+
+        /***
+         * 3、 获取请求参数timestamp 时间戳
+         */
+        String timestamp = request.getHeader("timestamp");
+        if (StringUtils.isBlank(timestamp)){
+            log.info("timestamp不能为空...........");
+            ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("timestamp不能为空")));
+            return false;
+        }
+
+        /** 4、 防止过期时间的提交
+         *  从前端传递的timestamp 与服务器端当前系统时间之差大于120s,则此次请求的timestamp无效
+         *  留出短时间考虑网络问题提交速度慢,若时间过长中间时间足以挟持篡改参数,所以折中考虑了120秒
+         */
+        Long time = System.currentTimeMillis()/1000;
+        if (Math.abs(Long.valueOf(timestamp)-time) > apiExpireTime) {
+            log.info("timestamp失效...........");
+            ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("timestamp失效")));
+            return false;
+        }
+
+        /**
+         *  5、获取请求参数nonce随机数,防止重复的暴力请求
+         *  流程:1、获取当前提交的随机数,作为key前往redis 查询,若有值则为重复提交
+         *       2、redis中查询不到结果,将当前随机数作为key,value为随机数,过期时间设置为120s
+         */
+        String nonce = request.getHeader("nonce");
+        log.info("nonce:"+nonce);
+        if (StringUtils.isBlank(nonce)) {
+            log.info("nonce不能为空...........");
+            ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("随机数不能为空")));
+            return false;
+        } else {
+            // 从缓存中取
+            Object cacheValue = commonCacheOperator.get(NONCE_KEY_STR+appKey+"-"+nonce);
+            if(ObjectUtil.isNotNull(cacheValue)) {
+                String redisNonce =  Convert.toStr(cacheValue);
+                log.info("redisNonce:"+redisNonce);
+                log.info("缓存中nonce已存在,请勿重复提交...........");
+                ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("随机数已存在,请勿重复提交")));
+                return false;
+            }else{
+                log.info("redisNonce:"+nonce);
+                log.info("缓存nonce..........."+NONCE_KEY_STR+appKey+"-"+nonce);
+                commonCacheOperator.put(NONCE_KEY_STR+appKey+"-"+nonce, nonce, 120);
+            }
+        }
+
+        /** 6、验证secret权限、来源是否合法
+         *  此处可以用appId,条件为 已开启,未封禁等进行数据库合作机构表查询,有可能已经终止合作禁止了此有用访问,
+         *  业务上达到一定条件的可以根据appId分配权限,选择不同的接口能力进行开放
+         */
+        BizOpenInterface openInterface;
+        String openInterfaceStr = null;
+        Object openInterfaceValue = commonCacheOperator.get(OpenInterfaceKey + appKey);
+        if(ObjectUtil.isNotNull(openInterfaceValue)) {
+            openInterfaceStr = Convert.toStr(openInterfaceValue);
+        }
+        if (ObjectUtil.isNotEmpty(openInterfaceStr)){
+            ObjectMapper mapper = new ObjectMapper();
+            openInterface = mapper.readValue(openInterfaceStr,BizOpenInterface.class);
+        }else{
+            openInterface = bizOpenInterfaceService.getOne(new QueryWrapper<BizOpenInterface>().eq("app_key",appKey));
+            commonCacheOperator.put(OpenInterfaceKey + appKey,JSON.toJSONString(openInterface));
+        }
+        if (openInterface == null || !openInterface.getStatus().equals("ENABLE")) {
+            log.info("appKey无法查询到合作项目信息或已被封禁...........");
+            ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("无法查询到appKey为【"+appKey+"】的应用信息或应用已关闭,请联系管理员")));
+            return false;
+        }
+
+        /***
+         * 获取secret 与数据库值对比,判断请求来源是否合法
+         */
+        if (!secret.equals(openInterface.getAppSecret())) {
+            log.info("appSecret与接口提供方不一致...........");
+            ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("appSecret与接口提供方不一致")));
+            return false;
+        }
+
+        /***
+         * 7、获取请求sign签名参数
+         */
+        String sign = request.getHeader("sign");
+        if (StringUtils.isBlank(sign)){
+            log.info("sign不能为空...........");
+            ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("sign不能为空")));
+            return false;
+        }
+
+        /***
+         * 8、通过后台MD5重新签名校验与前端签名sign值比对,确认当前请求数据是否被篡改
+         */
+        // 从数组中取出参数放入Map中
+        Map<String,String> param = new ConcurrentHashMap<>(5);
+        param.put("appKey",request.getHeader("appKey"));
+        param.put("appSecret",request.getHeader("appSecret"));
+        param.put("timestamp",request.getHeader("timestamp"));
+        param.put("nonce",request.getHeader("nonce"));
+        param.put("sign",request.getHeader("sign"));
+        boolean reuslt = GenerateSignatureUtil.isSignatureValid(param, secret);
+        if (!reuslt){
+            log.debug("sign签名校验失败...........");
+            ServletUtils.renderString(response, JSON.toJSONString(CommonResult.error("sign签名校验失败")));
+            return false;
+        }
+        log.info("签名校验通过,放行...........");
+        /***
+         *  获取sign签名,与服务端生成的sign 签名对比
+         */
+        log.info("sign ====================");
+        return true;
+    }
+
+    @Override
+    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
+        log.info("SignAuthInterceptor postHandle======  ");
+    }
+
+    @Override
+    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
+        log.info("SignAuthInterceptor afterCompletion======  ");
+    }
+}

+ 123 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/controller/BizOpenInterfaceController.java

@@ -0,0 +1,123 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+import vip.xiaonuo.common.annotation.CommonLog;
+import vip.xiaonuo.common.pojo.CommonResult;
+import vip.xiaonuo.biz.modular.openinterface.entity.BizOpenInterface;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfaceAddParam;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfaceEditParam;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfaceIdParam;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfacePageParam;
+import vip.xiaonuo.biz.modular.openinterface.service.BizOpenInterfaceService;
+
+import jakarta.annotation.Resource;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotEmpty;
+import java.util.List;
+
+/**
+ * 应用管理控制器
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ */
+@Tag(name = "应用管理控制器")
+@RestController
+@Validated
+public class BizOpenInterfaceController {
+
+    @Resource
+    private BizOpenInterfaceService bizOpenInterfaceService;
+
+    /**
+     * 获取应用管理分页
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    @Operation(summary = "获取应用管理分页")
+    @SaCheckPermission("/biz/openinterface/page")
+    @GetMapping("/biz/openinterface/page")
+    public CommonResult<Page<BizOpenInterface>> page(BizOpenInterfacePageParam bizOpenInterfacePageParam) {
+        return CommonResult.data(bizOpenInterfaceService.page(bizOpenInterfacePageParam));
+    }
+
+    /**
+     * 添加应用管理
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    @Operation(summary = "添加应用管理")
+    @CommonLog("添加应用管理")
+    @SaCheckPermission("/biz/openinterface/add")
+    @PostMapping("/biz/openinterface/add")
+    public CommonResult<String> add(@RequestBody @Valid BizOpenInterfaceAddParam bizOpenInterfaceAddParam) {
+        bizOpenInterfaceService.add(bizOpenInterfaceAddParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 编辑应用管理
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    @Operation(summary = "编辑应用管理")
+    @CommonLog("编辑应用管理")
+    @SaCheckPermission("/biz/openinterface/edit")
+    @PostMapping("/biz/openinterface/edit")
+    public CommonResult<String> edit(@RequestBody @Valid BizOpenInterfaceEditParam bizOpenInterfaceEditParam) {
+        bizOpenInterfaceService.edit(bizOpenInterfaceEditParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 删除应用管理
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    @Operation(summary = "删除应用管理")
+    @CommonLog("删除应用管理")
+    @SaCheckPermission("/biz/openinterface/delete")
+    @PostMapping("/biz/openinterface/delete")
+    public CommonResult<String> delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
+                                                   List<BizOpenInterfaceIdParam> bizOpenInterfaceIdParamList) {
+        bizOpenInterfaceService.delete(bizOpenInterfaceIdParamList);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 获取应用管理详情
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    @Operation(summary = "获取应用管理详情")
+    @SaCheckPermission("/biz/openinterface/detail")
+    @GetMapping("/biz/openinterface/detail")
+    public CommonResult<BizOpenInterface> detail(@Valid BizOpenInterfaceIdParam bizOpenInterfaceIdParam) {
+        return CommonResult.data(bizOpenInterfaceService.detail(bizOpenInterfaceIdParam));
+    }
+}

+ 79 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/entity/BizOpenInterface.java

@@ -0,0 +1,79 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 应用管理实体
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ **/
+@Getter
+@Setter
+@TableName("biz_open_interface")
+public class BizOpenInterface {
+
+    /** 主键 */
+    @TableId
+    @Schema(description = "主键")
+    private String id;
+
+    /** 应用名称 */
+    @Schema(description = "应用名称")
+    private String appName;
+
+    /** app_key */
+    @Schema(description = "app_key")
+    private String appKey;
+
+    /** appSecret */
+    @Schema(description = "appSecret")
+    private String appSecret;
+
+    /** 状态 */
+    @Schema(description = "状态")
+    private String status;
+
+    /** 删除标识 */
+    @Schema(description = "删除标识")
+    @TableLogic
+    @TableField(fill = FieldFill.INSERT)
+    private String deleteFlag;
+
+    /** CREATE_USER */
+    @Schema(description = "CREATE_USER")
+    @TableField(fill = FieldFill.INSERT)
+    private String createUser;
+
+    /** CREATE_TIME */
+    @Schema(description = "CREATE_TIME")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createTime;
+
+    /** UPDATE_USER */
+    @Schema(description = "UPDATE_USER")
+    @TableField(fill = FieldFill.UPDATE)
+    private String updateUser;
+
+    /** UPDATE_TIME */
+    @Schema(description = "UPDATE_TIME")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date updateTime;
+}

+ 34 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/enums/BizOpenInterfaceEnum.java

@@ -0,0 +1,34 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.enums;
+
+import lombok.Getter;
+
+/**
+ * 应用管理枚举
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ **/
+@Getter
+public enum BizOpenInterfaceEnum {
+
+    /** 测试 */
+    TEST("TEST");
+
+    private final String value;
+
+    BizOpenInterfaceEnum(String value) {
+        this.value = value;
+    }
+}

+ 25 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/mapper/BizOpenInterfaceMapper.java

@@ -0,0 +1,25 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import vip.xiaonuo.biz.modular.openinterface.entity.BizOpenInterface;
+
+/**
+ * 应用管理Mapper接口
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ **/
+public interface BizOpenInterfaceMapper extends BaseMapper<BizOpenInterface> {
+}

+ 5 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/mapper/mapping/BizOpenInterfaceMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="vip.xiaonuo.biz.modular.openinterface.mapper.BizOpenInterfaceMapper">
+
+</mapper>

+ 53 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/param/BizOpenInterfaceAddParam.java

@@ -0,0 +1,53 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.param;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 应用管理添加参数
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ **/
+@Getter
+@Setter
+public class BizOpenInterfaceAddParam {
+
+    /** 应用名称 */
+    @Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "appName不能为空")
+    private String appName;
+
+    /** app_key */
+    @Schema(description = "app_key", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "appKey不能为空")
+    private String appKey;
+
+    /** appSecret */
+    @Schema(description = "appSecret", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "appSecret不能为空")
+    private String appSecret;
+
+    /** 状态 */
+    @Schema(description = "状态")
+    private String status;
+
+}

+ 58 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/param/BizOpenInterfaceEditParam.java

@@ -0,0 +1,58 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.param;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 应用管理编辑参数
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ **/
+@Getter
+@Setter
+public class BizOpenInterfaceEditParam {
+
+    /** 主键 */
+    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "id不能为空")
+    private String id;
+
+    /** 应用名称 */
+    @Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "appName不能为空")
+    private String appName;
+
+    /** app_key */
+    @Schema(description = "app_key", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "appKey不能为空")
+    private String appKey;
+
+    /** appSecret */
+    @Schema(description = "appSecret", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "appSecret不能为空")
+    private String appSecret;
+
+    /** 状态 */
+    @Schema(description = "状态")
+    private String status;
+
+}

+ 35 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/param/BizOpenInterfaceIdParam.java

@@ -0,0 +1,35 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.param;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+
+import jakarta.validation.constraints.NotBlank;
+
+/**
+ * 应用管理Id参数
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ **/
+@Getter
+@Setter
+public class BizOpenInterfaceIdParam {
+
+    /** 主键 */
+    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotBlank(message = "id不能为空")
+    private String id;
+}

+ 51 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/param/BizOpenInterfacePageParam.java

@@ -0,0 +1,51 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.param;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Getter;
+import lombok.Setter;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 应用管理查询参数
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ **/
+@Getter
+@Setter
+public class BizOpenInterfacePageParam {
+
+    /** 当前页 */
+    @Schema(description = "当前页码")
+    private Integer current;
+
+    /** 每页条数 */
+    @Schema(description = "每页条数")
+    private Integer size;
+
+    /** 排序字段 */
+    @Schema(description = "排序字段,字段驼峰名称,如:userName")
+    private String sortField;
+
+    /** 排序方式 */
+    @Schema(description = "排序方式,升序:ASCEND;降序:DESCEND")
+    private String sortOrder;
+
+    /** 关键词 */
+    @Schema(description = "关键词")
+    private String searchKey;
+
+}

+ 80 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/service/BizOpenInterfaceService.java

@@ -0,0 +1,80 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import vip.xiaonuo.biz.modular.openinterface.entity.BizOpenInterface;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfaceAddParam;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfaceEditParam;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfaceIdParam;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfacePageParam;
+
+import java.util.List;
+
+/**
+ * 应用管理Service接口
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ **/
+public interface BizOpenInterfaceService extends IService<BizOpenInterface> {
+
+    /**
+     * 获取应用管理分页
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    Page<BizOpenInterface> page(BizOpenInterfacePageParam bizOpenInterfacePageParam);
+
+    /**
+     * 添加应用管理
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    void add(BizOpenInterfaceAddParam bizOpenInterfaceAddParam);
+
+    /**
+     * 编辑应用管理
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    void edit(BizOpenInterfaceEditParam bizOpenInterfaceEditParam);
+
+    /**
+     * 删除应用管理
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    void delete(List<BizOpenInterfaceIdParam> bizOpenInterfaceIdParamList);
+
+    /**
+     * 获取应用管理详情
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     */
+    BizOpenInterface detail(BizOpenInterfaceIdParam bizOpenInterfaceIdParam);
+
+    /**
+     * 获取应用管理详情
+     *
+     * @author 徐超
+     * @date  2025/04/08 13:25
+     **/
+    BizOpenInterface queryEntity(String id);
+}

+ 94 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/openinterface/service/impl/BizOpenInterfaceServiceImpl.java

@@ -0,0 +1,94 @@
+/*
+ * Copyright [2022] [https://www.xiaonuo.vip]
+ *
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
+ *
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
+ */
+package vip.xiaonuo.biz.modular.openinterface.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollStreamUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import vip.xiaonuo.common.enums.CommonSortOrderEnum;
+import vip.xiaonuo.common.exception.CommonException;
+import vip.xiaonuo.common.page.CommonPageRequest;
+import vip.xiaonuo.biz.modular.openinterface.entity.BizOpenInterface;
+import vip.xiaonuo.biz.modular.openinterface.mapper.BizOpenInterfaceMapper;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfaceAddParam;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfaceEditParam;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfaceIdParam;
+import vip.xiaonuo.biz.modular.openinterface.param.BizOpenInterfacePageParam;
+import vip.xiaonuo.biz.modular.openinterface.service.BizOpenInterfaceService;
+
+import java.util.List;
+
+/**
+ * 应用管理Service接口实现类
+ *
+ * @author 徐超
+ * @date  2025/04/08 13:25
+ **/
+@Service
+public class BizOpenInterfaceServiceImpl extends ServiceImpl<BizOpenInterfaceMapper, BizOpenInterface> implements BizOpenInterfaceService {
+
+    @Override
+    public Page<BizOpenInterface> page(BizOpenInterfacePageParam bizOpenInterfacePageParam) {
+        QueryWrapper<BizOpenInterface> queryWrapper = new QueryWrapper<BizOpenInterface>().checkSqlInjection();
+        if(ObjectUtil.isAllNotEmpty(bizOpenInterfacePageParam.getSortField(), bizOpenInterfacePageParam.getSortOrder())) {
+            CommonSortOrderEnum.validate(bizOpenInterfacePageParam.getSortOrder());
+            queryWrapper.orderBy(true, bizOpenInterfacePageParam.getSortOrder().equals(CommonSortOrderEnum.ASC.getValue()),
+                    StrUtil.toUnderlineCase(bizOpenInterfacePageParam.getSortField()));
+        } else {
+            queryWrapper.lambda().orderByAsc(BizOpenInterface::getId);
+        }
+        return this.page(CommonPageRequest.defaultPage(), queryWrapper);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void add(BizOpenInterfaceAddParam bizOpenInterfaceAddParam) {
+        BizOpenInterface bizOpenInterface = BeanUtil.toBean(bizOpenInterfaceAddParam, BizOpenInterface.class);
+        this.save(bizOpenInterface);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void edit(BizOpenInterfaceEditParam bizOpenInterfaceEditParam) {
+        BizOpenInterface bizOpenInterface = this.queryEntity(bizOpenInterfaceEditParam.getId());
+        BeanUtil.copyProperties(bizOpenInterfaceEditParam, bizOpenInterface);
+        this.updateById(bizOpenInterface);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void delete(List<BizOpenInterfaceIdParam> bizOpenInterfaceIdParamList) {
+        // 执行删除
+        this.removeByIds(CollStreamUtil.toList(bizOpenInterfaceIdParamList, BizOpenInterfaceIdParam::getId));
+    }
+
+    @Override
+    public BizOpenInterface detail(BizOpenInterfaceIdParam bizOpenInterfaceIdParam) {
+        return this.queryEntity(bizOpenInterfaceIdParam.getId());
+    }
+
+    @Override
+    public BizOpenInterface queryEntity(String id) {
+        BizOpenInterface bizOpenInterface = this.getById(id);
+        if(ObjectUtil.isEmpty(bizOpenInterface)) {
+            throw new CommonException("应用管理不存在,id值为:{}", id);
+        }
+        return bizOpenInterface;
+    }
+}

+ 72 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/controller/BizUserController.java

@@ -14,6 +14,8 @@ package vip.xiaonuo.biz.modular.user.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.lang.tree.Tree;
+import cn.hutool.http.HttpUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -21,12 +23,14 @@ import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.Valid;
 import jakarta.validation.constraints.NotEmpty;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.MediaType;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
+import vip.xiaonuo.biz.core.sign.utils.MD5;
 import vip.xiaonuo.biz.modular.org.entity.BizOrg;
 import vip.xiaonuo.biz.modular.position.entity.BizPosition;
 import vip.xiaonuo.biz.modular.user.entity.BizUser;
@@ -34,10 +38,17 @@ import vip.xiaonuo.biz.modular.user.param.*;
 import vip.xiaonuo.biz.modular.user.result.BizUserRoleResult;
 import vip.xiaonuo.biz.modular.user.service.BizUserService;
 import vip.xiaonuo.common.annotation.CommonLog;
+import vip.xiaonuo.common.annotation.CommonNoRepeat;
 import vip.xiaonuo.common.pojo.CommonResult;
 
 import java.io.IOException;
+import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import static vip.xiaonuo.biz.core.sign.utils.GenerateSignatureUtil.FIELD_SIGN;
 
 /**
  * 人员控制器
@@ -45,6 +56,7 @@ import java.util.List;
  * @author xuyuxiang
  * @date 2022/4/22 9:34
  **/
+@Slf4j
 @Tag(name = "人员控制器")
 @RestController
 @Validated
@@ -53,6 +65,65 @@ public class BizUserController {
     @Resource
     private BizUserService bizUserService;
 
+
+    public static void main(String[] args) {
+        // 获取时间戳单位S
+        Long timesTamp = System.currentTimeMillis()/1000;
+        System.out.println("time == " + timesTamp);
+        Map<String, String> params = new ConcurrentHashMap<>(10);
+        String appKey = "0ol2749zps9xhid1";
+        String appSecret = "e4w9ylwk7grdsdzpbcq8kcedg7ailh1c";
+        params.put("appKey",appKey);
+        params.put("timestamp",String.valueOf(timesTamp));
+        params.put("nonce","1241455591");// 自定义随机数(只能用一次)
+        params.put("appSecret",appSecret);
+        // 调用MD5算法加密生成签名
+        String signature = generateSignature(params, appSecret);
+        // 签名加入请求参数
+        params.put("sign",signature);
+        log.info("推送sign == " + signature);
+        log.info("推送参数 == " + JSON.toJSONString(params));
+        //String result = HttpUtil.createPost("http://localhost:83/thirdPart/v1/user/add").addHeaders(params).execute().body();
+        //log.info("推送结果 == " + result);
+    }
+
+
+    public static String generateSignature(final Map<String, String> data, String key) {
+        try {
+            Set<String> keySet = data.keySet();
+            String[] keyArray = keySet.toArray(new String[keySet.size()]);
+            Arrays.sort(keyArray);
+            StringBuilder sb = new StringBuilder();
+            for (String k : keyArray) {
+                if (k.equals("sign")) {
+                    continue;
+                }
+                // 参数值为空,则不参与签名
+                if (data.get(k).trim().length() > 0)  {
+                    sb.append(k).append("=").append(data.get(k).trim()).append("&");
+                }
+            }
+            System.out.printf(sb.toString());
+            return MD5.md5(sb.toString());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+
+    /**
+     * 获取人员分页
+     *
+     * @author xuyuxiang
+     * @date 2022/4/24 20:00
+     */
+    @CommonNoRepeat
+    @Operation(summary = "对接ERP")
+    @PostMapping("/thirdPart/v1/user/add")
+    public CommonResult<String> addUser(@RequestBody @Valid BizUserAddParam bizUserAddParam) {
+        return CommonResult.ok();
+    }
+
     /**
      * 获取人员分页
      *
@@ -61,7 +132,7 @@ public class BizUserController {
      */
     @Operation(summary = "获取人员分页")
     @SaCheckPermission("/biz/user/page")
-    @GetMapping("/biz/user/page")
+    @PostMapping("/biz/user/page")
     public CommonResult<Page<BizUser>> page(BizUserPageParam bizUserPageParam) {
         return CommonResult.data(bizUserService.page(bizUserPageParam));
     }

+ 38 - 0
snowy-web-app/src/main/java/vip/xiaonuo/core/config/GlobalConfigure.java

@@ -33,6 +33,7 @@ import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
 import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import jakarta.annotation.PostConstruct;
 import jakarta.annotation.Resource;
 import jakarta.servlet.http.HttpServletRequest;
 import org.apache.ibatis.mapping.DatabaseIdProvider;
@@ -57,9 +58,13 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
 import org.springframework.jdbc.support.JdbcUtils;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
 import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 import vip.xiaonuo.auth.core.util.StpClientUtil;
+import vip.xiaonuo.biz.core.sign.interceptor.SignAuthInterceptor;
+import vip.xiaonuo.biz.core.sign.properties.OpenSignInterceptorProperties;
+import vip.xiaonuo.biz.core.sign.properties.OpenSignProperties;
 import vip.xiaonuo.common.annotation.CommonNoRepeat;
 import vip.xiaonuo.common.annotation.CommonWrapper;
 import vip.xiaonuo.common.cache.CommonCacheOperator;
@@ -101,6 +106,37 @@ public class GlobalConfigure implements WebMvcConfigurer {
 
     private static final String COMMON_REPEAT_SUBMIT_CACHE_KEY = "common-repeatSubmit:";
 
+    @Autowired
+    private OpenSignProperties openSignProperties;
+
+    // 拦截器配置
+    private OpenSignInterceptorProperties interceptorConfig;
+
+    @PostConstruct
+    public void init () {
+        interceptorConfig = openSignProperties.getInterceptor();
+        //log.debug("openSignProperties:{}", JSON.toJSONString(interceptorConfig));
+    }
+
+    // 注入spring 容器
+    @Bean
+    public SignAuthInterceptor signAuthInterceptor () {
+        return new SignAuthInterceptor();
+    }
+
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+
+        /**
+         * 注册签名拦截器
+         */
+        if (interceptorConfig.getSign().isEnable()) {
+            registry.addInterceptor(signAuthInterceptor())
+                    .addPathPatterns(interceptorConfig.getSign().getIncludePaths())
+                    .excludePathPatterns(interceptorConfig.getSign().getExcludePaths());
+        }
+    }
+
     /**
      * 无需登录的接口地址集合
      */
@@ -157,6 +193,8 @@ public class GlobalConfigure implements WebMvcConfigurer {
             "/biz/record/push",
             "/biz/record/edit",
 
+            "/thirdPart/v1/**",
+
             /*小程序注册账号*/
             "/biz/user/miniAdd",
 

+ 5 - 2
snowy-web-app/src/main/resources/application-local.properties

@@ -1,7 +1,7 @@
 #########################################
 # server configuration
 #########################################
-server.port=82
+server.port=83
 
 #########################################
 # spring allow-circular-references
@@ -95,7 +95,7 @@ spring.jackson.serialization.write-dates-as-timestamps=false
 spring.data.redis.database=9
 spring.data.redis.host=127.0.0.1
 spring.data.redis.port=6379
-spring.data.redis.password=
+spring.data.redis.password= 4008809192
 spring.data.redis.timeout=10s
 
 spring.data.redis.lettuce.pool.max-active=200
@@ -195,6 +195,9 @@ springdoc.group-configs[6].packages-to-scan=vip.xiaonuo.sys
 snowy.config.common.front-url=http://localhost:81
 snowy.config.common.backend-url=http://localhost:82
 
+# ?????
+open-sign.interceptor.sign.enable=true
+open-sign.interceptor.sign.include-paths=/thirdPart/v1/**
 
 #mqtt
 snowy.config.common.mqtt-url=tcp://127.0.0.1:1883

+ 4 - 0
snowy-web-app/src/main/resources/application-prod.properties

@@ -194,3 +194,7 @@ springdoc.group-configs[6].packages-to-scan=vip.xiaonuo.sys
 # common configuration
 snowy.config.common.front-url=http://localhost:81
 snowy.config.common.backend-url=http://localhost:82
+
+# ?????
+open-sign.interceptor.sign.enable=true
+open-sign.interceptor.sign.include-paths=/thirdPart/v1/**