package com.fkzy.warn.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fkzy.warn.common.constants.EntityConstants;
import com.fkzy.warn.mapper.LitigantInfoMapper;
import com.fkzy.warn.service.LitigantInfoService;
import com.fkzy.warn.model.LitigantInfo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhangjing
 * @date 2023/10/16 18:17
 * @description
 */
@Service
public class LitigantInfoServiceImpl extends ServiceImpl<LitigantInfoMapper, LitigantInfo> implements
    LitigantInfoService {


    @Override
    public void saveModel(LitigantInfo entity, String ticket) {
        save(entity);
    }

    @Override
    public void updateModel(LitigantInfo entity,String ticket) {
        this.updateById(entity);
    }

    @Override
    public void deleteModel(List<String> ids) {
        LitigantInfo entity = new LitigantInfo();
        entity.setIsDel(EntityConstants.DEL);
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.in("id", ids);
        update(entity, wrapper);
    }


}
