提交 2d5e9942 作者: 沈振路

register_user_entity 表添加逻辑删除字段

上级 ec604a7b
package com.yaoyaozw.customer.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
......@@ -81,6 +79,10 @@ public class RegisterUserEntity implements Serializable {
@TableField(value = "gmt_create")
private Date gmtCreate;
@TableField("is_deleted")
@TableLogic
private Integer isDeleted;
/**
* 延时客服序列
*/
......@@ -125,4 +127,4 @@ public class RegisterUserEntity implements Serializable {
public static final String COL_GMT_CREATE = "gmt_create";
}
\ No newline at end of file
}
......@@ -24,7 +24,7 @@
from register_user_entity
where customer_publish=#{requestDate} and customer_sort>0
where customer_publish=#{requestDate} and customer_sort>0 and is_deleted = 0
</select>
</mapper>
\ No newline at end of file
</mapper>
......@@ -17,7 +17,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, app_id, open_id, setup_id, pay_type, pay_num, pay_amount, avg_month, last_active,
id, app_id, open_id, setup_id, pay_type, pay_num, pay_amount, avg_month, last_active,
gmt_create, customer_sort, customer_publish
</sql>
......@@ -36,9 +36,9 @@
on rue.app_id = ai.appid
where
rue.is_deleted = 0
<if test="openId != null and openId != ''">
rue.open_id = #{openId} and
and rue.open_id = #{openId} and
</if>
timestampdiff(HOUR, rue.last_active, now()) &lt; 48
......@@ -82,6 +82,7 @@
on rue.app_id = ai.appid
where find_in_set(#{packageId}, rue.in_package)
and rue.is_deleted = 0
</select>
......@@ -97,6 +98,7 @@
DATEDIFF(now(),gmt_create) as dateDiff
from register_user_entity
where find_in_set(#{packageId}, in_package) and TIMESTAMPDIFF(HOUR,last_active,now() ) &lt; 48
and is_deleted = 0
</select>
......@@ -140,6 +142,6 @@
select id,app_id,customer_sort,customer_publish ,first_active from register_user_entity
where customer_sort > 0 AND first_active is not null and customer_publish &lt; #{requestDate}
where customer_sort > 0 AND first_active is not null and customer_publish &lt; #{requestDate} and is_deleted = 0
</select>
</mapper>
\ No newline at end of file
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论