feat:增加自动完成数据源

This commit is contained in:
wangyu 2021-10-24 10:09:51 +08:00
parent 703049fbec
commit a712d3373a
4 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,10 @@
package com.flyfish.framework.dict.controller;
import com.flyfish.framework.beans.annotations.RestMapping;
import com.flyfish.framework.controller.BaseController;
import com.flyfish.framework.dict.domain.AutoComplete;
import com.flyfish.framework.domain.base.NameLikeQo;
@RestMapping("auto-completes")
public class AutoCompleteController extends BaseController<AutoComplete, NameLikeQo<AutoComplete>> {
}

View File

@ -0,0 +1,28 @@
package com.flyfish.framework.dict.domain;
import com.flyfish.framework.domain.base.AuditDomain;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.List;
/**
* 自动完成数据源
*
* @author wangyu
*/
@Getter
@Setter
@Document(collection = "auto-completes")
public class AutoComplete extends AuditDomain {
// 候选值列表
private List<String> values;
// 描述
private String description;
// 分隔符
private String delimiter;
}

View File

@ -0,0 +1,7 @@
package com.flyfish.framework.dict.repository;
import com.flyfish.framework.dict.domain.AutoComplete;
import com.flyfish.framework.repository.DefaultRepository;
public interface AutoCompleteRepository extends DefaultRepository<AutoComplete> {
}

View File

@ -0,0 +1,9 @@
package com.flyfish.framework.dict.service;
import com.flyfish.framework.dict.domain.AutoComplete;
import com.flyfish.framework.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;
@Service
public class AutoCompleteService extends BaseServiceImpl<AutoComplete> {
}