Просмотр исходного кода

[营销系统][精准发券][短信发送],[sql中tenant_id修改]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
e68c2d10f3
44 измененных файлов: 255 добавлений и 71 удалений
  1. +1
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/WxMsgController.java
  2. +17
    -0
      mallinkAdmin/src/main/java/com/iformall/schedule/MsgSendingSchedule.java
  3. +3
    -0
      mallinkService/src/main/java/com/iformall/common/ErrorCode.java
  4. +23
    -6
      mallinkService/src/main/java/com/iformall/domain/po/CouponInject.java
  5. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMsg.java
  6. +37
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumSendWay.java
  7. +4
    -7
      mallinkService/src/main/java/com/iformall/service/WxMsgConfigService.java
  8. +82
    -0
      mallinkService/src/main/java/com/iformall/service/impl/CouponInjectServiceImpl.java
  9. +9
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxMsgConfigServiceImpl.java
  10. +23
    -14
      mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java
  11. +8
    -3
      mallinkService/src/main/resources/mapper/CouponInjectMapper.xml
  12. +1
    -1
      mallinkService/src/main/resources/mapper/MallRoleMapper.xml
  13. +1
    -1
      mallinkService/src/main/resources/mapper/MallRolePermissionMapper.xml
  14. +1
    -1
      mallinkService/src/main/resources/mapper/MallUserInfoMapper.xml
  15. +1
    -1
      mallinkService/src/main/resources/mapper/WxAdminLogMapper.xml
  16. +1
    -1
      mallinkService/src/main/resources/mapper/WxAppinfoMapper.xml
  17. +1
    -1
      mallinkService/src/main/resources/mapper/WxBLogMapper.xml
  18. +1
    -1
      mallinkService/src/main/resources/mapper/WxCLogMapper.xml
  19. +1
    -1
      mallinkService/src/main/resources/mapper/WxCUserCarMapper.xml
  20. +1
    -1
      mallinkService/src/main/resources/mapper/WxCUserMapper.xml
  21. +1
    -1
      mallinkService/src/main/resources/mapper/WxCUserTagsMapper.xml
  22. +1
    -1
      mallinkService/src/main/resources/mapper/WxCampaignMapper.xml
  23. +1
    -1
      mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml
  24. +1
    -1
      mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml
  25. +1
    -1
      mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml
  26. +1
    -1
      mallinkService/src/main/resources/mapper/WxCouponMapper.xml
  27. +1
    -1
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml
  28. +1
    -1
      mallinkService/src/main/resources/mapper/WxDateAmountRecordMapper.xml
  29. +1
    -1
      mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml
  30. +1
    -1
      mallinkService/src/main/resources/mapper/WxMallBuildingMapper.xml
  31. +1
    -1
      mallinkService/src/main/resources/mapper/WxMallConfigMapper.xml
  32. +1
    -1
      mallinkService/src/main/resources/mapper/WxMallFloorMapper.xml
  33. +1
    -1
      mallinkService/src/main/resources/mapper/WxMerchantShopMapper.xml
  34. +1
    -1
      mallinkService/src/main/resources/mapper/WxMerchantTradeDailyMapper.xml
  35. +5
    -1
      mallinkService/src/main/resources/mapper/WxMsgMapper.xml
  36. +1
    -1
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml
  37. +1
    -1
      mallinkService/src/main/resources/mapper/WxParkMapper.xml
  38. +1
    -1
      mallinkService/src/main/resources/mapper/WxPayOrderMapper.xml
  39. +1
    -1
      mallinkService/src/main/resources/mapper/WxRefundOrderMapper.xml
  40. +1
    -1
      mallinkService/src/main/resources/mapper/WxScoreHistoryMapper.xml
  41. +1
    -1
      mallinkService/src/main/resources/mapper/WxScoreRulesMapper.xml
  42. +1
    -1
      mallinkService/src/main/resources/mapper/WxScoreValidityPeriodMapper.xml
  43. +1
    -1
      mallinkService/src/main/resources/mapper/WxShopMapper.xml
  44. +1
    -1
      mallinkService/src/main/resources/mapper/WxTemplateMsgMapper.xml

+ 1
- 0
mallinkAdmin/src/main/java/com/iformall/controller/WxMsgController.java Просмотреть файл

@@ -36,6 +36,7 @@ public class WxMsgController extends BaseController {
public ResultData list(@ModelAttribute WxMsg wxMsg, Integer pageNum, Integer pageSize) {
if (null == wxMsg) wxMsg = new WxMsg();
wxMsg.setTenantId(getTenantId());
//wxMsg.setWay(EnumSendWay.TAG.getCode());
wxMsg.setSortColumns(WxMsg.Field.Createtime_DESC);
final PageInfo<WxMsg> page = wxMsgService.listAsPage(wxMsg, pageNum, pageSize);
return new ResultData(page);


+ 17
- 0
mallinkAdmin/src/main/java/com/iformall/schedule/MsgSendingSchedule.java Просмотреть файл

@@ -1,6 +1,9 @@
package com.iformall.schedule;

import com.alibaba.fastjson.JSONObject;
import com.iformall.common.ErrorCode;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxCUser;
import com.iformall.domain.po.WxMsg;
import com.iformall.domain.po.WxMsgConfig;
import com.iformall.mapper.WxMsgConfigMapper;
@@ -45,6 +48,9 @@ public class MsgSendingSchedule {
}

public void sendmsg(WxMsg wxMsg){



//从短信配置中查询密钥 bid 等信息
WxMsgConfig wxMsgConfig = new WxMsgConfig();
wxMsgConfig.setTenantId(wxMsg.getTenantId());
@@ -52,6 +58,17 @@ public class MsgSendingSchedule {
if (wxMsgConfigs.size() == 0) return;
wxMsgConfig = wxMsgConfigs.get(0);

if(wxMsgConfig.getRemains()==0){
logger.info("短信数量为0");
return;
}

if(wxMsgConfig.getRemains()<wxMsg.getExpectSendNumber()){
logger.info("短信数量不足");
return;
}


String secret = wxMsgConfig.getSecret();
String bid = wxMsgConfig.getBid();
String publickey = wxMsgConfig.getPublickey();


+ 3
- 0
mallinkService/src/main/java/com/iformall/common/ErrorCode.java Просмотреть файл

@@ -213,6 +213,9 @@ public enum ErrorCode{
MSG_METHOD_REQUEST_ERROR(12108,"接口请求错误"),
MSG_PHONE_NOT_FOUND(12109,"请输入手机号"),
MSG_SEND_WAY_CHOOSE_ERROR(12110,"请确定发送的方式"),
MSG_SUM_ZERO(12111,"短信数量为0"),
MSG_SUM_INSUFFICENT(12112,"短信数量不足"),


/**
* 会员


+ 23
- 6
mallinkService/src/main/java/com/iformall/domain/po/CouponInject.java Просмотреть файл

@@ -2,12 +2,12 @@ package com.iformall.domain.po;

import com.iformall.domain.vo.WxChooseTagVo;

import javax.persistence.*;
import java.util.*;
import javax.persistence.Transient;
import java.util.List;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Table(name = "coupon_inject")
public class CouponInject implements Serializable {
@@ -84,8 +84,7 @@ public class CouponInject implements Serializable {
/*发送人群标签**/
@io.swagger.annotations.ApiModelProperty(value="发送人群标签",name="tags")
private String tags;
/*短信模板id**/
@io.swagger.annotations.ApiModelProperty(value="短信模板id",name="modelId")
@io.swagger.annotations.ApiModelProperty(value="",name="modelId")
private Long modelId;
/*创建时间**/
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime")
@@ -93,6 +92,10 @@ public class CouponInject implements Serializable {
/*修改时间**/
@io.swagger.annotations.ApiModelProperty(value="修改时间",name="updateTime")
private Date updateTime;

@io.swagger.annotations.ApiModelProperty(value="短信id",name="msgId")
private Long msgId;

public String getTenantId() {
return tenantId;
}
@@ -200,7 +203,21 @@ public class CouponInject implements Serializable {
this.sendTimeEnd = sendTimeEnd;
}

public Long getmUserId() {
return mUserId;
}

public void setmUserId(Long mUserId) {
this.mUserId = mUserId;
}

public Long getMsgId() {
return msgId;
}

public void setMsgId(Long msgId) {
this.msgId = msgId;
}

public static enum Field
{


+ 11
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMsg.java Просмотреть файл

@@ -92,6 +92,9 @@ public class WxMsg implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="状态0未发送 1已发送 2草稿箱",name="status")
private Integer status;

@io.swagger.annotations.ApiModelProperty(value="1标签短信2精准投放",name="way")
private Integer way;

public String getTenantId() {
return tenantId;
}
@@ -201,6 +204,14 @@ public class WxMsg implements Serializable {
this.status = status;
}

public Integer getWay() {
return way;
}

public void setWay(Integer way) {
this.way = way;
}

public static enum Field
{
Id_ASC("`id` ASC"),Id_DESC("`id` DESC")


+ 37
- 0
mallinkService/src/main/java/com/iformall/enums/EnumSendWay.java Просмотреть файл

@@ -0,0 +1,37 @@
package com.iformall.enums;

/**
* Created by Stormeye on 2018/08/09.
*/
public enum EnumSendWay {

// 1、标签短信 2:精准发券
TAG(1,"标签短信"),
COUPON(2, "精准发券")
;

public static EnumSendWay getEnum(Integer code) {
for (EnumSendWay value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumSendWay(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 4
- 7
mallinkService/src/main/java/com/iformall/service/WxMsgConfigService.java Просмотреть файл

@@ -3,6 +3,8 @@ package com.iformall.service;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxMsgConfig;

import java.util.List;

public interface WxMsgConfigService {

/**
@@ -36,12 +38,7 @@ public interface WxMsgConfigService {
* @param id
*/
void deleteById(Long id);

WxMsgConfig findObject(WxMsgConfig wxMsgConfig);

}

+ 82
- 0
mallinkService/src/main/java/com/iformall/service/impl/CouponInjectServiceImpl.java Просмотреть файл

@@ -34,6 +34,13 @@ public class CouponInjectServiceImpl implements CouponInjectService {
WxCUserTagsService wxCUserTagsService;
@Autowired
WxCouponActionLogService wxCouponActionLogService;
@Autowired
WxMsgService wxMsgService;
@Autowired
WxMsgModelService wxMsgModelService;

@Autowired
WxMsgConfigService wxMsgConfigService;


@Override
@@ -113,9 +120,84 @@ public class CouponInjectServiceImpl implements CouponInjectService {
if(record.getSendType().equals(EnumCouponInjectSendType.IMMEDIATE.getCode())) {
sendNow(wxCoupon,cUsers,record.getId());
}

//发送短信
sendMsg(record,cUsers);

return new ResultData();
}

private void sendMsg(CouponInject record, List<WxCUser> cUsers) {

//根据模板ID查询短信信息
WxMsgModel model = wxMsgModelService.getById(record.getModelId());
if(model==null){
return;
}

WxMsg wxmsg=new WxMsg();
wxmsg.setTenantId(record.getTenantId());
WxMsgConfig wxMsgConfig = new WxMsgConfig();
wxMsgConfig.setTenantId(wxmsg.getTenantId());
wxMsgConfig = wxMsgConfigService.findObject(wxMsgConfig);
if (wxMsgConfig==null){
logger.info("您还未接入短信运营商,请联系平台管理员");
return;
}

if(wxMsgConfig.getRemains()==0){
logger.info("短信数量为0");
return;
}

wxmsg.setExpectSendNumber(cUsers.size());//预计发送数量
if(wxMsgConfig.getRemains()<cUsers.size()){
logger.info("短信数量不足");
return;
}

//获取手机号
if(cUsers.size()==0){
logger.info("没有要发送的手机号");
return;
}
StringBuffer sb=new StringBuffer();
for(WxCUser user:cUsers){
String phone = user.getPhone();
if(null!=phone && !phone.equals(""))
sb.append(phone).append(",");
}
wxmsg.setPhones(sb.deleteCharAt(sb.length()-1).toString());
wxmsg.setLabel("");
if(wxmsg.getPhones().equals("")){
logger.info("手机号未发现");
return;
}
if(record.getSendType()==1){//定时发送
wxmsg.setIsright(record.getSendType()==1?0:1);//值是相反的
wxmsg.setSendtime(com.iformall.utils.DateUtils.date2String(record.getSendTime(),"yyyy-MM-dd HH:mm:ss"));
wxmsg.setStatus(EnumMsgStatus.MSG_STATUS_NOT_SEND.getCode());
}else{
wxmsg.setIsright(EnumMsgStatus.MSG_SEND_IMMEDIATELY.getCode());//立即发送
wxmsg.setStatus(EnumMsgStatus.MSG_STATUS_SENDED.getCode());
wxmsg.setSendtime(com.iformall.utils.DateUtils.getSystemTime("yyyy-MM-dd HH:mm:ss"));

}
wxmsg.setModelId(record.getModelId());
wxmsg.setMsg(model.getContent());
wxmsg.setName(model.getName());
wxmsg.setSignature(model.getSignature());
wxmsg.setSuccessNumber(0);
wxmsg.setErrorNumber(0);
wxmsg.setWay(EnumSendWay.COUPON.getCode());//1、标签短信2、精准发券
ResultData resultData = wxMsgService.saveOrUpdate(wxmsg);
if(resultData.data!=null){
//更新MSG_ID
record.setMsgId((Long)resultData.data);
couponInjectMapper.updateByPrimaryKeySelective(record);
}
}

private void sendNow(WxCoupon wxCoupon,List<WxCUser> cUsers,Long couponInjectId){
//查询标签用户



+ 9
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxMsgConfigServiceImpl.java Просмотреть файл

@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.iformall.common.IdWorker;

import java.util.List;

@Service
public class WxMsgConfigServiceImpl implements WxMsgConfigService {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@@ -45,12 +47,11 @@ public class WxMsgConfigServiceImpl implements WxMsgConfigService {
public void deleteById(Long id) {
wxMsgConfigMapper.deleteByPrimaryKey(id);
}

@Override
public WxMsgConfig findObject(WxMsgConfig wxMsgConfig) {
return wxMsgConfigMapper.selectOne(wxMsgConfig);
}


}

+ 23
- 14
mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java Просмотреть файл

@@ -18,10 +18,7 @@ import com.iformall.mapper.WxMsgConfigMapper;
import com.iformall.mapper.WxMsgMapper;
import com.iformall.service.WxCUserTagsService;
import com.iformall.service.WxMsgService;
import com.iformall.utils.AesUtil;
import com.iformall.utils.HMACSHA256;
import com.iformall.utils.HttpUtil;
import com.iformall.utils.RsaUtil;
import com.iformall.utils.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -113,7 +110,7 @@ public class WxMsgServiceImpl implements WxMsgService {
for(String phone:phoneSet){
sb.append(phone).append(",");
}
wxMsg.setPhones(sb.toString());
wxMsg.setPhones(sb.deleteCharAt(sb.length()-1).toString());

//新增记录
if (wxMsg.getId() == null) {
@@ -130,14 +127,16 @@ public class WxMsgServiceImpl implements WxMsgService {
//是否立即发送
if (wxMsg.getIsright() == 1) {
wxMsg.setStatus(EnumMsgStatus.MSG_STATUS_SENDED.getCode());
sendmsg(wxMsg);
wxMsg.setSendtime(DateUtils.getSystemTime("yyyy-MM-dd HH:mm:ss"));
return sendmsg(wxMsg);
} else {
wxMsg.setStatus(EnumMsgStatus.MSG_STATUS_NOT_SEND.getCode());
final IdWorker idWorker = IdWorker.get();
wxMsg.setId(idWorker.nextId());
long id = idWorker.nextId();
wxMsg.setId(id);
wxMsg.setCreatetime(new Date());
wxMsgMapper.insertSelective(wxMsg);
return new ResultData(Result.SUCCESS, "短信会在预设时间发送");
return new ResultData(Result.SUCCESS, "短信会在预设时间发送",id);
}

} else {
@@ -150,7 +149,7 @@ public class WxMsgServiceImpl implements WxMsgService {
//是否立即发送
if (wxMsg.getIsright() == 1) {
wxMsg.setStatus(EnumMsgStatus.MSG_STATUS_SENDED.getCode());
sendmsg(wxMsg);
return sendmsg(wxMsg);
} else {
//定时
wxMsg.setStatus(EnumMsgStatus.MSG_STATUS_NOT_SEND.getCode());
@@ -159,8 +158,6 @@ public class WxMsgServiceImpl implements WxMsgService {
}

}

return new ResultData();
}

private String parselabel(String tenantId, WxMsg wxmsg) {
@@ -197,6 +194,17 @@ public class WxMsgServiceImpl implements WxMsgService {
if (wxMsgConfigs.size() == 0) return new ResultData(ErrorCode.MSG_SERVER_NOT_FIND, "您还未接入短信运营商,请联系平台管理员");
wxMsgConfig = wxMsgConfigs.get(0);

if(wxMsgConfig.getRemains()==0){
logger.info("短信数量为0");
return new ResultData(ErrorCode.MSG_SEND_ERROR.MSG_SUM_ZERO);
}

if(wxMsgConfig.getRemains()<wxMsg.getExpectSendNumber()){
logger.info("短信数量不足");
return new ResultData(ErrorCode.MSG_SUM_INSUFFICENT);
}


String secret = wxMsgConfig.getSecret();
String bid = wxMsgConfig.getBid();
String publickey = wxMsgConfig.getPublickey();
@@ -248,9 +256,10 @@ public class WxMsgServiceImpl implements WxMsgService {
wxMsg.setSendstatus(EnumMsgStatus.MSG_SEND_FAIL.getCode());
}

final IdWorker idWorker = IdWorker.get();
long id = idWorker.nextId();
if (wxMsg.getId() == null) {
final IdWorker idWorker = IdWorker.get();
wxMsg.setId(idWorker.nextId());
wxMsg.setId(id);
wxMsg.setCreatetime(new Date());
wxMsgMapper.insertSelective(wxMsg);
} else {
@@ -260,7 +269,7 @@ public class WxMsgServiceImpl implements WxMsgService {
logger.info("发送短信结束...");
if (ret.equals("1")) {
addMsgCallback(wxMsg,batchNo);
return new ResultData(Result.SUCCESS, "短信发送中,您可在短信明细中查看发送状态");
return new ResultData(Result.SUCCESS, "短信发送中,您可在短信明细中查看发送状态",id);
} else {
return new ResultData(ErrorCode.MSG_SEND_ERROR.getCode(), "短信发送发败");
}


+ 8
- 3
mallinkService/src/main/resources/mapper/CouponInjectMapper.xml Просмотреть файл

@@ -14,13 +14,14 @@
<result column="status" jdbcType="INTEGER" property="status" />
<result column="error_msg" jdbcType="VARCHAR" property="errorMsg" />
<result column="tags" jdbcType="VARCHAR" property="tags" />
<result column="msg_id" jdbcType="BIGINT" property="msgId" />
<result column="model_id" jdbcType="BIGINT" property="modelId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`name`,`m_user_id`,`send_type`,`coupon_id`,`coupon_name`,`send_time`,`send_amount`,`status`,`error_msg`,`tags`,`model_id`,`create_time`,`update_time`
`id`,`tenant_id`,`name`,`m_user_id`,`send_type`,`coupon_id`,`coupon_name`,`send_time`,`send_amount`,`status`,`error_msg`,`tags`,`msg_id`,`create_time`,`update_time`,`model_id`
</sql>

<sql id="dynamicWhereConditions">
@@ -32,7 +33,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id`= #{tenantId}
</if>
@@ -98,7 +99,11 @@
<if test=" null != updateTime ">
and `update_time` = #{updateTime}
</if>
</if>
<if test=" null != msgId ">
and `msg_id` = #{msgId}
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


+ 1
- 1
mallinkService/src/main/resources/mapper/MallRoleMapper.xml Просмотреть файл

@@ -22,7 +22,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/MallRolePermissionMapper.xml Просмотреть файл

@@ -21,7 +21,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/MallUserInfoMapper.xml Просмотреть файл

@@ -28,7 +28,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxAdminLogMapper.xml Просмотреть файл

@@ -23,7 +23,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxAppinfoMapper.xml Просмотреть файл

@@ -30,7 +30,7 @@
</if>

<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>

<if test=" null != appId ">


+ 1
- 1
mallinkService/src/main/resources/mapper/WxBLogMapper.xml Просмотреть файл

@@ -21,7 +21,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCLogMapper.xml Просмотреть файл

@@ -21,7 +21,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCUserCarMapper.xml Просмотреть файл

@@ -25,7 +25,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCUserMapper.xml Просмотреть файл

@@ -44,7 +44,7 @@
</if>

<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id`= #{tenantId}
</if>

<if test=" null != openId ">


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCUserTagsMapper.xml Просмотреть файл

@@ -23,7 +23,7 @@
</if>

<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}

</if>



+ 1
- 1
mallinkService/src/main/resources/mapper/WxCampaignMapper.xml Просмотреть файл

@@ -35,7 +35,7 @@
</if>

<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}

</if>



+ 1
- 1
mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml Просмотреть файл

@@ -24,7 +24,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml Просмотреть файл

@@ -24,7 +24,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml Просмотреть файл

@@ -30,7 +30,7 @@
</if>

<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>

<if test=" null != merchantId ">


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCouponMapper.xml Просмотреть файл

@@ -42,7 +42,7 @@
</if>

<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>

<if test=" null != merchantId ">


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml Просмотреть файл

@@ -29,7 +29,7 @@
</if>

<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}

</if>



+ 1
- 1
mallinkService/src/main/resources/mapper/WxDateAmountRecordMapper.xml Просмотреть файл

@@ -48,7 +48,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxLevelConfigMapper.xml Просмотреть файл

@@ -43,7 +43,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>
<if test=" null != ids ">


+ 1
- 1
mallinkService/src/main/resources/mapper/WxMallBuildingMapper.xml Просмотреть файл

@@ -24,7 +24,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxMallConfigMapper.xml Просмотреть файл

@@ -24,7 +24,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxMallFloorMapper.xml Просмотреть файл

@@ -25,7 +25,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxMerchantShopMapper.xml Просмотреть файл

@@ -27,7 +27,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxMerchantTradeDailyMapper.xml Просмотреть файл

@@ -24,7 +24,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 5
- 1
mallinkService/src/main/resources/mapper/WxMsgMapper.xml Просмотреть файл

@@ -20,11 +20,12 @@
<result column="excelpath" jdbcType="VARCHAR" property="excelpath" />
<result column="label" jdbcType="VARCHAR" property="label" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="way" jdbcType="INTEGER" property="way" />

</resultMap>
<sql id="allColumns">
`id`,`tenant_id`,`model_id`,`msg`,`sendtime`,`createtime`,`expect_send_number`,`success_number`,`error_number`,`return_result`,`phones`,`signature`,`isright`,`name`,`sendstatus`,`excelpath`,`label`,`status`
`id`,`tenant_id`,`model_id`,`msg`,`sendtime`,`createtime`,`expect_send_number`,`success_number`,`error_number`,`return_result`,`phones`,`signature`,`isright`,`name`,`sendstatus`,`excelpath`,`label`,`status`,`way`
</sql>

<sql id="dynamicWhereConditions">
@@ -108,6 +109,9 @@
and `status` = #{status}

</if>
<if test=" null != way ">
and `way` = #{way}
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


+ 1
- 1
mallinkService/src/main/resources/mapper/WxOrderMapper.xml Просмотреть файл

@@ -36,7 +36,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxParkMapper.xml Просмотреть файл

@@ -29,7 +29,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>



+ 1
- 1
mallinkService/src/main/resources/mapper/WxPayOrderMapper.xml Просмотреть файл

@@ -34,7 +34,7 @@
</if>

<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>

<if test=" null != createTime ">


+ 1
- 1
mallinkService/src/main/resources/mapper/WxRefundOrderMapper.xml Просмотреть файл

@@ -33,7 +33,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxScoreHistoryMapper.xml Просмотреть файл

@@ -26,7 +26,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxScoreRulesMapper.xml Просмотреть файл

@@ -29,7 +29,7 @@
and `id` = #{id}
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>
<if test=" null != loginCount ">
and `login_count` = #{loginCount}


+ 1
- 1
mallinkService/src/main/resources/mapper/WxScoreValidityPeriodMapper.xml Просмотреть файл

@@ -22,7 +22,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxShopMapper.xml Просмотреть файл

@@ -34,7 +34,7 @@
</if>

<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}

</if>



+ 1
- 1
mallinkService/src/main/resources/mapper/WxTemplateMsgMapper.xml Просмотреть файл

@@ -23,7 +23,7 @@
</if>
<if test=" null != tenantId ">
and `tenant_id` like concat('%', #{tenantId},'%')
and `tenant_id` = #{tenantId}
</if>


Загрузка…
Отмена
Сохранить