Просмотр исходного кода

优惠券赠送车辆表代码 开发完成 暂时未稳定暂时 不要升级

java110 лет назад: 3
Родитель
Сommit
404bbaf4ae

+ 139 - 0
java110-bean/src/main/java/com/java110/dto/parkingCouponCar/ParkingCouponCarDto.java

@@ -0,0 +1,139 @@
+package com.java110.dto.parkingCouponCar;
+
+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 ParkingCouponCarDto extends PageDto implements Serializable {
+
+    private String giveWay;
+private String carNum;
+private String couponShopId;
+private String remark;
+private String couponId;
+private String pccId;
+private String typeCd;
+private String paId;
+private String startTime;
+private String shopId;
+private String state;
+private String endTime;
+private String communityId;
+private String value;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getGiveWay() {
+        return giveWay;
+    }
+public void setGiveWay(String giveWay) {
+        this.giveWay = giveWay;
+    }
+public String getCarNum() {
+        return carNum;
+    }
+public void setCarNum(String carNum) {
+        this.carNum = carNum;
+    }
+public String getCouponShopId() {
+        return couponShopId;
+    }
+public void setCouponShopId(String couponShopId) {
+        this.couponShopId = couponShopId;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getCouponId() {
+        return couponId;
+    }
+public void setCouponId(String couponId) {
+        this.couponId = couponId;
+    }
+public String getPccId() {
+        return pccId;
+    }
+public void setPccId(String pccId) {
+        this.pccId = pccId;
+    }
+public String getTypeCd() {
+        return typeCd;
+    }
+public void setTypeCd(String typeCd) {
+        this.typeCd = typeCd;
+    }
+public String getPaId() {
+        return paId;
+    }
+public void setPaId(String paId) {
+        this.paId = paId;
+    }
+public String getStartTime() {
+        return startTime;
+    }
+public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+public String getShopId() {
+        return shopId;
+    }
+public void setShopId(String shopId) {
+        this.shopId = shopId;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getValue() {
+        return value;
+    }
+public void setValue(String value) {
+        this.value = value;
+    }
+
+
+    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;
+    }
+}

+ 138 - 0
java110-bean/src/main/java/com/java110/po/parkingCouponCar/ParkingCouponCarPo.java

@@ -0,0 +1,138 @@
+/*
+ * 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.parkingCouponCar;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2022-10-12 13:02:09 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 ParkingCouponCarPo implements Serializable {
+
+    private String giveWay;
+private String carNum;
+private String couponShopId;
+private String remark;
+private String statusCd = "0";
+private String couponId;
+private String pccId;
+private String typeCd;
+private String paId;
+private String startTime;
+private String shopId;
+private String state;
+private String endTime;
+private String communityId;
+private String value;
+public String getGiveWay() {
+        return giveWay;
+    }
+public void setGiveWay(String giveWay) {
+        this.giveWay = giveWay;
+    }
+public String getCarNum() {
+        return carNum;
+    }
+public void setCarNum(String carNum) {
+        this.carNum = carNum;
+    }
+public String getCouponShopId() {
+        return couponShopId;
+    }
+public void setCouponShopId(String couponShopId) {
+        this.couponShopId = couponShopId;
+    }
+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 getCouponId() {
+        return couponId;
+    }
+public void setCouponId(String couponId) {
+        this.couponId = couponId;
+    }
+public String getPccId() {
+        return pccId;
+    }
+public void setPccId(String pccId) {
+        this.pccId = pccId;
+    }
+public String getTypeCd() {
+        return typeCd;
+    }
+public void setTypeCd(String typeCd) {
+        this.typeCd = typeCd;
+    }
+public String getPaId() {
+        return paId;
+    }
+public void setPaId(String paId) {
+        this.paId = paId;
+    }
+public String getStartTime() {
+        return startTime;
+    }
+public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+public String getShopId() {
+        return shopId;
+    }
+public void setShopId(String shopId) {
+        this.shopId = shopId;
+    }
+public String getState() {
+        return state;
+    }
+public void setState(String state) {
+        this.state = state;
+    }
+public String getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+public String getValue() {
+        return value;
+    }
+public void setValue(String value) {
+        this.value = value;
+    }
+
+
+
+}

+ 185 - 0
java110-db/src/main/resources/mapper/acct/ParkingCouponCarV1ServiceDaoImplMapper.xml

@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="parkingCouponCarV1ServiceDaoImpl">
+
+
+    <!-- 保存车辆停车卷信息 add by wuxw 2018-07-03 -->
+    <insert id="saveParkingCouponCarInfo" parameterType="Map">
+        insert into parking_coupon_car(
+        give_way,car_num,coupon_shop_id,remark,coupon_id,pcc_id,type_cd,pa_id,start_time,shop_id,state,end_time,community_id,value
+        ) values (
+        #{giveWay},#{carNum},#{couponShopId},#{remark},#{couponId},#{pccId},#{typeCd},#{paId},#{startTime},#{shopId},#{state},#{endTime},#{communityId},#{value}
+        )
+    </insert>
+
+
+    <!-- 查询车辆停车卷信息 add by wuxw 2018-07-03 -->
+    <select id="getParkingCouponCarInfo" parameterType="Map" resultType="Map">
+        select t.give_way,t.give_way giveWay,t.car_num,t.car_num carNum,t.coupon_shop_id,t.coupon_shop_id
+        couponShopId,t.remark,t.status_cd,t.status_cd statusCd,t.coupon_id,t.coupon_id couponId,t.pcc_id,t.pcc_id
+        pccId,t.type_cd,t.type_cd typeCd,t.pa_id,t.pa_id paId,t.start_time,t.start_time startTime,t.shop_id,t.shop_id
+        shopId,t.state,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.value
+        from parking_coupon_car t
+        where 1 =1
+        <if test="giveWay !=null and giveWay != ''">
+            and t.give_way= #{giveWay}
+        </if>
+        <if test="carNum !=null and carNum != ''">
+            and t.car_num= #{carNum}
+        </if>
+        <if test="couponShopId !=null and couponShopId != ''">
+            and t.coupon_shop_id= #{couponShopId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
+        <if test="pccId !=null and pccId != ''">
+            and t.pcc_id= #{pccId}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="paId !=null and paId != ''">
+            and t.pa_id= #{paId}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            and t.end_time= #{endTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
+
+    </select>
+
+
+    <!-- 修改车辆停车卷信息 add by wuxw 2018-07-03 -->
+    <update id="updateParkingCouponCarInfo" parameterType="Map">
+        update parking_coupon_car t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="giveWay !=null and giveWay != ''">
+            , t.give_way= #{giveWay}
+        </if>
+        <if test="carNum !=null and carNum != ''">
+            , t.car_num= #{carNum}
+        </if>
+        <if test="couponShopId !=null and couponShopId != ''">
+            , t.coupon_shop_id= #{couponShopId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            , t.coupon_id= #{couponId}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            , t.type_cd= #{typeCd}
+        </if>
+        <if test="paId !=null and paId != ''">
+            , t.pa_id= #{paId}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            , t.start_time= #{startTime}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            , t.shop_id= #{shopId}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            , t.end_time= #{endTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="value !=null and value != ''">
+            , t.value= #{value}
+        </if>
+        where 1=1
+        <if test="pccId !=null and pccId != ''">
+            and t.pcc_id= #{pccId}
+        </if>
+
+    </update>
+
+    <!-- 查询车辆停车卷数量 add by wuxw 2018-07-03 -->
+    <select id="queryParkingCouponCarsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from parking_coupon_car t
+        where 1 =1
+        <if test="giveWay !=null and giveWay != ''">
+            and t.give_way= #{giveWay}
+        </if>
+        <if test="carNum !=null and carNum != ''">
+            and t.car_num= #{carNum}
+        </if>
+        <if test="couponShopId !=null and couponShopId != ''">
+            and t.coupon_shop_id= #{couponShopId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
+        <if test="pccId !=null and pccId != ''">
+            and t.pcc_id= #{pccId}
+        </if>
+        <if test="typeCd !=null and typeCd != ''">
+            and t.type_cd= #{typeCd}
+        </if>
+        <if test="paId !=null and paId != ''">
+            and t.pa_id= #{paId}
+        </if>
+        <if test="startTime !=null and startTime != ''">
+            and t.start_time= #{startTime}
+        </if>
+        <if test="shopId !=null and shopId != ''">
+            and t.shop_id= #{shopId}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            and t.end_time= #{endTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/acct/IParkingCouponCarV1InnerServiceSMO.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.acct;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.parkingCouponCar.ParkingCouponCarDto;
+import com.java110.po.parkingCouponCar.ParkingCouponCarPo;
+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 2022-10-12 13:02:09 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 = "acct-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/parkingCouponCarV1Api")
+public interface IParkingCouponCarV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveParkingCouponCar", method = RequestMethod.POST)
+    public int saveParkingCouponCar(@RequestBody  ParkingCouponCarPo parkingCouponCarPo);
+
+    @RequestMapping(value = "/updateParkingCouponCar", method = RequestMethod.POST)
+    public int updateParkingCouponCar(@RequestBody  ParkingCouponCarPo parkingCouponCarPo);
+
+    @RequestMapping(value = "/deleteParkingCouponCar", method = RequestMethod.POST)
+    public int deleteParkingCouponCar(@RequestBody  ParkingCouponCarPo parkingCouponCarPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param parkingCouponCarDto 数据对象分享
+     * @return ParkingCouponCarDto 对象数据
+     */
+    @RequestMapping(value = "/queryParkingCouponCars", method = RequestMethod.POST)
+    List<ParkingCouponCarDto> queryParkingCouponCars(@RequestBody ParkingCouponCarDto parkingCouponCarDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param parkingCouponCarDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryParkingCouponCarsCount", method = RequestMethod.POST)
+    int queryParkingCouponCarsCount(@RequestBody ParkingCouponCarDto parkingCouponCarDto);
+}

+ 81 - 0
service-acct/src/main/java/com/java110/acct/cmd/parkingCouponCar/ListParkingCouponCarCmd.java

@@ -0,0 +1,81 @@
+/*
+ * 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.acct.cmd.parkingCouponCar;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.parkingCouponCar.ParkingCouponCarDto;
+import com.java110.intf.acct.IParkingCouponCarV1InnerServiceSMO;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:parkingCouponCar.listParkingCouponCar
+ * 请求路劲:/app/parkingCouponCar.ListParkingCouponCar
+ * add by 吴学文 at 2022-10-12 13:02:09 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 = "parkingCouponCar.listParkingCouponCar")
+public class ListParkingCouponCarCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(ListParkingCouponCarCmd.class);
+    @Autowired
+    private IParkingCouponCarV1InnerServiceSMO parkingCouponCarV1InnerServiceSMOImpl;
+
+    @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 {
+
+        ParkingCouponCarDto parkingCouponCarDto = BeanConvertUtil.covertBean(reqJson, ParkingCouponCarDto.class);
+
+        int count = parkingCouponCarV1InnerServiceSMOImpl.queryParkingCouponCarsCount(parkingCouponCarDto);
+
+        List<ParkingCouponCarDto> parkingCouponCarDtos = null;
+
+        if (count > 0) {
+            parkingCouponCarDtos = parkingCouponCarV1InnerServiceSMOImpl.queryParkingCouponCars(parkingCouponCarDto);
+        } else {
+            parkingCouponCarDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, parkingCouponCarDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 86 - 0
service-acct/src/main/java/com/java110/acct/cmd/parkingCouponCar/SaveParkingCouponCarCmd.java

@@ -0,0 +1,86 @@
+/*
+ * 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.acct.cmd.parkingCouponCar;
+
+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.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.intf.acct.IParkingCouponCarV1InnerServiceSMO;
+import com.java110.po.parkingCouponCar.ParkingCouponCarPo;
+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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * 类表述:保存
+ * 服务编码:parkingCouponCar.saveParkingCouponCar
+ * 请求路劲:/app/parkingCouponCar.SaveParkingCouponCar
+ * add by 吴学文 at 2022-10-12 13:02:09 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 = "parkingCouponCar.saveParkingCouponCar")
+public class SaveParkingCouponCarCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveParkingCouponCarCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IParkingCouponCarV1InnerServiceSMO parkingCouponCarV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "couponId", "请求报文中未包含couponId");
+        Assert.hasKeyAndValue(reqJson, "couponShopId", "请求报文中未包含couponShopId");
+        Assert.hasKeyAndValue(reqJson, "shopId", "请求报文中未包含shopId");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "paId", "请求报文中未包含paId");
+        Assert.hasKeyAndValue(reqJson, "carNum", "请求报文中未包含carNum");
+        Assert.hasKeyAndValue(reqJson, "giveWay", "请求报文中未包含giveWay");
+        Assert.hasKeyAndValue(reqJson, "typeCd", "请求报文中未包含typeCd");
+        Assert.hasKeyAndValue(reqJson, "value", "请求报文中未包含value");
+        Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含state");
+        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
+        Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ParkingCouponCarPo parkingCouponCarPo = BeanConvertUtil.covertBean(reqJson, ParkingCouponCarPo.class);
+        parkingCouponCarPo.setPccId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = parkingCouponCarV1InnerServiceSMOImpl.saveParkingCouponCar(parkingCouponCarPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-acct/src/main/java/com/java110/acct/dao/IParkingCouponCarV1ServiceDao.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.acct.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 2022-10-12 13:02:09 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 IParkingCouponCarV1ServiceDao {
+
+
+    /**
+     * 保存 车辆停车卷信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveParkingCouponCarInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询车辆停车卷信息(instance过程)
+     * 根据bId 查询车辆停车卷信息
+     * @param info bId 信息
+     * @return 车辆停车卷信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getParkingCouponCarInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改车辆停车卷信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateParkingCouponCarInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询车辆停车卷总数
+     *
+     * @param info 车辆停车卷信息
+     * @return 车辆停车卷数量
+     */
+    int queryParkingCouponCarsCount(Map info);
+
+}

+ 112 - 0
service-acct/src/main/java/com/java110/acct/dao/impl/ParkingCouponCarV1ServiceDaoImpl.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.acct.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.acct.dao.IParkingCouponCarV1ServiceDao;
+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 2022-10-12 13:02:09 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("parkingCouponCarV1ServiceDaoImpl")
+public class ParkingCouponCarV1ServiceDaoImpl extends BaseServiceDao implements IParkingCouponCarV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ParkingCouponCarV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存车辆停车卷信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveParkingCouponCarInfo(Map info) throws DAOException {
+        logger.debug("保存 saveParkingCouponCarInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("parkingCouponCarV1ServiceDaoImpl.saveParkingCouponCarInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询车辆停车卷信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getParkingCouponCarInfo(Map info) throws DAOException {
+        logger.debug("查询 getParkingCouponCarInfo 入参 info : {}",info);
+
+        List<Map> businessParkingCouponCarInfos = sqlSessionTemplate.selectList("parkingCouponCarV1ServiceDaoImpl.getParkingCouponCarInfo",info);
+
+        return businessParkingCouponCarInfos;
+    }
+
+
+    /**
+     * 修改车辆停车卷信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateParkingCouponCarInfo(Map info) throws DAOException {
+        logger.debug("修改 updateParkingCouponCarInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("parkingCouponCarV1ServiceDaoImpl.updateParkingCouponCarInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询车辆停车卷数量
+     * @param info 车辆停车卷信息
+     * @return 车辆停车卷数量
+     */
+    @Override
+    public int queryParkingCouponCarsCount(Map info) {
+        logger.debug("查询 queryParkingCouponCarsCount 入参 info : {}",info);
+
+        List<Map> businessParkingCouponCarInfos = sqlSessionTemplate.selectList("parkingCouponCarV1ServiceDaoImpl.queryParkingCouponCarsCount", info);
+        if (businessParkingCouponCarInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessParkingCouponCarInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-acct/src/main/java/com/java110/acct/smo/impl/ParkingCouponCarV1InnerServiceSMOImpl.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.acct.smo.impl;
+
+
+import com.java110.acct.dao.IParkingCouponCarV1ServiceDao;
+import com.java110.intf.acct.IParkingCouponCarV1InnerServiceSMO;
+import com.java110.dto.parkingCouponCar.ParkingCouponCarDto;
+import com.java110.po.parkingCouponCar.ParkingCouponCarPo;
+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 2022-10-12 13:02:09 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 ParkingCouponCarV1InnerServiceSMOImpl extends BaseServiceSMO implements IParkingCouponCarV1InnerServiceSMO {
+
+    @Autowired
+    private IParkingCouponCarV1ServiceDao parkingCouponCarV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveParkingCouponCar(@RequestBody  ParkingCouponCarPo parkingCouponCarPo) {
+        int saveFlag = parkingCouponCarV1ServiceDaoImpl.saveParkingCouponCarInfo(BeanConvertUtil.beanCovertMap(parkingCouponCarPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateParkingCouponCar(@RequestBody  ParkingCouponCarPo parkingCouponCarPo) {
+        int saveFlag = parkingCouponCarV1ServiceDaoImpl.updateParkingCouponCarInfo(BeanConvertUtil.beanCovertMap(parkingCouponCarPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteParkingCouponCar(@RequestBody  ParkingCouponCarPo parkingCouponCarPo) {
+       parkingCouponCarPo.setStatusCd("1");
+       int saveFlag = parkingCouponCarV1ServiceDaoImpl.updateParkingCouponCarInfo(BeanConvertUtil.beanCovertMap(parkingCouponCarPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<ParkingCouponCarDto> queryParkingCouponCars(@RequestBody  ParkingCouponCarDto parkingCouponCarDto) {
+
+        //校验是否传了 分页信息
+
+        int page = parkingCouponCarDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            parkingCouponCarDto.setPage((page - 1) * parkingCouponCarDto.getRow());
+        }
+
+        List<ParkingCouponCarDto> parkingCouponCars = BeanConvertUtil.covertBeanList(parkingCouponCarV1ServiceDaoImpl.getParkingCouponCarInfo(BeanConvertUtil.beanCovertMap(parkingCouponCarDto)), ParkingCouponCarDto.class);
+
+        return parkingCouponCars;
+    }
+
+
+    @Override
+    public int queryParkingCouponCarsCount(@RequestBody ParkingCouponCarDto parkingCouponCarDto) {
+        return parkingCouponCarV1ServiceDaoImpl.queryParkingCouponCarsCount(BeanConvertUtil.beanCovertMap(parkingCouponCarDto));    }
+
+}