|
@@ -18,7 +18,6 @@ import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
-import org.jeecg.common.constant.CommonConstant;
|
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
import org.jeecg.common.util.DateUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -131,15 +130,16 @@ public class KuaishouCrowdPackServiceImpl extends ServiceImpl<KuaishouCrowdPackM
|
|
@Override
|
|
@Override
|
|
public Result<Object> accountPush(JSONObject request) {
|
|
public Result<Object> accountPush(JSONObject request) {
|
|
JSONArray accountIds = request.getJSONArray("accountIds");
|
|
JSONArray accountIds = request.getJSONArray("accountIds");
|
|
- Long orientationId = request.getLong("orientationId");
|
|
|
|
|
|
+ Long signature = request.getLong("signature");
|
|
Long accountId = request.getLong("accountId");
|
|
Long accountId = request.getLong("accountId");
|
|
CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
|
|
CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
|
|
QueryWrapper<KuaishouCrowdPack> wrapper = new QueryWrapper<>();
|
|
QueryWrapper<KuaishouCrowdPack> wrapper = new QueryWrapper<>();
|
|
wrapper.eq("account_id", accountId);
|
|
wrapper.eq("account_id", accountId);
|
|
- wrapper.eq("orientation_id", orientationId);
|
|
|
|
|
|
+ wrapper.eq("signature", signature);
|
|
|
|
+ wrapper.eq("status", 4);
|
|
wrapper.last("limit 1");
|
|
wrapper.last("limit 1");
|
|
KuaishouCrowdPack kuaishouCrowdPack = crowdPackMapper.selectOne(wrapper);
|
|
KuaishouCrowdPack kuaishouCrowdPack = crowdPackMapper.selectOne(wrapper);
|
|
- JSONObject jsonObject = iKuaishouPopulationService.pushAccountsPopulation(token, orientationId, accountIds);
|
|
|
|
|
|
+ JSONObject jsonObject = iKuaishouPopulationService.pushAccountsPopulation(token, kuaishouCrowdPack.getOrientationId(), accountIds);
|
|
if (jsonObject.getInteger("code") == 0) {
|
|
if (jsonObject.getInteger("code") == 0) {
|
|
List<KuaishouCrowdPack> list = new ArrayList<>();
|
|
List<KuaishouCrowdPack> list = new ArrayList<>();
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
JSONObject data = jsonObject.getJSONObject("data");
|
|
@@ -154,7 +154,7 @@ public class KuaishouCrowdPackServiceImpl extends ServiceImpl<KuaishouCrowdPackM
|
|
JSONArray fail = data.getJSONArray("fail");
|
|
JSONArray fail = data.getJSONArray("fail");
|
|
for (Object account : fail) {
|
|
for (Object account : fail) {
|
|
Long aaccount = Long.valueOf(String.valueOf(account));
|
|
Long aaccount = Long.valueOf(String.valueOf(account));
|
|
- KuaishouCrowdPack crowdPack = crowdPackMapper.queryByAccountId(aaccount, orientationId);
|
|
|
|
|
|
+ KuaishouCrowdPack crowdPack = crowdPackMapper.queryByAccountId(aaccount, kuaishouCrowdPack.getOrientationId());
|
|
if (Check.isNull(crowdPack)) {
|
|
if (Check.isNull(crowdPack)) {
|
|
kuaishouCrowdPack.setAccountId(aaccount);
|
|
kuaishouCrowdPack.setAccountId(aaccount);
|
|
kuaishouCrowdPack.setMessage("推送失败");
|
|
kuaishouCrowdPack.setMessage("推送失败");
|