提交 b57d6eb1 authored 作者: 陆's avatar

Merge remote-tracking branch 'origin/master'

...@@ -226,9 +226,10 @@ public class TbCfUserInfoController { ...@@ -226,9 +226,10 @@ public class TbCfUserInfoController {
} }
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
TbCfUserInfoEntity parentUser = tbCfUserInfoService.queryObject(userId); TbCfUserInfoEntity parentUser = tbCfUserInfoService.queryObject(userId);
Network parent=new Network(); Network parent = new Network();
BeanUtils.copyProperties(parentUser,parent); BeanUtils.copyProperties(parentUser, parent);
parent.setNum(tbCfUserInfoService.getUserNetworkCount(params)); parent.setNum(tbCfUserInfoService.getUserNetworkCount(params));
parent.setParentId(tbCfUserInfoService.getParentUser(userId));
Query query = new Query(params); Query query = new Query(params);
List<Network> networks = tbCfUserInfoService.getUserNetwork(query); List<Network> networks = tbCfUserInfoService.getUserNetwork(query);
int total = tbCfUserInfoService.getUserNetworkCount(query); int total = tbCfUserInfoService.getUserNetworkCount(query);
......
...@@ -56,4 +56,6 @@ public interface TbCfUserInfoDao extends BaseDao<TbCfUserInfoEntity> { ...@@ -56,4 +56,6 @@ public interface TbCfUserInfoDao extends BaseDao<TbCfUserInfoEntity> {
int getUserNetworkCount(Map<String, Object> params); int getUserNetworkCount(Map<String, Object> params);
BigDecimal getUserBonus(String userId); BigDecimal getUserBonus(String userId);
String getParentUser(String userId);
} }
...@@ -107,4 +107,6 @@ public interface TbCfUserInfoService { ...@@ -107,4 +107,6 @@ public interface TbCfUserInfoService {
List<Network> getUserNetwork(Map<String, Object> params); List<Network> getUserNetwork(Map<String, Object> params);
int getUserNetworkCount(Map<String, Object> params); int getUserNetworkCount(Map<String, Object> params);
String getParentUser(String userId);
} }
...@@ -237,6 +237,11 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService { ...@@ -237,6 +237,11 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
return tbCfUserInfoDao.getUserNetworkCount(params); return tbCfUserInfoDao.getUserNetworkCount(params);
} }
@Override
public String getParentUser(String userId) {
return tbCfUserInfoDao.getParentUser(userId);
}
/** /**
* 编码文件名 * 编码文件名
*/ */
......
...@@ -19,6 +19,7 @@ public class Network { ...@@ -19,6 +19,7 @@ public class Network {
private String email; private String email;
private String phone; private String phone;
private Integer num; private Integer num;
private String parentId;
public String getUserId() { public String getUserId() {
...@@ -85,4 +86,11 @@ public class Network { ...@@ -85,4 +86,11 @@ public class Network {
this.num = num; this.num = num;
} }
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
} }
...@@ -357,4 +357,7 @@ ...@@ -357,4 +357,7 @@
SELECT IFNULL(TRUNCATE(sum(amount),3),0) from bonus where user_info_user_id=#{userId} SELECT IFNULL(TRUNCATE(sum(amount),3),0) from bonus where user_info_user_id=#{userId}
</select> </select>
<select id="getParentUser" resultType="string">
SELECT user_info_user_id from network where network_info_user_id=#{userId}
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论