|
|
|
@ -15,6 +15,8 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.alibaba.fastjson.parser.Feature;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.apache.commons.net.util.Base64;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
@ -25,6 +27,7 @@ import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
public class RetailRSvcServiceImpl implements RetailRSvcService {
|
|
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientManager clientManager;
|
|
|
|
@ -65,6 +68,7 @@ public class RetailRSvcServiceImpl implements RetailRSvcService {
|
|
|
|
|
result.put("timestamp", System.currentTimeMillis());
|
|
|
|
|
result = JSONObject.parseObject(JSON.toJSONString(result), Feature.OrderedField);
|
|
|
|
|
result.put("sign", SignUtils.buildSign(result.toJSONString(), svcInfo.getString("platform_pri_key")));
|
|
|
|
|
logger.info("svc [{}] info:{}", sourceCode, result.toJSONString());
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -96,6 +100,7 @@ public class RetailRSvcServiceImpl implements RetailRSvcService {
|
|
|
|
|
serviceApply.put("client_id", client.getIntValue("client_id"));
|
|
|
|
|
serviceApply.put("title", params.getString("signData"));
|
|
|
|
|
serviceApply.put("amount", decData(params.getString("signPrice"), key, svcInfo.getString("platform_pri_key")));
|
|
|
|
|
serviceApply.put("surcharge_rate", decData(params.getString("signRate"), key, svcInfo.getString("platform_pri_key")));
|
|
|
|
|
serviceApply.put("apply_username", params.getString("signName"));
|
|
|
|
|
serviceApply.put("status", 0);
|
|
|
|
|
serviceApply.put("is_valid", 1);
|
|
|
|
|