Commit 68996601 by testdl

# 用户下单功能

parent dc832002
package com.jumeirah.common.controller; package com.jumeirah.api.app.controller;
import cn.hutool.core.date.DateUtil;
import com.jumeirah.api.app.entity.vo.StrokeAddBackAndForthVo;
import com.jumeirah.api.app.entity.vo.StrokeAddFreightVo;
import com.jumeirah.api.app.entity.vo.StrokeAddMedicalTreatmentVo;
import com.jumeirah.api.app.entity.vo.StrokeAddOneWayVo;
import com.jumeirah.common.entity.Stroke; import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.service.StrokeService; import com.jumeirah.common.service.StrokeService;
import io.geekidea.springbootplus.framework.shiro.jwt.JwtToken;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import com.jumeirah.common.param.StrokePageParam; import com.jumeirah.common.param.StrokePageParam;
import io.geekidea.springbootplus.framework.common.controller.BaseController; import io.geekidea.springbootplus.framework.common.controller.BaseController;
import com.jumeirah.common.vo.StrokeQueryVo; import com.jumeirah.common.vo.StrokeQueryVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult; import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.core.pagination.Paging; import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.common.param.IdParam; import io.geekidea.springbootplus.framework.common.param.IdParam;
import io.geekidea.springbootplus.framework.log.annotation.Module; import io.geekidea.springbootplus.framework.log.annotation.Module;
import io.geekidea.springbootplus.framework.log.annotation.OperationLog; import io.geekidea.springbootplus.framework.log.annotation.OperationLog;
import io.geekidea.springbootplus.framework.log.enums.OperationLogType; import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
import io.geekidea.springbootplus.framework.core.validator.groups.Add; import io.geekidea.springbootplus.framework.core.validator.groups.Add;
import io.geekidea.springbootplus.framework.core.validator.groups.Update; import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import org.springframework.validation.annotation.Validated; import org.apache.shiro.SecurityUtils;
import io.swagger.annotations.Api; import org.springframework.beans.BeanUtils;
import io.swagger.annotations.ApiOperation; import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -31,30 +39,85 @@ import org.springframework.web.bind.annotation.*; ...@@ -31,30 +39,85 @@ import org.springframework.web.bind.annotation.*;
@RequestMapping("/stroke") @RequestMapping("/stroke")
@Module("${cfg.module}") @Module("${cfg.module}")
@Api(value = "行程表API", tags = {"行程表"}) @Api(value = "行程表API", tags = {"行程表"})
public class StrokeController extends BaseController { public class StrokeController extends BaseController {
@Autowired @Autowired
private StrokeService strokeService; private StrokeService strokeService;
/** /**
* 添加行程表 * 添加单程行程表
*/ */
@PostMapping("/add") @PostMapping("/add/oneWay")
@OperationLog(name = "添加行程表", type = OperationLogType.ADD) @OperationLog(name = "添加单程行程表", type = OperationLogType.ADD)
@ApiOperation(value = "添加行程表", response = ApiResult.class) @ApiOperation(value = "添加单程行程表", response = ApiResult.class)
public ApiResult<Boolean> addStroke(@Validated(Add.class) @RequestBody Stroke stroke)throws Exception{ public ApiResult<Boolean> addOneWayStroke(@Validated @RequestBody StrokeAddOneWayVo strokeAddOneWayVo) throws Exception {
boolean flag= strokeService.saveStroke(stroke); JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddOneWayVo, stroke);
stroke.setType(0)
.setCreateTime(System.currentTimeMillis());
boolean flag = strokeService.saveStroke(stroke);
return ApiResult.result(flag); return ApiResult.result(flag);
} }
/** /**
* 添加往返行程表
*/
@PostMapping("/add/backAndForth")
@OperationLog(name = "添加往返行程表", type = OperationLogType.ADD)
@ApiOperation(value = "添加往返行程表", response = ApiResult.class)
public ApiResult<Boolean> addBackAndForthStroke(@Validated @RequestBody StrokeAddBackAndForthVo strokeAddBackAndForthVo) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddBackAndForthVo, stroke);
stroke.setType(1)
.setCreateTime(System.currentTimeMillis());
boolean flag = strokeService.saveStroke(stroke);
return ApiResult.result(flag);
}
/**
* 添加货运行程表
*/
@PostMapping("/add/freight")
@OperationLog(name = "添加货运行程表", type = OperationLogType.ADD)
@ApiOperation(value = "添加货运行程表", response = ApiResult.class)
public ApiResult<Boolean> addFreightStroke(@Validated @RequestBody StrokeAddFreightVo strokeAddFreightVo) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddFreightVo, stroke);
stroke.setType(2)
.setCreateTime(System.currentTimeMillis());
boolean flag = strokeService.saveStroke(stroke);
return ApiResult.result(flag);
}
/**
* 添加医疗行程表
*/
@PostMapping("/add/medicalTreatment")
@OperationLog(name = "添加医疗行程表", type = OperationLogType.ADD)
@ApiOperation(value = "添加医疗行程表", response = ApiResult.class)
public ApiResult<Boolean> addMedicalTreatmentStroke(
@Validated @RequestBody StrokeAddMedicalTreatmentVo strokeAddMedicalTreatmentVo) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddMedicalTreatmentVo, stroke);
stroke.setType(3)
.setCreateTime(System.currentTimeMillis());
boolean flag = strokeService.saveStroke(stroke);
return ApiResult.result(flag);
}
/**
* 修改行程表 * 修改行程表
*/ */
@PostMapping("/update") @PostMapping("/update")
@OperationLog(name = "修改行程表", type = OperationLogType.UPDATE) @OperationLog(name = "修改行程表", type = OperationLogType.UPDATE)
@ApiOperation(value = "修改行程表", response = ApiResult.class) @ApiOperation(value = "修改行程表", response = ApiResult.class)
public ApiResult<Boolean> updateStroke(@Validated(Update.class) @RequestBody Stroke stroke)throws Exception{ public ApiResult<Boolean> updateStroke(@Validated(Update.class) @RequestBody Stroke stroke) throws Exception {
boolean flag= strokeService.updateStroke(stroke); boolean flag = strokeService.updateStroke(stroke);
return ApiResult.result(flag); return ApiResult.result(flag);
} }
...@@ -64,8 +127,8 @@ private StrokeService strokeService; ...@@ -64,8 +127,8 @@ private StrokeService strokeService;
@PostMapping("/delete/{id}") @PostMapping("/delete/{id}")
@OperationLog(name = "删除行程表", type = OperationLogType.DELETE) @OperationLog(name = "删除行程表", type = OperationLogType.DELETE)
@ApiOperation(value = "删除行程表", response = ApiResult.class) @ApiOperation(value = "删除行程表", response = ApiResult.class)
public ApiResult<Boolean> deleteStroke(@PathVariable("id") Long id)throws Exception{ public ApiResult<Boolean> deleteStroke(@PathVariable("id") Long id) throws Exception {
boolean flag= strokeService.deleteStroke(id); boolean flag = strokeService.deleteStroke(id);
return ApiResult.result(flag); return ApiResult.result(flag);
} }
...@@ -75,7 +138,7 @@ private StrokeService strokeService; ...@@ -75,7 +138,7 @@ private StrokeService strokeService;
@GetMapping("/info/{id}") @GetMapping("/info/{id}")
@OperationLog(name = "行程表详情", type = OperationLogType.INFO) @OperationLog(name = "行程表详情", type = OperationLogType.INFO)
@ApiOperation(value = "行程表详情", response = StrokeQueryVo.class) @ApiOperation(value = "行程表详情", response = StrokeQueryVo.class)
public ApiResult<StrokeQueryVo> getStroke(@PathVariable("id") Long id)throws Exception{ public ApiResult<StrokeQueryVo> getStroke(@PathVariable("id") Long id) throws Exception {
StrokeQueryVo strokeQueryVo = strokeService.getStrokeById(id); StrokeQueryVo strokeQueryVo = strokeService.getStrokeById(id);
return ApiResult.ok(strokeQueryVo); return ApiResult.ok(strokeQueryVo);
} }
...@@ -86,10 +149,10 @@ private StrokeService strokeService; ...@@ -86,10 +149,10 @@ private StrokeService strokeService;
@PostMapping("/getPageList") @PostMapping("/getPageList")
@OperationLog(name = "行程表分页列表", type = OperationLogType.PAGE) @OperationLog(name = "行程表分页列表", type = OperationLogType.PAGE)
@ApiOperation(value = "行程表分页列表", response = StrokeQueryVo.class) @ApiOperation(value = "行程表分页列表", response = StrokeQueryVo.class)
public ApiResult<Paging<StrokeQueryVo>>getStrokePageList(@Validated @RequestBody StrokePageParam strokePageParam)throws Exception{ public ApiResult<Paging<StrokeQueryVo>> getStrokePageList(@Validated @RequestBody StrokePageParam strokePageParam) throws Exception {
Paging<StrokeQueryVo> paging = strokeService.getStrokePageList(strokePageParam); Paging<StrokeQueryVo> paging = strokeService.getStrokePageList(strokePageParam);
return ApiResult.ok(paging); return ApiResult.ok(paging);
} }
} }
package com.jumeirah.api.app.entity.vo;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* 行程表-返程
*
* @author wei
* @since 2020-09-29
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "添加返程行程入参对象")
public class StrokeAddBackAndForthVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "出发城市id不能为空")
@ApiModelProperty("出发城市id")
private Long cityOutsetId;
@NotBlank(message = "出发城市名称不能为空")
@ApiModelProperty("出发城市名称")
private String cityOutsetName;
@NotNull(message = "到达城市id不能为空")
@ApiModelProperty("到达城市id")
private Long cityArriveId;
@NotBlank(message = "到达城市名称不能为空")
@ApiModelProperty("到达城市名称")
private String cityArriveName;
@NotNull(message = "人数不能为空")
@ApiModelProperty("人数")
private Integer peopleMun;
@NotNull(message = "飞机型号ID不能为空")
@ApiModelProperty("飞机型号ID")
private Long plainTypeId;
@NotNull(message = "出发时间不能为空")
@ApiModelProperty("出发时间")
private Long outsetTime;
@NotNull(message = "返程时间不能为空")
@ApiModelProperty("返程时间")
private Long returnTime;
}
package com.jumeirah.api.app.entity.vo;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* 行程表
*
* @author wei
* @since 2020-09-29
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "添加货运行程入参对象")
public class StrokeAddFreightVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "出发城市id不能为空")
@ApiModelProperty("出发城市id")
private Long cityOutsetId;
@NotBlank(message = "出发城市名称不能为空")
@ApiModelProperty("出发城市名称")
private String cityOutsetName;
@NotNull(message = "到达城市id不能为空")
@ApiModelProperty("到达城市id")
private Long cityArriveId;
@NotBlank(message = "到达城市名称不能为空")
@ApiModelProperty("到达城市名称")
private String cityArriveName;
@NotNull(message = "出发时间不能为空")
@ApiModelProperty("出发时间")
private Long outsetTime;
@NotBlank(message = "货物名称不能为空")
@ApiModelProperty("货物名称")
private String goodsName;
@NotBlank(message = "货物体积不能为空")
@ApiModelProperty("货物体积(长*宽*高) 单位:CM,例如:100*102*120")
private String goodsSize;
@NotNull(message = "货物重量不能为空")
@ApiModelProperty("货物重量,单位:吨")
private Double goodsWeight;
}
package com.jumeirah.api.app.entity.vo;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* 行程表
*
* @author wei
* @since 2020-09-29
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "添加医疗行程入参对象")
public class StrokeAddMedicalTreatmentVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "出发城市id不能为空")
@ApiModelProperty("出发城市id")
private Long cityOutsetId;
@NotBlank(message = "出发城市名称不能为空")
@ApiModelProperty("出发城市名称")
private String cityOutsetName;
@NotNull(message = "到达城市id不能为空")
@ApiModelProperty("到达城市id")
private Long cityArriveId;
@NotBlank(message = "到达城市名称不能为空")
@ApiModelProperty("到达城市名称")
private String cityArriveName;
@NotNull(message = "出发时间不能为空")
@ApiModelProperty("出发时间")
private Long outsetTime;
@NotBlank(message = "到达城市名称不能为空")
@ApiModelProperty("病人疾病名称")
private String diseaseName;
@NotBlank(message = "病人病情诊断书不能为空")
@ApiModelProperty("病人病情诊断书")
private String medicalCertificateUrl;
@ApiModelProperty("配备器械(格式:1,2,3)逗号分隔")
private String instruments;
@ApiModelProperty("医护人员,0-医生,1-护士,2-护工(格式:0,1,2)逗号分隔")
private String medicalPersons;
@ApiModelProperty("备注")
private String remarks;
}
package com.jumeirah.api.app.entity.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* 行程表
*
* @author wei
* @since 2020-09-29
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "添加单程行程入参对象")
public class StrokeAddOneWayVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "出发城市id不能为空")
@ApiModelProperty("出发城市id")
private Long cityOutsetId;
@NotBlank(message = "出发城市名称不能为空")
@ApiModelProperty("出发城市名称")
private String cityOutsetName;
@NotNull(message = "到达城市id不能为空")
@ApiModelProperty("到达城市id")
private Long cityArriveId;
@NotBlank(message = "到达城市名称不能为空")
@ApiModelProperty("到达城市名称")
private String cityArriveName;
@NotNull(message = "人数不能为空")
@ApiModelProperty("人数")
private Integer peopleMun;
@NotNull(message = "飞机型号ID不能为空")
@ApiModelProperty("飞机型号ID")
private Long plainTypeId;
@NotNull(message = "出发时间不能为空")
@ApiModelProperty("出发时间")
private Long outsetTime;
}
...@@ -62,10 +62,10 @@ public class Stroke extends BaseEntity { ...@@ -62,10 +62,10 @@ public class Stroke extends BaseEntity {
@NotNull(message = "出发时间不能为空") @NotNull(message = "出发时间不能为空")
@ApiModelProperty("出发时间") @ApiModelProperty("出发时间")
private Date outsetTime; private Long outsetTime;
@ApiModelProperty("返程时间") @ApiModelProperty("返程时间")
private Date returnTime; private Long returnTime;
@NotNull(message = "行程类型,0-单程,1-往返行程,2-货运,3-医疗不能为空") @NotNull(message = "行程类型,0-单程,1-往返行程,2-货运,3-医疗不能为空")
@ApiModelProperty("行程类型,0-单程,1-往返行程,2-货运,3-医疗") @ApiModelProperty("行程类型,0-单程,1-往返行程,2-货运,3-医疗")
...@@ -95,7 +95,7 @@ public class Stroke extends BaseEntity { ...@@ -95,7 +95,7 @@ public class Stroke extends BaseEntity {
private String diseaseName; private String diseaseName;
@ApiModelProperty("病人病情诊断书") @ApiModelProperty("病人病情诊断书")
private String aegerUrl; private String medicalCertificateUrl;
@ApiModelProperty("配备器械(格式:1,2,3)逗号分隔") @ApiModelProperty("配备器械(格式:1,2,3)逗号分隔")
private String instruments; private String instruments;
...@@ -113,4 +113,12 @@ public class Stroke extends BaseEntity { ...@@ -113,4 +113,12 @@ public class Stroke extends BaseEntity {
@ApiModelProperty("用户ID") @ApiModelProperty("用户ID")
private Long userId; private Long userId;
@NotNull(message = "商家id不能为空")
@ApiModelProperty("商家id")
private Long mcId;
@NotNull(message = "用户选择机型不能为空")
@ApiModelProperty("用户选择机型")
private Long choosePlainType;
} }
...@@ -21,7 +21,7 @@ public interface StrokeService extends BaseService<Stroke> { ...@@ -21,7 +21,7 @@ public interface StrokeService extends BaseService<Stroke> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
boolean saveStroke(Stroke stroke)throws Exception; boolean saveStroke(Stroke stroke) throws Exception;
/** /**
* 修改 * 修改
...@@ -30,7 +30,7 @@ public interface StrokeService extends BaseService<Stroke> { ...@@ -30,7 +30,7 @@ public interface StrokeService extends BaseService<Stroke> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
boolean updateStroke(Stroke stroke)throws Exception; boolean updateStroke(Stroke stroke) throws Exception;
/** /**
* 删除 * 删除
...@@ -39,7 +39,7 @@ public interface StrokeService extends BaseService<Stroke> { ...@@ -39,7 +39,7 @@ public interface StrokeService extends BaseService<Stroke> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
boolean deleteStroke(Long id)throws Exception; boolean deleteStroke(Long id) throws Exception;
/** /**
* 根据ID获取查询对象 * 根据ID获取查询对象
...@@ -48,7 +48,7 @@ public interface StrokeService extends BaseService<Stroke> { ...@@ -48,7 +48,7 @@ public interface StrokeService extends BaseService<Stroke> {
* @return * @return
* @throws Exception * @throws Exception
*/ */
StrokeQueryVo getStrokeById(Long id)throws Exception; StrokeQueryVo getStrokeById(Long id) throws Exception;
/** /**
* 获取分页对象 * 获取分页对象
...@@ -59,4 +59,4 @@ public interface StrokeService extends BaseService<Stroke> { ...@@ -59,4 +59,4 @@ public interface StrokeService extends BaseService<Stroke> {
*/ */
Paging<StrokeQueryVo> getStrokePageList(StrokePageParam strokePageParam) throws Exception; Paging<StrokeQueryVo> getStrokePageList(StrokePageParam strokePageParam) throws Exception;
} }
...@@ -3,15 +3,15 @@ package com.jumeirah.common.service.impl; ...@@ -3,15 +3,15 @@ package com.jumeirah.common.service.impl;
import com.jumeirah.common.entity.Stroke; import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.mapper.StrokeMapper; import com.jumeirah.common.mapper.StrokeMapper;
import com.jumeirah.common.service.StrokeService; import com.jumeirah.common.service.StrokeService;
import com.jumeirah.common.param.StrokePageParam; import com.jumeirah.common.param.StrokePageParam;
import com.jumeirah.common.vo.StrokeQueryVo; import com.jumeirah.common.vo.StrokeQueryVo;
import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl; import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl;
import io.geekidea.springbootplus.framework.core.pagination.Paging; import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.core.pagination.PageInfo; import io.geekidea.springbootplus.framework.core.pagination.PageInfo;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -26,37 +26,37 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -26,37 +26,37 @@ import org.springframework.beans.factory.annotation.Autowired;
@Service @Service
public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> implements StrokeService { public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> implements StrokeService {
@Autowired @Autowired
private StrokeMapper strokeMapper; private StrokeMapper strokeMapper;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public boolean saveStroke(Stroke stroke)throws Exception{ public boolean saveStroke(Stroke stroke) throws Exception {
return super.save(stroke); return super.save(stroke);
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public boolean updateStroke(Stroke stroke)throws Exception{ public boolean updateStroke(Stroke stroke) throws Exception {
return super.updateById(stroke); return super.updateById(stroke);
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public boolean deleteStroke(Long id)throws Exception{ public boolean deleteStroke(Long id) throws Exception {
return super.removeById(id); return super.removeById(id);
} }
@Override @Override
public StrokeQueryVo getStrokeById(Long id)throws Exception{ public StrokeQueryVo getStrokeById(Long id) throws Exception {
return strokeMapper.getStrokeById(id); return strokeMapper.getStrokeById(id);
} }
@Override @Override
public Paging<StrokeQueryVo> getStrokePageList(StrokePageParam strokePageParam)throws Exception{ public Paging<StrokeQueryVo> getStrokePageList(StrokePageParam strokePageParam) throws Exception {
Page<StrokeQueryVo> page=new PageInfo<>(strokePageParam,OrderItem.desc(getLambdaColumn(Stroke::getCreateTime))); Page<StrokeQueryVo> page = new PageInfo<>(strokePageParam, OrderItem.desc(getLambdaColumn(Stroke::getCreateTime)));
IPage<StrokeQueryVo> iPage= strokeMapper.getStrokePageList(page, strokePageParam); IPage<StrokeQueryVo> iPage = strokeMapper.getStrokePageList(page, strokePageParam);
return new Paging<StrokeQueryVo>(iPage); return new Paging<StrokeQueryVo>(iPage);
} }
} }
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