/**
* @title 发布装修的店铺
* @example FlagShipShopDecorate.fabu? 调试参数:{"username":"17721355485","check_code":"123456","method":"FlagShipShopDecorate.fabu"}
* @return {"status":"0","errorCode":"0","msg":"该样式已发布成功","result":[]}
* @method POST
* @author 邹柯
*/
public function fabu($res){
$user_id=session("user.user_id");
$user_shop_decorate=M('user_shop_decorate');
$usd_where['create_id']=$user_id;
$usd_where['flagship_shop']=;
$res_info=$user_shop_decorate->field('id,use_status,plate_content_draft,plate_content_draft_features')->where($usd_where)->order('create_time desc')->find();
if(!empty($res_info)){
$us_where['id']=array("neq",$res_info['id']);
$u_data=[
'use_status'=>,
'select_status'=>
];
$res_da=$user_shop_decorate->data($u_data)->where($us_where)->save();
if(!$res_da && $res_da !=){
E('');
}
}
$plate_content_draft=json_decode($res_info['plate_content_draft'],true);
foreach($plate_content_draft as $k=>$v){
foreach($v['goods'] as $k2=>$v2){
if($v2['operate_type']==){
E('');
}
}
} $plate_content_draft_features=json_decode($res_info['plate_content_draft_features'],true);
foreach($plate_content_draft_features as $k=>$v){
$operate_types=array_unique(array_column($v['goods'],'operate_type'));
if(count($operate_types) >=){
E('');
}
if($operate_types[]==){
unset($plate_content_draft_features[$k]);
}
}
$time=date("Y-m-d H:i:s",time());
$data=array(
'plate_content'=>$res_info['plate_content_draft'],
'plate_content_features'=>empty($plate_content_draft_features)?null:json_encode($plate_content_draft_features),
'status'=>,
'update_time'=>$time,
'update_id'=>$user_id,
'use_status'=>,
'select_status'=>
);
$res=$user_shop_decorate->data($data)->where(['id'=>$res_info['id']])->save();
if(!$res && $res !=){
E('');
}
$list['msg']="该样式已发布成功";
return $list;
}

php 实现店铺装修4的更多相关文章

  1. 关于淘宝店铺装修弹出层popup的记录

    小龙最近做了一下下淘宝的店铺装修,里面封装的widget深不见底,刚刚整明白popup,也就是弹出层的使用方法,大神勿喷: <div class="area001">触 ...

  2. Adobe Photoshop CC2018最新教程+某宝店铺装修教程

    PS免费教程,ps淘宝店铺装修教程.该资源为本人从某商网站重金买来,现免费分享给大家,下载地址:百度网盘,https://pan.baidu.com/s/127PjFbGwVVUVce1litHFsw

  3. php 实现店铺装修5

    /** * @title 选中蜂店装修模板样式 * @param plate_id 是 int 商品(平台或特色)装修样式ID * @param type_id 是 int 要装修商品的类型(1-平台 ...

  4. php 实现店铺装修6

    /** * @title 获取预览或发布的蜂店模板样式 * @param store_id 是 string 店铺id * @param type 是 int 装修模板的状态:1-预览蜂店装修模板样式 ...

  5. php 实现店铺装修7

    type_id=0的情况 type_id=1的情况                         type_id=2的情况 /** * @title 店铺装修--商品分类 * @param type ...

  6. php 实现店铺装修8

    /** * @title 店铺装修--根据分类获取商品列表 * @param source 是 int 来源(1--h5.2--app) * @param type 是 string 店铺类型--首页 ...

  7. php 实现店铺装修3

    /** * @title 装修店铺 * @param plate_id 是 int 店铺装修样式ID * @param type 是 int 模板样式子板块类型(4-海景.6-二宫格.8-三宫格.9- ...

  8. php 实现店铺装修2

    <?php namespace Webapp\Model; use Common\Model\DataModel\FlagShopCategoryModel; use Common\Model\ ...

  9. php 实现店铺装修1

    一.原型分析 1.店铺未装修的情况下,使用默认样式,哪个是默认样式由后台告知: 2.所有的样式由后台进行维护(但后台始终有一个默认样式,不可删除不可编辑),所有样式,只要用户未编辑过,则默认按照商品的 ...

随机推荐

  1. 如何让div中的img图片显示在div下面。

    <!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>& ...

  2. es 分词器介绍

    按照单词切分,不做处理 GET _analyze { "analyzer": "standard", "text": "2 run ...

  3. js中数组的循环与遍历forEach,map

    对于前端的循环遍历我们知道有 针对js数组的forEach().map().filter().reduce()方法 针对js对象的for/in语句(for/in也能遍历数组,但不推荐) 针对jq数组/ ...

  4. Java Web 前端资源文件的路径问题

    WEB-INF是Java Web应用的安全目录,在部署时用于存放class文件.项目用到的库(jar包).Java Web应用的配置文件web.xml. 浏览器不能访问此目录下的资源,比如在WEB-I ...

  5. 多项式输出 (0)<P2009_1>

    多项式输出 (poly.pas/c/cpp) [问题描述] 一元n次多项式可用如下的表达式表示: 其中,称为i次项,ai称为i次项的系数.给出一个一元多项式各项的次数和系数,请按照如下规定的格式要求输 ...

  6. 质因数分解(0)<P2012_1>

    质因数分解 (prime.cpp/c/pas) [问题描述] 已知正整数n是两个不同的质数的乘积,试求出较大的那个质数. [输入] 输入文件名为prime.in. 输入只有一行,包含一个正整数n. [ ...

  7. 【已解决】iOS11使用MJRefresh上拉加载结束tableView闪动、跳动的问题

    更新提示: [2018年11月20日更新] 经过放置在项目中运行发现,如果在快速滚动tableview的时候会在下面这行代码中崩溃(慢慢的滚动是没关系的-): CGFloat cellHeight = ...

  8. Struts+Spring+Hibernate整合笔记一

    OpenSessionInview: 1.如果当前方法没有事物环境,则调用完毕getHibernate以后.session关闭: 说明:1如果测试dao层,没有事物环境 2如果测试service层,但 ...

  9. ArcMap中对失量数据将具有相同的字段的元素进行合并

    ArcMap=>工具栏=>Geoprocessing=>Dissolve,由于是将多个元素进行合并,所以还涉及到合并后的元素的字段保留以及字段取值的问题,在该工具中还可以自定义保存的 ...

  10. 关联容器:unordered_map详细介绍

    版权声明:博主辛辛苦苦码的字哦~转载注明一下啦~ https://blog.csdn.net/hk2291976/article/details/51037095 介绍 1 特性 2 Hashtabl ...