he2802 4 年 前
コミット
bad44874ef

+ 1 - 2
zhongzheng-api/src/main/java/com/zhongzheng/controller/polyv/PolyvVideoController.java

@@ -38,9 +38,8 @@ public class PolyvVideoController extends BaseController {
 
 
     @ApiOperation("获取保利威视频小程序播放凭证")
-    @PreAuthorize("@ss.hasPermi('modules.polyv:video:query')")
     @GetMapping("/sign/{vid}")
-    public AjaxResult<String> getPlayPcSign(@PathVariable("vid") String vid) throws Exception {
+    public AjaxResult<String> getPlayMobileSign(@PathVariable("vid") String vid) throws Exception {
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
         String viewerId = String.valueOf(loginUser.getUser().getUserId());
         String token = iPolyvVideoService.polyvbMobileSignRequest(vid,viewerId);

+ 1 - 1
zhongzheng-api/src/main/java/com/zhongzheng/controller/wx/WxLoginController.java

@@ -40,7 +40,7 @@ public class WxLoginController
      * @param loginBody 登录信息
      * @return 结果
      */
-    @ApiOperation("登录")
+    @ApiOperation("虚拟登录")
     @PostMapping("/testLogin")
     public AjaxResult testLogin(@RequestBody WxLoginBody loginBody)
     {

+ 6 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/core/domain/AjaxResult.java

@@ -174,4 +174,10 @@ public class AjaxResult<T> extends HashMap<String, Object>
     {
         return new AjaxResult(code, msg, null);
     }
+
+
+    public static <T> AjaxResult<T> error(int code, String msg, T data)
+    {
+        return new AjaxResult(code, msg, data);
+    }
 }

+ 1 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/security/filter/JwtAuthenticationTokenFilter.java

@@ -39,6 +39,7 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter
             throws ServletException, IOException
     {
         String wxToken = wxTokenService.getToken(request);
+
         if(StringUtils.isNoneEmpty(wxToken)){
             ClientLoginUser clientLoginUser = wxTokenService.getLoginUser(request);
             if(clientLoginUser!=null){

+ 3 - 1
zhongzheng-framework/src/main/java/com/zhongzheng/framework/security/handle/AuthenticationEntryPointImpl.java

@@ -13,10 +13,12 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * 认证失败处理类 返回未授权
- * 
+ *
  * @author zhongzheng
  */
 @Component

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/wx/bo/WxLoginBody.java

@@ -7,6 +7,8 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 
+import javax.validation.constraints.NotBlank;
+
 /**
  * 微信登录
  *
@@ -22,14 +24,17 @@ public class WxLoginBody {
 
     /** iv */
     @ApiModelProperty("iv")
+    @NotBlank(message = "iv不能为空")
     private String iv;
 
     /** code */
     @ApiModelProperty("code")
+    @NotBlank(message = "code不能为空")
     private String code;
 
     /** encryptedData */
     @ApiModelProperty("encryptedData")
+    @NotBlank(message = "encryptedData不能为空")
     private String encryptedData;