|
@@ -81,19 +81,16 @@ class CityWarningNoticeJobs implements ShouldQueue
|
|
|
})->where(function ($query) {
|
|
})->where(function ($query) {
|
|
|
$query->orWhere('city_id', '0')->orWhere('city_name', '未知')->orWhere('city_name', '');
|
|
$query->orWhere('city_id', '0')->orWhere('city_name', '未知')->orWhere('city_name', '');
|
|
|
})->where($map)->count();
|
|
})->where($map)->count();
|
|
|
|
|
+ if ($low_price_goods_count == 0 && $violation_product_count == 0 && $violation_store_count == 0) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ };
|
|
|
//发送预警通知
|
|
//发送预警通知
|
|
|
if ($low_price_goods_count > 0 || $violation_product_count > 0 || $violation_store_count > 0) {
|
|
if ($low_price_goods_count > 0 || $violation_product_count > 0 || $violation_store_count > 0) {
|
|
|
- $email_titl = "数据清洗-城市为空预警通知:\n";
|
|
|
|
|
- $email_content = "数据查询时间:" . date('Y-m-d H:i:s', $start_time) . "-" . date('Y-m-d H:i:s', $end_time) . "\n";
|
|
|
|
|
- if ($low_price_goods_count > 0) {
|
|
|
|
|
- $email_content .= "低价商品省份城市为空或者未知数据数量:" . $low_price_goods_count . "\n";
|
|
|
|
|
- }
|
|
|
|
|
- if ($violation_product_count > 0) {
|
|
|
|
|
- $email_content .= "禁止商品省份城市为空或者未知数据数量:" . $violation_product_count . "\n";
|
|
|
|
|
- }
|
|
|
|
|
- if ($violation_store_count > 0) {
|
|
|
|
|
- $email_content .= "违规店铺省份城市为空或者未知数据数量:" . $violation_store_count . "\n";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $email_titl = "数据清洗-城市为空预警通知";
|
|
|
|
|
+ $email_content = "数据查询时间:" . date('Y-m-d H:i:s', $start_time) . " - " . date('Y-m-d H:i:s', $end_time).
|
|
|
|
|
+ " 低价商品省份城市为空或者未知数据数量:" . $low_price_goods_count.'条,'.
|
|
|
|
|
+ " 禁止商品省份城市为空或者未知数据数量:" . $violation_product_count.'条,'.
|
|
|
|
|
+ " 违规店铺省份城市为空或者未知数据数量:" . $violation_store_count.'条';
|
|
|
//发送预警通知
|
|
//发送预警通知
|
|
|
foreach ($email_notice_list as $email_notice) {
|
|
foreach ($email_notice_list as $email_notice) {
|
|
|
$message_data = [
|
|
$message_data = [
|