| | |
| | | import com.yeshi.fanli.entity.bus.help.AppPageNotification;
|
| | | import com.yeshi.fanli.entity.bus.help.AppPageNotification.AppPageNotificationTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
|
| | | import com.yeshi.fanli.service.inter.config.AppVersionService;
|
| | | import com.yeshi.fanli.service.inter.help.AppPageNotificationService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.AdActivityVersionControlService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | |
| | | @RequestMapping(value = "saveModify")
|
| | | public void saveModify(String callback, AppPageNotification appPageNotification, PrintWriter out) {
|
| | | try {
|
| | | AppPageNotificationTypeEnum type = appPageNotification.getType();
|
| | | if (type == null) {
|
| | | if (appPageNotification.getId() == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | AppPageNotification old = appPageNotificationService.getAppPageNotificationByType(type.name());
|
| | | AppPageNotification old = appPageNotificationService.selectByPrimaryKey(appPageNotification.getId());
|
| | | if (old == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作对象已不存在"));
|
| | | return;
|
| | |
| | | appPageNotification.setEndTime(format.parse(endTimeVO.replaceAll("T", " ")));
|
| | | }
|
| | |
|
| | | appPageNotification.setMd5(StringUtil.Md5(type.name() + "#" + content + "#" + appPageNotification.getContentUrl()));
|
| | | appPageNotification.setMd5(StringUtil.Md5(appPageNotification.getType() + "#" + content + "#" + appPageNotification.getContentUrl()));
|
| | | appPageNotification.setUpdateTime(new Date());
|
| | |
|
| | | appPageNotification.setId(old.getId());
|
| | |
| | | for (AppPageNotification notification: list) {
|
| | | AppPageNotificationTypeEnum type = notification.getType();
|
| | | notification.setPageName(type.getDesc());
|
| | | |
| | |
|
| | | Date startTime = notification.getBeginTime();
|
| | | if (startTime == null) {
|
| | |
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateCanCloseState")
|
| | | public void updateCanCloseState(String callback, String type, PrintWriter out) {
|
| | | @RequestMapping(value = "switchShutOff")
|
| | | public void switchShutOff(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | if (type == null) {
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | AppPageNotification resultObj = appPageNotificationService.getAppPageNotificationByType(type);
|
| | | AppPageNotification resultObj = appPageNotificationService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
|
| | | return;
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("state", newOBj.getCanClose());
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | |
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateShowState")
|
| | | public void updateShowState(String callback, String type, PrintWriter out) {
|
| | | @RequestMapping(value = "switchState")
|
| | | public void switchState(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | if (type == null) {
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
|
| | | return;
|
| | | }
|
| | |
|
| | | AppPageNotification resultObj = appPageNotificationService.getAppPageNotificationByType(type);
|
| | | AppPageNotification resultObj = appPageNotificationService.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
|
| | | return;
|
| | |
| | | newOBj.setId(resultObj.getId());
|
| | | newOBj.setShow(show);
|
| | | appPageNotificationService.updateByPrimaryKeySelective(newOBj);
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("state", newOBj.getShow());
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | |
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state,
|
| | | PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | | }
|
| | |
| | | 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();
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchStateClass")
|
| | | public void switchStateClass(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | brandClassService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (BrandClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
| | | */
|
| | | @RequestMapping(value = "delete")
|
| | | public void delete(String callback, String idArray, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | |
| | |
|
| | |
|
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchStateBrand")
|
| | | public void switchStateBrand(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | brandInfoService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (BrandInfoException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param callback
|
| | |
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.exception.goods.GoodsClassException;
|
| | | import com.yeshi.fanli.exception.homemodule.FloatADException;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.goods.GoodsClassService;
|
| | | import com.yeshi.fanli.service.inter.goods.GoodsSecondClassService;
|
| | |
| | | }
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (FloatADException e) {
|
| | | } catch (GoodsClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("保存失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchState")
|
| | | public void switchState(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | goodsClassService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (GoodsClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 修改排序
|
| | |
| | | */
|
| | | @RequestMapping(value = "deleteBatch")
|
| | | public void deleteBatch(String callback, String ids, PrintWriter out) {
|
| | |
|
| | | Gson gson = new Gson();
|
| | |
|
| | | try {
|
| | | List<String> recordIds = gson.fromJson(ids, new TypeToken<ArrayList<String>>() {
|
| | | }.getType());
|
| | |
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("删除成功"));
|
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | @RequestMapping(value = "removePicture")
|
| | | public void removePicture(String callback, Long id, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | GoodsClass goodsClass = goodsClassService.getGoodsClass(id);
|
| | |
|
| | |
| | |
|
| | | @RequestMapping(value = "getClassOption")
|
| | | public void getClassOption(String callback, PrintWriter out) {
|
| | |
|
| | | List<GoodsClass> goodsClassList = goodsClassService.getGoodsClassAll();
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | |
|
| | | data.put("result_list", goodsClassList);
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | }
|
| | | }
|
| | |
| | | |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * @param callback |
| | | * @param id |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "switchState") |
| | | public void switchState(String callback, String id, PrintWriter out) { |
| | | try { |
| | | goodsEvaluateService.switchState(id); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功")); |
| | | } catch (GoodsEvaluateException e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg())); |
| | | } catch (Exception e) { |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败")); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存信息 |
| | | * |
| | | * @param callback |
| | |
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap;
|
| | | import com.yeshi.fanli.entity.bus.clazz.TaoBaoClass;
|
| | | import com.yeshi.fanli.exception.homemodule.FloatADException;
|
| | | import com.yeshi.fanli.exception.goods.GoodsSubClassException;
|
| | | import com.yeshi.fanli.service.inter.clazz.GoodsSubClassLabelService;
|
| | | import com.yeshi.fanli.service.inter.goods.GoodsSubClassService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoClassService;
|
| | |
| | | }
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (FloatADException e) {
|
| | | } catch (GoodsSubClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("保存失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchState")
|
| | | public void switchState(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | goodsSubClassService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (GoodsSubClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
| | | */
|
| | | @RequestMapping(value = "deleteBatch")
|
| | | public void deleteBatch(String callback, String ids, PrintWriter out) {
|
| | |
|
| | | Gson gson = new Gson();
|
| | |
|
| | | try {
|
| | | List<String> recordIds = gson.fromJson(ids, new TypeToken<ArrayList<String>>() {
|
| | | }.getType());
|
| | |
| | | goodsSubClassService.deleteByPrimaryKeyBatch(recordIds);
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult("删除成功")));
|
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
|
| | | e.printStackTrace();
|
| | |
| | | */
|
| | | @RequestMapping(value = "removePicture")
|
| | | public void removePicture(String callback, Long id, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | GoodsSubClass goodsSubClass = goodsSubClassService.selectByPrimaryKey(id);
|
| | |
|
| | |
| | | } else {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("图片删除成功,数据更新失败")));
|
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | @RequestMapping(value = "querySub")
|
| | | public void querySub(String callback, Long pid, Integer type, PrintWriter out) {
|
| | |
|
| | | try {
|
| | |
|
| | | if (pid == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上级id为空"));
|
| | | return;
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("subClassList", gson.toJson(goodsSubClassList));
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
|
| | |
| | | */
|
| | | @RequestMapping(value = "queryOverSecond")
|
| | | public void queryOverSecond(String callback, Long pid, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | Integer state = null;
|
| | | List<GoodsSubClass> goodsSubClassList = goodsSubClassService.queryByPid(pid, state);
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("subClassList", gson.toJson(goodsSubClassList));
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
|
| | |
| | | @RequestMapping(value = "saveOrder")
|
| | | public void saveOrder(String callback, Long id, Integer type, Integer moveType, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | if (moveType == null || (!moveType.equals(1) && !moveType.equals(-1))) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("传递的类型不正确"));
|
| | | return;
|
| | |
| | |
|
| | | resultObj.setUpdatetime(new Date());
|
| | | goodsSubClassService.updateByPrimaryKeySelective(resultObj);
|
| | |
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
|
| | | import com.yeshi.fanli.exception.config.HelpCenterException;
|
| | | import com.yeshi.fanli.exception.config.HelpClassException;
|
| | | import com.yeshi.fanli.exception.homemodule.FloatADException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.AppVersionService;
|
| | | import com.yeshi.fanli.service.inter.help.HelpCenterService;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchState")
|
| | | public void switchState(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | helpCenterService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (HelpCenterException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @RequestMapping(value = "getInfo")
|
| | | public void getInfo(String callback, Long id, PrintWriter out) {
|
| | |
|
| | |
| | | helpClassService.save(helpClass, null);
|
| | | }
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (FloatADException e) {
|
| | | } catch (HelpClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("保存失败"));
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改状态
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchStateClass")
|
| | | public void switchStateClass(String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | helpClassService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | | } catch (HelpClassException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 修改排序
|
| | |
| | | if(level == null) {
|
| | | level = UserLevelEnum.daRen;
|
| | | }
|
| | | |
| | | level = UserLevelUtil.getShowLevel(level);
|
| | |
|
| | | JSONObject object = new JSONObject();
|
| | | object.put("workerId", workerId);
|
| | |
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.NumberUtil;
|
| | |
|
| | | import com.yeshi.fanli.dto.order.UserTeamLevel;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.ESOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoV2Service;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMapService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoWeiQuanOrderService;
|
| | |
| | | @Resource
|
| | | private UserVIPInfoService userVIPInfoService;
|
| | |
|
| | | @Resource
|
| | | private HongBaoV2Service hongBaoV2Service;
|
| | | |
| | | @Resource
|
| | | private HongBaoOrderService hongBaoOrderService;
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | // 红包获得者
|
| | | HongBaoV2 hongBaoV2 = hoList.get(0).getHongBaoV2();
|
| | | UserLevelEnum userLevel = UserLevelUtil.getByOrderRank(hongBaoV2.getUrank());
|
| | | if (userLevel == null)
|
| | | userLevel = UserLevelEnum.daRen;
|
| | | UserLevelEnum upperLevel = UserLevelEnum.superVIP;
|
| | |
|
| | | // 订单购买者
|
| | | CommonOrder commonOrder1 = hoList.get(0).getCommonOrder();
|
| | | Date downTime = commonOrder1.getThirdCreateTime();
|
| | | UserLevelEnum buyer = UserLevelUtil.getByOrderRank(commonOrder1.getUrank());
|
| | | if (buyer == null) {
|
| | | buyer = UserLevelEnum.daRen;
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | | BigDecimal upperTotalMoney = new BigDecimal(0);
|
| | | List<GoodsRebateVO> voList = new ArrayList<>();
|
| | |
| | | // 基础佣金
|
| | | BigDecimal commission = orderHongBaoMoneyComputeService.computeBaseFanliMoney(commonOrder);
|
| | | goodsVO.setCommision("¥" +commission.setScale(2, BigDecimal.ROUND_DOWN));
|
| | | |
| | | // 平台补贴 = 返利 - 基础佣金
|
| | | goodsVO.setSubsidy("¥" + fanli.subtract(commission).setScale(2, BigDecimal.ROUND_DOWN));
|
| | | // 达人补贴
|
| | |
| | | } else if (type == 2) {
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService.computeShareMoney(commonOrder, upperLevel));
|
| | | } else if (type == 3) {
|
| | | upperTotalMoney = upperTotalMoney.add(hongBao);
|
| | | List<UserTeamLevel> bossLevelList = new ArrayList<>();
|
| | | if (hongBaoV2.getType() == HongBaoV2.TYPE_YIJI || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_YIJI) {
|
| | | bossLevelList.add(new UserTeamLevel(null, UserLevelEnum.superVIP));
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService.computeFirstInviteMoney(commonOrder,
|
| | | buyer, bossLevelList));
|
| | | } else {
|
| | | Integer bRank = hongBaoV2Service.getDirectBossUrankByPid(hongBaoOrder.getHongBaoV2().getParent().getId());
|
| | | UserLevelEnum directBoss = UserLevelUtil.getByOrderRank(bRank);
|
| | | if (directBoss == null) {
|
| | | directBoss = UserLevelEnum.daRen;
|
| | | }
|
| | | bossLevelList.add(new UserTeamLevel(null, directBoss));
|
| | | bossLevelList.add(new UserTeamLevel(null, UserLevelEnum.superVIP));
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService.computeSecondInviteMoney(commonOrder,
|
| | | buyer, bossLevelList));
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | orderRebateVO.setFanLiDesc(predictDesc + typeName);
|
| | | orderRebateVO.setFanLi("¥" + hongBao.setScale(2, BigDecimal.ROUND_DOWN));
|
| | | |
| | | orderRebateVO.setType(type);
|
| | | orderRebateVO.setStateDesc(stateDesc);
|
| | | orderRebateVO.setListGoods(voList);
|
| | |
| | | import org.springframework.data.mongodb.core.MongoTemplate;
|
| | | import org.springframework.data.mongodb.core.query.Criteria;
|
| | | import org.springframework.data.mongodb.core.query.Query;
|
| | | import org.springframework.data.mongodb.core.query.Update;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import com.yeshi.fanli.entity.dynamic.ArticleOfficial;
|
| | |
| | | }
|
| | | mongoTemplate.save(record);
|
| | | }
|
| | | |
| | | /**
|
| | | * 状态切换
|
| | | * |
| | | * @param record
|
| | | */
|
| | | public void updateSatate(String id, int state) {
|
| | | Query query = new Query();
|
| | | query.addCriteria(Criteria.where("id").is(id));
|
| | | Update update = Update.update("state", state);
|
| | | mongoTemplate.updateMulti(query, update, ArticleOfficial.class);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 根据id查询数据
|
| | |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.data.mongodb.core.query.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import com.mongodb.BasicDBObject; |
| | | import com.mongodb.QueryOperators; |
| | | import com.yeshi.fanli.entity.dynamic.GoodsEvaluate; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 状态切换 |
| | | * |
| | | * @param record |
| | | */ |
| | | public void updateSatate(String id, int state) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("id").is(id)); |
| | | |
| | | Update update = Update.update("state", state); |
| | | mongoTemplate.updateMulti(query, update, GoodsEvaluate.class); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param record |
| | | */ |
| | |
| | | */ |
| | | List<HongBaoDTO> listByOrderTradeId(@Param("tradeId") String tradeId); |
| | | |
| | | |
| | | /** |
| | | * 查询直接上级当时获得红包等级 |
| | | * @param pid |
| | | * @return |
| | | */ |
| | | Integer getDirectBossUrankByPid(@Param("pid")Long pid); |
| | | |
| | | } |
| | |
| | | private String searchJson; // 搜索条件
|
| | |
|
| | | @Column(name = "sub_ios_click")
|
| | | private Long iosClick = 0l;
|
| | | private Long iosClick;
|
| | |
|
| | | @Column(name = "sub_android_click")
|
| | | private Long androidClick = 0l;
|
| | | private Long androidClick;
|
| | |
|
| | | private String taobaoCids;
|
| | |
|
| | |
| | | <if test="rootClass != null">sub_root_id=#{rootClass.id,jdbcType=BIGINT},</if>
|
| | | <if test="parent != null">sub_pid=#{parent.id,jdbcType=BIGINT},</if>
|
| | | <if test="level != null">sub_level=#{level,jdbcType=INTEGER},</if>
|
| | | <if test="level != null">sub_state=#{state,jdbcType=INTEGER},</if>
|
| | | <if test="state != null">sub_state=#{state,jdbcType=INTEGER},</if>
|
| | | <if test="key != null">sub_key=#{key,jdbcType=VARCHAR},</if>
|
| | | <if test="searchJson != null">sub_search_json=#{searchJson,jdbcType=VARCHAR},</if>
|
| | | <if test="iosClick != null">sub_ios_click=#{iosClick,jdbcType=BIGINT},</if>
|
| | |
| | | #{tradeId}
|
| | | </select>
|
| | |
|
| | | <select id="getDirectBossUrankByPid" resultType="Integer">
|
| | | SELECT v.`hb_urank` FROM `yeshi_ec_hongbao_v2` v
|
| | | WHERE v.`hb_pid` = #{pid} AND (v.`hb_type` = 6 OR v.`hb_type` = 21) |
| | | LIMIT 1
|
| | | </select>
|
| | |
|
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
| | | yeshi_ec_hongbao_v2 where hb_id = #{id,jdbcType=BIGINT}
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public void switchState(Long id) throws BrandClassException {
|
| | | if (id == null) {
|
| | | throw new BrandClassException(1, "请传递正确参数");
|
| | | }
|
| | | BrandClass resultObj = brandClassMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new BrandClassException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | BrandClass updateObj = new BrandClass();
|
| | | updateObj.setId(id);
|
| | | updateObj.setState(state);
|
| | | brandClassMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | | |
| | | |
| | | @Override
|
| | | public void updateOrder(Long id, Integer moveType) throws BrandClassException, Exception{
|
| | | if (moveType == null || (!moveType.equals(1) && !moveType.equals(-1)))
|
| | | throw new BrandClassException(1, "传递的类型不正确");
|
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | |
| | | |
| | | }
|
| | |
| | | * @throws Exception
|
| | | */
|
| | | public String uploadPicture(MultipartFile file) throws Exception {
|
| | |
|
| | | // 文件解析
|
| | | InputStream inputStream = file.getInputStream();
|
| | | String contentType = file.getContentType();
|
| | |
| | | // 文件路径
|
| | | String filePath = FilePathEnum.brand.getPath() + UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | // 执行上传
|
| | | String fileLink = COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
|
| | |
|
| | | return fileLink;
|
| | | return COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void switchState(Long id) throws BrandInfoException {
|
| | | if (id == null) {
|
| | | throw new BrandInfoException(1, "请传递正确参数");
|
| | | }
|
| | | BrandInfo resultObj = brandInfoMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new BrandInfoException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | BrandInfo updateObj = new BrandInfo();
|
| | | updateObj.setId(id);
|
| | | updateObj.setState(state);
|
| | | brandInfoMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public int deleteBatchByPrimaryKey(List<Long> list) {
|
| | | executor.execute(new Runnable() {
|
| | |
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | resultObj.setState(state);
|
| | | articleOfficialDao.save(resultObj);
|
| | | articleOfficialDao.updateSatate(id, state);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | @Resource |
| | | private DaTaoKeGoodsDetailV2Service daTaoKeGoodsDetailV2Service; |
| | | |
| | | |
| | | @Override |
| | | public void switchState(String id) throws GoodsEvaluateException { |
| | | if (id == null) { |
| | | throw new GoodsEvaluateException(1, "请传递正确参数"); |
| | | } |
| | | |
| | | GoodsEvaluate resultObj = goodsEvaluateDao.getById(id); |
| | | if (resultObj == null) { |
| | | throw new GoodsEvaluateException(1, "此内容已不存在"); |
| | | } |
| | | |
| | | Integer state = resultObj.getState(); |
| | | if (state == null || state == 0) { |
| | | state = 1; |
| | | } else { |
| | | state = 0; |
| | | } |
| | | goodsEvaluateDao.updateSatate(id, state); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String saveHead(MultipartFile file, GoodsEvaluate record) throws GoodsEvaluateException { |
| | | Integer state = record.getState(); |
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void switchState(Long id) throws GoodsClassException {
|
| | | if (id == null) {
|
| | | throw new GoodsClassException(1, "请传递正确参数");
|
| | | }
|
| | | GoodsClass resultObj = goodsClassMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new GoodsClassException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | GoodsClass updateObj = new GoodsClass();
|
| | | updateObj.setId(id);
|
| | | updateObj.setState(state);
|
| | | goodsClassMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | @Cacheable(value = "classCache", key = "'getEffectiveClassCache'")
|
| | | public List<GoodsClass> getEffectiveClassCache() {
|
| | | return goodsClassMapper.getEffectiveClass();
|
| | |
| | | */
|
| | | @Override
|
| | | public int removePicture(GoodsSubClass record) throws Exception {
|
| | |
|
| | | String fileUrl = record.getPicture();
|
| | |
|
| | | int result = -2;
|
| | | boolean deleteFile = true;
|
| | |
|
| | | String fileUrl = record.getPicture();
|
| | | if (StringUtil.isNullOrEmpty(fileUrl)) {
|
| | | return result;
|
| | | }
|
| | |
|
| | | deleteFile = COSManager.getInstance().deleteFile(fileUrl);
|
| | |
|
| | | boolean deleteFile = COSManager.getInstance().deleteFile(fileUrl);;
|
| | | if (deleteFile) {
|
| | | record.setPicture(null);
|
| | | // 更新数据库
|
| | | result = goodsSubClassMapper.updateByPrimaryKey(record);
|
| | | }
|
| | |
|
| | | return result;
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void switchState(Long id) throws GoodsSubClassException {
|
| | | if (id == null) {
|
| | | throw new GoodsSubClassException(1, "请传递正确参数");
|
| | | }
|
| | | GoodsSubClass resultObj = goodsSubClassMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new GoodsSubClassException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | GoodsSubClass updateObj = new GoodsSubClass();
|
| | | updateObj.setId(id);
|
| | | updateObj.setState(state);
|
| | | goodsSubClassMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public List<GoodsSubClass> queryByRootId(Long rootId, Integer state) throws Exception {
|
| | | return goodsSubClassMapper.queryByRootId(rootId, state, null);
|
| | |
| | | import com.yeshi.fanli.entity.bus.help.HelpCenter;
|
| | | import com.yeshi.fanli.entity.bus.help.HelpInfo;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.HomeNavbar;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
|
| | | import com.yeshi.fanli.exception.config.HelpCenterException;
|
| | | import com.yeshi.fanli.exception.homemodule.HomeNavbarException;
|
| | | import com.yeshi.fanli.service.inter.help.HelpCenterService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.AdActivityVersionControlService;
|
| | | import com.yeshi.fanli.util.FilePathEnum;
|
| | |
| | | mongoDBManager.saveHelpInfo(helpInfo);
|
| | | return html;
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void switchState(Long id) throws HelpCenterException {
|
| | | if (id == null) {
|
| | | throw new HelpCenterException(1, "请传递正确参数");
|
| | | }
|
| | | |
| | | HelpCenter resultObj = helpCenterMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new HelpCenterException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | HelpCenter updateObj = new HelpCenter();
|
| | | updateObj.setId(id);
|
| | | updateObj.setState(state);
|
| | | helpCenterMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | |
|
| | | public List<Map<String, Object>> getPosition(String content) {
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.AppVersionInfo;
|
| | | import com.yeshi.fanli.entity.bus.help.HelpClass;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
|
| | | import com.yeshi.fanli.exception.banner.SwiperPictureException;
|
| | | import com.yeshi.fanli.exception.config.HelpClassException;
|
| | | import com.yeshi.fanli.exception.homemodule.FloatADException;
|
| | | import com.yeshi.fanli.service.inter.help.HelpClassService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.AdActivityVersionControlService;
|
| | | import com.yeshi.fanli.util.FilePathEnum;
|
| | |
| | | if (record.getId() == null) {
|
| | | int maxOrder = helpClassMapper.getMaxOrder();
|
| | | record.setSort(maxOrder + 1);
|
| | | record.setPicture(picture);
|
| | | record.setCreateTime(new Date());
|
| | | helpClassMapper.insertSelective(record);
|
| | | } else {
|
| | | // 修改
|
| | | HelpClass resultObj = helpClassMapper.selectByPrimaryKey(record.getId());
|
| | | if (resultObj == null)
|
| | | throw new FloatADException(1, "修改内容已不存在");
|
| | | throw new HelpClassException(1, "修改内容已不存在");
|
| | |
|
| | | if (picture != null && picture.trim().length() > 0) {
|
| | | String pictureOld = resultObj.getPicture();
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public void switchState(Long id) throws HelpClassException {
|
| | | if (id == null) {
|
| | | throw new HelpClassException(1, "请传递正确参数");
|
| | | }
|
| | | |
| | | HelpClass resultObj = helpClassMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new HelpClassException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getShowState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | HelpClass updateObj = new HelpClass();
|
| | | updateObj.setId(id);
|
| | | updateObj.setShowState(state);
|
| | | helpClassMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public int updateShowState(Long id) throws HelpClassException {
|
| | |
|
| | | if (id == null) {
|
| | |
| | | || 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); |
| | | UserLevelEnum levelEnum = UserLevelUtil.getByOrderRank(urank); |
| | | if (levelEnum != null) { |
| | | levelEnum = UserLevelUtil.getShowLevel(levelEnum); |
| | | order.setOrderDesc("订单来源:" + levelEnum.getName()); |
| | | } |
| | | } |
| | | } |
| | |
| | | return hongBaoV2Mapper.listByOrderTradeId(tradeId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public Integer getDirectBossUrankByPid(Long pid) {
|
| | | return hongBaoV2Mapper.getDirectBossUrankByPid(pid);
|
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
| | | */
|
| | | public BrandClass selectByPrimaryKey(Long id);
|
| | |
|
| | | /**
|
| | | * 状态切换
|
| | | * @param id
|
| | | * @throws BrandClassException
|
| | | */
|
| | | public void switchState(Long id) throws BrandClassException;
|
| | |
|
| | |
|
| | | }
|
| | |
| | | */
|
| | | public BrandInfoVO listByAlikeName(String key,String platform,String version);
|
| | |
|
| | |
|
| | | /**
|
| | | * 状态切换
|
| | | * @param id
|
| | | * @throws BrandInfoException
|
| | | */
|
| | | public void switchState(Long id) throws BrandInfoException;
|
| | |
|
| | | }
|
| | |
| | | */ |
| | | public void offlineTaoBaoGoods(Long goodsId); |
| | | |
| | | /** |
| | | * 状态切换 |
| | | * @param id |
| | | * @throws GoodsEvaluateException |
| | | */ |
| | | public void switchState(String id) throws GoodsEvaluateException; |
| | | |
| | | } |
| | |
| | | public void updateOrder(Long id, Integer moveType) throws GoodsClassException;
|
| | |
|
| | |
|
| | | /**
|
| | | * 状态切换
|
| | | * @param id
|
| | | * @throws GoodsClassException
|
| | | */
|
| | | public void switchState(Long id) throws GoodsClassException;
|
| | |
|
| | |
|
| | | }
|
| | |
| | | public void saveObject(MultipartFile file,MultipartFile file2, GoodsSubClass record, Integer type, Long pid,Long labelId)
|
| | | throws GoodsSubClassException, Exception;
|
| | |
|
| | | /**
|
| | | * 状态切换
|
| | | * @param id
|
| | | * @throws GoodsSubClassException
|
| | | */
|
| | | public void switchState(Long id) throws GoodsSubClassException;
|
| | |
|
| | | }
|
| | |
| | | public void setVersions(Long id, List<Long> versions) throws HelpCenterException;
|
| | |
|
| | |
|
| | | /**
|
| | | * 状态切换
|
| | | * @param id
|
| | | * @throws HelpCenterException
|
| | | */
|
| | | public void switchState(Long id) throws HelpCenterException;
|
| | |
|
| | | |
| | | }
|
| | |
| | | */
|
| | | public void setVersions(Long id, List<Long> versions) throws HelpClassException;
|
| | |
|
| | | /**
|
| | | * 状态切换
|
| | | * @param id
|
| | | * @throws HelpClassException
|
| | | */
|
| | | public void switchState(Long id) throws HelpClassException;
|
| | |
|
| | |
|
| | | }
|
| | |
| | | * @return
|
| | | */
|
| | | public List<HongBaoDTO> listByOrderTradeId(String tradeId);
|
| | |
|
| | | /**
|
| | | * 查询直接上级当时获得红包等级
|
| | | * @param pid
|
| | | * @return
|
| | | */
|
| | | public Integer getDirectBossUrankByPid(Long pid);
|
| | | }
|
| | |
| | |
|
| | | public class UserLevelUtil {
|
| | |
|
| | | public static String getLevelName(int orderRank) {
|
| | | if (orderRank == UserLevelEnum.daRen.getOrderRank()) {
|
| | | return UserLevelEnum.daRen.getName();
|
| | | }
|
| | |
|
| | | if (orderRank == UserLevelEnum.highVIP.getOrderRank()) {
|
| | | return UserLevelEnum.highVIP.getName();
|
| | | }
|
| | |
|
| | | if (orderRank == UserLevelEnum.superVIP.getOrderRank()) {
|
| | | return UserLevelEnum.superVIP.getName();
|
| | | }
|
| | |
|
| | | if (orderRank == UserLevelEnum.tearcher.getOrderRank()) {
|
| | | return UserLevelEnum.tearcher.getName();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 根据枚举名称匹配
|
| | |
| | | if (level == null)
|
| | | return null;
|
| | |
|
| | | if (level == UserLevelEnum.daRen) {
|
| | | if (level == UserLevelEnum.daRen || level == UserLevelEnum.normalVIP) {
|
| | | return UserLevelEnum.highVIP;
|
| | | } else if (level == UserLevelEnum.highVIP) {
|
| | | return UserLevelEnum.superVIP;
|
| | |
| | | public static UserLevelEnum getPrevLevel(UserLevelEnum level) {
|
| | | if (level == null)
|
| | | return null;
|
| | | if (level == UserLevelEnum.daRen) {
|
| | | if (level == UserLevelEnum.daRen || level == UserLevelEnum.normalVIP) {
|
| | | return null;
|
| | | } else if (level == UserLevelEnum.highVIP) {
|
| | | return UserLevelEnum.daRen;
|
| | |
| | | */
|
| | |
|
| | | public static UserLevelEnum getOldLevel(UserLevelEnum userLevel) {
|
| | | if (userLevel == null || userLevel == UserLevelEnum.highVIP) {
|
| | | if (userLevel == null || userLevel == UserLevelEnum.normalVIP || userLevel == UserLevelEnum.highVIP) {
|
| | | return UserLevelEnum.daRen;
|
| | | } else if (userLevel == UserLevelEnum.tearcher)
|
| | | return UserLevelEnum.superVIP;
|