package com.shr.serivce.impl;

import com.kingdee.shr.api.Response;
import com.shr.api.CallShrOsfApi;
import com.shr.serivce.IUserService;
import com.shr.transfer.user.UserListInVo;
import com.shr.transfer.user.UserListOutVo;
import com.shr.utils.JsonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Inori
 */
@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private CallShrOsfApi callShrOsfApi;


    @Override
    public UserListOutVo userList(UserListInVo inVo) {
        Response response = callShrOsfApi.callShrOsf("inteOAGetUserDataService", null);

        UserListOutVo outVo = new UserListOutVo();
        outVo.setRecords(JsonUtil.toList(JsonUtil.toString(response.getData()), Object.class));
        return outVo;
    }


}
