Browse Source

商家停车卷功能 开发代码暂存,暂时 可能有问题 不建议代码更新

java110 3 years ago
parent
commit
fcf3c79c0d

+ 118 - 0
java110-bean/src/main/java/com/java110/dto/parkingCouponShop/ParkingCouponShopDto.java

@@ -0,0 +1,118 @@
+package com.java110.dto.parkingCouponShop;
+
+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 ParkingCouponShopDto extends PageDto implements Serializable {
+
+    private String quantity;
+private String paName;
+private String paId;
+private String shopName;
+private String couponShopId;
+private String communityName;
+private String startTime;
+private String shopId;
+private String endTime;
+private String couponId;
+private String communityId;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getQuantity() {
+        return quantity;
+    }
+public void setQuantity(String quantity) {
+        this.quantity = quantity;
+    }
+public String getPaName() {
+        return paName;
+    }
+public void setPaName(String paName) {
+        this.paName = paName;
+    }
+public String getPaId() {
+        return paId;
+    }
+public void setPaId(String paId) {
+        this.paId = paId;
+    }
+public String getShopName() {
+        return shopName;
+    }
+public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+public String getCouponShopId() {
+        return couponShopId;
+    }
+public void setCouponShopId(String couponShopId) {
+        this.couponShopId = couponShopId;
+    }
+public String getCommunityName() {
+        return communityName;
+    }
+public void setCommunityName(String communityName) {
+        this.communityName = communityName;
+    }
+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 getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+public String getCouponId() {
+        return couponId;
+    }
+public void setCouponId(String couponId) {
+        this.couponId = couponId;
+    }
+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;
+    }
+}

+ 117 - 0
java110-bean/src/main/java/com/java110/po/parkingCouponShop/ParkingCouponShopPo.java

@@ -0,0 +1,117 @@
+/*
+ * 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.parkingCouponShop;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2022-10-10 16:43:42 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 ParkingCouponShopPo implements Serializable {
+
+    private String quantity;
+private String paName;
+private String paId;
+private String shopName;
+private String couponShopId;
+private String communityName;
+private String startTime;
+private String statusCd = "0";
+private String shopId;
+private String endTime;
+private String couponId;
+private String communityId;
+public String getQuantity() {
+        return quantity;
+    }
+public void setQuantity(String quantity) {
+        this.quantity = quantity;
+    }
+public String getPaName() {
+        return paName;
+    }
+public void setPaName(String paName) {
+        this.paName = paName;
+    }
+public String getPaId() {
+        return paId;
+    }
+public void setPaId(String paId) {
+        this.paId = paId;
+    }
+public String getShopName() {
+        return shopName;
+    }
+public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+public String getCouponShopId() {
+        return couponShopId;
+    }
+public void setCouponShopId(String couponShopId) {
+        this.couponShopId = couponShopId;
+    }
+public String getCommunityName() {
+        return communityName;
+    }
+public void setCommunityName(String communityName) {
+        this.communityName = communityName;
+    }
+public String getStartTime() {
+        return startTime;
+    }
+public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getShopId() {
+        return shopId;
+    }
+public void setShopId(String shopId) {
+        this.shopId = shopId;
+    }
+public String getEndTime() {
+        return endTime;
+    }
+public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+public String getCouponId() {
+        return couponId;
+    }
+public void setCouponId(String couponId) {
+        this.couponId = couponId;
+    }
+public String getCommunityId() {
+        return communityId;
+    }
+public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
+
+
+
+}

+ 160 - 0
java110-db/src/main/resources/mapper/acct/ParkingCouponShopV1ServiceDaoImplMapper.xml

@@ -0,0 +1,160 @@
+<?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="parkingCouponShopV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存商家停车卷信息 add by wuxw 2018-07-03 -->
+    <insert id="saveParkingCouponShopInfo" parameterType="Map">
+        insert into parking_coupon_shop(
+quantity,pa_name,pa_id,shop_name,coupon_shop_id,community_name,start_time,shop_id,end_time,coupon_id,community_id
+) values (
+#{quantity},#{paName},#{paId},#{shopName},#{couponShopId},#{communityName},#{startTime},#{shopId},#{endTime},#{couponId},#{communityId}
+)
+    </insert>
+
+
+
+    <!-- 查询商家停车卷信息 add by wuxw 2018-07-03 -->
+    <select id="getParkingCouponShopInfo" parameterType="Map" resultType="Map">
+        select  t.quantity,t.pa_name,t.pa_name paName,t.pa_id,t.pa_id paId,t.shop_name,t.shop_name shopName,t.coupon_shop_id,t.coupon_shop_id couponShopId,t.community_name,t.community_name communityName,t.start_time,t.start_time startTime,t.status_cd,t.status_cd statusCd,t.shop_id,t.shop_id shopId,t.end_time,t.end_time endTime,t.coupon_id,t.coupon_id couponId,t.community_id,t.community_id communityId 
+from parking_coupon_shop t 
+where 1 =1 
+<if test="quantity !=null and quantity != ''">
+   and t.quantity= #{quantity}
+</if> 
+<if test="paName !=null and paName != ''">
+   and t.pa_name= #{paName}
+</if> 
+<if test="paId !=null and paId != ''">
+   and t.pa_id= #{paId}
+</if> 
+<if test="shopName !=null and shopName != ''">
+   and t.shop_name= #{shopName}
+</if> 
+<if test="couponShopId !=null and couponShopId != ''">
+   and t.coupon_shop_id= #{couponShopId}
+</if> 
+<if test="communityName !=null and communityName != ''">
+   and t.community_name= #{communityName}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="shopId !=null and shopId != ''">
+   and t.shop_id= #{shopId}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="couponId !=null and couponId != ''">
+   and t.coupon_id= #{couponId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</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="updateParkingCouponShopInfo" parameterType="Map">
+        update  parking_coupon_shop t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="quantity !=null and quantity != ''">
+, t.quantity= #{quantity}
+</if> 
+<if test="paName !=null and paName != ''">
+, t.pa_name= #{paName}
+</if> 
+<if test="paId !=null and paId != ''">
+, t.pa_id= #{paId}
+</if> 
+<if test="shopName !=null and shopName != ''">
+, t.shop_name= #{shopName}
+</if> 
+<if test="communityName !=null and communityName != ''">
+, t.community_name= #{communityName}
+</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="endTime !=null and endTime != ''">
+, t.end_time= #{endTime}
+</if> 
+<if test="couponId !=null and couponId != ''">
+, t.coupon_id= #{couponId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+, t.community_id= #{communityId}
+</if> 
+ where 1=1 <if test="couponShopId !=null and couponShopId != ''">
+and t.coupon_shop_id= #{couponShopId}
+</if> 
+
+    </update>
+
+    <!-- 查询商家停车卷数量 add by wuxw 2018-07-03 -->
+     <select id="queryParkingCouponShopsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from parking_coupon_shop t 
+where 1 =1 
+<if test="quantity !=null and quantity != ''">
+   and t.quantity= #{quantity}
+</if> 
+<if test="paName !=null and paName != ''">
+   and t.pa_name= #{paName}
+</if> 
+<if test="paId !=null and paId != ''">
+   and t.pa_id= #{paId}
+</if> 
+<if test="shopName !=null and shopName != ''">
+   and t.shop_name= #{shopName}
+</if> 
+<if test="couponShopId !=null and couponShopId != ''">
+   and t.coupon_shop_id= #{couponShopId}
+</if> 
+<if test="communityName !=null and communityName != ''">
+   and t.community_name= #{communityName}
+</if> 
+<if test="startTime !=null and startTime != ''">
+   and t.start_time= #{startTime}
+</if> 
+<if test="statusCd !=null and statusCd != ''">
+   and t.status_cd= #{statusCd}
+</if> 
+<if test="shopId !=null and shopId != ''">
+   and t.shop_id= #{shopId}
+</if> 
+<if test="endTime !=null and endTime != ''">
+   and t.end_time= #{endTime}
+</if> 
+<if test="couponId !=null and couponId != ''">
+   and t.coupon_id= #{couponId}
+</if> 
+<if test="communityId !=null and communityId != ''">
+   and t.community_id= #{communityId}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/acct/IParkingCouponShopV1InnerServiceSMO.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.parkingCouponShop.ParkingCouponShopDto;
+import com.java110.po.parkingCouponShop.ParkingCouponShopPo;
+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-10 16:43:42 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("/parkingCouponShopV1Api")
+public interface IParkingCouponShopV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveParkingCouponShop", method = RequestMethod.POST)
+    public int saveParkingCouponShop(@RequestBody  ParkingCouponShopPo parkingCouponShopPo);
+
+    @RequestMapping(value = "/updateParkingCouponShop", method = RequestMethod.POST)
+    public int updateParkingCouponShop(@RequestBody  ParkingCouponShopPo parkingCouponShopPo);
+
+    @RequestMapping(value = "/deleteParkingCouponShop", method = RequestMethod.POST)
+    public int deleteParkingCouponShop(@RequestBody  ParkingCouponShopPo parkingCouponShopPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param parkingCouponShopDto 数据对象分享
+     * @return ParkingCouponShopDto 对象数据
+     */
+    @RequestMapping(value = "/queryParkingCouponShops", method = RequestMethod.POST)
+    List<ParkingCouponShopDto> queryParkingCouponShops(@RequestBody ParkingCouponShopDto parkingCouponShopDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param parkingCouponShopDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryParkingCouponShopsCount", method = RequestMethod.POST)
+    int queryParkingCouponShopsCount(@RequestBody ParkingCouponShopDto parkingCouponShopDto);
+}

+ 71 - 0
service-acct/src/main/java/com/java110/acct/cmd/parkingCouponShop/DeleteParkingCouponShopCmd.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.acct.cmd.parkingCouponShop;
+
+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.intf.acct.IParkingCouponShopV1InnerServiceSMO;
+import com.java110.po.parkingCouponShop.ParkingCouponShopPo;
+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;
+
+/**
+ * 类表述:删除
+ * 服务编码:parkingCouponShop.deleteParkingCouponShop
+ * 请求路劲:/app/parkingCouponShop.DeleteParkingCouponShop
+ * add by 吴学文 at 2022-10-10 16:43:42 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 = "parkingCouponShop.deleteParkingCouponShop")
+public class DeleteParkingCouponShopCmd extends Cmd {
+    private static Logger logger = LoggerFactory.getLogger(DeleteParkingCouponShopCmd.class);
+
+    @Autowired
+    private IParkingCouponShopV1InnerServiceSMO parkingCouponShopV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "couponShopId", "couponShopId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ParkingCouponShopPo parkingCouponShopPo = BeanConvertUtil.covertBean(reqJson, ParkingCouponShopPo.class);
+        int flag = parkingCouponShopV1InnerServiceSMOImpl.deleteParkingCouponShop(parkingCouponShopPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 81 - 0
service-acct/src/main/java/com/java110/acct/cmd/parkingCouponShop/ListParkingCouponShopCmd.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.parkingCouponShop;
+
+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.parkingCouponShop.ParkingCouponShopDto;
+import com.java110.intf.acct.IParkingCouponShopV1InnerServiceSMO;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:parkingCouponShop.listParkingCouponShop
+ * 请求路劲:/app/parkingCouponShop.ListParkingCouponShop
+ * add by 吴学文 at 2022-10-10 16:43:42 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 = "parkingCouponShop.listParkingCouponShop")
+public class ListParkingCouponShopCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(ListParkingCouponShopCmd.class);
+    @Autowired
+    private IParkingCouponShopV1InnerServiceSMO parkingCouponShopV1InnerServiceSMOImpl;
+
+    @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 {
+
+        ParkingCouponShopDto parkingCouponShopDto = BeanConvertUtil.covertBean(reqJson, ParkingCouponShopDto.class);
+
+        int count = parkingCouponShopV1InnerServiceSMOImpl.queryParkingCouponShopsCount(parkingCouponShopDto);
+
+        List<ParkingCouponShopDto> parkingCouponShopDtos = null;
+
+        if (count > 0) {
+            parkingCouponShopDtos = parkingCouponShopV1InnerServiceSMOImpl.queryParkingCouponShops(parkingCouponShopDto);
+        } else {
+            parkingCouponShopDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, parkingCouponShopDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 84 - 0
service-acct/src/main/java/com/java110/acct/cmd/parkingCouponShop/SaveParkingCouponShopCmd.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.acct.cmd.parkingCouponShop;
+
+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.IParkingCouponShopV1InnerServiceSMO;
+import com.java110.po.parkingCouponShop.ParkingCouponShopPo;
+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;
+
+/**
+ * 类表述:保存
+ * 服务编码:parkingCouponShop.saveParkingCouponShop
+ * 请求路劲:/app/parkingCouponShop.SaveParkingCouponShop
+ * add by 吴学文 at 2022-10-10 16:43:42 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 = "parkingCouponShop.saveParkingCouponShop")
+public class SaveParkingCouponShopCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveParkingCouponShopCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IParkingCouponShopV1InnerServiceSMO parkingCouponShopV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "couponId", "请求报文中未包含couponId");
+        Assert.hasKeyAndValue(reqJson, "shopId", "请求报文中未包含shopId");
+        Assert.hasKeyAndValue(reqJson, "shopName", "请求报文中未包含shopName");
+        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+        Assert.hasKeyAndValue(reqJson, "communityName", "请求报文中未包含communityName");
+        Assert.hasKeyAndValue(reqJson, "paId", "请求报文中未包含paId");
+        Assert.hasKeyAndValue(reqJson, "quantity", "请求报文中未包含quantity");
+        Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含startTime");
+        Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含endTime");
+        Assert.hasKeyAndValue(reqJson, "paName", "请求报文中未包含paName");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ParkingCouponShopPo parkingCouponShopPo = BeanConvertUtil.covertBean(reqJson, ParkingCouponShopPo.class);
+        parkingCouponShopPo.setCouponShopId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = parkingCouponShopV1InnerServiceSMOImpl.saveParkingCouponShop(parkingCouponShopPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 74 - 0
service-acct/src/main/java/com/java110/acct/cmd/parkingCouponShop/UpdateParkingCouponShopCmd.java

@@ -0,0 +1,74 @@
+/*
+ * 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.parkingCouponShop;
+
+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.intf.acct.IParkingCouponShopV1InnerServiceSMO;
+import com.java110.po.parkingCouponShop.ParkingCouponShopPo;
+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;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:parkingCouponShop.updateParkingCouponShop
+ * 请求路劲:/app/parkingCouponShop.UpdateParkingCouponShop
+ * add by 吴学文 at 2022-10-10 16:43:42 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 = "parkingCouponShop.updateParkingCouponShop")
+public class UpdateParkingCouponShopCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(UpdateParkingCouponShopCmd.class);
+
+
+    @Autowired
+    private IParkingCouponShopV1InnerServiceSMO parkingCouponShopV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "couponShopId", "couponShopId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        ParkingCouponShopPo parkingCouponShopPo = BeanConvertUtil.covertBean(reqJson, ParkingCouponShopPo.class);
+        int flag = parkingCouponShopV1InnerServiceSMOImpl.updateParkingCouponShop(parkingCouponShopPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-acct/src/main/java/com/java110/acct/dao/IParkingCouponShopV1ServiceDao.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-10 16:43:42 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 IParkingCouponShopV1ServiceDao {
+
+
+    /**
+     * 保存 商家停车卷信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveParkingCouponShopInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询商家停车卷信息(instance过程)
+     * 根据bId 查询商家停车卷信息
+     * @param info bId 信息
+     * @return 商家停车卷信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getParkingCouponShopInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改商家停车卷信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateParkingCouponShopInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询商家停车卷总数
+     *
+     * @param info 商家停车卷信息
+     * @return 商家停车卷数量
+     */
+    int queryParkingCouponShopsCount(Map info);
+
+}

+ 112 - 0
service-acct/src/main/java/com/java110/acct/dao/impl/ParkingCouponShopV1ServiceDaoImpl.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.IParkingCouponShopV1ServiceDao;
+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-10 16:43:42 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("parkingCouponShopV1ServiceDaoImpl")
+public class ParkingCouponShopV1ServiceDaoImpl extends BaseServiceDao implements IParkingCouponShopV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ParkingCouponShopV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存商家停车卷信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveParkingCouponShopInfo(Map info) throws DAOException {
+        logger.debug("保存 saveParkingCouponShopInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("parkingCouponShopV1ServiceDaoImpl.saveParkingCouponShopInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询商家停车卷信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getParkingCouponShopInfo(Map info) throws DAOException {
+        logger.debug("查询 getParkingCouponShopInfo 入参 info : {}",info);
+
+        List<Map> businessParkingCouponShopInfos = sqlSessionTemplate.selectList("parkingCouponShopV1ServiceDaoImpl.getParkingCouponShopInfo",info);
+
+        return businessParkingCouponShopInfos;
+    }
+
+
+    /**
+     * 修改商家停车卷信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateParkingCouponShopInfo(Map info) throws DAOException {
+        logger.debug("修改 updateParkingCouponShopInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("parkingCouponShopV1ServiceDaoImpl.updateParkingCouponShopInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询商家停车卷数量
+     * @param info 商家停车卷信息
+     * @return 商家停车卷数量
+     */
+    @Override
+    public int queryParkingCouponShopsCount(Map info) {
+        logger.debug("查询 queryParkingCouponShopsCount 入参 info : {}",info);
+
+        List<Map> businessParkingCouponShopInfos = sqlSessionTemplate.selectList("parkingCouponShopV1ServiceDaoImpl.queryParkingCouponShopsCount", info);
+        if (businessParkingCouponShopInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessParkingCouponShopInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-acct/src/main/java/com/java110/acct/smo/impl/ParkingCouponShopV1InnerServiceSMOImpl.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.IParkingCouponShopV1ServiceDao;
+import com.java110.intf.acct.IParkingCouponShopV1InnerServiceSMO;
+import com.java110.dto.parkingCouponShop.ParkingCouponShopDto;
+import com.java110.po.parkingCouponShop.ParkingCouponShopPo;
+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-10 16:43:42 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 ParkingCouponShopV1InnerServiceSMOImpl extends BaseServiceSMO implements IParkingCouponShopV1InnerServiceSMO {
+
+    @Autowired
+    private IParkingCouponShopV1ServiceDao parkingCouponShopV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveParkingCouponShop(@RequestBody  ParkingCouponShopPo parkingCouponShopPo) {
+        int saveFlag = parkingCouponShopV1ServiceDaoImpl.saveParkingCouponShopInfo(BeanConvertUtil.beanCovertMap(parkingCouponShopPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateParkingCouponShop(@RequestBody  ParkingCouponShopPo parkingCouponShopPo) {
+        int saveFlag = parkingCouponShopV1ServiceDaoImpl.updateParkingCouponShopInfo(BeanConvertUtil.beanCovertMap(parkingCouponShopPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteParkingCouponShop(@RequestBody  ParkingCouponShopPo parkingCouponShopPo) {
+       parkingCouponShopPo.setStatusCd("1");
+       int saveFlag = parkingCouponShopV1ServiceDaoImpl.updateParkingCouponShopInfo(BeanConvertUtil.beanCovertMap(parkingCouponShopPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<ParkingCouponShopDto> queryParkingCouponShops(@RequestBody  ParkingCouponShopDto parkingCouponShopDto) {
+
+        //校验是否传了 分页信息
+
+        int page = parkingCouponShopDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            parkingCouponShopDto.setPage((page - 1) * parkingCouponShopDto.getRow());
+        }
+
+        List<ParkingCouponShopDto> parkingCouponShops = BeanConvertUtil.covertBeanList(parkingCouponShopV1ServiceDaoImpl.getParkingCouponShopInfo(BeanConvertUtil.beanCovertMap(parkingCouponShopDto)), ParkingCouponShopDto.class);
+
+        return parkingCouponShops;
+    }
+
+
+    @Override
+    public int queryParkingCouponShopsCount(@RequestBody ParkingCouponShopDto parkingCouponShopDto) {
+        return parkingCouponShopV1ServiceDaoImpl.queryParkingCouponShopsCount(BeanConvertUtil.beanCovertMap(parkingCouponShopDto));    }
+
+}