1.检验是否实名认证
This commit is contained in:
parent
69569442b6
commit
3711027a8b
@ -36,7 +36,11 @@ class Order extends Api
|
||||
$post['user_id'] = $this->user_id;
|
||||
$post['client'] = $this->client;
|
||||
(new OrderValidate())->goCheck('add', $post);
|
||||
|
||||
if(isset($post['order_type'])){
|
||||
if($post['order_type'] == 4){
|
||||
return JsonServer::error("活动正在预热,敬请等待");
|
||||
}
|
||||
}
|
||||
$order = OrderLogic::add($post);
|
||||
if (false === $order) {
|
||||
return JsonServer::error(OrderLogic::getError());
|
||||
|
||||
@ -186,6 +186,10 @@ class User extends Api
|
||||
$user_id = $this->user_id;
|
||||
$result = UserLogic::checkRealUserMsg($user_id);
|
||||
if($result){
|
||||
if($result == -1){
|
||||
$data['check'] = 0;
|
||||
return JsonServer::success("身份证号码已被实名",$data);
|
||||
}
|
||||
$data['check'] = 1;
|
||||
return JsonServer::success("验证通过",$data);
|
||||
}else{
|
||||
|
||||
@ -53,12 +53,17 @@ class GoodsLogic extends Logic
|
||||
}
|
||||
}
|
||||
|
||||
// 销售中商品:未删除/审核通过/已上架
|
||||
$onSaleWhere = [
|
||||
'del' => GoodsEnum::DEL_NORMAL, // 未删除
|
||||
'status' => GoodsEnum::STATUS_SHELVES, // 上架中
|
||||
'audit_status' => GoodsEnum::AUDIT_STATUS_OK, // 审核通过
|
||||
];
|
||||
$onSaleWhere = "";
|
||||
$group_msg = Db::name("groupbuy_goods")->where("goods_id",$goodsId)->where("del",1)->where("status",1)->find();
|
||||
if($group_msg==null){
|
||||
// 销售中商品:未删除/审核通过/已上架
|
||||
$onSaleWhere = [
|
||||
'del' => GoodsEnum::DEL_NORMAL, // 未删除
|
||||
'status' => GoodsEnum::STATUS_SHELVES, // 上架中
|
||||
'audit_status' => GoodsEnum::AUDIT_STATUS_OK, // 审核通过
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
$goodsDetail = Goods::with(['goods_image', 'goods_item', 'shop'])
|
||||
->field('id,type,name,image,video,remark,goods_remark,content,purchase_price,issuing_price,wholesale_price,market_price,min_price,max_price,is_show_stock,stock,sales_actual,sales_virtual,clicks,clicks_virtual,shop_id,poster')
|
||||
|
||||
@ -391,7 +391,12 @@ class UserLogic extends Logic
|
||||
}
|
||||
}
|
||||
public static function updateRealUserMsg($user_id,$post){
|
||||
$user = User::where("id",$user_id)->update(['real_name'=>$post['real_name'],'id_card'=>$post['id_card']]);
|
||||
$result = User::where("id_card",$post['id_card'])->find();
|
||||
if($result!=null){
|
||||
return -1;
|
||||
}
|
||||
$user = User::where("id",$user_id)
|
||||
->update(['real_name'=>$post['real_name'],'id_card'=>$post['id_card']]);
|
||||
if($user){
|
||||
return true;
|
||||
}else{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user