解绑仪器保存仪器名称

master
382696293@qq.com 2 years ago
parent 937b269a94
commit bb18fd6145

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

Loading…
Cancel
Save