|
@@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
+import com.goafanti.common.dao.AdminMapper;
|
|
|
import com.goafanti.common.dao.JtMessageConsumerMapper;
|
|
import com.goafanti.common.dao.JtMessageConsumerMapper;
|
|
|
import com.goafanti.common.dao.JtMessageProducerMapper;
|
|
import com.goafanti.common.dao.JtMessageProducerMapper;
|
|
|
import com.goafanti.common.dao.UserMapper;
|
|
import com.goafanti.common.dao.UserMapper;
|
|
@@ -28,6 +29,8 @@ public class JtMessageProducerServiceImpl extends BaseMybatisDao<JtMessageProdu
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private UserMapper userMapper;
|
|
private UserMapper userMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
|
+ private AdminMapper adminMapper;
|
|
|
|
|
+ @Autowired
|
|
|
private JtMessageConsumerMapper jtMessageConsumerMapper;
|
|
private JtMessageConsumerMapper jtMessageConsumerMapper;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -36,7 +39,13 @@ public class JtMessageProducerServiceImpl extends BaseMybatisDao<JtMessageProdu
|
|
|
//处理消息内容
|
|
//处理消息内容
|
|
|
messageProducer.setId(UUID.randomUUID().toString());
|
|
messageProducer.setId(UUID.randomUUID().toString());
|
|
|
//获得当前登录用户名字
|
|
//获得当前登录用户名字
|
|
|
- String create = userMapper.selectByPrimaryKey(TokenManager.getUserId()).getUsername();
|
|
|
|
|
|
|
+ String create = adminMapper.selectByPrimaryKey(TokenManager.getAdminId()).getName();
|
|
|
|
|
+ if(StringUtils.isBlank(create)){
|
|
|
|
|
+ create = userMapper.selectByPrimaryKey(TokenManager.getUserId()).getUsername();
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isBlank(create)){
|
|
|
|
|
+ return -1;
|
|
|
|
|
+ }
|
|
|
messageProducer.setCreater(create);
|
|
messageProducer.setCreater(create);
|
|
|
if(null != messageProducer.getCreateTime()){
|
|
if(null != messageProducer.getCreateTime()){
|
|
|
messageProducer.setCreateTime(new Date());
|
|
messageProducer.setCreateTime(new Date());
|