Commit 990c424f authored by libin's avatar libin

团队

parent add2720a
...@@ -143,6 +143,7 @@ public class AppUserSellingWater implements Serializable { ...@@ -143,6 +143,7 @@ public class AppUserSellingWater implements Serializable {
/** /**
* 所获佣金 * 所获佣金
*/ */
@Column(name = "commission")
private BigDecimal commission; private BigDecimal commission;
......
...@@ -150,11 +150,7 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel ...@@ -150,11 +150,7 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
return AopContext.currentProxy() != null ? (AppUserRelationBiz) AopContext.currentProxy() : this; return AopContext.currentProxy() != null ? (AppUserRelationBiz) AopContext.currentProxy() : this;
} }
public PageDataVO<AppUserRelation> findMemberPageByLeaderId(Integer userId, Integer pageNo, Integer pageSize) { public PageDataVO<AppUserRelation> findMemberPageByLeaderId(Integer leaderId, Integer pageNo, Integer pageSize) {
Example example = new Example(AppUserRelation.class); return PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByLeaderId(leaderId));
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("parentId",userId);
criteria.andEqualTo("isDel",0);
return PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByExample(example));
} }
} }
\ No newline at end of file
...@@ -3,6 +3,8 @@ package com.github.wxiaoqi.security.admin.mapper; ...@@ -3,6 +3,8 @@ package com.github.wxiaoqi.security.admin.mapper;
import com.github.wxiaoqi.security.admin.entity.AppUserRelation; import com.github.wxiaoqi.security.admin.entity.AppUserRelation;
import tk.mybatis.mapper.common.Mapper; import tk.mybatis.mapper.common.Mapper;
import java.util.List;
/** /**
* 用户关系表 * 用户关系表
* *
...@@ -11,5 +13,7 @@ import tk.mybatis.mapper.common.Mapper; ...@@ -11,5 +13,7 @@ import tk.mybatis.mapper.common.Mapper;
* @date 2019-07-03 16:36:44 * @date 2019-07-03 16:36:44
*/ */
public interface AppUserRelationMapper extends Mapper<AppUserRelation> { public interface AppUserRelationMapper extends Mapper<AppUserRelation> {
List<AppUserRelation> selectByLeaderId(Integer leaderId);
} }
<?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.github.wxiaoqi.security.admin.mapper.AppUserRelationMapper">
<select id="selectByLeaderId" resultType="com.github.wxiaoqi.security.admin.entity.AppUserRelation">
select `parent_id` as `parentId`,`user_id`as `userId`,`bind_time` as `bindTime` from `app_user_relation` where `parent_id`=#{leaderId} and `is_del`=0;
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment