Merge remote-tracking branch 'origin/master'

This commit is contained in:
liang.chao 2024-12-20 15:06:20 +08:00
commit 3e51a73ec2
2 changed files with 7 additions and 4 deletions

View File

@ -45,20 +45,20 @@ public class BmMessage extends BaseEntity {
/** 来自userId */
@Excel(name = "来自userId")
@ApiModelProperty(value = "来自userId")
private String fromUser;
private Long fromUser;
/** 发给userId */
@Excel(name = "发给userId")
@ApiModelProperty(value = "发给userId")
private String toUser;
private Long toUser;
/** 来自companyId */
@Excel(name = "来自companyId")
@ApiModelProperty(value = "来自companyId")
private String fromCompany;
private Long fromCompany;
/** 发给companyId */
@Excel(name = "发给companyId")
@ApiModelProperty(value = "发给companyId")
private String toCompany;
private Long toCompany;
}

View File

@ -9,6 +9,7 @@ import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.redis.service.RedisService;
import com.bonus.common.security.config.VerificationCodeConfig;
import com.bonus.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.material.basic.mapper.BmMessageMapper;
@ -65,6 +66,8 @@ public class BmMessageServiceImpl implements IBmMessageService {
public int insertBmMessage(BmMessage bmMessage) {
bmMessage.setCreateTime(DateUtils.getNowDate());
try {
bmMessage.setFromCompany(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
bmMessage.setFromUser(SecurityUtils.getLoginUser().getSysUser().getUserId());
bmMessage.setUuid(String.valueOf(UUID.randomUUID()));
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_CODE;
String msgContent = JSONObject.toJSONString(bmMessage);