shane лет назад: 4
Родитель
Сommit
801a3c0c00

+ 146 - 0
java110-bean/src/main/java/com/java110/dto/parkingSpaceApply/ParkingSpaceApplyDto.java

@@ -0,0 +1,146 @@
+package com.java110.dto.parkingSpaceApply;
+
+import com.java110.dto.PageDto;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @ClassName FloorDto
+ * @Description 车位申请数据层封装
+ * @Author wuxw
+ * @Date 2019/4/24 8:52
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+public class ParkingSpaceApplyDto extends PageDto implements Serializable {
+
+    private String carBrand;
+private String applyPersonName;
+private String carNum;
+private String psId;
+private String remark;
+private String applyId;
+private String carColor;
+private String carType;
+private String configId;
+private String applyPersonLink;
+private String startTime;
+private String applyPersonId;
+private String endTime;
+private String state;
+private String communityId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getCarBrand() {
+        return carBrand;
+    }
+public void setCarBrand(String carBrand) {
+        this.carBrand = carBrand;
+    }
+public String getApplyPersonName() {
+        return applyPersonName;
+    }
+public void setApplyPersonName(String applyPersonName) {
+        this.applyPersonName = applyPersonName;
+    }
+public String getCarNum() {
+        return carNum;
+    }
+public void setCarNum(String carNum) {
+        this.carNum = carNum;
+    }
+public String getPsId() {
+        return psId;
+    }
+public void setPsId(String psId) {
+        this.psId = psId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getApplyId() {
+        return applyId;
+    }
+public void setApplyId(String applyId) {
+        this.applyId = applyId;
+    }
+public String getCarColor() {
+        return carColor;
+    }
+public void setCarColor(String carColor) {
+        this.carColor = carColor;
+    }
+public String getCarType() {
+        return carType;
+    }
+public void setCarType(String carType) {
+        this.carType = carType;
+    }
+public String getConfigId() {
+        return configId;
+    }
+public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+public String getApplyPersonLink() {
+        return applyPersonLink;
+    }
+public void setApplyPersonLink(String applyPersonLink) {
+        this.applyPersonLink = applyPersonLink;
+    }
+public String getStartTime() {
+        return startTime;
+    }
+public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+public String getApplyPersonId() {
+        return applyPersonId;
+    }
+public void setApplyPersonId(String applyPersonId) {
+        this.applyPersonId = applyPersonId;
+    }
+public String getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+}

+ 145 - 0
java110-bean/src/main/java/com/java110/po/parkingSpaceApply/ParkingSpaceApplyPo.java

@@ -0,0 +1,145 @@
+/*
+ * 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.po.parkingSpaceApply;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2021-10-18 13:00:02 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行
+ */
+public class ParkingSpaceApplyPo implements Serializable {
+
+    private String carBrand;
+private String applyPersonName;
+private String carNum;
+private String psId;
+private String remark;
+private String statusCd = "0";
+private String applyId;
+private String carColor;
+private String carType;
+private String configId;
+private String applyPersonLink;
+private String startTime;
+private String applyPersonId;
+private String endTime;
+private String state;
+private String communityId;
+public String getCarBrand() {
+        return carBrand;
+    }
+public void setCarBrand(String carBrand) {
+        this.carBrand = carBrand;
+    }
+public String getApplyPersonName() {
+        return applyPersonName;
+    }
+public void setApplyPersonName(String applyPersonName) {
+        this.applyPersonName = applyPersonName;
+    }
+public String getCarNum() {
+        return carNum;
+    }
+public void setCarNum(String carNum) {
+        this.carNum = carNum;
+    }
+public String getPsId() {
+        return psId;
+    }
+public void setPsId(String psId) {
+        this.psId = psId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getApplyId() {
+        return applyId;
+    }
+public void setApplyId(String applyId) {
+        this.applyId = applyId;
+    }
+public String getCarColor() {
+        return carColor;
+    }
+public void setCarColor(String carColor) {
+        this.carColor = carColor;
+    }
+public String getCarType() {
+        return carType;
+    }
+public void setCarType(String carType) {
+        this.carType = carType;
+    }
+public String getConfigId() {
+        return configId;
+    }
+public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+public String getApplyPersonLink() {
+        return applyPersonLink;
+    }
+public void setApplyPersonLink(String applyPersonLink) {
+        this.applyPersonLink = applyPersonLink;
+    }
+public String getStartTime() {
+        return startTime;
+    }
+public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+public String getApplyPersonId() {
+        return applyPersonId;
+    }
+public void setApplyPersonId(String applyPersonId) {
+        this.applyPersonId = applyPersonId;
+    }
+public String getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+
+}

Разница между файлами не показана из-за своего большого размера
+ 205 - 0
java110-db/src/main/resources/mapper/community/ParkingSpaceApplyV1ServiceDaoImplMapper.xml


+ 71 - 0
java110-generator/src/main/resources/newBack/template_parkingApply.json

@@ -0,0 +1,71 @@
+{
+  "autoMove": true,
+  "id": "applyId",
+  "name": "parkingSpaceApply",
+  "desc": "车位申请",
+  "shareParam": "applyId",
+  "shareColumn": "apply_id",
+  "shareName": "community",
+  "tableName": "parking_space_apply",
+  "param": {
+    "applyId": "apply_id",
+    "psId": "ps_id",
+    "communityId": "community_id",
+    "carNum": "car_num",
+    "carBrand": "car_brand",
+    "carType": "car_type",
+    "carColor": "car_color",
+    "startTime": "start_time",
+    "endTime": "end_time",
+    "state": "state",
+    "configId": "config_id",
+    "applyPersonName": "apply_person_name",
+    "applyPersonLink": "apply_person_link",
+    "applyPersonId": "apply_person_id",
+    "remark": "remark",
+    "createTime": "create_time",
+    "statusCd": "status_cd"
+  },
+  "required": [
+    {
+      "code": "carNum",
+      "msg": "车牌号不能为空"
+    },
+    {
+      "code": "carBrand",
+      "msg": "车辆品牌不能为空"
+    },
+    {
+      "code": "carType",
+      "msg": "车辆类型不能为空"
+    },
+    {
+      "code": "carColor",
+      "msg": "车身颜色不能为空"
+    },
+    {
+      "code": "startTime",
+      "msg": "开始时间不能为空"
+    },
+    {
+      "code": "endTime",
+      "msg": "结束时间不能为空"
+    },
+    {
+      "code": "state",
+      "msg": "状态不能为空"
+    },
+    {
+      "code": "applyPersonName",
+      "msg": "申请人不能为空"
+    },
+    {
+      "code": "applyPersonLink",
+      "msg": "申请人电话不能为空"
+    },
+    {
+      "code": "applyPersonId",
+      "msg": "申请人ID不能为空"
+    }
+  ]
+}

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/community/IParkingSpaceApplyV1InnerServiceSMO.java

@@ -0,0 +1,68 @@
+/*
+ * 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.intf.community;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.parkingSpaceApply.ParkingSpaceApplyDto;
+import com.java110.po.parkingSpaceApply.ParkingSpaceApplyPo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2021-10-18 13:00:02 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行
+ */
+@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/parkingSpaceApplyV1Api")
+public interface IParkingSpaceApplyV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveParkingSpaceApply", method = RequestMethod.POST)
+    public int saveParkingSpaceApply(@RequestBody  ParkingSpaceApplyPo parkingSpaceApplyPo);
+
+    @RequestMapping(value = "/updateParkingSpaceApply", method = RequestMethod.POST)
+    public int updateParkingSpaceApply(@RequestBody  ParkingSpaceApplyPo parkingSpaceApplyPo);
+
+    @RequestMapping(value = "/deleteParkingSpaceApply", method = RequestMethod.POST)
+    public int deleteParkingSpaceApply(@RequestBody  ParkingSpaceApplyPo parkingSpaceApplyPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param parkingSpaceApplyDto 数据对象分享
+     * @return ParkingSpaceApplyDto 对象数据
+     */
+    @RequestMapping(value = "/queryParkingSpaceApplys", method = RequestMethod.POST)
+    List<ParkingSpaceApplyDto> queryParkingSpaceApplys(@RequestBody ParkingSpaceApplyDto parkingSpaceApplyDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param parkingSpaceApplyDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryParkingSpaceApplysCount", method = RequestMethod.POST)
+    int queryParkingSpaceApplysCount(@RequestBody ParkingSpaceApplyDto parkingSpaceApplyDto);
+}

+ 71 - 0
service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/DeleteParkingSpaceApplyCmd.java

@@ -0,0 +1,71 @@
+/*
+ * 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.parkingSpaceApply;
+
+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.IParkingSpaceApplyV1InnerServiceSMO;
+import com.java110.po.parkingSpaceApply.ParkingSpaceApplyPo;
+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;
+/**
+ * 类表述:删除
+ * 服务编码:parkingSpaceApply.deleteParkingSpaceApply
+ * 请求路劲:/app/parkingSpaceApply.DeleteParkingSpaceApply
+ * add by 吴学文 at 2021-10-18 13:00:02 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 = "parkingSpaceApply.deleteParkingSpaceApply")
+public class DeleteParkingSpaceApplyCmd extends AbstractServiceCmdListener {
+  private static Logger logger = LoggerFactory.getLogger(DeleteParkingSpaceApplyCmd.class);
+
+    @Autowired
+    private IParkingSpaceApplyV1InnerServiceSMO parkingSpaceApplyV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "applyId", "applyId不能为空");
+Assert.hasKeyAndValue(reqJson, "applyId", "applyId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       ParkingSpaceApplyPo parkingSpaceApplyPo = BeanConvertUtil.covertBean(reqJson, ParkingSpaceApplyPo.class);
+        int flag = parkingSpaceApplyV1InnerServiceSMOImpl.deleteParkingSpaceApply(parkingSpaceApplyPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 84 - 0
service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/ListParkingSpaceApplyCmd.java

@@ -0,0 +1,84 @@
+/*
+ * 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.parkingSpaceApply;
+
+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.IParkingSpaceApplyV1InnerServiceSMO;
+import com.java110.po.parkingSpaceApply.ParkingSpaceApplyPo;
+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.parkingSpaceApply.ParkingSpaceApplyDto;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:parkingSpaceApply.listParkingSpaceApply
+ * 请求路劲:/app/parkingSpaceApply.ListParkingSpaceApply
+ * add by 吴学文 at 2021-10-18 13:00:02 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 = "parkingSpaceApply.listParkingSpaceApply")
+public class ListParkingSpaceApplyCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListParkingSpaceApplyCmd.class);
+    @Autowired
+    private IParkingSpaceApplyV1InnerServiceSMO parkingSpaceApplyV1InnerServiceSMOImpl;
+
+    @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 {
+
+           ParkingSpaceApplyDto parkingSpaceApplyDto = BeanConvertUtil.covertBean(reqJson, ParkingSpaceApplyDto.class);
+
+           int count = parkingSpaceApplyV1InnerServiceSMOImpl.queryParkingSpaceApplysCount(parkingSpaceApplyDto);
+
+           List<ParkingSpaceApplyDto> parkingSpaceApplyDtos = null;
+
+           if (count > 0) {
+               parkingSpaceApplyDtos = parkingSpaceApplyV1InnerServiceSMOImpl.queryParkingSpaceApplys(parkingSpaceApplyDto);
+           } else {
+               parkingSpaceApplyDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, parkingSpaceApplyDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 84 - 0
service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/SaveParkingSpaceApplyCmd.java

@@ -0,0 +1,84 @@
+/*
+ * 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.parkingSpaceApply;
+
+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.IParkingSpaceApplyV1InnerServiceSMO;
+import com.java110.po.parkingSpaceApply.ParkingSpaceApplyPo;
+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;
+
+/**
+ * 类表述:保存
+ * 服务编码:parkingSpaceApply.saveParkingSpaceApply
+ * 请求路劲:/app/parkingSpaceApply.SaveParkingSpaceApply
+ * add by 吴学文 at 2021-10-18 13:00:02 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 = "parkingSpaceApply.saveParkingSpaceApply")
+public class SaveParkingSpaceApplyCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveParkingSpaceApplyCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IParkingSpaceApplyV1InnerServiceSMO parkingSpaceApplyV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "carNum", "请求报文中未包含carNum");
+        Assert.hasKeyAndValue(reqJson, "carBrand", "请求报文中未包含carBrand");
+        Assert.hasKeyAndValue(reqJson, "carType", "请求报文中未包含carType");
+        Assert.hasKeyAndValue(reqJson, "carColor", "请求报文中未包含carColor");
+        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
+        Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
+        Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
+        Assert.hasKeyAndValue(reqJson, "applyPersonName", "请求报文中未包含applyPersonName");
+        Assert.hasKeyAndValue(reqJson, "applyPersonLink", "请求报文中未包含applyPersonLink");
+        Assert.hasKeyAndValue(reqJson, "applyPersonId", "请求报文中未包含applyPersonId");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       ParkingSpaceApplyPo parkingSpaceApplyPo = BeanConvertUtil.covertBean(reqJson, ParkingSpaceApplyPo.class);
+        parkingSpaceApplyPo.setApplyId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = parkingSpaceApplyV1InnerServiceSMOImpl.saveParkingSpaceApply(parkingSpaceApplyPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-community/src/main/java/com/java110/community/cmd/parkingSpaceApply/UpdateParkingSpaceApplyCmd.java

@@ -0,0 +1,75 @@
+/*
+ * 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.parkingSpaceApply;
+
+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.IParkingSpaceApplyV1InnerServiceSMO;
+import com.java110.po.parkingSpaceApply.ParkingSpaceApplyPo;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:parkingSpaceApply.updateParkingSpaceApply
+ * 请求路劲:/app/parkingSpaceApply.UpdateParkingSpaceApply
+ * add by 吴学文 at 2021-10-18 13:00:02 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 = "parkingSpaceApply.updateParkingSpaceApply")
+public class UpdateParkingSpaceApplyCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateParkingSpaceApplyCmd.class);
+
+
+    @Autowired
+    private IParkingSpaceApplyV1InnerServiceSMO parkingSpaceApplyV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "applyId", "applyId不能为空");
+Assert.hasKeyAndValue(reqJson, "applyId", "applyId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       ParkingSpaceApplyPo parkingSpaceApplyPo = BeanConvertUtil.covertBean(reqJson, ParkingSpaceApplyPo.class);
+        int flag = parkingSpaceApplyV1InnerServiceSMOImpl.updateParkingSpaceApply(parkingSpaceApplyPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-community/src/main/java/com/java110/community/dao/IParkingSpaceApplyV1ServiceDao.java

@@ -0,0 +1,77 @@
+/*
+ * 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.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2021-10-18 13:00:02 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行
+ */
+public interface IParkingSpaceApplyV1ServiceDao {
+
+
+    /**
+     * 保存 车位申请信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveParkingSpaceApplyInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询车位申请信息(instance过程)
+     * 根据bId 查询车位申请信息
+     * @param info bId 信息
+     * @return 车位申请信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getParkingSpaceApplyInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改车位申请信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateParkingSpaceApplyInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询车位申请总数
+     *
+     * @param info 车位申请信息
+     * @return 车位申请数量
+     */
+    int queryParkingSpaceApplysCount(Map info);
+
+}

+ 112 - 0
service-community/src/main/java/com/java110/community/dao/impl/ParkingSpaceApplyV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * 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.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.community.dao.IParkingSpaceApplyV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2021-10-18 13:00:02 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行
+ */
+@Service("parkingSpaceApplyV1ServiceDaoImpl")
+public class ParkingSpaceApplyV1ServiceDaoImpl extends BaseServiceDao implements IParkingSpaceApplyV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ParkingSpaceApplyV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存车位申请信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveParkingSpaceApplyInfo(Map info) throws DAOException {
+        logger.debug("保存 saveParkingSpaceApplyInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("parkingSpaceApplyV1ServiceDaoImpl.saveParkingSpaceApplyInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询车位申请信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getParkingSpaceApplyInfo(Map info) throws DAOException {
+        logger.debug("查询 getParkingSpaceApplyInfo 入参 info : {}",info);
+
+        List<Map> businessParkingSpaceApplyInfos = sqlSessionTemplate.selectList("parkingSpaceApplyV1ServiceDaoImpl.getParkingSpaceApplyInfo",info);
+
+        return businessParkingSpaceApplyInfos;
+    }
+
+
+    /**
+     * 修改车位申请信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateParkingSpaceApplyInfo(Map info) throws DAOException {
+        logger.debug("修改 updateParkingSpaceApplyInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("parkingSpaceApplyV1ServiceDaoImpl.updateParkingSpaceApplyInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询车位申请数量
+     * @param info 车位申请信息
+     * @return 车位申请数量
+     */
+    @Override
+    public int queryParkingSpaceApplysCount(Map info) {
+        logger.debug("查询 queryParkingSpaceApplysCount 入参 info : {}",info);
+
+        List<Map> businessParkingSpaceApplyInfos = sqlSessionTemplate.selectList("parkingSpaceApplyV1ServiceDaoImpl.queryParkingSpaceApplysCount", info);
+        if (businessParkingSpaceApplyInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessParkingSpaceApplyInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-community/src/main/java/com/java110/community/smo/impl/ParkingSpaceApplyV1InnerServiceSMOImpl.java

@@ -0,0 +1,89 @@
+/*
+ * 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.smo.impl;
+
+
+import com.java110.community.dao.IParkingSpaceApplyV1ServiceDao;
+import com.java110.intf.community.IParkingSpaceApplyV1InnerServiceSMO;
+import com.java110.dto.parkingSpaceApply.ParkingSpaceApplyDto;
+import com.java110.po.parkingSpaceApply.ParkingSpaceApplyPo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2021-10-18 13:00:02 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行
+ */
+@RestController
+public class ParkingSpaceApplyV1InnerServiceSMOImpl extends BaseServiceSMO implements IParkingSpaceApplyV1InnerServiceSMO {
+
+    @Autowired
+    private IParkingSpaceApplyV1ServiceDao parkingSpaceApplyV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveParkingSpaceApply(@RequestBody  ParkingSpaceApplyPo parkingSpaceApplyPo) {
+        int saveFlag = parkingSpaceApplyV1ServiceDaoImpl.saveParkingSpaceApplyInfo(BeanConvertUtil.beanCovertMap(parkingSpaceApplyPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateParkingSpaceApply(@RequestBody  ParkingSpaceApplyPo parkingSpaceApplyPo) {
+        int saveFlag = parkingSpaceApplyV1ServiceDaoImpl.updateParkingSpaceApplyInfo(BeanConvertUtil.beanCovertMap(parkingSpaceApplyPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteParkingSpaceApply(@RequestBody  ParkingSpaceApplyPo parkingSpaceApplyPo) {
+       parkingSpaceApplyPo.setStatusCd("1");
+       int saveFlag = parkingSpaceApplyV1ServiceDaoImpl.updateParkingSpaceApplyInfo(BeanConvertUtil.beanCovertMap(parkingSpaceApplyPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<ParkingSpaceApplyDto> queryParkingSpaceApplys(@RequestBody  ParkingSpaceApplyDto parkingSpaceApplyDto) {
+
+        //校验是否传了 分页信息
+
+        int page = parkingSpaceApplyDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            parkingSpaceApplyDto.setPage((page - 1) * parkingSpaceApplyDto.getRow());
+        }
+
+        List<ParkingSpaceApplyDto> parkingSpaceApplys = BeanConvertUtil.covertBeanList(parkingSpaceApplyV1ServiceDaoImpl.getParkingSpaceApplyInfo(BeanConvertUtil.beanCovertMap(parkingSpaceApplyDto)), ParkingSpaceApplyDto.class);
+
+        return parkingSpaceApplys;
+    }
+
+
+    @Override
+    public int queryParkingSpaceApplysCount(@RequestBody ParkingSpaceApplyDto parkingSpaceApplyDto) {
+        return parkingSpaceApplyV1ServiceDaoImpl.queryParkingSpaceApplysCount(BeanConvertUtil.beanCovertMap(parkingSpaceApplyDto));    }
+
+}