Helius
2021-06-28 54a084af6bfc0eb1737bec9c962e4067d6cd1b3a
Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
3 files modified
12 ■■■■■ changed files
gc-shop/src/main/java/com/xzx/gc/shop/service/JhyService.java 6 ●●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/vo/JhyOrderItemsVo.java 4 ●●●● patch | view | raw | blame | history
gc-shop/src/main/resources/mapper/shop/JhyOrderMapper.xml 2 ●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/service/JhyService.java
@@ -68,7 +68,11 @@
            for(JhyOrderItems jhyOrderItems : jhyOrderItemsList){
                JhyOrderItemsVo jhyOrderItemsVo = BeanUtil.copyProperties(jhyOrderItems, JhyOrderItemsVo.class);
                BigDecimal multiply = jhyOrderItemsVo.getPrice().multiply(new BigDecimal(40));
                jhyOrderItemsVo.setAllPrice(multiply);
                BigDecimal multiplyScore = jhyOrderItemsVo.getPrice()
                        .multiply(jhyOrderItemsVo.getWeight()==null?BigDecimal.ZERO :jhyOrderItemsVo.getWeight())
                        .multiply(new BigDecimal(40));
                jhyOrderItemsVo.setPrice(multiply);
                jhyOrderItemsVo.setAllPrice(multiplyScore);
                jhyOrderItemsVolist.add(jhyOrderItemsVo);
            }
        }
gc-shop/src/main/java/com/xzx/gc/shop/vo/JhyOrderItemsVo.java
@@ -15,10 +15,10 @@
    @ApiModelProperty(value="标题")
    private String title;
    @ApiModelProperty(value="价格")
    @ApiModelProperty(value="单价(积分)= 价格*40")
    private BigDecimal price;
    @ApiModelProperty(value="总计")
    @ApiModelProperty(value="总积分= 价格*重量*40")
    private BigDecimal allPrice;
    @ApiModelProperty(value="图片")
gc-shop/src/main/resources/mapper/shop/JhyOrderMapper.xml
@@ -14,7 +14,7 @@
        a.remark remark,
        b.nick_name name,
        b.mobile_phone mobilePhone,
               (select ifnull(sum(price)*40,0) from xzx_jhy_order_items where order_id = a.id) totalPrice,
               (select ifnull(sum(price*weight*40),0) from xzx_jhy_order_items where order_id = a.id) totalPrice,
        d.username username
        FROM
        xzx_jhy_order a