增加实体类,以及部分逻辑修改
This commit is contained in:
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -25,7 +26,7 @@ public class IntroduceController {
|
||||
private AppGuideService appGuideService;
|
||||
|
||||
@GetMapping({"/common", "/common/{code}"})
|
||||
public Result<String> billIntro(@PathVariable(value = "code", required = false) String code) {
|
||||
public Result<String> billIntro(@PathVariable(value = "code", required = false) String code, HttpServletRequest httpServletRequest) {
|
||||
if (StringUtils.isEmpty(code)) {
|
||||
String html = "<p><img src=\"https://www.shouyinbei.net/resources/images/upload/82031620725808697.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/86751620725811158.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/38401620725814105.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/14561620725816223.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/45071620725822267.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/31221620725827105.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/68211620725829889.jpg\" style=\"\"/></p><p><br/></p>";
|
||||
return ResultGenerator.genSuccessResult(html);
|
||||
@@ -36,6 +37,12 @@ public class IntroduceController {
|
||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||
}
|
||||
if (Objects.equals(entity.getType(), "1")) {
|
||||
String type = httpServletRequest.getHeader("type");
|
||||
if ("1".equals(type)){
|
||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||
}else if ("2".equals(type)){
|
||||
return ResultGenerator.genFailResult("");
|
||||
}
|
||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||
}else {
|
||||
return ResultGenerator.genFailResult("");
|
||||
|
||||
Reference in New Issue
Block a user