| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.panzhihua.common.model.vos.community.CommunityPublicityVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.constants.Constants; |
| | |
| | | public R editSysConfValue(@RequestParam("communityId") Long communityId,@RequestParam("status") Integer status) { |
| | | return sysConfService.editSysConfValue(communityId,status); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("getCommunityPublicityData") |
| | | public R getCommunityPublicityData(@RequestParam("communityId") String communityId) |
| | | { |
| | | if(StringUtils.isEmpty(communityId)) |
| | | { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | return R.ok(sysConfService.getData(communityId)); |
| | | } |
| | | |
| | | @PostMapping("addCommunityPublicityDate") |
| | | public R addCommunityPublicityDate(@RequestBody CommunityPublicityVO item) { |
| | | if(StringUtils.isEmpty(item.getCommunityId())) |
| | | { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | int num=sysConfService.addDate(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | @PostMapping("editCommunityPublicityDate") |
| | | public R editCommunityPublicityDate(@RequestBody CommunityPublicityVO item) |
| | | { |
| | | if(StringUtils.isEmpty(item.getCommunityId())) |
| | | { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | int num=sysConfService.editDate(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | @DeleteMapping("deleteCommunityPublicityData") |
| | | public R deleteCommunityPublicityData(@RequestParam("communityId") String communityId) |
| | | { |
| | | if(StringUtils.isEmpty(communityId)) |
| | | { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | int num=sysConfService.deleteData(communityId); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | } |