forked from gzzfw/backEnd/gz-dyh

dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java
@@ -6,6 +6,8 @@
import cn.huge.module.client.api.impl.UtilsClientImpl;
import cn.huge.module.ctuser.dao.mapper.CtUsepostMapper;
import cn.huge.module.ctuser.domain.po.CtUsepost;
import cn.huge.module.ctuser.domain.po.CtUserole;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -130,4 +132,19 @@
        }
    }
    /**
     * 根据用户编号物理删除
     * @param userId 用户编号
     */
    public void deleteByUserId(String userId){
        try{
            QueryWrapper<CtUsepost> ctUseroleQueryWrapper = new QueryWrapper<>();
            ctUseroleQueryWrapper.eq("user_id", userId);
            mapper.delete(ctUseroleQueryWrapper);
        }catch (Exception e){
            log.error("[CtUsepostService.deleteByUserId]调用失败,异常信息:"+e, e);
            throw new ServiceException("CtUsepostService.deleteByUserId", e);
        }
    }
}