Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8dcf4a96
authored
Jul 03, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加是否发邮件判断
parent
2cf74328
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
app/Http/Services/SyncSupplierService.php
app/Http/function.php
app/Http/Services/SyncSupplierService.php
View file @
8dcf4a96
...
@@ -348,8 +348,11 @@ class SyncSupplierService
...
@@ -348,8 +348,11 @@ class SyncSupplierService
return
true
;
return
true
;
}
}
//本地
if
(
isDevEnvironment
())
{
return
true
;
}
//return true;
//return true;
//还要去发送邮箱给采购员,线上采购员,采购总
//还要去发送邮箱给采购员,线上采购员,采购总
$data
[
'data'
][
'supplier_code'
]
=
$supplier
[
'supplier_code'
];
$data
[
'data'
][
'supplier_code'
]
=
$supplier
[
'supplier_code'
];
$data
[
'data'
][
'supplier_name'
]
=
$supplier
[
'supplier_name'
];
$data
[
'data'
][
'supplier_name'
]
=
$supplier
[
'supplier_name'
];
...
...
app/Http/function.php
View file @
8dcf4a96
...
@@ -228,15 +228,15 @@ function checkArrayAllValueNull($array, $excludeField = [])
...
@@ -228,15 +228,15 @@ function checkArrayAllValueNull($array, $excludeField = [])
function
generateMobile
(
$count
)
function
generateMobile
(
$count
)
{
{
$arr
=
[
$arr
=
[
130
,
131
,
132
,
133
,
134
,
135
,
136
,
137
,
138
,
139
,
130
,
131
,
132
,
133
,
134
,
135
,
136
,
137
,
138
,
139
,
144
,
147
,
144
,
147
,
150
,
151
,
152
,
153
,
155
,
156
,
157
,
158
,
159
,
150
,
151
,
152
,
153
,
155
,
156
,
157
,
158
,
159
,
176
,
177
,
178
,
176
,
177
,
178
,
180
,
181
,
182
,
183
,
184
,
185
,
186
,
187
,
188
,
189
,
180
,
181
,
182
,
183
,
184
,
185
,
186
,
187
,
188
,
189
,
];
];
$phone
=
[];
$phone
=
[];
for
(
$i
=
0
;
$i
<
$count
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
$count
;
$i
++
)
{
$phone
[]
=
$arr
[
array_rand
(
$arr
)]
.
''
.
mt_rand
(
1000
,
9999
)
.
''
.
mt_rand
(
1000
,
9999
);
$phone
[]
=
$arr
[
array_rand
(
$arr
)]
.
''
.
mt_rand
(
1000
,
9999
)
.
''
.
mt_rand
(
1000
,
9999
);
}
}
return
array_unique
(
$phone
);
return
array_unique
(
$phone
);
}
}
...
@@ -251,21 +251,21 @@ function makePassword($length)
...
@@ -251,21 +251,21 @@ function makePassword($length)
// 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y','Z',
// 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y','Z',
// '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
// '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
$str
=
array
(
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
,
'g'
,
'h'
,
$str
=
array
(
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
,
'g'
,
'h'
,
'i'
,
'j'
,
'k'
,
'l'
,
'm'
,
'n'
,
'o'
,
'p'
,
'q'
,
'r'
,
's'
,
'i'
,
'j'
,
'k'
,
'l'
,
'm'
,
'n'
,
'o'
,
'p'
,
'q'
,
'r'
,
's'
,
't'
,
'u'
,
'v'
,
'w'
,
'x'
,
'y'
,
'z'
,
't'
,
'u'
,
'v'
,
'w'
,
'x'
,
'y'
,
'z'
,
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
);
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
);
// 在 $str 中随机取 $length 个数组元素键名
// 在 $str 中随机取 $length 个数组元素键名
$keys
=
array_rand
(
$str
,
$length
);
$keys
=
array_rand
(
$str
,
$length
);
$password
=
''
;
$password
=
''
;
for
(
$i
=
0
;
$i
<
$length
;
$i
++
)
for
(
$i
=
0
;
$i
<
$length
;
$i
++
)
{
{
// 将 $length 个数组元素连接成字符串
// 将 $length 个数组元素连接成字符串
$password
.=
$str
[
$keys
[
$i
]];
$password
.=
$str
[
$keys
[
$i
]];
}
}
return
$password
;
return
$password
;
}
}
function
isDateTime
(
$dateTime
){
function
isDateTime
(
$dateTime
)
{
$ret
=
strtotime
(
$dateTime
);
$ret
=
strtotime
(
$dateTime
);
return
$ret
!==
FALSE
&&
$ret
!=
-
1
;
return
$ret
!==
FALSE
&&
$ret
!=
-
1
;
}
}
...
@@ -327,3 +327,8 @@ function replaceSpace($str)
...
@@ -327,3 +327,8 @@ function replaceSpace($str)
$str
=
trim
(
$str
);
$str
=
trim
(
$str
);
return
$str
;
return
$str
;
}
}
function
isDevEnvironment
()
{
return
config
(
'perm.perm.menuId'
)
==
16
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment