Commit cd5c92d2 by zhangjw

Merge branch 'master' of http://119.28.51.83/hewei/Jumeirah

parents e23ba628 ffca55e2
package com.jumeirah.api.app.controller;
import com.jumeirah.common.param.MerchantUserPageParam;
import com.jumeirah.common.service.MerchantUserService;
import com.jumeirah.common.vo.MerchantUserQueryForAppVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.controller.BaseController;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.log.annotation.OperationLog;
import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 航空介绍 控制器
*
* @author wei
* @since 2020-09-29
*/
@Slf4j
@RestController
@RequestMapping("/app/airline")
@Api(value = "航空介绍", tags = {"航空公司介绍"})
public class AirIntroducedController extends BaseController {
@Autowired
private MerchantUserService merchantUserService;
/**
* 商家分页列表
*/
@PostMapping("/getPageList")
@OperationLog(name = "航空公司介绍分页列表", type = OperationLogType.PAGE)
@ApiOperation(value = "航空公司介绍分页列表", response = MerchantUserQueryForAppVo.class)
public ApiResult<Paging<MerchantUserQueryForAppVo>> getMerchantUserPageList(@Validated @RequestBody MerchantUserPageParam merchantUserPageParam) throws Exception {
Paging<MerchantUserQueryForAppVo> paging = merchantUserService.getMerchantUserPageListForApp(merchantUserPageParam);
return ApiResult.ok(paging);
}
}
package com.jumeirah.api.app.controller;
import com.jumeirah.api.app.entity.bo.PlainTypeBo;
import com.jumeirah.common.entity.PlainType;
import com.jumeirah.common.service.PlainTypeService;
import com.jumeirah.common.vo.PlainTypeQueryVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.controller.BaseController;
import io.geekidea.springbootplus.framework.log.annotation.Module;
import io.geekidea.springbootplus.framework.log.annotation.OperationLog;
import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 飞机型号表 控制器
*
* @author wei
* @since 2020-10-09
*/
@Slf4j
@RestController
@RequestMapping("/app/plainType")
@Module("${cfg.module}")
@Api(value = "飞机型号表API", tags = {"飞机型号表"})
public class PlainTypeController extends BaseController {
@Autowired
private PlainTypeService plainTypeService;
/**
* 飞机型号表分页列表
*/
@GetMapping("/getAllMap")
@OperationLog(name = "分组获取飞机型号列表", type = OperationLogType.PAGE)
@ApiOperation(value = "分组获取飞机型号列表", response = PlainTypeQueryVo.class)
public ApiResult<List<PlainTypeBo>> getAllMap() throws Exception {
List<PlainType> plainTypeList = plainTypeService.getAllMap();
Map<Integer, List<PlainType>> resultMap;
List<PlainTypeBo> plainTypeBoList = new ArrayList<>();
if (!CollectionUtils.isEmpty(plainTypeList)) {
resultMap = plainTypeList.stream().collect(Collectors.groupingBy(PlainType::getSeriesType));
PlainTypeBo plainTypeBo;
for (List<PlainType> listTemp: resultMap.values()) {
plainTypeBo = new PlainTypeBo();
plainTypeBo.setTitle(listTemp.get(0).getSeriesName())
.setPlainTypeList(listTemp);
plainTypeBoList.add(plainTypeBo);
}
}
return ApiResult.ok(plainTypeBoList);
}
}
package com.jumeirah.api.app.controller; package com.jumeirah.api.app.controller;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.jumeirah.api.app.entity.vo.StrokeAddBackAndForthVo; import com.jumeirah.api.app.entity.vo.StrokeAddBackAndForthVo;
import com.jumeirah.api.app.entity.vo.StrokeAddFreightVo; import com.jumeirah.api.app.entity.vo.StrokeAddFreightVo;
import com.jumeirah.api.app.entity.vo.StrokeAddMedicalTreatmentVo; import com.jumeirah.api.app.entity.vo.StrokeAddMedicalTreatmentVo;
import com.jumeirah.api.app.entity.vo.StrokeAddOneWayVo; import com.jumeirah.api.app.entity.vo.StrokeAddOneWayVo;
import com.jumeirah.common.entity.Stroke; import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.enums.StatePaymentStatusEnum;
import com.jumeirah.common.param.StrokePageParam; import com.jumeirah.common.param.StrokePageParam;
import com.jumeirah.common.param.app.StrokePaymentInfoParam;
import com.jumeirah.common.service.StrokeService; import com.jumeirah.common.service.StrokeService;
import com.jumeirah.common.vo.StrokeDetailVo; import com.jumeirah.common.vo.StrokeDetailVo;
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.common.controller.BaseController; import io.geekidea.springbootplus.framework.common.controller.BaseController;
import io.geekidea.springbootplus.framework.core.pagination.Paging; import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
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.shiro.jwt.JwtToken; import io.geekidea.springbootplus.framework.shiro.jwt.JwtToken;
...@@ -46,6 +48,25 @@ public class StrokeController extends BaseController { ...@@ -46,6 +48,25 @@ public class StrokeController extends BaseController {
private StrokeService strokeService; private StrokeService strokeService;
/** /**
* 填写付款信息
*/
@PostMapping("/add/paymentInfo")
@OperationLog(name = "填写付款信息", type = OperationLogType.ADD)
@ApiOperation(value = "填写付款信息", response = ApiResult.class)
public ApiResult<Boolean> addPaymentInfo(@Validated @RequestBody StrokePaymentInfoParam strokePaymentInfoParam) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokePaymentInfoParam, stroke);
stroke.setPaymentStatus(StatePaymentStatusEnum.PAYING.getCode());
boolean flag = strokeService.update(stroke, new UpdateWrapper<Stroke>().lambda()
.eq(Stroke::getUserId, jwtToken.getUserId())
.eq(Stroke::getId, strokePaymentInfoParam.getId())
);
return ApiResult.result(flag);
}
/**
* 添加单程行程表 * 添加单程行程表
*/ */
@PostMapping("/add/oneWay") @PostMapping("/add/oneWay")
...@@ -55,7 +76,8 @@ public class StrokeController extends BaseController { ...@@ -55,7 +76,8 @@ public class StrokeController extends BaseController {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal(); JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke(); Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddOneWayVo, stroke); BeanUtils.copyProperties(strokeAddOneWayVo, stroke);
stroke.setType(0); stroke.setType(0)
.setUserId(jwtToken.getUserId());
boolean flag = strokeService.saveStroke(stroke); boolean flag = strokeService.saveStroke(stroke);
return ApiResult.result(flag); return ApiResult.result(flag);
} }
...@@ -70,7 +92,8 @@ public class StrokeController extends BaseController { ...@@ -70,7 +92,8 @@ public class StrokeController extends BaseController {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal(); JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke(); Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddBackAndForthVo, stroke); BeanUtils.copyProperties(strokeAddBackAndForthVo, stroke);
stroke.setType(1); stroke.setType(1)
.setUserId(jwtToken.getUserId());
boolean flag = strokeService.saveStroke(stroke); boolean flag = strokeService.saveStroke(stroke);
return ApiResult.result(flag); return ApiResult.result(flag);
} }
...@@ -85,7 +108,8 @@ public class StrokeController extends BaseController { ...@@ -85,7 +108,8 @@ public class StrokeController extends BaseController {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal(); JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke(); Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddFreightVo, stroke); BeanUtils.copyProperties(strokeAddFreightVo, stroke);
stroke.setType(2); stroke.setType(2)
.setUserId(jwtToken.getUserId());
boolean flag = strokeService.saveStroke(stroke); boolean flag = strokeService.saveStroke(stroke);
return ApiResult.result(flag); return ApiResult.result(flag);
} }
...@@ -101,22 +125,23 @@ public class StrokeController extends BaseController { ...@@ -101,22 +125,23 @@ public class StrokeController extends BaseController {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal(); JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke stroke = new Stroke(); Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokeAddMedicalTreatmentVo, stroke); BeanUtils.copyProperties(strokeAddMedicalTreatmentVo, stroke);
stroke.setType(3); stroke.setType(3)
.setUserId(jwtToken.getUserId());
boolean flag = strokeService.saveStroke(stroke); boolean flag = strokeService.saveStroke(stroke);
return ApiResult.result(flag); 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);
} // }
/** /**
* 删除行程表 * 删除行程表
...@@ -130,6 +155,17 @@ public class StrokeController extends BaseController { ...@@ -130,6 +155,17 @@ public class StrokeController extends BaseController {
} }
/** /**
* 取消行程
*/
@PostMapping("/cancel/{id}")
@OperationLog(name = "取消行程", type = OperationLogType.UPDATE)
@ApiOperation(value = "取消行程", response = ApiResult.class)
public ApiResult<Boolean> cancel(@PathVariable("id") Long id) throws Exception {
boolean flag = strokeService.cancelStroke(id);
return ApiResult.result(flag);
}
/**
* 获取行程表详情 * 获取行程表详情
*/ */
@GetMapping("/info/{id}") @GetMapping("/info/{id}")
......
package com.jumeirah.api.app.entity.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.jumeirah.common.entity.PlainType;
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.List;
/**
* 飞机型号表
*
* @author wei
* @since 2020-10-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "分组获取飞机类型对象")
public class PlainTypeBo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("系列名称")
private String title;
@ApiModelProperty("系列名称")
private List<PlainType> plainTypeList;
}
package com.jumeirah.api.merchant.controller.order;
import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.param.McStrokePageParam;
import com.jumeirah.common.service.StrokeService;
import com.jumeirah.common.vo.McStrokeQueryVo;
import com.jumeirah.common.vo.StrokeDetailVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.controller.BaseController;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import io.geekidea.springbootplus.framework.log.annotation.OperationLog;
import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 行程表 控制器
*
* @author wei
* @since 2020-09-29
*/
@Slf4j
@RestController
@RequestMapping("/merchant/stroke")
@Api(value = "行程API", tags = {"行程"})
public class McStrokeController extends BaseController {
@Autowired
private StrokeService strokeService;
/**
* 修改行程表
*/
@PostMapping("/update")
@OperationLog(name = "修改行程表", type = OperationLogType.UPDATE)
@ApiOperation(value = "修改行程表", response = ApiResult.class)
public ApiResult<Boolean> updateStroke(@Validated(Update.class) @RequestBody Stroke stroke) throws Exception {
boolean flag = strokeService.updateStroke(stroke);
return ApiResult.result(flag);
}
/**
* 删除行程表
*/
@PostMapping("/delete/{id}")
@OperationLog(name = "删除行程表", type = OperationLogType.DELETE)
@ApiOperation(value = "删除行程表", response = ApiResult.class)
public ApiResult<Boolean> deleteStroke(@PathVariable("id") Long id) throws Exception {
boolean flag = strokeService.deleteStroke(id);
return ApiResult.result(flag);
}
/**
* 获取行程表详情
*/
@GetMapping("/info/{id}")
@OperationLog(name = "行程表详情", type = OperationLogType.INFO)
@ApiOperation(value = "行程表详情", response = StrokeDetailVo.class)
public ApiResult<StrokeDetailVo> getStroke(@PathVariable("id") Long id) throws Exception {
StrokeDetailVo strokeQueryVo = strokeService.getStrokeById(id);
return ApiResult.ok(strokeQueryVo);
}
/**
* 行程表分页列表
*/
@PostMapping("/getPageList")
@OperationLog(name = "行程分页列表", type = OperationLogType.PAGE)
@ApiOperation(value = "行程分页列表")
public ApiResult<Paging<McStrokeQueryVo>> getMyStrokePageList(@Validated @RequestBody McStrokePageParam mcStrokePageParam) throws Exception {
Paging<McStrokeQueryVo> paging = strokeService.getMcStrokePageList(mcStrokePageParam);
return ApiResult.ok(paging);
}
}
package com.jumeirah.common.controller;
import com.jumeirah.common.entity.PlainType;
import com.jumeirah.common.service.PlainTypeService;
import lombok.extern.slf4j.Slf4j;
import com.jumeirah.common.param.PlainTypePageParam;
import io.geekidea.springbootplus.framework.common.controller.BaseController;
import com.jumeirah.common.vo.PlainTypeQueryVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.common.param.IdParam;
import io.geekidea.springbootplus.framework.log.annotation.Module;
import io.geekidea.springbootplus.framework.log.annotation.OperationLog;
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.Update;
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.web.bind.annotation.*;
/**
* 飞机型号表 控制器
*
* @author wei
* @since 2020-10-09
*/
/*@Slf4j
@RestController
@RequestMapping("/plainType")
@Module("${cfg.module}")
@Api(value = "飞机型号表API", tags = {"飞机型号表"})*/
public class PlainTypeController extends BaseController {
@Autowired
private PlainTypeService plainTypeService;
/**
* 添加飞机型号表
*/
@PostMapping("/add")
@OperationLog(name = "添加飞机型号表", type = OperationLogType.ADD)
@ApiOperation(value = "添加飞机型号表", response = ApiResult.class)
public ApiResult<Boolean> addPlainType(@Validated(Add.class) @RequestBody PlainType plainType) throws Exception {
boolean flag = plainTypeService.savePlainType(plainType);
return ApiResult.result(flag);
}
/**
* 修改飞机型号表
*/
@PostMapping("/update")
@OperationLog(name = "修改飞机型号表", type = OperationLogType.UPDATE)
@ApiOperation(value = "修改飞机型号表", response = ApiResult.class)
public ApiResult<Boolean> updatePlainType(@Validated(Update.class) @RequestBody PlainType plainType) throws Exception {
boolean flag = plainTypeService.updatePlainType(plainType);
return ApiResult.result(flag);
}
/**
* 删除飞机型号表
*/
@PostMapping("/delete/{id}")
@OperationLog(name = "删除飞机型号表", type = OperationLogType.DELETE)
@ApiOperation(value = "删除飞机型号表", response = ApiResult.class)
public ApiResult<Boolean> deletePlainType(@PathVariable("id") Long id) throws Exception {
boolean flag = plainTypeService.deletePlainType(id);
return ApiResult.result(flag);
}
/**
* 获取飞机型号表详情
*/
@GetMapping("/info/{id}")
@OperationLog(name = "飞机型号表详情", type = OperationLogType.INFO)
@ApiOperation(value = "飞机型号表详情", response = PlainTypeQueryVo.class)
public ApiResult<PlainTypeQueryVo> getPlainType(@PathVariable("id") Long id) throws Exception {
PlainTypeQueryVo plainTypeQueryVo = plainTypeService.getPlainTypeById(id);
return ApiResult.ok(plainTypeQueryVo);
}
/**
* 飞机型号表分页列表
*/
@PostMapping("/getPageList")
@OperationLog(name = "飞机型号表分页列表", type = OperationLogType.PAGE)
@ApiOperation(value = "飞机型号表分页列表", response = PlainTypeQueryVo.class)
public ApiResult<Paging<PlainTypeQueryVo>> getPlainTypePageList(@Validated @RequestBody PlainTypePageParam plainTypePageParam) throws Exception {
Paging<PlainTypeQueryVo> paging = plainTypeService.getPlainTypePageList(plainTypePageParam);
return ApiResult.ok(paging);
}
}
package com.jumeirah.common.entity; package com.jumeirah.common.entity;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
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.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.Date;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
/** /**
* 商家 * 商家
...@@ -27,62 +27,83 @@ import io.geekidea.springbootplus.framework.core.validator.groups.Update; ...@@ -27,62 +27,83 @@ import io.geekidea.springbootplus.framework.core.validator.groups.Update;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "MerchantUser对象") @ApiModel(value = "MerchantUser对象")
public class MerchantUser extends BaseEntity { public class MerchantUser extends BaseEntity {
private static final long serialVersionUID=1L; private static final long serialVersionUID = 1L;
@NotNull(message = "id不能为空", groups = {Update.class}) @NotNull(message = "id不能为空", groups = {Update.class})
@ApiModelProperty("主键") @ApiModelProperty("主键")
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
@ApiModelProperty("用户名") @ApiModelProperty("用户名")
private String username; private String username;
@ApiModelProperty("昵称") @ApiModelProperty("昵称")
private String nickname; private String nickname;
@NotBlank(message = "密码不能为空") @NotBlank(message = "密码不能为空")
@ApiModelProperty("密码") @ApiModelProperty("密码")
private String password; private String password;
@ApiModelProperty("盐值") @ApiModelProperty("盐值")
private String salt; private String salt;
@ApiModelProperty("手机号码") @ApiModelProperty("手机号码")
private String phone; private String phone;
@ApiModelProperty("手机区号") @ApiModelProperty("手机区号")
private String phoneArea; private String phoneArea;
@ApiModelProperty("性别,0:女,1:男,默认1") @ApiModelProperty("性别,0:女,1:男,默认1")
private Integer gender; private Integer gender;
@ApiModelProperty("头像") @ApiModelProperty("头像")
private String head; private String head;
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
@ApiModelProperty("状态,0:禁用,1:启用,2:锁定") @ApiModelProperty("状态,0:禁用,1:启用,2:锁定")
private Integer state; private Integer state;
@ApiModelProperty("部门id") @ApiModelProperty("部门id")
private Long departmentId; private Long departmentId;
@ApiModelProperty("角色id") @ApiModelProperty("角色id")
private Long roleId; private Long roleId;
@ApiModelProperty("逻辑删除,0:未删除,1:已删除") @ApiModelProperty("逻辑删除,0:未删除,1:已删除")
@TableLogic @TableLogic
private Integer deleted; private Integer deleted;
@ApiModelProperty("版本") @ApiModelProperty("版本")
@Version @Version
private Integer version; private Integer version;
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
private Date createTime; private Date createTime;
@ApiModelProperty("修改时间")
private Date updateTime;
@ApiModelProperty("在列表展示的图片url")
private String imageListUrl;
@ApiModelProperty("公司介绍图片url")
private String imageCompanyIntroductionUrl;
@ApiModelProperty("团队介绍图片url")
private String imageTeamIntroductionUrl;
@ApiModelProperty("优势图片url")
private String imageAdvantageUrl;
@ApiModelProperty("公司介绍文字")
private String textCompanyIntroduction;
@ApiModelProperty("团队介绍文字")
private String textTeamIntroduction;
@ApiModelProperty("修改时间") @ApiModelProperty("优势介绍文字")
private Date updateTime; private String textAdvantage;
} }
package com.jumeirah.common.entity;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
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 io.geekidea.springbootplus.framework.core.validator.groups.Update;
import java.sql.Timestamp;
/**
* 飞机型号表
*
* @author wei
* @since 2020-10-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PlainType对象")
public class PlainType extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "id不能为空", groups = {Update.class})
@ApiModelProperty("主键ID")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@NotNull(message = "系列类型不能为空")
@ApiModelProperty("系列类型")
private Integer seriesType;
@ApiModelProperty("系列名称")
private String seriesName;
@NotBlank(message = "飞机名称不能为空")
@ApiModelProperty("飞机名称")
private String name;
@NotBlank(message = "飞机图片地址不能为空")
@ApiModelProperty("飞机图片地址")
private String imgUrl;
@NotNull(message = "状态,0-正常,1-禁用,99-删除不能为空")
@ApiModelProperty("状态,0-正常,1-禁用,99-删除")
private Integer status;
@NotNull(message = "创建时间(时间戳)不能为空")
@ApiModelProperty("创建时间(时间戳)")
private Timestamp createTime;
@ApiModelProperty("更新时间(时间戳)")
private Timestamp updateTime;
@ApiModelProperty("宽 单位:像素")
private Integer width;
@ApiModelProperty("高 单位:像素")
private Integer height;
}
...@@ -13,6 +13,7 @@ import lombok.experimental.Accessors; ...@@ -13,6 +13,7 @@ import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.sql.Timestamp; import java.sql.Timestamp;
/** /**
...@@ -107,8 +108,8 @@ public class Stroke extends BaseEntity { ...@@ -107,8 +108,8 @@ public class Stroke extends BaseEntity {
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remarks; private String remarks;
@ApiModelProperty("价格,单位:分") @ApiModelProperty("价格")
private Long money; private BigDecimal money;
@NotNull(message = "用户ID不能为空") @NotNull(message = "用户ID不能为空")
@ApiModelProperty("用户ID") @ApiModelProperty("用户ID")
...@@ -138,8 +139,48 @@ public class Stroke extends BaseEntity { ...@@ -138,8 +139,48 @@ public class Stroke extends BaseEntity {
@ApiModelProperty("商家id") @ApiModelProperty("商家id")
private Long mcId; private Long mcId;
@NotNull(message = "用户选择机型不能为空") @NotBlank(message = "用户选择机型不能为空")
@ApiModelProperty("用户选择机型") @ApiModelProperty("用户选择机型")
private Long choosePlainType; private String choosePlainType;
@NotNull(message = "付款状态不能为空")
@ApiModelProperty("付款状态,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款")
private Integer paymentStatus;
@NotNull(message = "审核状态不能为空")
@ApiModelProperty("审核状态,0审核中,1审核通过,2审核未通过")
private Integer auditStatus;
@NotNull(message = "用户充值金额不能为空")
@ApiModelProperty("用户充值金额")
private BigDecimal userRechargeMoney;
@NotBlank(message = "用户充值银行不能为空")
@ApiModelProperty("用户充值银行名称")
private String userRechargeBank;
@NotBlank(message = "用户充值账户名不能为空")
@ApiModelProperty("用户充值账户名")
private String userRechargeName;
@NotBlank(message = "用户充值卡号不能为空")
@ApiModelProperty("用户充值卡号")
private String userRechargeBankNumber;
@NotBlank(message = "用户充值截图证据, 传入数组不能为空")
@ApiModelProperty("用户充值截图证据, 传入数组")
private String userRechargeCredentialsUrl;
@NotBlank(message = "商家开户银行不能为空")
@ApiModelProperty("商家开户银行")
private String rechargeBank;
@NotBlank(message = "商家开户名称不能为空")
@ApiModelProperty("商家开户名称")
private String rechargeName;
@NotBlank(message = "商家银行卡号")
@ApiModelProperty("商家银行卡号")
private String rechargeBankNumber;
} }
package com.jumeirah.common.enums;
import io.geekidea.springbootplus.framework.common.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 审核状态,0审核中,1审核通过,2审核未通过
**/
@Getter
@AllArgsConstructor
public enum StateAuditStatusEnum implements BaseEnum {
/**
* 0审核中
**/
UNDER_REVIEW(0, "0审核中"),
/**
* 1审核通过
**/
PASSED(1, "1审核通过"),
/**
* 2审核未通过
**/
FAILED_THE_AUDIT(2, "2审核未通过");
private final Integer code;
private final String desc;
}
package com.jumeirah.common.enums;
import io.geekidea.springbootplus.framework.common.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 付款状态,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款
**/
@Getter
@AllArgsConstructor
public enum StatePaymentStatusEnum implements BaseEnum {
// 0-UNPAID, 1-PAYING, 2-PAID, 3-REFUNDING, 99-REFUNDED
/**
* 未付款
**/
UNPAID(0, "未付款"),
/**
* 付款中
**/
PAYING(1, "用户已付款,待审核"),
/**
* 已付款
**/
PAID(2, "用户已付款,审核通过"),
/**
* 退款中
**/
REFUNDING(3, "退款中"),
/**
* 已退款
**/
REFUNDED(99, "已退款");
private final Integer code;
private final String desc;
}
package com.jumeirah.common.enums; package com.jumeirah.common.enums;
import io.geekidea.springbootplus.framework.common.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
/** /**
* 状态,0-审核中,1-进行中,2-已完成,99-取消 * 状态,0-审核中,1-进行中,2-已完成,99-取消
*/ */
public enum StrokeStatusEnum { @Getter
@AllArgsConstructor
public enum StrokeStatusEnum implements BaseEnum {
UNDER_REVIEW(0, "审核中"), UNDER_REVIEW(0, "审核中"),
PROCESSING(1, "进行中"), PROCESSING(1, "进行中"),
...@@ -13,16 +19,11 @@ public enum StrokeStatusEnum { ...@@ -13,16 +19,11 @@ public enum StrokeStatusEnum {
/** /**
* 编号 * 编号
*/ */
private final Integer id; private final Integer code;
/** /**
* 名称 * 名称
*/ */
private final String name; private final String desc;
StrokeStatusEnum(Integer id, String name) {
this.id = id;
this.name = name;
}
} }
package com.jumeirah.common.enums; package com.jumeirah.common.enums;
import io.geekidea.springbootplus.framework.common.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
/** /**
* 行程类型,0-单程,1-往返行程,2-货运,3-医疗 * 行程类型,0-单程,1-往返行程,2-货运,3-医疗
*/ */
public enum StrokeTypeEnum { @Getter
@AllArgsConstructor
public enum StrokeTypeEnum implements BaseEnum {
ONE_WAY(0, "单程"), ONE_WAY(0, "单程"),
ROUND_TRIP(1, "往返"), ROUND_TRIP(1, "往返"),
...@@ -13,16 +19,10 @@ public enum StrokeTypeEnum { ...@@ -13,16 +19,10 @@ public enum StrokeTypeEnum {
/** /**
* 编号 * 编号
*/ */
private final Integer id; private final Integer code;
/** /**
* 名称 * 名称
*/ */
private final String name; private final String desc;
StrokeTypeEnum(Integer id, String name) {
this.id = id;
this.name = name;
}
} }
package com.jumeirah.common.mapper; package com.jumeirah.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jumeirah.common.entity.MerchantUser; import com.jumeirah.common.entity.MerchantUser;
import com.jumeirah.common.param.MerchantUserPageParam; import com.jumeirah.common.param.MerchantUserPageParam;
import com.jumeirah.common.vo.MerchantUserQueryForAppVo;
import com.jumeirah.common.vo.MerchantUserQueryVo; import com.jumeirah.common.vo.MerchantUserQueryVo;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.io.Serializable; import java.io.Serializable;
...@@ -22,21 +21,25 @@ import java.io.Serializable; ...@@ -22,21 +21,25 @@ import java.io.Serializable;
@Repository @Repository
public interface MerchantUserMapper extends BaseMapper<MerchantUser> { public interface MerchantUserMapper extends BaseMapper<MerchantUser> {
/** /**
* 根据ID获取查询对象 * 根据ID获取查询对象
* *
* @param id * @param id
* @return * @return
*/ */
MerchantUserQueryVo getMerchantUserById(Serializable id); MerchantUserQueryVo getMerchantUserById(Serializable id);
/** /**
* 获取分页对象 * 获取分页对象
* *
* @param page * @param page
* @param merchantUserPageParam * @param merchantUserPageParam
* @return * @return
*/ */
IPage<MerchantUserQueryVo> getMerchantUserPageList(@Param("page") Page page,@Param("param") MerchantUserPageParam merchantUserPageParam); IPage<MerchantUserQueryVo> getMerchantUserPageList(@Param("page") Page page, @Param("param") MerchantUserPageParam merchantUserPageParam);
}
IPage<MerchantUserQueryForAppVo> getMerchantUserForAppPageList(@Param("page") Page page, @Param("param") MerchantUserPageParam merchantUserPageParam);
}
package com.jumeirah.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jumeirah.common.entity.PlainType;
import com.jumeirah.common.param.PlainTypePageParam;
import com.jumeirah.common.vo.PlainTypeQueryVo;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.io.Serializable;
/**
* 飞机型号表 Mapper 接口
*
* @author wei
* @since 2020-10-09
*/
@Repository
public interface PlainTypeMapper extends BaseMapper<PlainType> {
/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
PlainTypeQueryVo getPlainTypeById(Serializable id);
/**
* 获取分页对象
*
* @param page
* @param plainTypePageParam
* @return
*/
IPage<PlainTypeQueryVo> getPlainTypePageList(@Param("page") Page page, @Param("param") PlainTypePageParam plainTypePageParam);
}
...@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jumeirah.common.entity.Stroke; import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.param.McStrokePageParam;
import com.jumeirah.common.param.StrokePageParam; import com.jumeirah.common.param.StrokePageParam;
import com.jumeirah.common.vo.McStrokeQueryVo;
import com.jumeirah.common.vo.StrokeDetailVo; import com.jumeirah.common.vo.StrokeDetailVo;
import com.jumeirah.common.vo.StrokeQueryVo; import com.jumeirah.common.vo.StrokeQueryVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -38,4 +40,12 @@ public interface StrokeMapper extends BaseMapper<Stroke> { ...@@ -38,4 +40,12 @@ public interface StrokeMapper extends BaseMapper<Stroke> {
*/ */
IPage<StrokeQueryVo> getStrokePageList(@Param("page") Page page, @Param("param") StrokePageParam strokePageParam, @Param("userId") Long userId); IPage<StrokeQueryVo> getStrokePageList(@Param("page") Page page, @Param("param") StrokePageParam strokePageParam, @Param("userId") Long userId);
/**
* 商家端 获取行程分页对象
*
* @param page
* @param mcStrokePageParam
* @return
*/
IPage<McStrokeQueryVo> getMcStrokePageList(@Param("page") Page page, @Param("mcStrokePageParam") McStrokePageParam mcStrokePageParam);
} }
package com.jumeirah.common.param;
import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <pre>
* 行程表 分页参数对象
* </pre>
*
* @author wei
* @date 2020-09-29
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "行程表分页参数")
public class McStrokePageParam extends BasePageOrderParam {
private static final long serialVersionUID = 1L;
@ApiModelProperty("行程类型,0-单程,1-往返行程,2-货运,3-医疗")
private Integer type;
@ApiModelProperty("主键id")
private Long id;
@ApiModelProperty("开始时间")
private String startTime;
@ApiModelProperty("结束时间")
private String endTime;
@ApiModelProperty("申请人")
private String applicant;
}
package com.jumeirah.common.param; package com.jumeirah.common.param;
import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
/** /**
* <pre> * <pre>
...@@ -20,4 +20,4 @@ import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam; ...@@ -20,4 +20,4 @@ import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
@ApiModel(value = "商家分页参数") @ApiModel(value = "商家分页参数")
public class MerchantUserPageParam extends BasePageOrderParam{ public class MerchantUserPageParam extends BasePageOrderParam{
private static final long serialVersionUID=1L; private static final long serialVersionUID=1L;
} }
package com.jumeirah.common.param;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
/**
* <pre>
* 飞机型号表 分页参数对象
* </pre>
*
* @author wei
* @date 2020-10-09
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "飞机型号表分页参数")
public class PlainTypePageParam extends BasePageOrderParam {
private static final long serialVersionUID = 1L;
}
...@@ -22,7 +22,7 @@ import lombok.experimental.Accessors; ...@@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
public class StrokePageParam extends BasePageOrderParam { public class StrokePageParam extends BasePageOrderParam {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("行程状态,-1=全部, 0-审核中,1-进行中,2-已完成")//99-取消 @ApiModelProperty(value = "行程状态,-1=全部, 0-审核中,1-进行中,2-已完成", required = true)//99-取消
private Integer status; private Integer status;
} }
package com.jumeirah.common.param.app;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <pre>
* 行程付款信息填写
* </pre>
*
* @author wei
* @date 2020-09-29
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "行程付款信息填写")
public class StrokePaymentInfoParam implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull(message = "id不能为空")
@ApiModelProperty("主键ID")
private Long id;
@NotNull(message = "用户充值金额不能为空")
@ApiModelProperty("用户充值金额")
private BigDecimal userRechargeMoney;
@NotBlank(message = "用户充值账户名不能为空")
@ApiModelProperty("用户充值账户名")
private String userRechargeName;
@NotBlank(message = "用户充值卡号不能为空")
@ApiModelProperty("用户充值卡号")
private String userRechargeBankNumber;
@NotBlank(message = "用户充值截图证据, 传入数组不能为空")
@ApiModelProperty("用户充值截图证据, 传入数组")
private String userRechargeCredentialsUrl;
}
...@@ -4,6 +4,7 @@ import com.jumeirah.common.entity.MerchantUser; ...@@ -4,6 +4,7 @@ import com.jumeirah.common.entity.MerchantUser;
import com.jumeirah.common.param.LoginParam; import com.jumeirah.common.param.LoginParam;
import com.jumeirah.common.param.MerchantUserPageParam; import com.jumeirah.common.param.MerchantUserPageParam;
import com.jumeirah.common.vo.LoginSysUserTokenVo; import com.jumeirah.common.vo.LoginSysUserTokenVo;
import com.jumeirah.common.vo.MerchantUserQueryForAppVo;
import com.jumeirah.common.vo.MerchantUserQueryVo; import com.jumeirah.common.vo.MerchantUserQueryVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult; import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.service.BaseService; import io.geekidea.springbootplus.framework.common.service.BaseService;
...@@ -75,4 +76,15 @@ public interface MerchantUserService extends BaseService<MerchantUser> { ...@@ -75,4 +76,15 @@ public interface MerchantUserService extends BaseService<MerchantUser> {
*/ */
Paging<MerchantUserQueryVo> getMerchantUserPageList(MerchantUserPageParam merchantUserPageParam) throws Exception; Paging<MerchantUserQueryVo> getMerchantUserPageList(MerchantUserPageParam merchantUserPageParam) throws Exception;
/**
* 获取分页对象
*
* @param merchantUserPageParam
* @return
* @throws Exception
*/
Paging<MerchantUserQueryForAppVo> getMerchantUserPageListForApp(MerchantUserPageParam merchantUserPageParam) throws Exception;
} }
package com.jumeirah.common.service;
import com.jumeirah.common.entity.PlainType;
import com.jumeirah.common.param.PlainTypePageParam;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import com.jumeirah.common.vo.PlainTypeQueryVo;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import java.util.List;
/**
* 飞机型号表 服务类
*
* @author wei
* @since 2020-10-09
*/
public interface PlainTypeService extends BaseService<PlainType> {
/**
* 保存
*
* @param plainType
* @return
* @throws Exception
*/
boolean savePlainType(PlainType plainType) throws Exception;
/**
* 修改
*
* @param plainType
* @return
* @throws Exception
*/
boolean updatePlainType(PlainType plainType) throws Exception;
/**
* 删除
*
* @param id
* @return
* @throws Exception
*/
boolean deletePlainType(Long id) throws Exception;
/**
* 根据ID获取查询对象
*
* @param id
* @return
* @throws Exception
*/
PlainTypeQueryVo getPlainTypeById(Long id) throws Exception;
/**
* 获取分页对象
*
* @param plainTypePageParam
* @return
* @throws Exception
*/
Paging<PlainTypeQueryVo> getPlainTypePageList(PlainTypePageParam plainTypePageParam) throws Exception;
/**
* 获取所有飞机类型
* @return
*/
List<PlainType> getAllMap();
}
package com.jumeirah.common.service; package com.jumeirah.common.service;
import com.jumeirah.common.entity.Stroke; import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.param.McStrokePageParam;
import com.jumeirah.common.param.StrokePageParam; import com.jumeirah.common.param.StrokePageParam;
import com.jumeirah.common.vo.McStrokeQueryVo;
import com.jumeirah.common.vo.StrokeDetailVo; import com.jumeirah.common.vo.StrokeDetailVo;
import com.jumeirah.common.vo.StrokeQueryVo; import com.jumeirah.common.vo.StrokeQueryVo;
import io.geekidea.springbootplus.framework.common.service.BaseService; import io.geekidea.springbootplus.framework.common.service.BaseService;
...@@ -42,6 +44,10 @@ public interface StrokeService extends BaseService<Stroke> { ...@@ -42,6 +44,10 @@ public interface StrokeService extends BaseService<Stroke> {
*/ */
boolean deleteStroke(Long id) throws Exception; boolean deleteStroke(Long id) throws Exception;
boolean cancelStroke(Long id) throws Exception;
/** /**
* 根据ID获取查询对象 * 根据ID获取查询对象
* *
...@@ -60,4 +66,10 @@ public interface StrokeService extends BaseService<Stroke> { ...@@ -60,4 +66,10 @@ public interface StrokeService extends BaseService<Stroke> {
*/ */
Paging<StrokeQueryVo> getStrokePageList(StrokePageParam strokePageParam) throws Exception; Paging<StrokeQueryVo> getStrokePageList(StrokePageParam strokePageParam) throws Exception;
/**
* 商家端,分页获取行程接口
* @param mcStrokePageParam
* @return
*/
Paging<McStrokeQueryVo> getMcStrokePageList(McStrokePageParam mcStrokePageParam);
} }
...@@ -15,6 +15,7 @@ import com.jumeirah.common.service.MerchantRolePermissionService; ...@@ -15,6 +15,7 @@ import com.jumeirah.common.service.MerchantRolePermissionService;
import com.jumeirah.common.service.MerchantRoleService; import com.jumeirah.common.service.MerchantRoleService;
import com.jumeirah.common.service.MerchantUserService; import com.jumeirah.common.service.MerchantUserService;
import com.jumeirah.common.vo.LoginSysUserTokenVo; import com.jumeirah.common.vo.LoginSysUserTokenVo;
import com.jumeirah.common.vo.MerchantUserQueryForAppVo;
import com.jumeirah.common.vo.MerchantUserQueryVo; import com.jumeirah.common.vo.MerchantUserQueryVo;
import io.geekidea.springbootplus.config.properties.JwtProperties; import io.geekidea.springbootplus.config.properties.JwtProperties;
import io.geekidea.springbootplus.config.properties.SpringBootPlusProperties; import io.geekidea.springbootplus.config.properties.SpringBootPlusProperties;
...@@ -218,4 +219,11 @@ public class MerchantUserServiceImpl extends BaseServiceImpl<MerchantUserMapper, ...@@ -218,4 +219,11 @@ public class MerchantUserServiceImpl extends BaseServiceImpl<MerchantUserMapper,
return new Paging<MerchantUserQueryVo>(iPage); return new Paging<MerchantUserQueryVo>(iPage);
} }
@Override
public Paging<MerchantUserQueryForAppVo> getMerchantUserPageListForApp(MerchantUserPageParam merchantUserPageParam) throws Exception {
Page<MerchantUserQueryForAppVo> page = new PageInfo<>(merchantUserPageParam, OrderItem.desc(getLambdaColumn(MerchantUser::getCreateTime)));
IPage<MerchantUserQueryForAppVo> iPage = merchantUserMapper.getMerchantUserForAppPageList(page, merchantUserPageParam);
return new Paging<MerchantUserQueryForAppVo>(iPage);
}
} }
package com.jumeirah.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jumeirah.common.entity.PlainType;
import com.jumeirah.common.mapper.PlainTypeMapper;
import com.jumeirah.common.service.PlainTypeService;
import com.jumeirah.common.param.PlainTypePageParam;
import com.jumeirah.common.vo.PlainTypeQueryVo;
import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.core.pagination.PageInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* 飞机型号表 服务实现类
*
* @author wei
* @since 2020-10-09
*/
@Slf4j
@Service
public class PlainTypeServiceImpl extends BaseServiceImpl<PlainTypeMapper, PlainType> implements PlainTypeService {
@Autowired
private PlainTypeMapper plainTypeMapper;
@Transactional(rollbackFor = Exception.class)
@Override
public boolean savePlainType(PlainType plainType) throws Exception {
return super.save(plainType);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean updatePlainType(PlainType plainType) throws Exception {
return super.updateById(plainType);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean deletePlainType(Long id) throws Exception {
return super.removeById(id);
}
@Override
public PlainTypeQueryVo getPlainTypeById(Long id) throws Exception {
return plainTypeMapper.getPlainTypeById(id);
}
@Override
public Paging<PlainTypeQueryVo> getPlainTypePageList(PlainTypePageParam plainTypePageParam) throws Exception {
Page<PlainTypeQueryVo> page = new PageInfo<>(plainTypePageParam, OrderItem.desc(getLambdaColumn(PlainType::getCreateTime)));
IPage<PlainTypeQueryVo> iPage = plainTypeMapper.getPlainTypePageList(page, plainTypePageParam);
return new Paging<PlainTypeQueryVo>(iPage);
}
@Override
public List<PlainType> getAllMap() {
return this.list(new QueryWrapper<PlainType>().lambda()
.orderByAsc(PlainType::getSeriesType, PlainType::getCreateTime)
);
}
}
...@@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,9 +4,12 @@ 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 com.jumeirah.common.entity.Stroke; import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.enums.StrokeStatusEnum;
import com.jumeirah.common.mapper.StrokeMapper; import com.jumeirah.common.mapper.StrokeMapper;
import com.jumeirah.common.param.McStrokePageParam;
import com.jumeirah.common.param.StrokePageParam; import com.jumeirah.common.param.StrokePageParam;
import com.jumeirah.common.service.StrokeService; import com.jumeirah.common.service.StrokeService;
import com.jumeirah.common.vo.McStrokeQueryVo;
import com.jumeirah.common.vo.StrokeDetailVo; import com.jumeirah.common.vo.StrokeDetailVo;
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;
...@@ -58,6 +61,20 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp ...@@ -58,6 +61,20 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp
} }
@Override @Override
public boolean cancelStroke(Long id) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
Stroke byId = super.getById(id);
// 判断该记录是否属于此用户
if (!byId.getUserId().equals(jwtToken.getUserId())) {
return false;
}
Stroke stroke = new Stroke();
stroke.setId(id);
stroke.setStatus(StrokeStatusEnum.CANCEL.getCode());
return super.updateById(stroke);
}
@Override
public StrokeDetailVo getStrokeById(Long id) throws Exception { public StrokeDetailVo getStrokeById(Long id) throws Exception {
return strokeMapper.getStrokeById(id); return strokeMapper.getStrokeById(id);
} }
...@@ -73,4 +90,11 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp ...@@ -73,4 +90,11 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp
return new Paging<StrokeQueryVo>(iPage); return new Paging<StrokeQueryVo>(iPage);
} }
@Override
public Paging<McStrokeQueryVo> getMcStrokePageList(McStrokePageParam mcStrokePageParam) {
Page<StrokeQueryVo> page = new PageInfo<>(mcStrokePageParam, OrderItem.asc(getLambdaColumn(Stroke::getCreateTime)));
IPage<McStrokeQueryVo> mcStrokePageList = strokeMapper.getMcStrokePageList(page, mcStrokePageParam);
return new Paging<McStrokeQueryVo>(mcStrokePageList);
}
} }
package com.jumeirah.common.vo;
import com.jumeirah.common.entity.Stroke;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <pre>
* 行程表 查询结果对象
* </pre>
*
* @author wei
* @date 2020-09-29
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "StrokeQueryVo对象")
public class McStrokeQueryVo extends Stroke implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("申请人")
private String applicant;
@ApiModelProperty("手机号")
private String phoneNumber;
}
package com.jumeirah.common.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <pre>
* 商家 查询结果对象
* </pre>
*
* @author wei
* @date 2020-09-28
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "MerchantUserQueryForAppVo对象")
public class MerchantUserQueryForAppVo implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
private Long id;
@ApiModelProperty("航空公司名称")
private String airlineName;
@ApiModelProperty("在列表展示的图片url")
private String imageListUrl;
@ApiModelProperty("公司介绍图片url")
private String imageCompanyIntroductionUrl;
@ApiModelProperty("团队介绍图片url")
private String imageTeamIntroductionUrl;
@ApiModelProperty("优势图片url")
private String imageAdvantageUrl;
@ApiModelProperty("公司介绍文字")
private String textCompanyIntroduction;
@ApiModelProperty("团队介绍文字")
private String textTeamIntroduction;
@ApiModelProperty("优势介绍文字")
private String textAdvantage;
}
\ No newline at end of file
package com.jumeirah.common.vo; package com.jumeirah.common.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.sql.Timestamp;
/** /**
* <pre> * <pre>
...@@ -18,57 +19,82 @@ import java.util.Date; ...@@ -18,57 +19,82 @@ import java.util.Date;
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@ApiModel(value = "MerchantUserQueryVo对象") @ApiModel(value = "MerchantUserQueryVo对象")
public class MerchantUserQueryVo implements Serializable{ public class MerchantUserQueryVo implements Serializable {
private static final long serialVersionUID=1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("主键") @ApiModelProperty("主键")
private Long id; private Long id;
@ApiModelProperty("用户名") @ApiModelProperty("用户名")
private String username; private String username;
@ApiModelProperty("昵称") @ApiModelProperty("昵称")
private String nickname; private String nickname;
@ApiModelProperty("航空公司名称")
private String airlineName;
@ApiModelProperty("密码") @ApiModelProperty("密码")
private String password; private String password;
@ApiModelProperty("盐值") @ApiModelProperty("盐值")
private String salt; private String salt;
@ApiModelProperty("手机号码") @ApiModelProperty("手机号码")
private String phone; private String phone;
@ApiModelProperty("手机区号") @ApiModelProperty("手机区号")
private String phoneArea; private String phoneArea;
@ApiModelProperty("性别,0:女,1:男,默认1") @ApiModelProperty("性别,0:女,1:男,默认1")
private Integer gender; private Integer gender;
@ApiModelProperty("头像") @ApiModelProperty("头像")
private String head; private String head;
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
@ApiModelProperty("状态,0:禁用,1:启用,2:锁定") @ApiModelProperty("状态,0:禁用,1:启用,2:锁定")
private Integer state; private Integer state;
@ApiModelProperty("部门id") @ApiModelProperty("部门id")
private Long departmentId; private Long departmentId;
@ApiModelProperty("角色id") @ApiModelProperty("角色id")
private Long roleId; private Long roleId;
@ApiModelProperty("逻辑删除,0:未删除,1:已删除") @ApiModelProperty("逻辑删除,0:未删除,1:已删除")
private Integer deleted; private Integer deleted;
@ApiModelProperty("版本") @ApiModelProperty("版本")
private Integer version; private Integer version;
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
private Date createTime; private Timestamp createTime;
@ApiModelProperty("修改时间") @ApiModelProperty("修改时间")
private Date updateTime; private Timestamp updateTime;
@ApiModelProperty("在列表展示的图片url")
private String imageListUrl;
@ApiModelProperty("公司介绍图片url")
private String imageCompanyIntroductionUrl;
@ApiModelProperty("团队介绍图片url")
private String imageTeamIntroductionUrl;
@ApiModelProperty("优势图片url")
private String imageAdvantageUrl;
@ApiModelProperty("公司介绍文字")
private String textCompanyIntroduction;
@ApiModelProperty("团队介绍文字")
private String textTeamIntroduction;
@ApiModelProperty("优势介绍文字")
private String textAdvantage;
} }
\ No newline at end of file
package com.jumeirah.common.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* <pre>
* 飞机型号表 查询结果对象
* </pre>
*
* @author wei
* @date 2020-10-09
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "PlainTypeQueryVo对象")
public class PlainTypeQueryVo implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键ID")
private Long id;
@ApiModelProperty("系列类型")
private Integer seriesType;
@ApiModelProperty("飞机名称")
private String name;
@ApiModelProperty("飞机图片地址")
private String imgUrl;
@ApiModelProperty("状态,0-正常,1-禁用,99-删除")
private Integer status;
@ApiModelProperty("创建时间(时间戳)")
private Long createTime;
@ApiModelProperty("更新时间(时间戳)")
private Long updateTime;
}
...@@ -147,4 +147,12 @@ public class StrokeDetailVo implements Serializable { ...@@ -147,4 +147,12 @@ public class StrokeDetailVo implements Serializable {
@ApiModelProperty("商家名称") @ApiModelProperty("商家名称")
private String merchantName; private String merchantName;
@NotNull(message = "付款状态不能为空")
@ApiModelProperty("付款状态,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款")
private Integer paymentStatus;
@NotNull(message = "审核状态不能为空")
@ApiModelProperty("审核状态,0审核中,1审核通过,2审核未通过")
private Integer auditStatus;
} }
\ No newline at end of file
...@@ -28,6 +28,9 @@ public class StrokeQueryVo implements Serializable { ...@@ -28,6 +28,9 @@ public class StrokeQueryVo implements Serializable {
@ApiModelProperty("主键ID") @ApiModelProperty("主键ID")
private Long id; private Long id;
@ApiModelProperty("商家ID")
private Long merchantId;
@ApiModelProperty("出发城市名称") @ApiModelProperty("出发城市名称")
private String cityOutsetName; private String cityOutsetName;
...@@ -74,4 +77,24 @@ public class StrokeQueryVo implements Serializable { ...@@ -74,4 +77,24 @@ public class StrokeQueryVo implements Serializable {
@NotBlank(message = "返程到达机场名称不能为空") @NotBlank(message = "返程到达机场名称不能为空")
@ApiModelProperty("返程到达机场名称") @ApiModelProperty("返程到达机场名称")
private String backArriveAirportName; private String backArriveAirportName;
@NotNull(message = "付款状态不能为空")
@ApiModelProperty("付款状态,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款")
private Integer paymentStatus;
@NotNull(message = "审核状态不能为空")
@ApiModelProperty("审核状态,0审核中,1审核通过,2审核未通过")
private Integer auditStatus;
@NotBlank(message = "商家开户银行不能为空")
@ApiModelProperty("商家开户银行")
private String rechargeBank;
@NotBlank(message = "商家开户名称不能为空")
@ApiModelProperty("商家开户名称")
private String rechargeName;
@NotBlank(message = "商家银行卡号")
@ApiModelProperty("商家银行卡号")
private String rechargeBankNumber;
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jumeirah.common.mapper.PlainTypeMapper">
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, series_type, name, img_url, status, create_time, update_time
</sql>
<select id="getPlainTypeById" resultType="com.jumeirah.common.vo.PlainTypeQueryVo">
select
<include refid="Base_Column_List"/>
from plain_type where id = #{id}
</select>
<select id="getPlainTypePageList" parameterType="com.jumeirah.common.param.PlainTypePageParam"
resultType="com.jumeirah.common.vo.PlainTypeQueryVo">
select
<include refid="Base_Column_List"/>
from plain_type
</select>
</mapper>
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<!-- 分页列表查询结果列 --> <!-- 分页列表查询结果列 -->
<sql id="Page_Column_List"> <sql id="Page_Column_List">
s.id, s.id,
mu.id as merchantId,
city_outset_id, city_outset_id,
city_outset_name, city_outset_name,
city_arrive_id, city_arrive_id,
...@@ -17,15 +18,17 @@ ...@@ -17,15 +18,17 @@
STATUS, STATUS,
money, money,
user_id, user_id,
mu.username AS merchantName mu.username AS merchantName,
,outset_airport_name,arrive_airport_name,arrive_plain_type_id,back_outset_airport_name,back_arrive_airport_name outset_airport_name,arrive_airport_name,arrive_plain_type_id,back_outset_airport_name,back_arrive_airport_name,
payment_status,audit_status,recharge_bank,recharge_name,recharge_bank_number
</sql> </sql>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, city_outset_id, deleted, city_outset_name, city_arrive_id, city_arrive_name, people_mun, plain_type_id, outset_time, return_time, type, status, create_time, update_time, goods_name, goods_size, goods_weight, disease_name, instruments, medical_persons, remarks, money, user_id id, city_outset_id, deleted, city_outset_name, city_arrive_id, city_arrive_name, people_mun, plain_type_id, outset_time, return_time, type, status, create_time, update_time, goods_name, goods_size, goods_weight, disease_name, instruments, medical_persons, remarks, money, user_id
,outset_airport_name,arrive_airport_name,arrive_plain_type_id,back_outset_airport_name,back_arrive_airport_name ,outset_airport_name,arrive_airport_name,arrive_plain_type_id,back_outset_airport_name,back_arrive_airport_name,payment_status,audit_status, user_recharge_money,user_recharge_bank,user_recharge_name,
user_recharge_bank_number,user_recharge_credentials_url,recharge_bank,recharge_name,recharge_bank_number
</sql> </sql>
<select id="getStrokeById" resultType="com.jumeirah.common.vo.StrokeDetailVo"> <select id="getStrokeById" resultType="com.jumeirah.common.vo.StrokeDetailVo">
...@@ -50,5 +53,37 @@ ...@@ -50,5 +53,37 @@
</if> </if>
</where> </where>
</select> </select>
<select id="getMcStrokePageList" parameterType="com.jumeirah.common.param.McStrokePageParam"
resultType="com.jumeirah.common.vo.McStrokeQueryVo">
SELECT
s.*,
CONCAT( au.surname, au.`name` ) AS applicant,
au.phone AS phone_number
FROM
stroke s
LEFT JOIN app_user au ON au.id = s.user_id
<where>
<if test="mcStrokePageParam.type !=null">
AND s.type = #{mcStrokePageParam.type}
</if>
<if test="mcStrokePageParam.id !=null">
AND s.id = #{mcStrokePageParam.id}
</if>
<if test="mcStrokePageParam.startTime !=null and mcStrokePageParam.startTime != ''">
AND s.create_time &gt;= #{mcStrokePageParam.startTime}
</if>
<if test="mcStrokePageParam.endTime !=null and mcStrokePageParam.endTime != ''">
AND s.create_time &lt;= #{mcStrokePageParam.endTime}
</if>
<if test="mcStrokePageParam.applicant !=null and mcStrokePageParam.applicant != ''">
AND CONCAT( au.surname, au.`name` ) LIKE CONCAT('%',#{mcStrokePageParam.applicant},'%')
</if>
</where>
WHERE
s.type = 2
AND s.id = 1
AND (s.create_time BETWEEN '2020-10-07 15:32:30' AND '2020-10-12 15:32:30')
AND CONCAT( au.surname, au.`name` ) LIKE '%姓名'
</select>
</mapper> </mapper>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, username, nickname, password, salt, phone, phone_area, gender, head, remark, state, department_id, role_id, deleted, version, create_time, update_time id, username, nickname, password, salt, phone, phone_area, gender, head, remark, state, department_id, role_id, deleted, version, create_time, update_time, recharge_bank, recharge_name, recharge_bank_number, image_list_url, image_company_introduction_url, image_team_introduction_url, image_advantage_url, text_company_introduction, text_team_introduction, text_advantage,airline_name
</sql> </sql>
<select id="getMerchantUserById" resultType="com.jumeirah.common.vo.MerchantUserQueryVo"> <select id="getMerchantUserById" resultType="com.jumeirah.common.vo.MerchantUserQueryVo">
...@@ -20,4 +20,13 @@ ...@@ -20,4 +20,13 @@
from merchant_user from merchant_user
</select> </select>
<select id="getMerchantUserForAppPageList" parameterType="com.jumeirah.common.param.MerchantUserPageParam"
resultType="com.jumeirah.common.vo.MerchantUserQueryForAppVo">
select
<include refid="Base_Column_List"/>
from merchant_user
</select>
</mapper> </mapper>
...@@ -22,10 +22,10 @@ spring: ...@@ -22,10 +22,10 @@ spring:
redis: redis:
database: 0 database: 0
host: localhost host: localhost
password: password: 123456
port: 6379 port: 6379
# 打印SQL语句和结果集,本地开发环境可开启,线上注释掉 # 打印SQL语句和结果集,本地开发环境可开启,线上注释掉
mybatis-plus: mybatis-plus:
configuration: configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
...@@ -75,7 +75,7 @@ spring-boot-plus: ...@@ -75,7 +75,7 @@ spring-boot-plus:
order: 1 order: 1
async: true async: true
xss: xss:
enable: true enable: false
url-patterns: /* url-patterns: /*
order: 2 order: 2
async: true async: true
......
...@@ -25,6 +25,8 @@ import io.geekidea.springbootplus.generator.constant.GeneratorConstant; ...@@ -25,6 +25,8 @@ import io.geekidea.springbootplus.generator.constant.GeneratorConstant;
import io.geekidea.springbootplus.generator.properties.GeneratorProperties; import io.geekidea.springbootplus.generator.properties.GeneratorProperties;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Scanner;
/** /**
* spring-boot-plus代码生成器入口类 * spring-boot-plus代码生成器入口类
* *
...@@ -40,7 +42,12 @@ public class SpringBootPlusGenerator { ...@@ -40,7 +42,12 @@ public class SpringBootPlusGenerator {
* @param args * @param args
*/ */
public static void main(String[] args) { public static void main(String[] args) {
getCode("123");
Scanner sc = new Scanner(System.in);
System.out.println("请输入表名称:");
String name = sc.nextLine();
getCode(name);
} }
private static void getCode(String tableName) { private static void getCode(String tableName) {
...@@ -51,7 +58,7 @@ public class SpringBootPlusGenerator { ...@@ -51,7 +58,7 @@ public class SpringBootPlusGenerator {
.setMavenModuleName("common") .setMavenModuleName("common")
.setParentPackage("com.jumeirah.common") .setParentPackage("com.jumeirah.common")
// .setModuleName("api-app") // .setModuleName("api-app")
.setAuthor("wei") .setAuthor("xxx") // 设置作者名称
.setFileOverride(true); .setFileOverride(true);
// 设置表信息 // 设置表信息
......
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