3.5.0
This commit is contained in:
@@ -16,9 +16,13 @@
|
||||
|
||||
|
||||
package org.maxkey.persistence.mapper;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.entity.SocialsAssociate;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
|
||||
public interface SocialsAssociateMapper extends IJpaBaseMapper<SocialsAssociate> {
|
||||
|
||||
public List<SocialsAssociate> queryByUser(UserInfo user);
|
||||
}
|
||||
|
||||
@@ -17,8 +17,11 @@
|
||||
|
||||
package org.maxkey.persistence.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.maxkey.entity.SocialsAssociate;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
import org.maxkey.persistence.mapper.SocialsAssociateMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -38,5 +41,9 @@ public class SocialsAssociatesService extends JpaBaseService<SocialsAssociate>{
|
||||
return (SocialsAssociateMapper)super.getMapper();
|
||||
}
|
||||
|
||||
|
||||
public List<SocialsAssociate> queryByUser(UserInfo user) {
|
||||
return getMapper().queryByUser(user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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="org.maxkey.persistence.mapper.SocialsAssociateMapper">
|
||||
|
||||
|
||||
<select id="queryByUser" parameterType="UserInfo" resultType="SocialsAssociate">
|
||||
select
|
||||
p.provider,
|
||||
p.providerName,
|
||||
p.icon,
|
||||
a.id,
|
||||
a.userid,
|
||||
a.username,
|
||||
a.createdDate,
|
||||
a.updatedDate
|
||||
from
|
||||
mxk_socials_provider p
|
||||
left join
|
||||
mxk_socials_associate a
|
||||
|
||||
on a.provider = p.provider and a.userid = #{id}
|
||||
|
||||
where
|
||||
a.instid = p.instid
|
||||
and a.instid = #{instId}
|
||||
and p.status =1
|
||||
order by p.sortindex
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user