java110
2023-08-31 068fde7238049565d12b39b28e02b0202264910f
优化代码权限
11个文件已修改
135 ■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/purchase/PurchaseApplyDetailDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/resource/ResourceStoreDto.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/resource/ResourceStoreTimesDto.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/purchase/ResourceStorePo.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/resource/ResourceStoreTimesPo.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/store/PurchaseApplyDetailServiceDaoImplMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/store/ResourceStoreTimesV1ServiceDaoImplMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/store/ResourceStoreV1ServiceDaoImplMapper.xml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-store/src/main/java/com/java110/store/bmo/allocation/impl/AllocationBMOImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-store/src/main/java/com/java110/store/cmd/resourceStore/SaveResourceStoreCmd.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/purchase/PurchaseApplyDetailDto.java
@@ -63,6 +63,7 @@
    private String storeId;
    private String communityId;
    public String getApplyOrderId() {
        return applyOrderId;
@@ -407,6 +408,14 @@
    public void setIsFixedName(String isFixedName) {
        this.isFixedName = isFixedName;
    }
    public String getCommunityId() {
        return communityId;
    }
    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }
}
java110-bean/src/main/java/com/java110/dto/resource/ResourceStoreDto.java
@@ -7,6 +7,7 @@
import java.util.List;
/**
 * 物品实体类
 * @ClassName FloorDto
 * @Description 资源数据层封装
 * @Author wuxw
@@ -74,6 +75,8 @@
    //是否是固定物品
    private String isFixed;
    private String isFixedName;
    private String communityId;
    private List<ResourceStoreTimesDto> times;
@@ -408,4 +411,12 @@
    public void setResCodeLike(String resCodeLike) {
        this.resCodeLike = resCodeLike;
    }
    public String getCommunityId() {
        return communityId;
    }
    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }
}
java110-bean/src/main/java/com/java110/dto/resource/ResourceStoreTimesDto.java
@@ -31,6 +31,8 @@
    private String statusCd = "0";
    private String communityId;
    public String getPrice() {
        return price;
@@ -136,4 +138,14 @@
    public void setResCodeLike(String resCodeLike) {
        this.resCodeLike = resCodeLike;
    }
    @Override
    public String getCommunityId() {
        return communityId;
    }
    @Override
    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }
}
java110-bean/src/main/java/com/java110/po/purchase/ResourceStorePo.java
@@ -50,6 +50,8 @@
    private String isFixed;
    private String isFixedName;
    private String communityId;
    public String getResId() {
        return resId;
    }
@@ -313,4 +315,12 @@
    public void setIsFixedName(String isFixedName) {
        this.isFixedName = isFixedName;
    }
    public String getCommunityId() {
        return communityId;
    }
    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }
}
java110-bean/src/main/java/com/java110/po/resource/ResourceStoreTimesPo.java
@@ -37,6 +37,8 @@
    private String timesId;
    private String shId;
    private String communityId;
    public String getPrice() {
        return price;
    }
@@ -101,4 +103,12 @@
    public void setShId(String shId) {
        this.shId = shId;
    }
    public String getCommunityId() {
        return communityId;
    }
    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }
}
java110-db/src/main/resources/mapper/store/PurchaseApplyDetailServiceDaoImplMapper.xml
@@ -173,6 +173,9 @@
        <if test="storeId !=null and storeId != ''">
            and pa.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and pa.community_id= #{communityId}
        </if>
        <if test="rssId !=null and rssId != ''">
            and rs.rss_id= #{rssId}
        </if>
@@ -322,6 +325,9 @@
        <if test="storeId !=null and storeId != ''">
            and pa.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and pa.community_id= #{communityId}
        </if>
        <if test="rssId !=null and rssId != ''">
            and rs.rss_id= #{rssId}
        </if>
java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml
@@ -23,12 +23,12 @@
        insert into resource_store(res_id, b_id, store_id, res_name, res_code, unit_code, remark, out_low_price,
                                   out_high_price, show_mobile, description,
                                   price, stock, create_time, sh_id, warning_stock, average_price, rss_id, rst_id,
                                   mini_unit_code, mini_unit_stock, mini_stock, parent_rst_id, is_fixed)
                                   mini_unit_code, mini_unit_stock, mini_stock, parent_rst_id, is_fixed,community_id)
        values (#{resId}, #{bId}, #{storeId}, #{resName}, #{resCode}, #{unitCode}, #{remark}, #{outLowPrice},
                #{outHighPrice},
                #{showMobile}, #{description}, #{price}, #{stock}, #{createTime}, #{shId}, #{warningStock},
                #{averagePrice}, #{rssId}, #{rstId}, #{miniUnitCode}, #{miniUnitStock}, #{miniStock}, #{parentRstId},
                #{isFixed})
                #{isFixed},#{communityId})
    </insert>
    <!-- 查询资源信息(Business) add by wuxw 2018-07-03 -->
@@ -212,7 +212,7 @@
        miniStock,t.mini_unit_stock,t.mini_unit_stock miniUnitStock,td.name unitCodeName,td1.name
        miniUnitCodeName,t.parent_rst_id parentRstId,t.rst_id rstId,rst1.name parentRstName,rst.name
        rstName,
        t.is_fixed,t.is_fixed isFixed,td2.name isFixedName
        t.is_fixed,t.is_fixed isFixed,td2.name isFixedName,t.community_id communityId
        from resource_store t
        left join resource_store_type rst on t.rst_id = rst.rst_id and rst.status_cd = '0'
        left join resource_store_type rst1 on t.parent_rst_id = rst1.rst_id and rst1.status_cd = '0'
@@ -269,6 +269,9 @@
        </if>
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="stock !=null and stock != ''">
            and t.stock= #{stock}
@@ -367,9 +370,7 @@
        <if test="description !=null and description != ''">
            , t.description= #{description}
        </if>
        <if test="storeId !=null and storeId != ''">
            , t.store_id= #{storeId}
        </if>
        , t.stock= #{stock}
        <if test="warningStock !=null and warningStock != ''">
            , t.warning_stock= #{warningStock}
@@ -398,6 +399,12 @@
        </if>
        <if test="resId !=null and resId != ''">
            and t.res_id= #{resId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
    </update>
@@ -436,6 +443,9 @@
        </if>
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="stock !=null and stock != ''">
            and t.stock= #{stock}
@@ -557,6 +567,9 @@
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="stock !=null and stock != ''">
            and t.stock= #{stock}
        </if>
java110-db/src/main/resources/mapper/store/ResourceStoreTimesV1ServiceDaoImplMapper.xml
@@ -8,9 +8,9 @@
    <!-- 保存物品次数信息 add by wuxw 2018-07-03 -->
    <insert id="saveResourceStoreTimesInfo" parameterType="Map">
        insert into resource_store_times(
        price,apply_order_id,store_id,stock,res_code,times_id,sh_id
        price,apply_order_id,store_id,stock,res_code,times_id,sh_id,community_id
        ) values (
        #{price},#{applyOrderId},#{storeId},#{stock},#{resCode},#{timesId},#{shId}
        #{price},#{applyOrderId},#{storeId},#{stock},#{resCode},#{timesId},#{shId},#{communityId}
        )
    </insert>
@@ -29,7 +29,7 @@
        miniStock,rs.mini_unit_stock,rs.mini_unit_stock miniUnitStock,td.name unitCodeName,td1.name
        miniUnitCodeName,rs.parent_rst_id parentRstId,rs.rst_id rstId,rst1.name parentRstName,rst.name
        rstName,
        rs.is_fixed,rs.is_fixed isFixed,td2.name isFixedName
        rs.is_fixed,rs.is_fixed isFixed,td2.name isFixedName,t.community_id communityId
        from resource_store_times t
        inner join resource_store rs on t.res_code = rs.res_code and rs.status_cd = '0' and t.sh_id = rs.sh_id
        left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0'
@@ -72,6 +72,9 @@
        </if>
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="stock !=null and stock != ''">
            and t.stock= #{stock}
@@ -125,6 +128,9 @@
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
    </update>
@@ -174,6 +180,9 @@
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="stock !=null and stock != ''">
            and t.stock= #{stock}
        </if>
@@ -213,6 +222,9 @@
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="stock !=null and stock != ''">
            and t.stock= #{stock}
        </if>
java110-db/src/main/resources/mapper/store/ResourceStoreV1ServiceDaoImplMapper.xml
@@ -8,10 +8,10 @@
        insert into resource_store(sh_id, description, remark, store_id, res_id, parent_rst_id, warning_stock, rss_id,
                                   res_name, rst_id, out_low_price, price, mini_unit_stock, unit_code, res_code,
                                   mini_unit_code, average_price, stock, out_high_price, show_mobile, is_fixed,
                                   mini_stock)
                                   mini_stock,community_id)
        values (#{shId}, #{description}, #{remark}, #{storeId}, #{resId}, #{parentRstId}, #{warningStock}, #{rssId},
                #{resName}, #{rstId}, #{outLowPrice}, #{price}, #{miniUnitStock}, #{unitCode}, #{resCode},
                #{miniUnitCode}, #{averagePrice}, #{stock}, #{outHighPrice}, #{showMobile}, #{isFixed}, #{miniStock})
                #{miniUnitCode}, #{averagePrice}, #{stock}, #{outHighPrice}, #{showMobile}, #{isFixed}, #{miniStock},#{communityId})
    </insert>
    <!-- 查询物品信息信息 add by wuxw 2018-07-03 -->
@@ -40,6 +40,9 @@
        </if>
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="resId !=null and resId != ''">
            and t.res_id= #{resId}
@@ -116,9 +119,7 @@
        <if test="remark !=null and remark != ''">
            , t.remark= #{remark}
        </if>
        <if test="storeId !=null and storeId != ''">
            , t.store_id= #{storeId}
        </if>
        <if test="parentRstId !=null and parentRstId != ''">
            , t.parent_rst_id= #{parentRstId}
        </if>
@@ -174,6 +175,12 @@
        <if test="resId !=null and resId != ''">
            and t.res_id= #{resId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
    </update>
    <!-- 查询物品信息数量 add by wuxw 2018-07-03 -->
@@ -196,6 +203,9 @@
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="resId !=null and resId != ''">
            and t.res_id= #{resId}
        </if>
service-store/src/main/java/com/java110/store/bmo/allocation/impl/AllocationBMOImpl.java
@@ -106,6 +106,7 @@
            tmpResourceStorePo.setResId(GenerateCodeFactory.getGeneratorId("11"));
            tmpResourceStorePo.setStock(allocationStock + "");
            tmpResourceStorePo.setShId(tmpAllocationStorehouseDto.getShIdz());
            tmpResourceStorePo.setCommunityId(resourceStoreDtoZs.get(0).getCommunityId());
            resourceStoreV1InnerServiceSMOImpl.saveResourceStore(tmpResourceStorePo);
            // todo 添加 times
@@ -113,6 +114,7 @@
            tmpResourceStoreTimesPo.setTimesId(GenerateCodeFactory.getGeneratorId("11"));
            tmpResourceStoreTimesPo.setStock(allocationStock + "");
            tmpResourceStoreTimesPo.setShId(tmpAllocationStorehouseDto.getShIdz());
            tmpResourceStoreTimesPo.setCommunityId(resourceStoreDtoZs.get(0).getCommunityId());
            resourceStoreTimesV1InnerServiceSMOImpl.saveResourceStoreTimes(tmpResourceStoreTimesPo);
            return;
service-store/src/main/java/com/java110/store/cmd/resourceStore/SaveResourceStoreCmd.java
@@ -132,6 +132,7 @@
        Assert.hasKeyAndValue(reqJson, "storeId", "必填,请填写商户信息");
        Assert.hasKeyAndValue(reqJson, "price", "必填,请填写物品价格");
        Assert.hasKeyAndValue(reqJson, "shId", "必填,请填写仓库");
        Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区");
        //获取最低收费标准
        double outLowPrice = Double.parseDouble(reqJson.getString("outLowPrice"));
@@ -173,16 +174,6 @@
        if (flag < 1) {
            throw new CmdException("保存数据失败");
        }
        // todo 保存至 物品 times表
//        ResourceStoreTimesPo resourceStoreTimesPo = new ResourceStoreTimesPo();
//        resourceStoreTimesPo.setApplyOrderId("-1");
//        resourceStoreTimesPo.setPrice(resourceStorePo.getPrice());
//        resourceStoreTimesPo.setStock(resourceStorePo.getStock());
//        resourceStoreTimesPo.setResCode(resourceStorePo.getResCode());
//        resourceStoreTimesPo.setStoreId(resourceStorePo.getStoreId());
//        resourceStoreTimesPo.setShId(resourceStorePo.getShId());
//        resourceStoreTimesV1InnerServiceSMOImpl.saveOrUpdateResourceStoreTimes(resourceStoreTimesPo);
        //todo 入库
        inStore(reqJson, userId, storeId, resourceStorePo);
@@ -278,6 +269,7 @@
        resourceStoreTimesPo.setStoreId(resourceStorePo.getStoreId());
        resourceStoreTimesPo.setTimesId(GenerateCodeFactory.getGeneratorId("10"));
        resourceStoreTimesPo.setShId(resourceStorePo.getShId());
        resourceStoreTimesPo.setCommunityId(reqJson.getString("communityId"));
        resourceStoreTimesV1InnerServiceSMOImpl.saveOrUpdateResourceStoreTimes(resourceStoreTimesPo);