|
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.zbkj.common.constants.Constants;
|
|
@@ -39,7 +40,6 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 用户中心 服务实现类
|
|
|
-
|
|
|
*/
|
|
|
@Service
|
|
|
public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements UserCenterService {
|
|
@@ -82,10 +82,13 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
private OrganizationService organizationService;
|
|
|
@Autowired
|
|
|
private OrganizationDepartmentService organizationDepartmentService;
|
|
|
+ @Autowired
|
|
|
+ private UserBypassAccountService userBypassAccountService;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取个人中心详情
|
|
|
+ *
|
|
|
* @return 个人中心数据
|
|
|
*/
|
|
|
@Override
|
|
@@ -127,20 +130,22 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
response.setIsPromoter(true);
|
|
|
}
|
|
|
//企业用户获取企业以及部门
|
|
|
- Integer isEnterpriseUser = user.getIsEnterpriseUser();
|
|
|
- if (null==isEnterpriseUser||1==isEnterpriseUser){
|
|
|
+ LambdaQueryWrapper<UserBypassAccount> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(UserBypassAccount::getUserId, uid);
|
|
|
+ UserBypassAccount one = userBypassAccountService.getOne(queryWrapper);
|
|
|
+ if (null!=one){
|
|
|
+ response.setQyName("");
|
|
|
+ response.setBmName(one.getDepartment());
|
|
|
+ response.setRealName(one.getRealName());
|
|
|
+ }else{
|
|
|
response.setQyName("");
|
|
|
response.setBmName("");
|
|
|
response.setRealName("");
|
|
|
- }else{
|
|
|
- OrganizationDepartmentUser organizationDepartmentUser= organizationDepartmentUserService.selectIdByUserId(user.getId());
|
|
|
- Organization organization = organizationService.getById(organizationDepartmentUser.getOrganizationId());
|
|
|
- OrganizationDepartment organizationDepartment = organizationDepartmentService.getById(organizationDepartmentUser.getDepartmentId());
|
|
|
- response.setQyName(organization.getName());
|
|
|
- response.setBmName(organizationDepartment.getName());
|
|
|
- response.setRealName(user.getRealName());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 保存用户访问记录
|
|
|
asyncService.visitUserCenter(user.getId());
|
|
|
return response;
|
|
@@ -243,6 +248,7 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
|
|
|
/**
|
|
|
* 会员等级列表
|
|
|
+ *
|
|
|
* @return List<UserLevel>
|
|
|
*/
|
|
|
@Override
|
|
@@ -286,6 +292,7 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
|
|
|
/**
|
|
|
* 我的账户
|
|
|
+ *
|
|
|
* @return UserMyAccountResponse
|
|
|
*/
|
|
|
@Override
|
|
@@ -313,7 +320,8 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
|
|
|
/**
|
|
|
* 用户余额记录
|
|
|
- * @param recordType 记录类型:all-全部,expenditure-支出,income-收入,recharge-充值
|
|
|
+ *
|
|
|
+ * @param recordType 记录类型:all-全部,expenditure-支出,income-收入,recharge-充值
|
|
|
* @param pageRequest 分页参数
|
|
|
* @return PageInfo
|
|
|
*/
|
|
@@ -957,6 +965,7 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
|
|
|
/**
|
|
|
* 用户积分记录列表
|
|
|
+ *
|
|
|
* @param pageParamRequest 分页参数
|
|
|
* @return PageInfo<UserIntegralRecord>
|
|
|
*/
|
|
@@ -1051,6 +1060,7 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
|
|
|
/**
|
|
|
* 获取用户经验记录
|
|
|
+ *
|
|
|
* @param pageParamRequest 分页参数
|
|
|
* @return List<UserExperienceRecord>
|
|
|
*/
|
|
@@ -1070,6 +1080,7 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
|
|
|
/**
|
|
|
* 获取用户浏览足迹
|
|
|
+ *
|
|
|
* @return 用户浏览足迹
|
|
|
*/
|
|
|
@Override
|