generated from root/miduo_server
增加预注册奖励处理
parent
456f5fd3eb
commit
74b49b1fc5
|
|
@ -1878,22 +1878,22 @@ public class PayController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/pay/f5Notify", method = {RequestMethod.POST,RequestMethod.GET})
|
||||
public String f5Notify(@RequestParam("appId") String appId,
|
||||
@RequestParam("orderId") String orderId,
|
||||
@RequestParam("defaultAmount") double defaultAmount,
|
||||
@RequestParam("defaultCurrency") String defaultCurrency,
|
||||
@RequestParam("gameAmount") int gameAmount,
|
||||
@RequestParam("gameCurrency") String gameCurrency,
|
||||
public String f5Notify(String appId,
|
||||
String orderId,
|
||||
double defaultAmount,
|
||||
String defaultCurrency,
|
||||
int gameAmount,
|
||||
String gameCurrency,
|
||||
String productId,
|
||||
@RequestParam("payChannel") String payChannel,
|
||||
@RequestParam("userId") long userId,
|
||||
@RequestParam("serverId") String serverId,
|
||||
@RequestParam("orderStatus") int orderStatus,
|
||||
String payChannel,
|
||||
long userId,
|
||||
String serverId,
|
||||
int orderStatus,
|
||||
String statusMsg,
|
||||
Integer ots,
|
||||
String payDoneTime,
|
||||
String extInfo,
|
||||
@RequestParam("osign") String osign) {
|
||||
String osign) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("appId", Constant.F5_APPID);
|
||||
json.put("userId", userId);
|
||||
|
|
@ -1905,6 +1905,35 @@ public class PayController {
|
|||
if(productId == null){
|
||||
productId = "";
|
||||
}
|
||||
//为预注册奖励,不走发货逻辑
|
||||
if("ms_590001".equals(productId)){
|
||||
String key = RedisUserKey.F5_PRE_REWARD + RedisUserKey.Delimiter_colon + userId;
|
||||
Map<String, Integer> map = RedisUtil.getInstence().getMapValues(key);
|
||||
//已经发过直接返回
|
||||
if(map !=null){
|
||||
if(map.containsKey(productId)){
|
||||
json.put("code", 200);
|
||||
json.put("msg", "SUCCESS");
|
||||
json.put("deliverStatus", 1);
|
||||
return json.toString();
|
||||
}else{
|
||||
map.put(productId, 0);
|
||||
RedisUtil.getInstence().putMap(key, "",map,-1);
|
||||
json.put("code", 200);
|
||||
json.put("msg", "SUCCESS");
|
||||
json.put("deliverStatus", 1);
|
||||
return json.toString();
|
||||
}
|
||||
}else{
|
||||
Map<String, Integer> map1 = new HashMap<>();
|
||||
map1.put(productId, 0);
|
||||
RedisUtil.getInstence().putMap(key, "",map1,-1);
|
||||
json.put("code", 200);
|
||||
json.put("msg", "SUCCESS");
|
||||
json.put("deliverStatus", 1);
|
||||
return json.toString();
|
||||
}
|
||||
}
|
||||
if(payDoneTime == null){
|
||||
payDoneTime = "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue