kindring 2 years ago
parent
commit
4c15269a25

+ 5 - 0
日常/0_错题表计划.md

@@ -0,0 +1,5 @@
+# 错题表计划(淘金计划)
+> 目标原则,从互联网中找到真正有用的信息  
+> 检索搜索引擎  
+> 尝试搜索结果  
+> 记录归档

+ 0 - 45
日常/五一计划.md

@@ -1,45 +0,0 @@
-# 五一方案A
-## 时间(五一期间)
-> 预计时间 3 天
- 
-1 出发,到达南澳,边拍边走,夕阳,晚上露营
-2 边走边拍,到达天文台,露营日出.
-3 回南澳,扫街加回家
-## 物品清单
-### 拍摄类(必备)
-| 名称 | 数量 | 备注 |
-| --- | --- | --- |
-| 相机 | 1 | 没有出去干嘛,不如睡觉 |
-| 85 | 1 | 没有不如睡觉 |
-| 75-200 | 1 | 没有不如睡觉 |
-| fw50 | 3 | 满电 |
-| fw50充电器 | 1 | 续航提供 |
-| sd卡64g | 1 | 主力存储,不带不如换画笔 |
-| sd卡32g | 1 | 备用存储 |
-| cmos清洁棒| 1 | 清洁,没有难受死 |
-| cmos清洁液| 1 | 清洁 |
-| 气吹 | 1 |  |
-| 机械硬盘(320g) | 1 | 备份图像,待定 |
-### 生存保障(必备)
-| 名称 | 数量 | 备注 |
-| --- | --- | --- |
-| 帐篷 | 1 | 容纳两个人左右休息 |
-| 水 | 2l | 1.5l大水 + 500ml小水 |
-| 自热饭 | 2 | 吃两餐的量,第二天到西冲补给一点过夜,主力补给事物 |
-| 其他小食物 | 2 | 路途中间补充体力 |
-| 充电宝2w | 1 | 满电,主力续航手段 |
-| 充电宝1w | 1 | 满电,备用续航手段 |
-### 杂项(可不必备)
-| 名称 | 数量 | 备注 | 携带优先等级(1-5)越高越优先 |
-| --- | --- | --- | --- |
-| 花露水 | 1 | 防蚊虫 | 5 |
-| 雨伞 | 1 | 备用,预防下雨 | 3 |
-| 塑料袋 | 5 | 用于小范围防水 | 4 |
-| 平板 | 1 | 看片用,续航与重量需要考虑,大概5小时 | 1 |
-| 安卓手机 | 1 | 备用手机,提供保障 | 3 |
-
-## 备选方案(视天气与防疫政策选择)
-### 西湾
-### 深圳湾
-### 随便扫街
-### 睡觉

+ 0 - 32
高端java/PlatformGoodsExtMapper.java

@@ -1,32 +0,0 @@
-package com.foonsu.efenxiao.platform.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.foonsu.efenxiao.platform.entity.PlatformGoods;
-import com.foonsu.efenxiao.platform.vo.PlatformGoodsReq;
-import com.foonsu.efenxiao.platform.vo.PlatformGoodsVO;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- *  平台商品扩展 Mapper 接口
- *
- * @author BladeX
- * @since 2022-03-29
- */
-public interface PlatformGoodsExtMapper extends BaseMapper<PlatformGoodsVO> {
-
-	/**
-	 * 自定义分页 (商品列表包含代发商品)
-	 *
-	 * @param page
-	 * @param req
-	 * @return
-	 */
-	List<PlatformGoodsVO> selectPlatformGoodsPageData( @Param("req") PlatformGoodsReq req);
-
-	Integer countPlatformGoodsPage(@Param("req") PlatformGoodsReq req);
-
-	List<Long> selectPlatformGoodsPageBizId(@Param("req") PlatformGoodsReq req);
-}

+ 0 - 275
高端java/PlatformGoodsExtMapper.xml

@@ -1,275 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.foonsu.efenxiao.platform.mapper.PlatformGoodsExtMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="goodsResultMap" type="com.foonsu.efenxiao.platform.vo.PlatformGoodsVO"
-        extends="com.foonsu.efenxiao.platform.mapper.PlatformGoodsMapper.platformGoodsResultMap">
-        <result column="shop_name" property="shopName"/>
-        <result column="goods_pic_path" property="picPath"/>
-        <collection property="goodsSkuList" ofType="com.foonsu.efenxiao.platform.vo.PlatformGoodsSkuVO">
-            <id column="goodsSkuId" property="id"/>
-            <result column="goodsSkuBizId" property="bizId"/>
-            <result column="productId" property="productId"/>
-            <result column="sku_id" property="skuId"/>
-            <result column="sku_name" property="skuName"/>
-            <result column="sku_out_id" property="skuOutId"/>
-            <result column="sku_price" property="skuPrice"/>
-            <result column="sku_weight" property="skuWeight"/>
-            <result column="sku_short_name" property="skuShortName"/>
-            <result column="shopBizId" property="shopBizId"/>
-            <result column="shopTenantId" property="shopTenantId"/>
-            <result column="skuOnSale" property="onSale"/>
-            <result column="sku_pic_path" property="picPath"/>
-            <result column="color_spec" property="colorSpec"/>
-            <result column="size_spec" property="sizeSpec"/>
-        </collection>
-        <collection property="distributeList" ofType="com.foonsu.efenxiao.platform.vo.PlatformGoodsDistributeVO">
-            <id column="goodsDistributeId" property="id"/>
-            <result column="goodsDistributeBizId" property="bizId"/>
-            <result column="seller_tenant_id" property="sellerTenantId"/>
-            <result column="factory_tenant_id" property="factoryTenantId"/>
-            <result column="factory_tenant_account" property="factoryTenantAccount"/>
-            <result column="dGoodsBizId" property="goodsBizId"/>
-            <result column="dSkuBizId" property="skuBizId"/>
-            <result column="allocation_status" property="allocationStatus"/>
-        </collection>
-    </resultMap>
-
-    <sql id="Base_Column_List">
-        pg.id,
-        pg.biz_id,
-        pg.product_id,
-        pg.product_name,
-        pg.product_out_id,
-        pg.price,
-        pg.weight,
-        pg.short_name,
-        pg.shop_biz_id,
-        pg.shop_tenant_id,
-        pg.shop_platform,
-        pg.on_sale,
-        pg.create_time,
-        pg.pic_path goods_pic_path
-	</sql>
-
-    <sql id="Base_sku_Column_List">
-        pgs.id goodsSkuId,
-        pgs.biz_id goodsSkuBizId,
-        pgs.product_id productId,
-        pgs.sku_id,
-        pgs.sku_name,
-        pgs.sku_out_id,
-        pgs.sku_price,
-        pgs.sku_weight,
-        pgs.sku_short_name,
-        pgs.shop_biz_id shopBizId,
-        pgs.shop_tenant_id shopTenantId,
-        pgs.on_sale skuOnSale,
-        pgs.pic_path sku_pic_path,
-        pgs.color_spec,
-        pgs.size_spec
-	</sql>
-
-  <!--  <sql id="Base_distribute_Column_List">
-        pgd.id goodsDistributeId,
-        pgd.biz_id goodsDistributeBizId,
-        pgd.seller_tenant_id,
-        pgd.factory_tenant_id,
-        pgd.goods_biz_id dGoodsBizId,
-        pgd.sku_biz_id dSkuBizId,
-        pgd.allocation_status,
-        pgd.factory_tenant_account
-	</sql>-->
-
-    <select id="countPlatformGoodsPage" resultType="int">
-        select count(distinct biz_id)   from(
-        select  pg.biz_id from i_platform_goods pg
-        inner join i_platform_goods_sku pgs on pg.product_id = pgs.product_id and pg.shop_biz_id = pgs.shop_biz_id
-        inner join i_shop s on s.biz_id = pg.shop_biz_id
-        inner join i_platform_goods_distribute pgd on pgd.sku_biz_id = pgs.biz_id and pgd.relation_type = '2' and pgd.factory_tenant_id =  #{req.tenantId}
-        left join i_platform_goods_distribute pgd1 on pgd1.sku_biz_id = pgs.biz_id and pgd1.relation_type = '2' and pgd1.seller_tenant_id =  #{req.tenantId}
-        where pgs.id is not null
-        <include refid="search_condition" />
-
-        union
-        select pg.biz_id from i_platform_goods pg
-        left join i_platform_goods_sku pgs on pg.product_id = pgs.product_id and pg.shop_biz_id = pgs.shop_biz_id
-        inner join i_shop s on s.biz_id = pg.shop_biz_id
-        inner join i_platform_goods_distribute pgd on pgd.goods_biz_id = pg.biz_id and pgd.relation_type = '1' and (pgd.factory_tenant_id =  #{req.tenantId} )
-        left join i_platform_goods_distribute pgd1 on pgd1.goods_biz_id = pg.biz_id and pgd1.relation_type = '1' and (pgd1.seller_tenant_id =  #{req.tenantId} )
-        where pgs.id is null
-        <include refid="search_condition" />
-        ) temp
-    </select>
-
-
-    <select id="selectPlatformGoodsPageBizId" resultType="int">
-        select distinct biz_id  from(
-        select  pg.biz_id from i_platform_goods pg
-        inner join i_platform_goods_sku pgs on pg.product_id = pgs.product_id and pg.shop_biz_id = pgs.shop_biz_id
-        inner join i_shop s on s.biz_id = pg.shop_biz_id
-        inner join i_platform_goods_distribute pgd on pgd.sku_biz_id = pgs.biz_id and pgd.relation_type = '2' and pgd.factory_tenant_id =  #{req.tenantId}
-        left join i_platform_goods_distribute pgd1 on pgd1.sku_biz_id = pgs.biz_id and pgd1.relation_type = '2' and pgd1.seller_tenant_id =  #{req.tenantId}
-        where pgs.id is not null
-        <include refid="search_condition" />
-
-        union
-        select pg.biz_id from i_platform_goods pg
-        left join i_platform_goods_sku pgs on pg.product_id = pgs.product_id and pg.shop_biz_id = pgs.shop_biz_id
-        inner join i_shop s on s.biz_id = pg.shop_biz_id
-        inner join i_platform_goods_distribute pgd on pgd.goods_biz_id = pg.biz_id and pgd.relation_type = '1' and (pgd.factory_tenant_id =  #{req.tenantId} )
-        left join i_platform_goods_distribute pgd1 on pgd1.goods_biz_id = pg.biz_id and pgd1.relation_type = '1' and (pgd1.seller_tenant_id =  #{req.tenantId} )
-
-        where pgs.id is null
-        <include refid="search_condition" />
-        ) temp
-        <include refid="sort_condition" />
-    </select>
-
-
-    <select id="selectPlatformGoodsPageData" resultMap="goodsResultMap">
-        select <include refid="Base_Column_List" />, <include refid="Base_sku_Column_List" />, s.shop_name
-        from i_platform_goods pg
-        left join i_platform_goods_sku pgs on pg.product_id = pgs.product_id and pg.shop_biz_id = pgs.shop_biz_id
-        inner join i_shop s on s.biz_id = pg.shop_biz_id
-        where pg.biz_id in <foreach collection="req.productBizIds" item="item" open="(" close=")" separator=",">#{item}</foreach>
-    </select>
-
-    <sql id="search_condition">
-
-        <if test="req.shopPlatforms != null">
-            and pg.shop_platform in <foreach collection="req.shopPlatforms" open="(" close=")" separator="," item="item">#{item}</foreach>
-        </if>
-        <if test="req.shopBizId != null">
-            and pg.shop_biz_id = #{req.shopBizId}
-        </if>
-        <if test="req.factoryTenantId != null">
-            and pgd1.factory_tenant_id = #{req.factoryTenantId}
-        </if>
-        <if test="req.sellerTenantId != null">
-            and pgd.seller_tenant_id = #{req.sellerTenantId}
-        </if>
-        <if test="req.factoryTenantId != null and (req.fillInStater != null || req.compareStater != null)">
-            and (
-                <if test="req.fillInStater == 0">
-                     pgd1.distribute_price is not null
-                </if>
-                <if test="req.fillInStater == 1">
-                     pgd1.distribute_price is null
-                </if>
-                <if test="req.compareStater == 0">
-                    <if test="req.fillInStater != null">
-                        and
-                    </if>
-                    pgd1.distribute_price &gt;= #{req.distributePrice}
-                </if>
-                <if test="req.compareStater == 1">
-                    <if test="req.fillInStater != null">
-                        and
-                    </if>
-                    pgd1.distribute_price &lt;= #{req.distributePrice}
-                </if>
-            )
-        </if>
-        <if test="req.sellerTenantId != null and (req.fillInStater != null || req.compareStater != null)">
-            and (
-                <if test="req.fillInStater == 0">
-                    pgd.distribute_price is not null
-                </if>
-                <if test="req.fillInStater == 1">
-                    pgd.distribute_price is null
-                </if>
-                <if test="req.compareStater == 0">
-                    <if test="req.fillInStater != null">
-                        and
-                    </if>
-                    pgd.distribute_price &gt;= #{req.distributePrice}
-                </if>
-                <if test="req.compareStater == 1">
-                    <if test="req.fillInStater != null">
-                        and
-                    </if>
-                    pgd.distribute_price &lt;= #{req.distributePrice}
-                </if>
-            )
-        </if>
-        <if test="req.onSale != null">
-            and pg.on_sale = #{req.onSale}
-        </if>
-        <if test="req.productName != null">
-            <if test="req.isGoodsInclude == 1">
-                and pg.product_name like concat('%',#{req.productName},'%')
-            </if>
-            <if test="req.isGoodsInclude == 0">
-                and pg.product_name not like concat('%',#{req.productName},'%')
-            </if>
-        </if>
-        <if test="req.shortName != null and req.shortName != ''">
-            and pg.short_name = #{req.shortName}
-        </if>
-        <if test="req.shortNameFlag != null and req.shortNameFlag == 1">
-            and pg.short_name is not null and pg.short_name != ''
-        </if>
-        <if test="req.weightFlag != null and req.weightFlag == 1">
-            and (pg.weight is not null and pg.weight > 0)
-        </if>
-        <if test="req.weightFlag != null and req.weightFlag == 0">
-            and (pg.weight is null or pg.weight = '' or pg.weight = 0)
-        </if>
-        <if test="req.skuShortName != null and req.skuShortName != ''">
-            and pgs.sku_short_name = #{req.skuShortName}
-        </if>
-        <if test="req.skuShortNameFlag != null and req.skuShortNameFlag == 1">
-            and pgs.sku_short_name is not null and pgs.sku_short_name != ''
-        </if>
-        <if test="req.skuWeightFlag != null and req.skuWeightFlag == 1">
-            and (pgs.sku_weight is not null and pgs.sku_weight > 0)
-        </if>
-        <if test="req.skuWeightFlag != null and req.skuWeightFlag == 0">
-            and (pgs.sku_weight is null or pgs.sku_weight = '' or pgs.sku_weight = 0)
-        </if>
-        <if test="req.productOutIdList != null">
-            and pg.product_out_id in
-            <foreach collection="req.productOutIdList" item="productOutId" open="("
-                     close=")" separator=",">
-                #{productOutId}
-            </foreach>
-        </if>
-        <if test="req.skuName != null and req.skuName != ''">
-            <if test="req.isSkuInclude == 1">
-                and pgs.sku_name like concat('%',#{req.skuName},'%')
-            </if>
-            <if test="req.isSkuInclude == 0">
-                and pgs.sku_name not like concat('%',#{req.skuName},'%')
-            </if>
-        </if>
-        <if test="req.productId != null and req.productId != ''">
-            and pg.product_id = #{req.productId}
-        </if>
-        <if test="req.skuId != null and req.skuId != ''">
-            and pgs.sku_id = #{req.skuId}
-        </if>
-
-        <if test="req.allocationStatus != null and req.allocationStatus != ''">
-            and pgd.allocation_status = #{req.allocationStatus}
-        </if>
-
-        <if test="req.productBizIds != null">
-            and pg.biz_id in <foreach collection="req.productBizIds" item="item" open="(" close=")" separator=",">#{item}</foreach>
-        </if>
-
-    </sql>
-
-    <sql id="sort_condition">
-        <if test="req.sort == '0'">
-            order BY  temp.create_time asc
-        </if>
-        <if test="req.sort == '1'">
-            order BY  temp.create_time desc
-        </if>
-        limit #{req.pageStart},#{req.pageSize}
-    </sql>
-
-
-</mapper>

+ 0 - 83
高端java/PlatformGoodsSkuServiceImpl.java

@@ -1,83 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package com.foonsu.efenxiao.platform.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.foonsu.efenxiao.platform.entity.PlatformGoods;
-import com.foonsu.efenxiao.platform.entity.PlatformGoodsDistribute;
-import com.foonsu.efenxiao.platform.entity.PlatformGoodsSku;
-import com.foonsu.efenxiao.platform.vo.PlatformGoodsSkuVO;
-import com.foonsu.efenxiao.platform.mapper.PlatformGoodsSkuMapper;
-import com.foonsu.efenxiao.platform.service.IPlatformGoodsSkuService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.checkerframework.checker.units.qual.A;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *  服务实现类
- *
- * @author BladeX
- * @since 2022-03-17
- */
-@Service
-public class PlatformGoodsSkuServiceImpl extends ServiceImpl<PlatformGoodsSkuMapper, PlatformGoodsSku> implements IPlatformGoodsSkuService {
-
-	@Autowired
-	private PlatformGoodsDistributeServiceImpl platformGoodsDistributeService;
-
-	@Override
-	public IPage<PlatformGoodsSkuVO> selectPlatformGoodsSkuPage(IPage<PlatformGoodsSkuVO> page, PlatformGoodsSkuVO platformGoodsSku) {
-		return page.setRecords(baseMapper.selectPlatformGoodsSkuPage(page, platformGoodsSku));
-	}
-
-	@Override
-	public PlatformGoodsSku queryByProductIdSkuId(Long shopBizId, String productId, String skuId) {
-		LambdaQueryWrapper<PlatformGoodsSku> queryWrapper = Wrappers.<PlatformGoodsSku>query().lambda().eq(PlatformGoodsSku::getShopBizId, shopBizId)
-			.eq(PlatformGoodsSku::getProductId, productId).eq(PlatformGoodsSku::getSkuId, skuId);
-
-		List<PlatformGoodsSku> skus = baseMapper.selectList(queryWrapper);
-
-		return skus.size()>0?skus.get(0):null;
-	}
-
-	@Override
-	@Transactional
-	public void addPlatformGoodsSku(PlatformGoodsSku sku, PlatformGoodsDistribute platformGoodsDistribute) {
-		this.save(sku);
-		platformGoodsDistributeService.save(platformGoodsDistribute);
-	}
-
-	@Override
-	public List<PlatformGoodsSku> queryByProductIdsSkuIds(Long shopId, List<String> productIds, List<String> skuIds) {
-		if(skuIds.size() == 0){
-			return new ArrayList<>();
-		}
-		LambdaQueryWrapper<PlatformGoodsSku> queryWrapper = Wrappers.<PlatformGoodsSku>query().lambda().eq(PlatformGoodsSku::getShopBizId, shopId)
-				.in(PlatformGoodsSku::getProductId, productIds).in(PlatformGoodsSku::getSkuId, skuIds);
-
-		List<PlatformGoodsSku> skus = baseMapper.selectList(queryWrapper);
-
-		return skus;
-	}
-}