Your Name 12 months ago
parent 28df9dcce7
commit c9101208c3
  1. 3
      addons/shopro/controller/third/Wechat.php
  2. 3
      addons/shopro/listener/Commission.php
  3. 11
      addons/shopro/service/CommissionScoreLog.php
  4. 2
      application/admin/model/Admin.php
  5. 2
      application/database.php
  6. 1
      public/.well-known/acme-challenge/NyPbuMTyfKBBTYPuApxUnv6iH7Z025QGhcut4wh3nVc
  7. 1
      public/.well-known/acme-challenge/TeBqAXtmDG9gWHo1DrvSYYWLRjdtPHuwY0_R2RsxosQ

@ -36,6 +36,9 @@ class Wechat extends Common
// 微信登陆(小程序+公众号+开放平台)
public function login()
{
$shareInfo = $this->request->param('shareInfo');
$shareInfo = htmlspecialchars_decode($shareInfo);
\think\Log::info('分享参数:'.$shareInfo);
$result = Db::transaction(function () {
return $this->wechat->login();
});

@ -21,7 +21,8 @@ class Commission
{
// $shareInfo = request()->param('shareInfo/a');
$shareInfo = request()->param('shareInfo');
\think\Log::info('分享参数:'.$shareInfo['shareId']);
$shareInfo = json_decode(htmlspecialchars_decode($shareInfo), true);
//\think\Log::info('分享参数:'.$shareInfo['shareId']);
if ($shareInfo) {
// 注册后添加分享信息

@ -103,7 +103,7 @@ class CommissionScoreLog
return true;
}
//1.非用户角色下单立即反积分 并且给公司账户返积分
//1.非用户角色下单立即反积分
if ($initLevel > self::LEVEL_1 && $currentCommissionLevel == 1) {
$amount = bcsub($order['goods_price'], $current_level_price, 2);
//算积分
@ -144,8 +144,9 @@ class CommissionScoreLog
//4.向上反佣金
if ($parentLevel > $currentLevel) {
$amount = bcsub($current_level_price, $parent_level_price, 2);
//如果当前当前用户等级是会员 按原价算
if($currentLevel == self::LEVEL_2) {
//5.如果初始用户等级普通用户 上级是会员 会员上级按原价算
// if($currentLevel == self::LEVEL_2) {
if($initLevel == self::LEVEL_1 && $sonLevel == self::LEVEL_2) {
$amount = bcsub($order['goods_price'], $parent_level_price, 2);
}
\think\Log::info('上级商品价格'.$parent_level_price);
@ -158,7 +159,7 @@ class CommissionScoreLog
}
}
//5.用户的上上级是高级 算团队2% 并给公司账户加钱
//6.用户的上上级是高级 算团队2% 并给公司账户加钱
if ($parentLevel == self::LEVEL_5 && $currentLevel == self::LEVEL_5 && $level5<2) {
if ($level5 == 0) {
@ -181,7 +182,7 @@ class CommissionScoreLog
}
} else {
//6.只有最后一级是高级时反公司积分
//7.只有最后一级是高级时反公司积分
if ($currentLevel == self::LEVEL_5 && $sonLevel != self::LEVEL_5 && $currentCommissionLevel > 1) {
$this->calcCompany($current_level_price, $company_level_price);
}

@ -8,7 +8,7 @@ use think\Session;
class Admin extends Model
{
protected $name = 'user';
protected $name = 'admin';
// 开启自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名

@ -34,7 +34,7 @@ return [
// 数据库表前缀
'prefix' => Env::get('database.prefix', 'heshui_'),
// 数据库调试模式
'debug' => Env::get('database.debug', false),
'debug' => Env::get('database.debug', true),
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'deploy' => 0,
// 数据库读写是否分离 主从式有效

@ -1 +0,0 @@
NyPbuMTyfKBBTYPuApxUnv6iH7Z025QGhcut4wh3nVc.r0j_tUmcVSaqou_w_dSej5bM6cKZ1-8c0P-aHTDMU_0

@ -0,0 +1 @@
TeBqAXtmDG9gWHo1DrvSYYWLRjdtPHuwY0_R2RsxosQ.r0j_tUmcVSaqou_w_dSej5bM6cKZ1-8c0P-aHTDMU_0
Loading…
Cancel
Save