营销中心
This commit is contained in:
parent
00638d069c
commit
4c5c8ef02e
|
|
@ -4,10 +4,12 @@ import cn.ysk.cashier.service.TbPlatformDictService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@RestController
|
@RestController
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|
@ -19,10 +21,12 @@ public class AppCenterController {
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@ApiOperation("获取应用中心列表")
|
@ApiOperation("获取应用中心列表")
|
||||||
public ResponseEntity<Object> queryBotButtonConfig(){
|
public ResponseEntity<Object> queryBotButtonConfig(@RequestParam(required = false, defaultValue = "appCenter") String type){
|
||||||
return new ResponseEntity<>(tbPlatformDictService.queryByType("appCenter"), HttpStatus.OK);
|
return new ResponseEntity<>(tbPlatformDictService.queryByType(type), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import cn.ysk.cashier.utils.ValidationUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import cn.ysk.cashier.repository.TbPlatformDictTypeRepository;
|
import cn.ysk.cashier.repository.TbPlatformDictTypeRepository;
|
||||||
import cn.ysk.cashier.service.TbPlatformDictTypeService;
|
import cn.ysk.cashier.service.TbPlatformDictTypeService;
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
|
|
@ -31,6 +32,7 @@ public class TbPlatformDictTypeServiceImpl implements TbPlatformDictTypeService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String,Object> queryAll(TbPlatformDictTypeQueryCriteria criteria, Pageable pageable){
|
public Map<String,Object> queryAll(TbPlatformDictTypeQueryCriteria criteria, Pageable pageable){
|
||||||
|
pageable = PageRequest.of(0,50);
|
||||||
Page<TbPlatformDictType> page = tbPlatformDictTypeRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
Page<TbPlatformDictType> page = tbPlatformDictTypeRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||||
return PageUtil.toPage(page.map(tbPlatformDictTypeMapper::toDto));
|
return PageUtil.toPage(page.map(tbPlatformDictTypeMapper::toDto));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue