Browse Source

fix checkwork

xiewj 1 year ago
parent
commit
6829c3231f

+ 2 - 2
720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/WebController.java

@@ -64,7 +64,7 @@ public class WebController extends BaseController {
     /** 每次浏览作品都需要调用次接口。 浏览量只统计预览跟正式发布的数据 */
     @ApiOperation(value = "检查作品是否可用", notes = "true:可用, false:不可用, visit有值表示要添加浏览量")
     @GetMapping("checkWork/{workId}")
-    public Result checkWork(@PathVariable String workId, String visit,int val) {
+    public Result checkWork(@PathVariable String workId, String visit,String val) {
         log.info("作品id: {}", workId);
         boolean flag = false;
 
@@ -89,7 +89,7 @@ public class WebController extends BaseController {
                 workService.addVisit(workId);
             }
             redisUtil.set(RedisConstant.WORK_ID + workId, entity, 30, TimeUnit.SECONDS);
-            if (val == 1) {
+            if (val.equalsIgnoreCase("1")) {
                 Result FAILURE_SYS_3011 = checkWkByUser(entity);
                 if (FAILURE_SYS_3011 != null) return FAILURE_SYS_3011;
             }