升级帮扶员,帮扶人

main
13233904609 5 months ago
parent c8e5b0a10c
commit 4041ce666b

@ -199,6 +199,6 @@ public interface MemberUserService {
* @param userId * @param userId
* @return * @return
*/ */
boolean updateUserUpgradesLevel(Long userId); void updateUserUpgradesLevel(Long userId);
} }

@ -352,25 +352,11 @@ public class MemberUserServiceImpl implements MemberUserService {
return false; return false;
} }
@Override @Override
public boolean updateUserUpgradesLevel(Long userId) { public void updateUserUpgradesLevel(Long userId) {
//查询帮扶人等级id recursionMemberLevel(userId);
List<MemberLevelDO> levelList = memberLevelMapper.selectList(new LambdaQueryWrapperX<MemberLevelDO>()
.eq(MemberLevelDO::getStatus, 0)
.eq(MemberLevelDO::getDeleted, 0)
.orderByAsc(MemberLevelDO::getLevel));
//循环处理帮扶人等级
for (MemberLevelDO vo:levelList) {
}
//先会员本身升级为帮扶员
int i = memberUserMapper.updateById(new MemberUserDO()
.setId(userId)
.setLevelId(levelList.get(0).getId())
);
// if(i>0){ // if(i>0){
// return true; // return true;
// } // }
return false;
} }
private void recursionMemberLevel(Long userId){ private void recursionMemberLevel(Long userId){

Loading…
Cancel
Save