package com.mortals.xhx.module.matter.service.impl;

import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.area.service.AreaService;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.dao.MatterExtDao;
import com.mortals.xhx.module.matter.model.MatterExtEntity;
import com.mortals.xhx.module.matter.service.MatterExtService;
import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.site.service.SiteMatterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * MatterExtService
 * 事项扩展 service实现
 *
 * @author zxfei
 * @date 2022-11-23
 */
@Service("matterExtService")
@Slf4j
public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao, MatterExtEntity, Long> implements MatterExtService {

    @Autowired
    private AreaService areaService;
    @Autowired
    private DeptService deptService;
    @Autowired
    private MatterService matterService;
    @Autowired
    private SiteMatterService siteMatterService;


    /**
     * @param matterId
     * @param context
     */
    @Override
    public void deleteByMatterId(Long matterId, Context context) {
        Map<String, Object> condition = new HashMap<>();
        condition.put("matterId", matterId);
        this.dao.delete(condition);
    }

}