puzhibing
2025-01-08 b22df417e0bc423c788b013feaad686531d69eed
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java
@@ -42,6 +42,13 @@
    private TokenService tokenService;
    @Resource
    private ShopBalanceStatementMapper shopBalanceStatementMapper;
    @Resource
    private ShopService shopService;
    /**
     * 门店分佣统计
@@ -69,15 +76,14 @@
    }
   @Resource
   private ShopService shopService;
    @GetMapping("/commissionStatistics/info")
    @ApiOperation(value = "门店余额明细上方数据", notes = "门店余额明细", tags = {"门店后台"})
    public R<ShopBalanceDto> shopCommissionStatisticsinfo(){
        Integer objectId = tokenService.getLoginUser().getSysUser().getObjectId();
        ShopBalanceDto dto = new ShopBalanceDto();
        List<ShopBalanceStatement> list = shopBalanceStatementService.lambdaQuery().eq(ShopBalanceStatement::getShopId,objectId).eq(ShopBalanceStatement::getType, 3).list();
        List<ShopBalanceStatement> list1 = shopBalanceStatementService.lambdaQuery().eq(ShopBalanceStatement::getShopId,objectId).eq(ShopBalanceStatement::getType, 4).list();
        List<ShopBalanceStatement> list1 = shopBalanceStatementService.lambdaQuery().eq(ShopBalanceStatement::getShopId,objectId).eq(ShopBalanceStatement::getType, 1).list();
        BigDecimal bigDecimal1 = new BigDecimal(0);
        for (ShopBalanceStatement shopBalanceStatement : list) {
            bigDecimal1 = bigDecimal1.add(shopBalanceStatement.getVariableAmount());
@@ -131,6 +137,16 @@
    public R<List<ShopBalanceStatement>> getList(@RequestBody ShopBalanceStatement shopBalanceStatement){
        return R.ok(shopBalanceStatementMapper.selectShopBalanceStatementList(shopBalanceStatement));
    }
    /**
     * 保存门店余额流水
     * @param shopBalanceStatement
     */
    @PostMapping("/saveShopBalanceStatement")
    public void saveShopBalanceStatement(@RequestBody ShopBalanceStatement shopBalanceStatement){
        shopBalanceStatementService.save(shopBalanceStatement);
    }
}