Commit 990c424f authored by libin's avatar libin

团队

parent add2720a
......@@ -143,6 +143,7 @@ public class AppUserSellingWater implements Serializable {
/**
* 所获佣金
*/
@Column(name = "commission")
private BigDecimal commission;
......
......@@ -150,11 +150,7 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
return AopContext.currentProxy() != null ? (AppUserRelationBiz) AopContext.currentProxy() : this;
}
public PageDataVO<AppUserRelation> findMemberPageByLeaderId(Integer userId, Integer pageNo, Integer pageSize) {
Example example = new Example(AppUserRelation.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("parentId",userId);
criteria.andEqualTo("isDel",0);
return PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByExample(example));
public PageDataVO<AppUserRelation> findMemberPageByLeaderId(Integer leaderId, Integer pageNo, Integer pageSize) {
return PageDataVO.pageInfo(pageNo, pageSize, () -> mapper.selectByLeaderId(leaderId));
}
}
\ No newline at end of file
......@@ -3,6 +3,8 @@ package com.github.wxiaoqi.security.admin.mapper;
import com.github.wxiaoqi.security.admin.entity.AppUserRelation;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
/**
* 用户关系表
*
......@@ -12,4 +14,6 @@ import tk.mybatis.mapper.common.Mapper;
*/
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