| | |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderRefundDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderCountVO; |
| | | import com.panzhihua.common.utlis.OrderNoUtils; |
| | | import com.panzhihua.common.utlis.WxPayUtils; |
| | | import com.panzhihua.common.utlis.wx.WXPayUtil; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerRefundOrderServiceImpl |
| | |
| | | this.baseMapper.updateById(comShopFlowerRefundOrderDO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | String[] statusStr = {"clz","tkcg","tksb","yqx","tkz"}; |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountGroupStatus(storeId); |
| | | Map<Integer, Integer> collect = comShopOrderCountVOS.stream().collect(Collectors.toMap(ComShopOrderCountVO::getStatus, ComShopOrderCountVO::getAmount)); |
| | | Map<String,Integer> retMap = new HashMap<>(); |
| | | int amountTotal = 0; |
| | | for (int i = 0; i < statusStr.length; i++) { |
| | | if (collect.containsKey(i)) { |
| | | Integer amount = collect.get(i); |
| | | amountTotal = amountTotal + amount; |
| | | retMap.put(statusStr[i],amount); |
| | | }else { |
| | | retMap.put(statusStr[i],0); |
| | | } |
| | | } |
| | | retMap.put("zdd",amountTotal); |
| | | return R.ok(retMap); |
| | | } |
| | | } |