admin
2020-04-24 51c0049fb70c85bf515dc0fecd96bf13ca23aa28
Merge remote-tracking branch 'origin/div' into div
52个文件已修改
1037 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/AppPageNotificationAdminController.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/ArticleOfficialAdminController.java 23 ●●●●● 补丁 | 查看 | 原始文档 | 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/admin/UserInfoAdminController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SpecialLabelAdminController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SwiperBannerAdminController.java 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsAdminController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/shop/BanLiShopGoodsSetAdminController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | 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/mapping/shop/BanLiShopGoodsMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | 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 20 ●●●●● 补丁 | 查看 | 原始文档 | 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/homemodule/SpecialLabelImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperBannerServiceImpl.java 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java 27 ●●●●● 补丁 | 查看 | 原始文档 | 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/impl/shop/BanLiShopGoodsServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | 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/ArticleOfficialService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | 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/homemodule/SpecialLabelService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SwiperBannerService.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SwiperPictureService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/HongBaoV2Service.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/shop/BanLiShopGoodsService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/shop/BanLiShopGoodsSetService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | 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/ArticleOfficialAdminController.java
@@ -26,7 +26,7 @@
import net.sf.json.JSONObject;
/**
 * 轮播图管理
 * 学院管理
 * 
 * @author Administrator
 *
@@ -62,6 +62,27 @@
            e.printStackTrace();
        }
    }
    /**
     * 修改状态
     * @param callback
     * @param id
     * @param out
     */
    @RequestMapping(value = "switchState")
    public void switchState(String callback, String id, PrintWriter out) {
        try {
            articleOfficialService.switchState(id);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
        } catch (ArticleOfficialException 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/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;
@@ -83,6 +82,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/admin/UserInfoAdminController.java
@@ -55,7 +55,6 @@
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.invite.UserInviteValidRecordService;
import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
import com.yeshi.fanli.tag.PageEntity;
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SpecialLabelAdminController.java
@@ -51,6 +51,26 @@
        }
    }
    /**
     * 修改状态
     * @param callback
     * @param id
     * @param out
     */
    @RequestMapping(value = "switchState")
    public void switchState(String callback, Long id, PrintWriter out) {
        try {
            specialLabelService.switchState(id);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
        } catch (SpecialLabelException 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/admin/homemodule/SwiperBannerAdminController.java
@@ -5,7 +5,6 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -22,8 +21,8 @@
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.entity.AppVersionInfo;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
import com.yeshi.fanli.entity.bus.homemodule.SwiperBanner;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.common.JumpDetailV2;
@@ -89,16 +88,18 @@
            String card = swiperBanner.getCard();
            if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(card)) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("说明与标识不能为空"));
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("名称与标识不能为空"));
                return;
            }
            swiperBanner.setState(1);// 默认停用
            if (swiperBanner.getState() == null) {
                swiperBanner.setState(1);// 默认停用
            }
            Date nowTime = new Date();
            swiperBanner.setCreatetime(nowTime);
            swiperBanner.setUpdatetime(nowTime);
            swiperBannerService.insert(swiperBanner);
            swiperBannerService.insertSelective(swiperBanner);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("添加成功"));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
@@ -116,7 +117,6 @@
    @RequestMapping(value = "saveModify")
    public void saveModify(String callback, SwiperBanner swiperBanner, PrintWriter out) {
        try {
            Long id = swiperBanner.getId();
            if (id == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
@@ -136,6 +136,10 @@
                return;
            }
            if (swiperBanner.getState() == null) {
                swiperBanner.setState(1);// 默认停用
            }
            if (StringUtil.isNullOrEmpty(title)) {
                swiperBanner.setTitle(null);
            }
@@ -143,59 +147,34 @@
            if (StringUtil.isNullOrEmpty(card)) {
                swiperBanner.setCard(null);
            }
            swiperBanner.setUpdatetime(new Date());
            swiperBannerService.updateByPrimaryKeySelective(swiperBanner);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("修改成功"));
        } catch (SwiperBannerException e) {
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
        }
    }
    /**
     * 修该状态
     *
     * 修改状态
     * @param callback
     * @param id
     * @param out
     */
    @RequestMapping(value = "updateState")
    public void updateState(String callback, Long id, PrintWriter out) {
    @RequestMapping(value = "switchState")
    public void switchState(String callback, Long id, PrintWriter out) {
        try {
            if (id == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
                return;
            }
            SwiperBanner resultObj = swiperBannerService.selectByPrimaryKey(id);
            if (resultObj == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
                return;
            }
            Integer state = resultObj.getState();
            if (state == null || state.equals(1) || state == 1) {
                resultObj.setState(0);
            } else {
                resultObj.setState(1);
            }
            swiperBannerService.updateByPrimaryKeySelective(resultObj);
            JSONObject data = new JSONObject();
            data.put("state", resultObj.getState());
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
            swiperBannerService.switchState(id);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
        } catch (SwiperBannerException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
            e.printStackTrace();
        }
    }
    /**
     * 查询
@@ -211,7 +190,6 @@
     */
    @RequestMapping(value = "query")
    public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer sort, PrintWriter out) {
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
        }
@@ -219,23 +197,24 @@
        if (pageSize == null || pageSize < 1) {
            pageSize = Constant.PAGE_SIZE;
        }
        try {
            List<SwiperBanner> list = swiperBannerService.query((pageIndex - 1) * pageSize, pageSize, key, sort);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
            for (SwiperBanner swiperBanne : list) {
                if (swiperBanne.getState() != null && swiperBanne.getState() == 0) {
                    swiperBanne.setState(1);
                } else {
                    swiperBanne.setState(0);
                }
                long TotalPic = swiperPictureService.countQueryByBannerID(swiperBanne.getId());
                swiperBanne.setTotalPic(TotalPic);
            }
            long count = swiperBannerService.countQuery(key);
            int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
            PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
@@ -246,14 +225,11 @@
            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();
        }
    }
    /**
@@ -265,7 +241,6 @@
     */
    @RequestMapping(value = "delete")
    public void delete(String callback, String idArray, PrintWriter out) {
        try {
            if (StringUtil.isNullOrEmpty(idArray)) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
@@ -280,11 +255,8 @@
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
                return;
            }
            int count = swiperBannerService.deleteBatchByPrimaryKey(list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("成功删除[" + count + "]条数据"));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
            e.printStackTrace();
@@ -295,7 +267,6 @@
    public void getEffectiveOption(String callback, PrintWriter out) {
        try {
            List<Object> list = new ArrayList<Object>();
            Map<String, Object> mapDefalut = new HashMap<String, Object>();
            mapDefalut.put("key", 0);
            mapDefalut.put("value", "--未选择--");
@@ -314,7 +285,6 @@
            JSONObject data = new JSONObject();
            data.put("result_list", list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
            e.printStackTrace();
@@ -333,22 +303,16 @@
    @RequestMapping(value = "queryPicInfo")
    public void queryPicInfo(String callback, Integer pageIndex, Integer pageSize, Long bannerId, String version,
            String platform, PrintWriter out) {
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
        }
        if (pageSize == null || pageSize < 1) {
            pageSize = Constant.PAGE_SIZE;
        }
        pageSize = 100;
        if (bannerId == null) {
            out.print(JsonUtil.loadFalseResult("轮播图管理ID不能为空"));
            return;
        }
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
        }
        if (pageSize == null || pageSize < 1) {
            pageSize = 100;
        }
        List<AppVersionInfo> versionList = null;
        if (!StringUtil.isNullOrEmpty(version) || !StringUtil.isNullOrEmpty(platform)) {
            versionList = new ArrayList<>();
@@ -365,19 +329,23 @@
        }
        try {
            List<SwiperPicture> list = swiperPictureService.queryByBannerID((pageIndex - 1) * pageSize, pageSize,
                    bannerId);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
            // 跳转链接
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
            for (SwiperPicture swiperPicture : list) {
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
                if (swiperPicture.getState() != null && swiperPicture.getState() == 0) {
                    swiperPicture.setState(1);
                } else {
                    swiperPicture.setState(0);
                }
                Date startTime = swiperPicture.getStartTime();
                if (startTime == null) {
                    swiperPicture.setStartTime_str("");
@@ -413,7 +381,6 @@
            }
            long count = swiperPictureService.countQueryByBannerID(bannerId);
            // 过滤
            if (versionList != null) {
                if (versionList.size() > 0) {
@@ -449,9 +416,7 @@
            JSONObject data = new JSONObject();
            data.put("pe", pe);
            data.put("result_list", gson.toJson(list));
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (SwiperPictureException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
@@ -487,6 +452,27 @@
        }
    }
    /**
     * 修改状态
     * @param callback
     * @param id
     * @param out
     */
    @RequestMapping(value = "switchStatePic")
    public void switchStatePic(String callback, Long id, PrintWriter out) {
        try {
            swiperPictureService.switchState(id);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
        } catch (SwiperPictureException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作失败"));
            e.printStackTrace();
        }
    }
    /**
     * 删除图片以及信息
     * 
@@ -496,7 +482,6 @@
     */
    @RequestMapping(value = "deletePicInfo")
    public void deletePicInfo(String callback, String idArray, PrintWriter out) {
        try {
            if (StringUtil.isNullOrEmpty(idArray)) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
@@ -513,9 +498,7 @@
            }
            int count = swiperPictureService.deleteBatchByPrimaryKey(list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("成功删除[" + count + "]条数据"));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
            e.printStackTrace();
@@ -531,7 +514,6 @@
     */
    @RequestMapping(value = "saveOrder")
    public void saveOrder(String callback, Long id, Integer moveType, PrintWriter out) {
        if (moveType == null || (!moveType.equals(1) && !moveType.equals(-1))) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("传递的类型不正确"));
            return;
@@ -543,7 +525,6 @@
        }
        try {
            SwiperPicture resultObj = swiperPictureService.selectByPrimaryKey(id);
            if (resultObj == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
@@ -558,21 +539,16 @@
                SwiperPicture changeObj = list.get(0);
                // 交换排序序号
                resultObj.setOrder(changeObj.getOrder());
                changeObj.setOrder(oldOrder);
                swiperPictureService.updateByPrimaryKeySelective(changeObj);
            }
            swiperPictureService.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/shop/BanLiShopGoodsAdminController.java
@@ -93,7 +93,6 @@
                    shopGoods.setGoodsClass(banLiShopGoodsClassService.selectByPrimaryKey(goodsClass.getId()));
                }
            }
            long count = banLiShopGoodsService.countGoods(key, state);
@@ -144,4 +143,25 @@
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("删除失败"));
        }
    }
    /**
     * 修改状态
     * @param callback
     * @param id
     * @param out
     */
    @RequestMapping(value = "switchState")
    public void switchState(String callback, Long id, PrintWriter out) {
        try {
            banLiShopGoodsService.switchState(id);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
        } catch (BanLiShopGoodsException 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/admin/shop/BanLiShopGoodsSetAdminController.java
@@ -51,6 +51,25 @@
        }
    }
    
    /**
     * 修改状态
     * @param callback
     * @param id
     * @param out
     */
    @RequestMapping(value = "switchState")
    public void switchState(String callback, Long id, PrintWriter out) {
        try {
            banLiShopGoodsSetService.switchState(id);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
        } catch (BanLiShopGoodsSetException 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/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;
@@ -97,6 +99,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;
@@ -33,6 +34,18 @@
        }
        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查询数据
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/mapping/shop/BanLiShopGoodsMapper.xml
@@ -109,7 +109,7 @@
            <if test="state != null">#{state,jdbcType=INTEGER},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
            <if test="weight != null">#{weight,jdbcType=INTEGER}</if>
            <if test="weight != null">#{weight,jdbcType=INTEGER},</if>
            <if test="squarePicture != null">#{squarePicture,jdbcType=VARCHAR}</if>
        </trim>
    </insert>
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
@@ -169,6 +169,26 @@
    
    
    @Override
    public void switchState(String id) throws ArticleOfficialException {
        if (StringUtil.isNullOrEmpty(id)) {
            throw new ArticleOfficialException(1, "请传递正确参数");
        }
        ArticleOfficial resultObj = articleOfficialDao.getById(id);
        if (resultObj == null) {
            throw new ArticleOfficialException(1, "此内容已不存在");
        }
        Integer state = resultObj.getState();
        if (state == null || state == 0) {
            state = 1;
        } else {
            state = 0;
        }
        articleOfficialDao.updateSatate(id, state);
    }
    @Override
    public ArticleOfficial getById(String id) {
        return articleOfficialDao.getById(id);
    }
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;
@@ -128,6 +130,32 @@
        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) {
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/homemodule/SpecialLabelImpl.java
@@ -55,6 +55,30 @@
        }
    }
    
    @Override
    public void switchState(Long id) throws SpecialLabelException {
        if (id == null) {
            throw new SpecialLabelException(1, "请传递正确参数");
        }
        SpecialLabel resultObj = specialLabelMapper.selectByPrimaryKey(id);
        if (resultObj == null) {
            throw new SpecialLabelException(1, "此内容已不存在");
        }
        Integer state = resultObj.getState();
        if (state == null || state == 0) {
            state = 1;
        } else {
            state = 0;
        }
        SpecialLabel updateObj = new SpecialLabel();
        updateObj.setId(id);
        updateObj.setState(state);
        specialLabelMapper.updateByPrimaryKeySelective(updateObj);
    }
    @Override
    public int deleteByPrimaryKeyBatch(List<Long> list){
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperBannerServiceImpl.java
@@ -48,7 +48,7 @@
    }
    @Override
    public int updateByPrimaryKeySelective(SwiperBanner record) throws SwiperBannerException{
    public int updateByPrimaryKeySelective(SwiperBanner record){
        return swiperBannerMapper.updateByPrimaryKeySelective(record);
    }
@@ -58,21 +58,44 @@
    }
    @Override
    public List<SwiperBanner> query(long start, int count, String key, Integer sort) throws SwiperBannerException{
    public List<SwiperBanner> query(long start, int count, String key, Integer sort){
        return swiperBannerMapper.query(start, count, key, sort);
    }
    @Override
    public long countQuery(String key) throws SwiperBannerException{
    public long countQuery(String key) {
        return swiperBannerMapper.countQuery(key);
    }
    @Override
    public void switchState(Long id) throws SwiperBannerException {
        if (id == null) {
            throw new SwiperBannerException(1, "请传递正确参数");
        }
        SwiperBanner resultObj = swiperBannerMapper.selectByPrimaryKey(id);
        if (resultObj == null) {
            throw new SwiperBannerException(1, "此内容已不存在");
        }
        Integer state = resultObj.getState();
        if (state == null || state == 0) {
            state = 1;
        } else {
            state = 0;
        }
        SwiperBanner updateObj = new SwiperBanner();
        updateObj.setId(id);
        updateObj.setState(state);
        swiperBannerMapper.updateByPrimaryKeySelective(updateObj);
    }
    @Override
    @Transactional(rollbackFor=Exception.class)
    public int deleteBatchByPrimaryKey(List<Long> list) throws Exception {
        List<Long> listPicID = new ArrayList<Long>();
        List<SwiperPicture> listPic = swiperPictureService.queryByListBannerID(list);
        for (SwiperPicture swiperPicture: listPic) {
            String src = swiperPicture.getSrc();
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java
@@ -214,11 +214,36 @@
            COSManager.getInstance().deleteFile(picture);
        }
    }
    @Override
    public void switchState(Long id) throws SwiperPictureException {
        if (id == null) {
            throw new SwiperPictureException(1, "请传递正确参数");
        }
        SwiperPicture resultObj = swiperPictureMapper.selectByPrimaryKey(id);
        if (resultObj == null) {
            throw new SwiperPictureException(1, "此内容已不存在");
        }
        Integer state = resultObj.getState();
        if (state == null || state == 0) {
            state = 1;
        } else {
            state = 0;
        }
        SwiperPicture updateObj = new SwiperPicture();
        updateObj.setId(id);
        updateObj.setState(state);
        updateObj.setJumpNeedLogin(resultObj.isJumpNeedLogin());
        swiperPictureMapper.updateByPrimaryKeySelective(updateObj);
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int deleteBatchByPrimaryKey(List<Long> list) throws SwiperPictureException {
        List<SwiperPicture> listSwiper = swiperPictureMapper.queryByListPrimaryKey(list);
        for (SwiperPicture swiperPicture : listSwiper) {
            String src = swiperPicture.getSrc();
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/impl/shop/BanLiShopGoodsServiceImpl.java
@@ -186,6 +186,31 @@
        }
    }
    
    @Override
    public void switchState(Long id) throws BanLiShopGoodsException {
        if (id == null) {
            throw new BanLiShopGoodsException(1, "请传递正确参数");
        }
        BanLiShopGoods resultObj = banLiShopGoodsMapper.selectByPrimaryKey(id);
        if (resultObj == null) {
            throw new BanLiShopGoodsException(1, "此内容已不存在");
        }
        Integer state = resultObj.getState();
        if (state == null || state == 0) {
            state = 1;
        } else {
            state = 0;
        }
        BanLiShopGoods updateObj = new BanLiShopGoods();
        updateObj.setId(id);
        updateObj.setState(state);
        banLiShopGoodsMapper.updateByPrimaryKeySelective(updateObj);
    }
    /**
     * 上传图片
@@ -236,6 +261,9 @@
                deleteByPrimaryKey(id);
    }
    @Transactional
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopGoodsSetServiceImpl.java
@@ -136,7 +136,29 @@
    }
    
    @Override
    public void switchState(Long id) throws BanLiShopGoodsSetException {
        if (id == null) {
            throw new BanLiShopGoodsSetException(1, "请传递正确参数");
        }
        BanLiShopGoodsSets resultObj = banLiShopGoodsSetsMapper.selectByPrimaryKey(id);
        if (resultObj == null) {
            throw new BanLiShopGoodsSetException(1, "此内容已不存在");
        }
        Integer state = resultObj.getState();
        if (state == null || state == 0) {
            state = 1;
        } else {
            state = 0;
        }
        BanLiShopGoodsSets updateObj = new BanLiShopGoodsSets();
        updateObj.setId(id);
        updateObj.setState(state);
        banLiShopGoodsSetsMapper.updateByPrimaryKeySelective(updateObj);
    }
    @Override
    public void updateSelectiveByPrimaryKey(BanLiShopGoodsSets set) {
        if (set.getId() == null)
fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java
@@ -347,6 +347,7 @@
        info.setId(userInfo.getId());
        info.setState(UserVIPInfo.STATE_INVALID);
        info.setUpdateTime(new Date());
        info.setBeiZhu(reason);
        userVIPInfoMapper.updateByPrimaryKeySelective(info);
        // 消息
        userAccountMsgNotificationService.vipUpgradeFail(uid, reason);
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/ArticleOfficialService.java
@@ -51,4 +51,11 @@
    public void updateReadNum(String id);
    /**
     * 状态切换
     * @param id
     * @throws ArticleOfficialException
     */
    public void switchState(String id) throws ArticleOfficialException;
}
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/homemodule/SpecialLabelService.java
@@ -43,5 +43,13 @@
     */
    public void stickLabelOnSpecial(List<Long> idList, List<Long> labIdList);
    /**
     * 状态切换
     * @param id
     * @throws SpecialLabelException
     */
    public void switchState(Long id) throws SpecialLabelException;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SwiperBannerService.java
@@ -17,13 +17,13 @@
    public SwiperBanner selectByPrimaryKey(Long id);
    public int updateByPrimaryKeySelective(SwiperBanner record) throws SwiperBannerException;
    public int updateByPrimaryKeySelective(SwiperBanner record);
    public int updateByPrimaryKey(SwiperBanner record) throws SwiperBannerException;
    public int updateByPrimaryKey(SwiperBanner record);
    
    public List<SwiperBanner> query(long start, int count, String key, Integer sort) throws SwiperBannerException;
    public List<SwiperBanner> query(long start, int count, String key, Integer sort);
    
    public long countQuery(String key) throws SwiperBannerException;
    public long countQuery(String key);
    
    public int deleteBatchByPrimaryKey(List<Long> list) throws Exception;
@@ -33,5 +33,12 @@
     * @throws SwiperBannerException
     */
    public List<SwiperBanner> getEffectiveOption();
    /**
     * 状态切换
     * @param id
     * @throws SwiperBannerException
     */
    public void switchState(Long id) throws SwiperBannerException;
    
}
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SwiperPictureService.java
@@ -136,4 +136,12 @@
     */
    public void setVersions(Long id, List<Long> versions) throws SwiperPictureException;
    /**
     * 状态切换
     * @param id
     * @throws SwiperPictureException
     */
    public void switchState(Long id) throws SwiperPictureException;
}
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/service/inter/shop/BanLiShopGoodsService.java
@@ -98,6 +98,14 @@
     */
    public void saveObject(MultipartFile file, MultipartFile file2, BanLiShopGoods record)
            throws BanLiShopGoodsException, Exception;
    /**
     * 状态切换
     * @param id
     * @throws BanLiShopGoodsSetException
     */
    public void switchState(Long id) throws BanLiShopGoodsException;
    
}
fanli/src/main/java/com/yeshi/fanli/service/inter/shop/BanLiShopGoodsSetService.java
@@ -91,4 +91,12 @@
     */
    public void saveObject(BanLiShopGoodsSets record) throws BanLiShopGoodsSetException;
    /**
     * 状态切换
     * @param id
     * @throws BanLiShopGoodsSetException
     */
    public void switchState(Long id) throws BanLiShopGoodsSetException;
}
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;