|
@@ -107,9 +107,9 @@ class PartnerTools{
|
|
|
* @param type $enterpriseId
|
|
|
* @return bool
|
|
|
*/
|
|
|
- public static function addTask($orderId,$enterpriseId){
|
|
|
+ public static function addTask($orderId,$enterpriseId,$ckeckData){
|
|
|
try{
|
|
|
- if(empty($orderId) || empty($enterpriseId)){
|
|
|
+ if(empty($orderId) || empty($enterpriseId) || empty($ckeckData)){
|
|
|
return ["code"=>-1,"msg"=>"参数为空"];
|
|
|
}
|
|
|
$dbSetting = new DNewCommissionSetting('default');
|
|
@@ -117,6 +117,9 @@ class PartnerTools{
|
|
|
if(empty($settingData) || empty($settingData["is_open"]) || $settingData["levMoney"]<=0){
|
|
|
return ["code"=>-1,"msg"=>"还未进行分佣配置"];
|
|
|
}
|
|
|
+ if(empty($ckeckData["parentPath"]) && $ckeckData["payAmount"]<$settingData["levMoney"]){
|
|
|
+ return ["code"=>-1,"msg"=>"用户不存在父级,且消费金额不够成为合伙人"];
|
|
|
+ }
|
|
|
|
|
|
$dbTask = new DNewCommissionTask('default');
|
|
|
$taskTableName = $dbTask->getTableName($dbTask->get_Table(), $enterpriseId, 1);
|