package com.crm.manager.controller;

import com.crm.manager.service.UserInformationFeignService;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.entity.user.information.UserInformationAllReadEntity;
import com.crm.rely.backend.core.entity.user.information.UserInformationReadEntity;
import com.crm.rely.backend.core.entity.user.information.UserInformationSearchPageEntity;
import org.springframework.beans.factory.annotation.Autowired;
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;


@RestController
@RequestMapping("/user/information")
public class UserInformationController {

    @Autowired
    private UserInformationFeignService userInformationFeignService;

    @PostMapping("/search/list")
    public BaseResultDto financeDateBalance(@RequestBody UserInformationSearchPageEntity entity) throws Exception {
        return userInformationFeignService.searchList(entity);
    }

    @PostMapping("/search/single")
    public BaseResultDto financeDateBalance(@RequestBody UserInformationReadEntity entity) throws Exception {
        return userInformationFeignService.searchSingle(entity);
    }

    @PostMapping("/all/read")
    public BaseResultDto financeDateBalance(@RequestBody UserInformationAllReadEntity entity) throws Exception {

        return userInformationFeignService.allRead(entity);
    }

}
