yujian
2020-04-24 f276a5a1fc38e735499aa95089ff8105bd2ba196
状态切换
33个文件已修改
594 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/AppPageNotificationAdminController.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/BrandShopAdminController.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsClassAdminCotroller.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsSubClassAdminController.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/HelpCenterAdminController.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserOrderControllerV2.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/dynamic/ArticleOfficialDao.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/dynamic/GoodsEvaluateDao.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2Mapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/clazz/GoodsSubClass.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/GoodsSubClassMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2Mapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/ArticleOfficialServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsClassServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsSubClassServiceImpl.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/help/HelpCenterServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/help/HelpClassServiceImpl.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/HongBaoV2ServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/brand/BrandClassService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/brand/BrandInfoService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/dynamic/GoodsEvaluateService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/GoodsClassService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/GoodsSubClassService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/help/HelpCenterService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/help/HelpClassService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/HongBaoV2Service.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/user/UserLevelUtil.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/AppPageNotificationAdminController.java
@@ -20,13 +20,11 @@
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;
@@ -131,13 +129,12 @@
    @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;
@@ -183,7 +180,7 @@
                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());
@@ -233,7 +230,6 @@
            for (AppPageNotification notification: list) {
                AppPageNotificationTypeEnum type = notification.getType();
                notification.setPageName(type.getDesc());
                
                Date startTime = notification.getBeginTime();
                if (startTime == null) {
@@ -318,15 +314,15 @@
     * @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;
@@ -357,7 +353,6 @@
            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();
@@ -370,16 +365,15 @@
     * @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;
@@ -396,11 +390,7 @@
            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();
fanli/src/main/java/com/yeshi/fanli/controller/admin/BrandShopAdminController.java
@@ -103,7 +103,6 @@
    @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;
        }
@@ -131,11 +130,28 @@
            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();
        }
    }
@@ -149,7 +165,6 @@
     */
    @RequestMapping(value = "delete")
    public void delete(String callback, String idArray, PrintWriter out) {
        try {
            if (StringUtil.isNullOrEmpty(idArray)) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
@@ -464,6 +479,25 @@
    
    
    /**
     * 修改状态
     * @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
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsClassAdminCotroller.java
@@ -16,7 +16,6 @@
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;
@@ -108,13 +107,34 @@
            }
            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();
        }
    }
    /**
     * 修改排序
@@ -145,9 +165,7 @@
     */
    @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());
@@ -170,12 +188,10 @@
                }
                JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("删除成功"));
            }
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
        }
    }
    /**
@@ -188,7 +204,6 @@
     */
    @RequestMapping(value = "removePicture")
    public void removePicture(String callback, Long id, PrintWriter out) {
        try {
            GoodsClass goodsClass = goodsClassService.getGoodsClass(id);
@@ -226,14 +241,9 @@
    @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));
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java
@@ -82,6 +82,25 @@
    
    
    /**
     * 修改状态
     * @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
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsSubClassAdminController.java
@@ -20,7 +20,7 @@
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;
@@ -68,10 +68,30 @@
            }
            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();
        }
    }
@@ -85,9 +105,7 @@
     */
    @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());
@@ -99,7 +117,6 @@
                goodsSubClassService.deleteByPrimaryKeyBatch(recordIds);
                out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult("删除成功")));
            }
        } catch (Exception e) {
            out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
            e.printStackTrace();
@@ -116,7 +133,6 @@
     */
    @RequestMapping(value = "removePicture")
    public void removePicture(String callback, Long id, PrintWriter out) {
        try {
            GoodsSubClass goodsSubClass = goodsSubClassService.selectByPrimaryKey(id);
@@ -134,12 +150,10 @@
            } else {
                out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("图片删除成功,数据更新失败")));
            }
        } catch (Exception e) {
            e.printStackTrace();
            out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
        }
    }
    /**
@@ -151,9 +165,7 @@
     */
    @RequestMapping(value = "querySub")
    public void querySub(String callback, Long pid, Integer type, PrintWriter out) {
        try {
            if (pid == null) {
                out.print(JsonUtil.loadFalseResult("上级id为空"));
                return;
@@ -232,7 +244,6 @@
            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("操作异常")));
@@ -247,7 +258,6 @@
     */
    @RequestMapping(value = "queryOverSecond")
    public void queryOverSecond(String callback, Long pid, PrintWriter out) {
        try {
            Integer state = null;
            List<GoodsSubClass> goodsSubClassList = goodsSubClassService.queryByPid(pid, state);
@@ -264,7 +274,6 @@
            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("操作异常")));
@@ -281,7 +290,6 @@
    @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;
@@ -317,9 +325,7 @@
            resultObj.setUpdatetime(new Date());
            goodsSubClassService.updateByPrimaryKeySelective(resultObj);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
        } catch (Exception e) {
            e.printStackTrace();
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
fanli/src/main/java/com/yeshi/fanli/controller/admin/HelpCenterAdminController.java
@@ -25,7 +25,6 @@
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;
@@ -82,6 +81,26 @@
            }
        }
    }
    /**
     * 修改状态
     * @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) {
@@ -349,7 +368,7 @@
                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("保存失败"));
@@ -357,6 +376,25 @@
        }
    }
    /**
     * 修改状态
     * @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();
        }
    }
    /**
     * 修改排序
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -459,7 +459,7 @@
            if(level == null) {
                level = UserLevelEnum.daRen;
            }
            level = UserLevelUtil.getShowLevel(level);
            
            JSONObject object = new JSONObject();
            object.put("workerId", workerId);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserOrderControllerV2.java
@@ -18,6 +18,7 @@
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;
@@ -39,6 +40,7 @@
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;
@@ -96,6 +98,9 @@
    @Resource
    private UserVIPInfoService userVIPInfoService;
    @Resource
    private HongBaoV2Service hongBaoV2Service;
    @Resource
    private HongBaoOrderService hongBaoOrderService;
@@ -565,15 +570,23 @@
            }
        }
        
        // 红包获得者
        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<>();
@@ -602,6 +615,7 @@
            // 基础佣金
            BigDecimal commission = orderHongBaoMoneyComputeService.computeBaseFanliMoney(commonOrder);
            goodsVO.setCommision("¥" +commission.setScale(2, BigDecimal.ROUND_DOWN));
            // 平台补贴  = 返利 - 基础佣金
            goodsVO.setSubsidy("¥" + fanli.subtract(commission).setScale(2, BigDecimal.ROUND_DOWN));
            //  达人补贴
@@ -621,13 +635,28 @@
            } 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);
fanli/src/main/java/com/yeshi/fanli/dao/dynamic/ArticleOfficialDao.java
@@ -10,6 +10,7 @@
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;
@@ -35,6 +36,18 @@
    }
    /**
     * 状态切换
     *
     * @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查询数据
     * 
     * @param id
fanli/src/main/java/com/yeshi/fanli/dao/dynamic/GoodsEvaluateDao.java
@@ -10,10 +10,9 @@
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;
@@ -37,6 +36,21 @@
    
    /**
     * 状态切换
     *
     * @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
     */
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2Mapper.java
@@ -256,4 +256,12 @@
     */
    List<HongBaoDTO> listByOrderTradeId(@Param("tradeId") String tradeId);
    /**
     * 查询直接上级当时获得红包等级
     * @param pid
     * @return
     */
    Integer getDirectBossUrankByPid(@Param("pid")Long pid);
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/clazz/GoodsSubClass.java
@@ -59,10 +59,10 @@
    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;
fanli/src/main/java/com/yeshi/fanli/mapping/GoodsSubClassMapper.xml
@@ -145,7 +145,7 @@
            <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>
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2Mapper.xml
@@ -467,6 +467,11 @@
        #{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}
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassServiceImpl.java
@@ -81,6 +81,31 @@
    
    
    @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, "传递的类型不正确");
@@ -140,4 +165,7 @@
    }
    
    
}
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java
@@ -202,7 +202,6 @@
     * @throws Exception
     */
    public String uploadPicture(MultipartFile file) throws Exception {
        // 文件解析
        InputStream inputStream = file.getInputStream();
        String contentType = file.getContentType();
@@ -211,11 +210,34 @@
        // 文件路径
        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() {
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/ArticleOfficialServiceImpl.java
@@ -185,8 +185,7 @@
        } else {
            state = 0;
        }
        resultObj.setState(state);
        articleOfficialDao.save(resultObj);
        articleOfficialDao.updateSatate(id, state);
    }
    
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -111,6 +111,28 @@
    @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();
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsClassServiceImpl.java
@@ -314,6 +314,30 @@
    }
    @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();
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsSubClassServiceImpl.java
@@ -316,27 +316,46 @@
     */
    @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);
fanli/src/main/java/com/yeshi/fanli/service/impl/help/HelpCenterServiceImpl.java
@@ -21,8 +21,10 @@
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;
@@ -129,6 +131,32 @@
        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) {
        List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>();
fanli/src/main/java/com/yeshi/fanli/service/impl/help/HelpClassServiceImpl.java
@@ -21,12 +21,8 @@
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;
@@ -95,13 +91,14 @@
        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();
@@ -122,6 +119,31 @@
    
    
    @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) {
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -1867,9 +1867,10 @@
                    || 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());
                    }
                }
            }
fanli/src/main/java/com/yeshi/fanli/service/impl/order/HongBaoV2ServiceImpl.java
@@ -1168,4 +1168,10 @@
        return hongBaoV2Mapper.listByOrderTradeId(tradeId);
    }
    @Override
    public Integer getDirectBossUrankByPid(Long pid) {
        return hongBaoV2Mapper.getDirectBossUrankByPid(pid);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/inter/brand/BrandClassService.java
@@ -68,5 +68,12 @@
     */
    public BrandClass selectByPrimaryKey(Long id);
    /**
     * 状态切换
     * @param id
     * @throws BrandClassException
     */
    public void switchState(Long id) throws BrandClassException;
    
}
fanli/src/main/java/com/yeshi/fanli/service/inter/brand/BrandInfoService.java
@@ -139,4 +139,12 @@
     */
    public BrandInfoVO listByAlikeName(String key,String platform,String version);
    /**
     * 状态切换
     * @param id
     * @throws BrandInfoException
     */
    public void switchState(Long id) throws BrandInfoException;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/dynamic/GoodsEvaluateService.java
@@ -173,4 +173,11 @@
     */
    public void offlineTaoBaoGoods(Long goodsId);
    /**
     * 状态切换
     * @param id
     * @throws GoodsEvaluateException
     */
    public void switchState(String id) throws GoodsEvaluateException;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/GoodsClassService.java
@@ -101,4 +101,12 @@
    public void updateOrder(Long id, Integer moveType) throws GoodsClassException;
    /**
     * 状态切换
     * @param id
     * @throws GoodsClassException
     */
    public void switchState(Long id) throws GoodsClassException;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/GoodsSubClassService.java
@@ -126,4 +126,11 @@
    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;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/help/HelpCenterService.java
@@ -113,4 +113,12 @@
    public void setVersions(Long id, List<Long> versions) throws HelpCenterException;
    
    /**
     * 状态切换
     * @param id
     * @throws HelpCenterException
     */
    public void switchState(Long id) throws HelpCenterException;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/help/HelpClassService.java
@@ -98,5 +98,12 @@
     */
    public void setVersions(Long id, List<Long> versions) throws HelpClassException;
    /**
     * 状态切换
     * @param id
     * @throws HelpClassException
     */
    public void switchState(Long id) throws HelpClassException;
    
}
fanli/src/main/java/com/yeshi/fanli/service/inter/order/HongBaoV2Service.java
@@ -189,4 +189,11 @@
     * @return
     */
    public List<HongBaoDTO> listByOrderTradeId(String tradeId);
    /**
     * 查询直接上级当时获得红包等级
     * @param pid
     * @return
     */
    public Integer getDirectBossUrankByPid(Long pid);
}
fanli/src/main/java/com/yeshi/fanli/util/user/UserLevelUtil.java
@@ -4,24 +4,6 @@
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;
    }
    /**
     * 根据枚举名称匹配
@@ -88,7 +70,7 @@
        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;
@@ -111,7 +93,7 @@
    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;
@@ -132,7 +114,7 @@
     */
    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;