更新企微退出
parent
d45792761d
commit
c0ed8ce5b1
@ -0,0 +1,21 @@
|
||||
package com.baiye.dao;
|
||||
|
||||
import com.baiye.entity.WeChatUser;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author wjt
|
||||
* @date 2022/07/14
|
||||
*/
|
||||
@Mapper
|
||||
public interface WeChatUserMapper extends BaseMapper<WeChatUser> {
|
||||
/**
|
||||
* 微信id查找微信用户
|
||||
* @param wxId
|
||||
* @return
|
||||
*/
|
||||
WeChatUser findByWxId(@Param("wxid") String wxId);
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.baiye.entity;
|
||||
|
||||
import com.baiye.core.base.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import javax.persistence.Column;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wjt
|
||||
* @date 2022/07/14
|
||||
*/
|
||||
@Data
|
||||
@TableName("tb_wechat_user")
|
||||
public class WeChatUser extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4755997517585953316L;
|
||||
|
||||
@TableId(value = "id")
|
||||
@ApiModelProperty(value = "ID", hidden = true)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "login_type")
|
||||
@ApiModelProperty(value = "登录类型")
|
||||
private Integer loginType;
|
||||
|
||||
@Column(name = "nickname")
|
||||
@ApiModelProperty(value = "昵称")
|
||||
private String nickname;
|
||||
|
||||
@Column(name = "login_date")
|
||||
@ApiModelProperty(value = "登录时间")
|
||||
private Date loginDate;
|
||||
|
||||
@Column(name = "small_head_img_url")
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String smallHeadImgUrl;
|
||||
|
||||
@Column(name = "wx_id")
|
||||
@ApiModelProperty(value = "微信号")
|
||||
private String wxId;
|
||||
|
||||
@Column(name = "token")
|
||||
@ApiModelProperty(value = "token")
|
||||
private String token;
|
||||
|
||||
@Column(name = "random_id")
|
||||
@ApiModelProperty(value = "随机id")
|
||||
private String randomId;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?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.baiye.dao.WeChatUserMapper">
|
||||
|
||||
<resultMap id="WeChatUserMap" type="com.baiye.entity.WeChatUser">
|
||||
<id column="id" property="id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findByWxId" resultType="com.baiye.entity.WeChatUser">
|
||||
select * from tb_wechat_user
|
||||
<where>
|
||||
<if test="wxid!=null ">
|
||||
and wx_id = #{wxid}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue