Exemplo n.º 1
0
 public function act_addShippingIds()
 {
     $shippingids = isset($_POST['shippingids']) ? $_POST['shippingids'] : '';
     $uid = isset($_POST['uid']) ? intval($_POST['uid']) : 0;
     if (empty($shippingids)) {
         self::$errCode = 401;
         self::$errMsg = '请选择运输运输方式!';
         return;
     }
     if (empty($uid)) {
         self::$errCode = 402;
         self::$errMsg = '被修改人id有误!';
         return;
     }
     if (UserCompetenceModel::insertCarrierData($uid, $shippingids)) {
         self::$errCode = 0;
         self::$errMsg = '权限设置成功';
         return true;
     } else {
         self::$errCode = 403;
         self::$errMsg = '权限设置失败';
         return false;
     }
 }