代码说明

This commit is contained in:
lijiazhuo
2025-11-28 15:29:34 +08:00
parent ce92a3ed66
commit def010102a
5 changed files with 33 additions and 24 deletions

View File

@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
@Async
public class AppController {
//app的法大大合同
@PostMapping("/dpapp")
public String qianzhangdp(@RequestBody JSONObject signature) throws Exception {
JSONObject data = signature.getJSONObject("data");

View File

@ -30,7 +30,7 @@ public class Reward {
lock.lock();
try {
JSONObject dataa = rewards.getJSONObject("data");
log.info(dataa.toJSONString());
log.info("奖励数据 "+ rewards.toJSONString());
String id = dataa.getString("id");
String timeConversionS = dataa.getString("shangcheheyanriqi");
String timeConversion = TimeUtil.timeConversions(timeConversionS);
@ -105,7 +105,9 @@ public class Reward {
JSONObject widget1708503246372 = test.getJSONObject("_widget_1708503246372");
if (widget1708503246372 != null) {
fs_p1 = widget1708503246372.getString("name");
log.info("有问题的数据==============" + fs_p1 );
}
}
@ -120,8 +122,15 @@ public class Reward {
real_name = test1.getString("real_name");
id_card3331 = test1.getString("id_card");
}
log.info("f_user_id++++++ " + f_user_id);
Boolean flag = false;
// 奖励1
if (!f_user_id.equals("0") && !f_user_id.isEmpty() && f_user_id != null) {
flag = true;
JSONObject jiangli = new JSONObject();
jiangli.put("app_id", "65815f117de49256b1e67e75");
jiangli.put("entry_id", "658fce1d771e971c5816e475");
@ -459,9 +468,11 @@ public class Reward {
}
}
// 奖励2
if (!f_user_idS.equals("0") && !f_user_idS.isEmpty() && f_user_idS != null) {
if (f_user_idS != null && !f_user_idS.isEmpty() && !f_user_idS.equals("0") && flag == true) {
JSONObject jsonObject22 = new JSONObject();
jsonObject22.put("app_id", "65815f117de49256b1e67e75");

View File

@ -15,6 +15,8 @@ import java.util.Map;
@Component
public class Fdd {
//法大大合同下载
@Scheduled(fixedRate = 3600000)
public void main11() throws Exception {
String saveDir = "/home/fadada/file/";

View File

@ -10,6 +10,7 @@ import org.springframework.stereotype.Component;
@Slf4j
@Component
public class UpdataCount {
@Scheduled(cron = "0 0 1 * * ?")
public void maina() {

View File

@ -3,33 +3,27 @@ package com.example.sso.test;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.sso.dao.*;
import com.example.sso.util.APIUtils;
import com.example.sso.util.TimeUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
@RestController
@Slf4j
public class R {
public static void main(String[] args) {
JSONObject jsonObject = new JSONObject();
// @PostMapping("/reward")
jsonObject.put("app_id", "66c866b2d6520ecd19066bb0");
jsonObject.put("entry_id", "66cebfaa2340ecd8b90e06a1");
jsonObject.put("limit", 10000);
JSONObject filter = new JSONObject();
filter.put("rel","and");
JSONArray cond = new JSONArray();
JSONObject jsonObject11 = new JSONObject();
jsonObject11.put("field","yeno");
jsonObject11.put("method","eq");
JSONArray jsonArray12 = new JSONArray();
jsonArray12.add("");
jsonObject11.put("value",jsonArray12);
cond.add(jsonObject11);
filter.put("cond",cond);
jsonObject.put("filter",filter);
public String reward(@RequestBody JSONObject rewards) throws ParseException {
String jsonString = jsonObject.toJSONString();
String select = APIUtils.select(jsonString);
JSONObject jsonObject1 = JSON.parseObject(select);
JSONArray jsonArray = jsonObject1.getJSONArray("data");
System.out.println(jsonArray);
log.info("奖励数据 "+ rewards.toJSONString());
return "";
}
}