From f7b1b518525dd2254efea2931a3dc6b447080f89 Mon Sep 17 00:00:00 2001
From: wangwh <2397901735@qq.com>
Date: Sat, 24 Aug 2024 11:25:37 +0800
Subject: [PATCH] 网关去掉开发配置

---
 dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java
index f43c4da..7b745db 100644
--- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java
+++ b/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;
@@ -116,7 +118,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 +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);
+        }
+    }
+
 }

--
Gitblit v1.8.0