From 595b7935a30e84fba1bc3561d05f9d19d3e32e1f Mon Sep 17 00:00:00 2001
From: Administrator <1101184511@qq.com>
Date: 星期三, 23 四月 2025 00:45:48 +0800
Subject: [PATCH] 后台管理页面完成

---
 src/main/java/com/taoke/autopay/service/impl/WxUserServiceImpl.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/taoke/autopay/service/impl/WxUserServiceImpl.java b/src/main/java/com/taoke/autopay/service/impl/WxUserServiceImpl.java
index e0e1737..4f80b81 100644
--- a/src/main/java/com/taoke/autopay/service/impl/WxUserServiceImpl.java
+++ b/src/main/java/com/taoke/autopay/service/impl/WxUserServiceImpl.java
@@ -1,5 +1,6 @@
 package com.taoke.autopay.service.impl;
 
+import com.google.gson.Gson;
 import com.taoke.autopay.dao.WxUserInfoMapper;
 import com.taoke.autopay.entity.SystemConfigKeyEnum;
 import com.taoke.autopay.entity.WxUserInfo;
@@ -7,6 +8,7 @@
 import com.taoke.autopay.service.SystemConfigService;
 import com.taoke.autopay.service.WxUserService;
 import com.taoke.autopay.service.WxUserSettingService;
+import com.taoke.autopay.utils.IPUtil;
 import com.taoke.autopay.utils.StringUtil;
 import com.taoke.autopay.utils.WxApiUtil;
 import org.springframework.stereotype.Service;
@@ -82,4 +84,19 @@
     public long count(WxUserInfoMapper.DaoQuery query) {
         return wxUserInfoMapper.count(query);
     }
+
+    @Override
+    public void setLatestInfoInfo(Long uid, String ip, IPUtil.IPInfo ipInfo) {
+        WxUserInfo wxUserInfo=new WxUserInfo();
+        wxUserInfo.setId(uid);
+        wxUserInfo.setLatestIP(ip);
+        wxUserInfo.setLatestIPInfo(ipInfo!=null?new Gson().toJson(ipInfo):null);
+        wxUserInfo.setUpdateTime(new Date());
+        wxUserInfoMapper.updateByPrimaryKeySelective(wxUserInfo);
+    }
+
+    @Override
+    public void update(WxUserInfo wxUserInfo) {
+        wxUserInfoMapper.updateByPrimaryKeySelective(wxUserInfo);
+    }
 }

--
Gitblit v1.8.0