wuxw лет назад: 3
Родитель
Сommit
0f88cb90bc

+ 69 - 0
java110-bean/src/main/java/com/java110/dto/couponPropertyPoolConfig/CouponPropertyPoolConfigDto.java

@@ -0,0 +1,69 @@
+package com.java110.dto.couponPropertyPoolConfig;
+
+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 CouponPropertyPoolConfigDto extends PageDto implements Serializable {
+
+    private String configId;
+private String couponId;
+private String columnValue;
+private String columnKey;
+
+
+    private Date createTime;
+
+    private String statusCd = "0";
+
+
+    public String getConfigId() {
+        return configId;
+    }
+public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+public String getCouponId() {
+        return couponId;
+    }
+public void setCouponId(String couponId) {
+        this.couponId = couponId;
+    }
+public String getColumnValue() {
+        return columnValue;
+    }
+public void setColumnValue(String columnValue) {
+        this.columnValue = columnValue;
+    }
+public String getColumnKey() {
+        return columnKey;
+    }
+public void setColumnKey(String columnKey) {
+        this.columnKey = columnKey;
+    }
+
+
+    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;
+    }
+}

+ 68 - 0
java110-bean/src/main/java/com/java110/po/couponPropertyPoolConfig/CouponPropertyPoolConfigPo.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.po.couponPropertyPoolConfig;
+
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2022-11-19 23:41:54 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 CouponPropertyPoolConfigPo implements Serializable {
+
+    private String configId;
+private String statusCd = "0";
+private String couponId;
+private String columnValue;
+private String columnKey;
+public String getConfigId() {
+        return configId;
+    }
+public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+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 getColumnValue() {
+        return columnValue;
+    }
+public void setColumnValue(String columnValue) {
+        this.columnValue = columnValue;
+    }
+public String getColumnKey() {
+        return columnKey;
+    }
+public void setColumnKey(String columnKey) {
+        this.columnKey = columnKey;
+    }
+
+
+
+}

+ 97 - 0
java110-db/src/main/resources/mapper/acct/CouponPropertyPoolConfigV1ServiceDaoImplMapper.xml

@@ -0,0 +1,97 @@
+<?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="couponPropertyPoolConfigV1ServiceDaoImpl">
+
+
+
+
+
+    <!-- 保存优惠券配置信息 add by wuxw 2018-07-03 -->
+    <insert id="saveCouponPropertyPoolConfigInfo" parameterType="Map">
+        insert into coupon_property_pool_config(
+config_id,coupon_id,column_value,column_key
+) values (
+#{configId},#{couponId},#{columnValue},#{columnKey}
+)
+    </insert>
+
+
+
+    <!-- 查询优惠券配置信息 add by wuxw 2018-07-03 -->
+    <select id="getCouponPropertyPoolConfigInfo" parameterType="Map" resultType="Map">
+        select  t.config_id,t.config_id configId,t.status_cd,t.status_cd statusCd,t.coupon_id,t.coupon_id couponId,t.column_value,t.column_value columnValue,t.column_key,t.column_key columnKey 
+from coupon_property_pool_config t 
+where 1 =1 
+<if test="configId !=null and configId != ''">
+   and t.config_id= #{configId}
+</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="columnValue !=null and columnValue != ''">
+   and t.column_value= #{columnValue}
+</if> 
+<if test="columnKey !=null and columnKey != ''">
+   and t.column_key= #{columnKey}
+</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="updateCouponPropertyPoolConfigInfo" parameterType="Map">
+        update  coupon_property_pool_config t set t.status_cd = #{statusCd}
+<if test="newBId != null and newBId != ''">
+,t.b_id = #{newBId}
+</if> 
+<if test="couponId !=null and couponId != ''">
+, t.coupon_id= #{couponId}
+</if> 
+<if test="columnValue !=null and columnValue != ''">
+, t.column_value= #{columnValue}
+</if> 
+<if test="columnKey !=null and columnKey != ''">
+, t.column_key= #{columnKey}
+</if> 
+ where 1=1 <if test="configId !=null and configId != ''">
+and t.config_id= #{configId}
+</if> 
+
+    </update>
+
+    <!-- 查询优惠券配置数量 add by wuxw 2018-07-03 -->
+     <select id="queryCouponPropertyPoolConfigsCount" parameterType="Map" resultType="Map">
+        select  count(1) count 
+from coupon_property_pool_config t 
+where 1 =1 
+<if test="configId !=null and configId != ''">
+   and t.config_id= #{configId}
+</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="columnValue !=null and columnValue != ''">
+   and t.column_value= #{columnValue}
+</if> 
+<if test="columnKey !=null and columnKey != ''">
+   and t.column_key= #{columnKey}
+</if> 
+
+
+     </select>
+
+</mapper>

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/acct/ICouponPropertyPoolConfigV1InnerServiceSMO.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.couponPropertyPoolConfig.CouponPropertyPoolConfigDto;
+import com.java110.po.couponPropertyPoolConfig.CouponPropertyPoolConfigPo;
+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-19 23:41:54 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("/couponPropertyPoolConfigV1Api")
+public interface ICouponPropertyPoolConfigV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveCouponPropertyPoolConfig", method = RequestMethod.POST)
+    public int saveCouponPropertyPoolConfig(@RequestBody CouponPropertyPoolConfigPo couponPropertyPoolConfigPo);
+
+    @RequestMapping(value = "/updateCouponPropertyPoolConfig", method = RequestMethod.POST)
+    public int updateCouponPropertyPoolConfig(@RequestBody CouponPropertyPoolConfigPo couponPropertyPoolConfigPo);
+
+    @RequestMapping(value = "/deleteCouponPropertyPoolConfig", method = RequestMethod.POST)
+    public int deleteCouponPropertyPoolConfig(@RequestBody CouponPropertyPoolConfigPo couponPropertyPoolConfigPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param couponPropertyPoolConfigDto 数据对象分享
+     * @return CouponPropertyPoolConfigDto 对象数据
+     */
+    @RequestMapping(value = "/queryCouponPropertyPoolConfigs", method = RequestMethod.POST)
+    List<CouponPropertyPoolConfigDto> queryCouponPropertyPoolConfigs(@RequestBody CouponPropertyPoolConfigDto couponPropertyPoolConfigDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param couponPropertyPoolConfigDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryCouponPropertyPoolConfigsCount", method = RequestMethod.POST)
+    int queryCouponPropertyPoolConfigsCount(@RequestBody CouponPropertyPoolConfigDto couponPropertyPoolConfigDto);
+}

+ 71 - 0
service-acct/src/main/java/com/java110/acct/cmd/couponPropertyPool/DeleteCouponPropertyPoolConfigCmd.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.couponPropertyPool;
+
+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.ICouponPropertyPoolConfigV1InnerServiceSMO;
+import com.java110.po.couponPropertyPoolConfig.CouponPropertyPoolConfigPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+/**
+ * 类表述:删除
+ * 服务编码:couponPropertyPoolConfig.deleteCouponPropertyPoolConfig
+ * 请求路劲:/app/couponPropertyPoolConfig.DeleteCouponPropertyPoolConfig
+ * add by 吴学文 at 2022-11-19 23:41:54 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 = "couponPropertyPool.deleteCouponPropertyPoolConfig")
+public class DeleteCouponPropertyPoolConfigCmd extends Cmd {
+  private static Logger logger = LoggerFactory.getLogger(DeleteCouponPropertyPoolConfigCmd.class);
+
+    @Autowired
+    private ICouponPropertyPoolConfigV1InnerServiceSMO couponPropertyPoolConfigV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "configId", "configId不能为空");
+Assert.hasKeyAndValue(reqJson, "couponId", "couponId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       CouponPropertyPoolConfigPo couponPropertyPoolConfigPo = BeanConvertUtil.covertBean(reqJson, CouponPropertyPoolConfigPo.class);
+        int flag = couponPropertyPoolConfigV1InnerServiceSMOImpl.deleteCouponPropertyPoolConfig(couponPropertyPoolConfigPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 84 - 0
service-acct/src/main/java/com/java110/acct/cmd/couponPropertyPool/ListCouponPropertyPoolConfigCmd.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.couponPropertyPool;
+
+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.ICouponPropertyPoolConfigV1InnerServiceSMO;
+import com.java110.po.couponPropertyPoolConfig.CouponPropertyPoolConfigPo;
+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.couponPropertyPoolConfig.CouponPropertyPoolConfigDto;
+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;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:couponPropertyPoolConfig.listCouponPropertyPoolConfig
+ * 请求路劲:/app/couponPropertyPoolConfig.ListCouponPropertyPoolConfig
+ * add by 吴学文 at 2022-11-19 23:41:54 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 = "couponPropertyPool.listCouponPropertyPoolConfig")
+public class ListCouponPropertyPoolConfigCmd extends Cmd {
+
+  private static Logger logger = LoggerFactory.getLogger(ListCouponPropertyPoolConfigCmd.class);
+    @Autowired
+    private ICouponPropertyPoolConfigV1InnerServiceSMO couponPropertyPoolConfigV1InnerServiceSMOImpl;
+
+    @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 {
+
+           CouponPropertyPoolConfigDto couponPropertyPoolConfigDto = BeanConvertUtil.covertBean(reqJson, CouponPropertyPoolConfigDto.class);
+
+           int count = couponPropertyPoolConfigV1InnerServiceSMOImpl.queryCouponPropertyPoolConfigsCount(couponPropertyPoolConfigDto);
+
+           List<CouponPropertyPoolConfigDto> couponPropertyPoolConfigDtos = null;
+
+           if (count > 0) {
+               couponPropertyPoolConfigDtos = couponPropertyPoolConfigV1InnerServiceSMOImpl.queryCouponPropertyPoolConfigs(couponPropertyPoolConfigDto);
+           } else {
+               couponPropertyPoolConfigDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, couponPropertyPoolConfigDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 77 - 0
service-acct/src/main/java/com/java110/acct/cmd/couponPropertyPool/SaveCouponPropertyPoolConfigCmd.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.cmd.couponPropertyPool;
+
+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.ICouponPropertyPoolConfigV1InnerServiceSMO;
+import com.java110.po.couponPropertyPoolConfig.CouponPropertyPoolConfigPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 类表述:保存
+ * 服务编码:couponPropertyPoolConfig.saveCouponPropertyPoolConfig
+ * 请求路劲:/app/couponPropertyPoolConfig.SaveCouponPropertyPoolConfig
+ * add by 吴学文 at 2022-11-19 23:41:54 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 = "couponPropertyPool.saveCouponPropertyPoolConfig")
+public class SaveCouponPropertyPoolConfigCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveCouponPropertyPoolConfigCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private ICouponPropertyPoolConfigV1InnerServiceSMO couponPropertyPoolConfigV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "couponId", "请求报文中未包含couponId");
+Assert.hasKeyAndValue(reqJson, "columnKey", "请求报文中未包含columnKey");
+Assert.hasKeyAndValue(reqJson, "columnValue", "请求报文中未包含columnValue");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       CouponPropertyPoolConfigPo couponPropertyPoolConfigPo = BeanConvertUtil.covertBean(reqJson, CouponPropertyPoolConfigPo.class);
+        couponPropertyPoolConfigPo.setConfigId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = couponPropertyPoolConfigV1InnerServiceSMOImpl.saveCouponPropertyPoolConfig(couponPropertyPoolConfigPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-acct/src/main/java/com/java110/acct/cmd/couponPropertyPool/UpdateCouponPropertyPoolConfigCmd.java

@@ -0,0 +1,75 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.acct.cmd.couponPropertyPool;
+
+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.ICouponPropertyPoolConfigV1InnerServiceSMO;
+import com.java110.po.couponPropertyPoolConfig.CouponPropertyPoolConfigPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:couponPropertyPoolConfig.updateCouponPropertyPoolConfig
+ * 请求路劲:/app/couponPropertyPoolConfig.UpdateCouponPropertyPoolConfig
+ * add by 吴学文 at 2022-11-19 23:41:54 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 = "couponPropertyPool.updateCouponPropertyPoolConfig")
+public class UpdateCouponPropertyPoolConfigCmd extends Cmd {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateCouponPropertyPoolConfigCmd.class);
+
+
+    @Autowired
+    private ICouponPropertyPoolConfigV1InnerServiceSMO couponPropertyPoolConfigV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "configId", "configId不能为空");
+Assert.hasKeyAndValue(reqJson, "couponId", "couponId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       CouponPropertyPoolConfigPo couponPropertyPoolConfigPo = BeanConvertUtil.covertBean(reqJson, CouponPropertyPoolConfigPo.class);
+        int flag = couponPropertyPoolConfigV1InnerServiceSMOImpl.updateCouponPropertyPoolConfig(couponPropertyPoolConfigPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-acct/src/main/java/com/java110/acct/dao/ICouponPropertyPoolConfigV1ServiceDao.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-19 23:41:54 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 ICouponPropertyPoolConfigV1ServiceDao {
+
+
+    /**
+     * 保存 优惠券配置信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveCouponPropertyPoolConfigInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询优惠券配置信息(instance过程)
+     * 根据bId 查询优惠券配置信息
+     * @param info bId 信息
+     * @return 优惠券配置信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getCouponPropertyPoolConfigInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改优惠券配置信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateCouponPropertyPoolConfigInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询优惠券配置总数
+     *
+     * @param info 优惠券配置信息
+     * @return 优惠券配置数量
+     */
+    int queryCouponPropertyPoolConfigsCount(Map info);
+
+}

+ 112 - 0
service-acct/src/main/java/com/java110/acct/dao/impl/CouponPropertyPoolConfigV1ServiceDaoImpl.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.ICouponPropertyPoolConfigV1ServiceDao;
+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-19 23:41:54 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("couponPropertyPoolConfigV1ServiceDaoImpl")
+public class CouponPropertyPoolConfigV1ServiceDaoImpl extends BaseServiceDao implements ICouponPropertyPoolConfigV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(CouponPropertyPoolConfigV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存优惠券配置信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveCouponPropertyPoolConfigInfo(Map info) throws DAOException {
+        logger.debug("保存 saveCouponPropertyPoolConfigInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("couponPropertyPoolConfigV1ServiceDaoImpl.saveCouponPropertyPoolConfigInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询优惠券配置信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getCouponPropertyPoolConfigInfo(Map info) throws DAOException {
+        logger.debug("查询 getCouponPropertyPoolConfigInfo 入参 info : {}",info);
+
+        List<Map> businessCouponPropertyPoolConfigInfos = sqlSessionTemplate.selectList("couponPropertyPoolConfigV1ServiceDaoImpl.getCouponPropertyPoolConfigInfo",info);
+
+        return businessCouponPropertyPoolConfigInfos;
+    }
+
+
+    /**
+     * 修改优惠券配置信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateCouponPropertyPoolConfigInfo(Map info) throws DAOException {
+        logger.debug("修改 updateCouponPropertyPoolConfigInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("couponPropertyPoolConfigV1ServiceDaoImpl.updateCouponPropertyPoolConfigInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询优惠券配置数量
+     * @param info 优惠券配置信息
+     * @return 优惠券配置数量
+     */
+    @Override
+    public int queryCouponPropertyPoolConfigsCount(Map info) {
+        logger.debug("查询 queryCouponPropertyPoolConfigsCount 入参 info : {}",info);
+
+        List<Map> businessCouponPropertyPoolConfigInfos = sqlSessionTemplate.selectList("couponPropertyPoolConfigV1ServiceDaoImpl.queryCouponPropertyPoolConfigsCount", info);
+        if (businessCouponPropertyPoolConfigInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessCouponPropertyPoolConfigInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-acct/src/main/java/com/java110/acct/smo/impl/CouponPropertyPoolConfigV1InnerServiceSMOImpl.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.ICouponPropertyPoolConfigV1ServiceDao;
+import com.java110.intf.acct.ICouponPropertyPoolConfigV1InnerServiceSMO;
+import com.java110.dto.couponPropertyPoolConfig.CouponPropertyPoolConfigDto;
+import com.java110.po.couponPropertyPoolConfig.CouponPropertyPoolConfigPo;
+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-19 23:41:54 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 CouponPropertyPoolConfigV1InnerServiceSMOImpl extends BaseServiceSMO implements ICouponPropertyPoolConfigV1InnerServiceSMO {
+
+    @Autowired
+    private ICouponPropertyPoolConfigV1ServiceDao couponPropertyPoolConfigV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveCouponPropertyPoolConfig(@RequestBody  CouponPropertyPoolConfigPo couponPropertyPoolConfigPo) {
+        int saveFlag = couponPropertyPoolConfigV1ServiceDaoImpl.saveCouponPropertyPoolConfigInfo(BeanConvertUtil.beanCovertMap(couponPropertyPoolConfigPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateCouponPropertyPoolConfig(@RequestBody  CouponPropertyPoolConfigPo couponPropertyPoolConfigPo) {
+        int saveFlag = couponPropertyPoolConfigV1ServiceDaoImpl.updateCouponPropertyPoolConfigInfo(BeanConvertUtil.beanCovertMap(couponPropertyPoolConfigPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteCouponPropertyPoolConfig(@RequestBody  CouponPropertyPoolConfigPo couponPropertyPoolConfigPo) {
+       couponPropertyPoolConfigPo.setStatusCd("1");
+       int saveFlag = couponPropertyPoolConfigV1ServiceDaoImpl.updateCouponPropertyPoolConfigInfo(BeanConvertUtil.beanCovertMap(couponPropertyPoolConfigPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<CouponPropertyPoolConfigDto> queryCouponPropertyPoolConfigs(@RequestBody  CouponPropertyPoolConfigDto couponPropertyPoolConfigDto) {
+
+        //校验是否传了 分页信息
+
+        int page = couponPropertyPoolConfigDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            couponPropertyPoolConfigDto.setPage((page - 1) * couponPropertyPoolConfigDto.getRow());
+        }
+
+        List<CouponPropertyPoolConfigDto> couponPropertyPoolConfigs = BeanConvertUtil.covertBeanList(couponPropertyPoolConfigV1ServiceDaoImpl.getCouponPropertyPoolConfigInfo(BeanConvertUtil.beanCovertMap(couponPropertyPoolConfigDto)), CouponPropertyPoolConfigDto.class);
+
+        return couponPropertyPoolConfigs;
+    }
+
+
+    @Override
+    public int queryCouponPropertyPoolConfigsCount(@RequestBody CouponPropertyPoolConfigDto couponPropertyPoolConfigDto) {
+        return couponPropertyPoolConfigV1ServiceDaoImpl.queryCouponPropertyPoolConfigsCount(BeanConvertUtil.beanCovertMap(couponPropertyPoolConfigDto));    }
+
+}

+ 6 - 0
service-api/src/main/java/com/java110/api/listener/CmdListener.java

@@ -47,6 +47,12 @@ public class CmdListener extends AbstractServiceApiListener {
         Map<String, String> reqHeader = context.getRequestCurrentHeaders();
         HttpHeaders header = new HttpHeaders();
         for (String key : context.getRequestCurrentHeaders().keySet()) {
+            if("user-name".equals(key)){
+                continue;
+            }
+            if("userName".equals(key)){
+                continue;
+            }
             header.add(key, reqHeader.get(key));
         }
         if (reqHeader.containsKey(CommonConstant.USER_ID)