| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.Environment; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.CommunityMemberDto; |
| | | import com.java110.intf.community.ICommunityMemberV1InnerServiceSMO; |
| | |
| | | * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行 |
| | | */ |
| | | @Java110Cmd(serviceCode = "property.deleteProperty") |
| | | public class DeletePropertyCmd extends AbstractServiceCmdListener { |
| | | public class DeletePropertyCmd extends Cmd { |
| | | private static Logger logger = LoggerFactory.getLogger(DeletePropertyCmd.class); |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Environment.isDevEnv(); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "storeId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "storeTypeCd", "storeTypeCd不能为空"); |
| | | |
| | |
| | | communityMemberDto.setMemberId(storePo.getStoreId()); |
| | | List<CommunityMemberDto> communityMemberDtos = communityMemberV1InnerServiceSMOImpl.queryCommunityMembers(communityMemberDto); |
| | | |
| | | if (communityMemberDtos == null && communityMemberDtos.size() < 1) { |
| | | if (communityMemberDtos == null || communityMemberDtos.size() < 1) { |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.success()); |
| | | return; |
| | | } |
| | |
| | | communityMemberPo.setMemberId(storePo.getStoreId()); |
| | | flag = communityMemberV1InnerServiceSMOImpl.deleteCommunityMember(communityMemberPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("删除数据失败"); |
| | | throw new CmdException("释放小区失败"); |
| | | } |
| | | |
| | | //小区权限也踢掉 |
| | |
| | | menuGroupCommunityPo.setCommunityId(tmpCommunityMemberDto.getCommunityId()); |
| | | flag = menuGroupCommunityV1InnerServiceSMOImpl.deleteMenuGroupCommunity(menuGroupCommunityPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("删除数据失败"); |
| | | throw new CmdException("小区权限踢掉失败"); |
| | | } |
| | | } |
| | | |