Phase1 后端核心:
- 新增 fsgx_v1.sql 迁移脚本(is_queue_goods/frozen_points/available_points/no_assess)
- SystemConfigServices 返佣设置扩展(周期人数/分档比例/范围/时机)
- StoreOrderCreateServices 周期循环佣金计算
- StoreOrderTakeServices 佣金发放后同步冻结积分
- StoreProductServices/StoreProduct 保存 is_queue_goods
Phase2 后端接口:
- GET /api/hjf/brokerage/progress 佣金周期进度
- GET /api/hjf/assets/overview 资产总览
- HjfPointsServices 每日 frozen_points 0.4‰ 释放定时任务
- PUT /adminapi/hjf/member/{uid}/no_assess 不考核接口
- GET /adminapi/hjf/points/release_log 积分日志接口
Phase3 前端清理:
- hjfCustom.js 路由精简(仅保留 points/log)
- hjfQueue.js/hjfMember.js API 清理/重定向至 CRMEB 原生接口
- pages.json 公排→推荐佣金/佣金记录/佣金规则
Phase4-5 前端改造:
- queue/status.vue 推荐佣金进度页整体重写
- 商品详情/订单确认/支付结果页文案与逻辑改造
- 个人中心/资产页/引导页/规则页文案改造
- HjfQueueProgress/HjfRefundNotice/HjfAssetCard 组件改造
- 推广中心嵌入佣金进度摘要
- hjfMockData.js 全量更新(公排字段→佣金字段)
Phase6 Admin 增强:
- 用户列表新增 frozen_points/available_points 列及不考核操作按钮
- hjfPoints.js USE_MOCK=false 对接真实积分日志接口
Phase7 配置文档:
- docs/fsgx-phase7-config-checklist.md 后台配置与全链路验收清单
Made-with: Cursor
212 lines
9.3 KiB
HTML
212 lines
9.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>{$title|default=''} - {$powered|default=''}</title>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<link href="../statics/css/layui.css" rel="stylesheet">
|
|
<script src="../statics/js/layui.js"></script>
|
|
<script src="../statics/js/jquery.js"></script>
|
|
<script src="../statics/js/vue.js"></script>
|
|
<script src="../statics/js/axios.js"></script>
|
|
<style>
|
|
body {
|
|
background-color: #f3f3f4;
|
|
}
|
|
.layui-fluid {
|
|
padding: 15px;
|
|
}
|
|
.layui-card-header {
|
|
font-weight: bold;
|
|
}
|
|
.layui-elem-quote {
|
|
border-left-color: #1E9FFF;
|
|
font-size: 16px;
|
|
}
|
|
.layui-elem-quote span {
|
|
color: #1E9FFF;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="layui-fluid" id="app" v-cloak>
|
|
<div class="layui-row layui-col-space15">
|
|
<div class="layui-col-md12">
|
|
<div class="layui-card">
|
|
<div class="layui-card-header">数据迁移系统</div>
|
|
<div class="layui-card-body">
|
|
<div class="layui-row layui-col-space15">
|
|
<div class="layui-col-md12">
|
|
<blockquote class="layui-elem-quote">迁移版本:<span>标准版{$version_bz} - pro{$version_pro}</span></blockquote>
|
|
</div>
|
|
<div class="layui-col-md4">
|
|
<div class="layui-form">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">服务器地址</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" v-model="hostname" autocomplete="off" placeholder="请输入数据库服务器地址" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">数据库名</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" v-model="database" autocomplete="off" placeholder="请输入数据库名" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">用户名</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" v-model="username" autocomplete="off" placeholder="请输入数据库用户名" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">数据库密码</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" v-model="password" autocomplete="off" placeholder="请输入数据库密码" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">数据库端口</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" v-model="hostport" autocomplete="off" placeholder="请输入数据库端口" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">表前缀</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" v-model="prefix" autocomplete="off" placeholder="请输入表前缀" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<div class="layui-input-block">
|
|
<button type="button" class="layui-btn layui-btn-normal" v-if="isUpgrade && executeIng">正在迁移中</button>
|
|
<button type="button" class="layui-btn layui-btn-normal" v-if="!isUpgrade && !executeIng">迁移完毕</button>
|
|
<button type="button" class="layui-btn layui-btn-normal" v-if="isUpgrade && !executeIng" @click="startUpgrade">立即迁移</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md12">
|
|
<div class="layui-card">
|
|
<div class="layui-card-body">
|
|
<table class="layui-table">
|
|
<thead>
|
|
<tr>
|
|
<th>表名</th>
|
|
<th>迁移状态</th>
|
|
<th style="overflow: hidden;word-break: break-all;">错误原因</th>
|
|
<th>执行时间</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="(item, index) in upgradeData" :key="index">
|
|
<td>{{item.table}}</td>
|
|
<td>{{ item.status ? '迁移成功' : '迁移失败' }}</td>
|
|
<td>{{ item.error }}</td>
|
|
<td>{{ item.add_time }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript" charset="utf-8">
|
|
var isUpgrade = <?=$isUpgrade ? 'true' : 'false'?>;
|
|
new Vue({
|
|
el: '#app',
|
|
data: {
|
|
sleep: 0,
|
|
hostname: '',
|
|
username: '',
|
|
database: '',
|
|
password: '',
|
|
hostport: '3306',
|
|
prefix: 'eb_',
|
|
upgradeData: [],
|
|
isUpgrade: isUpgrade,
|
|
executeIng: false,
|
|
},
|
|
methods: {
|
|
startUpgrade: function () {
|
|
var that = this;
|
|
if (!that.hostname) {
|
|
return that.showMsg('请填写数据库服务器地址');
|
|
}
|
|
if (!that.database) {
|
|
return that.showMsg('请填写数据库名');
|
|
}
|
|
if (!that.username) {
|
|
return that.showMsg('请填写数据库用户名');
|
|
}
|
|
if (!that.password) {
|
|
return that.showMsg('请填写数据库密码');
|
|
}
|
|
if (!that.hostport) {
|
|
return that.showMsg('请填写表前缀');
|
|
}
|
|
if (!that.prefix) {
|
|
return that.showMsg('请填写表前缀');
|
|
}
|
|
$.ajax({
|
|
type: "POST",
|
|
url: 'upgrade_transfer',
|
|
data: {
|
|
hostname:that.hostname,
|
|
database:that.database,
|
|
username:that.username,
|
|
password:that.password,
|
|
hostport:that.hostport,
|
|
prefix:that.prefix,
|
|
sleep:that.sleep
|
|
},
|
|
dataType: 'json',
|
|
success: function(res){
|
|
if (res.data.sleep !== -1) {
|
|
that.sleep = res.data.sleep;
|
|
that.upgradeData.push(res.data);
|
|
that.executeIng = true;
|
|
setTimeout(function () {
|
|
that.startUpgrade();
|
|
}, 100);
|
|
} else {
|
|
that.isUpgrade = false;
|
|
that.executeIng = false;
|
|
return that.showMsg('执行完毕');
|
|
}
|
|
}
|
|
});
|
|
},
|
|
requestGet: function (url, data) {
|
|
var params = Object.keys(data).map(function (key) {
|
|
return key + '=' + data[key];
|
|
}).join('&');
|
|
return new Promise(function (resolve, reject) {
|
|
axios.get(url + (params ? '?' + params : '')).then(function (res) {
|
|
if (res.status == 200) {
|
|
resolve(res.data)
|
|
} else {
|
|
reject(res.data);
|
|
}
|
|
}).catch(function (err) {
|
|
reject({msg: err})
|
|
});
|
|
})
|
|
},
|
|
showMsg: function (msg, success) {
|
|
layui.use(['layer'], function () {
|
|
layui.layer.msg(msg, success);
|
|
});
|
|
},
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|