1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

#59 fix identifier error in contact model

This commit is contained in:
Hai Liang Wang 2018-09-06 19:48:38 +08:00
parent 784eb997fa
commit b698526a6d
2 changed files with 44 additions and 4 deletions

View File

@ -0,0 +1,36 @@
/*
* Copyright (C) 2018 Chatopera Inc, <https://www.chatopera.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.chatopera.cc.webim.web.handler.api.rest;
import com.chatopera.cc.webim.service.es.ContactNotesRepository;
import com.chatopera.cc.webim.web.handler.Handler;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 联系人笔记
*/
@RestController
@RequestMapping("/api/contactnotes")
@Api(value = "联系人笔记", description = "管理联系人笔记")
public class ApiContactNotesController extends Handler {
@Autowired
private ContactNotesRepository contactNotesRes;
}

View File

@ -16,10 +16,11 @@
package com.chatopera.cc.webim.web.model;
import com.chatopera.cc.util.UKTools;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.elasticsearch.annotations.Document;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.*;
import java.util.Date;
@Document(indexName = "cskefu", type = "contact_notes")
@ -28,7 +29,7 @@ import java.util.Date;
@org.hibernate.annotations.Proxy(lazy = false)
public class ContactNotes {
private String id;
private String id = UKTools.getUUID();
private String contactid;
private Date createtime;
private Date updatetime;
@ -40,7 +41,10 @@ public class ContactNotes {
private String onlineuser;
private String orgi;
@Id
@Column(length = 32)
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "assigned")
public String getId() {
return id;
}