Explorar el Código

[商户][修改][添加客服字段]

release_toaliyun_real
luozukai hace 7 años
padre
commit
05fcabe111
Se han modificado 9 ficheros con 34 adiciones y 4 borrados
  1. +7
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  2. +2
    -0
      mallinkAdmin/src/main/resources/db/migration/V201907021649__L_ALTER_MER.sql
  3. +1
    -0
      mallinkService/src/main/java/com/iformall/common/ErrorCode.java
  4. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  5. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java
  6. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxCouponService.java
  7. +12
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  8. +1
    -1
      mallinkService/src/main/resources/mapper/WxBusinessMapper.xml
  9. +5
    -3
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 7
- 0
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java Ver fichero

@@ -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");


+ 2
- 0
mallinkAdmin/src/main/resources/db/migration/V201907021649__L_ALTER_MER.sql Ver fichero

@@ -0,0 +1,2 @@
ALTER TABLE `wx_merchant`
ADD COLUMN `link_line_phone` varchar(100) NULL DEFAULT NULL COMMENT '客服电话';

+ 1
- 0
mallinkService/src/main/java/com/iformall/common/ErrorCode.java Ver fichero

@@ -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, "此用户发此券到达疲劳度限制"),


+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java Ver fichero

@@ -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;




+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantVo.java Ver fichero

@@ -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;
} }

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxCouponService.java Ver fichero

@@ -200,5 +200,6 @@ public interface WxCouponService {
*/ */
ResultData updateCouponStockAndEndTime(WxCoupon wxCoupon); ResultData updateCouponStockAndEndTime(WxCoupon wxCoupon);


WxCoupon findById(WxCoupon wxCoupon);


} }

+ 12
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Ver fichero

@@ -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;
}
} }

+ 1
- 1
mallinkService/src/main/resources/mapper/WxBusinessMapper.xml Ver fichero

@@ -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)/


+ 5
- 3
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Ver fichero

@@ -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"


Cargando…
Cancelar
Guardar