2024-12-24 17:05

@杜福忠 对的,用来存储登录用户id的,我在保存的时候传入值了,这是我的代码,CompanyWorkInfo company = getModel(CompanyWorkInfo.class,"company");
company.setCreateUserId(user.getId());
company.setModifyUserId(user.getId());
company.setCreateUserOrgan(user.getUserOrgan());
companyWorkInfoService.save(company);

public boolean save(CompanyWorkInfo companyWorkInfo) {
if(StringUtils.isNotBlank(companyWorkInfo.getId())) {
companyWorkInfo.setModifyTime(getTime());
return companyWorkInfo.update();
}
companyWorkInfo.setId(getGenId());
companyWorkInfo.setCreateTime(getTime());
companyWorkInfo.setModifyTime(getTime());
companyWorkInfo.setState(BooleanEnum.FALSE.getValueStr());
companyWorkInfo.setCheckState(Constants.check_state_A);
return companyWorkInfo.save();
}

2024-12-24 14:52

@杜福忠 但是执行sql 的时候还是没有这些字段

2024-12-24 14:51

@杜福忠 新增的字段都是写了的
public void setCreateUserId(java.lang.String createUserId) {
set("create_user_id", createUserId);
}

public java.lang.String getCreateUserId() {
return get("create_user_id");
}

public void setCreateUserOrgan(java.lang.String createUserOrgan) {
set("create_user_organ", createUserOrgan);
}

public java.lang.String getCreateUserOrgan() {
return get("create_user_organ");
}

public void setModifyUserId(java.lang.String modifyUserId) {
set("modify_user_id", modifyUserId);
}

public java.lang.String getModifyUserId() {
return get("modify_user_id");
}