Commit 9a14d02e by zhangjw

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

parents 1437fb73 ffb6800e
...@@ -21,7 +21,12 @@ import lombok.extern.slf4j.Slf4j; ...@@ -21,7 +21,12 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
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.*; 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.RestController;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -46,26 +51,13 @@ public class AppUserController extends BaseController { ...@@ -46,26 +51,13 @@ public class AppUserController extends BaseController {
private AppUserApiService appUserApiService; private AppUserApiService appUserApiService;
/** /**
* ios-添加或修改推送token * 添加或修改推送token
*/ */
@PostMapping("/iosDeviceToken") @PostMapping("/addDeviceToken")
@OperationLog(name = "ios-添加或修改推送token", type = OperationLogType.ADD) @OperationLog(name = "添加或修改推送token", type = OperationLogType.ADD)
@ApiOperation(value = "ios-添加或修改推送token", notes = "添加和修改都调用此接口", response = ApiResult.class) @ApiOperation(value = "添加或修改推送token", notes = "添加和修改都调用此接口", response = ApiResult.class)
public ApiResult<Boolean> addIosAppDeviceToken(@RequestBody DeviceTokenParam deviceTokenParam) throws Exception { public ApiResult<Boolean> addDeviceToken(@RequestBody DeviceTokenParam deviceTokenParam) throws Exception {
boolean flag = appUserService.updateDeviceToken(deviceTokenParam, deviceTokenParam.getDeviceType());
boolean flag = appUserService.updateDeviceToken(deviceTokenParam, 2);
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 deviceTokenParam) throws Exception {
boolean flag = appUserService.updateDeviceToken(deviceTokenParam, 1);
return ApiResult.result(flag); return ApiResult.result(flag);
} }
......
...@@ -45,8 +45,4 @@ public class McStrokeDiscountAddParam extends BaseEntity { ...@@ -45,8 +45,4 @@ public class McStrokeDiscountAddParam extends BaseEntity {
@ApiModelProperty("价格") @ApiModelProperty("价格")
private BigDecimal money; private BigDecimal money;
@NotNull(message = "行程类型不能为空")
@ApiModelProperty("行程类型,0-单程,1-往返行程,2-货运,3-医疗")
private Integer type;
} }
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns="http://maven.apache.org/POM/4.0.0"
...@@ -35,6 +20,7 @@ ...@@ -35,6 +20,7 @@
<groupId>io.geekidea.springbootplus</groupId> <groupId>io.geekidea.springbootplus</groupId>
<artifactId>framework</artifactId> <artifactId>framework</artifactId>
</dependency> </dependency>
<!-- 友盟 start -->
<dependency> <dependency>
<groupId>org.json</groupId> <groupId>org.json</groupId>
...@@ -52,6 +38,17 @@ ...@@ -52,6 +38,17 @@
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
<version>4.3.5</version> <version>4.3.5</version>
</dependency> </dependency>
<!-- 友盟 end -->
<!-- 极光 start -->
<dependency>
<groupId>cn.jpush.api</groupId>
<artifactId>jpush-client</artifactId>
<version>3.4.7</version>
</dependency>
<!-- 极光 end -->
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -144,7 +144,7 @@ public class Stroke extends BaseEntity { ...@@ -144,7 +144,7 @@ public class Stroke extends BaseEntity {
private String choosePlainType; private String choosePlainType;
@NotNull(message = "付款状态不能为空") @NotNull(message = "付款状态不能为空")
@ApiModelProperty("付款状态,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款") @ApiModelProperty("付款状态,0-未付款,1-用户已付款,待审核,2-用户已付款,审核通过,3-退款中,99-已退款")
private Integer paymentStatus; private Integer paymentStatus;
@NotNull(message = "审核状态不能为空") @NotNull(message = "审核状态不能为空")
......
package com.jumeirah.common.param.app; package com.jumeirah.common.param.app;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -7,4 +8,8 @@ import java.io.Serializable; ...@@ -7,4 +8,8 @@ import java.io.Serializable;
@Data @Data
public class DeviceTokenParam implements Serializable { public class DeviceTokenParam implements Serializable {
private String deviceToken; private String deviceToken;
@ApiModelProperty("ios=2, android=1")
private int deviceType;
} }
...@@ -43,7 +43,7 @@ public class Demo { ...@@ -43,7 +43,7 @@ public class Demo {
// Demo demo = new Demo("your appkey", "your master secret"); // Demo demo = new Demo("your appkey", "your master secret");
Demo demo = new Demo("5f963f3ea1491772a2aef713", "ti5gomxtvmkgehmwgtbq9rtsfhy0khsi"); Demo demo = new Demo("5f963f3ea1491772a2aef713", "ti5gomxtvmkgehmwgtbq9rtsfhy0khsi");
try { try {
demo.sendAndroidUnicast(); demo.sendAndroidUnicast("As3YYnUpKwDLFVzc35_syVTNSctGjkDNfFLwPHGbXtm_");
//demo.sendIOSUnicast(); //demo.sendIOSUnicast();
/* TODO these methods are all available, just fill in some fields and do the test /* TODO these methods are all available, just fill in some fields and do the test
* demo.sendAndroidCustomizedcastFile(); * demo.sendAndroidCustomizedcastFile();
...@@ -81,10 +81,15 @@ public class Demo { ...@@ -81,10 +81,15 @@ public class Demo {
client.send(broadcast); client.send(broadcast);
} }
public void sendAndroidUnicast() throws Exception { /**
* 发送安卓单推
*
* @throws Exception
*/
public void sendAndroidUnicast(String token) throws Exception {
AndroidUnicast unicast = new AndroidUnicast(appkey, appMasterSecret); AndroidUnicast unicast = new AndroidUnicast(appkey, appMasterSecret);
// TODO Set your device token // TODO Set your device token
unicast.setDeviceToken("AszgEnfwpKppOH8Up1EiyXMJ1ParFCPkqYkqIrCpL9ph"); unicast.setDeviceToken(token);
unicast.setTicker("Android unicast ticker"); unicast.setTicker("Android unicast ticker");
unicast.setTitle("api 中文的title"); unicast.setTitle("api 中文的title");
unicast.setText("Android unicast text"); unicast.setText("Android unicast text");
......
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