Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
12a648a2
Commit
12a648a2
authored
Jun 29, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://gitlab.yidian-inc.com/bp/goods
into develop
parents
ecb9830b
c461ec25
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
111 additions
and
24 deletions
+111
-24
ElasticGoodService.php
application/services/goods/ElasticGoodService.php
+8
-9
deploy-dev-config.sh
deploy/deploy_configs/deploy-dev-config.sh
+41
-0
assemble-dev-config.sh
deploy/dockerfile/assemble-dev-config.sh
+28
-0
IdCertification.php
...or/api/php_services/src/Certification/IdCertification.php
+2
-2
SocialCreditCertification.php
..._services/src/Certification/SocialCreditCertification.php
+0
-5
Ksyun.php
vendor/api/php_services/src/Ksy/Ksyun.php
+24
-0
InstalledVersions.php
vendor/composer/InstalledVersions.php
+3
-3
installed.json
vendor/composer/installed.json
+2
-2
installed.php
vendor/composer/installed.php
+3
-3
No files found.
application/services/goods/ElasticGoodService.php
View file @
12a648a2
...
...
@@ -129,22 +129,21 @@ class ElasticGoodService
"from"
=>
$from
,
"size"
=>
$size
,
"sort"
=>
$sortList
[
$sortType
],
// "query" => [
// "bool" => [
// "must" => [
// ["term" => ["audit_status" => GoodsSku::STATUS_PASS]],
// ["term" => ["online_status" => GoodsSku::ONLINE_STATUS_ONLINE]],
// ],
// ]
// ],
];
if
(
!
empty
(
$params
[
"search_content"
]))
{
$data
[
"query"
][
"multi_match"
]
=
[
$data
[
"query"
][
"
bool"
][
"must"
][
"
multi_match"
]
=
[
"query"
=>
$params
[
"search_content"
],
"fields"
=>
[
"goods_name"
,
"category_1_name"
,
"category_2_name"
,
"desc"
,
"life_account_name"
,
"shop_name"
],
];
}
// 注意这里顺序,必须 multi_match 在前,term在后
$data
[
"query"
][
"bool"
][
"must"
]
=
[
[
"term"
=>
[
"audit_status"
=>
GoodsSku
::
STATUS_PASS
]],
[
"term"
=>
[
"online_status"
=>
GoodsSku
::
ONLINE_STATUS_ONLINE
]],
];
$elasticClient
=
ElasticUtil
::
getInstance
();
$res
=
$elasticClient
->
searchDoc
(
self
::
INDEX
,
$data
);
...
...
deploy/deploy_configs/deploy-dev-config.sh
0 → 100644
View file @
12a648a2
#!/usr/bin/env bash
# Start commands for each container, one cmd a line
START_CMDS
=
"cd /home/services &&
${
start_cmd
}
"
# QA_PRE_START_CMD='
# export collect_coverage=true
# '
# Container names for each container, one name a line, same order with $start_cmds
CONTAINER_NAMES
=
"
api-
${
env
}
-
${
domain_prefix
}
"
# Port maps for each container, one map a line, same order with $start_cmds
DOCKER_PORT_MAPS
=
"
${
TARGET_PORT
}
:9000
"
# This is for changing container name, remove old containers when deploy new one
OLD_CONTAINER_NAMES
=
"
api-
${
env
}
-
${
domain_prefix
}
"
# Volumn maps for each container, one map a line, same order with $start_cmds
DOCKER_VOLUMN_MAPS
=
"
/home/worker/_logs/api-
${
env
}
-
${
domain_prefix
}
:/home/services/api.go2yd.com/logs
"
# Other docker run options
DOCKER_RUN_OPTIONS
=
"--cap-add SYS_PTRACE --restart=always --privileged"
# Image name
IMAGE_NAME
=
"docker2.yidian.com:5000/publish/
${
COMMIT_JOB
}
-
${
COMMIT_NUMBER
}
-image"
# This is for stopping container, kill sepicify process inside the container before 'docker stop' and 'docker rm'
DOCKER_PRESTOP_CMD
=
'mv /var/lib/logrotate.status /home/services/api.go2yd.com/logs/logrotate.status'
# Service port for apitest
SERVICE_PORT
=
${
TARGET_PORT
}
# Service port inside container
ORIGIN_SERVICE_PORT
=
"9000"
deploy/dockerfile/assemble-dev-config.sh
0 → 100644
View file @
12a648a2
#!/usr/bin/env bash
DIST_FILE_NAME
=
"*.tar.gz"
PROJECT_DIR
=
"api.go2yd.com"
START_SCRIPT
=
"./start_env/start_api.sh"
SYNC_DATA_OPERATIONS
=
"
tar zxf *.tar.gz -C start_env/api.go2yd.com/htdocs/Website
"
DEST_FILE_NAME
=
""
DEST_FILE_PATH
=
""
BASE_IMAGE
=
"docker2.yidian.com:5000/centos7/php72_without_nginx:20210201"
MAINTAINER
=
"cuiweifeng
\"
cuiweifeng@yidian-inc.com
\"
"
HOME_DIR
=
"/home/services"
LOG_DIRS
=
"
${
HOME_DIR
}
/
${
PROJECT_DIR
}
/logs
"
DATA_DIRS
=
"
"
vendor/api/php_services/src/Certification/IdCertification.php
View file @
12a648a2
...
...
@@ -6,8 +6,8 @@ use Api\PhpUtils\Http\Request;
class
IdCertification
{
private
const
key
=
'
32f9XIsReV4S15Ck_Sa3ky43XgAHUB9v
'
;
private
const
secret
=
'
usZbQYdI4PQeXhMftsRfHK2msj0DmSIl
'
;
private
const
key
=
'
_v7QkFPgzb887YD6BuBqzHPJMJalJ6Zt
'
;
private
const
secret
=
'
mDenoicZs2U_wd2jVmQQpCOPeM8jaFRu
'
;
private
const
kuangshi_ocr_url
=
'https://api.megvii.com/faceid/v3/ocridcard'
;
private
const
kuangshi_get_token
=
'https://api.megvii.com/faceid/v3/sdk/get_biz_token'
;
private
const
kuangshi_face_compare
=
'https://api.megvii.com/faceid/v3/sdk/verify'
;
...
...
vendor/api/php_services/src/Certification/SocialCreditCertification.php
View file @
12a648a2
...
...
@@ -17,11 +17,6 @@ class SocialCreditCertification
*/
public
static
function
checkSocialCredit
(
string
$social_creadit_code
)
:
bool
{
// todo 长度判断
// if (strlen($social_creadit_code) !== 18) {
// return false;
// }
$one
=
'159Y'
;
//第一位可以出现的字符
$two
=
'12391'
;
//第二位可以出现的字符
$str
=
strtoupper
(
$social_creadit_code
);
...
...
vendor/api/php_services/src/Ksy/Ksyun.php
View file @
12a648a2
...
...
@@ -8,7 +8,9 @@ class Ksyun
private
const
jinshan_ak
=
'AKLTnATdoXUnR72IDSGgN2WSOQ'
;
//AccessKey
private
const
jinshan_sk
=
'OMw7UAOkrLVsRevuP44ctAlfzriDzUm9+JvOFoYuiSoLgaLJWi+kjUa+4G3EWXFakQ=='
;
//SecretKey
private
const
bp_bucket
=
'bp-yidian'
;
private
const
bp_image_yidian
=
'bp-image_yidian'
;
private
const
get_down_from_ksyun
=
'http://video-stream-service.int.yidian-inc.com/auth/url-get'
;
private
const
get_down_from_pic_service
=
'https://ibp.go2yd.com/imagebp.php'
;
//来自图片服务
/**
* 支持批量
...
...
@@ -111,6 +113,9 @@ class Ksyun
public
static
function
getBucket
(
$appid
,
$scenario
)
:
string
{
if
(
$appid
===
'merchant-b'
||
$appid
===
'merchant-c'
)
{
if
(
$scenario
===
'goods'
)
{
return
self
::
bp_image_yidian
;
}
return
self
::
bp_bucket
;
}
return
''
;
...
...
@@ -126,4 +131,23 @@ class Ksyun
{
return
[
'bucket'
=>
self
::
getBucket
(
$appid
,
$scenario
),
'objectId'
=>
md5
(
uniqid
(
mt_rand
(),
true
))];
}
/**
* 获取可支持裁剪的图片url
* @param $bucket
* @param $objectid
* @param $wideSize
* @param $highSize
* @param string $type 目前只支持 png webp jpeg
* @wiki http://ydwiki.yidian-inc.com/pages/viewpage.action?pageId=41584585
* @return string
*/
public
static
function
getCutPicUtl
(
$bucket
,
$objectid
,
$wideSize
,
$highSize
,
$type
=
'jepg'
)
{
if
(
$bucket
!==
self
::
bp_image_yidian
||
!
in_array
(
$type
,[
'png'
,
'webp'
,
'jpeg'
]))
{
//目前只有当bucket == bp-image_yidian 才支持可裁剪
return
''
;
}
return
sprintf
(
self
::
get_down_from_pic_service
.
'?'
.
'url=%s&%s_%sx%s'
,
$objectid
,
$type
,
$wideSize
,
$highSize
);
}
}
\ No newline at end of file
vendor/composer/InstalledVersions.php
View file @
12a648a2
...
...
@@ -32,7 +32,7 @@ private static $installed = array (
'aliases'
=>
array
(
),
'reference'
=>
'
0d55d1b988fb0ef7b715037568463cf4b8fa5e88
'
,
'reference'
=>
'
63ee061ebc9d20745b003c183f10caefb377bed6
'
,
'name'
=>
'yidian/yaf_demo'
,
),
'versions'
=>
...
...
@@ -45,7 +45,7 @@ private static $installed = array (
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
d12158b756ba1aee7d019a8d25ca79f49bbe1d8c
'
,
'reference'
=>
'
9a1982a7a382d51a8b58e121a63248c258d2ca9f
'
,
),
'api/php_utils'
=>
array
(
...
...
@@ -335,7 +335,7 @@ private static $installed = array (
'aliases'
=>
array
(
),
'reference'
=>
'
0d55d1b988fb0ef7b715037568463cf4b8fa5e88
'
,
'reference'
=>
'
63ee061ebc9d20745b003c183f10caefb377bed6
'
,
),
),
);
...
...
vendor/composer/installed.json
View file @
12a648a2
...
...
@@ -7,7 +7,7 @@
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://git.yidian-inc.com:8021/bp/php_services.git"
,
"reference"
:
"
d12158b756ba1aee7d019a8d25ca79f49bbe1d8c
"
"reference"
:
"
9a1982a7a382d51a8b58e121a63248c258d2ca9f
"
},
"require"
:
{
"api/php_utils"
:
"dev-master"
,
...
...
@@ -15,7 +15,7 @@
"perftools/php-profiler"
:
"^0.18.0"
,
"php"
:
"7.2.*"
},
"time"
:
"2021-06-2
8T03:58:57
+00:00"
,
"time"
:
"2021-06-2
9T03:09:21
+00:00"
,
"default-branch"
:
true
,
"type"
:
"library"
,
"installation-source"
:
"source"
,
...
...
vendor/composer/installed.php
View file @
12a648a2
...
...
@@ -6,7 +6,7 @@
'aliases'
=>
array
(
),
'reference'
=>
'
0d55d1b988fb0ef7b715037568463cf4b8fa5e88
'
,
'reference'
=>
'
63ee061ebc9d20745b003c183f10caefb377bed6
'
,
'name'
=>
'yidian/yaf_demo'
,
),
'versions'
=>
...
...
@@ -19,7 +19,7 @@
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
d12158b756ba1aee7d019a8d25ca79f49bbe1d8c
'
,
'reference'
=>
'
9a1982a7a382d51a8b58e121a63248c258d2ca9f
'
,
),
'api/php_utils'
=>
array
(
...
...
@@ -309,7 +309,7 @@
'aliases'
=>
array
(
),
'reference'
=>
'
0d55d1b988fb0ef7b715037568463cf4b8fa5e88
'
,
'reference'
=>
'
63ee061ebc9d20745b003c183f10caefb377bed6
'
,
),
),
);
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