feat:服务号通知
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.wechat.ServiceAccountOpenIdDTO;
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
import com.cool.store.mapper.HyPartnerUserInfoMapper;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -112,4 +113,11 @@ public class HyPartnerUserInfoDAO {
|
||||
|
||||
return hyPartnerUserInfoMapper.selectPasswordIsNull();
|
||||
}
|
||||
|
||||
public List<ServiceAccountOpenIdDTO> selectLastBindRecord(List<String> mobileList){
|
||||
if (CollectionUtils.isEmpty(mobileList)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return hyPartnerUserInfoMapper.selectLastBindRecord(mobileList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.wechat.ServiceAccountOpenIdDTO;
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -55,4 +56,6 @@ public interface HyPartnerUserInfoMapper extends tk.mybatis.mapper.common.Mappe
|
||||
|
||||
List<HyPartnerUserInfoDO> selectPasswordIsNull();
|
||||
|
||||
List<ServiceAccountOpenIdDTO> selectLastBindRecord(@Param("mobileList") List<String> mobileList);
|
||||
|
||||
}
|
||||
@@ -195,4 +195,23 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectLastBindRecord" resultType="com.cool.store.dto.wechat.ServiceAccountOpenIdDTO">
|
||||
select
|
||||
b.partner_id,
|
||||
b.union_id,
|
||||
.service_account_open_id,
|
||||
MAX(b.update_time)
|
||||
from xfsg_partner_user_info a
|
||||
left join xfsg_partner_user_wechat_bind b
|
||||
on a.partner_id = b.partner_id
|
||||
where b.partner_id is not null
|
||||
and service_account_open_id is not null
|
||||
<if test="mobileList !=null and mobileList.size>0">
|
||||
<foreach collection="mobileList" open="and mobile in (" close=")" separator="," item="mobile">
|
||||
#{mobile}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY b.partner_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user