Explorar el Código

加入供应商 优惠券购买记录 功能

wuxw hace 3 años
padre
commit
e59c2dab49

+ 139 - 0
java110-bean/src/main/java/com/java110/dto/supplierCouponBuy/SupplierCouponBuyDto.java

@@ -0,0 +1,139 @@
+package com.java110.dto.supplierCouponBuy;
+
+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 SupplierCouponBuyDto extends PageDto implements Serializable {
+
+    private String createUserId;
+private String supplierId;
+private String quantity;
+private String createUserName;
+private String remark;
+private String objName;
+private String couponId;
+private String storeId;
+private String valuePrice;
+private String createUserTel;
+private String name;
+private String objId;
+private String buyId;
+private String storeName;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getCreateUserId() {
+        return createUserId;
+    }
+public void setCreateUserId(String createUserId) {
+        this.createUserId = createUserId;
+    }
+public String getSupplierId() {
+        return supplierId;
+    }
+public void setSupplierId(String supplierId) {
+        this.supplierId = supplierId;
+    }
+public String getQuantity() {
+        return quantity;
+    }
+public void setQuantity(String quantity) {
+        this.quantity = quantity;
+    }
+public String getCreateUserName() {
+        return createUserName;
+    }
+public void setCreateUserName(String createUserName) {
+        this.createUserName = createUserName;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getObjName() {
+        return objName;
+    }
+public void setObjName(String objName) {
+        this.objName = objName;
+    }
+public String getCouponId() {
+        return couponId;
+    }
+public void setCouponId(String couponId) {
+        this.couponId = couponId;
+    }
+public String getStoreId() {
+        return storeId;
+    }
+public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+public String getValuePrice() {
+        return valuePrice;
+    }
+public void setValuePrice(String valuePrice) {
+        this.valuePrice = valuePrice;
+    }
+public String getCreateUserTel() {
+        return createUserTel;
+    }
+public void setCreateUserTel(String createUserTel) {
+        this.createUserTel = createUserTel;
+    }
+public String getName() {
+        return name;
+    }
+public void setName(String name) {
+        this.name = name;
+    }
+public String getObjId() {
+        return objId;
+    }
+public void setObjId(String objId) {
+        this.objId = objId;
+    }
+public String getBuyId() {
+        return buyId;
+    }
+public void setBuyId(String buyId) {
+        this.buyId = buyId;
+    }
+public String getStoreName() {
+        return storeName;
+    }
+public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
+
+
+    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/supplierCouponBuy/SupplierCouponBuyPo.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.supplierCouponBuy;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2022-11-17 21:39:00 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 SupplierCouponBuyPo implements Serializable {
+
+    private String createUserId;
+private String supplierId;
+private String quantity;
+private String createUserName;
+private String statusCd = "0";
+private String remark;
+private String objName;
+private String couponId;
+private String storeId;
+private String valuePrice;
+private String createUserTel;
+private String name;
+private String objId;
+private String buyId;
+private String storeName;
+public String getCreateUserId() {
+        return createUserId;
+    }
+public void setCreateUserId(String createUserId) {
+        this.createUserId = createUserId;
+    }
+public String getSupplierId() {
+        return supplierId;
+    }
+public void setSupplierId(String supplierId) {
+        this.supplierId = supplierId;
+    }
+public String getQuantity() {
+        return quantity;
+    }
+public void setQuantity(String quantity) {
+        this.quantity = quantity;
+    }
+public String getCreateUserName() {
+        return createUserName;
+    }
+public void setCreateUserName(String createUserName) {
+        this.createUserName = createUserName;
+    }
+public String getStatusCd() {
+        return statusCd;
+    }
+public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+public String getRemark() {
+        return remark;
+    }
+public void setRemark(String remark) {
+        this.remark = remark;
+    }
+public String getObjName() {
+        return objName;
+    }
+public void setObjName(String objName) {
+        this.objName = objName;
+    }
+public String getCouponId() {
+        return couponId;
+    }
+public void setCouponId(String couponId) {
+        this.couponId = couponId;
+    }
+public String getStoreId() {
+        return storeId;
+    }
+public void setStoreId(String storeId) {
+        this.storeId = storeId;
+    }
+public String getValuePrice() {
+        return valuePrice;
+    }
+public void setValuePrice(String valuePrice) {
+        this.valuePrice = valuePrice;
+    }
+public String getCreateUserTel() {
+        return createUserTel;
+    }
+public void setCreateUserTel(String createUserTel) {
+        this.createUserTel = createUserTel;
+    }
+public String getName() {
+        return name;
+    }
+public void setName(String name) {
+        this.name = name;
+    }
+public String getObjId() {
+        return objId;
+    }
+public void setObjId(String objId) {
+        this.objId = objId;
+    }
+public String getBuyId() {
+        return buyId;
+    }
+public void setBuyId(String buyId) {
+        this.buyId = buyId;
+    }
+public String getStoreName() {
+        return storeName;
+    }
+public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
+
+
+
+}

+ 186 - 0
java110-db/src/main/resources/mapper/acct/SupplierCouponBuyV1ServiceDaoImplMapper.xml

@@ -0,0 +1,186 @@
+<?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="supplierCouponBuyV1ServiceDaoImpl">
+
+
+    <!-- 保存优惠购买信息 add by wuxw 2018-07-03 -->
+    <insert id="saveSupplierCouponBuyInfo" parameterType="Map">
+        insert into supplier_coupon_buy(
+        create_user_id,supplier_id,quantity,create_user_name,remark,obj_name,coupon_id,store_id,value_price,create_user_tel,name,obj_id,buy_id,store_name
+        ) values (
+        #{createUserId},#{supplierId},#{quantity},#{createUserName},#{remark},#{objName},#{couponId},#{storeId},#{valuePrice},#{createUserTel},#{name},#{objId},#{buyId},#{storeName}
+        )
+    </insert>
+
+
+    <!-- 查询优惠购买信息 add by wuxw 2018-07-03 -->
+    <select id="getSupplierCouponBuyInfo" parameterType="Map" resultType="Map">
+        select t.create_user_id,t.create_user_id createUserId,t.supplier_id,t.supplier_id
+        supplierId,t.quantity,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd
+        statusCd,t.remark,t.obj_name,t.obj_name objName,t.coupon_id,t.coupon_id couponId,t.store_id,t.store_id
+        storeId,t.value_price,t.value_price valuePrice,t.create_user_tel,t.create_user_tel
+        createUserTel,t.name,t.obj_id,t.obj_id objId,t.buy_id,t.buy_id buyId,t.store_name,t.store_name storeName
+        from supplier_coupon_buy t
+        where 1 =1
+        <if test="createUserId !=null and createUserId != ''">
+            and t.create_user_id= #{createUserId}
+        </if>
+        <if test="supplierId !=null and supplierId != ''">
+            and t.supplier_id= #{supplierId}
+        </if>
+        <if test="quantity !=null and quantity != ''">
+            and t.quantity= #{quantity}
+        </if>
+        <if test="createUserName !=null and createUserName != ''">
+            and t.create_user_name= #{createUserName}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="objName !=null and objName != ''">
+            and t.obj_name= #{objName}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
+        <if test="valuePrice !=null and valuePrice != ''">
+            and t.value_price= #{valuePrice}
+        </if>
+        <if test="createUserTel !=null and createUserTel != ''">
+            and t.create_user_tel= #{createUserTel}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="buyId !=null and buyId != ''">
+            and t.buy_id= #{buyId}
+        </if>
+        <if test="storeName !=null and storeName != ''">
+            and t.store_name= #{storeName}
+        </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="updateSupplierCouponBuyInfo" parameterType="Map">
+        update supplier_coupon_buy t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="createUserId !=null and createUserId != ''">
+            , t.create_user_id= #{createUserId}
+        </if>
+        <if test="supplierId !=null and supplierId != ''">
+            , t.supplier_id= #{supplierId}
+        </if>
+        <if test="quantity !=null and quantity != ''">
+            , t.quantity= #{quantity}
+        </if>
+        <if test="createUserName !=null and createUserName != ''">
+            , t.create_user_name= #{createUserName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="objName !=null and objName != ''">
+            , t.obj_name= #{objName}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            , t.coupon_id= #{couponId}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            , t.store_id= #{storeId}
+        </if>
+        <if test="valuePrice !=null and valuePrice != ''">
+            , t.value_price= #{valuePrice}
+        </if>
+        <if test="createUserTel !=null and createUserTel != ''">
+            , t.create_user_tel= #{createUserTel}
+        </if>
+        <if test="name !=null and name != ''">
+            , t.name= #{name}
+        </if>
+        <if test="objId !=null and objId != ''">
+            , t.obj_id= #{objId}
+        </if>
+        <if test="storeName !=null and storeName != ''">
+            , t.store_name= #{storeName}
+        </if>
+        where 1=1
+        <if test="buyId !=null and buyId != ''">
+            and t.buy_id= #{buyId}
+        </if>
+
+    </update>
+
+    <!-- 查询优惠购买数量 add by wuxw 2018-07-03 -->
+    <select id="querySupplierCouponBuysCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from supplier_coupon_buy t
+        where 1 =1
+        <if test="createUserId !=null and createUserId != ''">
+            and t.create_user_id= #{createUserId}
+        </if>
+        <if test="supplierId !=null and supplierId != ''">
+            and t.supplier_id= #{supplierId}
+        </if>
+        <if test="quantity !=null and quantity != ''">
+            and t.quantity= #{quantity}
+        </if>
+        <if test="createUserName !=null and createUserName != ''">
+            and t.create_user_name= #{createUserName}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="objName !=null and objName != ''">
+            and t.obj_name= #{objName}
+        </if>
+        <if test="couponId !=null and couponId != ''">
+            and t.coupon_id= #{couponId}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
+        <if test="valuePrice !=null and valuePrice != ''">
+            and t.value_price= #{valuePrice}
+        </if>
+        <if test="createUserTel !=null and createUserTel != ''">
+            and t.create_user_tel= #{createUserTel}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="buyId !=null and buyId != ''">
+            and t.buy_id= #{buyId}
+        </if>
+        <if test="storeName !=null and storeName != ''">
+            and t.store_name= #{storeName}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/acct/ISupplierCouponBuyV1InnerServiceSMO.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.supplierCouponBuy.SupplierCouponBuyDto;
+import com.java110.po.supplierCouponBuy.SupplierCouponBuyPo;
+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-11-17 21:39:00 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("/supplierCouponBuyV1Api")
+public interface ISupplierCouponBuyV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveSupplierCouponBuy", method = RequestMethod.POST)
+    public int saveSupplierCouponBuy(@RequestBody SupplierCouponBuyPo supplierCouponBuyPo);
+
+    @RequestMapping(value = "/updateSupplierCouponBuy", method = RequestMethod.POST)
+    public int updateSupplierCouponBuy(@RequestBody SupplierCouponBuyPo supplierCouponBuyPo);
+
+    @RequestMapping(value = "/deleteSupplierCouponBuy", method = RequestMethod.POST)
+    public int deleteSupplierCouponBuy(@RequestBody SupplierCouponBuyPo supplierCouponBuyPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param supplierCouponBuyDto 数据对象分享
+     * @return SupplierCouponBuyDto 对象数据
+     */
+    @RequestMapping(value = "/querySupplierCouponBuys", method = RequestMethod.POST)
+    List<SupplierCouponBuyDto> querySupplierCouponBuys(@RequestBody SupplierCouponBuyDto supplierCouponBuyDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param supplierCouponBuyDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/querySupplierCouponBuysCount", method = RequestMethod.POST)
+    int querySupplierCouponBuysCount(@RequestBody SupplierCouponBuyDto supplierCouponBuyDto);
+}

+ 84 - 0
service-acct/src/main/java/com/java110/acct/cmd/supplierCoupon/ListSupplierCouponBuyCmd.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.supplierCoupon;
+
+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.ISupplierCouponBuyV1InnerServiceSMO;
+import com.java110.po.supplierCouponBuy.SupplierCouponBuyPo;
+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.supplierCouponBuy.SupplierCouponBuyDto;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:supplierCouponBuy.listSupplierCouponBuy
+ * 请求路劲:/app/supplierCouponBuy.ListSupplierCouponBuy
+ * add by 吴学文 at 2022-11-17 21:39:00 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 = "supplierCoupon.listSupplierCouponBuy")
+public class ListSupplierCouponBuyCmd extends Cmd {
+
+  private static Logger logger = LoggerFactory.getLogger(ListSupplierCouponBuyCmd.class);
+    @Autowired
+    private ISupplierCouponBuyV1InnerServiceSMO supplierCouponBuyV1InnerServiceSMOImpl;
+
+    @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 {
+
+           SupplierCouponBuyDto supplierCouponBuyDto = BeanConvertUtil.covertBean(reqJson, SupplierCouponBuyDto.class);
+
+           int count = supplierCouponBuyV1InnerServiceSMOImpl.querySupplierCouponBuysCount(supplierCouponBuyDto);
+
+           List<SupplierCouponBuyDto> supplierCouponBuyDtos = null;
+
+           if (count > 0) {
+               supplierCouponBuyDtos = supplierCouponBuyV1InnerServiceSMOImpl.querySupplierCouponBuys(supplierCouponBuyDto);
+           } else {
+               supplierCouponBuyDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, supplierCouponBuyDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 77 - 0
service-acct/src/main/java/com/java110/acct/dao/ISupplierCouponBuyV1ServiceDao.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-11-17 21:39:00 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 ISupplierCouponBuyV1ServiceDao {
+
+
+    /**
+     * 保存 优惠购买信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveSupplierCouponBuyInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询优惠购买信息(instance过程)
+     * 根据bId 查询优惠购买信息
+     * @param info bId 信息
+     * @return 优惠购买信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getSupplierCouponBuyInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改优惠购买信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateSupplierCouponBuyInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询优惠购买总数
+     *
+     * @param info 优惠购买信息
+     * @return 优惠购买数量
+     */
+    int querySupplierCouponBuysCount(Map info);
+
+}

+ 112 - 0
service-acct/src/main/java/com/java110/acct/dao/impl/SupplierCouponBuyV1ServiceDaoImpl.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.ISupplierCouponBuyV1ServiceDao;
+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-11-17 21:39:00 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("supplierCouponBuyV1ServiceDaoImpl")
+public class SupplierCouponBuyV1ServiceDaoImpl extends BaseServiceDao implements ISupplierCouponBuyV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(SupplierCouponBuyV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存优惠购买信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveSupplierCouponBuyInfo(Map info) throws DAOException {
+        logger.debug("保存 saveSupplierCouponBuyInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("supplierCouponBuyV1ServiceDaoImpl.saveSupplierCouponBuyInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询优惠购买信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getSupplierCouponBuyInfo(Map info) throws DAOException {
+        logger.debug("查询 getSupplierCouponBuyInfo 入参 info : {}",info);
+
+        List<Map> businessSupplierCouponBuyInfos = sqlSessionTemplate.selectList("supplierCouponBuyV1ServiceDaoImpl.getSupplierCouponBuyInfo",info);
+
+        return businessSupplierCouponBuyInfos;
+    }
+
+
+    /**
+     * 修改优惠购买信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateSupplierCouponBuyInfo(Map info) throws DAOException {
+        logger.debug("修改 updateSupplierCouponBuyInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("supplierCouponBuyV1ServiceDaoImpl.updateSupplierCouponBuyInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询优惠购买数量
+     * @param info 优惠购买信息
+     * @return 优惠购买数量
+     */
+    @Override
+    public int querySupplierCouponBuysCount(Map info) {
+        logger.debug("查询 querySupplierCouponBuysCount 入参 info : {}",info);
+
+        List<Map> businessSupplierCouponBuyInfos = sqlSessionTemplate.selectList("supplierCouponBuyV1ServiceDaoImpl.querySupplierCouponBuysCount", info);
+        if (businessSupplierCouponBuyInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessSupplierCouponBuyInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-acct/src/main/java/com/java110/acct/smo/impl/SupplierCouponBuyV1InnerServiceSMOImpl.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.ISupplierCouponBuyV1ServiceDao;
+import com.java110.intf.acct.ISupplierCouponBuyV1InnerServiceSMO;
+import com.java110.dto.supplierCouponBuy.SupplierCouponBuyDto;
+import com.java110.po.supplierCouponBuy.SupplierCouponBuyPo;
+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-11-17 21:39:00 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 SupplierCouponBuyV1InnerServiceSMOImpl extends BaseServiceSMO implements ISupplierCouponBuyV1InnerServiceSMO {
+
+    @Autowired
+    private ISupplierCouponBuyV1ServiceDao supplierCouponBuyV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveSupplierCouponBuy(@RequestBody  SupplierCouponBuyPo supplierCouponBuyPo) {
+        int saveFlag = supplierCouponBuyV1ServiceDaoImpl.saveSupplierCouponBuyInfo(BeanConvertUtil.beanCovertMap(supplierCouponBuyPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateSupplierCouponBuy(@RequestBody  SupplierCouponBuyPo supplierCouponBuyPo) {
+        int saveFlag = supplierCouponBuyV1ServiceDaoImpl.updateSupplierCouponBuyInfo(BeanConvertUtil.beanCovertMap(supplierCouponBuyPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteSupplierCouponBuy(@RequestBody  SupplierCouponBuyPo supplierCouponBuyPo) {
+       supplierCouponBuyPo.setStatusCd("1");
+       int saveFlag = supplierCouponBuyV1ServiceDaoImpl.updateSupplierCouponBuyInfo(BeanConvertUtil.beanCovertMap(supplierCouponBuyPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<SupplierCouponBuyDto> querySupplierCouponBuys(@RequestBody  SupplierCouponBuyDto supplierCouponBuyDto) {
+
+        //校验是否传了 分页信息
+
+        int page = supplierCouponBuyDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            supplierCouponBuyDto.setPage((page - 1) * supplierCouponBuyDto.getRow());
+        }
+
+        List<SupplierCouponBuyDto> supplierCouponBuys = BeanConvertUtil.covertBeanList(supplierCouponBuyV1ServiceDaoImpl.getSupplierCouponBuyInfo(BeanConvertUtil.beanCovertMap(supplierCouponBuyDto)), SupplierCouponBuyDto.class);
+
+        return supplierCouponBuys;
+    }
+
+
+    @Override
+    public int querySupplierCouponBuysCount(@RequestBody SupplierCouponBuyDto supplierCouponBuyDto) {
+        return supplierCouponBuyV1ServiceDaoImpl.querySupplierCouponBuysCount(BeanConvertUtil.beanCovertMap(supplierCouponBuyDto));    }
+
+}