| | |
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | 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;
|
| | |
| | | // 单笔收益金额
|
| | | BigDecimal money = hongBao.getMoney();
|
| | |
|
| | | BigDecimal payMoney = hongBao.getPayMoney();
|
| | |
|
| | | map.put("getTime",getTime);
|
| | |
|
| | |
| | | /* 订单状态判断:1 订单已付款 2、订单已结算 4、订单失效 */
|
| | | if (state == HongBao.STATE_SHIXIAO) {
|
| | | map.put("orderState",4); // 订单失效
|
| | | } else if (state == HongBao.STATE_BUKELINGQU || state == HongBao.STATE_KELINGQU) {
|
| | | if (preGettime != null && preGettime > 0) { |
| | | map.put("orderState",2); // 订单结算
|
| | | } else if (state == HongBao.STATE_BUKELINGQU) {
|
| | | Integer orderState = null;
|
| | | |
| | | if (type == HongBao.TYPE_SHARE_GOODS) {
|
| | | // 分享订单 |
| | | Long hongbaoId = hongBao.getId();
|
| | | PidOrder pidOrder = pidOrderService.getPidOrderByHongBaoId(hongbaoId);
|
| | | String pidstate = pidOrder.getState();
|
| | | if ("订单付款".equals(pidstate)) {
|
| | | orderState = 1;
|
| | | } else if ("订单结算".equals(pidstate)) {
|
| | | orderState = 2; |
| | | } else if ("订单失效".equals(pidstate)) {
|
| | | orderState = 4;
|
| | | }
|
| | | } else {
|
| | | map.put("orderState",1); // 订单已付款
|
| | | if (preGettime != null && preGettime > 0) { |
| | | orderState = 2; // 订单结算
|
| | | } else {
|
| | | orderState = 1; // 订单已付款
|
| | | }
|
| | | }
|
| | | } else {
|
| | | map.put("orderState",orderState);
|
| | | |
| | | } else if (state == HongBao.STATE_KELINGQU || state == HongBao.STATE_YILINGQU) {
|
| | | map.put("orderState",2); // 订单结算
|
| | | }
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 校验用户资金是否异常
|
| | | * |
| | | * @param uid
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "checkMoney")
|
| | | public void checkMoney(String callback, String uid, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(uid)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("UID不能为空"));
|
| | | 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) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("资金正常"));
|
| | | } else {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("资金异常"));
|
| | | }
|
| | | }
|
| | | |
| | | }
|