package com.css.txw.mhzc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.css.ggzc.framework.common.util.gy.GyUtils;
import com.css.ggzc.framework.common.util.object.BeanUtils;
import com.css.txw.mhzc.pojo.HtYhxxbDTO;
import com.css.txw.mhzc.pojo.YhxxReqDTO;
import com.css.txw.mhzc.service.TxwMhzcHtyhxxbService;
import com.css.txw.mhzc.pojo.domain.TxwMhzcHtyhxxbDO;
import com.css.txw.mhzc.mapper.TxwMhzcHtyhxxbMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author AirlH
* @description 针对表【txw_mhzc_htyhxxb(后台用户信息表)】的数据库操作Service实现
* @createDate 2025-09-09 09:41:02
*/
@Service
public class TxwMhzcHtyhxxbServiceImpl extends ServiceImpl<TxwMhzcHtyhxxbMapper, TxwMhzcHtyhxxbDO>
    implements TxwMhzcHtyhxxbService {

    @Resource
    private TxwMhzcHtyhxxbMapper htyhxxbMapper;

    @Override
    public HtYhxxbDTO initHtSessionByDlzh(YhxxReqDTO reqDTO) {
        TxwMhzcHtyhxxbDO txwMhzcHtyhxxbDO = htyhxxbMapper.initHtSessionByDlzh(reqDTO);
        if (GyUtils.isNull(txwMhzcHtyhxxbDO)) return null;
        return BeanUtils.toBean(txwMhzcHtyhxxbDO,HtYhxxbDTO.class);
    }

    @Override
    public HtYhxxbDTO initHtSessionByYhuuid(YhxxReqDTO reqDTO) {
        TxwMhzcHtyhxxbDO txwMhzcHtyhxxbDO = htyhxxbMapper.initHtSessionByYhuuid(reqDTO);
        if (GyUtils.isNull(txwMhzcHtyhxxbDO)) return null;
        return BeanUtils.toBean(txwMhzcHtyhxxbDO,HtYhxxbDTO.class);
    }
}




