From bb18fd61453324e6bfee6beb418f2a012dddb480 Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Tue, 27 Feb 2024 13:38:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E7=BB=91=E4=BB=AA=E5=99=A8=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E4=BB=AA=E5=99=A8=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxUserInstrumentLogServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentLogServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentLogServiceImpl.java index a35fbcf..be8b23e 100644 --- a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentLogServiceImpl.java +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserInstrumentLogServiceImpl.java @@ -2,7 +2,9 @@ package com.flossom.system.service.impl; import java.util.List; +import com.flossom.common.core.domain.entity.WxInstrument; import com.flossom.common.core.domain.entity.WxUserInstrumentLog; +import com.flossom.common.core.mapper.WxInstrumentMapper; import com.flossom.common.core.mapper.WxUserInstrumentLogMapper; import com.flossom.common.core.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -21,6 +23,9 @@ public class WxUserInstrumentLogServiceImpl implements IWxUserInstrumentLogServi @Autowired private WxUserInstrumentLogMapper wxUserInstrumentLogMapper; + @Autowired + private WxInstrumentMapper wxInstrumentMapper; + /** * 查询用户仪器绑定日志 * @@ -55,6 +60,10 @@ public class WxUserInstrumentLogServiceImpl implements IWxUserInstrumentLogServi public int insertWxUserInstrumentLog(WxUserInstrumentLog wxUserInstrumentLog) { wxUserInstrumentLog.setCreateTime(DateUtils.getNowDate()); + WxInstrument wxInstrument = wxInstrumentMapper.selectWxInstrumentById(wxUserInstrumentLog.getInstrumentId()); + if(wxInstrument != null) { + wxUserInstrumentLog.setInstrumentName(wxInstrument.getName()); + } // 设置系列号图片 return wxUserInstrumentLogMapper.insertWxUserInstrumentLog(wxUserInstrumentLog); }