| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.DateUtil;
|
| | | import org.yeshi.utils.IPUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | | import com.yeshi.fanli.exception.ExtractException;
|
| | | import com.yeshi.fanli.exception.NotExistObjectException;
|
| | | import com.yeshi.fanli.exception.ObjectStateException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
|
| | | import org.yeshi.utils.DateUtil;
|
| | | import org.yeshi.utils.IPUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/extract")
|
| | |
| | | */
|
| | | @RequestMapping(value = "checkExtract", method = RequestMethod.POST)
|
| | | public void checkExtract(String uid, PrintWriter out) {
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | |
|
| | | // 已到账的红包
|
| | | int count = hongBaoService.getCount(HongBao.STATE_YILINGQU);
|
| | | if (count == 0) {
|
| | | data.put("code", "1");
|
| | | out.print(data);
|
| | | return;
|
| | | }
|
| | |
|
| | | List<Integer> checked = extractService.checkExtract(uid);
|
| | | if (checked != null && checked.size() > 0) {
|
| | | Integer diversity = checked.get(0);
|
| | | if (diversity == 0) {
|
| | | data.put("code", "0");
|
| | | } else {
|
| | | data.put("code", "1");
|
| | | }
|
| | | } else {
|
| | | data.put("code", "1");
|
| | | try {
|
| | | extractService.checkExtract(uid);
|
| | | data.put("code", "1"); // 正常
|
| | | } catch (ExtractException e) {
|
| | | data.put("code", "0");// 异常
|
| | | }
|
| | | out.print(data);
|
| | | }
|
| | |
| | | if (adminUser == null) {
|
| | | record.setAdminUser(new AdminUser());
|
| | | }
|
| | | |
| | | int warnLevel = 0;
|
| | | Extract extract = record.getExtract();
|
| | | if (extract != null) {
|
| | | Integer extractState = extract.getState();
|
| | | if (extractState != null && extractState == 0) {
|
| | | UserInfo userInfo = extract.getUserInfo();
|
| | | if (userInfo != null) {
|
| | | double countTodayMoney = extractService.countTodayMoney(userInfo.getId());
|
| | | if (countTodayMoney >= 100) {
|
| | | warnLevel = 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | record.setWarnLevel(warnLevel);
|
| | | }
|
| | |
|
| | | int count = extractAuditRecordService.getMyAuditedTimeSlotCount(key, state, null, days);
|
| | |
| | | String auctionIds = auctionIdBuf.toString();
|
| | |
|
| | | String ids = auctionIds.substring(0, auctionIds.length() - 1);
|
| | | goodsBriefList = TaoKeApiUtil.getBatchGoodsInfos(ids);
|
| | | try {
|
| | | goodsBriefList = TaoKeApiUtil.getBatchGoodsInfos(ids);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | } |
| | | }
|
| | |
|
| | | List<Map<String, Object>> listResult = new ArrayList<Map<String, Object>>();
|
| | |
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadFalseResult(e.getMessage()));
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult(e.getMessage())));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadFalseResult(e.getMessage()));
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult(e.getMessage())));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | List<Integer> listChecked = extractService.checkExtract(uid);
|
| | |
|
| | | if (listChecked == null || listChecked.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("资金异常"));
|
| | | return;
|
| | | }
|
| | |
|
| | | Integer diversity = listChecked.get(0);
|
| | | if (diversity == 0) {
|
| | | try {
|
| | | extractService.checkExtract(uid);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("资金正常"));
|
| | | } else {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("资金异常"));
|
| | | } catch (ExtractException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | }
|
| | | }
|
| | |
|