Commit bf110aa3 by hewei

Merge branch 'future/strokeList' into 'master'

Future/stroke list

See merge request hewei/Jumeirah!37
parents 90fa6e14 57911cfe
......@@ -3,6 +3,7 @@ package com.jumeirah.api.app.controller;
import com.jumeirah.api.app.service.AppUserApiService;
import com.jumeirah.common.param.app.AppSmsRegisterParam;
import com.jumeirah.common.param.app.AppUserInfoParam;
import com.jumeirah.common.param.app.AppUserPhoneUpdateParam;
import com.jumeirah.common.service.AppUserService;
import com.jumeirah.common.vo.app.LoginAppUserTokenVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult;
......@@ -19,7 +20,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
......@@ -58,9 +58,9 @@ public class AppUserController extends BaseController {
@PostMapping("/updatePhone")
@OperationLog(name = "修改手机号", type = OperationLogType.ADD)
@ApiOperation(value = "修改手机号", response = ApiResult.class)
public ApiResult<Boolean> updatePhone(@RequestParam String phoneArea, @RequestParam String phone, @RequestParam String code) throws Exception {
public ApiResult<Boolean> updatePhone(@RequestBody AppUserPhoneUpdateParam userPhoneUpdateParam) throws Exception {
return appUserApiService.updatePhone(phoneArea, phone, code);
return appUserApiService.updatePhone(userPhoneUpdateParam.getPhoneArea(), userPhoneUpdateParam.getPhone(), userPhoneUpdateParam.getCode());
}
/* *//**
......
......@@ -38,6 +38,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.Instant;
/**
* 行程表 控制器
......@@ -66,6 +68,7 @@ public class StrokeController extends BaseController {
Stroke stroke = new Stroke();
BeanUtils.copyProperties(strokePaymentInfoParam, stroke);
stroke.setPaymentStatus(StatePaymentStatusEnum.PAYING.getCode());
stroke.setUserRechargeTime(Timestamp.from(Instant.now()));
boolean flag = strokeService.update(stroke, new UpdateWrapper<Stroke>().lambda()
.eq(Stroke::getUserId, jwtToken.getUserId())
.eq(Stroke::getId, strokePaymentInfoParam.getId())
......
package com.jumeirah.api.merchant.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jumeirah.common.entity.CharterIntroduction;
import com.jumeirah.common.param.CharterIntroductionAddParam;
import com.jumeirah.common.param.CharterIntroductionUpdateParam;
import com.jumeirah.common.service.CharterIntroductionService;
import com.jumeirah.common.vo.CharterIntroductionQueryVo;
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.core.validator.groups.Update;
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.apache.shiro.authz.annotation.RequiresPermissions;
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;
import java.util.List;
/**
* 包机介绍 控制器
*
* @author giao
* @since 2020-10-14
*/
@Slf4j
@RestController
@RequestMapping("/merchant/charterIntroduction")
@Api(value = "包机介绍API", tags = {"包机介绍"})
public class CharterIntroductionForMerController extends BaseController {
@Autowired
private CharterIntroductionService charterIntroductionService;
/**
* 添加包机介绍
*/
@PostMapping("/add")
@OperationLog(name = "添加包机介绍", type = OperationLogType.ADD)
@ApiOperation(value = "添加包机介绍")
@RequiresPermissions("merchant:aircraft:management:edit")
public ApiResult<Boolean> addCharterIntroduction(@Validated(Add.class) @RequestBody CharterIntroductionAddParam charterIntroductionAddParam) throws Exception {
boolean flag = charterIntroductionService.saveCharterIntroduction(charterIntroductionAddParam);
return ApiResult.result(flag);
}
/**
* 修改包机介绍
*/
@PostMapping("/update")
@OperationLog(name = "修改包机介绍", type = OperationLogType.UPDATE)
@ApiOperation(value = "修改包机介绍")
@RequiresPermissions("merchant:aircraft:management:edit")
public ApiResult<Boolean> updateCharterIntroduction(@Validated(Update.class) @RequestBody CharterIntroductionUpdateParam charterIntroductionUpdateParam) throws Exception {
boolean flag = charterIntroductionService.updateCharterIntroduction(charterIntroductionUpdateParam);
return ApiResult.result(flag);
}
/**
* 删除包机介绍
*/
@PostMapping("/delete/{id}")
@OperationLog(name = "删除包机介绍", type = OperationLogType.DELETE)
@ApiOperation(value = "删除包机介绍")
@RequiresPermissions("merchant:aircraft:management:edit")
public ApiResult<Boolean> deleteCharterIntroduction(@PathVariable("id") Long id) throws Exception {
boolean flag = charterIntroductionService.deleteCharterIntroduction(id);
return ApiResult.result(flag);
}
/**
* 获取包机介绍详情
*/
@GetMapping("/info/{id}")
@OperationLog(name = "包机介绍详情", type = OperationLogType.INFO)
@ApiOperation(value = "包机介绍详情")
@RequiresPermissions("merchant:aircraft:management:view")
public ApiResult<CharterIntroductionQueryVo> getCharterIntroduction(@PathVariable("id") Long id) throws Exception {
CharterIntroductionQueryVo charterIntroductionQueryVo = charterIntroductionService.getCharterIntroductionById(id);
return ApiResult.ok(charterIntroductionQueryVo);
}
/**
* 包机介绍分页列表
*/
@PostMapping("/getPageList")
@OperationLog(name = "包机介绍分页列表", type = OperationLogType.PAGE)
@ApiOperation(value = "包机介绍分页列表")
@RequiresPermissions("merchant:aircraft:management:view")
public ApiResult<List<CharterIntroduction>> getCharterIntroductionPageList() throws Exception {
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
List<CharterIntroduction> list = charterIntroductionService.list(
new QueryWrapper<CharterIntroduction>().lambda().eq(CharterIntroduction::getMcId, jwtToken.getMcId()));
return ApiResult.ok(list);
}
}
package com.jumeirah.api.merchant.controller;
import com.jumeirah.common.param.MerchantLoginParam;
import com.jumeirah.common.param.MerchantUpdatePwdParam;
import com.jumeirah.common.service.MerchantService;
import com.jumeirah.common.service.MerchantUserService;
import com.jumeirah.common.vo.LoginMerUserTokenVo;
......@@ -100,6 +101,14 @@ public class MerchantUserController extends BaseController {
return merchantUserService.login(merchantLoginParam);
}
@PostMapping("/updatePwd")
@OperationLogIgnore
@ApiOperation(value = "商家用户修改密码", notes = "商家用户修改密码, 修改完后需要跳到登陆界面,并重新登陆")
public ApiResult<Boolean> updatePwd(@Validated @RequestBody MerchantUpdatePwdParam merchantUpdatePwdParam) throws Exception {
return merchantUserService.updatePwd(merchantUpdatePwdParam);
}
// @PostMapping("/register")
// @OperationLogIgnore
// @ApiOperation(value = "注册", notes = "商家注册")
......
/*
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.geekidea.springbootplus.test;
import java.sql.Timestamp;
import java.time.Instant;
/**
* @author geekidea
* @date 2020/3/16
**/
public class TimestampTest {
public static void main(String[] args) {
// 获取当前时间戳
Timestamp from = Timestamp.from(Instant.now());
System.out.println(from);
}
}
......@@ -56,9 +56,4 @@ public class CharterIntroduction extends BaseEntity {
@ApiModelProperty("类型 1私人;2团体;3货运;4医疗")
private Integer type;
@ApiModelProperty("图片高")
private Integer imageListHeight;
@ApiModelProperty("图片宽")
private Integer imageListWidth;
}
......@@ -81,6 +81,9 @@ public class Stroke extends BaseEntity {
@ApiModelProperty("更新时间")
private Timestamp updateTime;
@ApiModelProperty("付款时间")
private Timestamp userRechargeTime;
@ApiModelProperty("货物名称")
private String goodsName;
......
package com.jumeirah.common.param;
import com.jumeirah.common.vo.CharterIntroductionImgForAppVo;
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 java.util.List;
/**
* 包机介绍
*
* @author giao
* @since 2020-10-14
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "CharterIntroductionAddParam")
public class CharterIntroductionAddParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "包机图片url")
private List<CharterIntroductionImgForAppVo> imgList;
@ApiModelProperty(value = "包机文字")
private String text;
@ApiModelProperty("包机标题")
private String title;
@ApiModelProperty("类型 1私人;2团体;3货运;4医疗")
private Integer type;
}
package com.jumeirah.common.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;
/**
* 包机介绍
*
* @author giao
* @since 2020-10-14
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "CharterIntroductionUpdateParam")
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(value = "包机文字")
private String text;
@ApiModelProperty("包机标题")
private String title;
@ApiModelProperty("类型 1私人;2团体;3货运;4医疗")
private Integer type;
}
/*
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jumeirah.common.param;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 登录参数
*
* @author geekidea
* @date 2019-05-15
**/
@Data
@ApiModel("商家用户修改密码参数")
public class MerchantUpdatePwdParam implements Serializable {
private static final long serialVersionUID = 2854217576695117356L;
@NotBlank(message = "请输入密码")
@ApiModelProperty(value = "密码", example = "123456")
private String oldPassword;
@NotBlank(message = "请输入密码")
@ApiModelProperty(value = "密码", example = "123456")
private String newPassword;
}
package com.jumeirah.common.param.app;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* APP用户
*
* @author wei
* @since 2020-09-23
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "AppUserPhoneUpdateParam")
public class AppUserPhoneUpdateParam extends BaseEntity {
private String phoneArea;
private String phone;
private String code;
}
package com.jumeirah.common.service;
import com.jumeirah.common.entity.CharterIntroduction;
import com.jumeirah.common.param.CharterIntroductionAddParam;
import com.jumeirah.common.param.CharterIntroductionPageParam;
import com.jumeirah.common.param.CharterIntroductionUpdateParam;
import com.jumeirah.common.vo.CharterIntroductionQueryForAppVo;
import com.jumeirah.common.vo.CharterIntroductionQueryVo;
import io.geekidea.springbootplus.framework.common.service.BaseService;
......@@ -18,20 +20,19 @@ public interface CharterIntroductionService extends BaseService<CharterIntroduct
/**
* 保存
*
* @param charterIntroduction
* @return
* @throws Exception
*/
boolean saveCharterIntroduction(CharterIntroduction charterIntroduction) throws Exception;
boolean saveCharterIntroduction(CharterIntroductionAddParam charterIntroductionAddParam) throws Exception;
/**
* 修改
*
* @param charterIntroduction
* @param
* @return
* @throws Exception
*/
boolean updateCharterIntroduction(CharterIntroduction charterIntroduction) throws Exception;
boolean updateCharterIntroduction(CharterIntroductionUpdateParam charterIntroductionUpdateParam) throws Exception;
/**
* 删除
......@@ -60,6 +61,13 @@ public interface CharterIntroductionService extends BaseService<CharterIntroduct
*/
Paging<CharterIntroductionQueryVo> getCharterIntroductionPageList(CharterIntroductionPageParam charterIntroductionPageParam) throws Exception;
/**
* 包机介绍分页-- app调用
*
* @param charterIntroductionPageParam
* @return
* @throws Exception
*/
Paging<CharterIntroductionQueryForAppVo> getCharterIntroductionForAppPageList(CharterIntroductionPageParam charterIntroductionPageParam) throws Exception;
}
......@@ -2,6 +2,7 @@ package com.jumeirah.common.service;
import com.jumeirah.common.entity.MerchantUser;
import com.jumeirah.common.param.MerchantLoginParam;
import com.jumeirah.common.param.MerchantUpdatePwdParam;
import com.jumeirah.common.param.MerchantUserPageParam;
import com.jumeirah.common.vo.LoginMerUserTokenVo;
import com.jumeirah.common.vo.MerchantUserQueryVo;
......@@ -37,6 +38,8 @@ public interface MerchantUserService extends BaseService<MerchantUser> {
*/
ApiResult<LoginMerUserTokenVo> login(MerchantLoginParam merchantLoginParam) throws Exception;
ApiResult<Boolean> updatePwd(MerchantUpdatePwdParam merchantUpdatePwdParam) throws Exception;
// ApiResult<Boolean> register(MerchantRegisterParam merchantRegisterParam) throws Exception;
......
......@@ -3,20 +3,32 @@ 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.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jumeirah.common.entity.CharterIntroduction;
import com.jumeirah.common.mapper.CharterIntroductionMapper;
import com.jumeirah.common.param.CharterIntroductionAddParam;
import com.jumeirah.common.param.CharterIntroductionPageParam;
import com.jumeirah.common.param.CharterIntroductionUpdateParam;
import com.jumeirah.common.service.CharterIntroductionService;
import com.jumeirah.common.vo.CharterIntroductionImgForAppVo;
import com.jumeirah.common.vo.CharterIntroductionQueryForAppVo;
import com.jumeirah.common.vo.CharterIntroductionQueryVo;
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 io.geekidea.springbootplus.framework.shiro.jwt.JwtToken;
import io.geekidea.springbootplus.framework.util.Jackson;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
* 包机介绍 服务实现类
*
......@@ -32,13 +44,22 @@ public class CharterIntroductionServiceImpl extends BaseServiceImpl<CharterIntro
@Transactional(rollbackFor = Exception.class)
@Override
public boolean saveCharterIntroduction(CharterIntroduction charterIntroduction) throws Exception {
public boolean saveCharterIntroduction(CharterIntroductionAddParam charterIntroductionAddParam) throws Exception {
CharterIntroduction charterIntroduction = new CharterIntroduction();
BeanUtils.copyProperties(charterIntroductionAddParam, charterIntroduction);
// 图片列表转json
charterIntroduction.setImgUrl(Jackson.toJsonString(charterIntroductionAddParam.getImgList()));
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
charterIntroduction.setMcId(jwtToken.getMcId());
return super.save(charterIntroduction);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean updateCharterIntroduction(CharterIntroduction charterIntroduction) throws Exception {
public boolean updateCharterIntroduction(CharterIntroductionUpdateParam charterIntroductionUpdateParam) throws Exception {
CharterIntroduction charterIntroduction = new CharterIntroduction();
BeanUtils.copyProperties(charterIntroductionUpdateParam, charterIntroduction);
return super.updateById(charterIntroduction);
}
......@@ -64,6 +85,22 @@ public class CharterIntroductionServiceImpl extends BaseServiceImpl<CharterIntro
public Paging<CharterIntroductionQueryForAppVo> getCharterIntroductionForAppPageList(CharterIntroductionPageParam charterIntroductionPageParam) throws Exception {
Page<CharterIntroductionQueryForAppVo> page = new PageInfo<>(charterIntroductionPageParam, OrderItem.desc("ci.create_time"));
IPage<CharterIntroductionQueryForAppVo> iPage = charterIntroductionMapper.getCharterIntroductionForAppPageList(page, charterIntroductionPageParam);
// 处理过的数据列表
List<CharterIntroductionQueryForAppVo> newRecords = new ArrayList<CharterIntroductionQueryForAppVo>();
// 对数据做二次处理
for (CharterIntroductionQueryForAppVo charterIntroductionQueryForAppVo : iPage.getRecords()) {
ObjectMapper objectMapper = new ObjectMapper();
JavaType javaType = objectMapper.getTypeFactory().constructCollectionType(ArrayList.class, CharterIntroductionImgForAppVo.class);
// 处理图片url, 因为数据库存的json 需要转换
List<CharterIntroductionImgForAppVo> lst = (List<CharterIntroductionImgForAppVo>) objectMapper.readValue(charterIntroductionQueryForAppVo.getImgUrl(), javaType);
charterIntroductionQueryForAppVo.setImgList(lst);
charterIntroductionQueryForAppVo.setImgUrl(null);
newRecords.add(charterIntroductionQueryForAppVo);
}
iPage.setRecords(newRecords);
return new Paging<>(iPage);
}
......
package com.jumeirah.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
......@@ -10,6 +11,7 @@ import com.jumeirah.common.entity.MerchantUserPermission;
import com.jumeirah.common.enums.StateEnum;
import com.jumeirah.common.mapper.MerchantUserMapper;
import com.jumeirah.common.param.MerchantLoginParam;
import com.jumeirah.common.param.MerchantUpdatePwdParam;
import com.jumeirah.common.param.MerchantUserPageParam;
import com.jumeirah.common.service.MerchantPermissionService;
import com.jumeirah.common.service.MerchantUserPermissionService;
......@@ -31,6 +33,7 @@ import io.geekidea.springbootplus.framework.shiro.util.SaltUtil;
import io.geekidea.springbootplus.framework.shiro.vo.LoginUserVo;
import io.geekidea.springbootplus.framework.util.PasswordUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -208,6 +211,56 @@ public class MerchantUserServiceImpl extends BaseServiceImpl<MerchantUserMapper,
return ApiResult.ok(loginSysUserTokenVo);
}
@Override
public ApiResult<Boolean> updatePwd(MerchantUpdatePwdParam merchantUpdatePwdParam) throws Exception {
// 判断旧密码是否正确
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
MerchantUser merchantUser = this.getById(jwtToken.getUserId());
if (merchantUser == null) {
log.error("登录失败,用户名或密码错误merchantLoginParam:{}", merchantUpdatePwdParam);
return ApiResult.result(ApiCode.PWD_OR_USERNAME_ERROR, null);
}
if (StateEnum.DISABLE.getCode().equals(merchantUser.getState())) {
log.error("登录失败,禁用:{}", merchantUpdatePwdParam);
return ApiResult.result(ApiCode.LOGIN_EXCEPTION, null);
}
// 后台加密规则:sha256(sha256(123456) + salt)
String encryptPassword = PasswordUtil.encrypt(merchantUpdatePwdParam.getOldPassword(), merchantUser.getSalt());
if (!encryptPassword.equals(merchantUser.getPassword())) {
return ApiResult.result(ApiCode.PWD_OR_USERNAME_ERROR, null);
}
// 生成盐值
String salt = null;
String password = merchantUpdatePwdParam.getNewPassword();
// 如果密码为空,则设置默认密码
if (StringUtils.isBlank(password)) {
salt = springBootPlusProperties.getLoginInitSalt();
password = springBootPlusProperties.getLoginInitPassword();
} else {
salt = SaltUtil.generateSalt();
}
MerchantUser newMerchantUser = new MerchantUser();
// 密码加密
newMerchantUser.setSalt(salt);
newMerchantUser.setPassword(PasswordUtil.encrypt(password, salt));
newMerchantUser.setId(jwtToken.getUserId());
// 修改新密码
boolean updateById = this.updateById(newMerchantUser);
if (updateById) {
// 删除redis中的token,需要用户重新登陆
merchantLoginRedisService.deleteUserAllCache(jwtToken.getUsername());
return ApiResult.ok();
} else {
return ApiResult.fail();
}
}
// @Override
// public ApiResult<Boolean> register(MerchantRegisterParam merchantRegisterPram) throws Exception {
//
......
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 giao
* @date 2020-10-14
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "CharterIntroductionImgForAppVo")
public class CharterIntroductionImgForAppVo implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("url")
private String url;
@ApiModelProperty("高")
private Integer height;
@ApiModelProperty("宽")
private Integer width;
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.List;
/**
* <pre>
......@@ -25,7 +26,10 @@ public class CharterIntroductionQueryForAppVo implements Serializable {
private String mcName;
@ApiModelProperty("商家头像")
private String mcHead;
@ApiModelProperty("包机图片url")
@ApiModelProperty("图片")
private List<CharterIntroductionImgForAppVo> imgList;
private String imgUrl;
@ApiModelProperty("包机文字")
......@@ -34,9 +38,4 @@ public class CharterIntroductionQueryForAppVo implements Serializable {
@ApiModelProperty("包机标题")
private String title;
@ApiModelProperty("图片高")
private Integer imageListHeight;
@ApiModelProperty("图片宽")
private Integer imageListWidth;
}
\ No newline at end of file
......@@ -28,10 +28,10 @@ public class CharterIntroductionQueryVo implements Serializable {
@ApiModelProperty("商家ID")
private Long mcId;
@ApiModelProperty("图片高")
private Integer imageListHeight;
@ApiModelProperty("图片宽")
private Integer imageListWidth;
// @ApiModelProperty("图片高")
// private Integer imageListHeight;
// @ApiModelProperty("图片宽")
// private Integer imageListWidth;
@ApiModelProperty("状态,0-正常,1-取消,99-删除")
private Integer status;
......
......@@ -4,10 +4,10 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, mc_id, status, create_time, update_time,type,text,img_url,image_list_height,image_list_width
id, mc_id, status, create_time,update_time,type,text,img_url
</sql>
<sql id="Base_Column_ListForApp">
title,text,img_url,ci.image_list_height,ci.image_list_width,m.head AS mcHead,m.name AS mcName
title,text,img_url,m.head AS mcHead,m.name AS mcName
</sql>
<select id="getCharterIntroductionById" resultType="com.jumeirah.common.vo.CharterIntroductionQueryVo">
......
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