Browse Source

update

main
wangshaoping 1 year ago
parent
commit
2e224ec0aa
  1. 38
      io.sc.engine.mv/src/main/java/io/sc/engine/mv/controller/core/BinomialWebController.java
  2. 69
      io.sc.platform.developer/src/main/java/io/sc/platform/developer/wrapper/springboot/AutoConfigurationWrapper.java

38
io.sc.engine.mv/src/main/java/io/sc/engine/mv/controller/core/BinomialWebController.java

@ -0,0 +1,38 @@
package io.sc.engine.mv.controller.core;
import io.sc.engine.mv.jpa.entity.CoeBinomialHistory;
import io.sc.engine.mv.jpa.repository.CoeBinomialHistoryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.ExampleMatcher;
import org.springframework.data.domain.ExampleMatcher.StringMatcher;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
@Controller
@RequestMapping("/mv/coe/binomial")
public class BinomialWebController {
@Autowired private CoeBinomialHistoryRepository coeBinomialHistoryRepository;
@RequestMapping(value="isc/fetch",method=RequestMethod.GET)
@ResponseBody
public List<CoeBinomialHistory> iscFetch(CoeBinomialHistory history){
return fetch(history);
}
@RequestMapping(value="fetch",method=RequestMethod.GET)
@ResponseBody
public List<CoeBinomialHistory> fetch(CoeBinomialHistory history){
ExampleMatcher matcher = ExampleMatcher.matching()
.withIgnoreNullValues()
.withIgnoreCase()
.withStringMatcher(StringMatcher.CONTAINING);
Example<CoeBinomialHistory> example = Example.of(history, matcher);
List<CoeBinomialHistory> result =coeBinomialHistoryRepository.findAll(example);
return result;
}
}

69
io.sc.platform.developer/src/main/java/io/sc/platform/developer/wrapper/springboot/AutoConfigurationWrapper.java

@ -0,0 +1,69 @@
package io.sc.platform.developer.wrapper.springboot;
public class AutoConfigurationWrapper {
private String context;
private String name;
private PositiveAndNegativeType positiveAndNegativeType;
private MatchedAndNotMatchedType matchedAndNotMatchedType;
private String condition;
private String message;
public String getContext() {
return context;
}
public void setContext(String context) {
this.context = context;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public PositiveAndNegativeType getPositiveAndNegativeType() {
return positiveAndNegativeType;
}
public void setPositiveAndNegativeType(PositiveAndNegativeType positiveAndNegativeType) {
this.positiveAndNegativeType = positiveAndNegativeType;
}
public MatchedAndNotMatchedType getMatchedAndNotMatchedType() {
return matchedAndNotMatchedType;
}
public void setMatchedAndNotMatchedType(MatchedAndNotMatchedType matchedAndNotMatchedType) {
this.matchedAndNotMatchedType = matchedAndNotMatchedType;
}
public String getCondition() {
return condition;
}
public void setCondition(String condition) {
this.condition = condition;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public static enum PositiveAndNegativeType{
Positive,
Negative
}
public static enum MatchedAndNotMatchedType{
Matched,
NotMatched
}
}
Loading…
Cancel
Save