上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 41 下一页
摘要: alter table attributes modify column `type` tinyint(4) DEFAULT NULL COMMENT '0基本属性 1价格属性'; 阅读全文
posted @ 2019-02-18 18:02 泥土里的绽放 阅读(285) 评论(0) 推荐(0) 编辑
摘要: select `product_skus`.id as skuId, `wname` as sku名称, if(`sku_attributes`.`status`=1,'上架','下架') as 状态, (select name from brands where brands.id = product_skus.brand_id) as 品牌, `sku_attributes`.`attrib... 阅读全文
posted @ 2019-02-18 11:14 泥土里的绽放 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 增加商品的时候最好一次性添加,校验让前端来做。 优点: 1. 少掉很多交互逻辑。 2. 创建的时候不会出现=>属性填写一半退出后数据保存到数据库的问题。 部分实现细节(创建sku,并更新sku属性): 阅读全文
posted @ 2019-02-17 15:33 泥土里的绽放 阅读(156) 评论(0) 推荐(0) 编辑
摘要: foreach ($skuList as $sku) { $productToSkuMap[$sku['product_id']][] = $sku; } 阅读全文
posted @ 2019-02-17 15:29 泥土里的绽放 阅读(103) 评论(0) 推荐(0) 编辑
摘要: public function scopeSku($q) { return $q->where(['related_type' => self::RELATED_TYPE_SKU]); } 阅读全文
posted @ 2019-02-17 15:28 泥土里的绽放 阅读(110) 评论(0) 推荐(0) 编辑
摘要: trim(string,charlist) 阅读全文
posted @ 2019-02-17 15:26 泥土里的绽放 阅读(215) 评论(0) 推荐(0) 编辑
摘要: php函数保留所有键值 阅读全文
posted @ 2019-02-17 15:23 泥土里的绽放 阅读(185) 评论(0) 推荐(0) 编辑
摘要: php 函数 阅读全文
posted @ 2019-02-17 15:21 泥土里的绽放 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 1. 将旧数据全部设为无效 2. 使用updateOrCreate,有则更新,无则创建,优秀啊!!!! 阅读全文
posted @ 2019-02-17 15:16 泥土里的绽放 阅读(95) 评论(0) 推荐(0) 编辑
摘要: while ($parentId) { $categoryBack = CategoryBack::query()->where('id', $parentId)->first(); $categoryBackNameArr[] = $categoryBack; $parentId = data_... 阅读全文
posted @ 2019-02-17 15:11 泥土里的绽放 阅读(157) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 41 下一页