This commit is contained in:
lijiaqi 2022-09-06 13:09:19 +08:00
parent c60410adcb
commit 3843ee510a
1 changed files with 5 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ydool.boot.common.cache.DictUtils;
import com.ydool.boot.common.result.Ret;
import com.ydool.boot.core.exception.ResultException;
import com.ydool.boot.core.service.BaseService;
@ -271,9 +272,9 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
if (status == 0) {
contactDb.setState(ContactDb.STATE_END);
contactDb.setStatus(false);
}else if (status == 1){
} else if (status == 1) {
contactDb.setStatus(false);
}else {
} else {
return Ret.fail("status传输数据有误");
}
boolean flag = saveOrUpdate(contactDb);
@ -347,7 +348,8 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
User user = userService.getById(userId);
ContactDbUser item = new ContactDbUser();
item.setUserId(userId);
item.setUserName(user != null ? user.getUserName() : "");
item.setUserName(user != null ? user.getUserName() : DictUtils.getDictLabel(
"dict_interface_location", userId));
item.setType(type);
item.setContactDbId(contactDbId);
item.setCreatedId(loginUser.getId());