Commit 8efef1ad authored by hanfeng's avatar hanfeng

seo后台列表

parent eea4a63e
...@@ -20,7 +20,7 @@ import java.util.List; ...@@ -20,7 +20,7 @@ import java.util.List;
* @author Administrator * @author Administrator
*/ */
@Service @Service
public class SEOBackgroundBiz extends BaseBiz<SEOMapper, SEO> { public class SEOBiz extends BaseBiz<SEOMapper, SEO> {
public PageInfo<SeoDTO> getList(SEOQuery query) { public PageInfo<SeoDTO> getList(SEOQuery query) {
PageHelper.startPage(query.getPage(),query.getLimit()); PageHelper.startPage(query.getPage(),query.getLimit());
List<SeoDTO> seodtoList = mapper.getSEODTOList(); List<SeoDTO> seodtoList = mapper.getSEODTOList();
...@@ -52,4 +52,10 @@ public class SEOBackgroundBiz extends BaseBiz<SEOMapper, SEO> { ...@@ -52,4 +52,10 @@ public class SEOBackgroundBiz extends BaseBiz<SEOMapper, SEO> {
return false; return false;
} }
} }
public SEO getSeoByModelId(Integer modelId) {
SEO seo = new SEO();
seo.setModelId(modelId);
return selectOne(seo);
}
} }
package com.xxfc.platform.uccn.rest;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.uccn.biz.SEOBiz;
import com.xxfc.platform.uccn.entity.SEO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author Administrator
*/
@RestController
@RequestMapping("seo")
@Api(tags={"seo后台管理类"})
public class SEOController extends BaseController<SEOBiz, SEO> {
@GetMapping("officialWebsite/{modelId}")
@ApiOperation(value = "获取官网seo")
public ObjectRestResponse getSeoByModelId(@PathVariable Integer modelId){
return ObjectRestResponse.succ(baseBiz.getSeoByModelId(modelId));
}
}
\ No newline at end of file
...@@ -2,7 +2,7 @@ package com.xxfc.platform.uccn.rest.admin; ...@@ -2,7 +2,7 @@ package com.xxfc.platform.uccn.rest.admin;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.uccn.biz.SEOBackgroundBiz; import com.xxfc.platform.uccn.biz.SEOBiz;
import com.xxfc.platform.uccn.entity.SEO; import com.xxfc.platform.uccn.entity.SEO;
import com.xxfc.platform.uccn.vo.SEOQuery; import com.xxfc.platform.uccn.vo.SEOQuery;
import com.xxfc.platform.uccn.vo.SEOVo; import com.xxfc.platform.uccn.vo.SEOVo;
...@@ -14,9 +14,9 @@ import org.springframework.web.bind.annotation.*; ...@@ -14,9 +14,9 @@ import org.springframework.web.bind.annotation.*;
* @author Administrator * @author Administrator
*/ */
@RestController @RestController
@RequestMapping("seo") @RequestMapping("seoBackground")
@Api(tags={"seo后台管理类"}) @Api(tags={"seo后台管理类"})
public class SEOBackgroundController extends BaseController<SEOBackgroundBiz, SEO> { public class SEOBackgroundController extends BaseController<SEOBiz, SEO> {
@PostMapping("/list") @PostMapping("/list")
@ApiOperation(value = "查询模块列表") @ApiOperation(value = "查询模块列表")
...@@ -33,4 +33,6 @@ public class SEOBackgroundController extends BaseController<SEOBackgroundBiz, SE ...@@ -33,4 +33,6 @@ public class SEOBackgroundController extends BaseController<SEOBackgroundBiz, SE
} }
return ObjectRestResponse.createDefaultFail() ; return ObjectRestResponse.createDefaultFail() ;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment