# `viw_msguser` (view)


- **Updatable:** NO

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | NO |
| 2 | `sBrandsId` | `varchar(100)` | NO |
| 3 | `sSubsidiaryId` | `varchar(100)` | NO |
| 4 | `sUserId` | `varchar(100)` | NO |
| 5 | `sUserName` | `varchar(255)` | YES |
| 6 | `sWxUserName` | `varchar(255)` | YES |
| 7 | `sDingTalk` | `varchar(255)` | YES |
| 8 | `sDingTalkUnionid` | `varchar(50)` | NO |
| 9 | `sEmail` | `varchar(255)` | YES |
| 10 | `sPhone` | `varchar(255)` | YES |
| 11 | `sDepartId` | `varchar(100)` | YES |
| 12 | `sUserType` | `varchar(2)` | NO |

## Definition

```sql
select `sftlogininfo`.`sId` AS `sId`,`sftlogininfo`.`sBrandsId` AS `sBrandsId`,`sftlogininfo`.`sSubsidiaryId` AS `sSubsidiaryId`,`sftlogininfo`.`sId` AS `sUserId`,`sftlogininfo`.`sUserName` AS `sUserName`,`eleemployee`.`sWxUserName` AS `sWxUserName`,`eleemployee`.`sDingTalk` AS `sDingTalk`,`eleemployee`.`sDingTalkUnionid` AS `sDingTalkUnionid`,`eleemployee`.`sEmail` AS `sEmail`,`eleemployee`.`sMobile` AS `sPhone`,`eleemployee`.`sDepartId` AS `sDepartId`,'员工' AS `sUserType` from (`eleemployee` join `sftlogininfo` on(((`sftlogininfo`.`sEmployeeId` = `eleemployee`.`sId`) and (`sftlogininfo`.`sBrandsId` = `eleemployee`.`sBrandsId`) and (`sftlogininfo`.`sSubsidiaryId` = `eleemployee`.`sSubsidiaryId`)))) union all select `elecustomercontacts`.`sId` AS `sId`,`elecustomercontacts`.`sBrandsId` AS `sBrandsId`,`elecustomercontacts`.`sSubsidiaryId` AS `sSubsidiaryId`,`elecustomercontacts`.`sId` AS `sUserId`,`elecustomercontacts`.`sContacts` AS `sUserName`,`elecustomercontacts`.`sWxUserName` AS `sWxUserName`,`elecustomercontacts`.`sDingTalk` AS `sDingTalk`,'' AS `sDingTalkUnionid`,`elecustomercontacts`.`sEmail` AS `sEmail`,`elecustomercontacts`.`sMobile` AS `sPhone`,`elecustomercontacts`.`sParentId` AS `sDepartId`,'客户' AS `sUserType` from `elecustomercontacts`
```

## Narrative

_No human-written narrative yet._
