Commit 1a78e727 by zhangjw

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

 Conflicts:
	api-app/src/main/java/com/jumeirah/api/app/controller/AppUserController.java
parents 0a30aeef 16e45ee4
......@@ -20,6 +20,13 @@ 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.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;
import org.springframework.web.bind.annotation.*;
import java.util.List;
......
......@@ -9,6 +9,7 @@ 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.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;
......@@ -50,7 +51,7 @@ public class McStrokeDiscountController extends BaseController {
@RequiresPermissions("merchant:aircraft:management:edit")
public ApiResult<Boolean> addStrokeDiscount(@Validated(Add.class) @RequestBody McStrokeDiscountAddParam mcStrokeDiscountAddParam) throws Exception {
StrokeDiscount strokeDiscount = new StrokeDiscount();
BeanUtils.copyProperties(mcStrokeDiscountAddParam,strokeDiscount);
BeanUtils.copyProperties(mcStrokeDiscountAddParam, strokeDiscount);
JwtToken jwtToken = (JwtToken) SecurityUtils.getSubject().getPrincipal();
strokeDiscount.setMcId(jwtToken.getMcId());
boolean flag = strokeDiscountService.saveStrokeDiscount(strokeDiscount);
......@@ -60,13 +61,15 @@ public class McStrokeDiscountController extends BaseController {
/**
* 修改优惠行程表
*/
/* @PostMapping("/update")
@PostMapping("/update")
@OperationLog(name = "修改优惠行程表", type = OperationLogType.UPDATE)
@ApiOperation(value = "修改优惠行程表")
public ApiResult<Boolean> updateStrokeDiscount(@Validated(Update.class) @RequestBody StrokeDiscount strokeDiscount) throws Exception {
public ApiResult<Boolean> updateStrokeDiscount(@Validated(Update.class) @RequestBody McStrokeDiscountAddParam mcStrokeDiscountAddParam) throws Exception {
StrokeDiscount strokeDiscount = new StrokeDiscount();
BeanUtils.copyProperties(mcStrokeDiscountAddParam, strokeDiscount);
boolean flag = strokeDiscountService.updateStrokeDiscount(strokeDiscount);
return ApiResult.result(flag);
}*/
}
/**
* 删除优惠行程表
......
package com.jumeirah.api.merchant.entity.param;
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;
......@@ -23,6 +24,10 @@ import java.math.BigDecimal;
public class McStrokeDiscountAddParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "id不能为空", groups = {Update.class})
@ApiModelProperty("主键ID")
private Long id;
@NotNull(message = "出发城市id不能为空")
@ApiModelProperty("出发城市id")
private Long cityOutsetId;
......
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