From a217652d33c75df23202828000d82d0ca8555ac2 Mon Sep 17 00:00:00 2001
From: Administrator <1101184511@qq.com>
Date: 星期一, 21 四月 2025 02:13:59 +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