This commit is contained in:
wangxiaopeng
2024-03-26 20:37:28 +08:00
parent 4416f8aef5
commit be8195fe93
3 changed files with 2 additions and 231 deletions

View File

@@ -38,7 +38,6 @@ public interface HyPartnerUserInfoMapper {
HyPartnerUserInfoDO selectByOpenid(@Param("openid") String openid);
/**
* 根据partnerIDs批量查询用户信息
* @param partnerIdList
@@ -46,10 +45,6 @@ public interface HyPartnerUserInfoMapper {
*/
List<HyPartnerUserInfoDO> selectByPartnerIds(@Param("partnerIdList") List<String> partnerIdList);
int updateJoinKnowById(@Param("isWritePartnerKnow")Integer isWritePartnerKnow, @Param("id")Long id);
int selectByHourDateCount(@Param("selectTime") String hourDayDate, @Param("now") String now);
int updateByPartnerId(@Param("record") HyPartnerUserInfoDO record);
String selectLastCrmCreateTime();

View File

@@ -5,28 +5,14 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="live_area" jdbcType="VARCHAR" property="liveArea" />
<result column="want_shop_area" jdbcType="VARCHAR" property="wantShopArea" />
<result column="accept_adjust_type" jdbcType="TINYINT" property="acceptAdjustType" />
<result column="invite_code" jdbcType="VARCHAR" property="inviteCode" />
<result column="is_write_partner_know" jdbcType="TINYINT" property="isWritePartnerKnow" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="shop_code" jdbcType="VARCHAR" property="shopCode" />
<result column="shop_name" jdbcType="VARCHAR" property="shopName" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="recommend_partner_id" jdbcType="VARCHAR" property="recommendPartnerId" />
<result column="recommend_partner_name" jdbcType="VARCHAR" property="recommendPartnerName" />
<result column="recommend_partner_mobile" jdbcType="VARCHAR" property="recommendPartnerMobile" />
<result column="user_channel_id" jdbcType="BIGINT" property="userChannelId" />
<result column="crm_create_time" jdbcType="TIMESTAMP" property="crmCreateTime" />
<result column="openid" jdbcType="VARCHAR" property="openid" />
</resultMap>
<sql id="Base_Column_List">
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
invite_code, is_write_partner_know, create_time, update_time, shop_code, shop_name, shop_id,
recommend_partner_id, recommend_partner_name, recommend_partner_mobile,user_channel_id,openid
id, partner_id, mobile, create_time, update_time, user_channel_id, crm_create_time, openid
</sql>
<select id="selectByPartnerId" resultMap="BaseResultMap" >
select
@@ -62,31 +48,6 @@
</where>
</select>
<select id="selectByHourDateCount" resultType="java.lang.Integer">
SELECT
count(*)
FROM
hy_partner_line_info a
LEFT JOIN xfsg_partner_user_info b ON a.partner_id = b.partner_id
AND a.deleted = 0
LEFT JOIN hy_partner_user_channel c ON b.user_channel_id = c.channel_id
LEFT JOIN enterprise_user d ON a.investment_manager = d.user_id
AND d.deleted = 0
LEFT JOIN (
SELECT
partner_id,
IFNULL( COUNT( 1 ), 0 ) AS followCount
FROM
hy_partner_line_info
WHERE
( deleted = 1 OR ( deleted = 0 AND line_status IN ( 0, 3 ) AND close_time IS NOT NULL ) )
AND investment_manager IS NOT NULL
GROUP BY
partner_id
) tl_l ON b.partner_id = tl_l.partner_id
WHERE (b.update_time BETWEEN #{selectTime} and #{now} or
a.update_time BETWEEN #{selectTime} and #{now} ) and b.partner_id is not null
</select>
<select id="selectLastCrmCreateTime" resultType="java.lang.String">
SELECT crm_create_time as crmCreateTime FROM xfsg_partner_user_info ORDER BY crm_create_time desc limit 1
</select>
@@ -100,48 +61,12 @@
<if test="record.mobile != null">
mobile,
</if>
<if test="record.username != null">
username,
</if>
<if test="record.liveArea != null">
live_area,
</if>
<if test="record.wantShopArea != null">
want_shop_area,
</if>
<if test="record.acceptAdjustType != null">
accept_adjust_type,
</if>
<if test="record.inviteCode != null">
invite_code,
</if>
<if test="record.isWritePartnerKnow != null">
is_write_partner_know,
</if>
<if test="record.createTime != null">
create_time,
</if>
<if test="record.updateTime != null">
update_time,
</if>
<if test="record.shopCode != null">
shop_code,
</if>
<if test="record.shopName != null">
shop_name,
</if>
<if test="record.shopId != null">
shop_id,
</if>
<if test="record.recommendPartnerId != null">
recommend_partner_id,
</if>
<if test="record.recommendPartnerName != null">
recommend_partner_name,
</if>
<if test="record.recommendPartnerMobile != null">
recommend_partner_mobile,
</if>
<if test="record.userChannelId!=null">
user_channel_id,
</if>
@@ -162,48 +87,12 @@
<if test="record.mobile != null">
#{record.mobile},
</if>
<if test="record.username != null">
#{record.username},
</if>
<if test="record.liveArea != null">
#{record.liveArea},
</if>
<if test="record.wantShopArea != null">
#{record.wantShopArea},
</if>
<if test="record.acceptAdjustType != null">
#{record.acceptAdjustType},
</if>
<if test="record.inviteCode != null">
#{record.inviteCode},
</if>
<if test="record.isWritePartnerKnow != null">
#{record.isWritePartnerKnow},
</if>
<if test="record.createTime != null">
#{record.createTime},
</if>
<if test="record.updateTime != null">
#{record.updateTime},
</if>
<if test="record.shopCode != null">
#{record.shopCode},
</if>
<if test="record.shopName != null">
#{record.shopName},
</if>
<if test="record.shopId != null">
#{record.shopId},
</if>
<if test="record.recommendPartnerId != null">
#{record.recommendPartnerId},
</if>
<if test="record.recommendPartnerName != null">
#{record.recommendPartnerName},
</if>
<if test="record.recommendPartnerMobile != null">
#{record.recommendPartnerMobile},
</if>
<if test="record.userChannelId != null">
#{record.userChannelId},
</if>
@@ -218,6 +107,7 @@
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
update xfsg_partner_user_info
<set>
@@ -227,48 +117,12 @@
<if test="record.mobile != null">
mobile = #{record.mobile},
</if>
<if test="record.username != null">
username = #{record.username},
</if>
<if test="record.liveArea != null">
live_area = #{record.liveArea},
</if>
<if test="record.wantShopArea != null">
want_shop_area = #{record.wantShopArea},
</if>
<if test="record.acceptAdjustType != null">
accept_adjust_type = #{record.acceptAdjustType},
</if>
<if test="record.inviteCode != null">
invite_code = #{record.inviteCode},
</if>
<if test="record.isWritePartnerKnow != null">
is_write_partner_know = #{record.isWritePartnerKnow},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime},
</if>
<if test="record.shopCode != null">
shop_code = #{record.shopCode},
</if>
<if test="record.shopName != null">
shop_name = #{record.shopName},
</if>
<if test="record.shopId != null">
shop_id = #{record.shopId},
</if>
<if test="record.recommendPartnerId != null">
recommend_partner_id = #{record.recommendPartnerId},
</if>
<if test="record.recommendPartnerName != null">
recommend_partner_name = #{record.recommendPartnerName},
</if>
<if test="record.recommendPartnerMobile != null">
recommend_partner_mobile = #{record.recommendPartnerMobile},
</if>
<if test="record.ecWantShopArea != null">
ec_want_shop_area = #{record.ecWantShopArea},
</if>
@@ -279,60 +133,18 @@
where id = #{record.id}
</update>
<update id="updateJoinKnowById">
update xfsg_partner_user_info
set `is_write_partner_know`=#{isWritePartnerKnow,jdbcType=INTEGER}
where id=#{id,jdbcType=BIGINT}
</update>
<update id="updateByPartnerId">
update xfsg_partner_user_info
<set>
<if test="record.mobile != null">
mobile = #{record.mobile},
</if>
<if test="record.username != null">
username = #{record.username},
</if>
<if test="record.liveArea != null">
live_area = #{record.liveArea},
</if>
<if test="record.wantShopArea != null">
want_shop_area = #{record.wantShopArea},
</if>
<if test="record.acceptAdjustType != null">
accept_adjust_type = #{record.acceptAdjustType},
</if>
<if test="record.inviteCode != null">
invite_code = #{record.inviteCode},
</if>
<if test="record.isWritePartnerKnow != null">
is_write_partner_know = #{record.isWritePartnerKnow},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime},
</if>
<if test="record.shopCode != null">
shop_code = #{record.shopCode},
</if>
<if test="record.shopName != null">
shop_name = #{record.shopName},
</if>
<if test="record.shopId != null">
shop_id = #{record.shopId},
</if>
<if test="record.recommendPartnerId != null">
recommend_partner_id = #{record.recommendPartnerId},
</if>
<if test="record.recommendPartnerName != null">
recommend_partner_name = #{record.recommendPartnerName},
</if>
<if test="record.recommendPartnerMobile != null">
recommend_partner_mobile = #{record.recommendPartnerMobile},
</if>
</set>
where partner_id = #{record.partnerId}
</update>

View File

@@ -30,23 +30,6 @@ public class HyPartnerUserInfoDO implements Serializable {
@ApiModelProperty("手机号")
private String mobile;
@ApiModelProperty("申请人姓名")
private String username;
@ApiModelProperty("常驻区域")
private String liveArea;
@ApiModelProperty("意向开店区域")
private String wantShopArea;
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
private Integer acceptAdjustType;
@ApiModelProperty("邀请码")
private String inviteCode;
@ApiModelProperty("是否填写加盟需知")
private Integer isWritePartnerKnow;
@ApiModelProperty("创建时间")
private Date createTime;
@@ -54,28 +37,9 @@ public class HyPartnerUserInfoDO implements Serializable {
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("店铺编码")
private String shopCode;
@ApiModelProperty("店铺名称")
private String shopName;
@ApiModelProperty("店铺ID")
private String shopId;
@ApiModelProperty("推荐加盟商id")
private String recommendPartnerId;
@ApiModelProperty("推荐加盟商姓名")
private String recommendPartnerName;
@ApiModelProperty("推荐加盟商手机号")
private String recommendPartnerMobile;
@ApiModelProperty("hy_partner_user_channel.channel_id")
private Integer userChannelId;
@ApiModelProperty("ec意向区域")
private String ecWantShopArea;