Commit 3c3539c3 by hewei

Merge branch 'future/strokeList' into 'master'

Future/stroke list

See merge request hewei/Jumeirah!44
parents 4ad4434d ce7cd666
package com.jumeirah.api.app.controller; package com.jumeirah.api.app.controller;
import com.jumeirah.api.app.entity.param.DeviceTokenParam;
import com.jumeirah.api.app.service.AppUserApiService; 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.AppSmsRegisterParam;
import com.jumeirah.common.param.app.AppUserInfoParam; import com.jumeirah.common.param.app.AppUserInfoParam;
import com.jumeirah.common.param.app.AppUserPhoneUpdateParam; import com.jumeirah.common.param.app.AppUserPhoneUpdateParam;
...@@ -11,9 +13,11 @@ import io.geekidea.springbootplus.framework.common.controller.BaseController; ...@@ -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.Module;
import io.geekidea.springbootplus.framework.log.annotation.OperationLog; import io.geekidea.springbootplus.framework.log.annotation.OperationLog;
import io.geekidea.springbootplus.framework.log.enums.OperationLogType; import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
import io.geekidea.springbootplus.framework.shiro.jwt.JwtToken;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -42,6 +46,46 @@ public class AppUserController extends BaseController { ...@@ -42,6 +46,46 @@ public class AppUserController extends BaseController {
private AppUserApiService appUserApiService; 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用户信息 * 补充或修改APP用户信息
*/ */
@PostMapping("/updateAppUserInfo") @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;
}
...@@ -73,6 +73,9 @@ public class AppUser extends BaseEntity { ...@@ -73,6 +73,9 @@ public class AppUser extends BaseEntity {
@ApiModelProperty("性别,0:女,1:男,默认1") @ApiModelProperty("性别,0:女,1:男,默认1")
private Integer gender; private Integer gender;
@ApiModelProperty("设备类型,1:安卓,2:ios")
private Integer deviceType;
@ApiModelProperty("头像") @ApiModelProperty("头像")
private String head; 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);
}
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; package com.jumeirah.common.param;
import com.jumeirah.common.entity.base.ImgJson;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity; import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -7,6 +8,8 @@ import lombok.Data; ...@@ -7,6 +8,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.List;
/** /**
* 包机介绍 * 包机介绍
* *
...@@ -20,8 +23,11 @@ import lombok.experimental.Accessors; ...@@ -20,8 +23,11 @@ import lombok.experimental.Accessors;
public class CharterIntroductionUpdateParam extends BaseEntity { public class CharterIntroductionUpdateParam extends BaseEntity {
private static final long serialVersionUID = 1L; 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}]") @ApiModelProperty("id")
private String imgUrl; private Integer id;
@ApiModelProperty("包机图片url")
private List<ImgJson> imgUrl;
@ApiModelProperty(value = "包机文字") @ApiModelProperty(value = "包机文字")
private String text; 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 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;
}
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 ...@@ -60,6 +60,9 @@ public class CharterIntroductionServiceImpl extends BaseServiceImpl<CharterIntro
CharterIntroduction charterIntroduction = new CharterIntroduction(); CharterIntroduction charterIntroduction = new CharterIntroduction();
BeanUtils.copyProperties(charterIntroductionUpdateParam, charterIntroduction); BeanUtils.copyProperties(charterIntroductionUpdateParam, charterIntroduction);
if (charterIntroductionUpdateParam.getImgUrl() != null) {
charterIntroduction.setImgUrl(Jackson.toJsonString(charterIntroductionUpdateParam.getImgUrl()));
}
return super.updateById(charterIntroduction); 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);
}
}
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);
}
}
<?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>
<?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 { ...@@ -42,11 +42,10 @@ public class JwtTokenRedisVo implements Serializable {
@ApiModelProperty("设备推送token") @ApiModelProperty("设备推送token")
private String deviceToken; private String deviceToken;
/** /**
* 用户系统类型 * 用户系统类型
*/ */
private String clientType; private String deviceType;
/** /**
* mcId * 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