php 实现店铺装修4
/**
* @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的更多相关文章
- 关于淘宝店铺装修弹出层popup的记录
小龙最近做了一下下淘宝的店铺装修,里面封装的widget深不见底,刚刚整明白popup,也就是弹出层的使用方法,大神勿喷: <div class="area001">触 ...
- Adobe Photoshop CC2018最新教程+某宝店铺装修教程
PS免费教程,ps淘宝店铺装修教程.该资源为本人从某商网站重金买来,现免费分享给大家,下载地址:百度网盘,https://pan.baidu.com/s/127PjFbGwVVUVce1litHFsw
- php 实现店铺装修5
/** * @title 选中蜂店装修模板样式 * @param plate_id 是 int 商品(平台或特色)装修样式ID * @param type_id 是 int 要装修商品的类型(1-平台 ...
- php 实现店铺装修6
/** * @title 获取预览或发布的蜂店模板样式 * @param store_id 是 string 店铺id * @param type 是 int 装修模板的状态:1-预览蜂店装修模板样式 ...
- php 实现店铺装修7
type_id=0的情况 type_id=1的情况 type_id=2的情况 /** * @title 店铺装修--商品分类 * @param type ...
- php 实现店铺装修8
/** * @title 店铺装修--根据分类获取商品列表 * @param source 是 int 来源(1--h5.2--app) * @param type 是 string 店铺类型--首页 ...
- php 实现店铺装修3
/** * @title 装修店铺 * @param plate_id 是 int 店铺装修样式ID * @param type 是 int 模板样式子板块类型(4-海景.6-二宫格.8-三宫格.9- ...
- php 实现店铺装修2
<?php namespace Webapp\Model; use Common\Model\DataModel\FlagShopCategoryModel; use Common\Model\ ...
- php 实现店铺装修1
一.原型分析 1.店铺未装修的情况下,使用默认样式,哪个是默认样式由后台告知: 2.所有的样式由后台进行维护(但后台始终有一个默认样式,不可删除不可编辑),所有样式,只要用户未编辑过,则默认按照商品的 ...
随机推荐
- HDU1875 畅通工程再续
相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现.现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全 ...
- Android、iOS与Servlet接口上传文件和JSON串的交互
package etcom.servlet; import java.io.File; import java.io.IOException; import java.sql.Connection; ...
- query_phase_execution_exception
ES报错信息: { "error": { "root_cause": [ { "type": "query_phase_execu ...
- 简单bat脚本
hwf.bat: set GAP_HOME=%~dp0\.. ::copy "%JAVA_HOME%\bin\javaw.exe" "%JAVA_HOME%\bin\HW ...
- 使用KVC键值编码
掌握KVC从不使用setter.getter.点语法开始. ----- 前言 对象的内部状态是由属性进行封装的.访问对象属性的方式平时在开发过程中用得最多的是getter方法和点语法.键值编程KVC也 ...
- SpringBoot+JWT+SpringSecurity+MybatisPlus实现Restful鉴权脚手架
若图片查看异常,请前往掘金查看:https://juejin.im/post/5d1dee34e51d4577790c1cf4 前言 JWT(json web token)的无状态鉴权方式,越来越流行 ...
- 并发编程之GIL
目录 GIL 什么是GIL锁 为什么需要加锁 带来的问题 如何解决 关于性能的讨论 计算密集型任务:进程执行更快 IO密集型:线程执行更快 自定义锁与GIL的区别 GIL 什么是GIL锁 官方解释: ...
- java事务/springboot事务/redis事务
java事务(数据库事务):jdbc事务--ACID springboot事务:@Transactional--ACID redis事务:命令集合 将redis事务与mysql事务对比: Mysq ...
- 1013 Battle Over Cities (25分) DFS | 并查集
1013 Battle Over Cities (25分) It is vitally important to have all the cities connected by highways ...
- Languages-used-on-the-Internet
Languages-used-on-the-Internet 1. 互联网上使用的语言 1.1 网站内容语言 1.2 按语言互联网用户 1.3 维基百科文章统计 2. 综合以上表格数据出图表(2019 ...