| @@ -174,6 +174,13 @@ public class WxCouponController extends BaseController { | |||||
| } | } | ||||
| wxCoupon.setTenantId(getTenantId()); | wxCoupon.setTenantId(getTenantId()); | ||||
| WxCoupon coupon = wxCouponService.findById(wxCoupon); | |||||
| if(coupon!=null){ | |||||
| if(wxCoupon.getValidEndDate().before(coupon.getValidEndDate())){ | |||||
| return new ResultData(ErrorCode.COUPON_STOCK_ENDTIME_ERR); | |||||
| } | |||||
| } | |||||
| //启动审批流 | //启动审批流 | ||||
| if(wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() >0){ | if(wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() >0){ | ||||
| List<Map<String,Object>> variables = (List)wxCoupon.getFlowParams().get("variables"); | List<Map<String,Object>> variables = (List)wxCoupon.getFlowParams().get("variables"); | ||||
| @@ -0,0 +1,2 @@ | |||||
| ALTER TABLE `wx_merchant` | |||||
| ADD COLUMN `link_line_phone` varchar(100) NULL DEFAULT NULL COMMENT '客服电话'; | |||||
| @@ -113,6 +113,7 @@ public enum ErrorCode{ | |||||
| COUPON_ONLY_FOR_NEW_MEMBER(2038, "您已参加过新会员活动"), | COUPON_ONLY_FOR_NEW_MEMBER(2038, "您已参加过新会员活动"), | ||||
| COUPON_SCORE_NOT_IN_RANGE(2038, "您的成长值/等级与要求不符"), | COUPON_SCORE_NOT_IN_RANGE(2038, "您的成长值/等级与要求不符"), | ||||
| COUPON_STOCK_NO_EQUAL_ERR(2039, "券库存设置要保证同增同减"), | COUPON_STOCK_NO_EQUAL_ERR(2039, "券库存设置要保证同增同减"), | ||||
| COUPON_STOCK_ENDTIME_ERR(2043, "抱歉,有效期截止时间只能增加不能减少!"), | |||||
| PUSH_LIMIT_UP_TO_1DAYLIMIT(2040, "此用户一天内发券到达疲劳度限制"), | PUSH_LIMIT_UP_TO_1DAYLIMIT(2040, "此用户一天内发券到达疲劳度限制"), | ||||
| PUSH_LIMIT_UP_TO_COUPONLIMIT(2041, "此用户发此券到达疲劳度限制"), | PUSH_LIMIT_UP_TO_COUPONLIMIT(2041, "此用户发此券到达疲劳度限制"), | ||||
| @@ -183,6 +183,9 @@ public class WxMerchant extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "辅谈人", name = "talkUserAux") | @io.swagger.annotations.ApiModelProperty(value = "辅谈人", name = "talkUserAux") | ||||
| private String talkUserAux; | private String talkUserAux; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "客服电话", name = "linkLinePhone") | |||||
| private String linkLinePhone; | |||||
| @Transient | @Transient | ||||
| private WxProfitSharingReceiver wxProfitSharingReceiver; | private WxProfitSharingReceiver wxProfitSharingReceiver; | ||||
| @@ -81,4 +81,6 @@ public class WxMerchantVo { | |||||
| @io.swagger.annotations.ApiModelProperty(value="优惠活动",name="actionDesc") | @io.swagger.annotations.ApiModelProperty(value="优惠活动",name="actionDesc") | ||||
| private String actionDesc; | private String actionDesc; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "客服电话", name = "linkLinePhone") | |||||
| private String linkLinePhone; | |||||
| } | } | ||||
| @@ -200,5 +200,6 @@ public interface WxCouponService { | |||||
| */ | */ | ||||
| ResultData updateCouponStockAndEndTime(WxCoupon wxCoupon); | ResultData updateCouponStockAndEndTime(WxCoupon wxCoupon); | ||||
| WxCoupon findById(WxCoupon wxCoupon); | |||||
| } | } | ||||
| @@ -17,6 +17,7 @@ import com.iformall.enums.*; | |||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.*; | import com.iformall.mapper.*; | ||||
| import com.iformall.service.*; | import com.iformall.service.*; | ||||
| import org.apache.commons.collections.CollectionUtils; | |||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| @@ -623,4 +624,15 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| public void update(WxCoupon record) { | public void update(WxCoupon record) { | ||||
| wxCouponMapper.updateByPrimaryKeySelective(record); | wxCouponMapper.updateByPrimaryKeySelective(record); | ||||
| } | } | ||||
| @Override | |||||
| public WxCoupon findById(WxCoupon wxCoupon) { | |||||
| WxCoupon query = new WxCoupon(); | |||||
| query.setId(wxCoupon.getId()); | |||||
| List<WxCoupon> list = wxCouponMapper.findCouponList(query); | |||||
| if(CollectionUtils.isNotEmpty(list)){ | |||||
| return list.get(0); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| } | } | ||||
| @@ -157,7 +157,7 @@ | |||||
| </select> | </select> | ||||
| <select id="devoteList" parameterType="com.iformall.domain.po.WxBusiness" resultType="hashmap"> | <select id="devoteList" parameterType="com.iformall.domain.po.WxBusiness" resultType="hashmap"> | ||||
| select m.name merchantName,round(sum(mtd.trade_amt)/sum(ws.operation_area) /100,2) saleRate, | |||||
| select m.name merchantName,round(sum(mtd.trade_amt)/sum(ws.operation_area) /100,2) sale, | |||||
| round( | round( | ||||
| round(sum(mtd.trade_amt)/sum(ws.operation_area) /100,2)/ | round(sum(mtd.trade_amt)/sum(ws.operation_area) /100,2)/ | ||||
| @@ -30,6 +30,7 @@ | |||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="talk_user_main" jdbcType="VARCHAR" property="talkUserMain"/> | <result column="talk_user_main" jdbcType="VARCHAR" property="talkUserMain"/> | ||||
| <result column="talk_user_aux" jdbcType="VARCHAR" property="talkUserAux"/> | <result column="talk_user_aux" jdbcType="VARCHAR" property="talkUserAux"/> | ||||
| <result column="link_line_phone" property="linkLinePhone"/> | |||||
| </resultMap> | </resultMap> | ||||
| @@ -37,7 +38,7 @@ | |||||
| `id`,`tenant_id`,`img_url`,`name`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`, | `id`,`tenant_id`,`img_url`,`name`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`, | ||||
| `business_id`,`sub_business_id`,`shop_type`,`brand`,`type`,`is_public`,email,`title`,`cover_picture`,`is_admin`,`bill_setting`,`qr_code`, | `business_id`,`sub_business_id`,`shop_type`,`brand`,`type`,`is_public`,email,`title`,`cover_picture`,`is_admin`,`bill_setting`,`qr_code`, | ||||
| `introduction`,`action_desc`,`is_del`, | `introduction`,`action_desc`,`is_del`, | ||||
| `talk_user_main`,`talk_user_aux` | |||||
| `talk_user_main`,`talk_user_aux`,link_line_phone | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -135,7 +136,7 @@ | |||||
| <sql id="allMerchantVoColumns"> | <sql id="allMerchantVoColumns"> | ||||
| m.id,m.img_url,m.name,m.link_phone,m.status,m.business_id, | m.id,m.img_url,m.name,m.link_phone,m.status,m.business_id, | ||||
| m.is_public,m.email,m.title,m.cover_picture,m.sub_business_id, | m.is_public,m.email,m.title,m.cover_picture,m.sub_business_id, | ||||
| m.shop_type,m.introduction,m.action_desc,bu.title as business_name | |||||
| m.shop_type,m.introduction,m.action_desc,bu.title as business_name,m.link_line_phone | |||||
| </sql> | </sql> | ||||
| <select id="getMerchantByCode" parameterType="java.util.Map" resultMap="MerchantVoResultMap"> | <select id="getMerchantByCode" parameterType="java.util.Map" resultMap="MerchantVoResultMap"> | ||||
| @@ -178,7 +179,8 @@ | |||||
| <result column="introduction" jdbcType="VARCHAR" property="introduction"/> | <result column="introduction" jdbcType="VARCHAR" property="introduction"/> | ||||
| <result column="action_desc" jdbcType="VARCHAR" property="actionDesc"/> | <result column="action_desc" jdbcType="VARCHAR" property="actionDesc"/> | ||||
| <result column="link_line_phone" property="linkLinePhone"/> | |||||
| <collection column="{merchantId=id}" property="shopVoList" | <collection column="{merchantId=id}" property="shopVoList" | ||||
| ofType="com.iformall.domain.vo.WxShopVo" | ofType="com.iformall.domain.vo.WxShopVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||