|
@@ -11,6 +11,9 @@ import com.zbkj.common.constants.DateConstants;
|
|
|
import com.zbkj.common.constants.GroupDataConstants;
|
|
|
import com.zbkj.common.constants.SysConfigConstants;
|
|
|
import com.zbkj.common.exception.CrmebException;
|
|
|
+import com.zbkj.common.model.organization.Organization;
|
|
|
+import com.zbkj.common.model.organization.OrganizationDepartment;
|
|
|
+import com.zbkj.common.model.organization.OrganizationDepartmentUser;
|
|
|
import com.zbkj.common.model.product.Product;
|
|
|
import com.zbkj.common.model.record.BrowseRecord;
|
|
|
import com.zbkj.common.model.system.SystemUserLevel;
|
|
@@ -73,6 +76,12 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
private UserVisitRecordService userVisitRecordService;
|
|
|
@Autowired
|
|
|
private AsyncService asyncService;
|
|
|
+ @Autowired
|
|
|
+ private OrganizationDepartmentUserService organizationDepartmentUserService;
|
|
|
+ @Autowired
|
|
|
+ private OrganizationService organizationService;
|
|
|
+ @Autowired
|
|
|
+ private OrganizationDepartmentService organizationDepartmentService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -117,6 +126,18 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
|
|
if (retailStoreSwitch.equals(Constants.COMMON_SWITCH_OPEN) && user.getIsPromoter()) {
|
|
|
response.setIsPromoter(true);
|
|
|
}
|
|
|
+ //企业用户获取企业以及部门
|
|
|
+ Integer isEnterpriseUser = user.getIsEnterpriseUser();
|
|
|
+ if (null==isEnterpriseUser||1==isEnterpriseUser){
|
|
|
+ response.setQyName("");
|
|
|
+ response.setBmName("");
|
|
|
+ }else{
|
|
|
+ OrganizationDepartmentUser organizationDepartmentUser= organizationDepartmentUserService.selectIdByUserId(user.getId());
|
|
|
+ Organization organization = organizationService.getById(organizationDepartmentUser.getOrganizationId());
|
|
|
+ OrganizationDepartment organizationDepartment = organizationDepartmentService.getById(organizationDepartmentUser.getDepartmentId());
|
|
|
+ response.setQyName(organization.getCompanyName());
|
|
|
+ response.setBmName(organizationDepartment.getDepartmentName());
|
|
|
+ }
|
|
|
|
|
|
// 保存用户访问记录
|
|
|
asyncService.visitUserCenter(user.getId());
|