generated from root/miduo_server
海外充值发货
parent
bd378026ea
commit
423eec7744
|
@ -2,11 +2,6 @@ package com.jmfy.controller;
|
||||||
|
|
||||||
import com.jmfy.dto.CPayOrder;
|
import com.jmfy.dto.CPayOrder;
|
||||||
import com.jmfy.dto.CUserDao;
|
import com.jmfy.dto.CUserDao;
|
||||||
import com.jmfy.dto.CUserInfo;
|
|
||||||
import com.jmfy.dto.ResultVo;
|
|
||||||
import com.jmfy.thrift.idl.RPCRequestIFace;
|
|
||||||
import com.jmfy.thrift.pool.ClientAdapterPo;
|
|
||||||
import com.jmfy.thrift.pool.ServiceKey;
|
|
||||||
import com.jmfy.util.JsonUtil;
|
import com.jmfy.util.JsonUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -15,13 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.net.URLDecoder;
|
import java.util.*;
|
||||||
import java.text.ParseException;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class GetOrderController {
|
public class GetOrderController {
|
||||||
|
@ -33,7 +22,6 @@ public class GetOrderController {
|
||||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
String date = parameterMap.get("date");
|
String date = parameterMap.get("date");
|
||||||
String agoDate = JsonUtil.getSpecifiedDayBefore(date);
|
String agoDate = JsonUtil.getSpecifiedDayBefore(date);
|
||||||
LOGGER.info("GetOrderController==>date={},agoDate={}",date,agoDate);
|
|
||||||
List<CPayOrder> orderInfoBydate = cuserDao.getOrderInfoBydate(agoDate);
|
List<CPayOrder> orderInfoBydate = cuserDao.getOrderInfoBydate(agoDate);
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
for (CPayOrder cPayOrder :orderInfoBydate){
|
for (CPayOrder cPayOrder :orderInfoBydate){
|
||||||
|
@ -81,6 +69,7 @@ public class GetOrderController {
|
||||||
.append(cPayOrder.getCreditId());
|
.append(cPayOrder.getCreditId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
System.out.println(result.toString());
|
||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,13 @@ import com.jmfy.thrift.idl.Result;
|
||||||
import com.jmfy.thrift.pool.ClientAdapterPo;
|
import com.jmfy.thrift.pool.ClientAdapterPo;
|
||||||
import com.jmfy.thrift.pool.ServiceKey;
|
import com.jmfy.thrift.pool.ServiceKey;
|
||||||
import com.jmfy.util.JsonUtil;
|
import com.jmfy.util.JsonUtil;
|
||||||
|
import com.jmfy.util.MD5Util;
|
||||||
|
import com.jmfy.util.YsjConstant;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import sun.security.provider.MD5;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
@ -22,7 +25,7 @@ public class RechargeController {
|
||||||
@Resource
|
@Resource
|
||||||
private CUserDao cuserDao;
|
private CUserDao cuserDao;
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(RechargeController.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(RechargeController.class);
|
||||||
@RequestMapping(value = "/recharge")
|
@RequestMapping(value = "/callback")
|
||||||
public String deliveryGoods(HttpServletRequest request) throws Exception {
|
public String deliveryGoods(HttpServletRequest request) throws Exception {
|
||||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
String pOrderId = parameterMap.get("pOrderId");
|
String pOrderId = parameterMap.get("pOrderId");
|
||||||
|
@ -42,55 +45,60 @@ public class RechargeController {
|
||||||
String remark = parameterMap.get("remark");
|
String remark = parameterMap.get("remark");
|
||||||
String productId = parameterMap.get("productId");
|
String productId = parameterMap.get("productId");
|
||||||
String payType = parameterMap.get("payType");
|
String payType = parameterMap.get("payType");
|
||||||
|
String sig = MD5Util.encrypByMd5(pOrderId+serverCode+creditId+userId+amount+stone+time+YsjConstant.TW_GameKey);
|
||||||
|
if (sig.equals(sign)){
|
||||||
|
FindPlayerResult findPlayerResult = new FindPlayerResult("1010","sign derify failed",null);
|
||||||
|
return JsonUtil.getInstence().getGson().toJson(findPlayerResult);
|
||||||
|
}
|
||||||
CUserInfo cUserInfo = cuserDao.getUserInfobyNameAndServerId(userId, Integer.parseInt(serverCode));
|
CUserInfo cUserInfo = cuserDao.getUserInfobyNameAndServerId(userId, Integer.parseInt(serverCode));
|
||||||
if (Integer.parseInt(userId) != cUserInfo.getUserId()){
|
if (Integer.parseInt(creditId) != cUserInfo.getUserId()){
|
||||||
ResultVo resultVo = new ResultVo("1038", "该用户无此角色");
|
ResultVo resultVo = new ResultVo("1038", "该用户无此角色");
|
||||||
return JsonUtil.getInstence().getGson().toJson(resultVo);
|
return JsonUtil.getInstence().getGson().toJson(resultVo);
|
||||||
}
|
}
|
||||||
String payitem = "1002#"+activityExtra + stone +"#1";
|
String payitem = "1002#"+activityExtra + stone +"#1";
|
||||||
// DateFormat dateTimeformat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
CPayOrder cPayOrder = cuserDao.getCpayOrderByOrderId(pOrderId);
|
||||||
// String date = dateTimeformat.format(new Date());
|
|
||||||
// CPayOrder cPayOrder = new CPayOrder();
|
|
||||||
// cPayOrder.setOrderId(pOrderId);
|
|
||||||
// cPayOrder.setDelivery_time(date);
|
|
||||||
// cPayOrder.setUserId(userId);
|
|
||||||
// cPayOrder.setCpOrderId(remark);
|
|
||||||
// cPayOrder.setCurrency(currency);
|
|
||||||
// cPayOrder.setAmount(amount);
|
|
||||||
// cPayOrder.setGameCurrency(stone);
|
|
||||||
// cPayOrder.setPayType(payType);
|
|
||||||
// cPayOrder.setCreditId(creditId);
|
|
||||||
// cuserDao.get
|
|
||||||
Result result = null;
|
|
||||||
String userAddress = cuserDao.findUserInfo(Integer.parseInt(serverCode), Integer.parseInt(userId));
|
|
||||||
LOGGER.info("userAddress : " + userAddress);
|
|
||||||
if (userAddress != null) {
|
|
||||||
String[] split = userAddress.split(":");
|
|
||||||
String ip = split[0];
|
|
||||||
String port = split[1];
|
|
||||||
LOGGER.info("RPC address --> IP : " + ip + "; PORT : " + port);
|
|
||||||
ClientAdapterPo<RPCRequestIFace.Client> rPCClient;
|
|
||||||
String serviceKey = JsonUtil.getServiceKey(ServiceKey.RPCCore, ip, port);
|
|
||||||
LOGGER.info("serviceKey : " + serviceKey);
|
|
||||||
try {
|
|
||||||
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
|
|
||||||
result = rPCClient.getClient().sendReward(Integer.parseInt(userId), payitem,"","",0);//0 充值 1: 邮件奖励
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LOGGER.info("RPC result : ResultCode : "+ result.getResultCode()+"; ResultMsg : "+ result.getResultMsg());
|
|
||||||
ResultVo resultVo;
|
ResultVo resultVo;
|
||||||
if (result.getResultCode() != 0){
|
if (cPayOrder != null) {
|
||||||
resultVo = new ResultVo("0000", "发币成功");
|
resultVo = new ResultVo("0000", "send reward success !!!!");
|
||||||
}else{
|
} else {
|
||||||
resultVo = new ResultVo("1008", "发币失败");
|
DateFormat dateTimeformat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||||
|
String date = dateTimeformat.format(new Date());
|
||||||
|
cPayOrder = new CPayOrder();
|
||||||
|
cPayOrder.setOrderId(pOrderId);
|
||||||
|
cPayOrder.setDelivery_time(date);
|
||||||
|
cPayOrder.setUserId(userId);
|
||||||
|
cPayOrder.setCpOrderId(remark);
|
||||||
|
cPayOrder.setCurrency(currency);
|
||||||
|
cPayOrder.setAmount(amount);
|
||||||
|
cPayOrder.setGameCurrency(stone);
|
||||||
|
cPayOrder.setPayType(payType);
|
||||||
|
cPayOrder.setCreditId(creditId);
|
||||||
|
Result result = null;
|
||||||
|
String userAddress = cuserDao.findUserInfo(Integer.parseInt(serverCode), Integer.parseInt(creditId));
|
||||||
|
LOGGER.info("userAddress : " + userAddress);
|
||||||
|
if (userAddress != null) {
|
||||||
|
String[] split = userAddress.split(":");
|
||||||
|
String ip = split[0];
|
||||||
|
String port = split[1];
|
||||||
|
LOGGER.info("RPC address --> IP : " + ip + "; PORT : " + port);
|
||||||
|
ClientAdapterPo<RPCRequestIFace.Client> rPCClient;
|
||||||
|
String serviceKey = JsonUtil.getServiceKey(ServiceKey.RPCCore, ip, port);
|
||||||
|
LOGGER.info("serviceKey : " + serviceKey);
|
||||||
|
try {
|
||||||
|
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
|
||||||
|
result = rPCClient.getClient().deliveryRecharge(Integer.parseInt(creditId), payitem,productId, Integer.parseInt(stone));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LOGGER.info("RPC result : ResultCode : " + result.getResultCode() + "; ResultMsg : " + result.getResultMsg());
|
||||||
|
if (result.getResultCode() == 0) {
|
||||||
|
cuserDao.addCpayOrder(cPayOrder);
|
||||||
|
resultVo = new ResultVo("0000", "send reward success !!!!");
|
||||||
|
} else {
|
||||||
|
resultVo = new ResultVo("0010", "send reward fail !!!!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return JsonUtil.getInstence().getGson().toJson(resultVo);
|
return JsonUtil.getInstence().getGson().toJson(resultVo);
|
||||||
}
|
}
|
||||||
public static void main (String [] args){
|
|
||||||
DateFormat dateTimeformat = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
String format = dateTimeformat.format(new Date());
|
|
||||||
System.out.println(format);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import com.jmfy.thrift.idl.Result;
|
||||||
import com.jmfy.thrift.pool.ClientAdapterPo;
|
import com.jmfy.thrift.pool.ClientAdapterPo;
|
||||||
import com.jmfy.thrift.pool.ServiceKey;
|
import com.jmfy.thrift.pool.ServiceKey;
|
||||||
import com.jmfy.util.JsonUtil;
|
import com.jmfy.util.JsonUtil;
|
||||||
|
import com.jmfy.util.MD5Util;
|
||||||
|
import com.jmfy.util.YsjConstant;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -36,10 +38,13 @@ public class SendMailController {
|
||||||
String activityCode = parameterMap.get("activityCode");
|
String activityCode = parameterMap.get("activityCode");
|
||||||
String title = parameterMap.get("title");
|
String title = parameterMap.get("title");
|
||||||
String content = parameterMap.get("content");
|
String content = parameterMap.get("content");
|
||||||
LOGGER.info("SendMailController=>userId={},roleId={},serialNo={},gameCode={},serverCode={},packageId={},activityCode={},title={},content={}",
|
|
||||||
userId,roleId, serialNo,gameCode,serverCode,packageId,activityCode,title,content);
|
|
||||||
//Md5(userId+roleId+serverCode+gameCode+serialNo+packageId+key)发奖key 由efun提供
|
|
||||||
String sign = parameterMap.get("sign");
|
String sign = parameterMap.get("sign");
|
||||||
|
//验证sign
|
||||||
|
String sig = MD5Util.encrypByMd5(userId+roleId+serverCode+gameCode+serialNo+packageId+YsjConstant.TW_GameKey);
|
||||||
|
if (sig.equals(sign)){
|
||||||
|
FindPlayerResult findPlayerResult = new FindPlayerResult("1010","sign derify failed",null);
|
||||||
|
return JsonUtil.getInstence().getGson().toJson(findPlayerResult);
|
||||||
|
}
|
||||||
CUserInfo cUserInfo = cuserDao.getUserInfobyNameAndServerId(userId, Integer.parseInt(serverCode));
|
CUserInfo cUserInfo = cuserDao.getUserInfobyNameAndServerId(userId, Integer.parseInt(serverCode));
|
||||||
if (Integer.parseInt(roleId) != cUserInfo.getUserId()){
|
if (Integer.parseInt(roleId) != cUserInfo.getUserId()){
|
||||||
ResultVo resultVo = new ResultVo("1038", "该用户无此角色");
|
ResultVo resultVo = new ResultVo("1038", "该用户无此角色");
|
||||||
|
@ -58,7 +63,8 @@ public class SendMailController {
|
||||||
LOGGER.info("serviceKey : "+ serviceKey);
|
LOGGER.info("serviceKey : "+ serviceKey);
|
||||||
try {
|
try {
|
||||||
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
|
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
|
||||||
rPCClient.getClient().sendReward(cUserInfo.getUserId(), rewardItems,URLDecoder.decode(title, "UTF-8"),URLDecoder.decode(content, "UTF-8"),1);//0 充值 1: 邮件奖励
|
rPCClient.getClient().sendMail(cUserInfo.getUserId(), rewardItems,URLDecoder.decode(title, "UTF-8"),URLDecoder.decode(content, "UTF-8"));//0 充值 1: 邮件奖励
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.jmfy.controller;
|
||||||
|
|
||||||
import com.jmfy.dto.*;
|
import com.jmfy.dto.*;
|
||||||
import com.jmfy.util.JsonUtil;
|
import com.jmfy.util.JsonUtil;
|
||||||
|
import com.jmfy.util.MD5Util;
|
||||||
|
import com.jmfy.util.YsjConstant;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -19,27 +21,29 @@ public class UserController {
|
||||||
@Resource
|
@Resource
|
||||||
private CUserDao cuserDao;
|
private CUserDao cuserDao;
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(UserController.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(UserController.class);
|
||||||
@RequestMapping(value = "/findUserInfo")
|
@RequestMapping(value = "/getRoles")
|
||||||
public String deliveryGoods(HttpServletRequest request) throws Exception {
|
public String deliveryGoods(HttpServletRequest request) throws Exception {
|
||||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
String userName = parameterMap.get("userId");
|
String userId = parameterMap.get("userId");
|
||||||
String serverId = parameterMap.get("serverCode");
|
String serverCode = parameterMap.get("serverCode");
|
||||||
String sign = parameterMap.get("sign");
|
String sign = parameterMap.get("sign");
|
||||||
LOGGER.info("UserController=>userName={},serverId={},sign={}",userName,serverId,sign);
|
String sig = MD5Util.encrypByMd5(YsjConstant.TW_GameKey + userId + serverCode);
|
||||||
CUserInfo cUserInfo = cuserDao.getUserInfobyNameAndServerId(userName, Integer.parseInt(serverId));
|
if (sig.equals(sign)){
|
||||||
String result;
|
FindPlayerResult findPlayerResult = new FindPlayerResult("1010","sign derify failed",null);
|
||||||
|
return JsonUtil.getInstence().getGson().toJson(findPlayerResult);
|
||||||
|
}
|
||||||
|
CUserInfo cUserInfo = cuserDao.getUserInfobyNameAndServerId(userId, Integer.parseInt(serverCode));
|
||||||
if (null == cUserInfo){
|
if (null == cUserInfo){
|
||||||
LOGGER.info("UserController=>userName={},serverId={},cUserInfo is null",userName,serverId);
|
LOGGER.info("UserController=>userName={},serverId={},cUserInfo is null",userId,serverCode);
|
||||||
FindPlayerResult findPlayerResult = new FindPlayerResult("1038","success",null);
|
FindPlayerResult findPlayerResult = new FindPlayerResult("1038","no userInfo",null);
|
||||||
result = JsonUtil.getInstence().getGson().toJson(findPlayerResult);
|
return JsonUtil.getInstence().getGson().toJson(findPlayerResult);
|
||||||
}else {
|
}else {
|
||||||
List<PlayerInfo> playerInfos = new ArrayList<>();
|
List<PlayerInfo> playerInfos = new ArrayList<>();
|
||||||
CUser cUser = cuserDao.getCUser(cUserInfo.getUserId(), cUserInfo.getServerid());
|
CUser cUser = cuserDao.getCUser(cUserInfo.getUserId(), cUserInfo.getServerid());
|
||||||
playerInfos.add(new PlayerInfo(cUser.getUserName(),cUser.getLevel(),String.valueOf(cUser.getId()),serverId));
|
playerInfos.add(new PlayerInfo(cUser.getUserName(),cUser.getLevel(),String.valueOf(cUser.getId()),serverCode));
|
||||||
FindPlayerResult findPlayerResult = new FindPlayerResult("1000","success",playerInfos);
|
FindPlayerResult findPlayerResult = new FindPlayerResult("1000","success",playerInfos);
|
||||||
result = JsonUtil.getInstence().getGson().toJson(findPlayerResult);
|
return JsonUtil.getInstence().getGson().toJson(findPlayerResult);
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,11 @@ public interface CUserDao {
|
||||||
|
|
||||||
CUserInfo getUserInfobyNameAndServerId(String name,int serverId) throws Exception;
|
CUserInfo getUserInfobyNameAndServerId(String name,int serverId) throws Exception;
|
||||||
|
|
||||||
CUser getCUser(int userId, int serverid);
|
CUser getCUser(int userId, int serverid) throws Exception;
|
||||||
|
|
||||||
List<CPayOrder> getOrderInfoBydate(String agoDate);
|
List<CPayOrder> getOrderInfoBydate(String agoDate);
|
||||||
|
|
||||||
|
void addCpayOrder(CPayOrder cPayOrder);
|
||||||
|
|
||||||
|
CPayOrder getCpayOrderByOrderId(String pOrderId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,12 @@ import org.springframework.data.mongodb.core.query.Query;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class CUserDaoImpl implements CUserDao {
|
public class CUserDaoImpl implements CUserDao {
|
||||||
|
@ -39,15 +44,39 @@ public class CUserDaoImpl implements CUserDao {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CUser getCUser(int userId, int serverid) {
|
public CUser getCUser(int userId, int serverid) throws Exception {
|
||||||
CUser user = RedisUtil.getInstence().getObject(serverid+":CUser_Key",
|
CUser cUser = RedisUtil.getInstence().getObject(serverid + ":CUser_Key", Integer.toString(userId), CUser.class, 7 * 24 * 3600);
|
||||||
Integer.toString(userId), CUser.class, 7 * 24 * 3600);
|
if (cUser == null) {
|
||||||
return user;
|
MongoTemplate mongoTemplete = connect.getMongoTemplete("ysj_" + serverid);
|
||||||
|
Query query = new Query(Criteria.where("_id").is(userId));
|
||||||
|
cUser = mongoTemplete.findOne(query, CUser.class);
|
||||||
|
}
|
||||||
|
return cUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addCpayOrder(CPayOrder cPayOrder) {
|
||||||
|
DateFormat dateTimeformat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
String date = dateTimeformat.format(new Date());
|
||||||
|
//保存单独订单
|
||||||
|
RedisUtil.getInstence().putObject("C_PAYORDER",cPayOrder.getOrderId(),cPayOrder,-1);
|
||||||
|
//保存每一天的订单
|
||||||
|
RedisUtil.getInstence().putMapEntry("C_PAYORDER_MAP",date,cPayOrder.getCreditId(),cPayOrder,-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CPayOrder getCpayOrderByOrderId(String pOrderId) {
|
||||||
|
return RedisUtil.getInstence().getObject("C_PAYORDER",pOrderId,CPayOrder.class,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CPayOrder> getOrderInfoBydate(String agoDate) {
|
public List<CPayOrder> getOrderInfoBydate(String agoDate) {
|
||||||
|
List<CPayOrder> orderInfoBydate = new ArrayList<>();
|
||||||
return null;
|
Map<String, CPayOrder> map = RedisUtil.getInstence().getMap("C_PAYORDER_MAP:" + agoDate, CPayOrder.class, -1);
|
||||||
|
for (Map.Entry<String, CPayOrder> entry:map.entrySet()){
|
||||||
|
orderInfoBydate.add(entry.getValue());
|
||||||
|
}
|
||||||
|
return orderInfoBydate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,5 +16,6 @@ service RPCRequestIFace{
|
||||||
|
|
||||||
Result testdeliveryGood(1:i32 userId, 2:string payitem) throws (1:common.InvalidOperException ouch);
|
Result testdeliveryGood(1:i32 userId, 2:string payitem) throws (1:common.InvalidOperException ouch);
|
||||||
|
|
||||||
Result sendReward(1:i32 userId, 2:string rewardItems,3:string title,4:string content,5:i32 type) throws (1:common.InvalidOperException ouch);
|
Result deliveryRecharge(1:i32 userId, 2:string rewardItems,3: string productId,4: i32 stone) throws (1:common.InvalidOperException ouch);
|
||||||
|
Result sendMail(1:i32 userId, 2:string rewardItems,3:string title,4:string content) throws (1:common.InvalidOperException ouch);
|
||||||
}
|
}
|
Loading…
Reference in New Issue