|
|
@@ -50,16 +50,17 @@ class ToDoReminder extends Command
|
|
|
$now = time();
|
|
|
|
|
|
$wxService = new WxTemplateMessageService();
|
|
|
+ $appid = config("wx_msg.f_appid");
|
|
|
TodoList::where('status', '<', TodoList::status_two)
|
|
|
->where('del_time', 0)
|
|
|
->where('remind_start', '<=', $now)
|
|
|
->select(TodoList::$field)
|
|
|
->orderBy('id')
|
|
|
- ->chunkById(10, function ($data) use ($now, $wxService) {
|
|
|
+ ->chunkById(10, function ($data) use ($now, $wxService, $appid) {
|
|
|
// 查找关联员工 openid
|
|
|
$wxInfo = WxEmployeeOfficial::where('employee_id', array_column($data,'crt_id'))
|
|
|
->where('type', WxEmployeeOfficial::login_type_two)
|
|
|
- ->where('del_time', 0)
|
|
|
+ ->where('appid', $appid)
|
|
|
->pluck('open_id','id')
|
|
|
->toArray();
|
|
|
|