| | |
| | | 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( |
| | |
| | | if(starGet.compareTo(star) <= 0){ |
| | | throw new FebsException("无法购买套餐"); |
| | | } |
| | | BigDecimal prizeScore = mallMemberWallet.getPrizeScore(); |
| | | if(prizeScore.compareTo(score) < 0){ |
| | | throw new FebsException("积分不足"); |
| | | } |
| | | } |
| | | } |
| | | /** |
| | |
| | | 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)); |
| | |
| | | @ApiModelProperty(value = "订单金额") |
| | | private BigDecimal amount; |
| | | |
| | | @ApiModelProperty(value = "积分抵扣金额") |
| | | private BigDecimal scoreAmount; |
| | | |
| | | @ApiModelProperty(value = "订单明细") |
| | | private List<OrderItemVo> items; |
| | | |
| | |
| | | <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> |
| | |
| | | tableIns; |
| | | |
| | | form.render(); |
| | | let currPageGoods = 1;//首先默认值为1,防止出错 |
| | | //获取当前页 |
| | | currPageGoods = $view.find(".layui-laypage-em").next().html(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | |
| | | // 查询按钮 |
| | | $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 () { |
| | |
| | | |
| | | form.render(); |
| | | |
| | | let currPageGoods = 1;//首先默认值为1,防止出错 |
| | | //获取当前页 |
| | | currPageGoods = $view.find(".layui-laypage-em").next().html(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | |
| | | // 查询按钮 |
| | | $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 () { |