huanghongfa
2020-12-11 beacd47b5a174b52602a7c4e4ee431aef4ab48b2
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java
@@ -1,6 +1,7 @@
package com.panzhihua.applets.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ActivitySignVO;
import com.panzhihua.common.model.vos.community.ComActActivityVO;
@@ -10,6 +11,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -45,6 +47,8 @@
    @ApiOperation(value = "分页查询社区活动",response = ComActActivityVO.class)
    @PostMapping("pageactivity")
    public R pageActivity(@RequestBody ComActActivityVO comActActivityVO){
        Long communityId = this.getCommunityId();
        comActActivityVO.setCommunityId(communityId);
        return communityService.pageActivity(comActActivityVO);
    }
@@ -73,6 +77,16 @@
        return communityService.listActivitySign(activitySignVO);
    }
    @ApiOperation(value = "新增社区动态浏览记录")
    @PostMapping("dynamicuser")
    public R addDynamicUser(@RequestBody ComActDynVO comActDynVO){
        Long id = comActDynVO.getId();
        if (ObjectUtils.isEmpty(id)||id==0) {
            return R.fail("社区动态不存在");
        }
        Long userId = this.getUserId();
        return communityService.addDynamicUser(id,userId);
    }
}