| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ActivityInviteDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageActivityInviteDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | |
| | | import com.panzhihua.service_community.dao.ComActActEvaluateDAO; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.*; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/") |
| | | public class CommunityApi { |
| | | public class CommunityApi extends BaseController { |
| | | @Resource |
| | | public ComMngPopulationDAO comMngPopulationDAO; |
| | | @Resource |
| | |
| | | private ComActActEvaluateDAO comActActEvaluateDAO; |
| | | @Resource |
| | | private ComActActivityInviteService comActActivityInviteService; |
| | | @Resource |
| | | private RabbitTemplate rabbitTemplate; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | BeanUtils.copyProperties(comActDynVO, comActDynDO); |
| | | boolean save = comActDynService.save(comActDynDO); |
| | | if (save) { |
| | | if(comActDynVO.getCategory()!=null&&comActDynVO.getCategory()==4){ |
| | | comActDynVO.setId(comActDynDO.getId()); |
| | | rabbitTemplate.convertAndSend("huacheng.acid.message.exchange", "huacheng.acid.message.key", comActDynVO); |
| | | } |
| | | // 最多只能设置三条置顶状态,后边设置会取消先前设置的置顶 |
| | | Integer isTopping = comActDynVO.getIsTopping(); |
| | | boolean b = isTopping.intValue() == 1; |
| | |
| | | */ |
| | | @GetMapping("/eventgrid/community/list") |
| | | public R getCommunityLists() { |
| | | return comActService.getCommunityLists(); |
| | | return comActService.getCommunityLists(this.getAppId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @GetMapping("/eventgrid/community/westList") |
| | | public R getWestCommunityLists(@RequestParam("areaCode")String areaCode) { |
| | | public R getWestCommunityLists(@RequestParam(value = "areaCode",required = false)String areaCode) { |
| | | return comActService.getWestCommunityLists(areaCode); |
| | | } |
| | | |