package org.springblade.business.feignClient;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.AllArgsConstructor;
import org.springblade.business.entity.ConstructionLedger;
import org.springblade.business.feign.ConstructionLedgerFeign;
import org.springblade.business.service.IConstructionLedgerService;
import org.springblade.core.tenant.annotation.NonDS;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
@NonDS
public class ConstructionLedgerFeignController implements ConstructionLedgerFeign {

    private final IConstructionLedgerService iConstructionLedgerService;

    /**
     * 初始化台账feign
     */
    @Override
    @PostMapping(INIT_URL)
    public boolean initConstructionLedger(@RequestBody ConstructionLedger constructionLedger) {
        boolean save = iConstructionLedgerService.save(constructionLedger);
        if (save) {
            return true;
        }
        return false;
    }
}
