1. /**
  2. * @title 店铺装修--根据分类获取商品列表
  3. * @param source 是 int 来源(1--h5、2--app)
  4. * @param type 是 string 店铺类型--首页进去(other)、我的蜂店进去(me)
  5. * @param store_id 是 string 店铺id
  6. * @param type_id 是 int 分类类型(0-全部、1-平台、2-特色)
  7. * @param sort 否 int 排序字段(1销量由高到低、2价格由低到高、3价格由高到低)--不传默认1
  8. * @param keywords 否 string 搜索字段(商品名称)
  9. * @param cate_type 是 string 商品所属分类id--格式:13,20,24,16
  10. * @param brand_id 否 string 品牌id--格式:3,4,5,6
  11. * @param page 否 int 页码(不传默认1)
  12. * @param pagesize 否 int 每页显示条数(不传默认10)
  13. * @example FlagShipShopDecorate.getGoodsListByCate? 调用参数说明:{"method":"FlagShipShopDecorate.getGoodsListByCate","username":"17721355485","check_code":"123456","type_id":"0","sort":"1","keywords":"","cate_type":"1","brand_id":"","page":"1","pagesize":"10","store_id":"115075399495199"}
  14. * @return_param_explain 分类入口搜索返回字段说明: select_status:选中状态(1是、2否) img:宫格图片 seascapes:海景图 sell_nums:已卖数量 sku_id:商品属性id sku_no:商品属性编号 title:商品标题 sell_price:零售价 store_id:店铺id is_zero_goods:是否为0元购(1:0元购,0:不是0元购) restriction:限购数量 yuding:是否可预定 market_price:市场价 cost_price:成本价 profit:利润 spec_name:规格名称 activity_info--- activityId:活动编码 activityType:活动类型 productPrice:活动售价 costPrice:成本价 title:活动标题 isAct:是否是活动(true:是、false:不是) >>>foot: current_page:当前页 pagesize:每页显示条数 total_page:总页数 >>>cate_info: id:分类id name:分类名称 list_status:1选中、2未选中 >>>brand_info: id:品牌id brand_name:品牌名称 list_status:1选中、2未选中
  15. * @method POST
  16. * @author 邹柯
  17. */
  18. public function getGoodsListByCate($res){
  19. $userId=session('user.user_id');
  20. //商品类型
  21. $type_id=$res['type_id'];
  22. if(empty($type_id)){
  23. $type_id=;
  24. }
  25. if($type_id != && $type_id != && $type_id !=){
  26. E('');
  27. }
  28. $store_id=$res['store_id'];
  29. //品牌id
  30. $brand_id=$res['brand_id'];
  31. //搜索--宝贝名称
  32. $keywords=$res['keywords'];
  33. //排序字段(1销量由高到低、2价格由低到高、3价格由高到低)
  34. $sort=$res['sort'];
  35. if(empty($sort)){
  36. $sort=;
  37. }
  38. if(!empty($sort)){
  39. if($sort != && $sort != && $sort !=){
  40. E('');
  41. }
  42. }
  43. //商品所属分类
  44. $cate_type=$res['cate_type'];
  45. if(empty($cate_type)){
  46. $cate_type=;
  47. }
  48. //页码
  49. $page = $res['page'];
  50. if(empty($page)){
  51. $page=;
  52. }
  53.  
  54. //每页显示条数
  55. $pageSize = $res['pagesize'];
  56. if(empty($pageSize)){
  57. $pageSize=;
  58. }
  59.  
  60. $proStoreGoods = new FlagShopCategoryModel();
  61. $list=$proStoreGoods->getGoodsListByCate($userId,$sort,$cate_type,$brand_id,$page,$pageSize,$keywords,$type_id,$store_id);
  62. return $list;
  63. }

返回结果

  1. {
  2. "status":"",
  3. "errorCode":"",
  4. "msg":"成功",
  5. "result":{
  6. "goods_info":[
  7. {
  8. "product_id":"P000873",
  9. "brand_id":"",
  10. "search_name":null,
  11. "seascapes":[
  12.  
  13. ],
  14. "img":"",
  15. "sell_nums":"",
  16. "title":"【0元购返399元】斐讯K2 1200M智能双频无线路由器 WIFI穿墙 PSG1218",
  17. "sku_id":"",
  18. "soft_text":null,
  19. "is_zero_goods":"",
  20. "restriction":null,
  21. "yuding":"",
  22. "sku_no":"P0028792",
  23. "market_price":null,
  24. "sell_price":"0.01",
  25. "cost_price":"0.01",
  26. "product_num":"",
  27. "profit":"0.00",
  28. "spec_name":": : ",
  29. "store_id":"",
  30. "activity_info":{
  31. "productPrice":"00.00",
  32. "costPrice":"00.00",
  33. "activityId":null,
  34. "activityType":null,
  35. "title":null,
  36. "isAct":false
  37. },
  38. "select_status":
  39. }
  40. ],
  41. "foot":{
  42. "current_page":"",
  43. "pagesize":"",
  44. "total_page":
  45. },
  46. "brand_info":[
  47. {
  48. "id":"",
  49. "brand_name":"斐讯",
  50. "list_status":
  51. },
  52. {
  53. "id":"",
  54. "brand_name":"迅捷",
  55. "list_status":
  56. }
  57. ],
  58. "cate_info":[
  59. {
  60. "id":"",
  61. "name":"斐讯K3C+E1组合套装",
  62. "list_status":
  63. },
  64. {
  65. "id":"",
  66. "name":"斐讯N1预售",
  67. "list_status":
  68. }
  69. ]
  70. }
  71. }
  1. //根据分类获取商品列表
  2. public function getGoodsListByCate($userId,$sort,$cate_type,$brand_id,$page,$pageSize,$keywords,$type_id,$store_id){
  3. $store=M('store');
  4. $s_where['id']=$store_id;
  5. $store_user_id=$store->field('id')->where($s_where)->getField('user_id');
  6. //排序
  7. switch ($sort) {
  8. case :
  9. //销量由高到低排序
  10. $order = 'sell_nums desc';
  11. break;
  12. case :
  13. //价格从低到高
  14. $order = 'sell_price asc';
  15. break;
  16. default:
  17. //价格从高到低
  18. $order = 'sell_price desc';
  19. break;
  20. }
  21. $origin=; //1搜索、2店铺首页或商品管理
  22. $res2=$this->getGoodsInfoNew($keywords,$cate_type,$page,$pageSize,$order,$brand_id,$store_id,'me',,$origin,$type_id,$userId,$store_user_id);
  23. if(empty($res2['goods_info'])){
  24. $res2=null;
  25. }
  26. foreach($res2['goods_info'] as $k=>$v){
  27. $arrs[]=array(
  28. 'productId'=>$v['product_id'],
  29. 'skuNo'=>$v['sku_no']
  30. );
  31. }
  32. $home_special_session=new HomeSpecialSessionModel();
  33. $res_info=$home_special_session->getGoodsActInfo($arrs);
  34. foreach($res_info as $k=>$v){
  35. unset($res_info[$k]['productId']);
  36. unset($res_info[$k]['skuNo']);
  37. unset($res_info[$k]['status']);
  38. }
  39. foreach($res2['goods_info'] as $k=>$v){
  40. $res2['goods_info'][$k]['activity_info']=$res_info[$v['sku_no']];
  41. }
  42. $search_info= $res2;
  43. $ob=new FlagShipShopDecorateModel();
  44. $sku_ids=array_column($res2['goods_info'],'sku_id');
  45. $tt=$ob->getSelectStatus($userId,$type_id);
  46. foreach($sku_ids as $k=>$v){
  47. if(in_array($v,$tt)){
  48. $atr=;
  49. }else{
  50. $atr=;
  51. }
  52. $search_info['goods_info'][$k]['select_status']=$atr;
  53. }
  54. return $search_info;
  55. }
  56.  
  57. //组装商品信息--新(修改商品列表sku显示为商品显示)
  58. private function getGoodsInfoNew($keywords,$cate_type,$page,$pageSize,$order,$brand_id,$store_id,$store_type,$source,$origin,$type_id,$user_id,$store_user_id){
  59. $img_base=C('img_base');
  60. //获取平台商品的ID
  61. $pingtai_goods=C('pingtai_goods');
  62. //获取特色商品的ID
  63. $tese_goods=C('tese_goods');
  64. $store_goods=M('store_goods sg');
  65.  
  66. $ob=new FlagShipShopDecorateModel();
  67. $res=$ob->isParentUserId($user_id,$store_user_id);
  68. if($type_id==){ //平台商品
  69. $where2 ="gs.goods_type=$pingtai_goods";
  70. }elseif($type_id==){//特色商品
  71. $where2 ="gs.goods_type=$tese_goods";
  72. }else{
  73. $where2 ="1=1";
  74. if($res===false){
  75. $where2 .=" and goods_type=2";
  76. }
  77. }
  78.  
  79. if(!empty($keywords)){
  80. $where2 .=" and (gs.title like '%$keywords%' or gd.search_name like '%$keywords%')";
  81. }
  82. $where3=$where2;
  83. //品牌
  84. if(!empty($brand_id)){
  85. $where2 .=" and gd.brand_id in ($brand_id)";
  86. }
  87. if(!empty($cate_type)){
  88. $where ="sgc.id in ($cate_type)";
  89. }else{
  90. $where ="1=1";
  91. }
  92.  
  93. if($type_id==){ //平台商品
  94. $where .=" and type_id=$pingtai_goods";
  95. }elseif($type_id==){ //特色商品
  96. $where .=" and sg.store_id='".$store_id."' and type_id=$tese_goods";
  97. }else{
  98. if($res===false){
  99. $where .=" and (sg.store_id='".$store_id."' and type_id=$tese_goods)";
  100. }else{
  101. $where .=" and ((sg.store_id='".$store_id."' and type_id=$tese_goods) or type_id=$pingtai_goods)";
  102. }
  103. }
  104.  
  105. $where .=" and sg.is_deleted=1 and sg.is_open=1 ";
  106. $store_goods_info=$store_goods->field('sg.sku_id,sg.g_cats,sgc.id')
  107. ->join('left join lc_store_goods_category sgc on sg.g_cats=sgc.path')
  108. ->where($where)
  109. ->select();
  110. $sku_ids =implode(",",array_column($store_goods_info,'sku_id'));
  111. $goods_sku_m = M('goods_sku gs');
  112. if(!empty($store_goods_info)){
  113. //根据sku_id查找对应的商品
  114. $sku_ids = "'".str_replace(",","','",$sku_ids)."'";
  115. $where2 .=' and gs.sku_id in ('.$sku_ids.') and gs.status=1 and gs.is_deleted=0 and gd.is_deleted =0 and gd.is_online =1 and gs.is_show=0';
  116. $where4=$where3;
  117. $where4 .=' and gs.status=1 and gs.is_deleted=0 and gd.is_deleted =0 and gd.is_online =1 and gs.is_show=0';
  118. $gd_info = $goods_sku_m
  119. ->join('left join __GOODS__ gd on gd.product_id=gs.product_id')
  120. ->field("gd.brand_id,gs.sku_id")
  121. ->where($where4)
  122. ->select();
  123. //选中品牌,品牌分类不变
  124. $where3 .=' and gs.sku_id in ('.$sku_ids.') and gs.status=1 and gs.is_deleted=0 and gd.is_deleted =0 and gd.is_online =1 and gs.is_show=0';
  125. $gd_info2 = $goods_sku_m
  126. ->join('left join __GOODS__ gd on gd.product_id=gs.product_id')
  127. ->field("gd.brand_id,gs.sku_id")
  128. ->where($where3)
  129. ->select();
  130. if(!empty($gd_info2)){
  131. $brand_ids2=array_unique(array_column($gd_info2,'brand_id'));
  132. }else{
  133. $brand_ids2=null;
  134. }
  135. if(!empty($brand_ids2)){
  136. $brands=implode(',',$brand_ids2);
  137. }else{
  138. $brands=null;
  139. }
  140. $brand_info=$this->getBrandInfo($brands,$brand_id);
  141. if(!empty($gd_info2)){
  142. $sku_ids2 =implode(",",array_unique(array_column($gd_info,'sku_id')));
  143. $sku_ids2 = "'".str_replace(",","','",$sku_ids2)."'";
  144. $where5 ="sg.sku_id in ($sku_ids2) and concat(sg.g_cats,'/') like '".$pingtai_goods."/%' and sg.is_deleted=1 and sg.is_open=1";
  145. $store_goods_info5=$store_goods->field('sgc.id,sg.g_cats')
  146. ->join('left join lc_store_goods_category sgc on sg.g_cats=sgc.path')
  147. ->where($where5)
  148. ->select();
  149. $cate_infos=array_unique(array_column($store_goods_info5,'id'));
  150. if(!empty($cate_infos)){
  151. foreach($cate_infos as $k=>$v){
  152. if(empty($v)){
  153. unset($cate_infos[$k]);
  154. }
  155. }
  156. $cate_infos=array_merge($cate_infos);
  157. }else{
  158. $cate_infos=null;
  159. }
  160. if(!empty($cate_infos)){
  161. $cate_infos=implode(',',$cate_infos);
  162. $cate_info=$this->getCateInfo($cate_type,$cate_infos);
  163. }
  164. }else{
  165. $cate_info=null;
  166. }
  167.  
  168. $count=$goods_sku_m->join('left join __GOODS__ gd on gd.product_id=gs.product_id')->where($where2)->count('DISTINCT gs.product_id');
  169. //组装分页信息
  170. $total_page=ceil($count/$pageSize);
  171. if($page > $total_page){
  172. $page=;
  173. }
  174. $goods_info = $goods_sku_m
  175. ->join('left join __GOODS__ gd on gd.product_id=gs.product_id')
  176. ->field("gd.product_id,gd.brand_id,gd.search_name,gd.seascapes,gs.img,sum(gs.sell_nums) as sell_nums,gs.title")
  177. ->where($where2)
  178. ->group('gs.product_id')
  179. ->order($order)
  180. ->page($page,$pageSize)
  181. ->select();
  182. $product_ids=implode(",",array_unique(array_column($goods_info,'product_id')));
  183. $product_ids = "'".str_replace(",","','",$product_ids)."'";
  184. $sku_where="product_id in ($product_ids) and gs.status=1 and gs.is_deleted=0 and gs.is_show=0";
  185. $sku_info = $goods_sku_m
  186. ->field("gs.product_id,gs.properties,gs.sku_id,gs.soft_text,gs.is_zero_goods,gs.restriction,gs.yuding,gs.img,gs.sku_no,gs.market_price,gs.sell_price,gs.cost_price")
  187. ->where($sku_where)
  188. ->order('sell_price asc,gs.sell_nums desc')
  189. ->select();
  190. $sku_info=$this->remove_duplicate($sku_info);
  191. foreach($sku_info as $k=>$v){
  192. $sku[$v['product_id']]['properties']=$v['properties'];
  193. $sku[$v['product_id']]['sku_id']=$v['sku_id'];
  194. $sku[$v['product_id']]['soft_text']=$v['soft_text'];
  195. $sku[$v['product_id']]['is_zero_goods']=$v['is_zero_goods'];
  196. $sku[$v['product_id']]['restriction']=$v['restriction'];
  197. $sku[$v['product_id']]['yuding']=$v['yuding'];
  198. $sku[$v['product_id']]['img']=$v['img'];
  199. $sku[$v['product_id']]['sku_no']=$v['sku_no'];
  200. $sku[$v['product_id']]['market_price']=$v['market_price'];
  201. $sku[$v['product_id']]['sell_price']=$v['sell_price'];
  202. $sku[$v['product_id']]['cost_price']=$v['cost_price'];
  203. }
  204. foreach($goods_info as $k=>$v){
  205. $goods_info[$k]['properties']= $sku[$v['product_id']]['properties'];
  206. $goods_info[$k]['sku_id']= $sku[$v['product_id']]['sku_id'];
  207. $goods_info[$k]['soft_text']= $sku[$v['product_id']]['soft_text'];
  208. $goods_info[$k]['is_zero_goods']= $sku[$v['product_id']]['is_zero_goods'];
  209. $goods_info[$k]['restriction']= $sku[$v['product_id']]['restriction'];
  210. $goods_info[$k]['yuding']= $sku[$v['product_id']]['yuding'];
  211. $goods_info[$k]['img']= $sku[$v['product_id']]['img'];
  212. $goods_info[$k]['sku_no']= $sku[$v['product_id']]['sku_no'];
  213. $goods_info[$k]['market_price']= $sku[$v['product_id']]['market_price'];
  214. $goods_info[$k]['sell_price']= $sku[$v['product_id']]['sell_price'];
  215. $goods_info[$k]['cost_price']= $sku[$v['product_id']]['cost_price'];
  216. }
  217. $public = new PublicModel();
  218.  
  219. //查询商品是否有多个sku
  220. if(empty($goods_info)){
  221. foreach ($goods_info as $key=>$value){
  222. $goods_info[$key]['product_num']='';
  223. }
  224. }else{
  225. $product_info=$public->isMoreSku(array_column($goods_info,'product_id'));
  226. $new_data=[];
  227. foreach ($product_info as $key=>$value){
  228. $new_data[$value['product_id']]=$value['num'];
  229. }
  230. foreach ($goods_info as $key=>$value){
  231. $goods_info[$key]['product_num']=empty($new_data[$value['product_id']])?'':$new_data[$value['product_id']];
  232. }
  233. }
  234. if(!empty($goods_info)){
  235. foreach ($goods_info as $k =>$v) {
  236. //利润:
  237. $profit=$v['sell_price']-$v['cost_price'];
  238. $goods_info[$k]['profit']=$profit?number_format($profit, , '.', ','):'0.00';
  239. $seascapes=explode(',',$v['seascapes']);
  240. if(!empty($seascapes)){
  241. $seascapes_t= array();
  242. foreach($seascapes as $v1){
  243. if(!empty($v1)){
  244. $seascapes_t[]=$img_base.$v1;
  245. }
  246. }
  247. }
  248. $goods_info[$k]['seascapes']=$seascapes_t;
  249. $goods_info[$k]['img']=empty($v['img'])?'':$img_base.$v['img'];
  250. //单个产品相关的规格
  251. $spec = $public->getSkuPropName('',$v['properties']);
  252. $goods_info[$k]['spec_name'] = $spec;
  253.  
  254. //app
  255. if($source==){
  256. $inf2=$public->shopDeal($store_id);
  257. }else{ //h5
  258. $inf2=$public->shopDealH5($store_id,$store_type);
  259. }
  260. $inf=$public->getTeSeGoods($v['sku_id']);
  261. if(empty($inf)){//平台商品
  262. $store_id=$inf2;
  263. }else{
  264. $store_id=$inf['store_id'];
  265. }
  266. $goods_info[$k]['store_id']=$store_id;
  267. unset($goods_info[$k]['properties']);
  268. }
  269. }
  270. }else{
  271. $goods_info=null;
  272. if($origin==){
  273. $brand_info=null;
  274. $cate_info=null;
  275. }
  276. }
  277. $foot=array('current_page'=>$page,'pagesize'=>$pageSize,'total_page'=>$total_page);
  278. $data['goods_info']=$goods_info;
  279. $data['foot']=$foot;
  280. if($origin==){
  281. //组装品牌信息
  282. $data['brand_info']=$brand_info;
  283. //组装分类信息
  284. $data['cate_info']=$cate_info;
  285. }
  286. return $data;
  287. }
  288. //二维数组去重
  289. public function remove_duplicate($array){
  290. $result=array();
  291. foreach ($array as $key => $value) {
  292. $has = false;
  293. foreach($result as $val){
  294. if($val['product_id']==$value['product_id']){
  295. $has = true;
  296. break;
  297. }
  298. }
  299. if(!$has)
  300. $result[]=$value;
  301. }
  302. return $result;
  303. }
  304. //获取品牌列表
  305. //$brand_ids为搜索后产品所对应的品牌 $brand_id为选中的品牌列表
  306. public function getBrandInfo($brand_ids,$brand_id){
  307. if(!empty($brand_ids)){
  308. $where="id in ($brand_ids)";
  309. }else{
  310. $where="1=1";
  311. }
  312. $brand_info=M('brand')->field('id,brand_name')->where($where)->select();
  313. foreach($brand_info as $k=>$v){
  314. if(empty($brand_id)){
  315. $brand_info[$k]['list_status']=; //未选中
  316. }else{
  317. if(in_array($v['id'],explode(',',$brand_id))){
  318. $brand_info[$k]['list_status']=; //选中
  319. }else{
  320. $brand_info[$k]['list_status']=; //未选中
  321. }
  322. }
  323. }
  324. return $brand_info;
  325. }
  326. //获取分类列表
  327. //$cate_type选中的分类 $cate_infos搜索出的分类
  328. public function getCateInfo($cate_type,$cate_infos){
  329. //获取平台商品的id
  330. $pingtai_goods=C('pingtai_goods');
  331. $where ="id in ($cate_infos)";
  332. $cate_info=M('store_goods_category')->field('id,name,path')->where($where)->order('sort desc')->select();
  333. if(!empty($cate_info)){
  334. foreach($cate_info as $k=>$v){
  335. if(empty($cate_type)){
  336. $cate_info[$k]['list_status']=; //未选中
  337. }else{
  338. if(in_array($v['id'],explode(',',$cate_type))){
  339. $cate_info[$k]['list_status']=; //选中
  340. }else{
  341. $cate_info[$k]['list_status']=; //未选中
  342. }
  343. }
  344. unset($cate_info[$k]['path']);
  345. }
  346. $cate_info=array_merge($cate_info);
  347. }else{
  348. $cate_info=null;
  349. }
  350. return $cate_info;
  351. }
  1. //根据sku_ids获取分类选中状态
  2. public function getSelectStatus($userId,$type_id){
  3. $user_shop_decorate=M('user_shop_decorate');
  4. $usd_where['flagship_shop']=;
  5. $usd_where['create_id']=$userId;
  6. if($type_id==){
  7. $usd_info=$user_shop_decorate->field('plate_id,plate_content_draft')->where($usd_where)->order('create_time desc')->find();
  8. }else{
  9. $usd_info=$user_shop_decorate->field('plate_id_features plate_id,plate_content_draft_features plate_content_draft')->where($usd_where)->order('create_time desc')->find();
  10. }
  11.  
  12. $shop_decorate_template=M('shop_decorate_template');
  13. $us_where['is_deleted']=;
  14. $us_where['id']=$usd_info['plate_id'];
  15. $us_info=$shop_decorate_template->field('goods_nums')->where($usd_where)->find();
  16. if(empty($usd_info)){
  17. $goods_info=$this->getDefaultGoodsInfo($us_info['goods_nums'],"sell_nums desc");
  18. foreach($goods_info as $k=>$v){
  19. $arr[]=$v['sku_id'];
  20. }
  21. }else{
  22. $plate_content=json_decode($usd_info['plate_content_draft'],true);
  23. foreach($plate_content as $k=>$v){
  24. foreach($v['goods'] as $k2=>$v2){
  25. if($v2['operate_type']==){
  26. $arr[]=$v2['sku_id'];
  27. }
  28. }
  29. }
  30. }
  31. return $arr;
  32. }

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

  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 实现店铺装修3

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

  7. php 实现店铺装修2

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

  8. php 实现店铺装修1

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

  9. php 实现店铺装修4

    /** * @title 发布装修的店铺 * @example FlagShipShopDecorate.fabu? 调试参数:{"username":"17721355 ...

随机推荐

  1. PHP序列化与反序列化(二)

    题目(攻防世界): __construct和__destruct的魔术方法是默认执行的,我们可以忽视他们,__wake up执行以后会返回当前主页上,需要绕过,下面的正则匹配preg_match也需要 ...

  2. dfs & bfs总结

    dfs 最简单的三种形式递归总结 bfs 百度https://baike.baidu.com/item/%E5%AE%BD%E5%BA%A6%E4%BC%98%E5%85%88%E6%90%9C%E7 ...

  3. 吴裕雄--天生自然Numpy库学习笔记:NumPy 从已有的数组创建数组

    import numpy as np x = [1,2,3] a = np.asarray(x) print (a) import numpy as np x = (1,2,3) a = np.asa ...

  4. Codeforces Round #592 (Div. 2)G(模拟)

    #define HAVE_STRUCT_TIMESPEC#include<bits/stdc++.h>using namespace std;long long a[1000007],b[ ...

  5. leetCode练题——21. Merge Two Sorted Lists(照搬大神做法)

    1.题目 21. Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new l ...

  6. java8新特性1:lambda表达式和函数式接口

    1.lambda的介绍: 1.1.为什么java语言需要引入lambda表达式? java语言诞生于1995年,历史时间已经相对较长了.在其后的各种新型编程语言中,都有着lambda表达式的内容,并且 ...

  7. SpringBoot 集成Log4j、集成AOP

    集成Log4j (1)在pom.xml中添加依赖 <!--去掉springboot默认的日志--> <dependency> <groupId>org.spring ...

  8. 一步步动手实现高并发的Reactor模型 —— Kafka底层如何充分利用多线程优势去处理网络I/O与业务分发

    一.从<Apeche Kafka源码剖析>上搬来的概念和图 Kafka网络采用的是Reactor模式,是一种基于事件驱动的模式.熟悉Java编程的读者应该了解Java NIO提供了Reac ...

  9. Java 代码中如何调用 第三方Api

    在代码中调用第三方API 获取数据 package com.example.demo.utils; import com.alibaba.fastjson.JSONObject; import lom ...

  10. JS - false 的 六种类型

    document.write("--------------");document.write(!false);document.write("------------- ...