fix:登录调整
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.PartnerUserWechatBindDO;
|
||||
import com.cool.store.mapper.PartnerUserWechatBindMapper;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/2/19 15:09
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Repository
|
||||
public class PartnerUserWechatBindDAO {
|
||||
|
||||
@Resource
|
||||
PartnerUserWechatBindMapper partnerUserWechatBindMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param partnerUserWechatBindDO
|
||||
* @return
|
||||
*/
|
||||
public Integer insertSelective(PartnerUserWechatBindDO partnerUserWechatBindDO) {
|
||||
if (partnerUserWechatBindDO == null) {
|
||||
return 0;
|
||||
}
|
||||
return partnerUserWechatBindMapper.insertSelective(partnerUserWechatBindDO);
|
||||
}
|
||||
|
||||
|
||||
public PartnerUserWechatBindDO getByOpenIdAndPartnerId(String partnerId, String openId) {
|
||||
if (StringUtil.isNotEmpty(partnerId)|| StringUtil.isEmpty(openId)){
|
||||
return null;
|
||||
}
|
||||
return partnerUserWechatBindMapper.selectByPartnerAndOpenId(partnerId,openId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.PartnerUserWechatBindDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/2/19 15:07
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface PartnerUserWechatBindMapper extends Mapper<PartnerUserWechatBindDO> {
|
||||
|
||||
|
||||
/**
|
||||
* 根据partnerId与openId查询
|
||||
* @param partnerId
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
PartnerUserWechatBindDO selectByPartnerAndOpenId(String partnerId, String openId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.PartnerUserWechatBindMapper">
|
||||
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.PartnerUserWechatBindDO">
|
||||
<id column="id" property="id" jdbcType="BIGINT" />
|
||||
<result column="open_id" property="openId" jdbcType="VARCHAR" />
|
||||
<result column="bind_time" property="bindTime" jdbcType="TIMESTAMP" />
|
||||
<result column="partner_id" property="partnerId" jdbcType="VARCHAR" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByPartnerAndOpenId" resultMap="BaseResultMap">
|
||||
select * from zl_partner_user_wechat_bind where partner_id = #{partnerId} and open_id = #{openId}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user