| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TAppUser; |
| | | import com.jilongda.manage.model.TLineUp; |
| | | import com.jilongda.manage.model.TOptometryDetail; |
| | | import com.jilongda.manage.query.TLineUpQuery; |
| | | import com.jilongda.manage.query.TOptometryQuery; |
| | | import com.jilongda.manage.service.TAppUserService; |
| | | import com.jilongda.manage.service.TLineUpService; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-line-up") |
| | | public class TLineUpController { |
| | | |
| | | @Autowired |
| | | private TLineUpService lineUpService; |
| | | @Autowired |
| | | private TAppUserService appUserService; |
| | | @ApiOperation(value = "获取排号分页列表",tags = "排号管理") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TLineUp>> pageList(@RequestBody TLineUpQuery query) { |
| | | PageInfo<TLineUp> res = lineUpService.pageList(query); |
| | | return ApiResult.success(res); |
| | | } |
| | | @ApiOperation(value = "查询当前排队人数",tags = "排号管理") |
| | | @GetMapping(value = "/getCount") |
| | | public ApiResult getCount( Integer storeId) { |
| | | if (storeId!=null){ |
| | | return ApiResult.success(lineUpService.lambdaQuery().eq(TLineUp::getStoreId,storeId).eq(TLineUp::getStatus,1).list().size()); |
| | | }else{ |
| | | return ApiResult.success(lineUpService.lambdaQuery().eq(TLineUp::getStatus,1).list().size()); |
| | | } |
| | | } |
| | | @ApiOperation(value = "取消排队",tags = "排号管理") |
| | | @GetMapping(value = "/cancel") |
| | | public ApiResult cancel(Integer id) { |
| | | TLineUp byId = lineUpService.getById(id); |
| | | byId.setStatus(5); |
| | | lineUpService.updateById(byId); |
| | | return ApiResult.success(); |
| | | } |
| | | } |
| | | |