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); }