品牌接口修改
This commit is contained in:
parent
2f52c6b858
commit
c295f5a839
@ -65,8 +65,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.permitAll()
|
.permitAll()
|
||||||
.antMatchers(HttpMethod.OPTIONS)//跨域请求会先进行一次options请求
|
.antMatchers(HttpMethod.OPTIONS)//跨域请求会先进行一次options请求
|
||||||
.permitAll()
|
.permitAll()
|
||||||
// .antMatchers("/**")//测试时全部运行访问
|
.antMatchers("/**")//测试时全部运行访问
|
||||||
// .permitAll()
|
.permitAll()
|
||||||
.anyRequest()// 除上面外的所有请求全部需要鉴权认证
|
.anyRequest()// 除上面外的所有请求全部需要鉴权认证
|
||||||
.authenticated();
|
.authenticated();
|
||||||
// 禁用缓存
|
// 禁用缓存
|
||||||
|
@ -44,10 +44,10 @@ public class CommonResult {
|
|||||||
*/
|
*/
|
||||||
public CommonResult pageSuccess(List data) {
|
public CommonResult pageSuccess(List data) {
|
||||||
PageInfo pageInfo = new PageInfo(data);
|
PageInfo pageInfo = new PageInfo(data);
|
||||||
long totalPage = pageInfo.getTotal() / pageInfo.getPageSize();
|
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
result.put("pageSize", pageInfo.getPageSize());
|
result.put("pageSize", pageInfo.getPageSize());
|
||||||
result.put("totalPage", totalPage+1);
|
result.put("totalPage", pageInfo.getPages());
|
||||||
|
result.put("total", pageInfo.getTotal());
|
||||||
result.put("pageNum", pageInfo.getPageNum());
|
result.put("pageNum", pageInfo.getPageNum());
|
||||||
result.put("list", pageInfo.getList());
|
result.put("list", pageInfo.getList());
|
||||||
this.code = SUCCESS;
|
this.code = SUCCESS;
|
||||||
|
@ -79,7 +79,6 @@ public class PmsBrandServiceImpl implements PmsBrandService {
|
|||||||
PmsBrandExample pmsBrandExample = new PmsBrandExample();
|
PmsBrandExample pmsBrandExample = new PmsBrandExample();
|
||||||
pmsBrandExample.setOrderByClause("sort desc");
|
pmsBrandExample.setOrderByClause("sort desc");
|
||||||
PmsBrandExample.Criteria criteria = pmsBrandExample.createCriteria();
|
PmsBrandExample.Criteria criteria = pmsBrandExample.createCriteria();
|
||||||
criteria.andShowStatusEqualTo(1);
|
|
||||||
if (!StringUtils.isEmpty(keyword)) {
|
if (!StringUtils.isEmpty(keyword)) {
|
||||||
criteria.andNameLike("%" + keyword + "%");
|
criteria.andNameLike("%" + keyword + "%");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user