2个文件已删除
71个文件已修改
23个文件已添加
| | |
| | |
|
| | | import com.yeshi.fanli.entity.AppVersionInfo;
|
| | | import com.yeshi.fanli.entity.common.Config;
|
| | | import com.yeshi.fanli.entity.system.ConfigCategory;
|
| | | import com.yeshi.fanli.entity.system.ConfigCategory.ConfigCategoryEnum;
|
| | | import com.yeshi.fanli.service.inter.config.AppVersionService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigCategoryService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | @Resource
|
| | | private EhCacheCacheManager ehCacheCacheManager;
|
| | |
|
| | | @Resource
|
| | | private ConfigCategoryService configCategoryService;
|
| | | |
| | | |
| | | /**
|
| | | * 查询列表 - 新后台
|
| | | *
|
| | |
| | | ehCacheCacheManager.getCacheManager().clearAll();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(""));
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 根据分类查询
|
| | | * @param callback
|
| | | * @param type
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getByCategory")
|
| | | public void getByCategory(String callback, String type, PrintWriter out) {
|
| | | try {
|
| | | ConfigCategoryEnum categoryEnum = configCategoryService.getCategoryEnum(type);
|
| | | if (categoryEnum == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("版本查询失败"));
|
| | | return;
|
| | | }
|
| | | |
| | | List<Config> list = new ArrayList<>();
|
| | | |
| | | List<ConfigCategory> listCategory = configCategoryService.listByType(categoryEnum);
|
| | | if (listCategory != null) {
|
| | | for (ConfigCategory category: listCategory) {
|
| | | Config config = configService.getConfigBykeyNoCache(category.getKeyEnum().getKey());
|
| | | if (config != null) {
|
| | | list.add(config);
|
| | | }
|
| | | } |
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("list", list);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.admin.count.CountOrderInfo; |
| | | import com.yeshi.fanli.entity.admin.count.CountOrderTrackRate; |
| | | import com.yeshi.fanli.entity.admin.count.CountUserInfo; |
| | | import com.yeshi.fanli.entity.admin.count.DailyCountCoupon; |
| | | import com.yeshi.fanli.entity.admin.count.DailyCountOrder; |
| | | import com.yeshi.fanli.entity.admin.count.DailyCountUser; |
| | | import com.yeshi.fanli.service.inter.count.DailyCountCouponService; |
| | | import com.yeshi.fanli.service.inter.count.DailyCountOrderService; |
| | | import com.yeshi.fanli.service.inter.count.DailyCountUserService; |
| | | import com.yeshi.fanli.service.inter.count.UserInfoCountService; |
| | | import com.yeshi.fanli.service.inter.order.CommonOrderCountService; |
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil; |
| | |
| | | @Resource |
| | | private CommonOrderCountService commonOrderCountService; |
| | | |
| | | @Resource |
| | | private DailyCountCouponService dailyCountCouponService; |
| | | |
| | | @Resource |
| | | private DailyCountUserService dailyCountUserService; |
| | | |
| | | @Resource |
| | | private DailyCountOrderService dailyCountOrderService; |
| | | |
| | | |
| | | private void verifyQueryData(String callback, Integer dateType, String year, String startTime, |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 统计订单佣金 |
| | | * @param callback |
| | | * @param channelArray |
| | | * @param dateType |
| | | * @param year |
| | | * @param startTime |
| | | * @param endTime |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getOrderTypeNum") |
| | | public void getOrderTypeNum(String callback, String typeArray, Integer dateType, String year, |
| | | String startTime, String endTime, Integer countType, PrintWriter out) { |
| | | try { |
| | | // 数据验证处理 |
| | | verifyQueryData(callback, dateType, year, startTime, endTime, out); |
| | | |
| | | Date beginDate = getBeginDate(dateType, year, startTime); |
| | | Date endDate = getEndDate(dateType, year, endTime); |
| | | |
| | | Gson gson = new Gson(); |
| | | List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year); |
| | | // 渠道 |
| | | List<Integer> typeList = null; |
| | | if (typeArray != null && typeArray.trim().length() > 4) { |
| | | typeList = gson.fromJson(typeArray, new TypeToken<ArrayList<Integer>>() {}.getType()); |
| | | } |
| | | |
| | | JSONArray line_list = new JSONArray(); |
| | | if (typeList != null && typeList.size() > 0) { |
| | | for (Integer type : typeList) { |
| | | List<CountOrderInfo> listData = userInfoCountService.countOrderType(type, beginDate, endDate); |
| | | List<Object> list = machineOrderResultMoney(dateList, dateType, listData); |
| | | JSONObject innerList = new JSONObject(); |
| | | |
| | | String name = ""; |
| | | if (type == 1) { |
| | | name = "自购订单"; |
| | | } else if (type == 2) { |
| | | name = "分享订单"; |
| | | } else if (type == 3) { |
| | | name = "邀请订单"; |
| | | } |
| | | innerList.put("name", name); |
| | | innerList.put("data", gson.toJson(list)); |
| | | line_list.add(innerList); |
| | | } |
| | | } else { |
| | | List<CountOrderInfo> listData = userInfoCountService.countOrderType(null, beginDate, endDate); |
| | | List<Object> list = machineOrderResultMoney(dateList, dateType, listData); |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", "全部"); |
| | | innerList.put("data", gson.toJson(list)); |
| | | line_list.add(innerList); |
| | | } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("line_list", line_list); |
| | | data.put("xAxis_list", gson.toJson(dateList)); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("系统异常")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 券相关图表数据 |
| | | * @param callback |
| | | * @param dateType |
| | | * @param year |
| | | * @param startTime |
| | | * @param endTime |
| | | * @param type 查询类型 |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getCouponCharts") |
| | | public void getCouponCharts(String callback, Integer dateType, String year, String startTime, String endTime, |
| | | String typeArray, PrintWriter out) { |
| | | try { |
| | | // 数据验证处理 |
| | | verifyQueryData(callback, dateType, year, startTime, endTime, out); |
| | | |
| | | Date beginDate = getBeginDate(dateType, year, startTime); |
| | | Date endDate = getEndDate(dateType, year, endTime); |
| | | |
| | | Gson gson = new Gson(); |
| | | List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year); |
| | | |
| | | // 渠道 |
| | | List<String> typelList = null; |
| | | if (typeArray != null && typeArray.trim().length() > 4) { |
| | | typelList = gson.fromJson(typeArray, new TypeToken<ArrayList<String>>() {}.getType()); |
| | | } |
| | | |
| | | JSONArray line_list = new JSONArray(); |
| | | |
| | | if (typelList != null && typelList.size() > 0) { |
| | | for (String type: typelList) { |
| | | List<DailyCountCoupon> listData = dailyCountCouponService.getDailyCountList(type, beginDate, endDate); |
| | | // 处理数据 |
| | | List<Object> list = machineDailyCountCoupon(dateList, dateType, listData); |
| | | |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", dailyCountCouponService.getTypeEnumDesc(type)); |
| | | innerList.put("data", gson.toJson(list)); |
| | | line_list.add(innerList); |
| | | } |
| | | } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("line_list", line_list); |
| | | data.put("xAxis_list", gson.toJson(dateList)); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("系统异常")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | private List<Object> machineDailyCountCoupon(List<String> dateList, Integer dateType, List<DailyCountCoupon> listData) { |
| | | List<Object> list = new ArrayList<>(); |
| | | for (String date: dateList) { |
| | | BigDecimal result = new BigDecimal(0); |
| | | |
| | | if (listData != null) { |
| | | for (DailyCountCoupon history: listData) { |
| | | if (dateType == 1) { |
| | | String gernalTime = TimeUtil.getGernalTime(history.getDay().getTime()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | result = MoneyBigDecimalUtil.add(result, history.getTotal()); |
| | | continue; |
| | | } |
| | | } else if (dateType == 2){ |
| | | String gernalTime = TimeUtil.getMonthOnlyMM(history.getDay()); |
| | | if(gernalTime.startsWith("0")) { |
| | | gernalTime = gernalTime.substring(1, 2); |
| | | } |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | result = MoneyBigDecimalUtil.add(result, history.getTotal()); |
| | | } |
| | | } else if (dateType == 3) { |
| | | String gernalTime = TimeUtil.getYearOnlyYYYY(history.getDay()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | result = MoneyBigDecimalUtil.add(result, history.getTotal()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | list.add(result); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 用户相关图表数据 |
| | | * @param callback |
| | | * @param dateType |
| | | * @param year |
| | | * @param startTime |
| | | * @param endTime |
| | | * @param type 查询类型 |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getUserCharts") |
| | | public void getUserCharts(String callback, Integer dateType, String year, String startTime, String endTime, |
| | | String typeArray, String channelArray, PrintWriter out) { |
| | | try { |
| | | // 数据验证处理 |
| | | verifyQueryData(callback, dateType, year, startTime, endTime, out); |
| | | |
| | | Date beginDate = getBeginDate(dateType, year, startTime); |
| | | Date endDate = getEndDate(dateType, year, endTime); |
| | | |
| | | Gson gson = new Gson(); |
| | | List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year); |
| | | |
| | | List<String> typelList = null; |
| | | if (typeArray != null && typeArray.trim().length() > 4) { |
| | | typelList = gson.fromJson(typeArray, new TypeToken<ArrayList<String>>() {}.getType()); |
| | | } |
| | | if (typelList == null || typelList.size() == 0) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("传递类型错误")); |
| | | return; |
| | | } |
| | | |
| | | // 渠道 |
| | | List<String> channelList = null; |
| | | if (channelArray != null && channelArray.trim().length() > 4) { |
| | | channelList = gson.fromJson(channelArray, new TypeToken<ArrayList<String>>() {}.getType()); |
| | | } |
| | | |
| | | JSONArray line_list = new JSONArray(); |
| | | |
| | | if (channelList != null && channelList.size() > 0) { |
| | | String type = typelList.get(0); |
| | | for (String channel: channelList) { |
| | | List<DailyCountUser> listData = dailyCountUserService.getDailyCountList(type, beginDate, endDate, channel); |
| | | // 处理数据 |
| | | List<Object> list = machineDailyCountUser(dateList, dateType, listData); |
| | | |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", channel); |
| | | innerList.put("data", gson.toJson(list)); |
| | | line_list.add(innerList); |
| | | } |
| | | } else { |
| | | for (String type: typelList) { |
| | | List<DailyCountUser> listData = dailyCountUserService.getDailyCountList(type, beginDate, endDate, null); |
| | | // 处理数据 |
| | | List<Object> list = machineDailyCountUser(dateList, dateType, listData); |
| | | |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", dailyCountUserService.getTypeEnumDesc(type)); |
| | | innerList.put("data", gson.toJson(list)); |
| | | line_list.add(innerList); |
| | | } |
| | | } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("line_list", line_list); |
| | | data.put("xAxis_list", gson.toJson(dateList)); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("系统异常")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | private List<Object> machineDailyCountUser(List<String> dateList, Integer dateType, List<DailyCountUser> listData) { |
| | | List<Object> list = new ArrayList<>(); |
| | | for (String date: dateList) { |
| | | BigDecimal result = new BigDecimal(0); |
| | | |
| | | if (listData != null) { |
| | | for (DailyCountUser history: listData) { |
| | | if (dateType == 1) { |
| | | String gernalTime = TimeUtil.getGernalTime(history.getDay().getTime()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | result = MoneyBigDecimalUtil.add(result, history.getTotal()); |
| | | continue; |
| | | } |
| | | } else if (dateType == 2){ |
| | | String gernalTime = TimeUtil.getMonthOnlyMM(history.getDay()); |
| | | if(gernalTime.startsWith("0")) { |
| | | gernalTime = gernalTime.substring(1, 2); |
| | | } |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | result = MoneyBigDecimalUtil.add(result, history.getTotal()); |
| | | } |
| | | } else if (dateType == 3) { |
| | | String gernalTime = TimeUtil.getYearOnlyYYYY(history.getDay()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | result = MoneyBigDecimalUtil.add(result, history.getTotal()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | list.add(result); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 用户相关图表数据 |
| | | * @param callback |
| | | * @param dateType |
| | | * @param year |
| | | * @param startTime |
| | | * @param endTime |
| | | * @param type 查询类型 |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getOrderCharts") |
| | | public void getOrderCharts(String callback, Integer dateType, String year, String startTime, String endTime, |
| | | String typeArray, String channelArray, PrintWriter out) { |
| | | try { |
| | | // 数据验证处理 |
| | | verifyQueryData(callback, dateType, year, startTime, endTime, out); |
| | | |
| | | Date beginDate = getBeginDate(dateType, year, startTime); |
| | | Date endDate = getEndDate(dateType, year, endTime); |
| | | |
| | | Gson gson = new Gson(); |
| | | List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year); |
| | | |
| | | // 渠道 |
| | | List<String> typelList = null; |
| | | if (typeArray != null && typeArray.trim().length() > 4) { |
| | | typelList = gson.fromJson(typeArray, new TypeToken<ArrayList<String>>() {}.getType()); |
| | | } |
| | | |
| | | if (typelList == null || typelList.size() == 0) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("传递类型错误")); |
| | | return; |
| | | } |
| | | |
| | | // 渠道 |
| | | List<String> channelList = null; |
| | | if (channelArray != null && channelArray.trim().length() > 4) { |
| | | channelList = gson.fromJson(channelArray, new TypeToken<ArrayList<String>>() {}.getType()); |
| | | } |
| | | |
| | | |
| | | JSONArray line_list = new JSONArray(); |
| | | if (channelList != null && channelList.size() > 0) { |
| | | String type = typelList.get(0); |
| | | for (String channel: channelList) { |
| | | List<DailyCountOrder> listData = dailyCountOrderService.getDailyCountList(type, beginDate, endDate, channel); |
| | | // 处理数据 |
| | | List<Object> list = machineDailyCountOrder(dateList, dateType, listData); |
| | | |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", channel); |
| | | innerList.put("data", gson.toJson(list)); |
| | | line_list.add(innerList); |
| | | } |
| | | } else { |
| | | for (String type: typelList) { |
| | | List<DailyCountOrder> listData = dailyCountOrderService.getDailyCountList(type, beginDate, endDate, null); |
| | | // 处理数据 |
| | | List<Object> list = machineDailyCountOrder(dateList, dateType, listData); |
| | | |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", dailyCountOrderService.getTypeEnumDesc(type)); |
| | | innerList.put("data", gson.toJson(list)); |
| | | line_list.add(innerList); |
| | | } |
| | | } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("line_list", line_list); |
| | | data.put("xAxis_list", gson.toJson(dateList)); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("系统异常")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | private List<Object> machineDailyCountOrder(List<String> dateList, Integer dateType, List<DailyCountOrder> listData) { |
| | | List<Object> list = new ArrayList<>(); |
| | | for (String date: dateList) { |
| | | BigDecimal result = new BigDecimal(0); |
| | | |
| | | if (listData != null) { |
| | | for (DailyCountOrder history: listData) { |
| | | if (dateType == 1) { |
| | | String gernalTime = TimeUtil.getGernalTime(history.getDay().getTime()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | result = MoneyBigDecimalUtil.add(result, history.getTotal()); |
| | | continue; |
| | | } |
| | | } else if (dateType == 2){ |
| | | String gernalTime = TimeUtil.getMonthOnlyMM(history.getDay()); |
| | | if(gernalTime.startsWith("0")) { |
| | | gernalTime = gernalTime.substring(1, 2); |
| | | } |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | result = MoneyBigDecimalUtil.add(result, history.getTotal()); |
| | | } |
| | | } else if (dateType == 3) { |
| | | String gernalTime = TimeUtil.getYearOnlyYYYY(history.getDay()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | result = MoneyBigDecimalUtil.add(result, history.getTotal()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | list.add(result); |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.yeshi.fanli.controller.admin.utils.AdminUtils; |
| | | import com.yeshi.fanli.dto.ChartTDO; |
| | | import com.yeshi.fanli.entity.admin.count.CountUserInfo; |
| | | import com.yeshi.fanli.entity.bus.user.Extract; |
| | | import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord; |
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2; |
| | |
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService; |
| | | import com.yeshi.fanli.tag.PageEntity; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil; |
| | | import com.yeshi.fanli.util.RedisManager; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.TimeUtil; |
| | | |
| | | import net.sf.json.JSONArray; |
| | | import net.sf.json.JSONObject; |
| | | |
| | | @Controller |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 统计审核次数 |
| | | * |
| | | * @param callback |
| | | * @param state |
| | | * 审核状态:所有-3 通过-1 拒绝- 2 |
| | | * @param type |
| | | * 统计类型 1-24小时 2-所有3 |
| | | * @param dateType |
| | | * 类型 1日 2月 3年 |
| | | * @param year |
| | | * 2018 |
| | | * @param startTime |
| | | * 2018-12-01 |
| | | * @param endTime |
| | | * 2018-12-01 |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getAuditTotal") |
| | | public void getAuditTotal(String callback, String stateArray, Integer dateType, String year, String startTime, |
| | | String endTime, PrintWriter out) { |
| | | try { |
| | | String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime); |
| | | if (validateMsg != null) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg)); |
| | | return; |
| | | } |
| | | |
| | | if (dateType != 1 && (!StringUtil.isNullOrEmpty(startTime) || !StringUtil.isNullOrEmpty(endTime))) { |
| | | startTime = null; |
| | | endTime = null; |
| | | } |
| | | |
| | | Date beginDate = null; |
| | | Date endDate = null; |
| | | |
| | | if (dateType == 1) { |
| | | beginDate = TimeUtil.parse(startTime); |
| | | endDate = TimeUtil.parse(endTime); |
| | | } else if (dateType == 2) { |
| | | Calendar calendar=Calendar.getInstance(); |
| | | int currentYear = calendar.get(Calendar.YEAR); |
| | | if (!StringUtil.isNullOrEmpty(year)) { |
| | | currentYear = Integer.parseInt(year); |
| | | } |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, currentYear); |
| | | beginDate =calendar.getTime(); |
| | | |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, currentYear); |
| | | calendar.roll(Calendar.DAY_OF_YEAR, -1); |
| | | endDate=calendar.getTime(); |
| | | } else if (dateType == 3) { |
| | | beginDate = TimeUtil.parse("2018-01-01"); |
| | | endDate = new Date(); |
| | | } |
| | | Gson gson = new Gson(); |
| | | List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year); |
| | | |
| | | String substring = stateArray.substring(1, stateArray.length()-1); |
| | | List<Integer> channelList = null; |
| | | if (stateArray != null && stateArray.trim().length() > 4) { |
| | | channelList = gson.fromJson(stateArray, new TypeToken<ArrayList<Integer>>() {}.getType()); |
| | | } |
| | | |
| | | JSONArray line_list = new JSONArray(); |
| | | |
| | | if (channelList != null && channelList.size() > 0) { |
| | | for (Integer state : channelList) { |
| | | List<Object> list = getAuditData(dateList, dateType, beginDate, endDate, state); |
| | | String name = ""; |
| | | if (state == 1) { |
| | | name = "通过"; |
| | | } else if (state == 2) { |
| | | name = "驳回"; |
| | | } |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", name); |
| | | innerList.put("data", gson.toJson(list)); |
| | | line_list.add(innerList); |
| | | } |
| | | } else { |
| | | List<Object> list = getAuditData(dateList, dateType, beginDate, endDate, null); |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", "全部"); |
| | | innerList.put("data", gson.toJson(list)); |
| | | line_list.add(innerList); |
| | | } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("line_list", line_list); |
| | | data.put("xAxis_list", gson.toJson(dateList)); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("系统异常")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | private List<Object> getAuditData(List<String> dateList, Integer dateType, Date beginDate, Date endDate, |
| | | Integer state) throws Exception{ |
| | | List<Object> list = new ArrayList<>(); |
| | | List<CountUserInfo> listHistory = extractAuditRecordService.getAuditCount(beginDate, endDate, state); |
| | | for (String date: dateList) { |
| | | int value = 0; |
| | | if (listHistory != null) { |
| | | for (CountUserInfo history: listHistory) { |
| | | if (dateType == 1) { |
| | | String gernalTime = TimeUtil.getGernalTime(history.getDay().getTime()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | value += history.getNum(); |
| | | continue; |
| | | } |
| | | } else if (dateType == 2){ |
| | | String gernalTime = TimeUtil.getMonthOnlyMM(history.getDay()); |
| | | if(gernalTime.startsWith("0")) { |
| | | gernalTime = gernalTime.substring(1, 2); |
| | | } |
| | | |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | value += history.getNum(); |
| | | continue; |
| | | } |
| | | } else if (dateType == 3) { |
| | | String gernalTime = TimeUtil.getYearOnlyYYYY(history.getDay()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | value += history.getNum(); |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | list.add(value + ""); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 统计提现申请总额 |
| | | * |
| | | * @param callback |
| | | * @param type |
| | | * 统计类型 1-24小时 2-所有 |
| | | * @param dateType |
| | | * 类型 1日 2月 3 |
| | | * @param year |
| | | * 2018 |
| | | * @param startTime |
| | | * 2018-12-01 |
| | | * @param endTime |
| | | * 2018-12-01 |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getExtractApplyMoney") |
| | | public void getExtractApplyMoney(String callback, Integer dateType, String year, String startTime, String endTime, |
| | | PrintWriter out) { |
| | | try { |
| | | String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime); |
| | | if (validateMsg != null) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg)); |
| | | return; |
| | | } |
| | | |
| | | if (dateType != 1 && (!StringUtil.isNullOrEmpty(startTime) || !StringUtil.isNullOrEmpty(endTime))) { |
| | | startTime = null; |
| | | endTime = null; |
| | | } |
| | | |
| | | Date beginDate = null; |
| | | Date endDate = null; |
| | | if (dateType == 1) { |
| | | beginDate = TimeUtil.parse(startTime); |
| | | endDate = TimeUtil.parse(endTime); |
| | | } else if (dateType == 2) { |
| | | Calendar calendar=Calendar.getInstance(); |
| | | int currentYear = calendar.get(Calendar.YEAR); |
| | | if (!StringUtil.isNullOrEmpty(year)) { |
| | | currentYear = Integer.parseInt(year); |
| | | } |
| | | |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, currentYear); |
| | | beginDate =calendar.getTime(); |
| | | |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, currentYear); |
| | | calendar.roll(Calendar.DAY_OF_YEAR, -1); |
| | | endDate=calendar.getTime(); |
| | | } else if (dateType == 3) { |
| | | beginDate = TimeUtil.parse("2018-01-01"); |
| | | endDate = new Date(); |
| | | } |
| | | Gson gson = new Gson(); |
| | | List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year); |
| | | |
| | | List<String> list = new ArrayList<>(); |
| | | List<CountUserInfo> listHistory = extractAuditRecordService.getApplyMoney(beginDate, endDate); |
| | | for (String date: dateList) { |
| | | BigDecimal money = new BigDecimal("0"); |
| | | if (listHistory == null) { |
| | | list.add(money.toString()); |
| | | continue; |
| | | } |
| | | |
| | | for (CountUserInfo history: listHistory) { |
| | | if (dateType == 1) { |
| | | String gernalTime = TimeUtil.getGernalTime(history.getDay().getTime()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | money = MoneyBigDecimalUtil.add(money, history.getMoney()); |
| | | continue; |
| | | } |
| | | } else if (dateType == 2){ |
| | | String gernalTime = TimeUtil.getMonthOnlyMM(history.getDay()); |
| | | if(gernalTime.startsWith("0")) { |
| | | gernalTime = gernalTime.substring(1, 2); |
| | | } |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | money = MoneyBigDecimalUtil.add(money, history.getMoney()); |
| | | continue; |
| | | } |
| | | } else if (dateType == 3) { |
| | | String gernalTime = TimeUtil.getYearOnlyYYYY(history.getDay()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | money = MoneyBigDecimalUtil.add(money, history.getMoney()); |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | list.add(money.toString()); |
| | | } |
| | | |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", "金额"); |
| | | innerList.put("data", gson.toJson(list)); |
| | | |
| | | JSONArray line_list = new JSONArray(); |
| | | line_list.add(innerList); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("xAxis_list", gson.toJson(dateList)); |
| | | data.put("line_list", line_list); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 统计提现申请总次数 |
| | | * |
| | | * @param callback |
| | | * @param state |
| | | * 所有-空值或者不传 待审核-0 通过-1 拒绝- 2 |
| | | * @param type |
| | | * 统计类型 1-24小时 2-所有 |
| | | * @param dateType |
| | | * 类型 1日 2月 3年 |
| | | * @param year |
| | | * 2018 |
| | | * @param startTime |
| | | * 2018-12-01 |
| | | * @param endTime |
| | | * 2018-12-01 |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getExtractApplyNumber") |
| | | public void getExtractApplyNumber(String callback, Integer state, Integer dateType, String year, String startTime, |
| | | String endTime, PrintWriter out) { |
| | | try { |
| | | String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime); |
| | | if (validateMsg != null) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg)); |
| | | return; |
| | | } |
| | | |
| | | if (dateType != 1 && (!StringUtil.isNullOrEmpty(startTime) || !StringUtil.isNullOrEmpty(endTime))) { |
| | | startTime = null; |
| | | endTime = null; |
| | | } |
| | | |
| | | |
| | | Date beginDate = null; |
| | | Date endDate = null; |
| | | |
| | | if (dateType == 1) { |
| | | beginDate = TimeUtil.parse(startTime); |
| | | endDate = TimeUtil.parse(endTime); |
| | | } else if (dateType == 2) { |
| | | Calendar calendar=Calendar.getInstance(); |
| | | int currentYear = calendar.get(Calendar.YEAR); |
| | | if (!StringUtil.isNullOrEmpty(year)) { |
| | | currentYear = Integer.parseInt(year); |
| | | } |
| | | |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, currentYear); |
| | | beginDate =calendar.getTime(); |
| | | |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, currentYear); |
| | | calendar.roll(Calendar.DAY_OF_YEAR, -1); |
| | | endDate=calendar.getTime(); |
| | | } else if (dateType == 3) { |
| | | beginDate = TimeUtil.parse("2018-01-01"); |
| | | endDate = new Date(); |
| | | } |
| | | Gson gson = new Gson(); |
| | | List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year); |
| | | |
| | | List<Object> list = new ArrayList<>(); |
| | | List<CountUserInfo> listHistory = extractAuditRecordService.geApplyNumber(beginDate, endDate); |
| | | for (String date: dateList) { |
| | | int value = 0; |
| | | if (listHistory == null) { |
| | | list.add(value + ""); |
| | | continue; |
| | | } |
| | | |
| | | for (CountUserInfo history: listHistory) { |
| | | if (dateType == 1) { |
| | | String gernalTime = TimeUtil.getGernalTime(history.getDay().getTime()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | value += history.getNum(); |
| | | continue; |
| | | } |
| | | } else if (dateType == 2){ |
| | | String gernalTime = TimeUtil.getMonthOnlyMM(history.getDay()); |
| | | if(gernalTime.startsWith("0")) { |
| | | gernalTime = gernalTime.substring(1, 2); |
| | | } |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | value += history.getNum(); |
| | | continue; |
| | | } |
| | | } else if (dateType == 3) { |
| | | String gernalTime = TimeUtil.getYearOnlyYYYY(history.getDay()); |
| | | if (gernalTime.equalsIgnoreCase(date)) { |
| | | value += history.getNum(); |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | list.add(value + ""); |
| | | } |
| | | |
| | | JSONObject innerList = new JSONObject(); |
| | | innerList.put("name", "数量"); |
| | | innerList.put("data", gson.toJson(list)); |
| | | |
| | | JSONArray line_list = new JSONArray(); |
| | | line_list.add(innerList); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("xAxis_list", gson.toJson(dateList)); |
| | | data.put("line_list", line_list); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("系统异常")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 下载提现红包Openid |
| | |
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode;
|
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveNumHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserRank;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.integral.IntegralDetail;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
|
| | | import com.yeshi.fanli.exception.user.vip.UserVIPInfoException;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserRankService;
|
| | | 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.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserVIPInfoService userVIPInfoService;
|
| | | |
| | | @Resource
|
| | | private IntegralDetailService integralDetailService;
|
| | |
|
| | |
|
| | | /**
|
| | |
| | |
|
| | |
|
| | | /**
|
| | | * 计当天活跃用户中有多少个用户是90天前才活跃过,期间从未活跃的用户数量
|
| | | * 获取金币排行榜
|
| | | * @param callback
|
| | | * @param dateType
|
| | | * @param year
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param type
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getUserActiveCharts")
|
| | | public void getUserActiveCharts(String callback, Integer dateType, String year, String startTime,
|
| | | String endTime, PrintWriter out){
|
| | | try {
|
| | | String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
|
| | | if (validateMsg != null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg));
|
| | | return;
|
| | | }
|
| | | |
| | | if (dateType != 1 && (!StringUtil.isNullOrEmpty(startTime) || !StringUtil.isNullOrEmpty(endTime))) {
|
| | | startTime = null;
|
| | | endTime = null;
|
| | | }
|
| | |
|
| | | |
| | | Date beginDate = null;
|
| | | Date endDate = null;
|
| | | |
| | | if (dateType == 1) {
|
| | | beginDate = TimeUtil.parse(startTime);
|
| | | endDate = TimeUtil.parse(endTime);
|
| | | } else if (dateType == 2) {
|
| | | Calendar calendar=Calendar.getInstance(); |
| | | int currentYear = calendar.get(Calendar.YEAR);
|
| | | if (!StringUtil.isNullOrEmpty(year)) {
|
| | | currentYear = Integer.parseInt(year);
|
| | | }
|
| | | |
| | | calendar.clear();
|
| | | calendar.set(Calendar.YEAR, currentYear);
|
| | | beginDate =calendar.getTime();
|
| | | @RequestMapping(value = "getGoldCoinRecord")
|
| | | public void getGoldCoinRecord(String callback, Integer pageIndex, Integer pageSize, String key, PrintWriter out) {
|
| | | if (pageIndex == null)
|
| | | pageIndex = 1;
|
| | |
|
| | | calendar.clear();
|
| | | calendar.set(Calendar.YEAR, currentYear);
|
| | | calendar.roll(Calendar.DAY_OF_YEAR, -1);
|
| | | endDate=calendar.getTime(); |
| | | } else if (dateType == 3) {
|
| | | beginDate = TimeUtil.parse("2018-01-01");
|
| | | endDate = new Date();
|
| | | }
|
| | | Gson gson = new Gson();
|
| | | List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
|
| | | |
| | | List<Object> list = new ArrayList<>();
|
| | | List<UserActiveNumHistory> listHistory = userActiveLogService.query(beginDate, endDate);
|
| | | for (String date: dateList) {
|
| | | ChartTDO chartTDO = new ChartTDO();
|
| | | chartTDO.setShowDate(date);
|
| | | int value = 0;
|
| | | |
| | | if (listHistory != null) {
|
| | | for (UserActiveNumHistory history: listHistory) {
|
| | | if (dateType == 1) {
|
| | | String gernalTime = TimeUtil.getGernalTime(history.getDay().getTime());
|
| | | if (gernalTime.equalsIgnoreCase(date)) {
|
| | | value += history.getNum();
|
| | | continue;
|
| | | }
|
| | | } else if (dateType == 2){
|
| | | String gernalTime = TimeUtil.getMonthOnlyMM(history.getDay());
|
| | | if(gernalTime.startsWith("0")) {
|
| | | gernalTime = gernalTime.substring(1, 2);
|
| | | }
|
| | | if (gernalTime.equalsIgnoreCase(date)) {
|
| | | value += history.getNum();
|
| | | continue;
|
| | | }
|
| | | } else if (dateType == 3) {
|
| | | String gernalTime = TimeUtil.getYearOnlyYYYY(history.getDay());
|
| | | if (gernalTime.equalsIgnoreCase(date)) {
|
| | | value += history.getNum();
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | chartTDO.setShowValue(value + "");
|
| | | list.add(value + "");
|
| | | }
|
| | | |
| | | JSONObject innerList = new JSONObject();
|
| | | innerList.put("name", "数量");
|
| | | innerList.put("data", gson.toJson(list));
|
| | |
|
| | | JSONArray line_list = new JSONArray();
|
| | | line_list.add(innerList);
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("xAxis_list", gson.toJson(dateList));
|
| | | data.put("line_list", line_list);
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("系统异常"));
|
| | | e.printStackTrace();
|
| | | if (pageSize == null)
|
| | | pageSize = 20;
|
| | | |
| | | List<IntegralDetail> list = integralDetailService.listQuery((pageIndex-1)* pageSize, pageSize, key);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无相关信息"));
|
| | | return;
|
| | | }
|
| | | |
| | | for (IntegralDetail integralDetail: list) {
|
| | | Long uid = integralDetail.getUid();
|
| | | UserInfo userInfo = userInfoService.getUserById(uid);
|
| | | if (userInfo != null) {
|
| | | integralDetail.setNickName(userInfo.getNickName());
|
| | | integralDetail.setPortrait(userInfo.getPortrait());
|
| | | }
|
| | | }
|
| | | |
| | | long count = integralDetailService.countQuery(key);
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | | |
| | | GsonBuilder gsonBuilder = new GsonBuilder();
|
| | | gsonBuilder.serializeNulls();
|
| | | Gson gson = gsonBuilder.setDateFormat("yyyy/MM/dd HH:mm:ss").create();
|
| | | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("pe", pe);
|
| | | data.put("list", gson.toJson(list));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
|
| | | |
| | | /**
|
| | | *
|
| | | * @param callback
|
New file |
| | |
| | | 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.jd.JDOrderItem;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | | import com.yeshi.fanli.job.order.taobao.UpdateOrderJob;
|
| | | import com.yeshi.fanli.job.order.taobao.UpdateTBRelationAndSpecialOrderJob;
|
| | | import com.yeshi.fanli.service.inter.order.jd.JDOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoWeiQuanOrderService;
|
| | | 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/jdOrder")
|
| | | public class JDOrderController {
|
| | |
|
| | | @Resource
|
| | | private JDOrderService jdOrderService;
|
| | |
|
| | |
|
| | | /**
|
| | | * 查询列表 - 新后台
|
| | | * |
| | | * @param callback
|
| | | * @param key
|
| | | * 查询词 名称
|
| | | * @param pageIndex
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, String key, Integer pageIndex, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null || pageIndex < 0) {
|
| | | pageIndex = 1;
|
| | | }
|
| | |
|
| | | int pageSize = Constant.PAGE_SIZE;
|
| | | List<JDOrderItem> list = jdOrderService.listQuery((pageIndex-1)*pageSize,pageSize,key);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未找到相关信息"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = jdOrderService.countQuery(key);
|
| | |
|
| | | 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(list));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.controller.admin.order;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.lang.reflect.Type;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | 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.pdd.PDDOrder;
|
| | | import com.yeshi.fanli.service.inter.order.pdd.PDDOrderService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/pddOrder")
|
| | | public class PDDOrderController {
|
| | |
|
| | | @Resource
|
| | | private PDDOrderService pddOrderService;
|
| | |
|
| | |
|
| | | /**
|
| | | * 查询列表 - 新后台
|
| | | * |
| | | * @param callback
|
| | | * @param key
|
| | | * 查询词 名称
|
| | | * @param pageIndex
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, String key, Integer pageIndex, PrintWriter out) {
|
| | | try {
|
| | | if (pageIndex == null || pageIndex < 0) {
|
| | | pageIndex = 1;
|
| | | }
|
| | |
|
| | | int pageSize = Constant.PAGE_SIZE;
|
| | | List<PDDOrder> list = pddOrderService.listQuery((pageIndex-1)*pageSize,pageSize,key);
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未找到相关信息"));
|
| | | return;
|
| | | }
|
| | |
|
| | | long count = pddOrderService.countQuery(key);
|
| | |
|
| | | 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(list));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.encrypt.DESUtil;
|
| | |
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD.FloatADTypeEnum;
|
| | |
| | | import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPPreInfo;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.config.AppHomeFloatImg;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.notify.UserActivedRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPPreInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | | |
| | | |
| | | @Resource
|
| | | private UserVIPInfoService userVIPInfoService;
|
| | | |
| | | @Resource
|
| | | private UserVIPPreInfoService userVIPPreInfoService;
|
| | |
|
| | | /**
|
| | | * s 首页配置信息
|
| | |
| | |
|
| | | data.put("tearcherLink", tearcherLink);
|
| | | }
|
| | |
|
| | | }
|
| | | |
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | // TODO 验证是否是导师
|
| | | |
| | | JSONObject inner = new JSONObject();
|
| | | inner.put("link", "https://www.baidu.com/");
|
| | | inner.put("ion", "http://img.flqapp.com/resource/vip/icon_vip.png");
|
| | | inner.put("title", "免费升级 享会员权益");
|
| | | inner.put("btnName", "升级会员");
|
| | | |
| | | if (uid != null) {
|
| | | // 是否导师 TODO
|
| | | |
| | | if (userVIPInfoService.isVIP(uid)) {
|
| | | inner.put("link", "https://www.baidu.com/");
|
| | | inner.put("ion", "http://img.flqapp.com/resource/vip/icon_tearcher.png");
|
| | | inner.put("title", "拿五险与津贴 享导师权益");
|
| | | inner.put("btnName", "升级会员");
|
| | | } else {
|
| | | UserVIPPreInfo userVIPPreInfo = userVIPPreInfoService.getLatestProcessInfo(uid);
|
| | | if (userVIPPreInfo != null) {
|
| | | if (userVIPPreInfo.getProcess() == UserVIPPreInfo.PROCESS_1) {
|
| | | inner.put("btnName", "升级高级会员");
|
| | | } else if (userVIPPreInfo.getProcess() == UserVIPPreInfo.PROCESS_2) {
|
| | | inner.put("btnName", "升级超级会员");
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | data.put("vip", inner);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 订单解析配置
|
| | |
| | | }
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | UserInviteLevelEnum level = null;
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | level = userInviteService.getUserInviteLevelNew(uid);
|
| | | } else {
|
| | | level = userInviteService.getUserInviteLevel(uid);
|
| | | }
|
| | | JSONObject inviteLevel = new JSONObject();
|
| | | UserInviteLevelEnum level = userInviteService.getUserInviteLevel(uid);
|
| | | inviteLevel.put("level", level.name());
|
| | | inviteLevel.put("link", level.getLink());
|
| | | data.put("inviteLevel", inviteLevel);
|
| | |
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | | import com.yeshi.fanli.entity.order.ESOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.order.CommonOrderException;
|
| | |
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | | import com.yeshi.fanli.vo.order.CommonOrderVO;
|
| | | import com.yeshi.fanli.vo.order.GoodsRebateVO;
|
| | | import com.yeshi.fanli.vo.order.OrderCountVO;
|
| | | import com.yeshi.fanli.vo.order.OrderRebateVO;
|
| | | import com.yeshi.fanli.vo.order.TeamBonusVO;
|
| | | import com.yeshi.fanli.vo.user.UserInfoExtraVO;
|
| | | import com.yeshi.fanli.vo.user.UserSettingsVO;
|
| | |
|
| | |
| | | data.put("count", count);
|
| | | data.put("result_list", JsonUtil.getApiCommonGson().toJson(list));
|
| | | data.put("helpUrl", configService.get(ConfigKeyEnum.orderListHelp.getKey()));
|
| | | data.put("bonusLink", configService.get(ConfigKeyEnum.orderBonusLink.getKey()));
|
| | | data.put("validMoney", "¥ " + validMoney);
|
| | | data.put("invalidMoney", "¥ " + invalidMoney);
|
| | | data.put("findOrderHelpUrl", orderFindUrl);
|
| | |
| | | data.put("selfMoney", selfMoney.setScale(2,BigDecimal.ROUND_DOWN).toString());
|
| | | data.put("shareMoney", shareMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | data.put("inviteMoney", inviteMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | |
| | | // 团队奖励 TODO
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | data.put("teamSubsidy", "999.66");
|
| | | data.put("teamReward", "777.66");
|
| | | data.put("tutorSubsidy", "888.66");
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 团队收益统计
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param type 1-团队补贴 2-团队奖励 3-导师津贴
|
| | | */
|
| | | @RequestMapping(value = "getTeamBonus", method = RequestMethod.POST)
|
| | | public void getTeamBonus(AcceptData acceptData, Long uid, Integer type, PrintWriter out) {
|
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | | |
| | | UserInfo user = userInfoService.selectByPKey(uid);
|
| | | if (user == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | if (type == null || type < 1 || type > 3) {
|
| | | type = 1;
|
| | | }
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("link", "https://www.baidu.com/");
|
| | | String total = "";
|
| | | if (type == 1) {
|
| | | total = "111.3";
|
| | | } else if (type == 2) {
|
| | | total = "222.3";
|
| | | } else if (type == 3) {
|
| | | total = "333.3";
|
| | | }
|
| | | |
| | | if (StringUtil.isNullOrEmpty(total)) {
|
| | | data.put("exist", false);
|
| | | } else {
|
| | | data.put("exist", true);
|
| | | data.put("portrait", user.getPortrait());
|
| | | |
| | | TeamBonusVO today = new TeamBonusVO("1.3", "2.3" ,"3.6");
|
| | | TeamBonusVO yesterday = new TeamBonusVO("1.3", "2.3" ,"3.6");
|
| | | TeamBonusVO thisMonth = new TeamBonusVO("1.3", "2.3" ,"3.6");
|
| | | TeamBonusVO lastMonth = new TeamBonusVO("1.3", "2.3" ,"3.6");
|
| | | data.put("total", total);
|
| | | data.put("direct", "655.36");
|
| | | data.put("indirect", "236.58");
|
| | | data.put("today", today);
|
| | | data.put("yesterday", yesterday);
|
| | | data.put("thisMonth", thisMonth);
|
| | | data.put("lastMonth", lastMonth);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 返利说明
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param orderNo
|
| | | * @param sourceType
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getReBateInfo")
|
| | | public void getReBateInfo(String callback, AcceptData acceptData, Long uid, String orderNo, Integer sourceType, PrintWriter out) {
|
| | | if (uid == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | | }
|
| | | |
| | | UserInfo user = userInfoService.selectByPKey(uid);
|
| | | if (user == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | | GoodsRebateVO goodsVO = new GoodsRebateVO();
|
| | | goodsVO.setTitle("舒客舒克光感炫白牙片美白牙齿牙膜套装去黄牙清新口气");
|
| | | goodsVO.setPicture("https://img.alicdn.com/bao/uploaded/i4/355739614/O1CN01RB6Hlg2KtGMWR4mON_!!0-item_pic.jpg");
|
| | | goodsVO.setActualPay("¥60.00");
|
| | | goodsVO.setFanliRate("X20%");
|
| | | goodsVO.setFanliExpect("¥25.00");
|
| | | goodsVO.setCommision("10.00");
|
| | | goodsVO.setSubsidy("6.00");
|
| | | |
| | | GoodsRebateVO goodsVO2 = new GoodsRebateVO();
|
| | | goodsVO2.setTitle("馥佩美白柔肤水爽肤水补水保湿女化妆湿敷精华水男旗舰店官网正品");
|
| | | goodsVO2.setPicture("https://img.alicdn.com/bao/uploaded/i4/738252756/O1CN01MgFdXy1WEI8zmkyg7_!!0-item_pic.jpg");
|
| | | goodsVO2.setActualPay("¥62.00");
|
| | | goodsVO2.setFanliRate("X22%");
|
| | | goodsVO2.setFanliExpect("¥26.00");
|
| | | goodsVO2.setCommision("12.00");
|
| | | goodsVO2.setSubsidy("8.00");
|
| | | |
| | | List<GoodsRebateVO> listGoods= new ArrayList<>();
|
| | | listGoods.add(goodsVO);
|
| | | listGoods.add(goodsVO2);
|
| | | |
| | | OrderRebateVO orderRebateVO = new OrderRebateVO();
|
| | | orderRebateVO.setTotalFanLi("¥50.00");
|
| | | orderRebateVO.setUpperFanLi("¥60.00");
|
| | | orderRebateVO.setUserLevel(UserLevelEnum.daRen.name());
|
| | | orderRebateVO.setJumpLink("https://www.baidu.com/");
|
| | | orderRebateVO.setListGoods(listGoods);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("result", orderRebateVO);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dao.mongo.system; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import com.yeshi.fanli.dao.MongodbBaseDao; |
| | | import com.yeshi.fanli.entity.system.ConfigCategory; |
| | | import com.yeshi.fanli.entity.system.ConfigCategory.ConfigCategoryEnum; |
| | | |
| | | @Repository |
| | | public class ConfigCategoryDao extends MongodbBaseDao<ConfigCategory> { |
| | | |
| | | |
| | | /** |
| | | * 查询 |
| | | * |
| | | * @param userEnum |
| | | * @return |
| | | */ |
| | | public List<ConfigCategory> listByType(ConfigCategoryEnum type) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("type").is(type)); |
| | | return mongoTemplate.find(query, ConfigCategory.class); |
| | | } |
| | | |
| | | } |
| | |
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dto.ChartTDO;
|
| | | import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
|
| | |
|
| | | public interface ExtractAuditRecordMapper {
|
| | |
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | int countAuditTotal(@Param("state")Integer state, @Param("preDay") String preDay);
|
| | | Long countAuditTotal(@Param("state")Integer state, @Param("preDay") String preDay);
|
| | |
|
| | | /**
|
| | | * 统计申请提的现总金额
|
| | |
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | int countApplyNumberByDay(@Param("preDay") String preDay);
|
| | | Long countApplyNumberByDay(@Param("preDay") String preDay);
|
| | |
|
| | | }
|
| | |
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | Integer countOrderByTypeAndDate(@Param("orderType") Integer orderType, @Param("preDay") String preDay);
|
| | | Long countOrderByTypeAndDate(@Param("orderType") Integer orderType, @Param("preDay") String preDay);
|
| | |
|
| | |
|
| | | } |
| | |
| | | */
|
| | | BigDecimal getCumulativeMoney(@Param("uid") Long uid);
|
| | |
|
| | | |
| | | /**
|
| | | * 统计当日新增金币
|
| | | * @param uniqueKey
|
| | | * @return
|
| | | */
|
| | | Long countNewAddByDate(@Param("preDay") String preDay);
|
| | | |
| | | /**
|
| | | * 列表查询
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | List<IntegralDetail> listQuery(@Param("start")long start, @Param("count")int count, @Param("key")String key);
|
| | | |
| | | Long countQuery(@Param("key")String key);
|
| | | } |
| | |
| | | List<ChartTDO> countOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
|
| | | @Param("startTime") String startTime, @Param("endTime") String endTime);
|
| | |
|
| | | |
| | | /**
|
| | | * 查询所有订单
|
| | | * |
| | | * @param channel
|
| | | * @return
|
| | | */
|
| | | List<JDOrderItem> listQuery(@Param("start") long start, @Param("count")int count, @Param("key")String key);
|
| | |
|
| | | Long countQuery(@Param("key")String key);
|
| | |
|
| | | } |
| | |
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | Integer countLostOrderNum(@Param("preDay") String preDay);
|
| | | Integer countLostOrderNum(@Param("preDay") String preDay, @Param("resultCode") int resultCode);
|
| | |
|
| | | /**
|
| | | * 统计申诉成功订单金额
|
| | |
| | | * @return
|
| | | */
|
| | | Long countByStatus(@Param("status") Integer status);
|
| | | |
| | | |
| | | /**
|
| | | * 查询所有订单
|
| | | * |
| | | * @param channel
|
| | | * @return
|
| | | */
|
| | | List<PDDOrder> listQuery(@Param("start") long start, @Param("count")int count, @Param("key")String key);
|
| | |
|
| | | Long countQuery(@Param("key")String key);
|
| | |
|
| | | } |
| | |
| | | */
|
| | | long count(@Param("key") String key, @Param("uid") Long uid, @Param("type") Integer type);
|
| | |
|
| | | |
| | | /**
|
| | | * 统计每日新增红包
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | Long countNumByDay(@Param("preDay") String preDay);
|
| | | |
| | | /**
|
| | | * 统计每日新增红包
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | BigDecimal countMoneyByDay(@Param("preDay") String preDay);
|
| | | |
| | | } |
| | |
| | | */
|
| | | Long selectCountByUidAndMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date);
|
| | |
|
| | | |
| | | /**
|
| | | * 统计每日新增红包
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | Long countNumByDay(@Param("preDay") String preDay);
|
| | | |
| | | /**
|
| | | * 统计每日新增红包
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | BigDecimal countMoneyByDay(@Param("preDay") String preDay);
|
| | | |
| | | |
| | | } |
| | |
| | | * @param date
|
| | | * @return
|
| | | */
|
| | | int countActiveNumByDate(@Param("date") String date);
|
| | | Long countActiveNumByDate(@Param("date") String date);
|
| | |
|
| | | } |
| | |
| | | * @param preDay |
| | | * @return |
| | | */ |
| | | Integer countByChannelAndDay(@Param("channel")String channel, @Param("preDay")String preDay); |
| | | Long countByChannelAndDay(@Param("channel")String channel, @Param("preDay")String preDay); |
| | | |
| | | } |
| | |
| | | List<ChartTDO> getFreeCouponMoneyToCharts(@Param("dateType") Integer dateType, @Param("year") String year,
|
| | | @Param("startTime")String startTime, @Param("endTime")String endTime, @Param("couponType")String couponType);
|
| | |
|
| | | |
| | | /**
|
| | | * 统计奖励券金额成功金额
|
| | | * @param type
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | BigDecimal countRebateMoneyByDay(@Param("preDay") String preDay);
|
| | | |
| | | |
| | | /**
|
| | | * 统计免单金额成功金额
|
| | | * @param type
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | BigDecimal countFreeMoneyByTypeAndDay(@Param("type") String type, @Param("preDay") String preDay);
|
| | | |
| | | |
| | | /**
|
| | | * 统计券每日新增数量
|
| | | * @param type
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | BigDecimal countCouponNumByDay(@Param("type") String type, @Param("preDay") String preDay);
|
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.user.count; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import com.yeshi.fanli.dao.MongodbBaseDao; |
| | | import com.yeshi.fanli.entity.admin.count.DailyCountCoupon; |
| | | import com.yeshi.fanli.entity.admin.count.DailyCountCoupon.DailyCountCouponEnum; |
| | | |
| | | @Repository |
| | | public class DailyCountCouponDao extends MongodbBaseDao<DailyCountCoupon> { |
| | | |
| | | /** |
| | | * 查询统计最大的一天 |
| | | * |
| | | * @return |
| | | */ |
| | | public DailyCountCoupon getMaxDate(DailyCountCouponEnum couponEnum) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("type").is(couponEnum.name())); |
| | | query.with(new Sort(Sort.Direction.DESC, "day")).limit(1); |
| | | return mongoTemplate.findOne(query, DailyCountCoupon.class); |
| | | } |
| | | |
| | | /** |
| | | * 查询视图 |
| | | * |
| | | * @param userEnum |
| | | * @param startTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | public List<DailyCountCoupon> query(DailyCountCouponEnum userEnum, Date startTime, Date endTime) { |
| | | Query query = new Query(); |
| | | Criteria ca = new Criteria(); |
| | | ca.andOperator(Criteria.where("type").is(userEnum.name()),Criteria.where("day").gte(startTime), Criteria.where("day").lte(endTime)); |
| | | query.addCriteria(ca); |
| | | return mongoTemplate.find(query, DailyCountCoupon.class); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.user.count; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import com.yeshi.fanli.dao.MongodbBaseDao; |
| | | import com.yeshi.fanli.entity.admin.count.DailyCountOrder; |
| | | import com.yeshi.fanli.entity.admin.count.DailyCountOrder.DailyCountOrderEnum; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | |
| | | @Repository |
| | | public class DailyCountOrderDao extends MongodbBaseDao<DailyCountOrder> { |
| | | |
| | | /** |
| | | * 查询统计最大的一天 |
| | | * |
| | | * @return |
| | | */ |
| | | public DailyCountOrder getMaxDate(DailyCountOrderEnum couponEnum) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("type").is(couponEnum.name())); |
| | | query.with(new Sort(Sort.Direction.DESC, "day")).limit(1); |
| | | return mongoTemplate.findOne(query, DailyCountOrder.class); |
| | | } |
| | | |
| | | /** |
| | | * 查询视图 |
| | | * |
| | | * @param userEnum |
| | | * @param startTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | public List<DailyCountOrder> query(DailyCountOrderEnum userEnum, Date startTime, Date endTime, String channel) { |
| | | Query query = new Query(); |
| | | Criteria ca = new Criteria(); |
| | | ca.andOperator(Criteria.where("type").is(userEnum.name()),Criteria.where("day").gte(startTime), Criteria.where("day").lte(endTime)); |
| | | query.addCriteria(ca); |
| | | if (!StringUtil.isNullOrEmpty(channel)) { |
| | | query.addCriteria(Criteria.where("channel").is(channel)); |
| | | } |
| | | return mongoTemplate.find(query, DailyCountOrder.class); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.dao.user.count; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import com.yeshi.fanli.dao.MongodbBaseDao; |
| | | import com.yeshi.fanli.entity.admin.count.DailyCountUser; |
| | | import com.yeshi.fanli.entity.admin.count.DailyCountUser.DailyCountUserEnum; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | |
| | | @Repository |
| | | public class DailyCountUserDao extends MongodbBaseDao<DailyCountUser> { |
| | | |
| | | /** |
| | | * 查询统计最大的一天 |
| | | * |
| | | * @return |
| | | */ |
| | | public DailyCountUser getMaxDate(DailyCountUserEnum couponEnum) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("type").is(couponEnum.name())); |
| | | query.with(new Sort(Sort.Direction.DESC, "day")).limit(1); |
| | | return mongoTemplate.findOne(query, DailyCountUser.class); |
| | | } |
| | | |
| | | /** |
| | | * 查询视图 |
| | | * |
| | | * @param userEnum |
| | | * @param startTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | public List<DailyCountUser> query(DailyCountUserEnum userEnum, Date startTime, Date endTime, String channel) { |
| | | Query query = new Query(); |
| | | Criteria ca = new Criteria(); |
| | | ca.andOperator(Criteria.where("type").is(userEnum.name()),Criteria.where("day").gte(startTime), Criteria.where("day").lte(endTime)); |
| | | query.addCriteria(ca); |
| | | if (!StringUtil.isNullOrEmpty(channel)) { |
| | | query.addCriteria(Criteria.where("channel").is(channel)); |
| | | } |
| | | return mongoTemplate.find(query, DailyCountUser.class); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.yeshi.fanli.dto.user;
|
| | |
|
| | | public enum UserInviteLevelEnum {
|
| | | noActive("未激活", ""), actived("已经激活", ""), vipApply("超级会员申请中", ""), vip("超级会员", ""), tearcherApply("导师申请中",
|
| | | ""), tearcher("导师", "");
|
| | | noActive("未激活", ""),
|
| | | actived("已经激活", ""),
|
| | | vipApply("超级会员申请中", ""),
|
| | | vipPre1("普通会员", ""), |
| | | vipPre2("高级会员", ""), |
| | | vip("超级会员", ""), |
| | | tearcherApply("导师申请中",""),
|
| | | tearcher("导师", "");
|
| | | private String name;
|
| | | private String link;
|
| | |
|
| | |
| | | import org.springframework.data.mongodb.core.mapping.Field; |
| | | |
| | | /** |
| | | * 渠道订单统计 |
| | | * 券相关统计 |
| | | * |
| | | * @author Administrator |
| | | * |
| | |
| | | extractAuditNumber("提现审核次数"), |
| | | todayOrder("当日订单的用户数量"), |
| | | weekOrder("7天内订单用户数量"), |
| | | weekThreeOrder("7天内订单用户数量"),; |
| | | weekThreeOrder("7天内订单用户数量"), |
| | | integral("金币数量"); |
| | | |
| | | private final String desc; |
| | | |
| | |
| | | // 渠道 |
| | | @Field("channel") |
| | | private String channel; |
| | | |
| | | // 更新日期 |
| | | @Field("updateDate") |
| | | private Date updateDate; |
| | | |
| | | public String getId() { |
| | | return id; |
| | |
| | | this.state = state; |
| | | } |
| | | |
| | | public Date getUpdateDate() { |
| | | return updateDate; |
| | | } |
| | | |
| | | public void setUpdateDate(Date updateDate) { |
| | | this.updateDate = updateDate; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.entity.admin.count; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | import org.springframework.data.mongodb.core.mapping.Field; |
| | | |
| | | /** |
| | | * 每日券统计 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | @Document(collection = "daily_count_coupon") |
| | | public class DailyCountCoupon { |
| | | |
| | | public enum DailyCountCouponEnum { |
| | | freeCouponNum("免单券统计数量"), |
| | | freeCouponMoney("免单券统计金额"), |
| | | freeCouponBuyNum("自购免单券统计数量"), |
| | | freeCouponBuyMoney("自购免单券统计金额"), |
| | | welfareFreeCouponNum("福利免单统计数量"), |
| | | welfareFreeCouponMoney("福利免单统计金额"), |
| | | freeCouponGiveNum("赠送免单券统计数量"), |
| | | rebateCouponNum("返利奖励券统计数量"), |
| | | rebateCouponMoney("返利奖励券统计金额"); |
| | | |
| | | private final String desc; |
| | | |
| | | private DailyCountCouponEnum(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | } |
| | | |
| | | @Field("_id") |
| | | private String id; |
| | | // 日期:年月日 |
| | | @Field("day") |
| | | private Date day; |
| | | // 总数 |
| | | @Field("total") |
| | | private BigDecimal total; |
| | | // 类型 |
| | | @Field("type") |
| | | private DailyCountCouponEnum type; |
| | | // 更新日期 |
| | | @Field("updateDate") |
| | | private Date updateDate; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Date getDay() { |
| | | return day; |
| | | } |
| | | |
| | | public void setDay(Date day) { |
| | | this.day = day; |
| | | } |
| | | |
| | | public BigDecimal getTotal() { |
| | | return total; |
| | | } |
| | | |
| | | public void setTotal(BigDecimal total) { |
| | | this.total = total; |
| | | } |
| | | |
| | | public DailyCountCouponEnum getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(DailyCountCouponEnum type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Date getUpdateDate() { |
| | | return updateDate; |
| | | } |
| | | |
| | | public void setUpdateDate(Date updateDate) { |
| | | this.updateDate = updateDate; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.entity.admin.count; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | import org.springframework.data.mongodb.core.mapping.Field; |
| | | |
| | | /** |
| | | * 每日订单统计 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | @Document(collection = "daily_count_order") |
| | | public class DailyCountOrder { |
| | | |
| | | public enum DailyCountOrderEnum { |
| | | fanliOrderNum("返利订单数量"), |
| | | shareOrderNum("分享订单数量"), |
| | | inviteOrderNum("邀请订单数量"), |
| | | |
| | | channelOrderNum24H("渠道订单统计数量24小时内"), |
| | | channelOrderNum("渠道订单统计数量"), |
| | | channelOrderMoney("渠道订单统计金额"), |
| | | |
| | | weiQuanOrderNum("售后订单统计数量"), |
| | | weiQuanOrderMoney("售后订单统计金额"), |
| | | |
| | | tbOrderTrackRate("淘宝订单根据率"), |
| | | jdOrderTrackRate("京东订单根据率"), |
| | | pddOrderTrackRate("拼多多订单根据率"), |
| | | |
| | | lastOrderUntreatedNum("订单找回未处理统计数量"), |
| | | lastOrderSucceedNum("订单找回成功统计数量"), |
| | | lastOrderFailNum("订单找回失败统计数量"), |
| | | lastOrderSucceedMoney("订单找回成功统计金额"); |
| | | |
| | | private final String desc; |
| | | |
| | | private DailyCountOrderEnum(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | } |
| | | |
| | | @Field("_id") |
| | | private String id; |
| | | // 日期:年月日 |
| | | @Field("day") |
| | | private Date day; |
| | | // 总数 |
| | | @Field("total") |
| | | private BigDecimal total; |
| | | // 类型 |
| | | @Field("type") |
| | | private DailyCountOrderEnum type; |
| | | // 渠道 |
| | | @Field("channel") |
| | | private String channel; |
| | | // 更新日期 |
| | | @Field("updateDate") |
| | | private Date updateDate; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Date getDay() { |
| | | return day; |
| | | } |
| | | |
| | | public void setDay(Date day) { |
| | | this.day = day; |
| | | } |
| | | |
| | | public BigDecimal getTotal() { |
| | | return total; |
| | | } |
| | | |
| | | public void setTotal(BigDecimal total) { |
| | | this.total = total; |
| | | } |
| | | |
| | | public DailyCountOrderEnum getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(DailyCountOrderEnum type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Date getUpdateDate() { |
| | | return updateDate; |
| | | } |
| | | |
| | | public void setUpdateDate(Date updateDate) { |
| | | this.updateDate = updateDate; |
| | | } |
| | | |
| | | public String getChannel() { |
| | | return channel; |
| | | } |
| | | |
| | | public void setChannel(String channel) { |
| | | this.channel = channel; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.entity.admin.count; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | import org.springframework.data.mongodb.core.mapping.Field; |
| | | |
| | | /** |
| | | * 每日用户统计 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | @Document(collection = "daily_count_user") |
| | | public class DailyCountUser { |
| | | |
| | | public enum DailyCountUserEnum { |
| | | newUserChannel("新增用户分渠道"), |
| | | newUserDownOrderDay("转化率-当日下单"), |
| | | newUserDownOrderWeek("转化率-当周下单"), |
| | | newUserDownOrderWeek3("转化率-当周下3单"), |
| | | activeAgain90("90天再次活跃"), |
| | | integralNum("用户金币数量"), |
| | | newUserTljNum("新人红包数量总计"), |
| | | newUserTljMoney("新人红包金额总计"), |
| | | redpackNum("奖励红包总计"), |
| | | redpackMoney("奖励红包总计"), |
| | | extractApplyNumber("提现申请次数"), |
| | | extractApplyMoney("提现申请金额"), |
| | | extractAuditPass("提现审核通过"), |
| | | extractAuditReject("提现审核驳回"); |
| | | |
| | | private final String desc; |
| | | |
| | | private DailyCountUserEnum(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | } |
| | | |
| | | @Field("_id") |
| | | private String id; |
| | | // 日期:年月日 |
| | | @Field("day") |
| | | private Date day; |
| | | // 总数 |
| | | @Field("total") |
| | | private BigDecimal total; |
| | | // 类型 |
| | | @Field("type") |
| | | private DailyCountUserEnum type; |
| | | // 渠道 |
| | | @Field("channel") |
| | | private String channel; |
| | | // 更新日期 |
| | | @Field("updateDate") |
| | | private Date updateDate; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Date getDay() { |
| | | return day; |
| | | } |
| | | |
| | | public void setDay(Date day) { |
| | | this.day = day; |
| | | } |
| | | |
| | | public BigDecimal getTotal() { |
| | | return total; |
| | | } |
| | | |
| | | public void setTotal(BigDecimal total) { |
| | | this.total = total; |
| | | } |
| | | |
| | | public DailyCountUserEnum getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(DailyCountUserEnum type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Date getUpdateDate() { |
| | | return updateDate; |
| | | } |
| | | |
| | | public void setUpdateDate(Date updateDate) { |
| | | this.updateDate = updateDate; |
| | | } |
| | | |
| | | public String getChannel() { |
| | | return channel; |
| | | } |
| | | |
| | | public void setChannel(String channel) { |
| | | this.channel = channel; |
| | | } |
| | | |
| | | } |
| | |
| | | @Column(name = "td_create_time")
|
| | | private Date createTime;
|
| | |
|
| | |
|
| | | private String nickName;// 昵称
|
| | | private String portrait;// 头像
|
| | | |
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
| | | public void setUniqueKey(String uniqueKey) {
|
| | | this.uniqueKey = uniqueKey;
|
| | | }
|
| | |
|
| | | 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 getVlaue() { |
| | | return vlaue; |
| | | } |
| | | |
| | | /** |
| | | * 获取枚举类型 |
| | | * @param type |
| | | * @return |
| | | */ |
| | | public static ChannelEnum getTypeEnum(String type) { |
| | | if (ChannelEnum.unknown.name().equals(type)) |
| | | return ChannelEnum.unknown; |
| | | |
| | | if (ChannelEnum.p360.name().equals(type)) |
| | | return ChannelEnum.p360; |
| | | |
| | | if (ChannelEnum.appstore.name().equals(type)) |
| | | return ChannelEnum.appstore; |
| | | |
| | | if (ChannelEnum.douyin.name().equals(type)) |
| | | return ChannelEnum.douyin; |
| | | |
| | | if (ChannelEnum.guanwang.name().equals(type)) |
| | | return ChannelEnum.guanwang; |
| | | |
| | | if (ChannelEnum.lenovo.name().equals(type)) |
| | | return ChannelEnum.lenovo; |
| | | |
| | | if (ChannelEnum.meizu.name().equals(type)) |
| | | return ChannelEnum.meizu; |
| | | |
| | | if (ChannelEnum.oppo.name().equals(type)) |
| | | return ChannelEnum.oppo; |
| | | |
| | | if (ChannelEnum.pp.name().equals(type)) |
| | | return ChannelEnum.pp; |
| | | |
| | | if (ChannelEnum.qq.name().equals(type)) |
| | | return ChannelEnum.qq; |
| | | |
| | | if (ChannelEnum.sougou.name().equals(type)) |
| | | return ChannelEnum.sougou; |
| | | |
| | | if (ChannelEnum.vivo.name().equals(type)) |
| | | return ChannelEnum.vivo; |
| | | |
| | | if (ChannelEnum.xiaomi.name().equals(type)) |
| | | return ChannelEnum.xiaomi; |
| | | |
| | | if (ChannelEnum.yaoqing.name().equals(type)) |
| | | return ChannelEnum.yaoqing; |
| | | |
| | | if (ChannelEnum.yingyin.name().equals(type)) |
| | | return ChannelEnum.yingyin; |
| | | |
| | | if (ChannelEnum.huawei.name().equals(type)) |
| | | return ChannelEnum.huawei; |
| | | |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.entity.system; |
| | | |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | import org.springframework.data.mongodb.core.mapping.Field; |
| | | |
| | | /** |
| | | * 设置分类 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | @Document(collection = "config_category") |
| | | public class ConfigCategory { |
| | | |
| | | public enum ConfigCategoryEnum { |
| | | versionDiff("标签栏引导提示"), |
| | | msgNotify("大图通知"), |
| | | tbGoods("淘宝商品"), |
| | | jdGoods("京东商品"), |
| | | pddGoods("拼多多商品"), |
| | | goldCoin("金币设置"), |
| | | freeCoupon("免单券设置"), |
| | | rebateCoupon("返利奖励券设置"), |
| | | pageText("页面文本设置"), |
| | | protocol("协议相关"), |
| | | rule("规则相关"), |
| | | helpStrategy("帮助攻略相关"), |
| | | orderCart("订单购物车相关"), |
| | | maskControl("遮罩控制"), |
| | | extract("提现相关"); |
| | | |
| | | private final String desc; |
| | | |
| | | private ConfigCategoryEnum(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | } |
| | | |
| | | @Field("_id") |
| | | private String id; |
| | | // 类型 |
| | | @Field("type") |
| | | private ConfigCategoryEnum type; |
| | | // 关键词枚举 |
| | | @Field("KeyEnum") |
| | | private ConfigKeyEnum KeyEnum; |
| | | // 类型 |
| | | @Field("order") |
| | | private int order; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public ConfigCategoryEnum getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(ConfigCategoryEnum type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public ConfigKeyEnum getKeyEnum() { |
| | | return KeyEnum; |
| | | } |
| | | |
| | | public void setKeyEnum(ConfigKeyEnum keyEnum) { |
| | | KeyEnum = keyEnum; |
| | | } |
| | | |
| | | public int getOrder() { |
| | | return order; |
| | | } |
| | | |
| | | public void setOrder(int order) { |
| | | this.order = order; |
| | | } |
| | | |
| | | } |
| | |
| | | taobaoOrderParseJS("taobao_order_parse_js", "淘宝订单解析脚本"), |
| | | autoFindTaobaoOrder("auto_find_taobao_order", "是否开启淘宝自动找单"), |
| | | orderListHelp("order_list_help", "订单列表帮助链接"), |
| | | orderBonusLink("order_bonus_link", "奖金跳转订单筛选列表帮助链接"), |
| | | lostOrderHelpWhat("lost_order_help_what", "订单找回-订单找回是什么"), |
| | | lostOrderHelpReason("lost_order_help_reason", "订单找回-找回失败原因"), |
| | | orderFindNotifyUrl("order_find_notify_url", "订单列表-订单找回帮助链接"), |
| | |
| | | evaluateText("evaluate_text", "发圈评论文本"), |
| | | |
| | | |
| | | shareOrderRebateDescLink("share_order_rebate_desc_link", "分享订单返利计算说明链接"), |
| | | orderRebateDescLink("order_rebate_desc_link", "订单返利计算说明链接"), |
| | | ; |
| | | |
| | | private final String key; |
| | |
| | |
|
| | |
|
| | |
|
| | | <select id="countAuditTotal" resultType="Integer">
|
| | | SELECT IFNULL(COUNT(tr.id),0) FROM `yeshi_ec_extract_audit_record` tr
|
| | | <select id="countAuditTotal" resultType="Long">
|
| | | SELECT COUNT(tr.id) FROM `yeshi_ec_extract_audit_record` tr
|
| | | LEFT JOIN `yeshi_ec_extract` t ON t.`id` = tr.`extractId`
|
| | | WHERE t.`state` = #{state} AND FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d') = #{preDay}
|
| | | </select>
|
| | |
| | | WHERE FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') = #{preDay}
|
| | | </select>
|
| | |
|
| | | <select id="countApplyNumberByDay" resultType="Integer">
|
| | | SELECT IFNULL(COUNT(t.id),0) FROM `yeshi_ec_extract` t
|
| | | <select id="countApplyNumberByDay" resultType="Long">
|
| | | SELECT COUNT(t.id) FROM `yeshi_ec_extract` t
|
| | | WHERE FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') = #{preDay}
|
| | | </select>
|
| | |
|
| | |
| | | </select>
|
| | |
|
| | |
|
| | | <select id="countOrderByTypeAndDate" resultType="Integer">
|
| | | SELECT COUNT(co.`co_id`) FROM yeshi_ec_hongbao_order ho |
| | | LEFT JOIN (SELECT * FROM yeshi_ec_hongbao_v2 v2 |
| | | <select id="countOrderByTypeAndDate" resultType="Long">
|
| | | SELECT COUNT(1) FROM (SELECT ho.* FROM yeshi_ec_hongbao_order ho |
| | | LEFT JOIN (SELECT * FROM yeshi_ec_hongbao_v2 v2 |
| | | WHERE 1=1
|
| | | <if test="orderType == 1"> <!-- 自购订单 -->
|
| | | AND (v2.hb_type =1 or v2.hb_type =2)
|
| | |
| | | LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id`
|
| | | WHERE hb.hb_id IS NOT NULL AND (co.`co_state`=1 OR co.`co_state`=2)
|
| | | AND DATE_FORMAT(co.`co_third_create_time`,'%Y-%m-%d') = #{preDay}
|
| | | GROUP BY co.`co_order_no`, co.`co_source_type`
|
| | | GROUP BY co.`co_order_no`, co.`co_source_type`)A
|
| | | </select>
|
| | |
|
| | | </mapper>
|
| | |
| | | WHERE d.`td_uid` = #{uid} AND d.`td_money` > 0;
|
| | | </select>
|
| | |
|
| | | |
| | | <select id="countNewAddByDate" resultType = "Long">
|
| | | SELECT SUM(d.`td_money`) FROM `yeshi_ec_integral_detail` d
|
| | | WHERE d.`td_money` > 0 AND TO_DAYS(d.`td_create_time`) = TO_DAYS(#{preDay})
|
| | | </select>
|
| | | |
| | | |
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | SELECT * FROM `yeshi_ec_integral_detail` d
|
| | | <if test="key != null and key != ''">WHERE d.`td_uid` LIKE '%${key}%'</if>
|
| | | ORDER BY d.`td_id` DESC
|
| | | LIMIT #{start},#{count}
|
| | | </select>
|
| | | |
| | | <select id="countQuery" resultType = "Long">
|
| | | SELECT COUNT(d.`td_id`) FROM `yeshi_ec_integral_detail` d |
| | | <if test="key != null and key != ''">WHERE d.`td_uid` LIKE '%${key}%'</if>
|
| | | </select>
|
| | | </mapper>
|
| | |
| | | ORDER BY jo_order_time
|
| | | </select>
|
| | |
|
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | SELECT * FROM yeshi_ec_jd_order_item f
|
| | | <if test="key != null and key !='' ">
|
| | | WHERE f.`joi_order_id` LIKE '${key}%'
|
| | | </if>
|
| | | ORDER BY f.`joi_id` DESC
|
| | | LIMIT #{start},#{count}
|
| | | </select>
|
| | | |
| | | <select id="countQuery" resultType="Long">
|
| | | SELECT COUNT(f.`joi_id`) FROM yeshi_ec_jd_order_item f
|
| | | <if test="key != null and key !='' ">
|
| | | WHERE f.`joi_order_id` LIKE '${key}%'
|
| | | </if>
|
| | | </select>
|
| | | </mapper>
|
| | |
| | | <select id="countValidOrderByDay" resultMap="CountOrderMap"> |
| | | SELECT co_uid AS uid ,totalOrder FROM ( |
| | | SELECT COUNT(d.`co_id`) AS totalOrder,d.`co_uid` FROM `yeshi_ec_common_order` d |
| | | WHERE DATE_FORMAT(d.`co_third_create_time`,'%Y-%m-%d') = '2019-11-11' AND (d.`co_state`=1 OR d.`co_state`=2) |
| | | WHERE DATE_FORMAT(d.`co_third_create_time`,'%Y-%m-%d') = #{preDay} |
| | | AND (d.`co_state`=1 OR d.`co_state`=2) |
| | | GROUP BY d.`co_order_no`,d.`co_source_type`)A |
| | | GROUP BY co_uid |
| | | </select> |
| | |
| | | <select id="countCommissionByDay" resultMap="CountOrderMap"> |
| | | SELECT co_uid AS uid ,commission FROM ( |
| | | SELECT SUM(IFNULL(d.`co_eIncome`,d.`co_estimate`)) AS commission,d.`co_uid` FROM `yeshi_ec_common_order` d |
| | | WHERE DATE_FORMAT(d.`co_third_create_time`,'%Y-%m-%d') = '2019-11-11' AND (d.`co_state`=1 OR d.`co_state`=2) |
| | | WHERE DATE_FORMAT(d.`co_third_create_time`,'%Y-%m-%d') = #{preDay} AND (d.`co_state`=1 OR d.`co_state`=2) |
| | | GROUP BY d.`co_order_no`,d.`co_source_type`)A |
| | | GROUP BY co_uid |
| | | </select> |
| | |
| | | <select id="countLostOrderNum" resultType="Integer">
|
| | | SELECT COUNT(1) FROM (SELECT COUNT(t.`id`) FROM `yeshi_ec_lost_order` t
|
| | | WHERE FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') = #{preDay}
|
| | | AND t.result_code = #{resultCode}
|
| | | GROUP BY t.`orderId`,t.`orderType`)A
|
| | | </select>
|
| | |
|
| | |
| | | </if>
|
| | | </select>
|
| | |
|
| | | <select id="listQuery" resultMap="BaseResultMap">
|
| | | SELECT * FROM yeshi_ec_pdd_order f
|
| | | <if test="key != null and key !='' ">
|
| | | WHERE f.`po_order_id` LIKE '${key}%'
|
| | | </if>
|
| | | ORDER BY f.`po_id` DESC
|
| | | LIMIT #{start},#{count}
|
| | | </select>
|
| | | |
| | | <select id="countQuery" resultType="Long">
|
| | | SELECT COUNT(f.`po_id`) FROM yeshi_ec_pdd_order f
|
| | | <if test="key != null and key !='' ">
|
| | | WHERE f.`po_order_id` LIKE '${key}%'
|
| | | </if>
|
| | | </select>
|
| | |
|
| | |
|
| | | </mapper>
|
| | |
| | | AND t.`rpd_type` = 'deduct'
|
| | | </if>
|
| | | </select>
|
| | | |
| | | <select id="countNumByDay" resultType="Long">
|
| | | SELECT COUNT(d.`rpd_id`) FROM `yeshi_ec_red_pack_detail` d
|
| | | WHERE d.`rpd_money` > 0 AND d.`rpd_type` NOT IN ('refund','giveOthersFail','shopOrderDrawBack','redExchangeReject')
|
| | | AND TO_DAYS( d.`rpd_create_time`) = TO_DAYS(#{preDay})
|
| | | </select>
|
| | | |
| | | |
| | | <select id="countMoneyByDay" resultType="BigDecimal">
|
| | | SELECT SUM(d.`rpd_money`) FROM `yeshi_ec_red_pack_detail` d
|
| | | WHERE d.`rpd_money` > 0 AND d.`rpd_type` NOT IN ('refund','giveOthersFail','shopOrderDrawBack','redExchangeReject')
|
| | | AND TO_DAYS( d.`rpd_create_time`) = TO_DAYS(#{preDay})
|
| | | </select>
|
| | | |
| | | </mapper>
|
| | |
| | | SELECT count(utd_id) FROM yeshi_ec_user_taolijin_detail
|
| | | WHERE utd_uid=#{uid} and `utd_create_time`<![CDATA[<=]]>#{date}
|
| | | </select>
|
| | | |
| | | <select id="countNumByDay" resultType="Long">
|
| | | SELECT COUNT(d.`utd_id`) FROM `yeshi_ec_user_taolijin_detail` d
|
| | | WHERE d.`utd_type` = 'add' AND TO_DAYS(d.`utd_create_time`) = TO_DAYS(#{preDay})
|
| | | </select>
|
| | | |
| | | <select id="countMoneyByDay" resultType="BigDecimal">
|
| | | SELECT SUM(d.`utd_money`) FROM `yeshi_ec_user_taolijin_detail` d
|
| | | WHERE d.`utd_type` = 'add' AND TO_DAYS(d.`utd_create_time`) = TO_DAYS(#{preDay})
|
| | | </select>
|
| | | |
| | | |
| | |
|
| | | </mapper>
|
| | |
| | | </select>
|
| | |
|
| | |
|
| | | <select id="countActiveNumByDate" resultType="java.lang.Integer">
|
| | | SELECT IFNULL(COUNT(dd.`uie_uid`),0) |
| | | FROM (SELECT t.`uie_uid`, MAX(d.`lua_createtime`) AS lastDate FROM `yeshi_ec_user_info_extra` t |
| | | <select id="countActiveNumByDate" resultType="Long">
|
| | | SELECT COUNT(dd.`uie_uid`) FROM (SELECT t.`uie_uid`, MAX(d.`lua_createtime`) AS lastDate FROM `yeshi_ec_user_info_extra` t |
| | | LEFT JOIN `yeshi_ec_log_user_active` d ON t.`uie_uid` = d.`lua_uid`
|
| | | WHERE TO_DAYS(t.`uie_active_time`) = TO_DAYS('${date}')
|
| | | AND TO_DAYS(d.`lua_createtime`) <![CDATA[<]]> TO_DAYS('${date}')
|
| | |
| | | |
| | | <select id="listUidByChannelAndDay" resultType="Long"> |
| | | SELECT regt_id FROM yeshi_ec_user_info_register |
| | | WHERE regt_channel = #{channel} AND TO_DAYS(regt_create_time) = #{preDay} |
| | | WHERE regt_channel = #{channel} AND TO_DAYS(regt_create_time) = TO_DAYS(#{preDay}) |
| | | </select> |
| | | |
| | | <select id="listByChannelAndDay" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_user_info_register |
| | | WHERE regt_channel = #{channel} AND TO_DAYS(regt_create_time) = #{preDay} |
| | | WHERE regt_channel = #{channel} AND TO_DAYS(regt_create_time) = TO_DAYS(#{preDay}) |
| | | </select> |
| | | |
| | | |
| | | <select id="countByChannelAndDay" resultMap="BaseResultMap"> |
| | | <select id="countByChannelAndDay" resultType="Long"> |
| | | SELECT COUNT(regt_id) FROM yeshi_ec_user_info_register |
| | | WHERE regt_channel = #{channel} AND TO_DAYS(regt_create_time) = #{preDay} |
| | | WHERE regt_channel = #{channel} AND TO_DAYS(regt_create_time) = TO_DAYS(#{preDay}) |
| | | </select> |
| | | |
| | | |
| | |
| | | </if>
|
| | | ORDER BY v2.`hb_get_time`
|
| | | </select>
|
| | | |
| | | |
| | | <select id="countFreeMoneyByTypeAndDay" resultType="BigDecimal">
|
| | | SELECT SUM(v2.`hb_money`) FROM yeshi_ec_user_system_coupon c |
| | | LEFT JOIN yeshi_ec_system_coupon sp ON sp.`sc_id` = c.`usc_coupon_id` |
| | | LEFT JOIN `yeshi_ec_user_system_coupon_record` pr ON c.`usc_id` = pr.`ucr_user_coupon_id`
|
| | | LEFT JOIN `yeshi_ec_common_order` co ON pr.`ucr_order_no` = co.`co_order_no`
|
| | | LEFT JOIN `yeshi_ec_hongbao_order` ho ON ho.`ho_order_id` = co.`co_id`
|
| | | LEFT JOIN `yeshi_ec_hongbao_v2` v2 ON ho.`ho_hongbao_id` = v2.`hb_id`
|
| | | WHERE pr.`ucr_state` = 3 AND sp.`sc_type` = #{type} |
| | | AND TO_DAYS(v2.`hb_get_time`) = TO_DAYS(#{preDay})
|
| | | </select>
|
| | | |
| | | <select id="countRebateMoneyByDay" resultType="BigDecimal">
|
| | | SELECT SUM(v2.`hb_money`) FROM yeshi_ec_hongbao_v2 v2 |
| | | WHERE v2.`hb_type`= 10 AND TO_DAYS(v2.`hb_get_time`) = TO_DAYS(#{preDay}) |
| | | </select>
|
| | | |
| | | <select id="countCouponNumByDay" resultType="BigDecimal">
|
| | | SELECT COUNT(c.`usc_id`) FROM yeshi_ec_user_system_coupon c |
| | | LEFT JOIN yeshi_ec_system_coupon p ON p.`sc_id`= c.`usc_coupon_id`
|
| | | WHERE p.`sc_type` = #{type} AND TO_DAYS(c.`usc_create_time`) = TO_DAYS(#{preDay})
|
| | | </select>
|
| | | |
| | | |
| | | </mapper>
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.config;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mongo.system.ConfigCategoryDao;
|
| | | import com.yeshi.fanli.entity.system.ConfigCategory;
|
| | | import com.yeshi.fanli.entity.system.ConfigCategory.ConfigCategoryEnum;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigCategoryService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class ConfigCategoryServiceImpl implements ConfigCategoryService {
|
| | |
|
| | | @Resource
|
| | | private ConfigCategoryDao configCategoryDao;
|
| | |
|
| | | @Override
|
| | | public void addConfigCategory(ConfigCategory configCategory) {
|
| | | if (configCategory == null) {
|
| | | return;
|
| | | }
|
| | | |
| | | ConfigCategoryEnum type = configCategory.getType();
|
| | | ConfigKeyEnum keyEnum = configCategory.getKeyEnum();
|
| | | if (type == null || keyEnum == null) {
|
| | | return; |
| | | }
|
| | | |
| | | configCategory.setId(StringUtil.Md5(type.name() +"#space#" + keyEnum.name()));
|
| | | configCategoryDao.save(configCategory);
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<ConfigCategory> listByType(ConfigCategoryEnum type) {
|
| | | return configCategoryDao.listByType(type);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public ConfigCategoryEnum getCategoryEnum(String name) {
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | return null;
|
| | | }
|
| | | |
| | | ConfigCategoryEnum[] array = ConfigCategoryEnum.values();
|
| | | for (int i = 0; i < array.length; i ++) {
|
| | | if (array[i].name().equals(name)) {
|
| | | return array[i];
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | }
|
| | |
| | | config.setCreatetime(currentTime + "");
|
| | | configMapper.updateByPrimaryKeySelective(config);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public Config getConfigBykeyNoCache(String key) {
|
| | | List<Config> list = configMapper.listByKey(key, null, null);
|
| | | if (list.size() == 0) {
|
| | | return null;
|
| | | }
|
| | | return list.get(0);
|
| | | }
|
| | | }
|
| | |
| | | return result_list; |
| | | } |
| | | |
| | | @Override |
| | | public Long countOrderBySourceTypeAndDay(int source, String preDay) { |
| | | return commonOrderCountMapper.countOrderBySourceTypeAndDay(preDay, source); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.service.impl.count;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.user.count.DailyCountCouponDao;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountCoupon;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountCoupon.DailyCountCouponEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum;
|
| | | import com.yeshi.fanli.service.inter.count.DailyCountCouponService;
|
| | | import com.yeshi.fanli.service.inter.count.UserSystemCouponCountService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | @Service
|
| | | public class DailyCountCouponServiceImpl implements DailyCountCouponService {
|
| | |
|
| | | @Resource
|
| | | private DailyCountCouponDao dailyCountCouponDao;
|
| | | |
| | | @Resource
|
| | | private UserSystemCouponCountService userSystemCouponCountService;
|
| | |
|
| | | @Override
|
| | | public List<DailyCountCoupon> getDailyCountList(String type, Date startTime, Date endTime) throws Exception {
|
| | | // 查询类型
|
| | | DailyCountCouponEnum typeEnum = getTypeEnum(type);
|
| | | if (typeEnum == null) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | // 初始化数据
|
| | | initData(typeEnum);
|
| | |
|
| | | return dailyCountCouponDao.query(typeEnum, startTime, endTime);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取枚举类型
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | private DailyCountCouponEnum getTypeEnum(String name) {
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | return null;
|
| | | }
|
| | | |
| | | DailyCountCouponEnum[] array = DailyCountCouponEnum.values();
|
| | | for (int i = 0; i < array.length; i ++) {
|
| | | if (array[i].name().equals(name)) {
|
| | | return array[i];
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 获取枚举类型
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public String getTypeEnumDesc(String name) {
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | return "";
|
| | | }
|
| | | |
| | | DailyCountCouponEnum[] array = DailyCountCouponEnum.values();
|
| | | for (int i = 0; i < array.length; i ++) {
|
| | | if (array[i].name().equals(name)) {
|
| | | return array[i].getDesc();
|
| | | }
|
| | | }
|
| | |
|
| | | return "";
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 初始数据
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void initData(DailyCountCouponEnum typeEnum) throws Exception {
|
| | | Date lastDate = null;
|
| | | DailyCountCoupon lastRecord = dailyCountCouponDao.getMaxDate(typeEnum);
|
| | | if (lastRecord != null) {
|
| | | lastDate = lastRecord.getUpdateDate();
|
| | | } else {
|
| | | lastDate = TimeUtil.parse("2019-03-04");
|
| | | }
|
| | |
|
| | | Date today = new Date();
|
| | | int betweenDays = DateUtil.daysBetween2(lastDate, today);
|
| | | for (int i = 0; i <= betweenDays; i++) {
|
| | | // 计算日期
|
| | | String preDay = DateUtil.plusDay(i, lastDate);
|
| | | // 统计数据
|
| | | BigDecimal total = getCountByType(preDay, typeEnum);
|
| | |
|
| | | // 保存信息
|
| | | DailyCountCoupon obj = new DailyCountCoupon();
|
| | | obj.setTotal(total);
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountCouponDao.save(obj);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 数据统计
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @return
|
| | | */
|
| | | private BigDecimal getCountByType(String preDay, DailyCountCouponEnum typeEnum) {
|
| | | BigDecimal total = null;
|
| | | if (DailyCountCouponEnum.freeCouponNum == typeEnum) {
|
| | | total = userSystemCouponCountService.countCouponNumByDay(CouponTypeEnum.freeCoupon, preDay);
|
| | | } else if (DailyCountCouponEnum.freeCouponMoney == typeEnum) {
|
| | | total = userSystemCouponCountService.countFreeMoneyByTypeAndDay(CouponTypeEnum.freeCoupon, preDay);
|
| | | } else if (DailyCountCouponEnum.freeCouponBuyNum == typeEnum) {
|
| | | total = userSystemCouponCountService.countCouponNumByDay(CouponTypeEnum.freeCouponBuy, preDay);
|
| | | } else if (DailyCountCouponEnum.freeCouponBuyMoney == typeEnum) {
|
| | | total = userSystemCouponCountService.countFreeMoneyByTypeAndDay(CouponTypeEnum.freeCouponBuy, preDay);
|
| | | } else if (DailyCountCouponEnum.welfareFreeCouponNum == typeEnum) {
|
| | | total = userSystemCouponCountService.countCouponNumByDay(CouponTypeEnum.welfareFreeCoupon, preDay);
|
| | | } else if (DailyCountCouponEnum.welfareFreeCouponMoney == typeEnum) {
|
| | | total = userSystemCouponCountService.countFreeMoneyByTypeAndDay(CouponTypeEnum.welfareFreeCoupon, preDay);
|
| | | } else if (DailyCountCouponEnum.freeCouponGiveNum == typeEnum) {
|
| | | total = userSystemCouponCountService.countCouponNumByDay(CouponTypeEnum.freeCouponGive, preDay);
|
| | | } else if (DailyCountCouponEnum.rebateCouponNum == typeEnum) {
|
| | | total = userSystemCouponCountService.countCouponNumByDay(CouponTypeEnum.rebatePercentCoupon, preDay);
|
| | | } else if (DailyCountCouponEnum.rebateCouponMoney == typeEnum) {
|
| | | total = userSystemCouponCountService.countRebateMoneyByDay(preDay);
|
| | | }
|
| | |
|
| | | if (total == null) {
|
| | | total = new BigDecimal(0);
|
| | | }
|
| | | return total;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.count;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.user.count.DailyCountOrderDao;
|
| | | import com.yeshi.fanli.dto.order.CountOrderDTO;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountOrder;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountOrder.DailyCountOrderEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.LostOrder;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoRegister;
|
| | | import com.yeshi.fanli.entity.system.ChannelEnum;
|
| | | import com.yeshi.fanli.service.inter.count.DailyCountOrderService;
|
| | | import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderCountService;
|
| | | import com.yeshi.fanli.service.inter.order.LostOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.UserOrderWeiQuanRecordService;
|
| | | import com.yeshi.fanli.service.inter.order.jd.JDOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.pdd.PDDOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoRegisterService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | @Service
|
| | | public class DailyCountOrderServiceImpl implements DailyCountOrderService {
|
| | |
|
| | | @Resource
|
| | | private DailyCountOrderDao dailyCountOrderDao;
|
| | | |
| | | @Resource
|
| | | private HongBaoV2CountService hongBaoV2CountService;
|
| | | |
| | | @Resource
|
| | | private CommonOrderCountService commonOrderCountService;
|
| | | |
| | | @Resource
|
| | | private UserInfoRegisterService userInfoRegisterService;
|
| | | |
| | | @Resource
|
| | | private UserOrderWeiQuanRecordService userOrderWeiQuanRecordService;
|
| | | |
| | | @Resource
|
| | | private TaoBaoOrderService taoBaoOrderService;
|
| | | |
| | | @Resource
|
| | | private JDOrderService jdOrderService;
|
| | | |
| | | @Resource
|
| | | private PDDOrderService pddOrderService;
|
| | | |
| | | @Resource
|
| | | private LostOrderService lostOrderService;
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public List<DailyCountOrder> getDailyCountList(String type, Date startTime, Date endTime, String channel) throws Exception {
|
| | | // 查询类型
|
| | | DailyCountOrderEnum typeEnum = getTypeEnum(type);
|
| | | if (typeEnum == null) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | // 初始化数据
|
| | | initData(typeEnum);
|
| | |
|
| | | return dailyCountOrderDao.query(typeEnum, startTime, endTime, channel);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取枚举类型
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | private DailyCountOrderEnum getTypeEnum(String name) {
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | return null;
|
| | | }
|
| | | |
| | | DailyCountOrderEnum[] array = DailyCountOrderEnum.values();
|
| | | for (int i = 0; i < array.length; i ++) {
|
| | | if (array[i].name().equals(name)) {
|
| | | return array[i];
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 获取枚举类型
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public String getTypeEnumDesc(String name) {
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | return "";
|
| | | }
|
| | | |
| | | DailyCountOrderEnum[] array = DailyCountOrderEnum.values();
|
| | | for (int i = 0; i < array.length; i ++) {
|
| | | if (array[i].name().equals(name)) {
|
| | | return array[i].getDesc();
|
| | | }
|
| | | }
|
| | |
|
| | | return "";
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 初始数据
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void initData(DailyCountOrderEnum typeEnum) throws Exception {
|
| | | Date lastDate = null;
|
| | | DailyCountOrder lastRecord = dailyCountOrderDao.getMaxDate(typeEnum);
|
| | | if (lastRecord != null) {
|
| | | lastDate = lastRecord.getUpdateDate();
|
| | | } else {
|
| | | lastDate = TimeUtil.parse("2017-05-06");
|
| | | }
|
| | |
|
| | | Date today = new Date();
|
| | | int betweenDays = DateUtil.daysBetween2(lastDate, today);
|
| | | for (int i = 0; i <= betweenDays; i++) {
|
| | | // 计算日期
|
| | | String preDay = DateUtil.plusDay(i, lastDate);
|
| | | // 统计数据
|
| | | if (DailyCountOrderEnum.fanliOrderNum == typeEnum) {
|
| | | addOrderNumCount(preDay, typeEnum, 1);
|
| | | } else if (DailyCountOrderEnum.shareOrderNum == typeEnum) {
|
| | | addOrderNumCount(preDay, typeEnum, 2);
|
| | | } else if (DailyCountOrderEnum.inviteOrderNum == typeEnum) {
|
| | | addOrderNumCount(preDay, typeEnum, 3);
|
| | | } else if (DailyCountOrderEnum.channelOrderNum24H == typeEnum) {
|
| | | addChannelOrderNum24H(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.channelOrderNum == typeEnum) {
|
| | | addChannelOrderNum(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.channelOrderMoney == typeEnum) {
|
| | | addChannelOrderMoney(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.weiQuanOrderNum == typeEnum) {
|
| | | addWeiQuanOrderNum(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.weiQuanOrderMoney == typeEnum) {
|
| | | addWeiQuanOrderMoney(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.tbOrderTrackRate == typeEnum) {
|
| | | addTBOrderTrackRate(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.jdOrderTrackRate == typeEnum) {
|
| | | addJDOrderTrackRate(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.pddOrderTrackRate == typeEnum) {
|
| | | addPDDOrderTrackRate(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.lastOrderUntreatedNum == typeEnum) {
|
| | | addLastOrderUntreatedNum(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.lastOrderSucceedNum == typeEnum) {
|
| | | addLastOrderSucceedNum(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.lastOrderFailNum == typeEnum) {
|
| | | addLastOrderFailNum(preDay, typeEnum);
|
| | | } else if (DailyCountOrderEnum.lastOrderSucceedMoney == typeEnum) {
|
| | | addLastOrderSucceedMoney(preDay, typeEnum);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 统计订单数量
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @param orderType
|
| | | * @throws Exception
|
| | | */
|
| | | private void addOrderNumCount(String preDay, DailyCountOrderEnum typeEnum, int orderType) throws Exception {
|
| | | Long count = hongBaoV2CountService.countOrderByTypeAndDate(orderType, preDay);
|
| | | if (count == null)
|
| | | count = 0L;
|
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(BigDecimal.valueOf(count));
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | |
| | | /**
|
| | | * 统计各个渠道订单数据
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addChannelOrderNum(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | List<UserInfoRegister> listRegister = null;
|
| | | // 统计当日订单
|
| | | List<CountOrderDTO> listOrder = commonOrderCountService.countValidOrderByDay(preDay);
|
| | | |
| | | if (listOrder != null && listOrder.size() > 0) {
|
| | | List<Long> listUid = new ArrayList<>();
|
| | | for (CountOrderDTO countOrderDTO: listOrder) {
|
| | | listUid.add(countOrderDTO.getUid());
|
| | | }
|
| | | listRegister = userInfoRegisterService.listByMultipleUids(listUid);
|
| | | }
|
| | | |
| | | // 统计各个渠道
|
| | | ChannelEnum[] channels = ChannelEnum.values();
|
| | | for (int i = 0; i < channels.length; i++) {
|
| | | long count = 0;
|
| | | String channelVlaue = channels[i].getVlaue();
|
| | | if (listOrder != null && listOrder.size() > 0 && listRegister != null && listRegister.size() > 0) {
|
| | | for (CountOrderDTO dto: listOrder) {
|
| | | Long orderUid = dto.getUid();
|
| | | if (orderUid == null) {
|
| | | continue;
|
| | | }
|
| | | |
| | | for (UserInfoRegister register: listRegister) {
|
| | | Long uid = register.getId();
|
| | | String vlaue =register.getChannel().getVlaue();
|
| | | // 渠道 、用户id匹配
|
| | | if (channelVlaue.equalsIgnoreCase(vlaue) && uid.longValue() == orderUid.longValue()) {
|
| | | count ++;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(BigDecimal.valueOf(count));
|
| | | obj.setType(typeEnum);
|
| | | obj.setChannel(channels[i].name());
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + channels[i].name() + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 统计新人24H内下单数量
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addChannelOrderNum24H(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | ChannelEnum[] channels = ChannelEnum.values();
|
| | | for (int i = 0; i < channels.length; i++) {
|
| | | int count = 0;
|
| | | |
| | | List<UserInfoRegister> list = userInfoRegisterService.listByChannelAndDay(channels[i].getVlaue(), preDay);
|
| | | if (list != null && list.size() > 0) {
|
| | | for (UserInfoRegister user : list) {
|
| | | Date limitDay = DateUtil.plusDayDate(1, user.getCreateTime());
|
| | | Integer total = commonOrderCountService.countOderByUidAndDate(limitDay, user.getId());
|
| | | if (total != null)
|
| | | count += total;
|
| | | }
|
| | | }
|
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(BigDecimal.valueOf(count));
|
| | | obj.setType(typeEnum);
|
| | | obj.setChannel(channels[i].name());
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + channels[i].name() + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 统计渠道金额
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addChannelOrderMoney(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | List<UserInfoRegister> listRegister = null;
|
| | | // 查询订单佣金
|
| | | List<CountOrderDTO> listOrder = commonOrderCountService.countCommissionByDay(preDay);
|
| | | |
| | | if (listOrder != null && listOrder.size() > 0) {
|
| | | List<Long> listUid = new ArrayList<>();
|
| | | for (CountOrderDTO countOrderDTO: listOrder) {
|
| | | listUid.add(countOrderDTO.getUid());
|
| | | }
|
| | | listRegister = userInfoRegisterService.listByMultipleUids(listUid);
|
| | | }
|
| | | |
| | | |
| | | ChannelEnum[] channels = ChannelEnum.values();
|
| | | for (int i = 0; i < channels.length; i++) {
|
| | | BigDecimal money = new BigDecimal(0);
|
| | | String channelVlaue = channels[i].getVlaue();
|
| | | |
| | | if (listOrder != null && listOrder.size() > 0 && listRegister != null && listRegister.size() > 0) {
|
| | | for (CountOrderDTO dto: listOrder) {
|
| | | Long orderUid = dto.getUid();
|
| | | BigDecimal commission = dto.getCommission();
|
| | | if (commission != null || orderUid == null) {
|
| | | continue;
|
| | | }
|
| | | |
| | | for (UserInfoRegister register: listRegister) {
|
| | | Long uid = register.getId();
|
| | | String vlaue =register.getChannel().getVlaue();
|
| | | // 渠道 、用户id匹配
|
| | | if (channelVlaue.equalsIgnoreCase(vlaue) && uid.longValue() == orderUid.longValue()) {
|
| | | money = MoneyBigDecimalUtil.add(money, commission);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(money);
|
| | | obj.setType(typeEnum);
|
| | | obj.setChannel(channels[i].name());
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + channels[i].name() + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 统计维权订单数量
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addWeiQuanOrderNum(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | Integer count = userOrderWeiQuanRecordService.countWeiQaunOrderNumberByDate(preDay);
|
| | | if (count == null)
|
| | | count = 0;
|
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(BigDecimal.valueOf(count));
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 查询维权金额
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addWeiQuanOrderMoney(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | BigDecimal money = userOrderWeiQuanRecordService.countWeiQaunOrderMoneyByDate(preDay);
|
| | | if (money == null)
|
| | | money = new BigDecimal(0);
|
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(money);
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 淘宝订单跟踪率
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addTBOrderTrackRate(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | // 统计跟踪到数据
|
| | | Long count = commonOrderCountService.countOrderBySourceTypeAndDay(Constant.SOURCE_TYPE_TAOBAO, preDay);
|
| | | |
| | | Long total = taoBaoOrderService.countOrderByDay(preDay);
|
| | | |
| | | // 计算比例
|
| | | BigDecimal rate = new BigDecimal(0);
|
| | | if (total != null && total > 0 && count != null && count > 0) {
|
| | | rate = MoneyBigDecimalUtil.div(BigDecimal.valueOf(count),BigDecimal.valueOf(total));
|
| | | rate = MoneyBigDecimalUtil.mul(rate, BigDecimal.valueOf(100));
|
| | | } |
| | |
|
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(rate);
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | |
| | | /**
|
| | | * 京东订单跟踪率
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addJDOrderTrackRate(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | // 统计跟踪到数据
|
| | | Long count = commonOrderCountService.countOrderBySourceTypeAndDay(Constant.SOURCE_TYPE_JD, preDay);
|
| | | |
| | | Long total = jdOrderService.countOrderByDay(preDay);
|
| | | |
| | | // 计算比例
|
| | | BigDecimal rate = new BigDecimal(0);
|
| | | if (total != null && total > 0 && count != null && count > 0) {
|
| | | rate = MoneyBigDecimalUtil.div(BigDecimal.valueOf(count),BigDecimal.valueOf(total));
|
| | | rate = MoneyBigDecimalUtil.mul(rate, BigDecimal.valueOf(100));
|
| | | } |
| | |
|
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(rate);
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | |
| | | |
| | | |
| | | /**
|
| | | * 拼多多订单跟踪率
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addPDDOrderTrackRate(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | // 统计跟踪到数据
|
| | | Long count = commonOrderCountService.countOrderBySourceTypeAndDay(Constant.SOURCE_TYPE_PDD, preDay);
|
| | | |
| | | Long total = pddOrderService.countOrderByDay(preDay);
|
| | | // 计算比例
|
| | | BigDecimal rate = new BigDecimal(0);
|
| | | if (total != null && total > 0 && count != null && count > 0) {
|
| | | rate = MoneyBigDecimalUtil.div(BigDecimal.valueOf(count),BigDecimal.valueOf(total));
|
| | | rate = MoneyBigDecimalUtil.mul(rate, BigDecimal.valueOf(100));
|
| | | } |
| | |
|
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(rate);
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 统计申诉订单未处理数量
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addLastOrderUntreatedNum(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | Integer num = lostOrderService.countLostOrderNum(preDay, LostOrder.RESULT_CODE_VERFING);
|
| | | if (num == null)
|
| | | num = 0;
|
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(BigDecimal.valueOf(num));
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 统计申诉订单 处理失败
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addLastOrderFailNum(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | Integer num = lostOrderService.countLostOrderNum(preDay, LostOrder.RESULT_CODE_FAIL);
|
| | | if (num == null)
|
| | | num = 0;
|
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(BigDecimal.valueOf(num));
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | |
| | | |
| | | |
| | | /**
|
| | | * 统计申诉订单 处理成功
|
| | | * @param preDay
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void addLastOrderSucceedNum(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | Integer num = lostOrderService.countLostOrderNum(preDay, LostOrder.RESULT_CODE_SUCCESS);
|
| | | if (num == null)
|
| | | num = 0;
|
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(BigDecimal.valueOf(num));
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | |
| | | /**
|
| | | * 订单找回成功统计金额
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addLastOrderSucceedMoney(String preDay, DailyCountOrderEnum typeEnum) throws Exception {
|
| | | BigDecimal money = lostOrderService.countAppealMoney(preDay);
|
| | | if (money == null)
|
| | | money = new BigDecimal("0");
|
| | | |
| | | DailyCountOrder obj = new DailyCountOrder();
|
| | | obj.setTotal(money);
|
| | | obj.setType(typeEnum);
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountOrderDao.save(obj);
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.count;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.user.count.DailyCountUserDao;
|
| | | import com.yeshi.fanli.dto.order.CountOrderDTO;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountUser;
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountUser.DailyCountUserEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoRegister;
|
| | | import com.yeshi.fanli.entity.system.ChannelEnum;
|
| | | import com.yeshi.fanli.service.inter.count.DailyCountUserService;
|
| | | import com.yeshi.fanli.service.inter.money.extract.ExtractAuditRecordService;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderCountService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackDetailService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinDetailService;
|
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoRegisterService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralDetailService;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | @Service
|
| | | public class DailyCountUserServiceImpl implements DailyCountUserService {
|
| | |
|
| | | @Resource
|
| | | private DailyCountUserDao dailyCountUserDao;
|
| | | |
| | | @Resource
|
| | | private UserInfoRegisterService userInfoRegisterService;
|
| | | |
| | | @Resource
|
| | | private CommonOrderCountService commonOrderCountService;
|
| | | |
| | | @Resource
|
| | | private UserActiveLogService userActiveLogService;
|
| | | |
| | | @Resource
|
| | | private IntegralDetailService integralDetailService;
|
| | | |
| | | @Resource
|
| | | private RedPackDetailService redPackDetailService;
|
| | | |
| | | @Resource
|
| | | private UserTaoLiJinDetailService userTaoLiJinDetailService;
|
| | | |
| | | @Resource
|
| | | private ExtractAuditRecordService extractAuditRecordService;
|
| | | |
| | |
|
| | | @Override
|
| | | public List<DailyCountUser> getDailyCountList(String type, Date startTime, Date endTime, String channel) throws Exception {
|
| | | // 查询类型
|
| | | DailyCountUserEnum typeEnum = getTypeEnum(type);
|
| | | if (typeEnum == null) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | // 初始化数据
|
| | | initData(typeEnum);
|
| | |
|
| | | return dailyCountUserDao.query(typeEnum, startTime, endTime, channel);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取枚举类型
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | private DailyCountUserEnum getTypeEnum(String name) {
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | return null;
|
| | | }
|
| | | |
| | | DailyCountUserEnum[] array = DailyCountUserEnum.values();
|
| | | for (int i = 0; i < array.length; i ++) {
|
| | | if (array[i].name().equals(name)) {
|
| | | return array[i];
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 获取枚举类型
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public String getTypeEnumDesc(String name) {
|
| | | if (StringUtil.isNullOrEmpty(name)) {
|
| | | return "";
|
| | | }
|
| | | |
| | | DailyCountUserEnum[] array = DailyCountUserEnum.values();
|
| | | for (int i = 0; i < array.length; i ++) {
|
| | | if (array[i].name().equals(name)) {
|
| | | return array[i].getDesc();
|
| | | }
|
| | | }
|
| | |
|
| | | return "";
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 初始数据
|
| | | * @param typeEnum
|
| | | * @throws Exception
|
| | | */
|
| | | private void initData(DailyCountUserEnum typeEnum) throws Exception {
|
| | | Date lastDate = null;
|
| | | DailyCountUser lastRecord = dailyCountUserDao.getMaxDate(typeEnum);
|
| | | if (lastRecord != null) {
|
| | | lastDate = lastRecord.getUpdateDate();
|
| | | } else {
|
| | | lastDate = TimeUtil.parse("2017-05-06");
|
| | | }
|
| | |
|
| | | Date today = new Date();
|
| | | int betweenDays = DateUtil.daysBetween2(lastDate, today);
|
| | | for (int i = 0; i <= betweenDays; i++) {
|
| | | // 计算日期
|
| | | String preDay = DateUtil.plusDay(i, lastDate);
|
| | | // 统计数据
|
| | | if (DailyCountUserEnum.newUserChannel == typeEnum) {
|
| | | addNewUserChannel(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.newUserDownOrderDay == typeEnum) {
|
| | | addNewUserDownOrderDay(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.newUserDownOrderWeek == typeEnum) {
|
| | | addNewUserDownOrderWeek(preDay);
|
| | | } else if (DailyCountUserEnum.newUserDownOrderWeek3 == typeEnum) {
|
| | | addNewUserDownOrderWeek(preDay);
|
| | | } else if (DailyCountUserEnum.activeAgain90 == typeEnum) {
|
| | | addActiveAgain90(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.integralNum == typeEnum) {
|
| | | addIntegralNum(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.newUserTljNum == typeEnum) {
|
| | | addNewUserTljNum(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.newUserTljMoney == typeEnum) {
|
| | | addNewUserTljMoney(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.redpackNum == typeEnum) {
|
| | | addRedpackNum(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.redpackMoney == typeEnum) {
|
| | | addRedpackMoney(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.extractApplyNumber == typeEnum) {
|
| | | addExtractApplyNumber(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.extractApplyMoney == typeEnum) {
|
| | | addExtractApplyMoney(preDay, typeEnum);
|
| | | } else if (DailyCountUserEnum.extractAuditPass == typeEnum) {
|
| | | addExtractAuditNum(preDay, Extract.STATE_PASS, typeEnum);
|
| | | } else if (DailyCountUserEnum.extractAuditReject == typeEnum) {
|
| | | addExtractAuditNum(preDay, Extract.STATE_REJECT, typeEnum);
|
| | | } |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 统计各个渠道新增用户数量
|
| | | * @param preDay
|
| | | */
|
| | | private void addNewUserChannel(String preDay, DailyCountUserEnum typeEnum) throws Exception{
|
| | | ChannelEnum[] channels = ChannelEnum.values();
|
| | | for (int i = 0; i < channels.length; i++) {
|
| | | Long count = userInfoRegisterService.countByChannelAndDay(channels[i].getVlaue(), preDay);
|
| | | BigDecimal total = new BigDecimal(0);
|
| | | if (count != null) {
|
| | | total = new BigDecimal(total.toString());
|
| | | }
|
| | | DailyCountUser obj = new DailyCountUser();
|
| | | obj.setTotal(total);
|
| | | obj.setType(typeEnum);
|
| | | obj.setChannel(channels[i].name());
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + channels[i].name() + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 统计各个渠道每日下单转化率
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addNewUserDownOrderDay(String preDay, DailyCountUserEnum typeEnum) throws Exception {
|
| | | // 统计当日有效订单
|
| | | List<CountOrderDTO> listOrder = commonOrderCountService.countValidOrderByDay(preDay);
|
| | | |
| | | ChannelEnum[] channels = ChannelEnum.values();
|
| | | for (int i = 0; i < channels.length; i++) {
|
| | | |
| | | long totalUser = 0;
|
| | | long totalUserDown = 0;
|
| | | if (listOrder != null && listOrder.size() > 0) {
|
| | | // 查询该渠道当日注册用户
|
| | | List<UserInfoRegister> listRegister = userInfoRegisterService.listByChannelAndDay(channels[i].getVlaue(), preDay);
|
| | | if (listRegister != null && listRegister.size() > 0) {
|
| | | totalUser = listRegister.size();
|
| | | |
| | | // 循环统计是否存在用户下单
|
| | | for (UserInfoRegister userInfoRegister: listRegister) {
|
| | | Long id = userInfoRegister.getId();
|
| | | for (CountOrderDTO dto: listOrder) {
|
| | | if (dto.getUid() != null && dto.getUid().longValue() == id.longValue()) {
|
| | | totalUserDown ++;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | // 计算比例: 下单用户数/新增用户数
|
| | | BigDecimal total = new BigDecimal(0);
|
| | | if (totalUser > 0 && totalUserDown > 0) {
|
| | | total = MoneyBigDecimalUtil.div(BigDecimal.valueOf(totalUserDown),BigDecimal.valueOf(totalUser));
|
| | | total = MoneyBigDecimalUtil.mul(total, BigDecimal.valueOf(100));
|
| | | } |
| | | |
| | | DailyCountUser obj = new DailyCountUser();
|
| | | obj.setTotal(total);
|
| | | obj.setType(typeEnum);
|
| | | obj.setChannel(channels[i].name());
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + channels[i].name() + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 统计当周下单数据
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addNewUserDownOrderWeek(String preDay) throws Exception {
|
| | | // 加上6天 -注册一周内数据
|
| | | Date startDay = new Date(TimeUtil.convertDateToTemp2(preDay + " 23:59:59"));
|
| | | Date limitDay = DateUtil.plusDayDate(6, startDay);
|
| | | |
| | | // 渠道数据
|
| | | ChannelEnum[] channels = ChannelEnum.values();
|
| | | for (int i = 0; i < channels.length; i++) {
|
| | | long totalUser = 0;
|
| | | long totalWeek = 0;
|
| | | long totalWeek3 = 0;
|
| | | // 查询今日新增用户
|
| | | List<UserInfoRegister> list = userInfoRegisterService.listByChannelAndDay(channels[i].getVlaue(), preDay);
|
| | | if (list != null && list.size() > 0) {
|
| | | totalUser = list.size();
|
| | | for (UserInfoRegister user : list) {
|
| | | Integer total = commonOrderCountService.countOderByUidAndDate(limitDay, user.getId());
|
| | | if (total != null && total > 0) {
|
| | | totalWeek ++;
|
| | | if (total >= 3) {
|
| | | totalWeek3 ++;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | // 计算比例:当周 下单用户数/新增用户数
|
| | | BigDecimal total = new BigDecimal(0);
|
| | | if (totalUser > 0 && totalWeek > 0) {
|
| | | total = MoneyBigDecimalUtil.div(BigDecimal.valueOf(totalWeek),BigDecimal.valueOf(totalUser));
|
| | | total = MoneyBigDecimalUtil.mul(total, BigDecimal.valueOf(100));
|
| | | } |
| | | DailyCountUser obj = new DailyCountUser();
|
| | | obj.setTotal(total);
|
| | | obj.setType(DailyCountUserEnum.newUserDownOrderWeek);
|
| | | obj.setChannel(channels[i].name());
|
| | | obj.setUpdateDate(new Date());
|
| | | obj.setDay(TimeUtil.parse(preDay));
|
| | | obj.setId(StringUtil.Md5(preDay + channels[i].name() + DailyCountUserEnum.newUserDownOrderWeek.name()));
|
| | | dailyCountUserDao.save(obj);
|
| | | |
| | | |
| | | // 计算比例: 下3单用户数/新增用户数
|
| | | BigDecimal total3 = new BigDecimal(0);
|
| | | if (totalUser > 0 && totalWeek3 > 0) {
|
| | | total3 = MoneyBigDecimalUtil.div(BigDecimal.valueOf(totalWeek3),BigDecimal.valueOf(totalUser));
|
| | | total3 = MoneyBigDecimalUtil.mul(total3, BigDecimal.valueOf(100));
|
| | | } |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(total3);
|
| | | obj3.setType(DailyCountUserEnum.newUserDownOrderWeek3);
|
| | | obj3.setChannel(channels[i].name());
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + channels[i].name() + DailyCountUserEnum.newUserDownOrderWeek3.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 统计90天内再次活跃
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addActiveAgain90(String preDay, DailyCountUserEnum typeEnum) throws Exception{
|
| | | long count = userActiveLogService.count90DaysLaterActiveNum(preDay);
|
| | | |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(BigDecimal.valueOf(count));
|
| | | obj3.setType(typeEnum);
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 金币新增数量
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addIntegralNum(String preDay, DailyCountUserEnum typeEnum) throws Exception{
|
| | | Long count = integralDetailService.countNewAddByDate(preDay);
|
| | | if (count == null) {
|
| | | count = 0L;
|
| | | }
|
| | | |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(BigDecimal.valueOf(count));
|
| | | obj3.setType(typeEnum);
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | |
| | | /**
|
| | | * 红包新增数量
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addRedpackNum(String preDay, DailyCountUserEnum typeEnum) throws Exception{
|
| | | Long total = redPackDetailService.countNumByDay(preDay);
|
| | | if (total == null) {
|
| | | total = 0L;
|
| | | }
|
| | | |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(new BigDecimal(total));
|
| | | obj3.setType(typeEnum);
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 红包新增金额
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addRedpackMoney(String preDay, DailyCountUserEnum typeEnum) throws Exception{
|
| | | BigDecimal total = redPackDetailService.countMoneyByDay(preDay);
|
| | | if (total == null) {
|
| | | total = new BigDecimal(0);
|
| | | }
|
| | | |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(total);
|
| | | obj3.setType(typeEnum);
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 红包新增数量
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addNewUserTljNum(String preDay, DailyCountUserEnum typeEnum) throws Exception{
|
| | | Long total = userTaoLiJinDetailService.countNumByDay(preDay);
|
| | | if (total == null) {
|
| | | total = 0L;
|
| | | }
|
| | | |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(new BigDecimal(total));
|
| | | obj3.setType(typeEnum);
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 红包新增金额
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addNewUserTljMoney(String preDay, DailyCountUserEnum typeEnum) throws Exception{
|
| | | BigDecimal total = userTaoLiJinDetailService.countMoneyByDay(preDay);
|
| | | if (total == null) {
|
| | | total = new BigDecimal(0);
|
| | | }
|
| | | |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(total);
|
| | | obj3.setType(typeEnum);
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 提现申请数量
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addExtractApplyNumber(String preDay, DailyCountUserEnum typeEnum) throws Exception{
|
| | | Long total = extractAuditRecordService.countApplyNumberByDay(preDay);
|
| | | if (total == null) {
|
| | | total = 0L;
|
| | | }
|
| | | |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(new BigDecimal(total));
|
| | | obj3.setType(typeEnum);
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 提现申请金额
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addExtractApplyMoney(String preDay, DailyCountUserEnum typeEnum) throws Exception{
|
| | | BigDecimal total = extractAuditRecordService.countApplyMoneyByDay(preDay);
|
| | | if (total == null) {
|
| | | total = new BigDecimal(0);
|
| | | }
|
| | | |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(total);
|
| | | obj3.setType(typeEnum);
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | |
| | | /**
|
| | | * 提现审核数量
|
| | | * @param preDay
|
| | | * @throws Exception
|
| | | */
|
| | | private void addExtractAuditNum(String preDay, int state, DailyCountUserEnum typeEnum) throws Exception{
|
| | | Long total = extractAuditRecordService.countAuditNumberByDay(state, preDay);
|
| | | if (total == null) {
|
| | | total = 0L;
|
| | | }
|
| | | |
| | | DailyCountUser obj3 = new DailyCountUser();
|
| | | obj3.setTotal(new BigDecimal(total));
|
| | | obj3.setType(typeEnum);
|
| | | obj3.setUpdateDate(new Date());
|
| | | obj3.setDay(TimeUtil.parse(preDay));
|
| | | obj3.setId(StringUtil.Md5(preDay + state + typeEnum.name()));
|
| | | dailyCountUserDao.save(obj3);
|
| | | }
|
| | | |
| | | |
| | | }
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public Integer countOrderByTypeAndDate(Integer orderType, String preDay) {
|
| | | public Long countOrderByTypeAndDate(Integer orderType, String preDay) {
|
| | | return hongBaoV2CountMapper.countOrderByTypeAndDate(orderType, preDay);
|
| | | }
|
| | |
|
| | |
| | | private UserInfoRegisterService userInfoRegisterService;
|
| | |
|
| | |
|
| | | |
| | | |
| | | @Override
|
| | | public long countNewUser(Integer isToday, Integer isMonth) {
|
| | | return userInfoMapper.countNewUser(isToday, isMonth);
|
| | |
| | | @Override
|
| | | public List<CountUserInfo> getNewUserData(Date startTime, Date endTime, String channel) {
|
| | | // 重新查询统计今日以及空缺
|
| | | initChannelUserCount();
|
| | |
|
| | | return countUserInfoDao.query(CountUserEnum.newUser, startTime, endTime, channel);
|
| | | }
|
| | |
|
| | | // 初始化统计
|
| | | @Override
|
| | | public void initChannelUserCount() {
|
| | | CountUserInfo lastRecord = countUserInfoDao.getMaxDate(CountUserEnum.newUser);
|
| | | Date lastDay = null;
|
| | | if (lastRecord != null && lastRecord.getDay() != null) {
|
| | | lastDay = lastRecord.getDay();
|
| | | }
|
| | | try {
|
| | | if (lastDay == null) {
|
| | | lastDay = TimeUtil.parse("2017-05-14");
|
| | | }
|
| | |
|
| | | Date today = new Date();
|
| | | int betweenDays = DateUtil.daysBetween2(lastDay, today);
|
| | | // 统计今日之前的
|
| | | if (betweenDays > 0) {
|
| | | for (int i = 0; i <= betweenDays; i++) {
|
| | | addRecordCount(DateUtil.plusDay(i, lastDay));
|
| | | }
|
| | | }
|
| | | // 重新统计今日
|
| | | addRecordCount(TimeUtil.getGernalTime(today.getTime()));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | private void addRecordCount(String preDay) throws Exception {
|
| | | ChannelEnum[] channels = ChannelEnum.values();
|
| | | for (int i = 0; i < channels.length; i++) {
|
| | | Integer count = userInfoRegisterService.countByChannelAndDay(channels[i].getVlaue(), preDay);
|
| | | if (count == null) {
|
| | | count = 0;
|
| | | }
|
| | | CountUserInfo record = new CountUserInfo();
|
| | | record.setNum(count);
|
| | | record.setChannel(channels[i].name());
|
| | | record.setId(StringUtil.Md5(preDay + channels[i].name() + CountUserEnum.newUser.name()));
|
| | | record.setDay(TimeUtil.parse(preDay));
|
| | | record.setType(CountUserEnum.newUser);
|
| | | countUserInfoDao.save(record);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | |
| | |
|
| | | @Override
|
| | | public List<CountOrderInfo> counOrderLastNum(Date startTime, Date endTime) {
|
| | | // 重新查询统计今日以及空缺
|
| | | initOrderLastNum();
|
| | |
|
| | | return countOrderInfoDao.query(CountOrderEnum.lastNum, startTime, endTime);
|
| | | }
|
| | |
|
| | | // 初始化统计
|
| | | private void initOrderLastNum() {
|
| | | try {
|
| | | CountOrderInfo lastRecord = countOrderInfoDao.getMaxDate(CountOrderEnum.lastNum);
|
| | | Date lastDay = null;
|
| | | if (lastRecord != null && lastRecord.getDay() != null) {
|
| | | lastDay = lastRecord.getDay();
|
| | | }
|
| | |
|
| | | if (lastDay == null) {
|
| | | lastDay = TimeUtil.parse("2019-01-01");
|
| | | }
|
| | |
|
| | | Date today = new Date();
|
| | | int betweenDays = DateUtil.daysBetween2(lastDay, today);
|
| | | if (betweenDays > 0) {
|
| | | for (int i = 0; i <= betweenDays; i++) {
|
| | | addRecordOrderLastNum(DateUtil.plusDay(i, lastDay));
|
| | | }
|
| | | } else {
|
| | | // 重新统计昨日
|
| | | addRecordOrderLastNum(DateUtil.reduceDay2(1, lastDay));
|
| | | // 重新统计今日
|
| | | addRecordOrderLastNum(TimeUtil.getGernalTime(today.getTime()));
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | private void addRecordOrderLastNum(String preDay) throws Exception {
|
| | | Integer num = lostOrderService.countLostOrderNum(preDay);
|
| | | if (num == null)
|
| | | num = 0;
|
| | | CountOrderInfo record = new CountOrderInfo();
|
| | | record.setNum(num);
|
| | | record.setDay(TimeUtil.parse(preDay));
|
| | | record.setType(CountOrderEnum.lastNum.name());
|
| | | record.setId(StringUtil.Md5(preDay + CountOrderEnum.lastNum.name()));
|
| | | countOrderInfoDao.save(record);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<CountOrderInfo> counOrderLastMoney(Date startTime, Date endTime) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public List<CountOrderInfo> countOrderType(Integer state, Date startTime, Date endTime) {
|
| | | // 重新查询统计今日以及空缺
|
| | | initOrderTypeCount();
|
| | |
|
| | | return countOrderInfoDao.query(CountOrderEnum.orderType, startTime, endTime, state);
|
| | | }
|
| | |
|
| | | // 初始化统计
|
| | | private void initOrderTypeCount() {
|
| | | try {
|
| | | CountOrderInfo lastRecord = countOrderInfoDao.getMaxDate(CountOrderEnum.orderType);
|
| | | Date lastDay = null;
|
| | | if (lastRecord != null && lastRecord.getDay() != null) {
|
| | | lastDay = lastRecord.getDay();
|
| | | }
|
| | |
|
| | | if (lastDay == null) {
|
| | | lastDay = TimeUtil.parse("2018-01-01");
|
| | | }
|
| | |
|
| | | Date today = new Date();
|
| | | int betweenDays = DateUtil.daysBetween2(lastDay, today);
|
| | | if (betweenDays > 0) {
|
| | | for (int i = 0; i <= betweenDays; i++) {
|
| | | addRecordOrderTypeCount(DateUtil.plusDay(i, lastDay));
|
| | | }
|
| | | } else {
|
| | | // 重新统计昨日
|
| | | addRecordOrderTypeCount(DateUtil.reduceDay2(1, lastDay));
|
| | | // 重新统计今日
|
| | | addRecordOrderTypeCount(TimeUtil.getGernalTime(today.getTime()));
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | private void addRecordOrderTypeCount(String preDay) throws Exception {
|
| | | for (int i = 1; i < 4; i++) {
|
| | | Integer count = hongBaoV2CountService.countOrderByTypeAndDate(i, preDay);
|
| | | if (count == null)
|
| | | count = 0;
|
| | | CountOrderInfo record = new CountOrderInfo();
|
| | | record.setNum(count);
|
| | | record.setState(i);
|
| | | record.setDay(TimeUtil.parse(preDay));
|
| | | record.setType(CountOrderEnum.orderType.name());
|
| | | record.setId(StringUtil.Md5(preDay + CountOrderEnum.orderType.name()));
|
| | | countOrderInfoDao.save(record);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<CountUserInfo> countUserDownOrderByChannelAndToday(String channel, Date startTime, Date endTime) {
|
| | |
| | | return userSystemCouponCountMapper.getFreeCouponMoneyToCharts(dateType, year, startTime, endTime, couponType);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public BigDecimal countRebateMoneyByDay(String preDay){
|
| | | return userSystemCouponCountMapper.countRebateMoneyByDay(preDay);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public BigDecimal countFreeMoneyByTypeAndDay(CouponTypeEnum typeEnum, String preDay){
|
| | | return userSystemCouponCountMapper.countFreeMoneyByTypeAndDay(typeEnum.name(), preDay);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public BigDecimal countCouponNumByDay(CouponTypeEnum typeEnum, String preDay){
|
| | | return userSystemCouponCountMapper.countCouponNumByDay(typeEnum.name(), preDay);
|
| | | }
|
| | | |
| | | }
|
| | |
| | | } |
| | | |
| | | // 编辑图片 |
| | | List<String> listpic = null; |
| | | List<String> listpic = new ArrayList<>(); |
| | | if (!StringUtil.isNullOrEmpty(picUrls)) { |
| | | String[] pics = picUrls.split(","); |
| | | if (pics != null) { |
| | | listpic = new ArrayList<>(); |
| | | for (int i = 0; i < pics.length; i++) { |
| | | String picLink = pics[i]; |
| | | if (fileRequest != null) { |
| | | MultipartFile file = fileRequest.getFile("file" + i); |
| | | if (file != null) { |
| | | picLink = uploadPicture(file); |
| | | } |
| | | |
| | | } |
| | | if (picLink.startsWith("http")) { |
| | | listpic.add(picLink); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 上传文件替换 |
| | | if (fileRequest != null) { |
| | | for (int i = 0; i < 9; i++) { |
| | | MultipartFile file = fileRequest.getFile("file" + i); |
| | | if (file != null) { |
| | | String picLink = uploadPicture(file); |
| | | if (i < listpic.size()) { |
| | | listpic.set(i, picLink); |
| | | } else { |
| | | listpic.add(picLink); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | String picUrl = goodsDetailVO.getPicUrl(); |
| | | |
| | | if (fileRequest != null) { |
| | | MultipartFile file = fileRequest.getFile("file" + i); |
| | | if (file != null) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // 数据对比 删除图片 |
| | | if (oldGoodsList != null && oldGoodsList.size() > 0) { |
| | |
| | | listImg.add(imgActivity); |
| | | } |
| | | |
| | | int totalImg = 0; |
| | | // 编辑图片 |
| | | List<String> listpic = new ArrayList<>(); |
| | | if (!StringUtil.isNullOrEmpty(picUrls)) { |
| | | String[] pics = picUrls.split(","); |
| | | if (pics != null) { |
| | | for (int i = 0; i < pics.length; i++) { |
| | | String picLink = pics[i]; |
| | | if (fileRequest != null) { |
| | | MultipartFile file = fileRequest.getFile("file" + i); |
| | | if (file != null) { |
| | | picLink = uploadPicture(file); |
| | | |
| | | ImgInfo imgInfo0 = new ImgInfo(); |
| | | imgInfo0.setId(UUID.randomUUID().toString().replace("-", "")); |
| | | imgInfo0.setLarge(false); |
| | | imgInfo0.setPid(pid); |
| | | imgInfo0.setUrl(picLink); |
| | | imgInfo0.setUrlHD(picLink); |
| | | imgInfo0.setType(ImgEnum.img); |
| | | imgInfo0.setW(1); |
| | | imgInfo0.setH(1); |
| | | listImg.add(imgInfo0); |
| | | totalImg++; |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (picLink.startsWith("http")) { |
| | | if (listOldImgInfo != null) { |
| | | for (ImgInfo imgInfo : listOldImgInfo) { |
| | | String url = imgInfo.getUrl(); |
| | | if (picLink.equals(url)) { |
| | | listImg.add(imgInfo); |
| | | totalImg++; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | listpic.add(picLink); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 上传文件替换 |
| | | if (fileRequest != null) { |
| | | for (int i = 0; i < 9; i++) { |
| | | MultipartFile file = fileRequest.getFile("file" + i); |
| | | if (file != null) { |
| | | String picLink = uploadPicture(file); |
| | | if (i < listpic.size()) { |
| | | listpic.set(i, picLink); |
| | | } else { |
| | | listpic.add(picLink); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | int totalImg = 0; |
| | | for (String pic : listpic) { |
| | | ImgInfo imgInfo0 = new ImgInfo(); |
| | | imgInfo0.setId(UUID.randomUUID().toString().replace("-", "")); |
| | | imgInfo0.setLarge(false); |
| | | imgInfo0.setPid(pid); |
| | | imgInfo0.setUrl(pic); |
| | | imgInfo0.setUrlHD(pic); |
| | | imgInfo0.setType(ImgEnum.img); |
| | | imgInfo0.setW(1); |
| | | imgInfo0.setH(1); |
| | | listImg.add(imgInfo0); |
| | | totalImg++; |
| | | } |
| | | |
| | | // 清理老图片 |
| | | if (listOld != null && listOld.size() > 0) { |
| | | for (int j = 0; j < listOld.size(); j++) { |
| | | boolean del = true; |
| | |
| | | package com.yeshi.fanli.service.impl.money.extract;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dao.mybatis.ExtractAuditRecordMapper;
|
| | | import com.yeshi.fanli.dao.user.count.CountUserInfoDao;
|
| | | import com.yeshi.fanli.dto.ChartTDO;
|
| | | import com.yeshi.fanli.dto.money.ExtractOrderStatisticDTO;
|
| | | import com.yeshi.fanli.entity.admin.count.CountUserInfo;
|
| | | import com.yeshi.fanli.entity.admin.count.CountUserInfo.CountUserEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
|
| | | import com.yeshi.fanli.service.inter.money.extract.ExtractAuditRecordService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | @Service
|
| | | public class ExtractAuditRecordServiceImpl implements ExtractAuditRecordService {
|
| | |
| | | return extractAuditRecordMapper.getbyExtractId(extractId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<CountUserInfo> getAuditCount(Date startTime, Date endTime, Integer state) throws Exception {
|
| | | // 重新查询统计今日以及空缺
|
| | | initAuditCount();
|
| | | |
| | | return countUserInfoDao.query(CountUserEnum.extractAuditNumber, startTime, endTime, state);
|
| | | }
|
| | |
|
| | | // 初始化统计
|
| | | @Override
|
| | | public void initAuditCount() {
|
| | | try {
|
| | | CountUserInfo lastRecord = countUserInfoDao.getMaxDate(CountUserEnum.extractAuditNumber);
|
| | | Date lastDay = null;
|
| | | if (lastRecord != null && lastRecord.getDay() != null) {
|
| | | lastDay = lastRecord.getDay();
|
| | | }
|
| | | |
| | | if (lastDay == null) {
|
| | | lastDay = TimeUtil.parse("2017-07-19");
|
| | | }
|
| | | |
| | | Date today = new Date();
|
| | | int betweenDays = DateUtil.daysBetween2(lastDay, today);
|
| | | if (betweenDays > 0) {
|
| | | for (int i = 0; i <= betweenDays; i++ ) {
|
| | | addRecordAuditCount(DateUtil.plusDay(i, lastDay));
|
| | | }
|
| | | }
|
| | | // 重新统计今日
|
| | | addRecordAuditCount(TimeUtil.getGernalTime(today.getTime()));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | private void addRecordAuditCount(String preDay) throws Exception{
|
| | | for (int i = 1; i < 3; i++) {
|
| | | int count = extractAuditRecordMapper.countAuditTotal(i, preDay);
|
| | | CountUserInfo record = new CountUserInfo();
|
| | | record.setState(i);
|
| | | record.setNum(count);
|
| | | record.setId(StringUtil.Md5(preDay + CountUserEnum.extractAuditNumber.name())+ "-" + i);
|
| | | record.setDay(TimeUtil.parse(preDay));
|
| | | record.setType(CountUserEnum.extractAuditNumber);
|
| | | countUserInfoDao.save(record);
|
| | | }
|
| | | } |
| | |
|
| | |
|
| | | @Override
|
| | | public List<CountUserInfo> getApplyMoney(Date startTime, Date endTime) throws Exception {
|
| | | // 重新查询统计今日以及空缺
|
| | | initApplyMoneyCount();
|
| | | |
| | | return countUserInfoDao.query(CountUserEnum.extractApplyMoney, startTime, endTime);
|
| | | public Long countAuditNumberByDay(int state, String preDay) {
|
| | | return extractAuditRecordMapper.countAuditTotal(state, preDay);
|
| | | }
|
| | |
|
| | | // 初始化统计
|
| | | |
| | | @Override
|
| | | public void initApplyMoneyCount() {
|
| | | try {
|
| | | CountUserInfo lastRecord = countUserInfoDao.getMaxDate(CountUserEnum.extractApplyMoney);
|
| | | Date lastDay = null;
|
| | | if (lastRecord != null && lastRecord.getDay() != null) {
|
| | | lastDay = lastRecord.getDay();
|
| | | }
|
| | | |
| | | if (lastDay == null) {
|
| | | lastDay = TimeUtil.parse("2017-07-19");
|
| | | }
|
| | | |
| | | Date today = new Date();
|
| | | int betweenDays = DateUtil.daysBetween2(lastDay, today);
|
| | | if (betweenDays > 0) {
|
| | | for (int i = 0; i <= betweenDays; i++ ) {
|
| | | addRecordApplyMoneyCount(DateUtil.plusDay(i, lastDay));
|
| | | }
|
| | | }
|
| | | // 重新统计今日
|
| | | addRecordApplyMoneyCount(TimeUtil.getGernalTime(today.getTime()));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | public BigDecimal countApplyMoneyByDay(String preDay) {
|
| | | return extractAuditRecordMapper.countApplyExtractMoney(preDay);
|
| | | }
|
| | |
|
| | | private void addRecordApplyMoneyCount(String preDay) throws Exception{
|
| | | BigDecimal money = extractAuditRecordMapper.countApplyExtractMoney(preDay);
|
| | | if (money == null)
|
| | | money = new BigDecimal(0);
|
| | | CountUserInfo record = new CountUserInfo();
|
| | | record.setMoney(money);
|
| | | record.setId(StringUtil.Md5(preDay + CountUserEnum.extractApplyMoney.name()));
|
| | | record.setDay(TimeUtil.parse(preDay));
|
| | | record.setType(CountUserEnum.extractApplyMoney);
|
| | | countUserInfoDao.save(record);
|
| | | } |
| | |
|
| | | @Override
|
| | | public List<CountUserInfo> geApplyNumber(Date startTime, Date endTime) throws Exception {
|
| | | // 重新查询统计今日以及空缺
|
| | | initApplyNumberCount();
|
| | | |
| | | return countUserInfoDao.query(CountUserEnum.extractApplyNumber, startTime, endTime);
|
| | | }
|
| | |
|
| | | |
| | | // 初始化统计
|
| | | @Override
|
| | | public void initApplyNumberCount() {
|
| | | try {
|
| | | CountUserInfo lastRecord = countUserInfoDao.getMaxDate(CountUserEnum.extractApplyNumber);
|
| | | Date lastDay = null;
|
| | | if (lastRecord != null && lastRecord.getDay() != null) {
|
| | | lastDay = lastRecord.getDay();
|
| | | }
|
| | | |
| | | if (lastDay == null) {
|
| | | lastDay = TimeUtil.parse("2017-07-19");
|
| | | }
|
| | | |
| | | Date today = new Date();
|
| | | int betweenDays = DateUtil.daysBetween2(lastDay, today);
|
| | | if (betweenDays > 0) {
|
| | | for (int i = 0; i <= betweenDays; i++ ) {
|
| | | addRecordCount(DateUtil.plusDay(i, lastDay));
|
| | | }
|
| | | }
|
| | | // 重新统计今日
|
| | | addRecordCount(TimeUtil.getGernalTime(today.getTime()));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | public Long countApplyNumberByDay(String preDay) {
|
| | | return extractAuditRecordMapper.countApplyNumberByDay(preDay);
|
| | | }
|
| | |
|
| | | private void addRecordCount(String preDay) throws Exception{
|
| | | int count = extractAuditRecordMapper.countApplyNumberByDay(preDay);
|
| | | CountUserInfo record = new CountUserInfo();
|
| | | record.setNum(count);
|
| | | record.setId(StringUtil.Md5(preDay + CountUserEnum.extractApplyNumber.name()));
|
| | | record.setDay(TimeUtil.parse(preDay));
|
| | | record.setType(CountUserEnum.extractApplyNumber);
|
| | | countUserInfoDao.save(record);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | } |
| | | Map<Long, Boolean> vipUserMap = userVIPInfoService.listByUids(needSelectVIPUidList); |
| | | |
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | for (CommonOrderVO order : listOrder) { |
| | | |
| | | if (order.getHongBaoType() == HongBaoV2.TYPE_YIJI || order.getHongBaoType() == HongBaoV2.TYPE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI) { |
| | | Integer urank = order.getUrank(); |
| | | if (urank != null) { |
| | | String levelName = UserLevelUtil.getLevelName(urank); |
| | | if (!StringUtil.isNullOrEmpty(levelName)) { |
| | | order.setOrderDesc(levelName); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | // 设置是否为vip订单 |
| | | for (CommonOrderVO order : listOrder) { |
| | | if (order.getHongBaoType() == HongBaoV2.TYPE_YIJI || order.getHongBaoType() == HongBaoV2.TYPE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI) { |
| | | if (vipUserMap.get(Long.parseLong(order.getUserId())) != null |
| | | && vipUserMap.get(Long.parseLong(order.getUserId())) == true) |
| | | order.setVipOrder(true); |
| | | else |
| | | order.setVipOrder(false); |
| | | } else |
| | | // 设置是否为vip订单 |
| | | for (CommonOrderVO order : listOrder) { |
| | | if (order.getHongBaoType() == HongBaoV2.TYPE_YIJI || order.getHongBaoType() == HongBaoV2.TYPE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI) { |
| | | if (vipUserMap.get(Long.parseLong(order.getUserId())) != null |
| | | && vipUserMap.get(Long.parseLong(order.getUserId())) == true) |
| | | order.setVipOrder(true); |
| | | else |
| | | order.setVipOrder(false); |
| | | } else |
| | | order.setVipOrder(false); |
| | | |
| | | if (order.isVipOrder()) |
| | | order.setVipOrderDesc("订单来源:由超级会员的粉丝产生"); |
| | | } |
| | | if (order.isVipOrder()) |
| | | order.setVipOrderDesc("订单来源:由超级会员的粉丝产生"); |
| | | } |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd HH:mm"); |
| | |
| | | boolean vip = userVIPInfoService.isVIP(uid); |
| | | // 是否存在奖励券 |
| | | boolean hasRewardCoupon = userSystemCouponService.getValidRebateCoupon(uid); |
| | | long nowTime = java.lang.System.currentTimeMillis(); |
| | | for (CommonOrderVO order : listOrder) { |
| | | String orderNo = order.getOrderNo(); |
| | | Integer sourceType = order.getSourceType(); |
| | | Integer hongBaoType = order.getHongBaoType(); |
| | | |
| | | |
| | | BigDecimal totalPay = new BigDecimal(0); |
| | | BigDecimal totalActual = new BigDecimal(0); |
| | | // 商品信息组合 |
| | | for (CommonOrderVO commonOrder : listGoods) { |
| | | CommonOrderGoods goods = commonOrder.getCommonOrderGoods(); |
| | |
| | | } |
| | | commonGoodsVO.setActualPay("付款金额:¥" + totalSettlement); |
| | | |
| | | totalPay = MoneyBigDecimalUtil.add(totalPay, totalSettlement); |
| | | |
| | | // 商品价格 |
| | | BigDecimal actualPrice = commonGoodsVO.getActualPrice(); |
| | | if (actualPrice != null) { |
| | | Integer totalCount = commonOrder.getTotalCount(); |
| | | totalActual = MoneyBigDecimalUtil.add(totalActual, |
| | | MoneyBigDecimalUtil.mul(new BigDecimal(totalCount), actualPrice)); |
| | | } |
| | | |
| | | // 邀请订单信息保护 |
| | | if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType |
| | | || HongBaoV2.TYPE_ERJI == hongBaoType || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType |
| | |
| | | order.setDownTime("下单时间:" + format.format(thirdCreateTime)); |
| | | order.setObtainTime(thirdCreateTime.getTime()); |
| | | |
| | | // 2.1分享订单和返利订单实付金额大于或者小于券后价的时候,订单页面 只显示3天 下单时间开始 |
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | if (HongBaoV2.TYPE_SHARE_YIJI == hongBaoType |
| | | && DateUtil.plusDayDate(3, thirdCreateTime).getTime() > nowTime |
| | | && totalPay.compareTo(totalActual) != 0) { |
| | | order.setFanliDesc("由实付金额*返利比计算而来"); |
| | | order.setFanliDescLink(configService.get(ConfigKeyEnum.shareOrderRebateDescLink.getKey())); |
| | | } |
| | | } |
| | | |
| | | Date settleTime = order.getSettleTime(); |
| | | if (settleTime != null) { |
| | | order.setReceiveTime("收货时间:" + format.format(settleTime)); |
| | |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI) |
| | | needSelectVIPUidList.add(Long.parseLong(order.getUserId())); |
| | | } |
| | | Map<Long, Boolean> vipUserMap = userVIPInfoService.listByUids(needSelectVIPUidList); |
| | | |
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | for (CommonOrderVO order : listOrder) { |
| | | if (order.getHongBaoType() == HongBaoV2.TYPE_YIJI || order.getHongBaoType() == HongBaoV2.TYPE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI) { |
| | | Integer urank = order.getUrank(); |
| | | if (urank != null) { |
| | | String levelName = UserLevelUtil.getLevelName(urank); |
| | | if (!StringUtil.isNullOrEmpty(levelName)) { |
| | | order.setOrderDesc(levelName); |
| | | } |
| | | for (CommonOrderVO order : listOrder) { |
| | | if (order.getHongBaoType() == HongBaoV2.TYPE_YIJI || order.getHongBaoType() == HongBaoV2.TYPE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI) { |
| | | Integer urank = order.getUrank(); |
| | | if (urank != null) { |
| | | String levelName = UserLevelUtil.getLevelName(urank); |
| | | if (!StringUtil.isNullOrEmpty(levelName)) { |
| | | order.setOrderDesc("订单来源:" + levelName); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } else { |
| | | // 设置是否为vip订单 |
| | | for (CommonOrderVO order : listOrder) { |
| | | if (order.getHongBaoType() == HongBaoV2.TYPE_YIJI || order.getHongBaoType() == HongBaoV2.TYPE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI |
| | | || order.getHongBaoType() == HongBaoV2.TYPE_SHARE_ERJI) { |
| | | if (vipUserMap.get(Long.parseLong(order.getUserId())) != null |
| | | && vipUserMap.get(Long.parseLong(order.getUserId())) == true) |
| | | order.setVipOrder(true); |
| | | else |
| | | order.setVipOrder(false); |
| | | } else |
| | | order.setVipOrder(false); |
| | | |
| | | if (order.isVipOrder()) |
| | | order.setVipOrderDesc("订单来源:由超级会员的粉丝产生"); |
| | | } |
| | | } |
| | | |
| | |
| | | // 是否存在奖励券 |
| | | boolean hasRewardCoupon = userSystemCouponService.getValidRebateCoupon(uid); |
| | | |
| | | long nowTime = java.lang.System.currentTimeMillis(); |
| | | for (CommonOrderVO order : listOrder) { |
| | | String orderNo = order.getOrderNo(); |
| | | Integer sourceType = order.getSourceType(); |
| | | Integer hongBaoType = order.getHongBaoType(); |
| | | |
| | | |
| | | BigDecimal totalPay = new BigDecimal(0); |
| | | BigDecimal totalActual = new BigDecimal(0); |
| | | |
| | | // 商品信息组合 |
| | | for (CommonOrderVO commonOrder : listGoods) { |
| | |
| | | } |
| | | commonGoodsVO.setActualPay("付款金额:¥" + totalSettlement); |
| | | |
| | | totalPay = MoneyBigDecimalUtil.add(totalPay, totalSettlement); |
| | | |
| | | |
| | | // 商品价格 |
| | | BigDecimal actualPrice = commonGoodsVO.getActualPrice(); |
| | | if (actualPrice != null) { |
| | | Integer totalCount = commonOrder.getTotalCount(); |
| | | totalActual = MoneyBigDecimalUtil.add(totalActual, |
| | | MoneyBigDecimalUtil.mul(new BigDecimal(totalCount), actualPrice)); |
| | | } |
| | | |
| | | |
| | | // 邀请订单信息保护 |
| | | if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType |
| | |
| | | order.setOrderType(2); |
| | | } |
| | | } |
| | | |
| | | Integer goodsType = commonGoodsVO.getGoodsType(); |
| | | if (goodsType != null & goodsType == 6) { |
| | | order.setOrderType(5); // 饿了么订单 |
| | | } |
| | | |
| | | order.getListOrderGoods().add(commonGoodsVO); |
| | | } |
| | |
| | | order.setObtainTime(thirdCreateTime.getTime()); |
| | | } |
| | | |
| | | // 2.1分享订单和返利订单实付金额大于或者小于券后价的时候,订单页面 只显示3天 下单时间开始 |
| | | // 2.1显示返利说明连接> |
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType |
| | | && DateUtil.plusDayDate(3, thirdCreateTime).getTime() > nowTime |
| | | && totalPay.compareTo(totalActual) != 0) { |
| | | order.setFanliDesc("由实付金额*返利比计算而来"); |
| | | order.setFanliDescLink(configService.get(ConfigKeyEnum.shareOrderRebateDescLink.getKey())); |
| | | if (thirdCreateTime.getTime() > TimeUtil.convertDateToTemp(Constant.ORDER_SHOW_BRACE_TIME)) { |
| | | String rebateLink = configService.get(ConfigKeyEnum.orderRebateDescLink.getKey()); |
| | | order.setRebateLink(rebateLink + "?orderNo=" + orderNo +"&sourceType=" + sourceType); |
| | | } |
| | | } |
| | | |
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public Integer countLostOrderNum(String preDay) {
|
| | | return lostOrderMapper.countLostOrderNum(preDay);
|
| | | public Integer countLostOrderNum(String preDay, int resultCode) {
|
| | | return lostOrderMapper.countLostOrderNum(preDay, resultCode);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | return order;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public Long countOrderByDay(String preDay) {
|
| | | return jdOrderItemMapper.countOrderByDay(preDay);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public List<JDOrderItem> listQuery(long start, int count, String key) {
|
| | | return jdOrderItemMapper.listQuery(start, count, key);
|
| | | }
|
| | | |
| | | @Override
|
| | | public long countQuery(String key) {
|
| | | Long count = jdOrderItemMapper.countQuery(key);
|
| | | if (count == null) {
|
| | | count = 0L;
|
| | | }
|
| | | return count;
|
| | | }
|
| | | }
|
| | |
| | | return pddOrderMapper.listByStatus(status, (page - 1) * pageSize, pageSize);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public Long countOrderByDay(String preDay) {
|
| | | return pddOrderMapper.countOrderByDay(preDay);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public List<PDDOrder> listQuery(long start, int count, String key) {
|
| | | return pddOrderMapper.listQuery(start, count, key);
|
| | | }
|
| | | |
| | | @Override
|
| | | public long countQuery(String key) {
|
| | | Long count = pddOrderMapper.countQuery(key);
|
| | | if (count == null) {
|
| | | count = 0L;
|
| | | }
|
| | | return count;
|
| | | }
|
| | | |
| | | |
| | | }
|
| | |
| | | return taoBaoOrderMapper.listByStateAndCreateTime(state, minCreateTime.getTime(), maxCreateTime.getTime());
|
| | | }
|
| | |
|
| | | @Override
|
| | | public Long countOrderByDay(String preDay) {
|
| | | return taoBaoOrderMapper.countOrderByDay(preDay);
|
| | | }
|
| | | |
| | | |
| | | }
|
| | |
| | | public long count(String key,Long uid, Integer type){
|
| | | return redPackDetailMapper.count(key, uid, type);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public Long countNumByDay(String preDay) {
|
| | | return redPackDetailMapper.countNumByDay(preDay);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public BigDecimal countMoneyByDay(String preDay) {
|
| | | return redPackDetailMapper.countMoneyByDay(preDay);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.tlj.UserTaoLiJinDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinDetail;
|
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinOrigin;
|
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinDetail.TaoLiJinDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinOrigin;
|
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinOrigin.TaoLiJinOriginEnum;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinDetailService;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
| | | userTaoLiJinDetailMapper.insertSelective(detail);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public Long countNumByDay(String preDay) {
|
| | | return userTaoLiJinDetailMapper.countNumByDay(preDay);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public BigDecimal countMoneyByDay(String preDay) {
|
| | | return userTaoLiJinDetailMapper.countMoneyByDay(preDay);
|
| | | }
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.impl.user;
|
| | |
|
| | | import java.text.ParseException;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.user.UserActiveLogMapper;
|
| | | import com.yeshi.fanli.dao.user.UserActiveNumHistoryDao;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveNumHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoRegister;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoRegisterService;
|
| | | import com.yeshi.fanli.util.user.ChannelEnumUtil;
|
| | |
|
| | | @Service
|
| | | public class UserActiveLogServiceImpl implements UserActiveLogService {
|
| | |
| | | private UserActiveLogMapper userActiveLogMapper;
|
| | |
|
| | | @Resource
|
| | | private UserActiveNumHistoryDao userActiveNumHistoryDao;
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | | private UserInfoRegisterService userInfoRegisterService;
|
| | | |
| | |
|
| | | @Override
|
| | | public void addUserActiveLog(UserActiveLog userActiveLog) {
|
| | |
| | | return;
|
| | | if (userActiveLog.getUid() == null || userActiveLog.getUid() == 0)
|
| | | return;
|
| | | |
| | | UserActiveLog latestLog = getUserLatestActiveInfo(userActiveLog.getUid());
|
| | | if (latestLog == null) {
|
| | | try { // 保存注册信息
|
| | | UserInfoRegister register = new UserInfoRegister();
|
| | | register.setId(userActiveLog.getUid());
|
| | | register.setIp(userActiveLog.getIp());
|
| | | register.setChannel(ChannelEnumUtil.getChannelEnum(userActiveLog.getChannel()));
|
| | | register.setDevice(userActiveLog.getDevice());
|
| | | userInfoRegisterService.addRegisterInfo(register);
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | // 间隔5分钟以上再记录
|
| | | if (latestLog == null || System.currentTimeMillis() - latestLog.getCreateTime().getTime() > 1000 * 60 * 5L) {
|
| | | userActiveLog.setCreateTime(new Date());
|
| | |
| | | return userActiveLogMapper.selectFirstActiveInfo(uid);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<UserActiveNumHistory> query(Date startTime, Date endTime){
|
| | | // 重新查询统计今日以及空缺
|
| | | initUserActiveNumCount();
|
| | | |
| | | return userActiveNumHistoryDao.query(startTime, endTime);
|
| | | }
|
| | | |
| | | |
| | | // 初始化统计
|
| | | private void initUserActiveNumCount() {
|
| | | UserActiveNumHistory history = userActiveNumHistoryDao.getMaxDate();
|
| | | Date lastDay = null;
|
| | | if (history != null && history.getDay() != null)
|
| | | lastDay = history.getDay();
|
| | | |
| | | Date today = new Date();
|
| | | try {
|
| | | if (lastDay == null)
|
| | | lastDay = TimeUtil.parse("2018-09-01");
|
| | | int betweenDays = DateUtil.daysBetween2(lastDay, today);
|
| | | |
| | | // 统计今日之前的
|
| | | if (betweenDays > 0) {
|
| | | for (int i = 1; i <= betweenDays; i++ ) {
|
| | | addUserActiveNumHistory(DateUtil.plusDay(i, lastDay));
|
| | | }
|
| | | }
|
| | | // 重新统计今日
|
| | | addUserActiveNumHistory(TimeUtil.getGernalTime(today.getTime()));
|
| | | } catch (Exception e) {
|
| | | // |
| | | public long count90DaysLaterActiveNum(String date){
|
| | | Long count = userActiveLogMapper.countActiveNumByDate(date);
|
| | | if (count == null) {
|
| | | count = 0L;
|
| | | }
|
| | | return count;
|
| | | }
|
| | | |
| | | /*
|
| | | * 统计当天活跃用户中有多少个用户是90天前才活跃过,期间从未活跃的用户数量。
|
| | | */
|
| | | @Override
|
| | | public void addUserActiveNumHistory(String date){
|
| | | int num = userActiveLogMapper.countActiveNumByDate(date);
|
| | | |
| | | UserActiveNumHistory history = new UserActiveNumHistory();
|
| | | history.setId(date);
|
| | | history.setNum(num);
|
| | | try {
|
| | | history.setDay(TimeUtil.parse(date));
|
| | | } catch (ParseException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | userActiveNumHistoryDao.save(history);
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.impl.user;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoRegisterMapper userInfoRegisterMapper;
|
| | | |
| | | |
| | | @Override
|
| | | public void addRegisterInfo(UserInfoRegister record) {
|
| | | if (record == null || record.getId() == null) {
|
| | | return;
|
| | | }
|
| | | |
| | | UserInfoRegister info = userInfoRegisterMapper.selectByPrimaryKey(record.getId());
|
| | | if (info != null) |
| | | return;
|
| | | |
| | | record.setCreateTime(new Date());
|
| | | userInfoRegisterMapper.insertSelective(record);
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public List<UserInfoRegister> listByMultipleUids(List<Long> list) {
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public Integer countByChannelAndDay(String channel, String preDay) {
|
| | | public Long countByChannelAndDay(String channel, String preDay) {
|
| | | return userInfoRegisterMapper.countByChannelAndDay(channel, preDay);
|
| | | }
|
| | | }
|
| | |
| | | return integralDetailMapper.getCumulativeMoney(uid);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public Long countNewAddByDate(String preDay) {
|
| | | return integralDetailMapper.countNewAddByDate(preDay);
|
| | | }
|
| | | |
| | | @Override
|
| | | public List<IntegralDetail> listQuery(long start, int count, String key) {
|
| | | return integralDetailMapper.listQuery(start, count, key);
|
| | | }
|
| | | |
| | | @Override
|
| | | public long countQuery(String key) {
|
| | | Long count = integralDetailMapper.countQuery(key);
|
| | | if (count == null) {
|
| | | count = 0L;
|
| | | }
|
| | | return count;
|
| | | }
|
| | | |
| | | |
| | | }
|
| | |
|
| | |
| | |
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPPreInfo;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPPreInfoService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | |
| | |
|
| | | @Resource
|
| | | private UserVIPInfoService userVIPInfoService;
|
| | | |
| | | @Resource
|
| | | private UserVIPPreInfoService userVIPPreInfoService;
|
| | |
|
| | | @Override
|
| | | public UserInviteLevelEnum getUserInviteLevel(Long uid) {
|
| | |
| | | if (info.getState() == UserVIPInfo.STATE_VERIFING)
|
| | | return UserInviteLevelEnum.vipApply;
|
| | |
|
| | | |
| | | // TODO 没有判断导师
|
| | |
|
| | | return UserInviteLevelEnum.vip;
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public UserInviteLevelEnum getUserInviteLevelNew(Long uid) {
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | if (StringUtil.isNullOrEmpty(inviteCode)) {
|
| | | return UserInviteLevelEnum.noActive;
|
| | | }
|
| | | |
| | | UserVIPInfo info = userVIPInfoService.selectByUid(uid);
|
| | | if (info == null) {
|
| | | UserVIPPreInfo userVIPPreInfo = userVIPPreInfoService.getLatestProcessInfo(uid);
|
| | | if (userVIPPreInfo != null) {
|
| | | if (userVIPPreInfo.getProcess() == UserVIPPreInfo.PROCESS_1) {
|
| | | return UserInviteLevelEnum.vipPre1;
|
| | | } else if (userVIPPreInfo.getProcess() == UserVIPPreInfo.PROCESS_2) {
|
| | | return UserInviteLevelEnum.vipPre2;
|
| | | }
|
| | | }
|
| | | } else if (info.getState() == UserVIPInfo.STATE_VERIFING) {
|
| | | return UserInviteLevelEnum.vipApply;
|
| | | } else if (info.getState() == UserVIPInfo.STATE_SUCCESS) {
|
| | | return UserInviteLevelEnum.vip;
|
| | | }
|
| | | |
| | | // TODO 没有判断导师
|
| | | |
| | | return UserInviteLevelEnum.actived;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.config;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.system.ConfigCategory;
|
| | | import com.yeshi.fanli.entity.system.ConfigCategory.ConfigCategoryEnum;
|
| | |
|
| | | public interface ConfigCategoryService {
|
| | |
|
| | | /**
|
| | | * 添加分类信息
|
| | | * @param configCategory
|
| | | */
|
| | | public void addConfigCategory(ConfigCategory configCategory);
|
| | |
|
| | | /**
|
| | | * 根据分类查询key值
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public List<ConfigCategory> listByType(ConfigCategoryEnum type);
|
| | |
|
| | | /**
|
| | | * 获取类型枚举
|
| | | * @param name
|
| | | * @return
|
| | | */
|
| | | public ConfigCategoryEnum getCategoryEnum(String name);
|
| | |
|
| | | |
| | | }
|
| | |
| | | * @return
|
| | | */
|
| | | public String getSearchDiscoveryKeys();
|
| | |
|
| | | /**
|
| | | * 根据key查询 无缓存
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public Config getConfigBykeyNoCache(String key);
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.count;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountCoupon;
|
| | |
|
| | | public interface DailyCountCouponService {
|
| | |
|
| | | /**
|
| | | * 查询各类型统计
|
| | | * @param type
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public List<DailyCountCoupon> getDailyCountList(String type, Date startTime, Date endTime) throws Exception;
|
| | |
|
| | | /**
|
| | | * 获取枚举类型说明
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public String getTypeEnumDesc(String type);
|
| | | |
| | |
|
| | | |
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.count;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountOrder;
|
| | |
|
| | | public interface DailyCountOrderService {
|
| | |
|
| | | /**
|
| | | * 查询统计
|
| | | * @param type
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @param channel
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public List<DailyCountOrder> getDailyCountList(String type, Date startTime, Date endTime, String channel) throws Exception;
|
| | |
|
| | | /**
|
| | | * 获取类型说明
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public String getTypeEnumDesc(String type);
|
| | |
|
| | | |
| | |
|
| | | |
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.count;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.admin.count.DailyCountUser;
|
| | |
|
| | | public interface DailyCountUserService {
|
| | |
|
| | | /**
|
| | | * 查询统计
|
| | | * @param type
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @param channel
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public List<DailyCountUser> getDailyCountList(String type, Date startTime, Date endTime, String channel) throws Exception;
|
| | |
|
| | | /**
|
| | | * 获取类型说明
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public String getTypeEnumDesc(String type);
|
| | |
|
| | | |
| | |
|
| | | |
| | | }
|
| | |
| | | Integer moneyState, String startTime, String endTime, List<Integer> listSource);
|
| | |
|
| | |
|
| | | public Integer countOrderByTypeAndDate(Integer orderType, String preDay);
|
| | | public Long countOrderByTypeAndDate(Integer orderType, String preDay);
|
| | |
|
| | | /**
|
| | | * 统计订单数量
|
| | |
| | |
|
| | | public List<CountUserInfo> getNewUserData(Date startTime, Date endTime, String channel);
|
| | |
|
| | | public void initChannelUserCount();
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | public List<CountOrderInfo> countHongBaoByChannel(String channel, Date startTime, Date endTime);
|
| | |
|
| | | /**
|
| | | * 统计订单数量-根据类型
|
| | | * @param channel
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @return
|
| | | */
|
| | | public List<CountOrderInfo> countOrderType(Integer state, Date startTime, Date endTime);
|
| | |
|
| | |
|
| | | /**
|
| | | * 统计维权订单数量
|
| | |
| | | * @return
|
| | | */
|
| | | public List<CountOrderInfo> counOrderTotalNum(Date startTime, Date endTime);
|
| | |
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.count;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.dto.ChartTDO;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum;
|
| | | import com.yeshi.fanli.vo.user.SystemCouponVO;
|
| | | import com.yeshi.fanli.vo.user.UserSystemCouponCountVO;
|
| | |
|
| | |
| | | */
|
| | | public List<ChartTDO> getFreeCouponMoneyToCharts(Integer dateType, String year, String startTime,
|
| | | String endTime, String couponType);
|
| | |
|
| | | |
| | | /**
|
| | | * 根据券类型 统计免单金额
|
| | | * @param typeEnum
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | public BigDecimal countFreeMoneyByTypeAndDay(CouponTypeEnum typeEnum, String preDay);
|
| | |
|
| | | /**
|
| | | * 统计奖励券成功金额
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | public BigDecimal countRebateMoneyByDay(String preDay);
|
| | |
|
| | | /**
|
| | | * 每日新增券数量
|
| | | * @param typeEnum
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | public BigDecimal countCouponNumByDay(CouponTypeEnum typeEnum, String preDay);
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.money.extract;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.dto.ChartTDO;
|
| | | import com.yeshi.fanli.entity.admin.count.CountUserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
|
| | |
|
| | | public interface ExtractAuditRecordService {
|
| | |
| | | public List<ExtractAuditRecord> getbyExtractId(Long extractId);
|
| | |
|
| | |
|
| | | |
| | | /**
|
| | | * 统计申请提的现总金额
|
| | | * @param state
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @return
|
| | | */
|
| | | public List<CountUserInfo> getApplyMoney(Date startTime, Date endTime) throws Exception;
|
| | | |
| | | public void initApplyMoneyCount();
|
| | | |
| | | /**
|
| | | * 统计申请提的现总次数
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @return
|
| | | */
|
| | | List<CountUserInfo> geApplyNumber(Date startTime, Date endTime) throws Exception;
|
| | | public Long countApplyNumberByDay(String preDay);
|
| | |
|
| | | public void initApplyNumberCount();
|
| | | public BigDecimal countApplyMoneyByDay(String preDay);
|
| | |
|
| | | public void initAuditCount();
|
| | | public Long countAuditNumberByDay(int state, String preDay);
|
| | |
|
| | | public List<CountUserInfo> getAuditCount(Date startTime, Date endTime, Integer state) throws Exception;
|
| | |
|
| | |
|
| | |
|
| | | |
| | |
|
| | | }
|
| | |
| | | */ |
| | | public List<ChartTDO> getTrackAccuracyRate(Integer dateType, String year, String startTime, String endTime, |
| | | int sourceType) throws Exception; |
| | | |
| | | |
| | | public Long countOrderBySourceTypeAndDay(int source, String preDay); |
| | | } |
| | |
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | public Integer countLostOrderNum(String preDay);
|
| | | public Integer countLostOrderNum(String preDay, int resultCode);
|
| | |
|
| | | /**
|
| | | * 统计申诉找回佣金
|
| | |
| | | package com.yeshi.fanli.service.inter.order.jd;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.jd.JDOrder;
|
| | | import com.yeshi.fanli.entity.jd.JDOrderItem;
|
| | | import com.yeshi.fanli.exception.jd.JDOrderException;
|
| | |
|
| | | public interface JDOrderService {
|
| | |
| | | */
|
| | | public JDOrder selectDetailByOrderId(Long orderId);
|
| | |
|
| | | |
| | | |
| | | public Long countOrderByDay(String preDay);
|
| | |
|
| | | /**
|
| | | * 查询订单
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<JDOrderItem> listQuery(long start, int count, String key);
|
| | |
|
| | | public long countQuery(String key);
|
| | |
|
| | | }
|
| | |
| | | */
|
| | | public List<PDDOrder> listByStatus(Integer status, int page, int pageSize);
|
| | |
|
| | | |
| | | public Long countOrderByDay(String preDay);
|
| | |
|
| | | |
| | | public List<PDDOrder> listQuery(long start, int count, String key);
|
| | |
|
| | | public long countQuery(String key);
|
| | |
|
| | | }
|
| | |
| | | * @return
|
| | | */
|
| | | public List<TaoBaoOrder> listByStateAndCreateTime(String state, Date minCreateTime, Date maxCreateTime);
|
| | |
|
| | | public Long countOrderByDay(String preDay);
|
| | | }
|
| | |
| | |
|
| | | public long count(String key, Long uid, Integer type);
|
| | |
|
| | | public BigDecimal countMoneyByDay(String preDay);
|
| | | |
| | | |
| | | public Long countNumByDay(String preDay);
|
| | |
|
| | | }
|
| | |
| | | */
|
| | | public Long countDetail(long uid);
|
| | |
|
| | | public Long countNumByDay(String preDay);
|
| | |
|
| | | public BigDecimal countMoneyByDay(String preDay);
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.user;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveNumHistory;
|
| | |
|
| | | /**
|
| | | * 用户活跃日志服务
|
| | |
| | | */
|
| | | public UserActiveLog getFirstActiveInfo(Long uid);
|
| | |
|
| | |
|
| | | /**
|
| | | * |
| | | * @param dateType
|
| | | * @param year
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * 统计90后再次活跃用户
|
| | | * @param date
|
| | | * @return
|
| | | */
|
| | | public List<UserActiveNumHistory> query(Date startTime, Date endTime);
|
| | |
|
| | | public void addUserActiveNumHistory(String date);
|
| | | public long count90DaysLaterActiveNum(String date);
|
| | | }
|
| | |
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | public Integer countByChannelAndDay(String channel, String preDay);
|
| | | public Long countByChannelAndDay(String channel, String preDay);
|
| | |
|
| | | /**
|
| | | * 添加注册信息
|
| | | * @param record
|
| | | */
|
| | | public void addRegisterInfo(UserInfoRegister record);
|
| | |
|
| | | }
|
| | |
| | | */
|
| | | public BigDecimal getCumulativeMoney(Long uid);
|
| | |
|
| | | /**
|
| | | * 统计当日新增
|
| | | * @param preDay
|
| | | * @return
|
| | | */
|
| | | public Long countNewAddByDate(String preDay);
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<IntegralDetail> listQuery(long start, int count, String key);
|
| | |
|
| | | |
| | | public long countQuery(String key);
|
| | |
|
| | | }
|
| | |
| | | * @return
|
| | | */
|
| | | public UserInviteLevelEnum getUserInviteLevel(Long uid);
|
| | |
|
| | | |
| | | /**
|
| | | * 获取邀请等级 2.1
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public UserInviteLevelEnum getUserInviteLevelNew(Long uid);
|
| | | }
|
| | |
| | | public static final int VIP_PROCESS_3_TEAM_SECOND = 64;
|
| | |
|
| | |
|
| | | // 订单列表显> 时间 TODO
|
| | | public static final String ORDER_SHOW_BRACE_TIME = "2019-12-14";
|
| | | |
| | |
|
| | | // 奖励券倒计时 - 天数
|
| | | public static final int COUPON_REWARD_LIMIT_DAY = 5;
|
New file |
| | |
| | | package com.yeshi.fanli.util.user;
|
| | |
|
| | | import com.yeshi.fanli.entity.system.ChannelEnum;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | public class ChannelEnumUtil {
|
| | | |
| | | public static ChannelEnum getChannelEnum(String channel) {
|
| | | if (StringUtil.isNullOrEmpty(channel)) {
|
| | | return ChannelEnum.unknown;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.p360.getVlaue())) {
|
| | | return ChannelEnum.p360;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.appstore.getVlaue())) {
|
| | | return ChannelEnum.appstore;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.douyin.getVlaue())) {
|
| | | return ChannelEnum.douyin;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.guanwang.getVlaue())) {
|
| | | return ChannelEnum.guanwang;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.lenovo.getVlaue())) {
|
| | | return ChannelEnum.lenovo;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.meizu.getVlaue())) {
|
| | | return ChannelEnum.meizu;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.oppo.getVlaue())) {
|
| | | return ChannelEnum.oppo;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.pp.getVlaue())) {
|
| | | return ChannelEnum.pp;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.qq.getVlaue())) {
|
| | | return ChannelEnum.qq;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.sougou.getVlaue())) {
|
| | | return ChannelEnum.sougou;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.vivo.getVlaue())) {
|
| | | return ChannelEnum.vivo;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.xiaomi.getVlaue())) {
|
| | | return ChannelEnum.xiaomi;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.yaoqing.getVlaue())) {
|
| | | return ChannelEnum.yaoqing;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.yingyin.getVlaue())) {
|
| | | return ChannelEnum.yingyin;
|
| | | }
|
| | | |
| | | if (channel.equalsIgnoreCase(ChannelEnum.huawei.getVlaue())) {
|
| | | return ChannelEnum.huawei;
|
| | | }
|
| | | |
| | | return ChannelEnum.unknown;
|
| | | }
|
| | | }
|
| | |
| | | private String vipOrderDesc;// 超级订单描述(2.1之后废弃)
|
| | |
|
| | | @Expose
|
| | | private String fanliDesc;// 返利说明
|
| | | @Expose
|
| | | private String fanliDescLink;// 返利说明链接
|
| | | private String rebateLink;// 返利说明链接
|
| | |
|
| | | @Expose
|
| | | private String orderDesc;// 订单描述
|
| | |
| | | this.subsidyList = subsidyList;
|
| | | }
|
| | |
|
| | | public String getFanliDesc() {
|
| | | return fanliDesc;
|
| | | }
|
| | |
|
| | | public void setFanliDesc(String fanliDesc) {
|
| | | this.fanliDesc = fanliDesc;
|
| | | }
|
| | |
|
| | | public String getFanliDescLink() {
|
| | | return fanliDescLink;
|
| | | }
|
| | |
|
| | | public void setFanliDescLink(String fanliDescLink) {
|
| | | this.fanliDescLink = fanliDescLink;
|
| | | }
|
| | |
|
| | | public String getOrderDesc() {
|
| | | return orderDesc;
|
| | | }
|
| | |
| | | public void setOrderDesc(String orderDesc) {
|
| | | this.orderDesc = orderDesc;
|
| | | }
|
| | |
|
| | | public String getRebateLink() {
|
| | | return rebateLink;
|
| | | }
|
| | |
|
| | | public void setRebateLink(String rebateLink) {
|
| | | this.rebateLink = rebateLink;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.vo.order;
|
| | |
|
| | | public class GoodsRebateVO {
|
| | | private String title; // 商品标题
|
| | | private String picture; // 商品图片
|
| | | private String actualPay; // 实付款
|
| | | private String fanliRate; // 返利比例
|
| | | private String fanliExpect; // 预估返利
|
| | | private String commision; // 返利比或者佣金
|
| | | private String subsidy; // 补贴
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public String getActualPay() {
|
| | | return actualPay;
|
| | | }
|
| | |
|
| | | public void setActualPay(String actualPay) {
|
| | | this.actualPay = actualPay;
|
| | | }
|
| | |
|
| | | public String getFanliExpect() {
|
| | | return fanliExpect;
|
| | | }
|
| | |
|
| | | public void setFanliExpect(String fanliExpect) {
|
| | | this.fanliExpect = fanliExpect;
|
| | | }
|
| | |
|
| | | public String getCommision() {
|
| | | return commision;
|
| | | }
|
| | |
|
| | | public void setCommision(String commision) {
|
| | | this.commision = commision;
|
| | | }
|
| | |
|
| | | public String getSubsidy() {
|
| | | return subsidy;
|
| | | }
|
| | |
|
| | | public void setSubsidy(String subsidy) {
|
| | | this.subsidy = subsidy;
|
| | | }
|
| | |
|
| | | public String getFanliRate() {
|
| | | return fanliRate;
|
| | | }
|
| | |
|
| | | public void setFanliRate(String fanliRate) {
|
| | | this.fanliRate = fanliRate;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.vo.order;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | public class OrderRebateVO {
|
| | | private String totalFanLi; // 预估总返利
|
| | | private String upperFanLi; // 升级返利
|
| | | private String userLevel; // 用户等级
|
| | | private String jumpLink; // 跳转链接
|
| | |
|
| | | private List<GoodsRebateVO> listGoods;
|
| | |
|
| | | public String getTotalFanLi() {
|
| | | return totalFanLi;
|
| | | }
|
| | |
|
| | | public void setTotalFanLi(String totalFanLi) {
|
| | | this.totalFanLi = totalFanLi;
|
| | | }
|
| | |
|
| | | public String getUpperFanLi() {
|
| | | return upperFanLi;
|
| | | }
|
| | |
|
| | | public void setUpperFanLi(String upperFanLi) {
|
| | | this.upperFanLi = upperFanLi;
|
| | | }
|
| | |
|
| | | public String getUserLevel() {
|
| | | return userLevel;
|
| | | }
|
| | |
|
| | | public void setUserLevel(String userLevel) {
|
| | | this.userLevel = userLevel;
|
| | | }
|
| | |
|
| | | public List<GoodsRebateVO> getListGoods() {
|
| | | return listGoods;
|
| | | }
|
| | |
|
| | | public void setListGoods(List<GoodsRebateVO> listGoods) {
|
| | | this.listGoods = listGoods;
|
| | | }
|
| | |
|
| | | public String getJumpLink() {
|
| | | return jumpLink;
|
| | | }
|
| | |
|
| | | public void setJumpLink(String jumpLink) {
|
| | | this.jumpLink = jumpLink;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.vo.order;
|
| | |
|
| | | public class TeamBonusVO {
|
| | | private String total; // 总计
|
| | | private String direct; // 直接
|
| | | private String indirect; // 间接
|
| | |
|
| | | public TeamBonusVO() {
|
| | | }
|
| | | |
| | | |
| | | public TeamBonusVO(String direct, String indirect, String total) {
|
| | | this.direct = direct;
|
| | | this.indirect = indirect;
|
| | | this.total = total;
|
| | | }
|
| | | |
| | | |
| | | public String getTotal() {
|
| | | return total;
|
| | | }
|
| | |
|
| | | public void setTotal(String total) {
|
| | | this.total = total;
|
| | | }
|
| | |
|
| | | public String getDirect() {
|
| | | return direct;
|
| | | }
|
| | |
|
| | | public void setDirect(String direct) {
|
| | | this.direct = direct;
|
| | | }
|
| | |
|
| | | public String getIndirect() {
|
| | | return indirect;
|
| | | }
|
| | |
|
| | | public void setIndirect(String indirect) {
|
| | | this.indirect = indirect;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.config;
|
| | |
|
| | | import org.junit.Test;
|
| | |
|
| | | import com.yeshi.fanli.entity.system.ConfigCategory;
|
| | | import com.yeshi.fanli.entity.system.ConfigCategory.ConfigCategoryEnum;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigCategoryService;
|
| | | import com.yeshi.fanli.util.BeanUtil;
|
| | |
|
| | | public class Test_ConfigCategoryService {
|
| | | |
| | | @Test
|
| | | public void addConfigCategory() {
|
| | | ConfigCategoryService service = BeanUtil.getBean(ConfigCategoryService.class);
|
| | | |
| | | ConfigCategory c1 = new ConfigCategory();
|
| | | c1.setKeyEnum(ConfigKeyEnum.appDownLink);
|
| | | c1.setType(ConfigCategoryEnum.helpStrategy);
|
| | | c1.setOrder(13);
|
| | | service.addConfigCategory(c1);
|
| | | |
| | | /*ConfigCategory c2 = new ConfigCategory();
|
| | | c2.setKeyEnum(ConfigKeyEnum.teamHelpUrl);
|
| | | c2.setType(ConfigCategoryEnum.helpStrategy);
|
| | | c2.setOrder(8);
|
| | | service.addConfigCategory(c2);
|
| | | |
| | | |
| | | ConfigCategory c3 = new ConfigCategory();
|
| | | c3.setKeyEnum(ConfigKeyEnum.inviteHelpLink);
|
| | | c3.setType(ConfigCategoryEnum.helpStrategy);
|
| | | c3.setOrder(9);
|
| | | service.addConfigCategory(c3);
|
| | | |
| | | |
| | | ConfigCategory c4 = new ConfigCategory();
|
| | | c4.setKeyEnum(ConfigKeyEnum.inviteCodeInputHelp);
|
| | | c4.setType(ConfigCategoryEnum.helpStrategy);
|
| | | c4.setOrder(10);
|
| | | service.addConfigCategory(c4);
|
| | | |
| | | ConfigCategory c5 = new ConfigCategory();
|
| | | c5.setKeyEnum(ConfigKeyEnum.convertDocHelpLink);
|
| | | c5.setType(ConfigCategoryEnum.helpStrategy);
|
| | | c5.setOrder(11);
|
| | | service.addConfigCategory(c5);
|
| | | |
| | | |
| | | ConfigCategory c6 = new ConfigCategory();
|
| | | c6.setKeyEnum(ConfigKeyEnum.customerServiceLink);
|
| | | c6.setType(ConfigCategoryEnum.helpStrategy);
|
| | | c6.setOrder(12);
|
| | | service.addConfigCategory(c6);*/
|
| | | |
| | | }
|
| | | }
|