From d844a30a240603daab46e8b2b32b01cd90f1272e Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期四, 23 四月 2020 09:59:31 +0800 Subject: [PATCH] 会员升级调整 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java | 431 ++++++++++------------------------------------------- 1 files changed, 81 insertions(+), 350 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java index 5a3221c..e81b3a7 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java @@ -1,6 +1,5 @@ package com.yeshi.fanli.service.impl.user.vip; -import java.math.BigDecimal; import java.util.Collections; import java.util.Comparator; import java.util.Date; @@ -8,40 +7,29 @@ import javax.annotation.Resource; -import org.springframework.context.annotation.Lazy; import org.springframework.core.task.TaskExecutor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import org.yeshi.utils.DateUtil; import com.aliyun.openservices.ons.api.Message; import com.aliyun.openservices.ons.api.Producer; import com.yeshi.fanli.dao.mybatis.user.vip.UserVIPPreInfoMapper; import com.yeshi.fanli.dto.mq.user.UserTopicTagEnum; import com.yeshi.fanli.dto.mq.user.body.UserLevelChangedMQMsg; -import com.yeshi.fanli.entity.bus.user.HongBaoV2; import com.yeshi.fanli.entity.bus.user.ThreeSale; import com.yeshi.fanli.entity.bus.user.UserInfo; -import com.yeshi.fanli.entity.bus.user.UserInfoExtra; import com.yeshi.fanli.entity.bus.user.UserInfoRegister; import com.yeshi.fanli.entity.bus.user.UserInviteValidNum; -import com.yeshi.fanli.entity.bus.user.UserSystemCoupon; import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum; import com.yeshi.fanli.entity.bus.user.vip.UserLevelUpgradedNotify; import com.yeshi.fanli.entity.bus.user.vip.UserVIPPreInfo; -import com.yeshi.fanli.entity.integral.IntegralDetail; -import com.yeshi.fanli.entity.system.ConfigKeyEnum; import com.yeshi.fanli.exception.user.vip.UserVIPPreInfoException; import com.yeshi.fanli.log.LogHelper; -import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.service.inter.count.HongBaoV2CountService; import com.yeshi.fanli.service.inter.msg.UserOtherMsgNotificationService; import com.yeshi.fanli.service.inter.user.UserInfoExtraService; import com.yeshi.fanli.service.inter.user.UserInfoRegisterService; import com.yeshi.fanli.service.inter.user.UserInfoService; -import com.yeshi.fanli.service.inter.user.UserInviteSeparateService; -import com.yeshi.fanli.service.inter.user.UserSystemCouponService; -import com.yeshi.fanli.service.inter.user.integral.IntegralDetailService; import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce; import com.yeshi.fanli.service.inter.user.invite.UserInviteMsgNotificationService; import com.yeshi.fanli.service.inter.user.invite.UserInviteValidNumService; @@ -70,50 +58,37 @@ @Resource private UserVipConfigService userVipConfigService; - + @Resource private UserInviteValidNumService userInviteValidNumService; - + @Resource private UserInfoExtraService userInfoExtraService; - - @Resource - private IntegralDetailService integralDetailService; - - @Resource - private ConfigService configService; - - @Lazy - @Resource - private UserSystemCouponService userSystemCouponService; - - @Resource - private UserInviteSeparateService userInviteSeparateService; - + + @Resource private UserInfoService userInfoService; - + @Resource private UserOtherMsgNotificationService userOtherMsgNotificationService; - + @Resource private UserAccountMsgNotificationService userAccountMsgNotificationService; - + @Resource private UserInfoRegisterService userInfoRegisterService; - + @Resource private UserInviteMsgNotificationService userInviteMsgNotificationService; - + @Resource private UserLevelUpgradedNotifyService userLevelUpgradedNotifyService; - + @Resource(name = "taskExecutor") private TaskExecutor executor; - + @Resource(name = "producer") private Producer producer; - @Override public void addUserVIPPreInfo(UserVIPPreInfo info) throws UserVIPPreInfoException { @@ -135,7 +110,6 @@ return null; Comparator<UserVIPPreInfo> cm = new Comparator<UserVIPPreInfo>() { - @Override public int compare(UserVIPPreInfo o1, UserVIPPreInfo o2) { return o2.getProcess() - o1.getProcess(); @@ -145,12 +119,11 @@ Collections.sort(infoList, cm); return infoList.get(0); } - + @Override - public UserVIPPreInfo getVipByProcess(Long uid, int process){ + public UserVIPPreInfo getVipByProcess(Long uid, int process) { return userVIPPreInfoMapper.selectByUidAndProcess(uid, process); } - @Override public UserVIPPreInfo getProcessInfo(Long uid, Date time) { @@ -158,7 +131,6 @@ if (infoList == null || infoList.size() == 0) return null; Comparator<UserVIPPreInfo> cm = new Comparator<UserVIPPreInfo>() { - @Override public int compare(UserVIPPreInfo o1, UserVIPPreInfo o2) { return o2.getProcess() - o1.getProcess(); @@ -173,104 +145,40 @@ return null; } - @Override @RequestSerializableByKeyService(key = "#uid") @Transactional(rollbackFor = Exception.class) - public void upgradeVipByFanLiOrder(Long uid) { + public void upgradeVipByMyOrder(Long uid) { UserVIPPreInfo latest = getLatestProcessInfo(uid); if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_2) { return; } - + if (latest == null) { String inviteCode = userInfoExtraService.getInviteCodeByUid(uid); if (StringUtil.isNullOrEmpty(inviteCode)) { - return; //鏈縺娲婚個璇风爜 + return; // 鏈縺娲婚個璇风爜 } - } - - // 鑷喘璁㈠崟鍒拌处 - long doneZiGou = hongBaoV2CountService.counOrderByUidAndOrderType(uid, Constant.VIP_ORDER_PAY, HongBaoV2.TYPE_ZIGOU); + } + + // 鑷喘+ 鍒嗕韩璁㈠崟鍒拌处 + long doneZiGou = hongBaoV2CountService.countMyDirectOrderByCashArrival(uid, Constant.VIP_ORDER_PAY); // 楂樼骇浼氬憳闄愬埗鏉′欢 long limitZiGou7 = 0; - String zigou7 = userVipConfigService.getValueByKey("vip_pre_7_zigou_order_count"); + String zigou7 = userVipConfigService.getValueByKey("vip_pre_7_order_count"); if (!StringUtil.isNullOrEmpty(zigou7)) { limitZiGou7 = Long.parseLong(zigou7); } - // 楠岃瘉鏄惁婊¤冻鍗囩骇楂樼骇浼氬憳 if (doneZiGou >= limitZiGou7) { - twoProcess(uid, limitZiGou7, null, Constant.TYPE_REBATE); - return; - } - - // 宸茬粡鎴愪负鏅�氫細鍛� - if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_1) { - return; - } - - // 鏅�氫細鍛樻潯浠� - long limitZiGou3 = 0; - String zigou3 = userVipConfigService.getValueByKey("vip_pre_3_zigou_order_count"); - if (!StringUtil.isNullOrEmpty(zigou3)) { - limitZiGou3 = Long.parseLong(zigou3); - } - if (doneZiGou >= limitZiGou3) { - oneProcess(uid, limitZiGou3, null, Constant.TYPE_REBATE); - } - } - - - @Override - @RequestSerializableByKeyService(key = "#uid") - @Transactional(rollbackFor = Exception.class) - public void upgradeVipByShareOrder(Long uid) { - UserVIPPreInfo latest = getLatestProcessInfo(uid); - if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_2) { - return; - } - - if (latest == null) { - String inviteCode = userInfoExtraService.getInviteCodeByUid(uid); - if (StringUtil.isNullOrEmpty(inviteCode)) { - return; //鏈縺娲婚個璇风爜 + try { + twoProcess(uid, limitZiGou7, null); + } catch (UserVIPPreInfoException e) { + } - } - - // 鍒嗕韩璁㈠崟宸插埌璐� - long doneShare = hongBaoV2CountService.counOrderByUidAndOrderType(uid, Constant.VIP_ORDER_PAY, - HongBaoV2.TYPE_SHARE_GOODS); - // 楂樼骇浼氬憳闄愬埗鏉′欢 - long limitShare7 = 0; - String share7 = userVipConfigService.getValueByKey("vip_pre_7_share_order_count"); - if (!StringUtil.isNullOrEmpty(share7)) { - limitShare7 = Long.parseLong(share7); } - - // 楠岃瘉鏄惁婊¤冻鍗囩骇楂樼骇浼氬憳 - if (doneShare >= limitShare7) { - twoProcess(uid, limitShare7, null, Constant.TYPE_SHAER); - return; - } - - // 宸茬粡鎴愪负鏅�氫細鍛� - if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_1) { - return; - } - - // 鏅�氫細鍛樻潯浠� - long limitShare3 = 0; - String share3 = userVipConfigService.getValueByKey("vip_pre_3_share_order_count"); - if (!StringUtil.isNullOrEmpty(share3)) { - limitShare3 = Long.parseLong(share3); - } - if (doneShare >= limitShare3) { - oneProcess(uid, limitShare3, null, Constant.TYPE_SHAER); - } } - - + @Override @RequestSerializableByKeyService(key = "#tid") @Transactional(rollbackFor = Exception.class) @@ -280,7 +188,7 @@ return; } Long bossId = boss.getId(); - + // 楠岃瘉涓婁笂绾� -闂存帴绮変笣鏄惁婊¤冻 executor.execute(new Runnable() { @Override @@ -288,12 +196,12 @@ upgradeVipByTeamNum(bossId); } }); - + UserVIPPreInfo latest = getLatestProcessInfo(bossId); if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_2) { return; } - + // 鏈夋晥绮変笣 int doneFirst = 0; int doneSecond = 0; @@ -302,7 +210,7 @@ doneFirst = userInviteValidNum.getNumFirst() == null ? 0 : userInviteValidNum.getNumFirst(); doneSecond = userInviteValidNum.getNumSecond() == null ? 0 : userInviteValidNum.getNumSecond(); } - + long limitFirst7 = 0; String first7 = userVipConfigService.getValueByKey("vip_pre_7_first_level_team_count"); if (!StringUtil.isNullOrEmpty(first7)) { @@ -313,106 +221,17 @@ if (!StringUtil.isNullOrEmpty(second7)) { limitSecond7 = Long.parseLong(second7); } - + // 楠岃瘉鏄惁婊¤冻鍗囩骇楂樼骇浼氬憳 if (doneFirst >= limitFirst7 && doneSecond >= limitSecond7) { - twoProcess(bossId, limitFirst7, limitSecond7, null); - return; - } - - // 宸茬粡鎴愪负鏅�氫細鍛� - if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_1) { - return; - } - - // 鏅�氫細鍛� 鏉′欢 - long limitFirst3 = 0; - String first = userVipConfigService.getValueByKey("vip_pre_3_first_level_team_count"); - if (!StringUtil.isNullOrEmpty(first)) { - limitFirst3 = Long.parseLong(first); - } - - long limitSecond3 = 0; - String second = userVipConfigService.getValueByKey("vip_pre_3_second_level_team_count"); - if (!StringUtil.isNullOrEmpty(second)) { - limitSecond3 = Long.parseLong(second); - } - - if (doneFirst >= limitFirst3 && doneSecond >= limitSecond3) { - oneProcess(bossId, limitFirst3, limitSecond3, null); + try { + twoProcess(bossId, limitFirst7, limitSecond7); + } catch (UserVIPPreInfoException e) { + + } } } - - - - - /** - * 涓�闃舵 - * - * @param uid - * @param countZiGou - * @param countShare - * @param firstTeam - * @param secondTeam - */ - @Transactional(rollbackFor = Exception.class) - private void oneProcess(Long uid, long limit1, Long limit2, Integer type) { - try { - String item = null; - if (type == null) { - item = "閭�璇风矇涓�"; - } else if (type == Constant.TYPE_REBATE) { - item = "杩斿埄璁㈠崟"; - } else { - item = "鍒嗕韩璁㈠崟"; - } - Date upgradeTime = new Date(); - UserVIPPreInfo info = new UserVIPPreInfo(); - info.setUid(uid); - info.setProcess(UserVIPPreInfo.PROCESS_1); - info.setCreateTime(upgradeTime); - info.setUpdateTime(upgradeTime); - addUserVIPPreInfo(info); - - // 鍗囩骇娑堟伅 - Date registerTime = new Date(1577836800000L); - UserInfoRegister userInfoRegister = userInfoRegisterService.selectByPrimaryKey(uid); - if (userInfoRegister != null && userInfoRegister.getCreateTime() != null) { - registerTime = userInfoRegister.getCreateTime(); - } - int daysBetween = TimeUtil.getDayDifferenceCount(registerTime, new Date()); - userAccountMsgNotificationService.vipPreUpgrade(uid, "蹇渷杈句汉", "鏅�氫細鍛�", daysBetween, limit1, limit2, type); - - // 鍗囩骇寮规鎻愮ず - UserLevelUpgradedNotify notify = new UserLevelUpgradedNotify(); - notify.setUid(uid); - notify.setFromLevel(UserLevelEnum.daRen); -// notify.setToLevel(UserLevelEnum.normalVIP); - notify.setValid(true); - notify.setCreateTime(new Date()); - userLevelUpgradedNotifyService.addUserLevelUpgradedNotify(notify); - - // 閲戝竵濂栧姳 - goldcoinReward(uid); - - // 鏄惁瀛樺湪涓嬬骇鑴辩鏈熼檺 -鏇存柊涓嶈劚绂� - userInviteSeparateService.updateInvalidByBossId(uid); - // 鎻愰啋涓婄骇 - remindBoss(uid, "鏅�氫細鍛�", item, upgradeTime, true); - -// if (!Constant.IS_TEST) { -// UserLevelChangedMQMsg msg = new UserLevelChangedMQMsg(uid, UserLevelEnum.daRen,UserLevelEnum.normalVIP, new Date()); -// Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.userLevelChanged, msg); -// producer.send(message); -// } - } catch (Exception e) { - e.printStackTrace(); - } - } - - - /** * 浜岄樁娈� * @@ -423,149 +242,61 @@ * @param secondTeam */ @Transactional(rollbackFor = Exception.class) - private void twoProcess(Long uid, long limit1, Long limit2, Integer type) { + private void twoProcess(Long uid, long limit1, Long limit2) throws UserVIPPreInfoException{ + String item = null; + if (limit2 == null) { + item = "杩斿埄+鍒嗕韩璁㈠崟"; + } else { + item = "鐩存帴+闂存帴绮変笣"; + } + + Date upgradeTime = new Date(); + UserVIPPreInfo info = new UserVIPPreInfo(); + info.setUid(uid); + info.setProcess(UserVIPPreInfo.PROCESS_2); + info.setCreateTime(upgradeTime); + info.setUpdateTime(upgradeTime); + addUserVIPPreInfo(info); + + // 鍗囩骇寮规鎻愮ず + UserLevelUpgradedNotify notify = new UserLevelUpgradedNotify(); + notify.setUid(uid); + notify.setFromLevel(UserLevelEnum.daRen); + notify.setToLevel(UserLevelEnum.highVIP); + notify.setValid(true); + notify.setCreateTime(new Date()); + userLevelUpgradedNotifyService.addUserLevelUpgradedNotify(notify); + try { - String item = null; - if (type == null) { - item = "閭�璇风矇涓�"; - } else if (type == Constant.TYPE_REBATE) { - item = "杩斿埄璁㈠崟"; - } else { - item = "鍒嗕韩璁㈠崟"; - } - - Date upgradeTime = new Date(); - UserVIPPreInfo info = new UserVIPPreInfo(); - info.setUid(uid); - info.setProcess(UserVIPPreInfo.PROCESS_2); - info.setCreateTime(upgradeTime); - info.setUpdateTime(upgradeTime); - addUserVIPPreInfo(info); - - // 鍗囩骇寮规鎻愮ず - UserLevelUpgradedNotify notify = new UserLevelUpgradedNotify(); - notify.setUid(uid); -// notify.setFromLevel(UserLevelEnum.normalVIP); - notify.setToLevel(UserLevelEnum.highVIP); - notify.setValid(true); - notify.setCreateTime(new Date()); - userLevelUpgradedNotifyService.addUserLevelUpgradedNotify(notify); - - // 鍗囩骇绂忓埄-璧犻�佸鍔卞埜 - String rewardCoupon = userVipConfigService.getValueByKey("vip_pre_7_gift_reward_coupon"); - if (!StringUtil.isNullOrEmpty(rewardCoupon)) { - int num = Integer.parseInt(rewardCoupon); - BigDecimal percent = new BigDecimal(configService.get(ConfigKeyEnum.exchangeRebatePercent.getKey())); - userSystemCouponService.rewardCouponWin(uid, UserSystemCoupon.SOURCE_SYSTEM_PUSH, num, true, percent); - } - // 鍗囩骇娑堟伅 -// UserLevelEnum fromLevel = UserLevelEnum.normalVIP; - int daysBetween = 0; - boolean divorced = false; - String beforeName = "蹇渷杈句汉"; - UserVIPPreInfo pre1 = userVIPPreInfoMapper.selectByUidAndProcess(uid, UserVIPPreInfo.PROCESS_1); - if (pre1 != null) { - beforeName = "鏅�氫細鍛�"; - daysBetween = DateUtil.daysBetween(pre1.getCreateTime(), upgradeTime); - } else { - Date registerTime = new Date(1577836800000L); - UserInfoRegister userInfoRegister = userInfoRegisterService.selectByPrimaryKey(uid); - if (userInfoRegister != null && userInfoRegister.getCreateTime() != null) { - registerTime = userInfoRegister.getCreateTime(); - } - daysBetween = TimeUtil.getDayDifferenceCount(registerTime, upgradeTime); - - // 閲戝竵濂栧姳 锛堢洿鎺ュ崌绾ч珮绾т細鍛樿ˉ榻愪竴绾у鍔憋級 - goldcoinReward(uid); - // 闇�瑕佸彂閫佽劚绂讳俊鎭� - divorced = true; -// fromLevel = UserLevelEnum.daRen; + Date registerTime = new Date(1577836800000L); + UserInfoRegister userInfoRegister = userInfoRegisterService.selectByPrimaryKey(uid); + if (userInfoRegister != null && userInfoRegister.getCreateTime() != null) { + registerTime = userInfoRegister.getCreateTime(); } - userAccountMsgNotificationService.vipPreUpgrade(uid, beforeName, "楂樼骇浼氬憳", daysBetween, limit1, limit2, type); + int daysBetween = TimeUtil.getDayDifferenceCount(registerTime, upgradeTime); + userAccountMsgNotificationService.vipPreUpgrade(uid, "蹇渷杈句汉", "楂樼骇浼氬憳", daysBetween, limit1, limit2); - // 鎻愰啋涓婄骇 - remindBoss(uid, "楂樼骇浼氬憳", item, upgradeTime, divorced); - - -// if (!Constant.IS_TEST) { -// UserLevelChangedMQMsg msg = new UserLevelChangedMQMsg(uid, fromLevel,UserLevelEnum.highVIP, new Date()); -// Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.userLevelChanged, msg); -// producer.send(message); -// } + // 鐩存帴绮変笣鍗囩骇鎻愰啋 + ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid); + if (threeSale != null) { + Long bossId = threeSale.getBoss().getId(); + UserInfo userInfo = userInfoService.selectByPKey(uid); + userInviteMsgNotificationService.fansUpgrade(bossId, "楂樼骇浼氬憳", userInfo.getNickName(), item, upgradeTime); + } } catch (Exception e) { e.printStackTrace(); LogHelper.error(e); } - } - - /** - * 鍗囩骇濂栧姳閲戝竵 - * @param uid - */ - private void goldcoinReward(Long uid) { - String goldcoin = userVipConfigService.getValueByKey("vip_pre_3_gift_goldcoin"); - if (!StringUtil.isNullOrEmpty(goldcoin)) { - int goldcoinNum = Integer.parseInt(goldcoin); - // 娣诲姞閲戝竵鏄庣粏 - IntegralDetail detail = new IntegralDetail(); - detail.setTitle("鍗囩骇VIP绂忓埄"); - detail.setUid(uid); - detail.setMoney(Integer.parseInt(goldcoin)); - detail.setCreateTime(new Date()); - detail.setUniqueKey("VIP-3-" + uid); - integralDetailService.insertSelective(detail); - // 娣诲姞閲戝竵 - userInfoExtraService.addGoldCoinByUid(uid, Integer.parseInt(goldcoin)); - // 娑堟伅 - UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid); - userOtherMsgNotificationService.goldCoinSystemGiveMsg(uid, goldcoinNum, userInfoExtra.getGoldCoin()); + + if (!Constant.IS_TEST) { + UserLevelChangedMQMsg msg = new UserLevelChangedMQMsg(uid, UserLevelEnum.daRen, UserLevelEnum.highVIP, + new Date()); + Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.userLevelChanged, msg); + producer.send(message); } } - - - @Override - public void remindBoss(Long uid, String rankName, String item, Date time, boolean divorced) { - // 鏄惁瀛樺湪涓婄骇 - ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid); - if (threeSale == null) - return; - Long bossId = threeSale.getBoss().getId(); - UserInfo userInfo = userInfoService.selectByPKey(uid); - - // 绮変笣鍗囩骇鎻愰啋 - userInviteMsgNotificationService.fansUpgrade(bossId, "鐩存帴绮変笣", rankName, userInfo.getNickName(), item, time); - - // 鏄惁瀛樺湪涓婁笂绾� - ThreeSale threeSaleSuper = threeSaleSerivce.getMyBoss(bossId); - if (threeSaleSuper != null) { // 绮変笣鍗囩骇鎻愰啋 - Long bossIdSuper = threeSaleSuper.getBoss().getId(); - userInviteMsgNotificationService.fansUpgrade(bossIdSuper, "闂存帴绮変笣", rankName, userInfo.getNickName(), item, time); - } - - // 鏄惁鍗囩骇鑴辩 - if (!divorced) { - return; - } - - UserVIPPreInfo latestInfo = getLatestProcessInfo(bossId); - if (latestInfo == null) { - // 娣诲姞鑴辩鍏崇郴鍊掕鏃� - userInviteSeparateService.addPreSeparateRecord(uid, bossId); - - // 鐩存帴绮変笣鑴辩-寮�濮嬭劚绂绘彁閱� - userInviteMsgNotificationService.fansPreDivorced(bossId, rankName, userInfo.getNickName(), time); - - //闂存帴绮変笣鑴辩-寮�濮嬭劚绂绘彁閱� - if (threeSaleSuper != null) { - UserInfo boss = userInfoService.selectByPKey(bossId); - Long bossIdSuper = threeSaleSuper.getBoss().getId(); - userInviteMsgNotificationService.fansPredivorcedIndirect(bossIdSuper, rankName, userInfo.getNickName(), - boss.getNickName(), time); - } - } - } - + @Override public UserVIPPreInfo selectByUidAndProcess(Long uid, int process) { return userVIPPreInfoMapper.selectByUidAndProcess(uid, process); -- Gitblit v1.8.0