管理后台增加交易单号
This commit is contained in:
@@ -45,6 +45,7 @@ jobs:
|
||||
ls -la dist
|
||||
|
||||
- name: SSH 部署到生产机(蓝绿原子切换)
|
||||
id: deploy
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.ZT_CLOSET_PROD_SSH_KEY }}
|
||||
SSH_HOST: ${{ vars.ZT_CLOSET_PROD_SSH_HOST }}
|
||||
@@ -107,22 +108,20 @@ jobs:
|
||||
if: always()
|
||||
env:
|
||||
DINGTALK_TOKEN: ${{ secrets.ZT_CLOSET_DINGTALK_TOKEN }}
|
||||
JOB_RESULT: ${{ jobs.build-and-deploy.result }}
|
||||
# 部署步骤的结论:success / failure / skipped / cancelled(部署被跳过或失败均视为失败)
|
||||
DEPLOY_OUTCOME: ${{ steps.deploy.outcome }}
|
||||
run: |
|
||||
if [ "$JOB_RESULT" = "success" ]; then
|
||||
if [ "$DEPLOY_OUTCOME" = "success" ]; then
|
||||
STATUS="✅ 前端部署成功"
|
||||
COLOR="info"
|
||||
else
|
||||
STATUS="❌ 前端部署失败"
|
||||
COLOR="warning"
|
||||
fi
|
||||
|
||||
# 单行拼装 payload:避免多行双引号转义导致 shell 语法错误;\n 交由 JSON 解析为换行
|
||||
TEXT="## 前端部署通知\n\n**结果**:${STATUS}\n\n**触发人**:${{ gitea.actor }}\n**分支/标签**:${{ gitea.ref_name }}\n**提交**:[${{ gitea.sha }}](${{ gitea.server_url }}/${{ gitea.repository }}/commit/${{ gitea.sha }})\n**流水线**:[${{ gitea.run_id }}](${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }})"
|
||||
PAYLOAD="{\"msgtype\":\"markdown\",\"markdown\":{\"title\":\"前端部署通知\",\"text\":\"${TEXT}\"}}"
|
||||
|
||||
curl -s -X POST "https://oapi.dingtalk.com/robot/send?access_token=${DINGTALK_TOKEN}" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{
|
||||
\"msgtype\": \"markdown\",
|
||||
\"markdown\": {
|
||||
\"title\": \"前端部署通知\",
|
||||
\"text\": \"## 前端部署通知\n\n**结果**:<font color=\\\"${COLOR}\\\">${STATUS}</font>\n\n**触发人**:${{ gitea.actor }}\n**分支/标签**:${{ gitea.ref_name }}\n**提交**:[${{ gitea.sha }}](${{ gitea.server_url }}/${{ gitea.repository }}/commit/${{ gitea.sha }})\n**流水线**:[${{ gitea.run_id }}](${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }})\n"
|
||||
}
|
||||
}"
|
||||
-d "$PAYLOAD"
|
||||
echo "钉钉通知已发送:${STATUS}"
|
||||
|
||||
@@ -29,6 +29,8 @@ export interface OrderListQuery {
|
||||
page?: number
|
||||
page_size?: number
|
||||
order_no?: string
|
||||
/** 微信交易号(精确) */
|
||||
transaction_id?: string
|
||||
user_id?: number
|
||||
status?: number
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ const pageSize = ref(10)
|
||||
|
||||
const query = reactive({
|
||||
order_no: '',
|
||||
transaction_id: '',
|
||||
user_id: undefined as number | undefined,
|
||||
status: undefined as number | undefined,
|
||||
})
|
||||
@@ -27,6 +28,7 @@ async function fetchList() {
|
||||
page: page.value,
|
||||
page_size: pageSize.value,
|
||||
order_no: query.order_no || undefined,
|
||||
transaction_id: query.transaction_id || undefined,
|
||||
user_id: query.user_id || undefined,
|
||||
status: query.status,
|
||||
})
|
||||
@@ -46,6 +48,7 @@ function handleSearch() {
|
||||
|
||||
function handleReset() {
|
||||
query.order_no = ''
|
||||
query.transaction_id = ''
|
||||
query.user_id = undefined
|
||||
query.status = undefined
|
||||
handleSearch()
|
||||
@@ -80,6 +83,12 @@ async function openDetail(row: OrderItem) {
|
||||
clearable
|
||||
@keyup.enter="handleSearch"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.transaction_id"
|
||||
placeholder="交易单号(精确)"
|
||||
clearable
|
||||
@keyup.enter="handleSearch"
|
||||
/>
|
||||
<el-input
|
||||
v-model.number="query.user_id"
|
||||
placeholder="用户 ID"
|
||||
|
||||
Reference in New Issue
Block a user