| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.panzhihua.common.constants.NeighborCircleConstants; |
| | | import com.panzhihua.common.model.vos.community.CommunityPublicityVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.SysConfMapper; |
| | | import com.panzhihua.service_community.model.dos.SysConfDO; |
| | | import com.panzhihua.service_community.service.SysConfService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public R editSysConfValue(Long communityId, Integer status){ |
| | | String key = NeighborCircleConstants.NEIGHBOR_CIRCLE_AUTO_EXAMINE; |
| | | |
| | | SysConfDO confDO = this.baseMapper.selectOne(new QueryWrapper<SysConfDO>().lambda().eq(SysConfDO::getCommunityId,communityId) |
| | | .eq(SysConfDO::getCode,key + communityId)); |
| | | if(confDO == null){ |
| | | return R.fail("未查询到该系统配置"); |
| | | } |
| | | confDO.setCommunityId(communityId); |
| | | confDO.setCode(key + communityId); |
| | | confDO.setValue(status+""); |
| | | if(this.baseMapper.updateById(confDO) > 0){ |
| | | return R.ok(confDO.getValue()); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public CommunityPublicityVO getData(String communityId) { |
| | | return baseMapper.getData(communityId); |
| | | } |
| | | |
| | | @Override |
| | | public int addDate(CommunityPublicityVO item) |
| | | { |
| | | CommunityPublicityVO vo=baseMapper.getData(item.getCommunityId()); |
| | | if(vo==null) |
| | | { |
| | | return baseMapper.addDate(item); |
| | | } |
| | | else |
| | | { |
| | | return baseMapper.editDate(item); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int editDate(CommunityPublicityVO item) { |
| | | return baseMapper.editDate(item); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteData(String communityId) { |
| | | return baseMapper.deleteData(communityId); |
| | | } |
| | | |
| | | |
| | | } |