wzy
2021-11-30 0e5aaeba97021c289485a652ec6af0bb37f92af7
fix 40 to 50
4 files modified
12 ■■■■ changed files
gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java 4 ●●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/service/JhyService.java 2 ●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/vo/JhyOrderItemsVo.java 4 ●●●● patch | view | raw | blame | history
gc-user/src/main/resources/mapper/user/AccountMapper.xml 2 ●●● patch | view | raw | blame | history
gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java
@@ -156,7 +156,7 @@
        BigDecimal total = BigDecimal.ZERO;
        for (JhyOrderItems item : items) {
            item.setPrice(item.getPrice().multiply(BigDecimal.valueOf(40)));
            item.setPrice(item.getPrice().multiply(BigDecimal.valueOf(50)));
            total = total.add(StrUtil.isNotBlank(item.getScore()) ? new BigDecimal(item.getScore()) : BigDecimal.ZERO);
        }
@@ -236,7 +236,7 @@
                    orderItems.setItemType(item.getId());
                    orderItems.setTitle(environmentalInfo.getTitle());
                    orderItems.setPrice(new BigDecimal(environmentalInfo.getPrice()));
                    BigDecimal total = orderItems.getPrice().multiply(BigDecimal.valueOf(40)).multiply(weight);
                    BigDecimal total = orderItems.getPrice().multiply(BigDecimal.valueOf(50)).multiply(weight);
                    orderItems.setScore(total.setScale(0, BigDecimal.ROUND_DOWN).toString());
                    orderItems.setWeight(weight);
                    jhyOrderItemsMapper.insert(orderItems);
gc-shop/src/main/java/com/xzx/gc/shop/service/JhyService.java
@@ -117,7 +117,7 @@
        List<JhyOrderItemsVo> jhyOrderItemsList = jhyOrderItemsMapper.selectJhyOrderItemListByOrderId(id);
        if(CollUtil.isNotEmpty(jhyOrderItemsList)){
            for(JhyOrderItemsVo jhyOrderItemsVo : jhyOrderItemsList){
                BigDecimal multiply = jhyOrderItemsVo.getPrice().multiply(new BigDecimal(40));
                BigDecimal multiply = jhyOrderItemsVo.getPrice().multiply(new BigDecimal(50));
                jhyOrderItemsVo.setPrice(multiply);
                jhyOrderItemsVo.setAllPrice(new BigDecimal(StrUtil.isEmpty(jhyOrderItemsVo.getScore())?"0":jhyOrderItemsVo.getScore()).setScale( 2, BigDecimal.ROUND_DOWN ));
            }
gc-shop/src/main/java/com/xzx/gc/shop/vo/JhyOrderItemsVo.java
@@ -15,10 +15,10 @@
    @ApiModelProperty(value="标题")
    private String title;
    @ApiModelProperty(value="单价(积分)= 价格*40")
    @ApiModelProperty(value="单价(积分)= 价格*50")
    private BigDecimal price;
    @ApiModelProperty(value="总积分= 价格*重量*40")
    @ApiModelProperty(value="总积分= 价格*重量*50")
    private BigDecimal allPrice;
    @ApiModelProperty(value="图片")
gc-user/src/main/resources/mapper/user/AccountMapper.xml
@@ -255,7 +255,7 @@
            c.nick_name nickname,
            c.mobile_phone phone,
            (select sum(score) from xzx_jhy_order_items where b.id = order_id) score,
            (select sum(score/ 40) from xzx_jhy_order_items where b.id = order_id) amount
            (select sum(score/ 50) from xzx_jhy_order_items where b.id = order_id) amount
        FROM
            xzx_user_head_details a
                LEFT JOIN xzx_jhy_order b ON a.order_no = b.order_no