package com.sooka.system.real_estate.unseal.service.impl;

import com.sooka.common.core.text.Convert;
import com.sooka.common.utils.DateUtils;
import com.sooka.framework.util.ShiroUtils;
import com.sooka.system.real_estate.unseal.domain.TGuijiRealEstateUnseal;
import com.sooka.system.real_estate.unseal.mapper.TGuijiRealEstateUnsealMapper;
import com.sooka.system.real_estate.unseal.service.ITGuijiRealEstateUnsealService;
import com.sooka.system.service.impl.Guiji_Base_Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

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

/**
 * 市房地产-解封信息Service业务层处理
 *
 * @author lei
 * @date 2022-08-22
 */
@Service
public class TGuijiRealEstateUnsealServiceImpl extends Guiji_Base_Service implements ITGuijiRealEstateUnsealService
{
    @Resource
    private TGuijiRealEstateUnsealMapper mapper;

    /**
     * 查询市房地产-解封信息
     *
     * @param id 市房地产-解封信息ID
     * @return 市房地产-解封信息
     */
    @Override
    public TGuijiRealEstateUnseal selectById(String id)
    {
        return mapper.selectById(id);
    }

    /**
     * 查询市房地产-解封信息列表
     *
     * @param param 市房地产-解封信息
     * @return 市房地产-解封信息
     */
    @Override
    public List<TGuijiRealEstateUnseal> selectList(TGuijiRealEstateUnseal param)
    {
        List<TGuijiRealEstateUnseal> list = mapper.selectList(param);
        param.setOperationStatus(1L);
        param.setParam(param.toString());
        param.setInterfacetype("platform_interfacetype_1");//1 共享 2归集
        param.setInterfaceinfoId("fb09f137-26fd-452e-9c87-9b05dc5818a9");
        param.setInterfaceinfoName("共享（市）-市房地产-解封信息");
        Long deptId = ShiroUtils.getSysUser().getDept().getDeptId();
        String deptName = ShiroUtils.getSysUser().getDept().getDeptName();
        param.setDeptId(deptId);
        param.setDeptName(deptName);
        add_log(param);
        return list;
    }

    /**
     * 新增市房地产-解封信息
     *
     * @param param 市房地产-解封信息
     * @return 结果
     */
    @Override
    public int insert(TGuijiRealEstateUnseal param)
    {
        param.setCreateTime(DateUtils.getNowDate());
        return mapper.insert(param);
    }

    /**
     * 修改市房地产-解封信息
     *
     * @param param 市房地产-解封信息
     * @return 结果
     */
    @Override
    public int update(TGuijiRealEstateUnseal param)
    {
        return mapper.update(param);
    }

    /**
     * 删除市房地产-解封信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteByIds(String ids)
    {
        return mapper.deleteByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除市房地产-解封信息信息
     *
     * @param id 市房地产-解封信息ID
     * @return 结果
     */
    @Override
    public int deleteById(String id)
    {
        return mapper.deleteById(id);
    }
}
