开票绑定 多余参数 删除
This commit is contained in:
@@ -47,15 +47,17 @@ public class BindServiceImpl implements BindService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject subInvoicing(Map<String, Object> params) {
|
public JSONObject subInvoicing(Map<String, Object> params) {
|
||||||
|
String shopId = params.get("shopId").toString();
|
||||||
|
params.remove("shopId");
|
||||||
String result = HttpUtil.post(url + "cash/subinvoicing", params, 5000);
|
String result = HttpUtil.post(url + "cash/subinvoicing", params, 5000);
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
if (jsonObject.getInteger("code").equals(1)) {
|
if (jsonObject.getInteger("code").equals(1)) {
|
||||||
if (params.get("shopId") != null) {
|
if (StringUtils.isNotBlank(shopId)) {
|
||||||
if (redisUtils.hasKey(CacheKey.INVOICE_SD_TYPE + params.get("shopId"))) {
|
if (redisUtils.hasKey(CacheKey.INVOICE_SD_TYPE + shopId)) {
|
||||||
Set<Object> articles = redisUtils.sGet(CacheKey.INVOICE_SD_TYPE + params.get("shopId"));
|
Set<Object> articles = redisUtils.sGet(CacheKey.INVOICE_SD_TYPE + shopId);
|
||||||
if (!articles.contains(params.get("article"))) {
|
if (!articles.contains(params.get("article"))) {
|
||||||
articles.add(params.get("article"));
|
articles.add(params.get("article"));
|
||||||
redisUtils.sSet(CacheKey.INVOICE_SD_TYPE + params.get("shopId"), articles);
|
redisUtils.sSet(CacheKey.INVOICE_SD_TYPE + shopId, articles);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user