|
@@ -11,6 +11,7 @@ import com.uas.eis.dto.stksto.StkCommonDto;
|
|
|
import com.uas.eis.sdk.dto.CustvendDTO;
|
|
|
import com.uas.eis.sdk.dto.SaveOrChangeCustomerDetailDto;
|
|
|
import com.uas.eis.sdk.dto.SaveOrChangeCustomerDto;
|
|
|
+import com.uas.eis.sdk.dto.UpdateCustVendDTO;
|
|
|
import com.uas.eis.service.RequestSTKService;
|
|
|
import com.uas.eis.utils.HuToolUtils;
|
|
|
import com.uas.eis.utils.STKSignUtil;
|
|
@@ -281,6 +282,52 @@ public class RequestSTKServiceImpl implements RequestSTKService {
|
|
|
return resultResponse ;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public HttpResultResponse updateKSPostParam(Integer page, Integer size, UpdateCustVendDTO dto) throws Exception {
|
|
|
+ //时间戳
|
|
|
+ String timestamp = Long.toString(System.currentTimeMillis());
|
|
|
+
|
|
|
+ //加签方法的重要参数
|
|
|
+ JSONObject request=new JSONObject(4);
|
|
|
+ request.put("page",page);
|
|
|
+ request.put("size",size);
|
|
|
+
|
|
|
+ //传入参数 此处案例仅放置了时间,可自行添加
|
|
|
+ JSONObject param=new JSONObject();
|
|
|
+ //param.put("UPDATE_TIME_start","2024-05-09 14:24:06");
|
|
|
+ //param.put("UPDATE_TIME_end","2024-05-09 15:01:28");
|
|
|
+ //param.put("TASKNO","P2022032200000041");
|
|
|
+ //param.put("TASKCODE","202409");
|
|
|
+
|
|
|
+
|
|
|
+ request.put("param",dto);
|
|
|
+
|
|
|
+ String content = request.toString();
|
|
|
+
|
|
|
+ //加签方法第一个参数
|
|
|
+ StringBuilder signBuilder = new StringBuilder("appid").append("=").append(STK_APP_ID).append("&")
|
|
|
+ .append(content).append("&")
|
|
|
+ .append("timestamp").append("=").append(timestamp).append("&")
|
|
|
+ .append("key").append("=").append(STK_APP_KEY);
|
|
|
+
|
|
|
+ //加签
|
|
|
+ String sign = STKSignUtil.HMACSHA256(signBuilder.toString(),STK_APP_KEY);
|
|
|
+
|
|
|
+ log.info("STK,原始签名:"+signBuilder.toString());
|
|
|
+ log.info("STK,加密签名:"+sign);
|
|
|
+
|
|
|
+ Map<String,String> header = new HashMap<>();
|
|
|
+ header.put("appid",STK_APP_ID);
|
|
|
+ header.put("timestamp", timestamp);
|
|
|
+ header.put("sign", sign);
|
|
|
+ header.put("Content-Type", "application/json");
|
|
|
+ HttpResultResponse resultResponse = HuToolUtils.post(SAVE_OR_UPDATE_URL+SAVE_OR_UPDATE_REQUEST_CODE
|
|
|
+ ,request, header);
|
|
|
+
|
|
|
+ log.info("示例返回:{}",JSONObject.toJSONString(resultResponse));
|
|
|
+ return resultResponse ;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<CustvendDTO> queryList() {
|
|
|
List<CustvendDTO> custvendDTO = new ArrayList<CustvendDTO>();
|