| | |
| | | package com.yeshi.fanli.controller.admin.order;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.lang.reflect.Type;
|
| | | import java.util.Date;
|
| | | import java.util.HashSet;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.JsonElement;
|
| | | import com.google.gson.JsonPrimitive;
|
| | | import com.google.gson.JsonSerializationContext;
|
| | | import com.google.gson.JsonSerializer;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.job.order.taobao.UpdateOrderJob;
|
| | | import com.yeshi.fanli.job.order.taobao.UpdateTBRelationAndSpecialOrderJob;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoOrderService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/taobaoOrder")
|
| | | public class TaoBaoOrderController {
|
| | |
|
| | | @Resource
|
| | | private TaoBaoOrderService taoBaoOrderService;
|
| | |
|
| | | @Resource
|
| | | private UpdateTBRelationAndSpecialOrderJob updateRelationAndSpecialOrderJob;
|
| | |
|
| | | @Resource
|
| | | private UpdateOrderJob updateOrderJob;
|
| | |
|
| | | /**
|
| | | * 查询列表 - 新后台
|
| | | * |
| | | * @param callback
|
| | | * @param key
|
| | | * 查询词 名称
|
| | | * @param pageIndex
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "listTaoBaoOrder")
|
| | | public void listTaoBaoOrder(String callback, String key, Integer pageIndex, PrintWriter out) {
|
| | |
|
| | | try {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 0) {
|
| | | pageIndex = 1;
|
| | | }
|
| | |
|
| | | List<TaoBaoOrder> orderList = null;
|
| | | Long count = null;
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(key)) {
|
| | | orderList = taoBaoOrderService.getTaoBaoOrderByOrderId(key);
|
| | | count = (long) orderList.size();
|
| | | } else {
|
| | | orderList = taoBaoOrderService.listAllOrder(pageIndex, Constant.PAGE_SIZE);
|
| | | count = taoBaoOrderService.countAllOrder();
|
| | | }
|
| | |
|
| | | int pageSize = Constant.PAGE_SIZE;
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
|
| | | Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
|
| | | @Override
|
| | | public JsonElement serialize(Date value, Type theType, JsonSerializationContext context) {
|
| | | if (value == null) {
|
| | | return new JsonPrimitive("");
|
| | | } else {
|
| | | return new JsonPrimitive(TimeUtil.getGernalTime(value.getTime(), "yyyy-MM-dd HH:mm:ss"));
|
| | | }
|
| | | }
|
| | | }).create();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("result_list", gson.toJson(orderList));
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "updateTaoBaoOrder")
|
| | | public void updateTaoBaoOrder(String callback, String ids, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(ids)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请上传订单ID"));
|
| | | return;
|
| | | }
|
| | | net.sf.json.JSONArray idsArray = net.sf.json.JSONArray.fromObject(ids);
|
| | |
|
| | | Set<String> orderIds = new HashSet<>();
|
| | |
|
| | | for (int i = 0; i < idsArray.size(); i++) {
|
| | | TaoBaoOrder taoBaoOrder = taoBaoOrderService.selectByPrimaryKey(idsArray.optLong(i));
|
| | | orderIds.add(taoBaoOrder.getOrderId());
|
| | | }
|
| | |
|
| | | Long[] startTimes = new Long[orderIds.size()];
|
| | | Long[] endTimes = new Long[orderIds.size()];
|
| | |
|
| | | int p = 0;
|
| | | for (Iterator<String> its = orderIds.iterator(); its.hasNext();) {
|
| | | String orderId = its.next();
|
| | | List<TaoBaoOrder> list = taoBaoOrderService.getTaoBaoOrderByOrderId(orderId);
|
| | | startTimes[p] = TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss") - 1000L;
|
| | | endTimes[p] = TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss") + 1000L;
|
| | | p++;
|
| | | }
|
| | |
|
| | | for (int i = 0; i < idsArray.size(); i++) {
|
| | | updateRelationAndSpecialOrderJob.updateRelationAndSpecialOrder(startTimes[i], endTimes[i]);
|
| | | updateOrderJob.updateOrder(startTimes[i], endTimes[i]);
|
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("更新成功"));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("更新失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.controller.admin.order; |
| | | |
| | | import com.google.gson.*; |
| | | import com.yeshi.common.entity.PageEntity; |
| | | import com.yeshi.fanli.dao.mybatis.HongBaoV2Mapper; |
| | | import com.yeshi.fanli.dao.mybatis.order.CommonOrderMapper; |
| | | import com.yeshi.fanli.dao.mybatis.order.HongBaoOrderMapper; |
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper; |
| | | import com.yeshi.fanli.dao.taobao.TaoBaoOrderBackUpDao; |
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData; |
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2; |
| | | import com.yeshi.fanli.entity.order.CommonOrder; |
| | | import com.yeshi.fanli.entity.order.HongBaoOrder; |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder; |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrderBackUp; |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder; |
| | | import com.yeshi.fanli.job.order.taobao.TaoBaoOrderUpdateJob; |
| | | import com.yeshi.fanli.job.order.taobao.UpdateOrderJob; |
| | | import com.yeshi.fanli.job.order.taobao.UpdateTBRelationAndSpecialOrderJob; |
| | | import com.yeshi.fanli.service.inter.order.OrderProcessService; |
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoOrderService; |
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoWeiQuanOrderService; |
| | | import com.yeshi.fanli.util.BeanUtil; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.ThreadUtil; |
| | | import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil; |
| | | import com.yeshi.fanli.util.taobao.TaoKeOrderApiUtil; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.multipart.commons.CommonsMultipartFile; |
| | | import org.yeshi.utils.JsonUtil; |
| | | import org.yeshi.utils.TimeUtil; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.lang.reflect.Type; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | @Controller |
| | | @RequestMapping("admin/new/api/v1/taobaoOrder") |
| | | public class TaoBaoOrderController { |
| | | |
| | | @Resource |
| | | private TaoBaoOrderService taoBaoOrderService; |
| | | |
| | | @Resource |
| | | private TaoBaoWeiQuanOrderService taoBaoWeiQuanOrderService; |
| | | |
| | | @Resource |
| | | private OrderProcessService orderProcessService; |
| | | |
| | | @Resource |
| | | private TaoBaoOrderUpdateJob taoBaoOrderUpdateJob; |
| | | |
| | | |
| | | @Resource |
| | | private CommonOrderMapper commonOrderMapper; |
| | | @Resource |
| | | private HongBaoOrderMapper hongBaoOrderMapper; |
| | | @Resource |
| | | private HongBaoV2Mapper hongBaoV2Mapper; |
| | | |
| | | /** |
| | | * 查询列表 - 新后台 |
| | | * |
| | | * @param callback |
| | | * @param key 查询词 名称 |
| | | * @param pageIndex |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "listTaoBaoOrder") |
| | | public void listTaoBaoOrder(AdminAcceptData acceptData, String callback, String key, Integer pageIndex, PrintWriter out) { |
| | | |
| | | try { |
| | | |
| | | if (pageIndex == null || pageIndex < 0) { |
| | | pageIndex = 1; |
| | | } |
| | | |
| | | List<TaoBaoOrder> orderList = null; |
| | | Long count = null; |
| | | |
| | | if (!StringUtil.isNullOrEmpty(key)) { |
| | | orderList = taoBaoOrderService.getTaoBaoOrderByOrderId(key); |
| | | count = (long) orderList.size(); |
| | | } else { |
| | | orderList = taoBaoOrderService.listAllOrder(pageIndex, Constant.PAGE_SIZE); |
| | | count = taoBaoOrderService.countAllOrder(); |
| | | } |
| | | |
| | | int pageSize = Constant.PAGE_SIZE; |
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1); |
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage); |
| | | |
| | | Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { |
| | | @Override |
| | | public JsonElement serialize(Date value, Type theType, JsonSerializationContext context) { |
| | | if (value == null) { |
| | | return new JsonPrimitive(""); |
| | | } else { |
| | | return new JsonPrimitive(TimeUtil.getGernalTime(value.getTime(), "yyyy-MM-dd HH:mm:ss")); |
| | | } |
| | | } |
| | | }).create(); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("pe", pe); |
| | | data.put("result_list", gson.toJson(orderList)); |
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "listTaoBaoOrderNoUpdate") |
| | | public void listTaoBaoOrderUnUpdate(AdminAcceptData acceptData, String callback, String key, Integer pageIndex, PrintWriter out) { |
| | | |
| | | try { |
| | | if (pageIndex == null || pageIndex < 0) { |
| | | pageIndex = 1; |
| | | } |
| | | |
| | | List<TaoBaoOrder> orderList = null; |
| | | Long count = null; |
| | | |
| | | if (!StringUtil.isNullOrEmpty(key)) { |
| | | orderList = taoBaoOrderService.getTaoBaoOrderByOrderId(key); |
| | | count = (long) orderList.size(); |
| | | } else { |
| | | orderList = taoBaoOrderService.listAllOrder(pageIndex, Constant.PAGE_SIZE); |
| | | count = taoBaoOrderService.countAllOrder(); |
| | | } |
| | | |
| | | int pageSize = Constant.PAGE_SIZE; |
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1); |
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage); |
| | | |
| | | Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { |
| | | @Override |
| | | public JsonElement serialize(Date value, Type theType, JsonSerializationContext context) { |
| | | if (value == null) { |
| | | return new JsonPrimitive(""); |
| | | } else { |
| | | return new JsonPrimitive(TimeUtil.getGernalTime(value.getTime(), "yyyy-MM-dd HH:mm:ss")); |
| | | } |
| | | } |
| | | }).create(); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("pe", pe); |
| | | data.put("result_list", gson.toJson(orderList)); |
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "updateTaoBaoOrder") |
| | | public void updateTaoBaoOrder(AdminAcceptData acceptData, String callback, String ids, PrintWriter out) { |
| | | try { |
| | | if (StringUtil.isNullOrEmpty(ids)) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请上传订单ID")); |
| | | return; |
| | | } |
| | | net.sf.json.JSONArray idsArray = net.sf.json.JSONArray.fromObject(ids); |
| | | |
| | | Set<String> orderIds = new HashSet<>(); |
| | | |
| | | for (int i = 0; i < idsArray.size(); i++) { |
| | | orderIds.add(idsArray.optString(i)); |
| | | } |
| | | |
| | | int p = 0; |
| | | for (Iterator<String> its = orderIds.iterator(); its.hasNext(); ) { |
| | | String orderId = its.next(); |
| | | taoBaoOrderUpdateJob.updateTaoBaoOrder(orderId); |
| | | } |
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("更新成功")); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("更新失败")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "listTaoBaoWQOrder") |
| | | public void listTaoBaoWeiQuanOrder(AdminAcceptData acceptData, String callback, String key, Integer pageIndex, PrintWriter out) { |
| | | try { |
| | | if (pageIndex == null || pageIndex < 0) { |
| | | pageIndex = 1; |
| | | } |
| | | List<TaoBaoWeiQuanOrder> orderList = null; |
| | | Long count = null; |
| | | if (!StringUtil.isNullOrEmpty(key)) { |
| | | orderList = taoBaoWeiQuanOrderService.listByOrderId(key); |
| | | count = (long) orderList.size(); |
| | | } else { |
| | | orderList = taoBaoWeiQuanOrderService.listByState(null, pageIndex, Constant.PAGE_SIZE); |
| | | count = taoBaoWeiQuanOrderService.countByState(null); |
| | | } |
| | | |
| | | int pageSize = Constant.PAGE_SIZE; |
| | | |
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1); |
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage); |
| | | |
| | | Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { |
| | | @Override |
| | | public JsonElement serialize(Date value, Type theType, JsonSerializationContext context) { |
| | | if (value == null) { |
| | | return new JsonPrimitive(""); |
| | | } else { |
| | | return new JsonPrimitive(TimeUtil.getGernalTime(value.getTime(), "yyyy-MM-dd HH:mm:ss")); |
| | | } |
| | | } |
| | | }).create(); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("pe", pe); |
| | | data.put("result_list", gson.toJson(orderList)); |
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新后台端 上传订单文件 |
| | | * |
| | | * @param acceptData |
| | | * @param file |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "uploadWQOrderFile") |
| | | public void uploadWQOrderFile(AdminAcceptData acceptData, @RequestParam("file") CommonsMultipartFile file, PrintWriter out) { |
| | | |
| | | if (file == null) { |
| | | out.print(JsonUtil.loadFalseResult("上传文件不能为空")); |
| | | return; |
| | | } |
| | | |
| | | List<TaoBaoWeiQuanOrder> orderList = null; |
| | | try { |
| | | orderList = TaoBaoOrderUtil.parseWeiQuanOrder( |
| | | file.getInputStream()); |
| | | int pos = 0; |
| | | for (TaoBaoWeiQuanOrder order : orderList) |
| | | try { |
| | | pos++; |
| | | // if (pos == 19||pos == 26) |
| | | taoBaoWeiQuanOrderService.addWeiQuanOrder(order);// 添加维权订单到数据库 |
| | | } catch (Exception e) { |
| | | System.out.println("位置:" + pos); |
| | | e.printStackTrace(); |
| | | } |
| | | // 处理维权订单 |
| | | out.print(JsonUtil.loadTrueResult("上传成功,系统正在处理中...")); |
| | | } catch (IOException e) { |
| | | out.print(JsonUtil.loadFalseResult("上传文件失败")); |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | final List<TaoBaoWeiQuanOrder> finalOrderList = orderList; |
| | | |
| | | ThreadUtil.run(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | orderProcessService.weiQuanOrder(finalOrderList); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * @return void |
| | | * @author hxh |
| | | * @description 违规订单处理 |
| | | * @date 15:06 2021/10/23 |
| | | * @param: acceptData |
| | | * @param: content |
| | | * @param: out |
| | | **/ |
| | | @RequestMapping(value = "weiGui") |
| | | public void weiGuiOrder(AdminAcceptData acceptData, String content, String callback, PrintWriter out) { |
| | | |
| | | if (StringUtil.isNullOrEmpty(content)) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请上传订单号")); |
| | | return; |
| | | } |
| | | |
| | | List<String> orderIdList = new ArrayList<>(); |
| | | Scanner scanner = new Scanner(content); |
| | | while (scanner.hasNextLine()) { |
| | | String line = scanner.nextLine(); |
| | | if (!StringUtil.isNullOrEmpty(line)) |
| | | orderIdList.add(line.trim()); |
| | | } |
| | | scanner.close(); |
| | | |
| | | if (orderIdList.size() == 0) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请上传订单号")); |
| | | return; |
| | | } |
| | | |
| | | BigDecimal fanliMoney = new BigDecimal(0); |
| | | BigDecimal unFanliMoney = new BigDecimal(0); |
| | | BigDecimal childFanliMoney = new BigDecimal(0); |
| | | int validCount = 0; |
| | | int inValidCount = 0; |
| | | Set<Long> uids = new HashSet<>(); |
| | | try { |
| | | for (int c = 0; c < orderIdList.size(); c++) { |
| | | String orderId = orderIdList.get(c); |
| | | List<CommonOrder> orderList = commonOrderMapper.listBySourceTypeAndOrderNo(Constant.SOURCE_TYPE_TAOBAO, |
| | | orderId); |
| | | if (orderList.size() > 0) { |
| | | validCount++; |
| | | for (CommonOrder commonOrder : orderList) { |
| | | uids.add(commonOrder.getUserInfo().getId()); |
| | | HongBaoOrder hongBaoOrder = hongBaoOrderMapper.selectByCommonOrderId(commonOrder.getId()); |
| | | if (hongBaoOrder != null) { |
| | | HongBaoV2 v2 = hongBaoOrder.getHongBaoV2(); |
| | | if (v2.getState() == 3) { |
| | | fanliMoney = fanliMoney.add(v2.getMoney()); |
| | | // 查询上级是否到账 |
| | | List<HongBaoV2> children = hongBaoV2Mapper.listChildrenById(v2.getId()); |
| | | if (children != null && children.size() > 0) { |
| | | for (HongBaoV2 hongBao : children) { |
| | | if (hongBao.getState() == HongBaoV2.STATE_BUKELINGQU |
| | | || hongBao.getState() == HongBaoV2.STATE_KELINGQU) { |
| | | HongBaoV2 updateHongBao = new HongBaoV2(hongBao.getId()); |
| | | updateHongBao.setState(HongBaoV2.STATE_SHIXIAO); |
| | | updateHongBao.setBeizhu("联盟违规"); |
| | | updateHongBao.setUpdateTime(new Date()); |
| | | hongBaoV2Mapper.updateByPrimaryKeySelective(updateHongBao); |
| | | } else {// |
| | | childFanliMoney = childFanliMoney.add(hongBao.getMoney()); |
| | | } |
| | | } |
| | | } |
| | | } else if (v2.getState() == 1 || v2.getState() == 2) { |
| | | unFanliMoney = unFanliMoney.add(v2.getMoney()); |
| | | HongBaoV2 update = new HongBaoV2(v2.getId()); |
| | | update.setState(HongBaoV2.STATE_SHIXIAO); |
| | | update.setBeizhu("联盟违规"); |
| | | update.setUpdateTime(new Date()); |
| | | hongBaoV2Mapper.updateByPrimaryKeySelective(update); |
| | | // 发现子订单 |
| | | List<HongBaoV2> children = hongBaoV2Mapper.listChildrenById(v2.getId()); |
| | | if (children != null && children.size() > 0) { |
| | | for (HongBaoV2 hongBao : children) { |
| | | HongBaoV2 updateHongBao = new HongBaoV2(hongBao.getId()); |
| | | updateHongBao.setState(HongBaoV2.STATE_SHIXIAO); |
| | | updateHongBao.setBeizhu("联盟违规"); |
| | | updateHongBao.setUpdateTime(new Date()); |
| | | hongBaoV2Mapper.updateByPrimaryKeySelective(updateHongBao); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else |
| | | inValidCount++; |
| | | } |
| | | |
| | | System.out.println( |
| | | validCount + "-" + inValidCount + "-" + fanliMoney + "-" + unFanliMoney + "-" + childFanliMoney); |
| | | Iterator<Long> its = uids.iterator(); |
| | | while (its.hasNext()) { |
| | | System.out.println(its.next()); |
| | | } |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("处理成功")); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("处理出错:" + e.getMessage())); |
| | | } |
| | | } |
| | | |
| | | } |