本文整理匯總了PHP中coupon::LocationBatchGet方法的典型用法代碼示例。如果您正苦於以下問題:PHP coupon::LocationBatchGet方法的具體用法?PHP coupon::LocationBatchGet怎麽用?PHP coupon::LocationBatchGet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類coupon
的用法示例。
在下文中一共展示了coupon::LocationBatchGet方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: tablename
$location = pdo_fetch('SELECT status,location_id FROM ' . tablename('coupon_location') . ' WHERE uniacid = :aid AND id = :id', array(':aid' => $_W['uniacid'], ':id' => $id));
if (!empty($location['location_id'])) {
load()->classs('coupon');
$acc = new coupon($acid);
$status = $acc->LocationDel($location['location_id']);
if (is_error($status)) {
message($status['message'], '', 'error');
}
}
pdo_delete('coupon_location', array('uniacid' => $_W['uniacid'], 'acid' => $acid, 'id' => $id));
message('刪除門店成功', url('wechat/manage/location_list'), 'success');
}
if ($do == 'export') {
load()->classs('coupon');
$acc = new coupon($acid);
$location = $acc->LocationBatchGet();
if (is_error($location)) {
message($location['message'], referer(), 'error');
}
$location = $location['business_list'];
$status2local = array('', 3, 2, 1, 3);
if (!empty($location)) {
foreach ($location as $li) {
$li = $li['base_info'];
if ($li['available_state'] == 3 && !empty($li['poi_id']) && empty($li['sid'])) {
$isexist = pdo_fetchcolumn('SELECT id FROM ' . tablename('coupon_location') . ' WHERE uniacid = :uniacid AND acid = :acid AND location_id = :location_id', array(':uniacid' => $_W['uniacid'], ':acid' => $acid, ':location_id' => $li['poi_id']));
if (empty($isexist)) {
$li['uniacid'] = $_W['uniacid'];
$li['acid'] = $acid;
$li['status'] = 1;
$li['location_id'] = $li['poi_id'];