package com.ym.mec.web.controller;

import com.ym.mec.biz.service.TenantAssetsInfoService;
import com.ym.mec.common.controller.BaseController;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 机构资产信息(TenantAssetsInfo)表控制层
 *
 * @author hgw
 * @since 2021-12-22 14:27:02
 */
@RestController
@RequestMapping("tenantAssetsInfo")
public class TenantAssetsInfoController extends BaseController {

    /**
     * 服务对象
     */
    @Resource
    private TenantAssetsInfoService tenantAssetsInfoService;

    @ApiOperation("手动扣费")
    @PostMapping(value = "/manualDeduct")
    @PreAuthorize("@pcs.hasPermissions('tenantAssetsInfo/manualDeduct')")
    public Object manualDeductAmount(@RequestBody List<Integer> ids) {
        tenantAssetsInfoService.manualDeductAmount(ids);
        return succeed();
    }

}

