diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/device/AppDeviceController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/device/AppDeviceController.java new file mode 100644 index 0000000..22ddd1a --- /dev/null +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/device/AppDeviceController.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.product.controller.app.device; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.product.controller.admin.device.vo.DevicePageReqVO; +import cn.iocoder.yudao.module.product.controller.admin.device.vo.DeviceRespVO; +import cn.iocoder.yudao.module.product.dal.dataobject.device.DeviceDO; +import cn.iocoder.yudao.module.product.service.device.DeviceService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.validation.Valid; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "用户 APP - 贩卖机信息") +@RestController +@RequestMapping("/product/device") +@Validated +public class AppDeviceController { + + @Resource + private DeviceService deviceService; + + @GetMapping("/page") + @Operation(summary = "获得贩卖机信息分页") + public CommonResult> getDevicePage(@Valid DevicePageReqVO pageReqVO) { + PageResult pageResult = deviceService.getDevicePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, DeviceRespVO.class)); + } + +} diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 16eff88..d75dd64 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -80,7 +80,7 @@ spring: host: 127.0.0.1 # 地址 port: 6379 # 端口 database: 10 # 数据库索引 - password: 123456 # 密码,建议生产环境开启 + # password: 123456 # 密码,建议生产环境开启 --- #################### 定时任务相关配置 ####################