EHCache缓存清除,短信发送修改,未付款消息修改
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.cache.ehcache.EhCacheCacheManager;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private AppVersionService appVersionService;
|
| | |
|
| | | @Resource
|
| | | private EhCacheCacheManager ehCacheCacheManager;
|
| | |
|
| | | /**
|
| | | * 查询列表 - 新后台
|
| | |
| | |
|
| | | /**
|
| | | * 查询列表 - 新后台
|
| | | * |
| | | * @param callback
|
| | | * @param key 查询词 名称
|
| | | * @param key
|
| | | * 查询词 名称
|
| | | * @param pageIndex
|
| | | * @param out
|
| | | */
|
| | |
| | | AppVersionInfo appVersionInfo = new AppVersionInfo();
|
| | | appVersionInfo.setVersion("全推");
|
| | |
|
| | | |
| | | // IOS版本
|
| | | List<AppVersionInfo> list1 = appVersionService.getAppVersionInfoListByPlatform(AppVersionInfo.PLATFORM_IOS);
|
| | | if (list1 == null) {
|
| | |
| | | listIOS.add(appVersionInfo);
|
| | | listIOS.addAll(list1);
|
| | |
|
| | | |
| | | // 安卓版本
|
| | | List<AppVersionInfo> list2 = appVersionService.getAppVersionInfoListByPlatform(AppVersionInfo.PLATFORM_ANDROID);
|
| | | List<AppVersionInfo> list2 = appVersionService
|
| | | .getAppVersionInfoListByPlatform(AppVersionInfo.PLATFORM_ANDROID);
|
| | | if (list2 == null) {
|
| | | list2 = new ArrayList<AppVersionInfo>();
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "clearCaches")
|
| | | public void clearCaches(String callback, PrintWriter out) {
|
| | | ehCacheCacheManager.getCacheManager().clearAll();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(""));
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | phone = phone.replaceAll(" ", "");
|
| | |
|
| | | // 判断手机号码是否被封禁
|
| | | ForbiddenUserIdentifyCode identifyCode1 = forbiddenUserIdentifyCodeService
|
| | | .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.phone, phone);
|
| | | if (identifyCode1 != null && identifyCode1.getEffective() != null && identifyCode1.getEffective()) {
|
| | | out.print(JsonUtil.loadFalseResult(9001,"该电话号码被占用"));
|
| | | return;
|
| | | }
|
| | | |
| | | // ForbiddenUserIdentifyCode identifyCode1 = forbiddenUserIdentifyCodeService
|
| | | // .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.phone, phone);
|
| | | // if (identifyCode1 != null && identifyCode1.getEffective() != null && identifyCode1.getEffective()) {
|
| | | // out.print(JsonUtil.loadFalseResult(9001,"该电话号码被占用"));
|
| | | // return;
|
| | | // }
|
| | | // |
| | | // 判断手机号码是否被封禁
|
| | | UserInfo phoneUser = userInfoService.getEffectiveUserInfoByPhone(phone);
|
| | | if (phoneUser != null) {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | //20分钟更新一次
|
| | | @Scheduled(cron = "0 0/20 * * * ? ")
|
| | | public void doSyncJob() {
|
| | | if (!Constant.IS_TASK)
|
| | |
| | | private UserMsgReadStateService userMsgReadStateService;
|
| | |
|
| | | @Override
|
| | | public void addMsgOrderDetail(MsgOrderDetail detail) throws MsgOrderDetailException {
|
| | | public void addMsgOrderDetail(MsgOrderDetail detail, boolean needNotify) throws MsgOrderDetailException {
|
| | | if (detail == null)
|
| | | throw new MsgOrderDetailException(1, "消息为空");
|
| | | if (detail.getOrderId() == null || detail.getType() == null
|
| | | || detail.getState() == null || detail.getUser() == null)
|
| | | if (detail.getOrderId() == null || detail.getType() == null || detail.getState() == null
|
| | | || detail.getUser() == null)
|
| | | throw new MsgOrderDetailException(2, "消息不完整");
|
| | | MsgOrderDetail old = msgOrderDetailMapper.selectByUidAndOrderId(detail.getUser().getId(), detail.getOrderId());
|
| | | if (old == null) {
|
| | |
| | | update.setBeiZhu(detail.getBeiZhu());
|
| | | msgOrderDetailMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | if (needNotify)
|
| | | userMsgReadStateService.addOrderMsgUnReadCount(detail.getUser().getId(), 1);
|
| | | }
|
| | |
|
| | |
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createFanLiOrder(uid, orderId, goodsCount, orderState, payMoney,
|
| | | money, null);
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail);
|
| | |
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (payMoney == null || payMoney.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createShareOrder(uid, orderId, goodsCount, orderState, payMoney,
|
| | | money, null);
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail);
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (payMoney == null || payMoney.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, goodsCount, orderState, payMoney,
|
| | | money, null);
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail);
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (money == null || money.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, goodsCount, orderState, payMoney,
|
| | | money, String.format("由一级队员【%s】分享", getShortName(sourceUserName)));
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail);
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (money == null || money.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderFoundSuccess(Long uid, String orderId, BigDecimal payMoney, int orderType,
|
| | | Date happendDate) {
|
| | | public void orderFoundSuccess(Long uid, String orderId, BigDecimal payMoney, int orderType, Date happendDate) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createFoundOrder(uid, orderId, true, payMoney, orderType,
|
| | | happendDate, "如有疑问请联系人工客服");
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail);
|
| | | msgOrderDetailService.addMsgOrderDetail(detail, true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderFoundFail(Long uid, String orderId, BigDecimal payMoney, int orderType,
|
| | | Date happendDate) {
|
| | | public void orderFoundFail(Long uid, String orderId, BigDecimal payMoney, int orderType, Date happendDate) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createFoundOrder(uid, orderId, false, payMoney, orderType,
|
| | | happendDate, "如有疑问请联系人工客服");
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail);
|
| | | msgOrderDetailService.addMsgOrderDetail(detail, true);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | continue;
|
| | | }
|
| | | CommonOrder newCommonOrder = TaoBaoOrderUtil.convert(taoBaoOrder);
|
| | |
|
| | | // 交易ID一致才修改
|
| | | if (commonOrder.getTradeId() != null
|
| | | && commonOrder.getTradeId().equalsIgnoreCase(newCommonOrder.getTradeId())) {
|
| | |
|
| | | CommonOrder updateCommonOrder = new CommonOrder(commonOrder.getId());
|
| | | updateCommonOrder.seteIncome(newCommonOrder.geteIncome());
|
| | | updateCommonOrder.setEstimate(newCommonOrder.getEstimate());
|
| | |
| | | updateCommonOrder.setTradeId(newCommonOrder.getTradeId());
|
| | | commonOrderMapper.updateByPrimaryKeySelective(updateCommonOrder);
|
| | | commonOrderList.add(commonOrderMapper.selectByPrimaryKey(updateCommonOrder.getId()));
|
| | | continue;
|
| | | } else
|
| | | commonOrderList.add(commonOrder);
|
| | | }
|
| | | }
|
| | | return commonOrderList;
|
| | |
| | | package com.yeshi.fanli.service.impl.taobao.dataoke;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | |
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.dataoke.DaTaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.taobao.DaTaoKeUtil;
|
| | |
| | |
|
| | | @Override
|
| | | public void startSyncGoods() {
|
| | | LogHelper.test("大淘客同步开始");
|
| | | // 判断是否有正在进行的更新
|
| | | long firstTime = System.currentTimeMillis() - 1000 * 60 * 5L;
|
| | | int totalCount = 0;
|
| | |
| | | * @param detail
|
| | | * @throws MsgOrderDetailException
|
| | | */
|
| | | public void addMsgOrderDetail(MsgOrderDetail detail) throws MsgOrderDetailException;
|
| | | public void addMsgOrderDetail(MsgOrderDetail detail,boolean needNotify) throws MsgOrderDetailException;
|
| | |
|
| | | /**
|
| | | * 根据订单号用户ID更新数据
|