ソースを参照

Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

java110 5 年 前
親
コミット
df11f9ee29
共有24 個のファイルを変更した、0 個の追加 と 1889 個の削除を含む
  1. 0 71
      service-community/src/main/java/com/java110/community/cmd/floor/DeleteFloorCmd.java
  2. 0 86
      service-community/src/main/java/com/java110/community/cmd/floor/ListFloorCmd.java
  3. 0 94
      service-community/src/main/java/com/java110/community/cmd/floor/SaveFloorCmd.java
  4. 0 74
      service-community/src/main/java/com/java110/community/cmd/floor/UpdateFloorCmd.java
  5. 0 71
      service-community/src/main/java/com/java110/community/cmd/owner/DeleteOwnerCmd.java
  6. 0 84
      service-community/src/main/java/com/java110/community/cmd/owner/ListOwnerCmd.java
  7. 0 85
      service-community/src/main/java/com/java110/community/cmd/owner/SaveOwnerCmd.java
  8. 0 75
      service-community/src/main/java/com/java110/community/cmd/owner/UpdateOwnerCmd.java
  9. 0 71
      service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/DeleteOwnerRoomRelCmd.java
  10. 0 83
      service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/ListOwnerRoomRelCmd.java
  11. 0 82
      service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/SaveOwnerRoomRelCmd.java
  12. 0 75
      service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/UpdateOwnerRoomRelCmd.java
  13. 0 72
      service-community/src/main/java/com/java110/community/cmd/room/DeleteRoomCmd.java
  14. 0 84
      service-community/src/main/java/com/java110/community/cmd/room/ListRoomCmd.java
  15. 0 87
      service-community/src/main/java/com/java110/community/cmd/room/SaveRoomCmd.java
  16. 0 75
      service-community/src/main/java/com/java110/community/cmd/room/UpdateRoomCmd.java
  17. 0 71
      service-community/src/main/java/com/java110/community/cmd/roomAttr/DeleteRoomAttrCmd.java
  18. 0 83
      service-community/src/main/java/com/java110/community/cmd/roomAttr/ListRoomAttrCmd.java
  19. 0 79
      service-community/src/main/java/com/java110/community/cmd/roomAttr/SaveRoomAttrCmd.java
  20. 0 75
      service-community/src/main/java/com/java110/community/cmd/roomAttr/UpdateRoomAttrCmd.java
  21. 0 71
      service-community/src/main/java/com/java110/community/cmd/unit/DeleteUnitCmd.java
  22. 0 84
      service-community/src/main/java/com/java110/community/cmd/unit/ListUnitCmd.java
  23. 0 82
      service-community/src/main/java/com/java110/community/cmd/unit/SaveUnitCmd.java
  24. 0 75
      service-community/src/main/java/com/java110/community/cmd/unit/UpdateUnitCmd.java

+ 0 - 71
service-community/src/main/java/com/java110/community/cmd/floor/DeleteFloorCmd.java

@@ -1,71 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.floor;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IFloorV1InnerServiceSMO;
-import com.java110.po.floor.FloorPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:删除
- * 服务编码:floor.deleteFloor
- * 请求路劲:/app/floor.DeleteFloor
- * add by 吴学文 at 2021-09-13 16:41:17 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "floor.deleteFloorV1")
-public class DeleteFloorCmd extends AbstractServiceCmdListener {
-    private static Logger logger = LoggerFactory.getLogger(DeleteFloorCmd.class);
-
-    @Autowired
-    private IFloorV1InnerServiceSMO floorV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "floorId", "floorId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-        FloorPo floorPo = BeanConvertUtil.covertBean(reqJson, FloorPo.class);
-        int flag = floorV1InnerServiceSMOImpl.deleteFloor(floorPo);
-
-        if (flag < 1) {
-            throw new CmdException("删除数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 86
service-community/src/main/java/com/java110/community/cmd/floor/ListFloorCmd.java

@@ -1,86 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.floor;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.dto.FloorDto;
-import com.java110.intf.community.IFloorV1InnerServiceSMO;
-import com.java110.po.floor.FloorPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.List;
-import java.util.ArrayList;
-
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:查询
- * 服务编码:floor.listFloor
- * 请求路劲:/app/floor.ListFloor
- * add by 吴学文 at 2021-09-13 16:41:17 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "floor.listFloorV1")
-public class ListFloorCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(ListFloorCmd.class);
-    @Autowired
-    private IFloorV1InnerServiceSMO floorV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-        FloorDto floorDto = BeanConvertUtil.covertBean(reqJson, FloorDto.class);
-
-        int count = floorV1InnerServiceSMOImpl.queryFloorsCount(floorDto);
-
-        List<FloorDto> floorDtos = null;
-
-        if (count > 0) {
-            floorDtos = floorV1InnerServiceSMOImpl.queryFloors(floorDto);
-        } else {
-            floorDtos = new ArrayList<>();
-        }
-
-        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, floorDtos);
-
-        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-        cmdDataFlowContext.setResponseEntity(responseEntity);
-    }
-}

+ 0 - 94
service-community/src/main/java/com/java110/community/cmd/floor/SaveFloorCmd.java

@@ -1,94 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.floor;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IFloorAttrInnerServiceSMO;
-import com.java110.intf.community.IFloorV1InnerServiceSMO;
-import com.java110.po.floor.FloorPo;
-import com.java110.po.floorAttr.FloorAttrPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:保存
- * 服务编码:floor.saveFloor
- * 请求路劲:/app/floor.SaveFloor
- * add by 吴学文 at 2021-09-13 16:41:17 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "floor.saveFloorV1")
-public class SaveFloorCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(SaveFloorCmd.class);
-
-    public static final String CODE_PREFIX_ID = "10";
-
-    @Autowired
-    private IFloorV1InnerServiceSMO floorV1InnerServiceSMOImpl;
-    @Autowired
-    private IFloorAttrInnerServiceSMO floorAttrInnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "floorNum", "请求报文中未包含floorNum");
-        Assert.hasKeyAndValue(reqJson, "name", "请求报文中未包含name");
-        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
-        Assert.hasKeyAndValue(reqJson, "floorArea", "请求报文中未包含floorArea");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-        FloorPo floorPo = BeanConvertUtil.covertBean(reqJson, FloorPo.class);
-        floorPo.setFloorId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
-        floorPo.setbId("-1");
-        floorPo.setUserId(cmdDataFlowContext.getReqHeaders().get("user-id"));
-        int flag = floorV1InnerServiceSMOImpl.saveFloor(floorPo);
-
-        if (flag < 1) {
-            throw new CmdException("保存数据失败");
-        }
-
-        FloorAttrPo floorAttrPo = new FloorAttrPo();
-        floorAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
-        floorAttrPo.setSpecCd(FloorPo.FLOOR_ATTR_LARGE);
-        floorAttrPo.setFloorId(floorPo.getFloorId());
-        floorAttrPo.setCommunityId(floorPo.getCommunityId());
-        floorAttrPo.setValue(FloorPo.FLOOR_ATTR_VALUE);
-        flag = floorAttrInnerServiceSMOImpl.saveFloorAttr(floorAttrPo);
-        if (flag < 1) {
-            throw new CmdException("保存大厦属性数据失败");
-        }
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 74
service-community/src/main/java/com/java110/community/cmd/floor/UpdateFloorCmd.java

@@ -1,74 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.floor;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IFloorV1InnerServiceSMO;
-import com.java110.po.floor.FloorPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:更新
- * 服务编码:floor.updateFloor
- * 请求路劲:/app/floor.UpdateFloor
- * add by 吴学文 at 2021-09-13 16:41:17 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "floor.updateFloorV1")
-public class UpdateFloorCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(UpdateFloorCmd.class);
-
-
-    @Autowired
-    private IFloorV1InnerServiceSMO floorV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "floorId", "floorId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-        FloorPo floorPo = BeanConvertUtil.covertBean(reqJson, FloorPo.class);
-        int flag = floorV1InnerServiceSMOImpl.updateFloor(floorPo);
-
-        if (flag < 1) {
-            throw new CmdException("更新数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 71
service-community/src/main/java/com/java110/community/cmd/owner/DeleteOwnerCmd.java

@@ -1,71 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.owner;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IOwnerV1InnerServiceSMO;
-import com.java110.po.owner.OwnerPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-/**
- * 类表述:删除
- * 服务编码:owner.deleteOwner
- * 请求路劲:/app/owner.DeleteOwner
- * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "owner.deleteOwner")
-public class DeleteOwnerCmd extends AbstractServiceCmdListener {
-  private static Logger logger = LoggerFactory.getLogger(DeleteOwnerCmd.class);
-
-    @Autowired
-    private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "memberId", "memberId不能为空");
-Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       OwnerPo ownerPo = BeanConvertUtil.covertBean(reqJson, OwnerPo.class);
-        int flag = ownerV1InnerServiceSMOImpl.deleteOwner(ownerPo);
-
-        if (flag < 1) {
-            throw new CmdException("删除数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 84
service-community/src/main/java/com/java110/community/cmd/owner/ListOwnerCmd.java

@@ -1,84 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.owner;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IOwnerV1InnerServiceSMO;
-import com.java110.po.owner.OwnerPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import com.java110.dto.owner.OwnerDto;
-import java.util.List;
-import java.util.ArrayList;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:查询
- * 服务编码:owner.listOwner
- * 请求路劲:/app/owner.ListOwner
- * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "owner.listOwner")
-public class ListOwnerCmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(ListOwnerCmd.class);
-    @Autowired
-    private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-           OwnerDto ownerDto = BeanConvertUtil.covertBean(reqJson, OwnerDto.class);
-
-           int count = ownerV1InnerServiceSMOImpl.queryOwnersCount(ownerDto);
-
-           List<OwnerDto> ownerDtos = null;
-
-           if (count > 0) {
-               ownerDtos = ownerV1InnerServiceSMOImpl.queryOwners(ownerDto);
-           } else {
-               ownerDtos = new ArrayList<>();
-           }
-
-           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, ownerDtos);
-
-           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-           cmdDataFlowContext.setResponseEntity(responseEntity);
-    }
-}

+ 0 - 85
service-community/src/main/java/com/java110/community/cmd/owner/SaveOwnerCmd.java

@@ -1,85 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.owner;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IOwnerV1InnerServiceSMO;
-import com.java110.po.owner.OwnerPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:保存
- * 服务编码:owner.saveOwner
- * 请求路劲:/app/owner.SaveOwner
- * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "owner.saveOwner")
-public class SaveOwnerCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(SaveOwnerCmd.class);
-
-    public static final String CODE_PREFIX_ID = "10";
-
-    @Autowired
-    private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "memberId", "请求报文中未包含memberId");
-Assert.hasKeyAndValue(reqJson, "ownerId", "请求报文中未包含ownerId");
-Assert.hasKeyAndValue(reqJson, "name", "请求报文中未包含name");
-Assert.hasKeyAndValue(reqJson, "sex", "请求报文中未包含sex");
-Assert.hasKeyAndValue(reqJson, "age", "请求报文中未包含age");
-Assert.hasKeyAndValue(reqJson, "link", "请求报文中未包含link");
-Assert.hasKeyAndValue(reqJson, "userId", "请求报文中未包含userId");
-Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
-Assert.hasKeyAndValue(reqJson, "ownerTypeCd", "请求报文中未包含ownerTypeCd");
-Assert.hasKeyAndValue(reqJson, "idCard", "请求报文中未包含idCard");
-Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       OwnerPo ownerPo = BeanConvertUtil.covertBean(reqJson, OwnerPo.class);
-        ownerPo.setMemberId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
-        int flag = ownerV1InnerServiceSMOImpl.saveOwner(ownerPo);
-
-        if (flag < 1) {
-            throw new CmdException("保存数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 75
service-community/src/main/java/com/java110/community/cmd/owner/UpdateOwnerCmd.java

@@ -1,75 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.owner;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IOwnerV1InnerServiceSMO;
-import com.java110.po.owner.OwnerPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:更新
- * 服务编码:owner.updateOwner
- * 请求路劲:/app/owner.UpdateOwner
- * add by 吴学文 at 2021-09-14 18:56:16 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "owner.updateOwner")
-public class UpdateOwnerCmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(UpdateOwnerCmd.class);
-
-
-    @Autowired
-    private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "memberId", "memberId不能为空");
-Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       OwnerPo ownerPo = BeanConvertUtil.covertBean(reqJson, OwnerPo.class);
-        int flag = ownerV1InnerServiceSMOImpl.updateOwner(ownerPo);
-
-        if (flag < 1) {
-            throw new CmdException("更新数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 71
service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/DeleteOwnerRoomRelCmd.java

@@ -1,71 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.ownerRoomRel;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IOwnerRoomRelV1InnerServiceSMO;
-import com.java110.po.owner.OwnerRoomRelPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-/**
- * 类表述:删除
- * 服务编码:ownerRoomRel.deleteOwnerRoomRel
- * 请求路劲:/app/ownerRoomRel.DeleteOwnerRoomRel
- * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "ownerRoomRel.deleteOwnerRoomRel")
-public class DeleteOwnerRoomRelCmd extends AbstractServiceCmdListener {
-  private static Logger logger = LoggerFactory.getLogger(DeleteOwnerRoomRelCmd.class);
-
-    @Autowired
-    private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "relId", "relId不能为空");
-Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       OwnerRoomRelPo ownerRoomRelPo = BeanConvertUtil.covertBean(reqJson, OwnerRoomRelPo.class);
-        int flag = ownerRoomRelV1InnerServiceSMOImpl.deleteOwnerRoomRel(ownerRoomRelPo);
-
-        if (flag < 1) {
-            throw new CmdException("删除数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 83
service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/ListOwnerRoomRelCmd.java

@@ -1,83 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.ownerRoomRel;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.dto.owner.OwnerRoomRelDto;
-import com.java110.intf.community.IOwnerRoomRelV1InnerServiceSMO;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import java.util.List;
-import java.util.ArrayList;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:查询
- * 服务编码:ownerRoomRel.listOwnerRoomRel
- * 请求路劲:/app/ownerRoomRel.ListOwnerRoomRel
- * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "ownerRoomRel.listOwnerRoomRel")
-public class ListOwnerRoomRelCmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(ListOwnerRoomRelCmd.class);
-    @Autowired
-    private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-           OwnerRoomRelDto ownerRoomRelDto = BeanConvertUtil.covertBean(reqJson, OwnerRoomRelDto.class);
-
-           int count = ownerRoomRelV1InnerServiceSMOImpl.queryOwnerRoomRelsCount(ownerRoomRelDto);
-
-           List<OwnerRoomRelDto> ownerRoomRelDtos = null;
-
-           if (count > 0) {
-               ownerRoomRelDtos = ownerRoomRelV1InnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
-           } else {
-               ownerRoomRelDtos = new ArrayList<>();
-           }
-
-           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, ownerRoomRelDtos);
-
-           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-           cmdDataFlowContext.setResponseEntity(responseEntity);
-    }
-}

+ 0 - 82
service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/SaveOwnerRoomRelCmd.java

@@ -1,82 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.ownerRoomRel;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IOwnerRoomRelV1InnerServiceSMO;
-import com.java110.po.owner.OwnerRoomRelPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:保存
- * 服务编码:ownerRoomRel.saveOwnerRoomRel
- * 请求路劲:/app/ownerRoomRel.SaveOwnerRoomRel
- * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "ownerRoomRel.saveOwnerRoomRel")
-public class SaveOwnerRoomRelCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(SaveOwnerRoomRelCmd.class);
-
-    public static final String CODE_PREFIX_ID = "10";
-
-    @Autowired
-    private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "relId", "请求报文中未包含relId");
-Assert.hasKeyAndValue(reqJson, "ownerId", "请求报文中未包含ownerId");
-Assert.hasKeyAndValue(reqJson, "roomId", "请求报文中未包含roomId");
-Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
-Assert.hasKeyAndValue(reqJson, "userId", "请求报文中未包含userId");
-Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
-Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
-Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       OwnerRoomRelPo ownerRoomRelPo = BeanConvertUtil.covertBean(reqJson, OwnerRoomRelPo.class);
-        ownerRoomRelPo.setRelId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
-        int flag = ownerRoomRelV1InnerServiceSMOImpl.saveOwnerRoomRel(ownerRoomRelPo);
-
-        if (flag < 1) {
-            throw new CmdException("保存数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 75
service-community/src/main/java/com/java110/community/cmd/ownerRoomRel/UpdateOwnerRoomRelCmd.java

@@ -1,75 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.ownerRoomRel;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IOwnerRoomRelV1InnerServiceSMO;
-import com.java110.po.owner.OwnerRoomRelPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:更新
- * 服务编码:ownerRoomRel.updateOwnerRoomRel
- * 请求路劲:/app/ownerRoomRel.UpdateOwnerRoomRel
- * add by 吴学文 at 2021-09-14 18:57:35 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "ownerRoomRel.updateOwnerRoomRel")
-public class UpdateOwnerRoomRelCmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(UpdateOwnerRoomRelCmd.class);
-
-
-    @Autowired
-    private IOwnerRoomRelV1InnerServiceSMO ownerRoomRelV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "relId", "relId不能为空");
-Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       OwnerRoomRelPo ownerRoomRelPo = BeanConvertUtil.covertBean(reqJson, OwnerRoomRelPo.class);
-        int flag = ownerRoomRelV1InnerServiceSMOImpl.updateOwnerRoomRel(ownerRoomRelPo);
-
-        if (flag < 1) {
-            throw new CmdException("更新数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 72
service-community/src/main/java/com/java110/community/cmd/room/DeleteRoomCmd.java

@@ -1,72 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.room;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IRoomV1InnerServiceSMO;
-import com.java110.po.room.RoomPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:删除
- * 服务编码:room.deleteRoom
- * 请求路劲:/app/room.DeleteRoom
- * add by 吴学文 at 2021-09-14 14:28:56 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "room.deleteRoom")
-public class DeleteRoomCmd extends AbstractServiceCmdListener {
-    private static Logger logger = LoggerFactory.getLogger(DeleteRoomCmd.class);
-
-    @Autowired
-    private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "roomId", "roomId不能为空");
-        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-        RoomPo roomPo = BeanConvertUtil.covertBean(reqJson, RoomPo.class);
-        int flag = roomV1InnerServiceSMOImpl.deleteRoom(roomPo);
-
-        if (flag < 1) {
-            throw new CmdException("删除数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 84
service-community/src/main/java/com/java110/community/cmd/room/ListRoomCmd.java

@@ -1,84 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.room;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.dto.RoomDto;
-import com.java110.intf.community.IRoomV1InnerServiceSMO;
-import com.java110.po.room.RoomPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import java.util.List;
-import java.util.ArrayList;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:查询
- * 服务编码:room.listRoom
- * 请求路劲:/app/room.ListRoom
- * add by 吴学文 at 2021-09-14 14:28:56 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "room.listRoom")
-public class ListRoomCmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(ListRoomCmd.class);
-    @Autowired
-    private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-           RoomDto roomDto = BeanConvertUtil.covertBean(reqJson, RoomDto.class);
-
-           int count = roomV1InnerServiceSMOImpl.queryRoomsCount(roomDto);
-
-           List<RoomDto> roomDtos = null;
-
-           if (count > 0) {
-               roomDtos = roomV1InnerServiceSMOImpl.queryRooms(roomDto);
-           } else {
-               roomDtos = new ArrayList<>();
-           }
-
-           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, roomDtos);
-
-           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-           cmdDataFlowContext.setResponseEntity(responseEntity);
-    }
-}

+ 0 - 87
service-community/src/main/java/com/java110/community/cmd/room/SaveRoomCmd.java

@@ -1,87 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.room;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IRoomV1InnerServiceSMO;
-import com.java110.po.room.RoomPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:保存
- * 服务编码:room.saveRoom
- * 请求路劲:/app/room.SaveRoom
- * add by 吴学文 at 2021-09-14 14:28:56 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "room.saveRoom")
-public class SaveRoomCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(SaveRoomCmd.class);
-
-    public static final String CODE_PREFIX_ID = "10";
-
-    @Autowired
-    private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "roomNum", "请求报文中未包含roomNum");
-        Assert.hasKeyAndValue(reqJson, "unitId", "请求报文中未包含unitId");
-        Assert.hasKeyAndValue(reqJson, "layer", "请求报文中未包含layer");
-        Assert.hasKeyAndValue(reqJson, "apartment", "请求报文中未包含apartment");
-        Assert.hasKeyAndValue(reqJson, "builtUpArea", "请求报文中未包含builtUpArea");
-        Assert.hasKeyAndValue(reqJson, "feeCoefficient", "请求报文中未包含feeCoefficient");
-        Assert.hasKeyAndValue(reqJson, "userId", "请求报文中未包含userId");
-        Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
-        Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
-        Assert.hasKeyAndValue(reqJson, "roomType", "请求报文中未包含roomType");
-        Assert.hasKeyAndValue(reqJson, "roomSubType", "请求报文中未包含roomSubType");
-        Assert.hasKeyAndValue(reqJson, "roomArea", "请求报文中未包含roomArea");
-        Assert.hasKeyAndValue(reqJson, "roomRent", "请求报文中未包含roomRent");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-        RoomPo roomPo = BeanConvertUtil.covertBean(reqJson, RoomPo.class);
-        roomPo.setRoomId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
-        int flag = roomV1InnerServiceSMOImpl.saveRoom(roomPo);
-
-        if (flag < 1) {
-            throw new CmdException("保存数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 75
service-community/src/main/java/com/java110/community/cmd/room/UpdateRoomCmd.java

@@ -1,75 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.room;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IRoomV1InnerServiceSMO;
-import com.java110.po.room.RoomPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:更新
- * 服务编码:room.updateRoom
- * 请求路劲:/app/room.UpdateRoom
- * add by 吴学文 at 2021-09-14 14:28:56 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "room.updateRoom")
-public class UpdateRoomCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(UpdateRoomCmd.class);
-
-
-    @Autowired
-    private IRoomV1InnerServiceSMO roomV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "roomId", "roomId不能为空");
-        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-        RoomPo roomPo = BeanConvertUtil.covertBean(reqJson, RoomPo.class);
-        int flag = roomV1InnerServiceSMOImpl.updateRoom(roomPo);
-
-        if (flag < 1) {
-            throw new CmdException("更新数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 71
service-community/src/main/java/com/java110/community/cmd/roomAttr/DeleteRoomAttrCmd.java

@@ -1,71 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.roomAttr;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IRoomAttrV1InnerServiceSMO;
-import com.java110.po.room.RoomAttrPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-/**
- * 类表述:删除
- * 服务编码:roomAttr.deleteRoomAttr
- * 请求路劲:/app/roomAttr.DeleteRoomAttr
- * add by 吴学文 at 2021-09-16 10:16:53 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "roomAttr.deleteRoomAttr")
-public class DeleteRoomAttrCmd extends AbstractServiceCmdListener {
-  private static Logger logger = LoggerFactory.getLogger(DeleteRoomAttrCmd.class);
-
-    @Autowired
-    private IRoomAttrV1InnerServiceSMO roomAttrV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
-Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       RoomAttrPo roomAttrPo = BeanConvertUtil.covertBean(reqJson, RoomAttrPo.class);
-        int flag = roomAttrV1InnerServiceSMOImpl.deleteRoomAttr(roomAttrPo);
-
-        if (flag < 1) {
-            throw new CmdException("删除数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 83
service-community/src/main/java/com/java110/community/cmd/roomAttr/ListRoomAttrCmd.java

@@ -1,83 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.roomAttr;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.dto.RoomAttrDto;
-import com.java110.intf.community.IRoomAttrV1InnerServiceSMO;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import java.util.List;
-import java.util.ArrayList;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:查询
- * 服务编码:roomAttr.listRoomAttr
- * 请求路劲:/app/roomAttr.ListRoomAttr
- * add by 吴学文 at 2021-09-16 10:16:53 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "roomAttr.listRoomAttr")
-public class ListRoomAttrCmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(ListRoomAttrCmd.class);
-    @Autowired
-    private IRoomAttrV1InnerServiceSMO roomAttrV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-           RoomAttrDto roomAttrDto = BeanConvertUtil.covertBean(reqJson, RoomAttrDto.class);
-
-           int count = roomAttrV1InnerServiceSMOImpl.queryRoomAttrsCount(roomAttrDto);
-
-           List<RoomAttrDto> roomAttrDtos = null;
-
-           if (count > 0) {
-               roomAttrDtos = roomAttrV1InnerServiceSMOImpl.queryRoomAttrs(roomAttrDto);
-           } else {
-               roomAttrDtos = new ArrayList<>();
-           }
-
-           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, roomAttrDtos);
-
-           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-           cmdDataFlowContext.setResponseEntity(responseEntity);
-    }
-}

+ 0 - 79
service-community/src/main/java/com/java110/community/cmd/roomAttr/SaveRoomAttrCmd.java

@@ -1,79 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.roomAttr;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IRoomAttrV1InnerServiceSMO;
-import com.java110.po.room.RoomAttrPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:保存
- * 服务编码:roomAttr.saveRoomAttr
- * 请求路劲:/app/roomAttr.SaveRoomAttr
- * add by 吴学文 at 2021-09-16 10:16:52 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "roomAttr.saveRoomAttr")
-public class SaveRoomAttrCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(SaveRoomAttrCmd.class);
-
-    public static final String CODE_PREFIX_ID = "10";
-
-    @Autowired
-    private IRoomAttrV1InnerServiceSMO roomAttrV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "attrId", "请求报文中未包含attrId");
-Assert.hasKeyAndValue(reqJson, "roomId", "请求报文中未包含roomId");
-Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
-Assert.hasKeyAndValue(reqJson, "value", "请求报文中未包含value");
-Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       RoomAttrPo roomAttrPo = BeanConvertUtil.covertBean(reqJson, RoomAttrPo.class);
-        roomAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
-        int flag = roomAttrV1InnerServiceSMOImpl.saveRoomAttr(roomAttrPo);
-
-        if (flag < 1) {
-            throw new CmdException("保存数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 75
service-community/src/main/java/com/java110/community/cmd/roomAttr/UpdateRoomAttrCmd.java

@@ -1,75 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.roomAttr;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IRoomAttrV1InnerServiceSMO;
-import com.java110.po.room.RoomAttrPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:更新
- * 服务编码:roomAttr.updateRoomAttr
- * 请求路劲:/app/roomAttr.UpdateRoomAttr
- * add by 吴学文 at 2021-09-16 10:16:53 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "roomAttr.updateRoomAttr")
-public class UpdateRoomAttrCmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(UpdateRoomAttrCmd.class);
-
-
-    @Autowired
-    private IRoomAttrV1InnerServiceSMO roomAttrV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
-Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       RoomAttrPo roomAttrPo = BeanConvertUtil.covertBean(reqJson, RoomAttrPo.class);
-        int flag = roomAttrV1InnerServiceSMOImpl.updateRoomAttr(roomAttrPo);
-
-        if (flag < 1) {
-            throw new CmdException("更新数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 71
service-community/src/main/java/com/java110/community/cmd/unit/DeleteUnitCmd.java

@@ -1,71 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.unit;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IUnitV1InnerServiceSMO;
-import com.java110.po.unit.UnitPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-/**
- * 类表述:删除
- * 服务编码:unit.deleteUnit
- * 请求路劲:/app/unit.DeleteUnit
- * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "unit.deleteUnit")
-public class DeleteUnitCmd extends AbstractServiceCmdListener {
-  private static Logger logger = LoggerFactory.getLogger(DeleteUnitCmd.class);
-
-    @Autowired
-    private IUnitV1InnerServiceSMO unitV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "unitId", "unitId不能为空");
-Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       UnitPo unitPo = BeanConvertUtil.covertBean(reqJson, UnitPo.class);
-        int flag = unitV1InnerServiceSMOImpl.deleteUnit(unitPo);
-
-        if (flag < 1) {
-            throw new CmdException("删除数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 84
service-community/src/main/java/com/java110/community/cmd/unit/ListUnitCmd.java

@@ -1,84 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.unit;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.dto.UnitDto;
-import com.java110.intf.community.IUnitV1InnerServiceSMO;
-import com.java110.po.unit.UnitPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import java.util.List;
-import java.util.ArrayList;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:查询
- * 服务编码:unit.listUnit
- * 请求路劲:/app/unit.ListUnit
- * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "unit.listUnit")
-public class ListUnitCmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(ListUnitCmd.class);
-    @Autowired
-    private IUnitV1InnerServiceSMO unitV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-           UnitDto unitDto = BeanConvertUtil.covertBean(reqJson, UnitDto.class);
-
-           int count = unitV1InnerServiceSMOImpl.queryUnitsCount(unitDto);
-
-           List<UnitDto> unitDtos = null;
-
-           if (count > 0) {
-               unitDtos = unitV1InnerServiceSMOImpl.queryUnits(unitDto);
-           } else {
-               unitDtos = new ArrayList<>();
-           }
-
-           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, unitDtos);
-
-           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-           cmdDataFlowContext.setResponseEntity(responseEntity);
-    }
-}

+ 0 - 82
service-community/src/main/java/com/java110/community/cmd/unit/SaveUnitCmd.java

@@ -1,82 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.unit;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IUnitV1InnerServiceSMO;
-import com.java110.po.unit.UnitPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:保存
- * 服务编码:unit.saveUnit
- * 请求路劲:/app/unit.SaveUnit
- * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "unit.saveUnit")
-public class SaveUnitCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(SaveUnitCmd.class);
-
-    public static final String CODE_PREFIX_ID = "10";
-
-    @Autowired
-    private IUnitV1InnerServiceSMO unitV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "unitId", "请求报文中未包含unitId");
-        Assert.hasKeyAndValue(reqJson, "unitNum", "请求报文中未包含unitNum");
-        Assert.hasKeyAndValue(reqJson, "floorId", "请求报文中未包含floorId");
-        Assert.hasKeyAndValue(reqJson, "layerCount", "请求报文中未包含layerCount");
-        Assert.hasKeyAndValue(reqJson, "lift", "请求报文中未包含lift");
-        Assert.hasKeyAndValue(reqJson, "userId", "请求报文中未包含userId");
-        Assert.hasKeyAndValue(reqJson, "statusCd", "请求报文中未包含statusCd");
-        Assert.hasKeyAndValue(reqJson, "unitArea", "请求报文中未包含unitArea");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-        UnitPo unitPo = BeanConvertUtil.covertBean(reqJson, UnitPo.class);
-        unitPo.setUnitId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
-        int flag = unitV1InnerServiceSMOImpl.saveUnit(unitPo);
-
-        if (flag < 1) {
-            throw new CmdException("保存数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 75
service-community/src/main/java/com/java110/community/cmd/unit/UpdateUnitCmd.java

@@ -1,75 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.community.cmd.unit;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.community.IUnitV1InnerServiceSMO;
-import com.java110.po.unit.UnitPo;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:更新
- * 服务编码:unit.updateUnit
- * 请求路劲:/app/unit.UpdateUnit
- * add by 吴学文 at 2021-09-14 18:42:46 mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "unit.updateUnit")
-public class UpdateUnitCmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(UpdateUnitCmd.class);
-
-
-    @Autowired
-    private IUnitV1InnerServiceSMO unitV1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        Assert.hasKeyAndValue(reqJson, "unitId", "unitId不能为空");
-        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
-
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-        UnitPo unitPo = BeanConvertUtil.covertBean(reqJson, UnitPo.class);
-        int flag = unitV1InnerServiceSMOImpl.updateUnit(unitPo);
-
-        if (flag < 1) {
-            throw new CmdException("更新数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}