| | |
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.ExtractRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.LostOrder;
|
| | | import com.yeshi.fanli.entity.bus.user.PreviewInfo.PreviewEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.SMSHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.AccountMessageService;
|
| | | import com.yeshi.fanli.service.inter.user.BindRemindService;
|
| | | import com.yeshi.fanli.service.inter.user.MaskKeyService;
|
| | | import com.yeshi.fanli.service.inter.user.PreviewInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.ShamUserService;
|
| | | import com.yeshi.fanli.service.inter.user.SpreadUserImgService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | |
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | | import com.yeshi.fanli.util.wx.WXLoginUtil;
|
| | | import com.yeshi.fanli.vo.user.MineInfoVO;
|
| | | import com.yeshi.fanli.vo.user.UserInfoExtraVO;
|
| | | import com.yeshi.fanli.vo.user.UserSettingsVO;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private GiveVIPApplyInfoService giveVIPApplyInfoService;
|
| | | |
| | | @Resource
|
| | | private PreviewInfoService previewInfoService;
|
| | | |
| | |
|
| | | private static final String EXTRACT_MIN_MONEY = ConfigKeyEnum.extractMoneyMin.getKey();
|
| | | private static final String EXTRACT_MAX_MONEY = ConfigKeyEnum.extractMoneyMAX.getKey();
|
| | |
| | |
|
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | UserInviteLevelEnum level = null;
|
| | | // VIP预览信息
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | level = userInviteService.getUserInviteLevelNew(uid);
|
| | | } else {
|
| | | level = userInviteService.getUserInviteLevel(uid);
|
| | | String redisContent = previewInfoService.getRedisContent(uid, PreviewEnum.mineInfo);
|
| | | if (!StringUtil.isNullOrEmpty(redisContent)) {
|
| | | MineInfoVO vo = new Gson().fromJson(redisContent, MineInfoVO.class);
|
| | | if (vo != null) {
|
| | | if (!StringUtil.isNullOrEmpty(vo.getBalance()))
|
| | | userInfo.setMyHongBao(new BigDecimal(vo.getBalance()));
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(vo.getLevel()))
|
| | | for (UserInviteLevelEnum levelEnum: UserInviteLevelEnum.values()) {
|
| | | if (levelEnum.name().equals(vo.getLevel())) {
|
| | | level = levelEnum;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | if (level == null) {
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | level = userInviteService.getUserInviteLevelNew(uid);
|
| | | } else {
|
| | | level = userInviteService.getUserInviteLevel(uid);
|
| | | }
|
| | | }
|
| | | JSONObject inviteLevel = new JSONObject();
|
| | | inviteLevel.put("level", level.name());
|
| | |
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | | |
| | | @Resource
|
| | | private UserMoneyControllerV2 userMoneyControllerV2;
|
| | | |
| | |
|
| | | /**
|
| | | * 保存资金信息
|
| | |
| | |
|
| | | @RequestMapping(value = "getMoneyInfo")
|
| | | public void getMoneyInfo(String callback, AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | MoneyStatisticVO dto = null;
|
| | | PreviewInfo previewInfo = previewInfoService.get(uid, PreviewEnum.moneyInfo);
|
| | | if (previewInfo == null || StringUtil.isNullOrEmpty(previewInfo.getContent())) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | if (previewInfo != null && !StringUtil.isNullOrEmpty(previewInfo.getContent())) {
|
| | | dto = new Gson().fromJson(previewInfo.getContent(), MoneyStatisticVO.class);
|
| | | } else {
|
| | | dto = userMoneyControllerV2.createMoneyStatistic(uid);
|
| | | }
|
| | | MoneyStatisticVO dto = new Gson().fromJson(previewInfo.getContent(), MoneyStatisticVO.class);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(dto));
|
| | | }
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveMineInfo")
|
| | | public void saveMineInfo(String callback, AcceptData acceptData, MineInfoVO infoVO, MultipartFile file,
|
| | | PrintWriter out) {
|
| | | public void saveMineInfo(String callback, AcceptData acceptData, MineInfoVO infoVO, PrintWriter out) {
|
| | | if (infoVO == null || infoVO.getUid() == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | | }
|
| | | try {
|
| | | previewInfoService.saveMineInfo(infoVO, file);
|
| | | previewInfoService.saveMineInfo(infoVO);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | | import com.google.gson.JsonPrimitive;
|
| | | import com.google.gson.JsonSerializationContext;
|
| | | import com.google.gson.JsonSerializer;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.PreviewInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.PreviewInfo.PreviewEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.money.TeamEincomeRecord;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
| | |
| | | import com.yeshi.fanli.service.inter.money.extract.ExtractService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoV2Service;
|
| | | import com.yeshi.fanli.service.inter.order.OrderMoneyDailyCountService;
|
| | | import com.yeshi.fanli.service.inter.user.PreviewInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | |
|
| | | @Resource
|
| | | private TeamEincomeRecordService teamEincomeRecordService;
|
| | | |
| | | @Resource
|
| | | private PreviewInfoService previewInfoService;
|
| | | |
| | |
|
| | | private Gson getGson() {
|
| | | GsonBuilder builder = new GsonBuilder();
|
| | |
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | | |
| | | // VIP数据预览
|
| | | MoneyStatisticVO vo = null;
|
| | | String redisContent = previewInfoService.getRedisContent(uid, PreviewEnum.moneyInfo);
|
| | | if (!StringUtil.isNullOrEmpty(redisContent)) {
|
| | | vo = new Gson().fromJson(redisContent, MoneyStatisticVO.class);
|
| | | if (vo != null) {
|
| | | vo.setLink(configService.get(ConfigKeyEnum.autoExtractHelpUrl.getKey()));
|
| | | vo.setExtractDesc("提现金额就是已成功提现到支付宝的资金");
|
| | | vo.setMoneyArrivalDesc("订单已到账后提现时间和金额均不受限制");
|
| | | }
|
| | | }
|
| | | |
| | | if (vo == null) {
|
| | | vo = createMoneyStatistic(uid);
|
| | | }
|
| | | |
| | | Gson gson = getGson();
|
| | | out.print(JsonUtil.loadTrueResult(gson.toJson(vo)));
|
| | | }
|
| | | |
| | | |
| | | public MoneyStatisticVO createMoneyStatistic(Long uid) {
|
| | | UserInfo user = userInfoService.getUserById(uid);
|
| | |
|
| | | MoneyStatisticVO vo = new MoneyStatisticVO();
|
| | |
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | calendar.add(Calendar.MONTH, -1);
|
| | | vo.setMonthPredict(cratePredictVO(orderMoneyDailyCountService.query(uid, minDate, maxDate)));
|
| | |
|
| | | Gson gson = getGson();
|
| | | out.print(JsonUtil.loadTrueResult(gson.toJson(vo)));
|
| | | return vo;
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @RequestMapping(value = "getUserMoneyInfo")
|
| | | public void getUserMoneyInfo(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | List<Extract> list = extractService.getExtractSucceedRecord(page, Constant.PAGE_SIZE, uid);
|
| | | if (list == null) {
|
| | | list = new ArrayList<>();
|
| | | List<Extract> list = null;
|
| | | String redisContent = previewInfoService.getRedisContent(uid, PreviewEnum.extractRecord);
|
| | | if (!StringUtil.isNullOrEmpty(redisContent)) {
|
| | | Gson gson = new Gson();
|
| | | list = gson.fromJson(redisContent, new TypeToken<ArrayList<Extract>>() {}.getType());
|
| | | }
|
| | | |
| | | // 查询真实
|
| | | long count = 0;
|
| | | if (list == null) {
|
| | | list = extractService.getExtractSucceedRecord(page, Constant.PAGE_SIZE, uid);
|
| | | count = extractService.countExtractSucceedRecord(uid);
|
| | | }
|
| | | |
| | | if (list == null)
|
| | | list = new ArrayList<>();
|
| | |
|
| | | JSONArray JSONArray = new JSONArray();
|
| | | for (Extract extract : list) {
|
| | |
| | | }
|
| | |
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("count", extractService.countExtractSucceedRecord(uid));
|
| | | json.put("count", count == 0 ? list.size() : 0);
|
| | | json.put("list", JSONArray);
|
| | | out.print(JsonUtil.loadTrueResult(json));
|
| | | }
|
| | |
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.NumberUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dto.order.UserTeamLevel;
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.bus.user.PreviewInfo.PreviewEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMapService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoWeiQuanOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.PreviewInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | |
| | | import com.yeshi.fanli.vo.order.HongBaoCountVO;
|
| | | import com.yeshi.fanli.vo.order.OrderCountVO;
|
| | | import com.yeshi.fanli.vo.order.OrderRebateVO;
|
| | | import com.yeshi.fanli.vo.user.MineInfoVO;
|
| | | import com.yeshi.fanli.vo.user.UserInfoExtraVO;
|
| | | import com.yeshi.fanli.vo.user.UserSettingsVO;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private OrderHongBaoMapService orderHongBaoMapService;
|
| | | |
| | | @Resource
|
| | | private PreviewInfoService previewInfoService;
|
| | | |
| | |
|
| | | /**
|
| | | * 订单列表
|
| | |
| | | show = hongBaoV2CountService.getHongBaoCount(uid, null) > 0;
|
| | | }
|
| | |
|
| | | BigDecimal selfMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, dateType, 1, null);
|
| | | BigDecimal shareMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, dateType, 2, null);
|
| | | BigDecimal selfMoney = null;
|
| | | BigDecimal shareMoney = null;
|
| | | BigDecimal teamMoney = null;
|
| | | // VIP预览信息
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | String redisContent = previewInfoService.getRedisContent(uid, PreviewEnum.mineInfo);
|
| | | if (!StringUtil.isNullOrEmpty(redisContent)) {
|
| | | MineInfoVO vo = new Gson().fromJson(redisContent, MineInfoVO.class);
|
| | | if (vo != null) {
|
| | | if (!StringUtil.isNullOrEmpty(vo.getSelfRebate()))
|
| | | selfMoney = new BigDecimal(vo.getSelfRebate());
|
| | | if (!StringUtil.isNullOrEmpty(vo.getShareBonus()))
|
| | | shareMoney = new BigDecimal(vo.getShareBonus());
|
| | | if (!StringUtil.isNullOrEmpty(vo.getTeamBonus()))
|
| | | teamMoney = new BigDecimal(vo.getTeamBonus());
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | if (selfMoney == null) {
|
| | | selfMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, dateType, 1, null);
|
| | | shareMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, dateType, 2, null);
|
| | | teamMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, dateType, 3, null);
|
| | | }
|
| | | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("show", show);
|
| | | data.put("selfMoney", selfMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | data.put("shareMoney", shareMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | |
| | | BigDecimal teamMoney = new BigDecimal(0);
|
| | | teamMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, dateType, 3, null);
|
| | |
|
| | | data.put("inviteMoney", teamMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
| | | @Indexed
|
| | | private Long uid;
|
| | | @Field
|
| | | private Long createUid;
|
| | | @Field
|
| | | @Indexed
|
| | | private PreviewEnum type; // 类型
|
| | | @Field
|
| | | private String content; // json内容
|
| | |
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | public Long getCreateUid() {
|
| | | return createUid;
|
| | | }
|
| | |
|
| | | public void setCreateUid(Long createUid) {
|
| | | this.createUid = createUid;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | @Override
|
| | | public BigDecimal getRewardMoneyToCount(Long uid, Integer dateType, Integer hbType, List<Integer> listSource) {
|
| | | return hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, null, null, null, listSource);
|
| | | BigDecimal money = hongBaoV2CountMapper.getRewardMoneyByDate(uid, dateType, hbType, null, null, null, null, null, listSource);
|
| | | if (money == null)
|
| | | money = BigDecimal.ZERO;
|
| | | return money;
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | package com.yeshi.fanli.service.impl.user; |
| | | |
| | | import java.io.File; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.yeshi.utils.FileUtil; |
| | | import org.yeshi.utils.tencentcloud.COSManager; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.reflect.TypeToken; |
| | |
| | | import com.yeshi.fanli.entity.bus.user.Extract; |
| | | import com.yeshi.fanli.entity.bus.user.PreviewInfo; |
| | | import com.yeshi.fanli.entity.bus.user.PreviewInfo.PreviewEnum; |
| | | import com.yeshi.fanli.entity.bus.user.ThreeSaleDetail; |
| | | import com.yeshi.fanli.exception.user.PreviewInfoException; |
| | | import com.yeshi.fanli.service.inter.money.extract.BindingAccountService; |
| | | import com.yeshi.fanli.service.inter.user.PreviewInfoService; |
| | | import com.yeshi.fanli.util.FilePathEnum; |
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleDetailService; |
| | | import com.yeshi.fanli.util.RedisManager; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.TimeUtil; |
| | | import com.yeshi.fanli.vo.money.MoneyStatisticVO; |
| | | import com.yeshi.fanli.vo.user.MineInfoVO; |
| | | |
| | | import net.coobird.thumbnailator.Thumbnails; |
| | | |
| | | @Service |
| | | public class PreviewInfoServiceImpl implements PreviewInfoService { |
| | |
| | | @Resource |
| | | private BindingAccountService bindingAccountService; |
| | | |
| | | @Resource |
| | | private RedisManager redisManager; |
| | | |
| | | @Resource |
| | | private ThreeSaleDetailService threeSaleDetailService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void save(Long uid, PreviewEnum type, String content) { |
| | | String id = StringUtil.Md5(uid + "#" + type.name()); |
| | | public void save(Long createUid, Long preUid, PreviewEnum type, String content) { |
| | | String id = StringUtil.Md5(createUid + "#" + type.name()); |
| | | |
| | | PreviewInfo info = new PreviewInfo(); |
| | | info.setId(id); |
| | | info.setUid(uid); |
| | | info.setUid(preUid); |
| | | info.setCreateUid(createUid); |
| | | info.setContent(content); |
| | | info.setType(type); |
| | | info.setUpdateTime(new Date()); |
| | | previewInfoDao.save(info); |
| | | |
| | | // 缓存10分钟 |
| | | String key = StringUtil.Md5("preview" + preUid + "#" + type.name()); |
| | | redisManager.cacheCommonString(key, info.getContent(), 60 * 10); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String getRedisContent(Long uid, PreviewEnum previewEnum) { |
| | | String key = StringUtil.Md5("preview" + uid + "#" + previewEnum.name()); |
| | | return redisManager.getCommonString(key); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PreviewInfo get(Long uid, PreviewEnum previewEnum) { |
| | |
| | | public void saveMoneyInfo(Long uid, MoneyStatisticVO vo) throws PreviewInfoException { |
| | | if (vo == null) |
| | | throw new PreviewInfoException(1, "请完善页面信息"); |
| | | save(uid, PreviewEnum.moneyInfo, new Gson().toJson(vo)); |
| | | save(uid, uid, PreviewEnum.moneyInfo, new Gson().toJson(vo)); |
| | | } |
| | | |
| | | |
| | |
| | | Collections.sort(list, cm); |
| | | } |
| | | } |
| | | save(uid, PreviewEnum.extractRecord, gson.toJson(list)); |
| | | save(uid, uid, PreviewEnum.extractRecord, gson.toJson(list)); |
| | | } |
| | | |
| | | |
| | |
| | | break; |
| | | } |
| | | } |
| | | save(uid, PreviewEnum.extractRecord, gson.toJson(list)); |
| | | save(uid, uid, PreviewEnum.extractRecord, gson.toJson(list)); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void saveMineInfo(MineInfoVO infoVO, MultipartFile file) throws Exception { |
| | | public void saveMineInfo(MineInfoVO infoVO) throws PreviewInfoException { |
| | | Long uid = infoVO.getUid(); |
| | | if (file != null) { |
| | | // 谷歌压缩图片 |
| | | String targetPath = FileUtil.getCacheDir() + "/preview" + uid + "_" + System.currentTimeMillis()+ ".jpg"; |
| | | Thumbnails.of(file.getInputStream()).size(200, 200).toFile(targetPath); |
| | | // 执行上传 |
| | | String filePath =FilePathEnum.userPreview.getPath() + UUID.randomUUID().toString().replace("-", "") + ".jpg"; |
| | | String fileLink = COSManager.getInstance().uploadFile(new File(targetPath), filePath).getUrl(); |
| | | // 删除本地图片 |
| | | if (new File(targetPath).exists()) { |
| | | new File(targetPath).delete(); |
| | | } |
| | | infoVO.setPortrait(fileLink); |
| | | |
| | | // 删除之前上传图 |
| | | String id = StringUtil.Md5(uid + "#" + PreviewEnum.mineInfo.name()); |
| | | PreviewInfo previewInfo = previewInfoDao.get(id); |
| | | if (previewInfo != null && !StringUtil.isNullOrEmpty(previewInfo.getContent())) { |
| | | MineInfoVO dto = new Gson().fromJson(previewInfo.getContent(), MineInfoVO.class); |
| | | if (dto != null && StringUtil.isNullOrEmpty(dto.getPortrait())); |
| | | COSManager.getInstance().deleteFile(dto.getPortrait()); |
| | | } |
| | | Long preUid = infoVO.getPreUid(); |
| | | if (uid == null || preUid == null) |
| | | throw new PreviewInfoException(1, "请完善所有数据"); |
| | | |
| | | if (uid.longValue() != preUid.longValue()) { |
| | | // preUid 必须是下级 |
| | | ThreeSaleDetail detail = threeSaleDetailService.getByBossUidAndWorkerUid(uid, preUid); |
| | | if (detail == null) |
| | | throw new PreviewInfoException(1, preUid + "不是您的下级"); |
| | | } |
| | | |
| | | if (StringUtil.isNullOrEmpty(infoVO.getSelfRebate()) || StringUtil.isNullOrEmpty(infoVO.getShareBonus()) |
| | | || StringUtil.isNullOrEmpty(infoVO.getTeamBonus())) { |
| | | throw new PreviewInfoException(1, "请完善所有数据"); |
| | | } |
| | | |
| | | Gson gson = new Gson(); |
| | | save(uid, PreviewEnum.mineInfo, gson.toJson(infoVO)); |
| | | save(uid, preUid, PreviewEnum.mineInfo, gson.toJson(infoVO)); |
| | | } |
| | | |
| | | |
| | |
| | | return threeSaleDetailDao.listByWorkerUid(uid);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public ThreeSaleDetail getByBossUidAndWorkerUid(Long bossUid, Long workerUid) {
|
| | | String id = bossUid + "#" + workerUid;
|
| | | return threeSaleDetailDao.get(id);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.PreviewInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.PreviewInfo.PreviewEnum;
|
| | | import com.yeshi.fanli.exception.user.PreviewInfoException;
|
| | |
| | | * @param type
|
| | | * @param content
|
| | | */
|
| | | public void save(Long uid, PreviewEnum type, String content);
|
| | | public void save(Long createUid, Long preUid, PreviewEnum type, String content);
|
| | |
|
| | | /**
|
| | | * 根据用户+类型查询
|
| | |
| | | * @param file
|
| | | * @throws PreviewInfoException
|
| | | */
|
| | | public void saveMineInfo(MineInfoVO infoVO, MultipartFile file) throws Exception;
|
| | | public void saveMineInfo(MineInfoVO infoVO) throws PreviewInfoException;
|
| | |
|
| | | /**
|
| | | * 保存到账信息
|
| | |
| | |
|
| | | public void saveMoneyInfo(Long uid, MoneyStatisticVO vo) throws PreviewInfoException;
|
| | |
|
| | | |
| | | /**
|
| | | * 查询Redis缓存信息
|
| | | * @param uid
|
| | | * @param previewEnum
|
| | | * @return
|
| | | */
|
| | | public String getRedisContent(Long uid, PreviewEnum previewEnum);
|
| | | }
|
| | |
| | | */
|
| | | public List<ThreeSaleDetail> listByWorkerUid(Long uid);
|
| | |
|
| | | |
| | | /**
|
| | | * 查询关系
|
| | | * @param bossUid
|
| | | * @param workerUid
|
| | | * @return
|
| | | */
|
| | | ThreeSaleDetail getByBossUidAndWorkerUid(Long bossUid, Long workerUid);
|
| | |
|
| | | }
|
| | |
| | |
|
| | | private Long uid;
|
| | |
|
| | | private String nickName;// 昵称
|
| | |
|
| | | private String portrait;// 头像
|
| | |
|
| | | private Long preUid; // 预览ID
|
| | | |
| | | private String level;// 等级
|
| | |
|
| | | private String balance;// 余额
|
| | |
| | | private String shareBonus;// 分享
|
| | |
|
| | | private String teamBonus;// 团队
|
| | |
|
| | | public String getNickName() {
|
| | | return nickName;
|
| | | }
|
| | |
|
| | | public void setNickName(String nickName) {
|
| | | this.nickName = nickName;
|
| | | }
|
| | |
|
| | | public String getPortrait() {
|
| | | return portrait;
|
| | | }
|
| | |
|
| | | public void setPortrait(String portrait) {
|
| | | this.portrait = portrait;
|
| | | }
|
| | |
|
| | | |
| | | |
| | | public String getLevel() {
|
| | | return level;
|
| | | }
|
| | |
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public Long getPreUid() {
|
| | | return preUid;
|
| | | }
|
| | |
|
| | | public void setPreUid(Long preUid) {
|
| | | this.preUid = preUid;
|
| | | }
|
| | |
|
| | | }
|