|
@@ -15,8 +15,8 @@ module.exports = class RelInviterController extends Base {
|
|
|
// const stateStr = that.app.szjcomo.base64_encode('http://test.enroll.sizhijie.com/#/shop/category?category_id=11');
|
|
|
// const hh = that.app.szjcomo.base64_decode(stateStr);
|
|
|
|
|
|
- const stateStr = that.app.szjcomo.base64_encode('http://ysjj.sizhijie.com/#/shop/officeHome');
|
|
|
- console.log(stateStr);
|
|
|
+ // const stateStr = that.app.szjcomo.base64_encode('http://ysjj.sizhijie.com/#/shop/officeHome');
|
|
|
+ // console.log(stateStr);
|
|
|
|
|
|
// https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7713e08a353ffcd7&redirect_uri=http%3A%2F%2Fysjj.sizhijie.com%2F%23%2Fshop%2Fwxauth&response_type=code&scope=snsapi_userinfo&state=aHR0cDovL3lzamouc2l6aGlqaWUuY29tLyMvc2hvcC9vZmZpY2VIb21l#wechat_redirect
|
|
|
|
|
@@ -32,6 +32,14 @@ module.exports = class RelInviterController extends Base {
|
|
|
// 2023/3/5 餐币发放
|
|
|
// const dispatchResult = that.service.diningCoin.orderDiningCoinDispatchAfterPay(362);
|
|
|
|
|
|
+ // const bodyData = {};
|
|
|
+ // const response = await that.app.curl('http://127.0.0.1:8105/oneshop/api/redEnvelopeProducts', {
|
|
|
+ // method: 'GET', dataType: 'json', contentType: 'json', data: bodyData,
|
|
|
+ // });
|
|
|
+
|
|
|
+
|
|
|
+ // const response = await that.getCouldCashCommission(10);
|
|
|
+
|
|
|
return that.ctx.appJson(that.app.szjcomo.appResult('SUCCESS', { commissionResult }, false));
|
|
|
}
|
|
|
|
|
@@ -67,10 +75,16 @@ module.exports = class RelInviterController extends Base {
|
|
|
const that = this;
|
|
|
const seq = that.app.Sequelize;
|
|
|
const selectBean = await that.app.comoBean.instance({}, {
|
|
|
- where: { type: { [seq.Op.ne]: -1 } }, // type-1提现失败类型
|
|
|
- attributes: [[ seq.fn('sum', seq.col('commission')), 'all_commission' ]],
|
|
|
+ where: { user_id: 10 }, // type-1提现失败类型
|
|
|
+ include: [ {
|
|
|
+ model: that.app.model.Orders,
|
|
|
+ where: { order_status: { [seq.Op.lte]: 2 } },
|
|
|
+ attributes: [ 'order_id', 'order_status', 'order_amount', ],
|
|
|
+ as: 'order'
|
|
|
+ } ],
|
|
|
+ // attributes: [ 'user_id', [ seq.fn('sum', seq.col('commission')), 'all_cash' ] ],
|
|
|
});
|
|
|
- return await that.service.base.select(selectBean, that.app.model.UsersCommissionLogs, '查询佣金失败,请稍候重试', false, false);
|
|
|
+ return await that.service.base.select(selectBean, that.app.model.UsersCommissionLogs, '查询佣金失败,请稍候重试', false, true);
|
|
|
}
|
|
|
|
|
|
async selectInfo(order_id) {
|