xiaoyong931011
2023-03-17 b47491974d81fce3bc059791ba8ae41ee8f5e99b
后台修改
5 files modified
28 ■■■■ changed files
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java 8 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/vo/OrderListVo.java 3 ●●●●● 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/goodsList.html 7 ●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/order/orderList.html 8 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -854,6 +854,8 @@
                BigDecimal amount = sku.getPresentPrice().multiply(BigDecimal.valueOf(item.getCnt()));
                total = total.add(amount);
        }
        BigDecimal score = ObjectUtil.isEmpty(addOrderDto.getScore()) ? BigDecimal.ZERO : addOrderDto.getScore();
        if(hasTc){
            //系统设置的个人贡献点最大值
            DataDictionaryCustom starGetDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
@@ -868,6 +870,10 @@
                if(starGet.compareTo(star) <= 0){
                    throw new FebsException("无法购买套餐");
                }
                BigDecimal prizeScore = mallMemberWallet.getPrizeScore();
                if(prizeScore.compareTo(score) < 0){
                    throw new FebsException("积分不足");
                }
            }
        }
        /**
@@ -881,7 +887,7 @@
                DataDictionaryEnum.SCORE_CHANGE.getType(),
                DataDictionaryEnum.SCORE_CHANGE.getCode()
        );
        BigDecimal score = ObjectUtil.isEmpty(addOrderDto.getScore()) ? BigDecimal.ZERO : addOrderDto.getScore();
        if(ObjectUtil.isNotEmpty(scorePercentDic)){
            //商品的现金折扣比例
            BigDecimal scorePercent = new BigDecimal(scorePercentDic.getValue()).multiply(BigDecimal.valueOf(0.01));
src/main/java/cc/mrbird/febs/mall/vo/OrderListVo.java
@@ -31,6 +31,9 @@
    @ApiModelProperty(value = "订单金额")
    private BigDecimal amount;
    @ApiModelProperty(value = "积分抵扣金额")
    private BigDecimal scoreAmount;
    @ApiModelProperty(value = "订单明细")
    private List<OrderItemVo> items;
src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
@@ -91,7 +91,7 @@
                                        <div class="layui-form-item febs-hide tc-set">
                                            <label class="layui-form-label">贡献值:</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="star" lay-verify="required|integer"  placeholder="请输入贡献值" autocomplete="off" class="layui-input">
                                                <input type="text" name="star" placeholder="请输入贡献值" autocomplete="off" class="layui-input">
                                                <div class="layui-form-mid layui-word-aux">支付后,用户获取对应的贡献值</div>
                                            </div>
                                        </div>
src/main/resources/templates/febs/views/modules/goods/goodsList.html
@@ -104,6 +104,9 @@
            tableIns;
        form.render();
        let currPageGoods = 1;//首先默认值为1,防止出错
        //获取当前页
        currPageGoods = $view.find(".layui-laypage-em").next().html();
        // 表格初始化
        initTable();
@@ -194,14 +197,14 @@
        // 查询按钮
        $query.on('click', function () {
            var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
            tableIns.reload({where: params, page: {curr: 1}});
            tableIns.reload({where: params, page: {curr: currPageGoods}});
        });
        // 刷新按钮
        $reset.on('click', function () {
            $searchForm[0].reset();
            sortObject.type = 'null';
            tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
            tableIns.reload({where: getQueryParams(), page: {curr: currPageGoods}, initSort: sortObject});
        });
        $add.on('click', function () {
src/main/resources/templates/febs/views/modules/order/orderList.html
@@ -138,6 +138,10 @@
        form.render();
        let currPageGoods = 1;//首先默认值为1,防止出错
        //获取当前页
        currPageGoods = $view.find(".layui-laypage-em").next().html();
        // 表格初始化
        initTable();
@@ -238,14 +242,14 @@
        // 查询按钮
        $query.on('click', function () {
            var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
            tableIns.reload({where: params, page: {curr: 1}});
            tableIns.reload({where: params, page: {curr: currPageGoods}});
        });
        // 刷新按钮
        $reset.on('click', function () {
            $searchForm[0].reset();
            sortObject.type = 'null';
            tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
            tableIns.reload({where: getQueryParams(), page: {curr: currPageGoods}, initSort: sortObject});
        });
        $add.on('click', function () {