本文整理汇总了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'];