Commit f4be0377 by zhangjw

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

parents 5e21d26a 5924ca95
package com.jumeirah.api.app.controller;
import com.jumeirah.api.app.entity.param.DeviceTokenParam;
import com.jumeirah.api.app.service.AppUserApiService;
import com.jumeirah.common.entity.AppUser;
import com.jumeirah.common.param.app.AppSmsRegisterParam;
import com.jumeirah.common.param.app.AppUserInfoParam;
import com.jumeirah.common.param.app.AppUserPhoneUpdateParam;
......@@ -11,9 +13,11 @@ 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.geekidea.springbootplus.framework.shiro.jwt.JwtToken;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -42,6 +46,46 @@ public class AppUserController extends BaseController {
private AppUserApiService appUserApiService;
/**
* ios-添加或修改推送token
*/
@PostMapping("/iosDeviceToken")
@OperationLog(name = "ios-添加或修改推送token", type = OperationLogType.ADD)
@ApiOperation(value = "ios-添加或修改推送token", notes = "添加和修改都调用此接口", response = ApiResult.class)
public ApiResult<Boolean> addIosAppDeviceToken(@RequestBody DeviceTokenParam deviceToken) throws Exception {
AppUser appUser = new AppUser();
appUser.setDeviceToken(deviceToken.getDeviceToken());
appUser.setDeviceType(2);
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
appUser.setId(jwtToken.getUserId());
boolean flag = appUserService.updateAppUser(appUser);
return ApiResult.result(flag);
}
/**
* android-添加或修改推送token
*/
@PostMapping("/androidDeviceToken")
@OperationLog(name = "android-添加或修改推送token", type = OperationLogType.ADD)
@ApiOperation(value = "android-添加或修改推送token", notes = "添加和修改都调用此接口", response = ApiResult.class)
public ApiResult<Boolean> addAppDeviceToken(@RequestBody DeviceTokenParam deviceToken) throws Exception {
AppUser appUser = new AppUser();
appUser.setDeviceToken(deviceToken.getDeviceToken());
appUser.setDeviceType(1);
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
appUser.setId(jwtToken.getUserId());
boolean flag = appUserService.updateAppUser(appUser);
return ApiResult.result(flag);
}
/**
* 补充或修改APP用户信息
*/
@PostMapping("/updateAppUserInfo")
......
package com.jumeirah.api.app.controller;
import com.jumeirah.common.entity.Feedback;
import com.jumeirah.common.service.FeedbackService;
import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.controller.BaseController;
import io.geekidea.springbootplus.framework.core.validator.groups.Add;
import io.geekidea.springbootplus.framework.log.annotation.OperationLog;
import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
import io.geekidea.springbootplus.framework.shiro.jwt.JwtToken;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
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 giao
* @since 2020-10-26
*/
@Slf4j
@RestController
@RequestMapping("/app/feedback")
@Api(value = "意见反馈API", tags = {"意见反馈"})
public class FeedbackController extends BaseController {
@Autowired
private FeedbackService feedbackService;
/**
* 添加意见反馈
*/
@PostMapping("/add")
@OperationLog(name = "添加意见反馈", type = OperationLogType.ADD)
@ApiOperation(value = "添加意见反馈")
public ApiResult<Boolean> addFeedback(@Validated(Add.class) @RequestBody Feedback feedback) throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
feedback.setUserId(jwtToken.getUserId());
boolean flag = feedbackService.saveFeedback(feedback);
return ApiResult.result(flag);
}
//
// /**
// * 修改意见反馈
// */
// @PostMapping("/update")
// @OperationLog(name = "修改意见反馈", type = OperationLogType.UPDATE)
// @ApiOperation(value = "修改意见反馈")
// public ApiResult<Boolean> updateFeedback(@Validated(Update.class) @RequestBody Feedback feedback) throws Exception {
// boolean flag = feedbackService.updateFeedback(feedback);
// return ApiResult.result(flag);
// }
//
// /**
// * 删除意见反馈
// */
// @PostMapping("/delete/{id}")
// @OperationLog(name = "删除意见反馈", type = OperationLogType.DELETE)
// @ApiOperation(value = "删除意见反馈")
// public ApiResult<Boolean> deleteFeedback(@PathVariable("id") Long id) throws Exception {
// boolean flag = feedbackService.deleteFeedback(id);
// return ApiResult.result(flag);
// }
//
// /**
// * 获取意见反馈详情
// */
// @GetMapping("/info/{id}")
// @OperationLog(name = "意见反馈详情", type = OperationLogType.INFO)
// @ApiOperation(value = "意见反馈详情")
// public ApiResult<FeedbackQueryVo> getFeedback(@PathVariable("id") Long id) throws Exception {
// FeedbackQueryVo feedbackQueryVo = feedbackService.getFeedbackById(id);
// return ApiResult.ok(feedbackQueryVo);
// }
//
// /**
// * 意见反馈分页列表
// */
// @PostMapping("/getPageList")
// @OperationLog(name = "意见反馈分页列表", type = OperationLogType.PAGE)
// @ApiOperation(value = "意见反馈分页列表")
// public ApiResult<Paging<FeedbackQueryVo>> getFeedbackPageList(@Validated @RequestBody FeedbackPageParam feedbackPageParam) throws Exception {
// Paging<FeedbackQueryVo> paging = feedbackService.getFeedbackPageList(feedbackPageParam);
// return ApiResult.ok(paging);
// }
}
package com.jumeirah.api.app.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jumeirah.common.entity.VersionControl;
import com.jumeirah.common.service.VersionControlService;
import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.controller.BaseController;
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.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* App版本控制 控制器
* <p>
* 仅查询最新创建的一条版本数据返回给App
*
* @author giao
* @since 2020-10-26
*/
@Slf4j
@RestController
@RequestMapping("/app/versionControl")
@Api(value = "App版本控制API", tags = {"App版本控制"})
public class VersionControlController extends BaseController {
@Autowired
private VersionControlService versionControlService;
// /**
// * 添加App版本控制
// */
// @PostMapping("/add")
// @OperationLog(name = "添加App版本控制", type = OperationLogType.ADD)
// @ApiOperation(value = "添加App版本控制")
// public ApiResult<Boolean> addVersionControl(@Validated(Add.class) @RequestBody VersionControl versionControl) throws Exception {
// boolean flag = versionControlService.saveVersionControl(versionControl);
// return ApiResult.result(flag);
// }
//
// /**
// * 修改App版本控制
// */
// @PostMapping("/update")
// @OperationLog(name = "修改App版本控制", type = OperationLogType.UPDATE)
// @ApiOperation(value = "修改App版本控制")
// public ApiResult<Boolean> updateVersionControl(@Validated(Update.class) @RequestBody VersionControl versionControl) throws Exception {
// boolean flag = versionControlService.updateVersionControl(versionControl);
// return ApiResult.result(flag);
// }
//
// /**
// * 删除App版本控制
// */
// @PostMapping("/delete/{id}")
// @OperationLog(name = "删除App版本控制", type = OperationLogType.DELETE)
// @ApiOperation(value = "删除App版本控制")
// public ApiResult<Boolean> deleteVersionControl(@PathVariable("id") Long id) throws Exception {
// boolean flag = versionControlService.deleteVersionControl(id);
// return ApiResult.result(flag);
// }
//
// /**
// * 获取App版本控制详情
// */
// @GetMapping("/info/{id}")
// @OperationLog(name = "App版本控制详情", type = OperationLogType.INFO)
// @ApiOperation(value = "App版本控制详情")
// public ApiResult<VersionControlQueryVo> getVersionControl(@PathVariable("id") Long id) throws Exception {
// VersionControlQueryVo versionControlQueryVo = versionControlService.getVersionControlById(id);
// return ApiResult.ok(versionControlQueryVo);
// }
//
// /**
// * App版本控制分页列表
// */
// @PostMapping("/getPageList")
// @OperationLog(name = "App版本控制分页列表", type = OperationLogType.PAGE)
// @ApiOperation(value = "App版本控制分页列表")
// public ApiResult<Paging<VersionControlQueryVo>> getVersionControlPageList(@Validated @RequestBody VersionControlPageParam versionControlPageParam) throws Exception {
// Paging<VersionControlQueryVo> paging = versionControlService.getVersionControlPageList(versionControlPageParam);
// return ApiResult.ok(paging);
// }
/**
* 获取最新一条版本记录
*/
@GetMapping("/lastOne/{type}")
// @OperationLog(name = "获取最新一条版本记录", type = OperationLogType.INFO)
@ApiOperation(value = "获取最新一条版本记录")
public ApiResult<VersionControl> lastOne(@PathVariable Integer type) throws Exception {
VersionControl versionControlQueryVo = versionControlService.getOne(
new QueryWrapper<VersionControl>().lambda()
.eq(VersionControl::getDeviceType, type)
.orderByDesc(VersionControl::getCreateTime).last("limit 1")
);
return ApiResult.ok(versionControlQueryVo);
}
}
package com.jumeirah.api.app.entity.param;
import lombok.Data;
import java.io.Serializable;
@Data
public class DeviceTokenParam implements Serializable {
private String deviceToken;
}
package com.jumeirah.api.merchant.controller;
import com.jumeirah.api.merchant.entity.param.McAppUserParam;
import com.jumeirah.common.entity.AppUser;
import com.jumeirah.common.service.AppUserService;
import com.jumeirah.common.vo.AppUserQueryVo;
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.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;
import java.util.List;
/**
* APP用户 控制器
*
* @author wei
* @since 2020-09-23
*/
@Slf4j
@RestController
@Module("api-app")
@Api(value = "app用户API", tags = {"APP用户相关"})
@RequestMapping("/merchant/appUser/")
public class McAppUserController extends BaseController {
@Autowired
private AppUserService appUserService;
/**
* APP用户分页列表
*/
@PostMapping("/getList")
@OperationLog(name = "APP用户分页列表", type = OperationLogType.PAGE)
@ApiOperation(value = "APP用户分页列表", response = AppUserQueryVo.class)
public ApiResult<List<AppUser>> getAppUserPageList(@Validated @RequestBody McAppUserParam mcAppUserParam) throws Exception {
List<AppUser> appUsers = appUserService.listByIds(mcAppUserParam.getIds());
return ApiResult.ok(appUsers);
}
}
package com.jumeirah.api.merchant.controller.management;
import com.jumeirah.common.param.McStrokePaymentPageParam;
import com.jumeirah.common.service.StrokeService;
import com.jumeirah.common.vo.McStrokePaymentQueryVo;
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.apache.shiro.authz.annotation.RequiresPermissions;
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("/merchant/payment")
@Api(value = "财务管理API", tags = {"财务管理"})
public class McStrokePaymentController extends BaseController {
@Autowired
private StrokeService strokeService;
/**
* 收款记录
*/
@PostMapping("/pageList")
@OperationLog(name = "收款记录", type = OperationLogType.PAGE)
@ApiOperation(value = "收款记录")
@RequiresPermissions("merchant:order:view")
public ApiResult<Paging<McStrokePaymentQueryVo>> getPaymentPageList(@Validated @RequestBody McStrokePaymentPageParam mcStrokePaymentPageParam) throws Exception {
Paging<McStrokePaymentQueryVo> paging = strokeService.getPaymentPageList(mcStrokePaymentPageParam);
return ApiResult.ok(paging);
}
}
package com.jumeirah.api.merchant.entity.param;
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.NotNull;
import java.util.List;
/**
* 商家飞机表
*
* @author xxx
* @since 2020-10-19
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "McAppUser对象")
public class McAppUserParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "app用户ids不能为空")
@ApiModelProperty("app用户ids")
private List<Long> ids;
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import io.swagger.annotations.ApiModel;
......@@ -57,6 +58,7 @@ public class AppUser extends BaseEntity {
@NotBlank(message = "密码不能为空")
@ApiModelProperty("密码")
@JsonIgnore
private String password;
@ApiModelProperty("盐值")
......@@ -71,6 +73,9 @@ public class AppUser extends BaseEntity {
@ApiModelProperty("性别,0:女,1:男,默认1")
private Integer gender;
@ApiModelProperty("设备类型,1:安卓,2:ios")
private Integer deviceType;
@ApiModelProperty("头像")
private String head;
......
package com.jumeirah.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
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.NotNull;
import java.util.Date;
/**
* 意见反馈
*
* @author giao
* @since 2020-10-26
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Feedback对象")
public class Feedback extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "不能为空")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private String content;
private Long userId;
@ApiModelProperty("Create Time")
private Date createTime;
@ApiModelProperty("Update Time")
private Date updateTime;
}
package com.jumeirah.common.entity;
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.NotNull;
import java.sql.Timestamp;
/**
* App版本控制
*
* @author giao
* @since 2020-10-26
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "VersionControl对象")
public class VersionControl extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "id不能为空", groups = {Update.class})
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@ApiModelProperty("版本号")
private String versionName;
@ApiModelProperty("设备类型,1安卓,2 ios")
private Integer deviceType;
@ApiModelProperty("下载地址")
private String downloadUrl;
@ApiModelProperty("1:强更,0不强制")
private Integer forceUpdate;
@ApiModelProperty("创建时间")
private Timestamp createTime;
@ApiModelProperty("修改时间")
private Timestamp updateTime;
}
package com.jumeirah.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jumeirah.common.entity.Feedback;
import com.jumeirah.common.param.FeedbackPageParam;
import com.jumeirah.common.param.FeedbackQueryVo;
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 giao
* @since 2020-10-26
*/
@Repository
public interface FeedbackMapper extends BaseMapper<Feedback> {
/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
FeedbackQueryVo getFeedbackById(Serializable id);
/**
* 获取分页对象
*
* @param page
* @param feedbackPageParam
* @return
*/
IPage<FeedbackQueryVo> getFeedbackPageList(@Param("page") Page page,@Param("param") FeedbackPageParam feedbackPageParam);
}
......@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.param.McStrokePageParam;
import com.jumeirah.common.param.McStrokePaymentPageParam;
import com.jumeirah.common.param.StrokePageParam;
import com.jumeirah.common.vo.McStrokePaymentQueryVo;
import com.jumeirah.common.vo.McStrokeQueryVo;
import com.jumeirah.common.vo.StrokeDetailVo;
import com.jumeirah.common.vo.StrokeQueryVo;
......@@ -57,4 +59,13 @@ public interface StrokeMapper extends BaseMapper<Stroke> {
* @return
*/
IPage<McStrokeQueryVo> getMcStrokePageList(@Param("page") Page page, @Param("mcStrokePageParam") McStrokePageParam mcStrokePageParam);
/**
* 收款记录
* @param page
* @param mcStrokePaymentPageParam
* @return
*/
IPage<McStrokePaymentQueryVo> getPaymentPageList(Page<StrokeQueryVo> page,@Param("param") McStrokePaymentPageParam mcStrokePaymentPageParam);
}
package com.jumeirah.common.mapper;
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.VersionControl;
import com.jumeirah.common.param.VersionControlPageParam;
import com.jumeirah.common.param.VersionControlQueryVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.io.Serializable;
/**
* App版本控制 Mapper 接口
*
* @author giao
* @since 2020-10-26
*/
@Repository
public interface VersionControlMapper extends BaseMapper<VersionControl> {
/**
* 根据ID获取查询对象
*
* @param id
* @return
*/
VersionControlQueryVo getVersionControlById(Serializable id);
/**
* 获取分页对象
*
* @param page
* @param versionControlPageParam
* @return
*/
IPage<VersionControlQueryVo> getVersionControlPageList(@Param("page") Page page, @Param("param") VersionControlPageParam versionControlPageParam);
}
package com.jumeirah.common.param;
import com.jumeirah.common.entity.base.ImgJson;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -7,6 +8,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.List;
/**
* 包机介绍
*
......@@ -20,8 +23,11 @@ import lombok.experimental.Accessors;
public class CharterIntroductionUpdateParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "包机图片url, json字符串", example = "[{\"url\":\"https://picsum.photos/100/200/\",\"height\":200,\"width\":200},{\"url\":\"https://picsum.photos/100/200/\",\"height\":200,\"width\":200},{\"url\":\"https://picsum.photos/100/200/\",\"height\":200,\"width\":200}]")
private String imgUrl;
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("包机图片url")
private List<ImgJson> imgUrl;
@ApiModelProperty(value = "包机文字")
private String text;
......
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 giao
* @date 2020-10-26
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "意见反馈分页参数")
public class FeedbackPageParam extends BasePageOrderParam{
private static final long serialVersionUID=1L;
}
package com.jumeirah.common.param;
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 giao
* @date 2020-10-26
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "FeedbackQueryVo对象")
public class FeedbackQueryVo implements Serializable{
private static final long serialVersionUID=1L;
private Long id;
private String content;
private Long userId;
@ApiModelProperty("Create Time")
private Date createTime;
@ApiModelProperty("Update Time")
private Date updateTime;
}
\ No newline at end of file
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 McStrokePaymentPageParam extends BasePageOrderParam {
private static final long serialVersionUID = 1L;
@ApiModelProperty("付款状态,-1全部,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款")
private Integer paymentStatus;
@ApiModelProperty("主键id")
private Long id;
@ApiModelProperty("开始时间")
private String startTime;
@ApiModelProperty("结束时间")
private String endTime;
}
package com.jumeirah.common.param;
import io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <pre>
* App版本控制 分页参数对象
* </pre>
*
* @author giao
* @date 2020-10-26
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "App版本控制分页参数")
public class VersionControlPageParam extends BasePageOrderParam {
private static final long serialVersionUID = 1L;
}
package com.jumeirah.common.param;
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>
* App版本控制 查询结果对象
* </pre>
*
* @author giao
* @date 2020-10-26
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "VersionControlQueryVo对象")
public class VersionControlQueryVo implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
@ApiModelProperty("版本号")
private String versionName;
@ApiModelProperty("设备类型,1安卓,2 ios")
private Integer deviceType;
@ApiModelProperty("下载地址")
private String downloadUrl;
@ApiModelProperty("1:强更,0不强制")
private Integer force;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("修改时间")
private Date updateTime;
}
\ No newline at end of file
package com.jumeirah.common.service;
import com.jumeirah.common.entity.Feedback;
import com.jumeirah.common.param.FeedbackPageParam;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import com.jumeirah.common.param.FeedbackQueryVo;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
/**
* 意见反馈 服务类
*
* @author giao
* @since 2020-10-26
*/
public interface FeedbackService extends BaseService<Feedback> {
/**
* 保存
*
* @param feedback
* @return
* @throws Exception
*/
boolean saveFeedback(Feedback feedback)throws Exception;
/**
* 修改
*
* @param feedback
* @return
* @throws Exception
*/
boolean updateFeedback(Feedback feedback)throws Exception;
/**
* 删除
*
* @param id
* @return
* @throws Exception
*/
boolean deleteFeedback(Long id)throws Exception;
/**
* 根据ID获取查询对象
*
* @param id
* @return
* @throws Exception
*/
FeedbackQueryVo getFeedbackById(Long id)throws Exception;
/**
* 获取分页对象
*
* @param feedbackPageParam
* @return
* @throws Exception
*/
Paging<FeedbackQueryVo> getFeedbackPageList(FeedbackPageParam feedbackPageParam) throws Exception;
}
......@@ -2,7 +2,9 @@ package com.jumeirah.common.service;
import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.param.McStrokePageParam;
import com.jumeirah.common.param.McStrokePaymentPageParam;
import com.jumeirah.common.param.StrokePageParam;
import com.jumeirah.common.vo.McStrokePaymentQueryVo;
import com.jumeirah.common.vo.McStrokeQueryVo;
import com.jumeirah.common.vo.StrokeDetailVo;
import com.jumeirah.common.vo.StrokeQueryVo;
......@@ -72,4 +74,11 @@ public interface StrokeService extends BaseService<Stroke> {
* @return
*/
Paging<McStrokeQueryVo> getMcStrokePageList(McStrokePageParam mcStrokePageParam);
/**
* 收款记录
* @param mcStrokePaymentPageParam
* @return
*/
Paging<McStrokePaymentQueryVo> getPaymentPageList(McStrokePaymentPageParam mcStrokePaymentPageParam);
}
package com.jumeirah.common.service;
import com.jumeirah.common.entity.VersionControl;
import com.jumeirah.common.param.VersionControlPageParam;
import com.jumeirah.common.param.VersionControlQueryVo;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
/**
* App版本控制 服务类
*
* @author giao
* @since 2020-10-26
*/
public interface VersionControlService extends BaseService<VersionControl> {
/**
* 保存
*
* @param versionControl
* @return
* @throws Exception
*/
boolean saveVersionControl(VersionControl versionControl) throws Exception;
/**
* 修改
*
* @param versionControl
* @return
* @throws Exception
*/
boolean updateVersionControl(VersionControl versionControl) throws Exception;
/**
* 删除
*
* @param id
* @return
* @throws Exception
*/
boolean deleteVersionControl(Long id) throws Exception;
/**
* 根据ID获取查询对象
*
* @param id
* @return
* @throws Exception
*/
VersionControlQueryVo getVersionControlById(Long id) throws Exception;
/**
* 获取分页对象
*
* @param versionControlPageParam
* @return
* @throws Exception
*/
Paging<VersionControlQueryVo> getVersionControlPageList(VersionControlPageParam versionControlPageParam) throws Exception;
}
......@@ -60,6 +60,9 @@ public class CharterIntroductionServiceImpl extends BaseServiceImpl<CharterIntro
CharterIntroduction charterIntroduction = new CharterIntroduction();
BeanUtils.copyProperties(charterIntroductionUpdateParam, charterIntroduction);
if (charterIntroductionUpdateParam.getImgUrl() != null) {
charterIntroduction.setImgUrl(Jackson.toJsonString(charterIntroductionUpdateParam.getImgUrl()));
}
return super.updateById(charterIntroduction);
}
......
package com.jumeirah.common.service.impl;
import com.jumeirah.common.entity.Feedback;
import com.jumeirah.common.mapper.FeedbackMapper;
import com.jumeirah.common.service.FeedbackService;
import com.jumeirah.common.param.FeedbackPageParam;
import com.jumeirah.common.param.FeedbackQueryVo;
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;
/**
* 意见反馈 服务实现类
*
* @author giao
* @since 2020-10-26
*/
@Slf4j
@Service
public class FeedbackServiceImpl extends BaseServiceImpl<FeedbackMapper, Feedback> implements FeedbackService {
@Autowired
private FeedbackMapper feedbackMapper;
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveFeedback(Feedback feedback)throws Exception{
return super.save(feedback);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean updateFeedback(Feedback feedback)throws Exception{
return super.updateById(feedback);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean deleteFeedback(Long id)throws Exception{
return super.removeById(id);
}
@Override
public FeedbackQueryVo getFeedbackById(Long id)throws Exception{
return feedbackMapper.getFeedbackById(id);
}
@Override
public Paging<FeedbackQueryVo> getFeedbackPageList(FeedbackPageParam feedbackPageParam)throws Exception{
Page<FeedbackQueryVo> page=new PageInfo<>(feedbackPageParam,OrderItem.desc(getLambdaColumn(Feedback::getCreateTime)));
IPage<FeedbackQueryVo> iPage= feedbackMapper.getFeedbackPageList(page, feedbackPageParam);
return new Paging<FeedbackQueryVo>(iPage);
}
}
......@@ -7,8 +7,10 @@ import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.enums.StrokeStatusEnum;
import com.jumeirah.common.mapper.StrokeMapper;
import com.jumeirah.common.param.McStrokePageParam;
import com.jumeirah.common.param.McStrokePaymentPageParam;
import com.jumeirah.common.param.StrokePageParam;
import com.jumeirah.common.service.StrokeService;
import com.jumeirah.common.vo.McStrokePaymentQueryVo;
import com.jumeirah.common.vo.McStrokeQueryVo;
import com.jumeirah.common.vo.StrokeDetailVo;
import com.jumeirah.common.vo.StrokeQueryVo;
......@@ -106,4 +108,11 @@ public class StrokeServiceImpl extends BaseServiceImpl<StrokeMapper, Stroke> imp
return new Paging<McStrokeQueryVo>(mcStrokePageList);
}
@Override
public Paging<McStrokePaymentQueryVo> getPaymentPageList(McStrokePaymentPageParam mcStrokePaymentPageParam) {
Page<StrokeQueryVo> page = new PageInfo<>(mcStrokePaymentPageParam);
IPage<McStrokePaymentQueryVo> mcStrokePageList = strokeMapper.getPaymentPageList(page, mcStrokePaymentPageParam);
return new Paging<McStrokePaymentQueryVo>(mcStrokePageList);
}
}
package com.jumeirah.common.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jumeirah.common.entity.VersionControl;
import com.jumeirah.common.mapper.VersionControlMapper;
import com.jumeirah.common.param.VersionControlPageParam;
import com.jumeirah.common.param.VersionControlQueryVo;
import com.jumeirah.common.service.VersionControlService;
import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl;
import io.geekidea.springbootplus.framework.core.pagination.PageInfo;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* App版本控制 服务实现类
*
* @author giao
* @since 2020-10-26
*/
@Slf4j
@Service
public class VersionControlServiceImpl extends BaseServiceImpl<VersionControlMapper, VersionControl> implements VersionControlService {
@Autowired
private VersionControlMapper versionControlMapper;
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveVersionControl(VersionControl versionControl) throws Exception {
return super.save(versionControl);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean updateVersionControl(VersionControl versionControl) throws Exception {
return super.updateById(versionControl);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean deleteVersionControl(Long id) throws Exception {
return super.removeById(id);
}
@Override
public VersionControlQueryVo getVersionControlById(Long id) throws Exception {
return versionControlMapper.getVersionControlById(id);
}
@Override
public Paging<VersionControlQueryVo> getVersionControlPageList(VersionControlPageParam versionControlPageParam) throws Exception {
Page<VersionControlQueryVo> page = new PageInfo<>(versionControlPageParam, OrderItem.desc(getLambdaColumn(VersionControl::getCreateTime)));
IPage<VersionControlQueryVo> iPage = versionControlMapper.getVersionControlPageList(page, versionControlPageParam);
return new Paging<VersionControlQueryVo>(iPage);
}
}
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.math.BigDecimal;
import java.sql.Timestamp;
/**
* <pre>
* 行程表 查询结果对象
* </pre>
*
* @author wei
* @date 2020-09-29
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "StrokeQueryVo对象")
public class McStrokePaymentQueryVo implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键ID")
private Long id;
@ApiModelProperty("行程类型,0-单程,1-往返行程,2-货运,3-医疗")
private Integer type;
@ApiModelProperty("付款时间")
private Timestamp userRechargeTime;
@ApiModelProperty("付款状态,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款")
private Integer paymentStatus;
@ApiModelProperty("用户充值金额")
private BigDecimal userRechargeMoney;
@ApiModelProperty("手机号")
private String phoneNumber;
@ApiModelProperty("申请人")
private String applicant;
@ApiModelProperty("付款渠道,0-线下渠道,1-线上渠道")
private Integer paymentChannel;
}
<?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.FeedbackMapper">
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, content, user_id, create_time, update_time
</sql>
<select id="getFeedbackById" resultType="com.jumeirah.common.param.FeedbackQueryVo">
select
<include refid="Base_Column_List"/>
from feedback where id = #{id}
</select>
<select id="getFeedbackPageList" parameterType="com.jumeirah.common.param.FeedbackPageParam" resultType="com.jumeirah.common.param.FeedbackQueryVo">
select
<include refid="Base_Column_List"/>
from feedback
</select>
</mapper>
......@@ -152,4 +152,35 @@
ORDER BY s.create_time DESC
</select>
<select id="getPaymentPageList" parameterType="com.jumeirah.common.param.McStrokePaymentPageParam"
resultType="com.jumeirah.common.vo.McStrokePaymentQueryVo">
SELECT
s.id,
s.type,
s.user_recharge_time,
s.payment_status,
s.user_recharge_money,
s.payment_channel,
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="param.paymentStatus != null and param.paymentStatus != -1">
AND s.status = #{param.paymentStatus}
</if>
<if test="param.id != null and param.id != 0">
AND s.id = #{param.id}
</if>
<if test="param.startTime != null and param.startTime != ''">
AND s.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null and param.endTime != ''">
AND s.create_time &lt;= #{param.endTime}
</if>
</where>
ORDER BY s.create_time DESC
</select>
</mapper>
<?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.VersionControlMapper">
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, version_name, device_type, download_url, force, create_time, update_time
</sql>
<select id="getVersionControlById" resultType="com.jumeirah.common.param.VersionControlQueryVo">
select
<include refid="Base_Column_List"/>
from version_control where id = #{id}
</select>
<select id="getVersionControlPageList" parameterType="com.jumeirah.common.param.VersionControlPageParam"
resultType="com.jumeirah.common.param.VersionControlQueryVo">
select
<include refid="Base_Column_List"/>
from version_control
</select>
</mapper>
......@@ -42,11 +42,10 @@ public class JwtTokenRedisVo implements Serializable {
@ApiModelProperty("设备推送token")
private String deviceToken;
/**
* 用户系统类型
*/
private String clientType;
private String deviceType;
/**
* mcId
......
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