xiaoyong931011
2023-02-14 ef04975fe02f150798c42d5d49527f44b81ba74a
后台商品修改
7 files modified
46 ■■■■■ changed files
src/main/java/cc/mrbird/febs/mall/mapper/MallGoodsMapper.java 4 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java 8 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MallGoodsMapper.xml 12 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html 2 ●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html 2 ●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/order/commentList.html 15 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/order/orderList.html 3 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/mapper/MallGoodsMapper.java
@@ -58,4 +58,8 @@
    List<MallGoods> selectMallGoodsListQueryByRuleId(@Param("id")Long id);
    List<MallGoods> selectMallGoodsListQueryByRuleIdAndIsSale(@Param("id")Long id, @Param("isSale")Integer ishotStateYes);
    void updateCarriageRuleId(@Param("id")Long id);
    void updateCarriageAmount(@Param("id")Long id);
}
src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java
@@ -72,7 +72,7 @@
        Integer carriageType = addMallGoodsDto.getCarriageType();
        if(1 == carriageType){
            if(ObjectUtil.isEmpty(addMallGoodsDto.getCarriageAmount())
                    || BigDecimal.ZERO.compareTo(addMallGoodsDto.getCarriageAmount()) >= 0){
                    || BigDecimal.ZERO.compareTo(addMallGoodsDto.getCarriageAmount()) > 0){
                return new FebsResponse().fail().message("固定邮费不能小于零");
            }
        }else{
@@ -389,6 +389,12 @@
        mallGoodsMapper.updateById(mallGoods);
        if( 1 == mallGoods.getCarriageType()){
            mallGoodsMapper.updateCarriageRuleId(mallGoods.getId());
        }else{
            mallGoodsMapper.updateCarriageAmount(mallGoods.getId());
        }
        mallGoodsImagesMapper.deleteByGoodsId(mallGoodsUpdateDto.getId());
        String thumbs = mallGoodsUpdateDto.getThumbs();
        if (StrUtil.isNotEmpty(thumbs)) {
src/main/resources/mapper/modules/MallGoodsMapper.xml
@@ -286,6 +286,18 @@
        where id=#{id} and  volume - #{cnt} <![CDATA[ >= ]]> 0
    </update>
    <update id="updateCarriageRuleId">
        update mall_goods
        set carriage_rule_id = null
        where id=#{id}
    </update>
    <update id="updateCarriageAmount">
        update mall_goods
        set carriage_amount = null
        where id=#{id}
    </update>
    <select id="selectMallGoodsListQueryNoPage" resultType="cc.mrbird.febs.mall.vo.MallGoodsListVo">
        select * from (
        select
src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
@@ -89,7 +89,7 @@
                                            <div class="layui-input-block">
                                                <select name="isNormal" class="goods-type" lay-filter="goods-type-select">
                                                    <option value="1">普通商品区</option>
                                                    <option value="2">套餐区</option>
<!--                                                    <option value="2">套餐区</option>-->
                                                </select>
                                            </div>
                                        </div>
src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
@@ -98,7 +98,7 @@
                                                <select name="isNormal" class="goods-type"
                                                        lay-filter="goods-type-select">
                                                    <option value="1">普通商品区</option>
                                                    <option value="2">套餐区</option>
<!--                                                    <option value="2">套餐区</option>-->
                                                </select>
                                            </div>
                                        </div>
src/main/resources/templates/febs/views/modules/order/commentList.html
@@ -29,18 +29,6 @@
                        </div>
                    </form>
                    <table lay-filter="commetTable" lay-data="{id: 'commetTable'}"></table>
                    <style type="text/css">
                        .layui-table-cell{
                            text-align:center;
                            height: auto;
                            white-space: nowrap; /*文本不会换行,在同一行显示*/
                            overflow: hidden; /*超出隐藏*/
                            text-overflow: ellipsis; /*省略号显示*/
                        }
                        .layui-table img{
                            max-width:100px
                        }
                    </style>
                </div>
            </div>
        </div>
@@ -107,8 +95,7 @@
                elem: $view.find('table'),
                id: 'commetTable',
                url: ctx + 'admin/order/commentList',
                defaultToolbar: [],
                toolbar: '#tableToolBar',
                // toolbar: '#tableToolBar',
                cols: [[
                        {field: 'memberName', title: '昵称', minWidth: 100,align:'left'},
                        {field: 'orderNo', title: '订单编号', minWidth: 80,align:'left'},
src/main/resources/templates/febs/views/modules/order/orderList.html
@@ -376,7 +376,8 @@
                elem: $view.find('table'),
                id: 'orderTable',
                url: ctx + 'admin/order/orderList?orderType=1',
                defaultToolbar: [],
                // defaultToolbar: [],
                //系统自带打印导出
                toolbar: '#tableToolBar',
                cols: [[
                        {type: 'checkbox', fixed: 'left'},