forked from gzzfw/backEnd/gz-dyh

xusd
2024-10-17 adddb6522e95c08bef6bc6b00338ff27d82aa55d
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java
@@ -6,17 +6,16 @@
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 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;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -26,7 +25,7 @@
 * @Description 客户用户配岗表业务逻辑处理
 * @company hugeinfo
 * @author liyj
 * @Time 2024-08-17 15:30:57
 * @Time 2024-08-19 20:04:19
 * @version 1.0.0
 */
@Slf4j
@@ -116,7 +115,7 @@
    */
    public void saveCtUsepost(CtUsepost ctUsepost){
        try{
            Date nowDate = DateUtils.getMowDate();
            Date nowDate = DateUtils.getNowDate();
            // 判断是否新增
            if (IdUtils.checkNewId(ctUsepost.getId())){
                ctUsepost.setId(utilsClient.getNewTimeId());
@@ -130,4 +129,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);
        }
    }
}