# `Sp_Task_Send_Eleemployee_Birthday` (procedure)

> 定时过程执行(发送员工、客户生日)


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | OUT | `sCode` | `int` |
| 2 | OUT | `sReturn` | `longtext` |
| 3 | OUT | `sUserList` | `longtext` |
| 4 | OUT | `sUserData` | `longtext` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Task_Send_Eleemployee_Birthday`'`._

## Narrative

**Business context:** 小ai保驾护航 — scheduled push of employee birthday reminders. Member of the `Sp_Task_*` quartz-scheduled message family; mirror of `Sp_Task_Send_Elecustomer_Birthday` (customer-contact side).

**What it does:** Defaults `sBrId/sSuId/sCode`, declares `p_tBirthday=NOW()` and a static card-background `sPicPath`. Drops/creates temp table `Sp_Task_SendBirthday` with `(sUserId, sUserName, tBirthday, sPicPath, title, sAbstract)`, then `INSERT … SELECT` from `eleemployee E` join `sftlogininfo U on U.sEmployeeId=E.sId` where today matches `E.tBirthday`. Emits the temp table and packs the matching `sftlogininfo.sId` list as `sUserList=["…","…"]` for the dispatcher.

**Invocation:** Dispatched by the Quartz scheduler — `QuartzTask`/`TaskServiceImpl.doProOne()` runs the procedure named in the scheduler-job config; `sendMsgDoNew(...)` consumes `sUserList` (resolved through `viw_msguser` for 微信/邮件/登录ID) and renders via the configured `sMestemplateId`. No `gdsmodule`/form-master binding; not in xly-src 30100101 install scripts — DB-only.
