| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑社区审核状态") |
| | | @GetMapping("editCircleExamineStatus") |
| | | public R editCircleExamineStatus(@RequestParam("status") Integer status){ |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | return communityService.editSysConfValue(communityId,status); |
| | | } |
| | | |
| | | } |
| | |
| | | return R.ok(value); |
| | | } |
| | | |
| | | /** |
| | | * 根据系统code以及社区id查询配置表value值 |
| | | * |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 系统配置value值 |
| | | */ |
| | | @GetMapping("getSysConfValue") |
| | | public R getSysConfValue(@RequestParam("key") String key,@RequestParam("communityId") Long communityId) { |
| | | return sysConfService.getSysConfValue(key,communityId); |
| | | } |
| | | |
| | | /** |
| | | * 新增系统code配置数据 |
| | | * |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 新增结果 |
| | | */ |
| | | @GetMapping("addSysConfValue") |
| | | public R addSysConfValue(@RequestParam("key") String key,@RequestParam("communityId") Long communityId,@RequestParam("name") String name,@RequestParam("value") String value) { |
| | | return sysConfService.addSysConfValue(key,communityId,name,value); |
| | | } |
| | | |
| | | /** |
| | | * 编辑系统配置 |
| | | * @param communityId 社区id |
| | | * @param status 配置值 |
| | | * @return 编辑结果 |
| | | */ |
| | | @GetMapping("editSysConfValue") |
| | | public R editSysConfValue(@RequestParam("communityId") Long communityId,@RequestParam("status") Integer status) { |
| | | return sysConfService.editSysConfValue(communityId,status); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 根据系统code以及社区id查询配置表value值 |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 系统配置value值 |
| | | * |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 系统配置value值 |
| | | */ |
| | | R getSysConfValue(String key, Long communityId); |
| | | |
| | | /** |
| | | * 新增系统code配置数据 |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 新增结果 |
| | | * |
| | | * @param key 系统code |
| | | * @param communityId 社区id |
| | | * @return 新增结果 |
| | | */ |
| | | R addSysConfValue(String key, Long communityId,String name,String value); |
| | | R addSysConfValue(String key, Long communityId, String name, String value); |
| | | |
| | | /** |
| | | * 编辑系统配置 |
| | | * @param communityId 社区id |
| | | * @param status 配置值 |
| | | * @return 编辑结果 |
| | | */ |
| | | R editSysConfValue(Long communityId, Integer status); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.constants.NeighborCircleConstants; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 编辑系统配置 |
| | | * @param communityId 社区id |
| | | * @param status 配置值 |
| | | * @return 编辑结果 |
| | | */ |
| | | @Override |
| | | public R editSysConfValue(Long communityId, Integer status){ |
| | | SysConfDO confDO = new SysConfDO(); |
| | | confDO.setCommunityId(communityId); |
| | | confDO.setCode(NeighborCircleConstants.NEIGHBOR_CIRCLE_AUTO_EXAMINE + communityId); |
| | | confDO.setValue(status+""); |
| | | if(this.baseMapper.updateById(confDO) > 0){ |
| | | return R.ok(confDO.getValue()); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | } |