admin
2019-06-11 0fbe4163e855c1537d6f0040b12fa1501a499de0
Merge remote-tracking branch 'origin/master'
14个文件已添加
41个文件已修改
2173 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/aspect/SignValidateAspect.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/SearchController.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/SystemClientController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserAccountController.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsClassControllerV2.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HomeNavbarControllerV2.java 243 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/clazz/GoodsSubClassLabelMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/goods/CommonGoodsMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/HomeNavbarMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/HomeNavbarUserMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/taobao/TaoBaoShopMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/user/UserInfoDeleteRecordMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/clazz/GoodsSubClassLabel.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/HomeNavbar.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/HomeNavbarUser.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/UserInfoDeleteRecord.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/UserInfoExtra.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/taobao/TaoBaoGoodsBriefExtra.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/taobao/TaoBaoShop.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/exception/homemodule/HomeNavbarUserException.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/clazz/GoodsSubClassLabelMapper.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/goods/CommonGoodsMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/HomeNavbarMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/HomeNavbarUserMapper.xml 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/taobao/TaoBaoShopMapper.xml 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserInfoDeleteRecordMapper.xml 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserInfoExtraMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/clazz/GoodsSubClassLabelServiceImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonGoodsServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsClassServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarUserServiceImpl.java 257 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFactoryServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoPunishOrderServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoShopServiceImpl.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoDeleteRecordServiceImpl.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoExtraServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/clazz/GoodsSubClassLabelService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/CommonGoodsService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/GoodsClassService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/HomeNavbarService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/HomeNavbarUserService.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/taobao/TaoBaoShopService.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserAccountService.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserInfoDeleteRecordService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserInfoExtraService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserInfoService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/ImageUtil.java 263 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/goods/GoodsSubClassLabelVO.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/aspect/SignValidateAspect.java
@@ -33,7 +33,7 @@
@Aspect
@Order(2)
public class SignValidateAspect {
    public static final String EDP = "execution(* com.yeshi.fanli.controller.client.v1.*.*(..))";
    public static final String EDP = "execution(* com.yeshi.fanli.controller.client.*.*.*(..))";
    public static String KEY = "";
fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java
@@ -9,6 +9,7 @@
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -26,13 +27,16 @@
import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.bus.user.UserRank;
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.entity.money.UserMoneyDetail;
import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
import com.yeshi.fanli.service.inter.count.UserInfoCountService;
import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
import com.yeshi.fanli.service.inter.user.BindingAccountService;
import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService;
import com.yeshi.fanli.service.inter.user.UserAccountService;
import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.service.inter.user.UserMoneyDetailService;
@@ -76,6 +80,12 @@
    @Resource
    private UserMoneyDetailService userMoneyDetailService;
    @Resource
    private UserInfoDeleteRecordService userInfoDeleteRecordService;
    @Resource
    private UserAccountService  userAccountService;
    /**
     * 查询用户信息列表 正常用户/异常用户
@@ -353,7 +363,7 @@
     * @param out
     */
    @RequestMapping(value = "forbiddenUser")
    public void forbiddenUser(String callback, Long uid, PrintWriter out) {
    public void forbiddenUser(String callback, Long uid, HttpServletRequest request,  PrintWriter out) {
        try {
            if (uid == null) {
@@ -367,7 +377,15 @@
                return;
            }
            userInfoService.forbiddenUser(uid, "管理员封禁");
            AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
            if (admin == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("登录失效,请登录"));
                return;
            }
            String reason = "后台封禁,操作人:" + admin.getId() + "-" + admin.getName();
            userAccountService.forbiddenUserAll(uid, reason);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("用户封禁成功"));
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/SearchController.java
@@ -43,6 +43,7 @@
import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
import com.yeshi.fanli.service.inter.user.HistorySearchService;
@@ -54,6 +55,7 @@
import com.yeshi.fanli.util.dataoke.DaTaoKeApiUtil;
import com.yeshi.fanli.util.taobao.SearchFilterUtil;
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.vo.brand.TaoBaoShopVO;
import net.sf.ehcache.Element;
import net.sf.json.JSONArray;
@@ -89,6 +91,10 @@
    @Resource
    private TaoBaoGoodsCacheUtil taoBaoGoodsCacheUtil;
    @Resource
    private TaoBaoShopService taoBaoShopService;
    @Resource
    private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
@@ -414,12 +420,12 @@
        historySearchService.addHistorySearch(kw, bid);
        BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
                acceptData.getPackages());
        if (system == null) {
            out.print(JsonUtil.loadFalseResult("系统不存在"));
            return;
        }
//        BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
//                acceptData.getPackages());
//        if (system == null) {
//            out.print(JsonUtil.loadFalseResult("系统不存在"));
//            return;
//        }
        if (!StringUtil.isNullOrEmpty(kw) && (kw.startsWith("http://") || kw.startsWith("https://"))) {
            out.print(JsonUtil.loadFalseResult("无法搜索链接"));
@@ -471,6 +477,11 @@
            if (listRecommendWords == null || listRecommendWords.size() == 0) {
                listRecommendWords = new ArrayList<String>();
            }
            List<TaoBaoShopVO> listShop = taoBaoShopService.getShopByKey(kw);
            if (listShop != null && listShop.size() > 0) {
                data.put("shop", JsonUtil.getApiCommonGson().toJson(listShop.get(0)));
            }
        }
        Gson gson = new GsonBuilder().create();
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/SystemClientController.java
@@ -20,12 +20,14 @@
import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.entity.system.CustomerContent;
import com.yeshi.fanli.entity.system.SystemClientParams;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.config.BusinessSystemService;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.config.CustomerContentService;
import com.yeshi.fanli.service.inter.config.SystemClientParamsService;
import com.yeshi.fanli.service.inter.push.DeviceActiveService;
import com.yeshi.fanli.service.inter.push.IOSPushService;
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.util.ThreadUtil;
import net.sf.json.JSONObject;
@@ -52,8 +54,12 @@
    @Resource
    private CustomerContentService customerContentService;
    @Resource
    private UserInfoExtraService userInfoExtraService;
    @RequestMapping("getsystemclientparams")
    public void getSystemClientParams(AcceptData acceptData, HttpServletRequest request, PrintWriter out) {
    public void getSystemClientParams(AcceptData acceptData, Long uid, HttpServletRequest request, PrintWriter out) {
        BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
                acceptData.getPackages());
        if (system == null) {
@@ -113,6 +119,13 @@
                    deviceActiveService.addDeviceActive(da);
                } catch (Exception e) {
                }
                // 用户等级更新
                try {
                    userInfoExtraService.updateUserRankByUid(uid);
                } catch (Exception e) {
                    LogHelper.errorDetailInfo(e);
                }
            }
        });
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserAccountController.java
@@ -33,6 +33,7 @@
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.config.BusinessSystemService;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.homemodule.HomeNavbarUserService;
import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
import com.yeshi.fanli.service.inter.hongbao.HongBaoV2Service;
import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
@@ -48,6 +49,7 @@
import com.yeshi.fanli.service.inter.user.TBPidService;
import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService;
import com.yeshi.fanli.service.inter.user.UserAccountService;
import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.service.inter.user.UserMoneyService;
import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
@@ -137,6 +139,12 @@
    @Resource
    private UserAccountBindingHistoryService userAccountBindingHistoryService;
    @Resource
    private HomeNavbarUserService homeNavbarUserService;
    @Resource
    private UserInfoDeleteRecordService userInfoDeleteRecordService;
    private static final String PASSWORD_MAX_ERROR = "password_max_error";
    private static final String EXTRACT_MIN_MONEY = "extract_min_money";
@@ -463,10 +471,7 @@
                // 封禁用户
                // 封禁绑定的正常用户
                if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
                    UserInfo update = new UserInfo(uid);
                    update.setState(UserInfo.STATE_FORBIDDEN);
                    update.setStateDesc("绑定被封禁的电话号码被封禁");
                    userInfoService.updateByPrimaryKeySelective(update);
                    userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的电话号码");
                }
                return;
            }
@@ -564,10 +569,7 @@
                    // 封禁用户
                    // 封禁绑定的正常用户
                    if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
                        UserInfo update = new UserInfo(uid);
                        update.setState(UserInfo.STATE_FORBIDDEN);
                        update.setStateDesc("绑定被封禁的淘宝号被封禁");
                        userInfoService.updateByPrimaryKeySelective(update);
                        userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的淘宝号");
                    }
                    return;
                }
@@ -638,10 +640,7 @@
                // 封禁用户
                // 封禁绑定的正常用户
                if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
                    UserInfo update = new UserInfo(uid);
                    update.setState(UserInfo.STATE_FORBIDDEN);
                    update.setStateDesc("绑定被封禁的微信号被封禁");
                    userInfoService.updateByPrimaryKeySelective(update);
                    userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的微信号");
                }
                return;
            }
@@ -925,10 +924,7 @@
            // 封禁用户
            // 封禁绑定的正常用户
            if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
                UserInfo update = new UserInfo(uid);
                update.setState(UserInfo.STATE_FORBIDDEN);
                update.setStateDesc("绑定被封禁的支付宝被封禁");
                userInfoService.updateByPrimaryKeySelective(update);
                userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的支付宝");
            }
            return;
        }
@@ -1157,6 +1153,14 @@
                final UserInfo uuser = userInfo;
                ThreadUtil.run(new Runnable() {
                    public void run() {
                        String device = acceptData.getDevice();
                        try {
                            // 同步自定义导航
                            homeNavbarUserService.synchroDeviceToUser(uuser.getId(), device);
                        } catch (Exception e) {
                            LogHelper.errorDetailInfo(e);
                        }
                        try {
                            /* 同步未登录之前设备抽奖数据 */
                            int platformType = 0;
@@ -1166,8 +1170,7 @@
                            } else if ("ios".equals(platform)) {
                                platformType = 2;
                            }
                            userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType,
                                    acceptData.getDevice());
                            userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType, device);
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
@@ -1244,10 +1247,7 @@
                // 封禁用户
                // 封禁绑定的正常用户
                if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
                    UserInfo update = new UserInfo(uid);
                    update.setState(UserInfo.STATE_FORBIDDEN);
                    update.setStateDesc("绑定被封禁的电话号码被封禁");
                    userInfoService.updateByPrimaryKeySelective(update);
                    userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的电话号码");
                }
                return;
            }
@@ -1298,10 +1298,7 @@
                // 封禁用户
                // 封禁绑定的正常用户
                if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
                    UserInfo update = new UserInfo(uid);
                    update.setState(UserInfo.STATE_FORBIDDEN);
                    update.setStateDesc("绑定被封禁的微信号被封禁");
                    userInfoService.updateByPrimaryKeySelective(update);
                    userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的微信号");
                }
                return;
            }
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -1,11 +1,6 @@
package com.yeshi.fanli.controller.client.v1;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
@@ -21,7 +16,6 @@
import java.util.UUID;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.beanutils.PropertyUtils;
@@ -106,7 +100,6 @@
import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
import com.yeshi.fanli.util.AESUtil;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.FileUtil;
import com.yeshi.fanli.util.GsonUtil;
import com.yeshi.fanli.util.HongBaoUtil;
import com.yeshi.fanli.util.RedisManager;
@@ -126,8 +119,6 @@
import com.yeshi.fanli.vo.user.UserInfoExtraVO;
import com.yeshi.fanli.vo.user.UserSettingsVO;
import net.coobird.thumbnailator.Thumbnails;
import net.coobird.thumbnailator.Thumbnails.Builder;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -624,7 +615,7 @@
                uuser.setLastLoginIp(remotIP);
                uuser.setLastLoginTime(java.lang.System.currentTimeMillis());
                userInfoService.updateLoginInfo(uuser);
                // 更新用户附加信息,老用户不存在的需要添加
                // 用户等级更新
                try {
                    userInfoExtraService.updateUserRankByUid(uuser.getId());
                } catch (UserInfoExtraException e) {
@@ -1346,6 +1337,18 @@
        // count>0 有消息
        int count = accountMessageService.getCanOpenCount(uid);
        out.print(JsonUtil.loadTrueResult(count));
        ThreadUtil.run(new Runnable() {
            @Override
            public void run() {
                // 用户等级更新
                try {
                    userInfoExtraService.updateUserRankByUid(uid);
                } catch (Exception e) {
                    LogHelper.errorDetailInfo(e);
                }
            }
        });
    }
    @RequestMapping("collectionGoods")
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsClassControllerV2.java
New file
@@ -0,0 +1,81 @@
package com.yeshi.fanli.controller.client.v2;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.yeshi.utils.JsonUtil;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
import com.yeshi.fanli.service.inter.clazz.GoodsSubClassLabelService;
import com.yeshi.fanli.service.inter.goods.GoodsClassService;
import com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO;
import net.sf.json.JSONObject;
@Controller
@RequestMapping("api/v2/class")
public class GoodsClassControllerV2 {
    @Resource
    private GoodsClassService goodsClassService;
    @Resource
    private GoodsSubClassLabelService goodsSubClassLabelService;
    @Resource(name = "taskExecutor")
    private TaskExecutor executor;
    /**
     * 一级分类
     * @param acceptData
     * @param out
     */
    @RequestMapping(value = "listClass", method = RequestMethod.POST)
    public void listClass(AcceptData acceptData, PrintWriter out) {
        List<GoodsClass> list = goodsClassService.getEffectiveClassCache();
        if (list == null ) {
            list = new ArrayList<GoodsClass>();
        }
        JSONObject data = new JSONObject();
        data.put("list", JsonUtil.getApiCommonGson().toJson(list));
        out.print(JsonUtil.loadTrueResult(data));
    }
    /**
     * 二级分类、标签
     *
     * @param acceptData
     * @param gcid
     * @param out
     */
    @RequestMapping(value = "listSubMap", method = RequestMethod.POST)
    public void listSubMap(AcceptData acceptData, Long cid, PrintWriter out) {
        if(cid == null) {
            out.print(JsonUtil.loadFalseResult("参数不能为空"));
            return;
        }
        List<GoodsSubClassLabelVO> list = goodsSubClassLabelService.listSubMapCache(cid);
        if (list == null) {
            list = new ArrayList<GoodsSubClassLabelVO>();
        }
        JSONObject data = new JSONObject();
        data.put("list", JsonUtil.getApiCommonGson().toJson(list));
        out.print(JsonUtil.loadTrueResult(data));
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HomeNavbarControllerV2.java
New file
@@ -0,0 +1,243 @@
package com.yeshi.fanli.controller.client.v2;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.yeshi.utils.JsonUtil;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.HomeNavbar;
import com.yeshi.fanli.entity.bus.homemodule.HomeNavbar.NavbarTypeEnum;
import com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser;
import com.yeshi.fanli.exception.homemodule.HomeNavbarUserException;
import com.yeshi.fanli.service.inter.homemodule.HomeNavbarService;
import com.yeshi.fanli.service.inter.homemodule.HomeNavbarUserService;
import com.yeshi.fanli.util.StringUtil;
import net.sf.json.JSONObject;
@Controller
@RequestMapping("api/v2/navbar")
public class HomeNavbarControllerV2 {
    @Resource
    private HomeNavbarService homeNavbarService;
    @Resource
    private HomeNavbarUserService homeNavbarUserService;
    /**
     * 获取导航栏内容
     *
     * @param acceptData
     * @param out
     */
    @RequestMapping(value = "getHomeItems", method = RequestMethod.POST)
    public void getHomeItems(AcceptData acceptData, Long uid, PrintWriter out) {
        List<HomeNavbar> listNavbar = homeNavbarUserService.listEffectiveNavbar(uid, acceptData.getDevice());
        if (listNavbar == null) {
            listNavbar = new ArrayList<HomeNavbar>();
        }
        JSONObject data = new JSONObject();
        data.put("count", listNavbar.size());
        data.put("listNavbar", JsonUtil.getApiCommonGson().toJson(listNavbar));
        out.print(JsonUtil.loadTrueResult(data));
    }
    /**
     * 获取导航栏编辑内容
     *
     * @param acceptData
     * @param out
     */
    @RequestMapping(value = "getUserItems", method = RequestMethod.POST)
    public void getUserItems(AcceptData acceptData, Long uid, PrintWriter out) {
        try {
            List<HomeNavbar> listExist = new ArrayList<HomeNavbar>();
            List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
            // 系统默认导航栏
            List<HomeNavbar> listNavbar = homeNavbarService.listQueryEffectiveNavbar();
            if (listNavbar != null && listNavbar.size() > 0) {
                listItems.addAll(listNavbar);
            }
            int nonCount = 0;
            // 查询用户自定义导航
            List<HomeNavbarUser> listUser = homeNavbarUserService.listUserNavbar(uid, acceptData.getDevice());
            if (listUser == null || listUser.size() == 0) {
                for (int i = 0; i < listItems.size(); i++) {
                    HomeNavbar homeNavbar = listItems.get(i);
                    // 活动剔除
                    if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                        listItems.remove(homeNavbar);
                        i--;
                        continue;
                    }
                    if (homeNavbar.getIsDefault()) {
                        listExist.add(homeNavbar);
                        if (homeNavbar.getIsFixed()) {
                            nonCount++;
                        }
                        listItems.remove(homeNavbar);
                        i--;
                    }
                }
            } else {
                // 获取固定不可编辑
                for (int i = 0; i < listItems.size(); i++) {
                    HomeNavbar homeNavbar = listItems.get(i);
                    // 活动剔除
                    if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                        listItems.remove(homeNavbar);
                        i--;
                        continue;
                    }
                    if (homeNavbar.getIsFixed()) {
                        listExist.add(homeNavbar);
                        nonCount++;
                        listItems.remove(homeNavbar);
                        i--;
                    }
                }
                // 用户编辑的数据
                for (HomeNavbarUser homeNavbarUser : listUser) {
                    HomeNavbar homeNavbar = homeNavbarUser.getHomeNavbar();
                    if (homeNavbar == null) {
                        continue;
                    }
                    // 活动剔除
                    if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                        continue;
                    }
                    long homeId = homeNavbar.getId();
                    for (int i = 0; i < listItems.size(); i++) {
                        HomeNavbar navbar = listItems.get(i);
                        long id = navbar.getId();
                        if (homeId == id) {
                            // 加入用户已选
                            listExist.add(navbar);
                            // 移除用户已选
                            listItems.remove(navbar);
                            i--;
                            break;
                        }
                    }
                }
            }
            JSONObject data = new JSONObject();
            data.put("min", 6);
            data.put("max", 16);
            data.put("nonCount", nonCount);
            data.put("listExist", JsonUtil.getApiCommonGson().toJson(listExist));
            data.put("listItems", JsonUtil.getApiCommonGson().toJson(listItems));
            out.print(JsonUtil.loadTrueResult(data));
        } catch (HomeNavbarUserException e) {
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
    /**
     * 设置自定义
     *
     * @param acceptData
     * @param uid
     * @param list
     * @param out
     */
    @RequestMapping(value = "saveUserItems", method = RequestMethod.POST)
    public void saveUserItems(AcceptData acceptData, Long uid, String barIds, PrintWriter out) {
        try {
            if (StringUtil.isNullOrEmpty(barIds)) {
                out.print(JsonUtil.loadFalseResult("Id参数不能为空"));
                return;
            }
            Gson gson = new Gson();
            List<Long> list = gson.fromJson(barIds, new TypeToken<ArrayList<Long>>() {
            }.getType());
            if (list == null || list.size() == 0) {
                out.print(JsonUtil.loadFalseResult("未检测到数据"));
                return;
            }
            homeNavbarUserService.addNavbarUser(uid, acceptData.getDevice(), list);
            out.print(JsonUtil.loadTrueResult("保存成功"));
        } catch (HomeNavbarUserException e) {
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
    /**
     * 还原默认
     *
     * @param acceptData
     * @param uid
     * @param out
     */
    @RequestMapping(value = "restoreDefault", method = RequestMethod.POST)
    public void restoreDefault(AcceptData acceptData, Long uid, PrintWriter out) {
        try {
            int nonCount = 0;
            List<HomeNavbar> listExist = new ArrayList<HomeNavbar>();
            List<HomeNavbar> listItems = new ArrayList<HomeNavbar>();
            List<HomeNavbar> listNavbar = homeNavbarUserService.restoreSystemDefault(uid, acceptData.getDevice());
            if (listNavbar != null && listNavbar.size() > 0) {
                listItems.addAll(listNavbar);
            }
            for (int i = 0; i < listItems.size(); i++) {
                HomeNavbar homeNavbar = listItems.get(i);
                // 活动剔除
                if (!NavbarTypeEnum.category.equals(homeNavbar.getType())) {
                    listItems.remove(homeNavbar);
                    i--;
                    continue;
                }
                // 筛选出默认项
                if (!homeNavbar.getIsDefault()) {
                    break;
                } else {
                    if (homeNavbar.getIsFixed()) {
                        nonCount++;
                    }
                    listExist.add(homeNavbar);
                    listItems.remove(homeNavbar);
                    i--;
                }
            }
            JSONObject data = new JSONObject();
            data.put("nonCount", nonCount);
            data.put("listExist", JsonUtil.getApiCommonGson().toJson(listExist));
            data.put("listItems", JsonUtil.getApiCommonGson().toJson(listItems));
            out.print(JsonUtil.loadTrueResult(data));
        } catch (HomeNavbarUserException e) {
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/clazz/GoodsSubClassLabelMapper.java
@@ -6,6 +6,7 @@
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel;
import com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO;
public interface GoodsSubClassLabelMapper extends BaseMapper<GoodsSubClassLabel> {
@@ -25,4 +26,13 @@
     */
    List<GoodsSubClassLabel> listByClassId(@Param("classId") Long classId);
    /**
     * 查询二级分类、标签
     * @param classId
     * @return
     */
    List<GoodsSubClassLabelVO> listSubMapByClassId(@Param("classId") Long classId);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/goods/CommonGoodsMapper.java
@@ -26,4 +26,14 @@
     * @return
     */
    long countBySellerIdAndHasCoupon(@Param("sellerId") Long sellerId);
    /**
     * 批量商品id查询商品信息
     * @param list
     * @return
     */
    List<CommonGoods> getByListGoodsId(@Param("list") List<Long> list);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/HomeNavbarMapper.java
@@ -49,6 +49,21 @@
     */
    List<HomeNavbar> listQueryEffective();
    
    /**
     * 默认导航栏
     * @return
     */
    List<HomeNavbar> listQueryDefaultNavbar();
    /**
     *  固定导航栏
     * @return
     */
    List<HomeNavbar> listQueryFixedNavbar();
    /**
     * 根据分类查询有效导航栏
     * @param classId
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/HomeNavbarUserMapper.java
New file
@@ -0,0 +1,63 @@
package com.yeshi.fanli.dao.mybatis.homemodule;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser;
public interface HomeNavbarUserMapper extends BaseMapper<HomeNavbarUser> {
    /**
     * 批量插入
     * @param list
     */
    void insertBatch (List<HomeNavbarUser> list);
    /**
     * 批量更新- 目前只更新排序
     * @param list
     */
    void updateSelectiveBatch (List<HomeNavbarUser> list);
    /**
     * 批量删除
     *
     * @param list
     * @return
     */
    int deleteByPrimaryKeyBatch(List<Long> list);
    /**
     * 删除用户自定义
     *
     * @param uid
     * @return
     */
    void deleteByUid(@Param("uid")Long uid);
    /**
     *  删除设备自定义
     *
     * @param list
     * @return
     */
    void deleteByDevice(@Param("device")String device);
    /**
     * 查询自定义有效的导航栏
     */
    List<HomeNavbarUser> listEffectiveNavbars(@Param("uid")Long uid, @Param("device")String device);
    /**
     * 查询自定义导航栏
     */
    List<HomeNavbarUser> listMyNavbars(@Param("uid")Long uid, @Param("device")String device);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/taobao/TaoBaoShopMapper.java
@@ -25,4 +25,15 @@
     * @return
     */
    long countBrandShopinfo(@Param("cid") Long cid);
    /**
     * 根据店铺搜索关键词查找
     * @param key
     * @return
     */
    List<TaoBaoShopVO> getShopByKey(@Param("key") String  key);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/user/UserInfoDeleteRecordMapper.java
New file
@@ -0,0 +1,8 @@
package com.yeshi.fanli.dao.mybatis.user;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.user.UserInfoDeleteRecord;
public interface UserInfoDeleteRecordMapper extends BaseMapper<UserInfoDeleteRecord> {
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/clazz/GoodsSubClassLabel.java
@@ -5,6 +5,8 @@
import org.yeshi.utils.mybatis.Column;
import org.yeshi.utils.mybatis.Table;
import com.google.gson.annotations.Expose;
/**
 * 二级分类标签
 * 
@@ -21,9 +23,11 @@
    public GoodsSubClassLabel() {
    }
    @Expose
    @Column(name = "scl_id")
    private Long id;// 主键ID
    @Expose
    @Column(name = "scl_name")
    private String name;// 名字
    @Column(name = "scl_order_by")
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/HomeNavbar.java
@@ -18,9 +18,6 @@
@Table("yeshi_ec_home_navbar")
public class HomeNavbar implements Serializable{
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    public enum NavbarTypeEnum {
@@ -36,7 +33,7 @@
        }
    }
    
    @Expose
    @Column(name = "br_id")
    private Long id;
@@ -86,6 +83,14 @@
    @Column(name = "br_state")
    private Integer state; 
    
    // 是否默认: 0 非默认 1 默认项
    @Column(name = "br_is_default")
    private Boolean isDefault;
    // 固定项:0  非固定  1 固定
    @Column(name = "br_is_fixed")
    private Boolean isFixed;
    // 创建时间
    @Column(name = "br_createtime")
    private Date createtime;
@@ -107,6 +112,13 @@
    private String swiperName;
    // 分类名称
    private String className;
    public HomeNavbar() {}
    public HomeNavbar(Long id) {
        this.id = id;
    }
    
    
    public Long getId() {
@@ -253,4 +265,19 @@
        this.className = className;
    }
    public Boolean getIsDefault() {
        return isDefault;
    }
    public void setIsDefault(Boolean isDefault) {
        this.isDefault = isDefault;
    }
    public Boolean getIsFixed() {
        return isFixed;
    }
    public void setIsFixed(Boolean isFixed) {
        this.isFixed = isFixed;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/HomeNavbarUser.java
New file
@@ -0,0 +1,82 @@
package com.yeshi.fanli.entity.bus.homemodule;
import java.util.Date;
import org.yeshi.utils.mybatis.Column;
import org.yeshi.utils.mybatis.Table;
/**
 * 用户自定义导航
 *
 */
@Table("yeshi_ec_home_navbar_user")
public class HomeNavbarUser {
    @Column(name = "hnu_id")
    private Long id;
    @Column(name = "hnu_uid")
    private Long uid;
    @Column(name = "hnu_device")
    private String device;
    @Column(name = "hnu_order")
    private Integer order;
    @Column(name = "hnu_navbar_id")
    private HomeNavbar homeNavbar;
    // 创建时间
    @Column(name = "hnu_create_time")
    private Date createTime;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getUid() {
        return uid;
    }
    public void setUid(Long uid) {
        this.uid = uid;
    }
    public String getDevice() {
        return device;
    }
    public void setDevice(String device) {
        this.device = device;
    }
    public Integer getOrder() {
        return order;
    }
    public void setOrder(Integer order) {
        this.order = order;
    }
    public HomeNavbar getHomeNavbar() {
        return homeNavbar;
    }
    public void setHomeNavbar(HomeNavbar homeNavbar) {
        this.homeNavbar = homeNavbar;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/UserInfoDeleteRecord.java
New file
@@ -0,0 +1,70 @@
package com.yeshi.fanli.entity.bus.user;
import java.util.Date;
import org.yeshi.utils.mybatis.Column;
import org.yeshi.utils.mybatis.Table;
/**
 * 用户删除、封禁记录
 *
 */
@Table("yeshi_ec_user_delete_record")
public class UserInfoDeleteRecord {
    @Column(name = "udr_id")
    private Long id;
    // 用户id
    @Column(name = "udr_uid")
    private UserInfo userInfo;
    // 状态
    @Column(name = "udr_state")
    private Integer state;
    // 原因
    @Column(name = "udr_reason")
    private String reason;
    // 创建时间
    @Column(name = "udr_create_time")
    private Date createTime;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public UserInfo getUserInfo() {
        return userInfo;
    }
    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }
    public Integer getState() {
        return state;
    }
    public void setState(Integer state) {
        this.state = state;
    }
    public String getReason() {
        return reason;
    }
    public void setReason(String reason) {
        this.reason = reason;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/UserInfoExtra.java
@@ -53,6 +53,10 @@
    @Column(name = "uie_coupon_news")
    private Integer couponNews;
    // 是否同步导航栏
    @Column(name = "uie_synch_navbar")
    private Boolean synchNavbar;
    // 首次登录时间
    @Column(name = "uie_first_login_time")
    private Date firstLoginTime;
@@ -161,4 +165,13 @@
    public void setFirstLoginTime(Date firstLoginTime) {
        this.firstLoginTime = firstLoginTime;
    }
    public Boolean getSynchNavbar() {
        return synchNavbar;
    }
    public void setSynchNavbar(Boolean synchNavbar) {
        this.synchNavbar = synchNavbar;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/taobao/TaoBaoGoodsBriefExtra.java
@@ -43,7 +43,7 @@
    private boolean coupon; // 是否有券
    
    @Expose
    private boolean recommend; // 是否推荐
    private boolean recommend = true; // 是否推荐
    
    public int getMoneyType() {
fanli/src/main/java/com/yeshi/fanli/entity/taobao/TaoBaoShop.java
@@ -85,6 +85,9 @@
    @Column(name = "tsi_shop_link")
    private String shopLink; // 店铺链接
    
    @Column(name = "tsi_key")
    private String key; // 关键词
    
    public TaoBaoShop() {}
    
@@ -230,4 +233,12 @@
        this.shopNameCustom = shopNameCustom;
    }
    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
}
fanli/src/main/java/com/yeshi/fanli/exception/homemodule/HomeNavbarUserException.java
New file
@@ -0,0 +1,32 @@
package com.yeshi.fanli.exception.homemodule;
public class HomeNavbarUserException extends Exception {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private int code;
    private String msg;
    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public HomeNavbarUserException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public HomeNavbarUserException() {
    }
    @Override
    public String getMessage() {
        return this.msg;
    }
}
fanli/src/main/java/com/yeshi/fanli/mapping/clazz/GoodsSubClassLabelMapper.xml
@@ -15,6 +15,24 @@
            select="com.yeshi.fanli.dao.mybatis.GoodsClassMapper.selectByPrimaryKey"></association>
    </resultMap>
    <resultMap id="SubMapResultVO" type="com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO">
        <id column="scl_id" property="id" jdbcType="BIGINT" />
        <result column="scl_name" property="name" jdbcType="VARCHAR" />
        <result column="scl_order_by" property="orderBy" jdbcType="INTEGER" />
        <result column="scl_create_time" property="createTime"    jdbcType="TIMESTAMP" />
        <result column="scl_update_time" property="updateTime"    jdbcType="TIMESTAMP" />
        <association property="goodsClass" column="scl_class_id" javaType="com.yeshi.fanli.entity.bus.clazz.GoodsClass">
            <id column="scl_class_id" property="id" jdbcType="BIGINT" />
        </association>
        <collection property="listSub" column="sub_id"
            resultMap="com.yeshi.fanli.dao.mybatis.GoodsSubClassMapper.SimpleResultMap"/>
    </resultMap>
    <sql id="Base_Column_List">scl_id,scl_name,scl_order_by,scl_class_id,scl_create_time,scl_update_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
@@ -42,12 +60,16 @@
             where
        scl_class_id=#{classId}
        </if>
        order by scl_order_by
    </select>
    <select id="listSubMapByClassId" resultMap="SubMapResultVO">
        SELECT t.*,b.* FROM yeshi_ec_sub_class_label t
        LEFT JOIN yeshi_ec_sub_class_label_map p ON t.`scl_id` = p.`sclm_label_id`
        LEFT JOIN yeshi_ec_sub_class b ON b.`sub_id` = p.`sclm_sub_class_id`
        WHERE t.`scl_class_id` = #{classId} AND b.`sub_state` = 1
        ORDER BY t.`scl_order_by`,p.`sclm_order_by`
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
fanli/src/main/java/com/yeshi/fanli/mapping/goods/CommonGoodsMapper.xml
@@ -180,4 +180,9 @@
        WHERE <![CDATA[cg_coupon_amount > 0 AND cg_coupon_left_count > 1]]>  
            AND cg_seller_id = #{sellerId}
    </select>
    <select id="getByListGoodsId" resultMap="BaseResultMap">
        SELECT * FROM  yeshi_ec_common_goods
        WHERE cg_goods_id IN <foreach collection="list" item="item" open="(" separator="," close=")">#{item}</foreach>
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/HomeNavbarMapper.xml
@@ -14,12 +14,15 @@
    <result column="br_start_time" property="startTime" jdbcType="TIMESTAMP"/>
    <result column="br_end_time" property="endTime" jdbcType="TIMESTAMP"/>
    <result column="br_state" property="state" jdbcType="INTEGER"/>
    <result column="br_is_default" property="isDefault" jdbcType="VARCHAR"/>
    <result column="br_is_fixed" property="isFixed" jdbcType="VARCHAR"/>
    <result column="br_createtime" property="createtime" jdbcType="TIMESTAMP"/>
    <result column="br_updatetime" property="updatetime" jdbcType="TIMESTAMP"/>
    <result column="br_type" property="type" typeHandler="com.yeshi.fanli.util.mybatishandler.NavbarTypeEnumHandler" />
  </resultMap>
  
  <sql id="Base_Column_List">br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_start_time,br_end_time,br_state,br_createtime,br_updatetime</sql>
  <sql id="Base_Column_List">br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_start_time,br_end_time,br_state,br_is_default,br_is_fixed,br_createtime,br_updatetime</sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_home_navbar where br_id = #{id,jdbcType=BIGINT}
  </select>
@@ -69,6 +72,23 @@
      ORDER BY br_orderby 
   </select>
   
   <select id="listQueryDefaultNavbar" resultMap="BaseResultMap">
      SELECT * FROM    yeshi_ec_home_navbar
      WHERE br_state = 1 AND br_is_default = 1
              AND IF(br_start_time IS NULL,TRUE, br_start_time<![CDATA[<=]]> NOW())
              AND IF(br_end_time IS NULL,TRUE, br_end_time <![CDATA[>=]]> NOW())
      ORDER BY br_orderby
   </select>
   <select id="listQueryFixedNavbar" resultMap="BaseResultMap">
      SELECT * FROM    yeshi_ec_home_navbar
      WHERE br_state = 1 AND br_is_default = 1 AND br_is_fixed = 1
              AND IF(br_start_time IS NULL,TRUE, br_start_time<![CDATA[<=]]> NOW())
              AND IF(br_end_time IS NULL,TRUE, br_end_time <![CDATA[>=]]> NOW())
      ORDER BY br_orderby
   </select>
    <select id="getEffectiveByClassId" resultMap="BaseResultMap">
      SELECT * FROM    yeshi_ec_home_navbar 
      WHERE br_state = 1  AND br_class_id = #{classId}
@@ -85,7 +105,7 @@
      delete from yeshi_ec_home_navbar where br_id = #{id,jdbcType=BIGINT}
  </delete>
  
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar (br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_start_time,br_end_time,br_state,br_createtime,br_updatetime) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{classId,jdbcType=BIGINT},#{swiperBannerId,jdbcType=BIGINT},#{url,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{orderby,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar (br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_start_time,br_end_time,br_state,br_is_default,br_is_fixed,br_createtime,br_updatetime) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{classId,jdbcType=BIGINT},#{swiperBannerId,jdbcType=BIGINT},#{url,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{orderby,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{isDefault,jdbcType=VARCHAR},#{isFixed,jdbcType=VARCHAR},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
  
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar
    <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -100,6 +120,8 @@
      <if test="startTime != null">br_start_time,</if>
      <if test="endTime != null">br_end_time,</if>
      <if test="state != null">br_state,</if>
      <if test="isDefault != null">br_is_default,</if>
      <if test="isFixed != null">br_is_fixed,</if>
      <if test="createtime != null">br_createtime,</if>
      <if test="updatetime != null">br_updatetime,</if>
    </trim>values
@@ -115,12 +137,14 @@
      <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if>
      <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
      <if test="state != null">#{state,jdbcType=INTEGER},</if>
      <if test="isDefault != null">#{isDefault,jdbcType=VARCHAR},</if>
      <if test="isFixed != null">#{isFixed,jdbcType=VARCHAR},</if>
      <if test="createtime != null">#{createtime,jdbcType=TIMESTAMP},</if>
      <if test="updatetime != null">#{updatetime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update yeshi_ec_home_navbar set br_name = #{name,jdbcType=VARCHAR},br_picture = #{picture,jdbcType=VARCHAR},br_class_id = #{classId,jdbcType=BIGINT},br_swiper_banner_id = #{swiperBannerId,jdbcType=BIGINT},br_url = #{url,jdbcType=VARCHAR},br_type = #{type,jdbcType=VARCHAR},br_orderby = #{orderby,jdbcType=INTEGER},br_start_time = #{startTime,jdbcType=TIMESTAMP},br_end_time = #{endTime,jdbcType=TIMESTAMP},br_state = #{state,jdbcType=INTEGER},br_createtime = #{createtime,jdbcType=TIMESTAMP},br_updatetime = #{updatetime,jdbcType=TIMESTAMP} where br_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update yeshi_ec_home_navbar set br_name = #{name,jdbcType=VARCHAR},br_picture = #{picture,jdbcType=VARCHAR},br_class_id = #{classId,jdbcType=BIGINT},br_swiper_banner_id = #{swiperBannerId,jdbcType=BIGINT},br_url = #{url,jdbcType=VARCHAR},br_type = #{type,jdbcType=VARCHAR},br_orderby = #{orderby,jdbcType=INTEGER},br_start_time = #{startTime,jdbcType=TIMESTAMP},br_end_time = #{endTime,jdbcType=TIMESTAMP},br_state = #{state,jdbcType=INTEGER},br_is_default = #{isDefault,jdbcType=VARCHAR},br_is_fixed = #{isFixed,jdbcType=VARCHAR},br_createtime = #{createtime,jdbcType=TIMESTAMP},br_updatetime = #{updatetime,jdbcType=TIMESTAMP} where br_id = #{id,jdbcType=BIGINT}</update>
 
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update yeshi_ec_home_navbar
    <set>
@@ -134,6 +158,8 @@
      <if test="startTime != null">br_start_time=#{startTime,jdbcType=TIMESTAMP},</if>
      <if test="endTime != null">br_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
      <if test="state != null">br_state=#{state,jdbcType=INTEGER},</if>
      <if test="isDefault != null">br_is_default=#{isDefault,jdbcType=VARCHAR},</if>
      <if test="isFixed != null">br_is_fixed=#{isFixed,jdbcType=VARCHAR},</if>
      <if test="createtime != null">br_createtime=#{createtime,jdbcType=TIMESTAMP},</if>
      <if test="updatetime != null">br_updatetime=#{updatetime,jdbcType=TIMESTAMP},</if>
    </set> where br_id = #{id,jdbcType=BIGINT}
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/HomeNavbarUserMapper.xml
New file
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeshi.fanli.dao.mybatis.homemodule.HomeNavbarUserMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">
    <id column="hnu_id" property="id" jdbcType="BIGINT"/>
    <result column="hnu_uid" property="uid" jdbcType="BIGINT"/>
    <result column="hnu_device" property="device" jdbcType="VARCHAR"/>
    <result column="hnu_order" property="order" jdbcType="INTEGER"/>
    <result column="hnu_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <association property="homeNavbar" column="hnu_navbar_id" javaType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">
        <id column="hnu_navbar_id" property="id" jdbcType="BIGINT" />
    </association>
  </resultMap>
  <resultMap id="WholeResultMap" type="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">
    <id column="hnu_id" property="id" jdbcType="BIGINT"/>
    <result column="hnu_uid" property="uid" jdbcType="BIGINT"/>
    <result column="hnu_device" property="device" jdbcType="VARCHAR"/>
    <result column="hnu_order" property="order" jdbcType="INTEGER"/>
    <result column="hnu_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <association property="homeNavbar" column="hnu_navbar_id" resultMap="com.yeshi.fanli.dao.mybatis.homemodule.HomeNavbarMapper.BaseResultMap"/>
  </resultMap>
  <sql id="Base_Column_List">hnu_id,hnu_uid,hnu_device,hnu_order,hnu_navbar_id,hnu_create_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_home_navbar_user where hnu_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_home_navbar_user where hnu_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar_user (hnu_id,hnu_uid,hnu_device,hnu_order,hnu_navbar_id,hnu_create_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{homeNavbar.id,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar_user
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">hnu_id,</if>
      <if test="uid != null">hnu_uid,</if>
      <if test="device != null">hnu_device,</if>
      <if test="order != null">hnu_order,</if>
      <if test="homeNavbar != null">hnu_navbar_id,</if>
      <if test="createTime != null">hnu_create_time,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
      <if test="device != null">#{device,jdbcType=VARCHAR},</if>
      <if test="order != null">#{order,jdbcType=INTEGER},</if>
      <if test="homeNavbar != null">#{homeNavbar.id,jdbcType=BIGINT},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">update yeshi_ec_home_navbar_user set hnu_uid = #{uid,jdbcType=BIGINT},hnu_device = #{device,jdbcType=VARCHAR},hnu_order = #{order,jdbcType=INTEGER},hnu_navbar_id = #{homeNavbar.id,jdbcType=BIGINT},hnu_create_time = #{createTime,jdbcType=TIMESTAMP} where hnu_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">update yeshi_ec_home_navbar_user
    <set>
      <if test="uid != null">hnu_uid=#{uid,jdbcType=BIGINT},</if>
      <if test="device != null">hnu_device=#{device,jdbcType=VARCHAR},</if>
      <if test="order != null">hnu_order=#{order,jdbcType=INTEGER},</if>
      <if test="homeNavbar != null">hnu_navbar_id=#{homeNavbar.id,jdbcType=BIGINT},</if>
      <if test="createTime != null">hnu_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
    </set> where hnu_id = #{id,jdbcType=BIGINT}
  </update>
    <!-- 批量插入数据 -->
  <insert id="insertBatch" keyProperty="id" parameterType="java.util.List">
        insert into yeshi_ec_home_navbar_user
        (hnu_id,hnu_uid,hnu_device,hnu_order,hnu_navbar_id,hnu_create_time)
        values
        <foreach collection="list" item="item" separator=",">
            (
            #{item.id,jdbcType=BIGINT},
            #{item.uid,jdbcType=BIGINT},
            #{item.device,jdbcType=VARCHAR},
            #{item.order,jdbcType=INTEGER},
            #{item.homeNavbar.id,jdbcType=BIGINT},
            #{item.createTime,jdbcType=TIMESTAMP}
            )
        </foreach>
  </insert>
  <!-- 批量更新排序 -->
  <update id="updateSelectiveBatch" parameterType="java.util.List">
        update yeshi_ec_home_navbar_user
        <trim prefix="set" suffixOverrides=",">
            <trim prefix="hnu_order=case" suffix="end,">
                <foreach collection="list" item="item" index="index">
                    <if test="item.order !=null">
                        when hnu_id=#{item.id} then #{item.order}
                    </if>
                </foreach>
            </trim>
        </trim>
        where hnu_id in
        <foreach collection="list" index="index" item="item"
            separator="," open="(" close=")">
            #{item.id,jdbcType=BIGINT}
        </foreach>
    </update>
      <delete id="deleteByPrimaryKeyBatch" parameterType="java.util.List">
        DELETE FROM yeshi_ec_home_navbar_user WHERE hnu_id in
        <foreach collection="list" item="item" open="(" close=")"
            separator=",">#{item}</foreach>
    </delete>
    <delete id="deleteByUid">
        DELETE FROM yeshi_ec_home_navbar_user
        WHERE hnu_uid = #{uid}
    </delete>
    <delete id="deleteByDevice">
        DELETE FROM yeshi_ec_home_navbar_user
        WHERE hnu_device = #{device}
    </delete>
  <select id="listEffectiveNavbars" resultMap="WholeResultMap">
     SELECT * FROM yeshi_ec_home_navbar_user u
    LEFT JOIN yeshi_ec_home_navbar h ON u.`hnu_navbar_id` = h.`br_id`
    WHERE h.br_state = 1
          AND IF(h.br_start_time IS NULL,TRUE, h.br_start_time<![CDATA[<=]]> NOW())
          AND IF(h.br_end_time IS NULL,TRUE, h.br_end_time <![CDATA[>=]]> NOW())
        <if test="uid != null"> AND u.`hnu_uid` = #{uid} </if>
        <if test="device != null"> AND u.`hnu_device` = #{device}</if>
    ORDER BY u.`hnu_order`
  </select>
   <select id="listMyNavbars" resultMap="BaseResultMap">
     SELECT * FROM yeshi_ec_home_navbar_user u
    WHERE 1=1
        <if test="uid != null"> AND u.`hnu_uid` = #{uid} </if>
        <if test="device != null"> AND u.`hnu_device` = #{device}</if>
  </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/taobao/TaoBaoShopMapper.xml
@@ -11,8 +11,8 @@
        <result column="tsi_seller_nick" property="sellerNick" jdbcType="VARCHAR" />
        <result column="tsi_shop_link" property="shopLink" jdbcType="VARCHAR" />
        <result column="tsi_shop_icon" property="shopIcon" jdbcType="VARCHAR" />
        <result column="tsi_shop_icon_custom" property="shopIconCustom"
            jdbcType="VARCHAR" />
        <result column="tsi_shop_icon_custom" property="shopIconCustom"    jdbcType="VARCHAR" />
        <result column="tsi_key" property="key"    jdbcType="VARCHAR" />
        <result column="tsi_score_goods" property="scoreGoods"
            jdbcType="DECIMAL" />
        <result column="tsi_score_seller" property="scoreSeller"
@@ -41,8 +41,8 @@
        <result column="tsi_seller_nick" property="sellerNick"    jdbcType="VARCHAR" />
        <result column="tsi_shop_link" property="shopLink" jdbcType="VARCHAR" />
        <result column="tsi_shop_icon" property="shopIcon" jdbcType="VARCHAR" />
        <result column="tsi_shop_icon_custom" property="shopIconCustom"
            jdbcType="VARCHAR" />
        <result column="tsi_shop_icon_custom" property="shopIconCustom"    jdbcType="VARCHAR" />
        <result column="tsi_key" property="key"    jdbcType="VARCHAR" />
        <result column="tsi_score_goods" property="scoreGoods"
            jdbcType="DECIMAL" />
        <result column="tsi_score_seller" property="scoreSeller"
@@ -65,7 +65,7 @@
    </resultMap>
    
    
    <sql id="Base_Column_List">tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_shop_name_custom,tsi_seller_nick,tsi_shop_link,tsi_shop_icon,tsi_shop_icon_custom,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage
    <sql id="Base_Column_List">tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_shop_name_custom,tsi_seller_nick,tsi_shop_link,tsi_shop_icon,tsi_shop_icon_custom,tsi_key,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
@@ -79,9 +79,9 @@
    <insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoShop"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_taobao_shop_info
        (tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_shop_name_custom,tsi_seller_nick,tsi_shop_link,tsi_shop_icon,tsi_shop_icon_custom,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage)
        (tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_shop_name_custom,tsi_key,tsi_seller_nick,tsi_shop_link,tsi_shop_icon,tsi_shop_icon_custom,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage)
        values
        (#{id,jdbcType=BIGINT},#{userType,jdbcType=INTEGER},#{shopId,jdbcType=BIGINT},#{shopName,jdbcType=VARCHAR},#{shopNameCustom,jdbcType=VARCHAR},#{sellerNick,jdbcType=VARCHAR},#{shopLink,jdbcType=VARCHAR},#{shopIcon,jdbcType=VARCHAR},#{shopIconCustom,jdbcType=VARCHAR},#{scoreGoods,jdbcType=DECIMAL},#{scoreSeller,jdbcType=DECIMAL},#{scoreLogistics,jdbcType=DECIMAL},#{scoreGoodsD,jdbcType=DECIMAL},#{scoreSellerD,jdbcType=DECIMAL},#{scoreLogisticsD,jdbcType=DECIMAL},#{updateTime,jdbcType=TIMESTAMP},#{goodRatePercentage,jdbcType=DECIMAL})
        (#{id,jdbcType=BIGINT},#{userType,jdbcType=INTEGER},#{shopId,jdbcType=BIGINT},#{shopName,jdbcType=VARCHAR},#{shopNameCustom,jdbcType=VARCHAR},#{key,jdbcType=VARCHAR},#{sellerNick,jdbcType=VARCHAR},#{shopLink,jdbcType=VARCHAR},#{shopIcon,jdbcType=VARCHAR},#{shopIconCustom,jdbcType=VARCHAR},#{scoreGoods,jdbcType=DECIMAL},#{scoreSeller,jdbcType=DECIMAL},#{scoreLogistics,jdbcType=DECIMAL},#{scoreGoodsD,jdbcType=DECIMAL},#{scoreSellerD,jdbcType=DECIMAL},#{scoreLogisticsD,jdbcType=DECIMAL},#{updateTime,jdbcType=TIMESTAMP},#{goodRatePercentage,jdbcType=DECIMAL})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoShop"
        useGeneratedKeys="true" keyProperty="id">
@@ -96,6 +96,7 @@
            <if test="shopLink != null">tsi_shop_link,</if>
            <if test="shopIcon != null">tsi_shop_icon,</if>
            <if test="shopIconCustom != null">tsi_shop_icon_custom,</if>
            <if test="key != null">tsi_key,</if>
            <if test="scoreGoods != null">tsi_score_goods,</if>
            <if test="scoreSeller != null">tsi_score_seller,</if>
            <if test="scoreLogistics != null">tsi_score_logistics,</if>
@@ -116,6 +117,7 @@
            <if test="shopLink != null">#{shopLink,jdbcType=VARCHAR},</if>
            <if test="shopIcon != null">#{shopIcon,jdbcType=VARCHAR},</if>
            <if test="shopIconCustom != null">#{shopIconCustom,jdbcType=VARCHAR},</if>
            <if test="key != null">#{key,jdbcType=VARCHAR},</if>
            <if test="scoreGoods != null">#{scoreGoods,jdbcType=DECIMAL},</if>
            <if test="scoreSeller != null">#{scoreSeller,jdbcType=DECIMAL},</if>
            <if test="scoreLogistics != null">#{scoreLogistics,jdbcType=DECIMAL},</if>
@@ -136,6 +138,7 @@
        tsi_shop_link =    #{shopLink,jdbcType=VARCHAR},
        tsi_shop_icon =    #{shopIcon,jdbcType=VARCHAR},
        tsi_shop_icon_custom = #{shopIconCustom,jdbcType=VARCHAR},
        tsi_key = #{key,jdbcType=VARCHAR},
        tsi_score_goods = #{scoreGoods,jdbcType=DECIMAL},
        tsi_score_seller = #{scoreSeller,jdbcType=DECIMAL},
        tsi_score_logistics = #{scoreLogistics,jdbcType=DECIMAL},
@@ -157,6 +160,7 @@
            <if test="shopLink != null">tsi_shop_link=#{shopLink,jdbcType=VARCHAR},</if>
            <if test="shopIcon != null">tsi_shop_icon=#{shopIcon,jdbcType=VARCHAR},</if>
            <if test="shopIconCustom != null">tsi_shop_icon_custom=#{shopIconCustom,jdbcType=VARCHAR},</if>
            <if test="key != null">tsi_key=#{key,jdbcType=VARCHAR},</if>
            <if test="scoreGoods != null">tsi_score_goods=#{scoreGoods,jdbcType=DECIMAL},</if>
            <if test="scoreSeller != null">tsi_score_seller=#{scoreSeller,jdbcType=DECIMAL},</if>
            <if test="scoreLogistics != null">tsi_score_logistics=#{scoreLogistics,jdbcType=DECIMAL},</if>
@@ -197,4 +201,16 @@
            GROUP BY t.`sellerId` HAVING totalGoods<![CDATA[>]]> 2)a
    </select>
    
    <select id="getShopByKey"  resultMap="BaseResultVOMap" >
        SELECT * FROM (SELECT COUNT(t.`id`) AS totalGoods,po.* FROM  yeshi_ec_taobao_shop_info po
                        LEFT JOIN `yeshi_ec_taobao_goods` t  ON t.`sellerId` = po.`tsi_id`
                        WHERE <![CDATA[t.`couponAmount` > 0 AND po.`tsi_key` LIKE '%${key}%'
                        GROUP BY t.`sellerId` HAVING totalGoods> 2]]>)A
        LEFT JOIN (SELECT t.*,po.`tsi_id` FROM  yeshi_ec_taobao_shop_info po
                    LEFT JOIN `yeshi_ec_taobao_goods` t  ON t.`sellerId` = po.`tsi_id`
                    WHERE<![CDATA[ t.`couponAmount` > 0 ]]>AND po.`tsi_key` LIKE '%${key}%'
                    ORDER BY t.`biz30day` DESC
                    LIMIT 3)B ON B.`tsi_id` = A.`tsi_id`
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserInfoDeleteRecordMapper.xml
New file
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeshi.fanli.dao.mybatis.user.UserInfoDeleteRecordMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.UserInfoDeleteRecord">
    <id column="udr_id" property="id" jdbcType="BIGINT"/>
    <result column="udr_state" property="state" jdbcType="INTEGER"/>
    <result column="udr_reason" property="reason" jdbcType="VARCHAR"/>
    <result column="udr_create_time" property="createTime" jdbcType="TIMESTAMP"/>
     <association property="userInfo" column="udr_uid" javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
        <id column="udr_uid" property="id" jdbcType="BIGINT" />
    </association>
  </resultMap>
  <sql id="Base_Column_List">udr_id,udr_uid,udr_state,udr_reason,udr_create_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_user_delete_record where udr_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_delete_record where udr_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoDeleteRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_delete_record (udr_id,udr_uid,udr_state,udr_reason,udr_create_time) values (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{state,jdbcType=INTEGER},#{reason,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoDeleteRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_delete_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">udr_id,</if>
      <if test="userInfo != null">udr_uid,</if>
      <if test="state != null">udr_state,</if>
      <if test="reason != null">udr_reason,</if>
      <if test="createTime != null">udr_create_time,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="userInfo != null">#{userInfo.id,jdbcType=BIGINT},</if>
      <if test="state != null">#{state,jdbcType=INTEGER},</if>
      <if test="reason != null">#{reason,jdbcType=VARCHAR},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoDeleteRecord">update yeshi_ec_user_delete_record set udr_uid = #{userInfo.id,jdbcType=BIGINT},udr_state = #{state,jdbcType=INTEGER},udr_reason = #{reason,jdbcType=VARCHAR},udr_create_time = #{createTime,jdbcType=TIMESTAMP} where udr_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoDeleteRecord">update yeshi_ec_user_delete_record
    <set>
      <if test="userInfo != null">udr_uid=#{userInfo.id,jdbcType=BIGINT},</if>
      <if test="state != null">udr_state=#{state,jdbcType=INTEGER},</if>
      <if test="reason != null">udr_reason=#{reason,jdbcType=VARCHAR},</if>
      <if test="createTime != null">udr_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
    </set> where udr_id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserInfoExtraMapper.xml
@@ -10,6 +10,7 @@
    <result column="uie_invite_code" property="inviteCode" jdbcType="VARCHAR"/>
    <result column="uie_lottery_newbies" property="lotteryNewbies" jdbcType="INTEGER"/>
    <result column="uie_coupon_news" property="couponNews" jdbcType="INTEGER"/>
    <result column="uie_synch_navbar" property="synchNavbar" jdbcType="VARCHAR"/>
    <result column="uie_first_login_time" property="firstLoginTime" jdbcType="TIMESTAMP"/>
    <result column="uie_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="uie_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
@@ -31,6 +32,7 @@
    <result column="uie_invite_code" property="inviteCode" jdbcType="VARCHAR"/>
    <result column="uie_lottery_newbies" property="lotteryNewbies" jdbcType="INTEGER"/>
    <result column="uie_coupon_news" property="couponNews" jdbcType="INTEGER"/>
    <result column="uie_synch_navbar" property="synchNavbar" jdbcType="VARCHAR"/>
    <result column="uie_first_login_time" property="firstLoginTime" jdbcType="TIMESTAMP"/>
    <result column="uie_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="uie_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
@@ -43,7 +45,7 @@
          
  </resultMap>
  
  <sql id="Base_Column_List">uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_lottery_newbies,uie_coupon_news,uie_first_login_time,uie_create_time,uie_update_time</sql>
  <sql id="Base_Column_List">uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_lottery_newbies,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_create_time,uie_update_time</sql>
 
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_user_info_extra where uie_id = #{id,jdbcType=BIGINT}
@@ -51,7 +53,7 @@
  
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_info_extra where uie_id = #{id,jdbcType=BIGINT}</delete>
  
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_info_extra (uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_lottery_newbies,uie_coupon_news,uie_first_login_time,uie_create_time,uie_update_time) values (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{userRank.id,jdbcType=BIGINT},#{rankSource,jdbcType=INTEGER},#{rankOrderNum,jdbcType=INTEGER},#{rankUpdateTime,jdbcType=TIMESTAMP},#{inviteCode,jdbcType=VARCHAR},#{lotteryNewbies,jdbcType=INTEGER},#{couponNews,jdbcType=INTEGER},#{firstLoginTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_info_extra (uie_id,uie_uid,uie_rank_id,uie_rank_source,uie_rank_order_num,uie_rank_update_time,uie_invite_code,uie_lottery_newbies,uie_coupon_news,uie_synch_navbar,uie_first_login_time,uie_create_time,uie_update_time) values (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{userRank.id,jdbcType=BIGINT},#{rankSource,jdbcType=INTEGER},#{rankOrderNum,jdbcType=INTEGER},#{rankUpdateTime,jdbcType=TIMESTAMP},#{inviteCode,jdbcType=VARCHAR},#{lotteryNewbies,jdbcType=INTEGER},#{couponNews,jdbcType=INTEGER},#{synchNavbar,jdbcType=VARCHAR},#{firstLoginTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_info_extra
    <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -64,6 +66,7 @@
      <if test="inviteCode != null">uie_invite_code,</if>
      <if test="lotteryNewbies != null">uie_lottery_newbies,</if>
      <if test="couponNews != null">uie_coupon_news,</if>
      <if test="synchNavbar != null">uie_synch_navbar,</if>
      <if test="firstLoginTime != null">uie_first_login_time,</if>
      <if test="createTime != null">uie_create_time,</if>
      <if test="updateTime != null">uie_update_time,</if>
@@ -78,12 +81,13 @@
      <if test="inviteCode != null">#{inviteCode,jdbcType=VARCHAR},</if>
      <if test="lotteryNewbies != null">#{lotteryNewbies,jdbcType=INTEGER},</if>
      <if test="couponNews != null">#{couponNews,jdbcType=INTEGER},</if>
      <if test="synchNavbar != null">#{synchNavbar,jdbcType=VARCHAR},</if>
      <if test="firstLoginTime != null">#{firstLoginTime,jdbcType=TIMESTAMP},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">update yeshi_ec_user_info_extra set uie_uid = #{userInfo.id,jdbcType=BIGINT},uie_rank_id = #{userRank.id,jdbcType=BIGINT},uie_rank_source = #{rankSource,jdbcType=INTEGER},uie_rank_order_num = #{rankOrderNum,jdbcType=INTEGER},uie_rank_update_time = #{rankUpdateTime,jdbcType=TIMESTAMP},uie_invite_code = #{inviteCode,jdbcType=VARCHAR},uie_lottery_newbies = #{lotteryNewbies,jdbcType=INTEGER},uie_coupon_news = #{couponNews,jdbcType=INTEGER},uie_first_login_time = #{firstLoginTime,jdbcType=TIMESTAMP},uie_create_time = #{createTime,jdbcType=TIMESTAMP},uie_update_time = #{updateTime,jdbcType=TIMESTAMP} where uie_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">update yeshi_ec_user_info_extra set uie_uid = #{userInfo.id,jdbcType=BIGINT},uie_rank_id = #{userRank.id,jdbcType=BIGINT},uie_rank_source = #{rankSource,jdbcType=INTEGER},uie_rank_order_num = #{rankOrderNum,jdbcType=INTEGER},uie_rank_update_time = #{rankUpdateTime,jdbcType=TIMESTAMP},uie_invite_code = #{inviteCode,jdbcType=VARCHAR},uie_lottery_newbies = #{lotteryNewbies,jdbcType=INTEGER},uie_coupon_news = #{couponNews,jdbcType=INTEGER},uie_synch_navbar = #{synchNavbar,jdbcType=VARCHAR},uie_first_login_time = #{firstLoginTime,jdbcType=TIMESTAMP},uie_create_time = #{createTime,jdbcType=TIMESTAMP},uie_update_time = #{updateTime,jdbcType=TIMESTAMP} where uie_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserInfoExtra">update yeshi_ec_user_info_extra
    <set>
      <if test="userInfo != null">uie_uid=#{userInfo.id,jdbcType=BIGINT},</if>
@@ -94,6 +98,7 @@
      <if test="inviteCode != null">uie_invite_code=#{inviteCode,jdbcType=VARCHAR},</if>
      <if test="lotteryNewbies != null">uie_lottery_newbies=#{lotteryNewbies,jdbcType=INTEGER},</if>
      <if test="couponNews != null">uie_coupon_news=#{couponNews,jdbcType=INTEGER},</if>
      <if test="synchNavbar != null">uie_synch_navbar=#{synchNavbar,jdbcType=VARCHAR},</if>
      <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},</if>
      <if test="createTime != null">uie_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">uie_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
@@ -109,6 +114,7 @@
      <if test="inviteCode != null">uie_invite_code=#{inviteCode,jdbcType=VARCHAR},</if>
      <if test="lotteryNewbies != null">uie_lottery_newbies=#{lotteryNewbies,jdbcType=INTEGER},</if>
      <if test="couponNews != null">uie_coupon_news=#{couponNews,jdbcType=INTEGER},</if>
      <if test="synchNavbar != null">uie_synch_navbar=#{synchNavbar,jdbcType=VARCHAR},</if>
      <if test="createTime != null">uie_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="firstLoginTime != null">uie_first_login_time=#{firstLoginTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">uie_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
fanli/src/main/java/com/yeshi/fanli/service/impl/clazz/GoodsSubClassLabelServiceImpl.java
@@ -5,16 +5,19 @@
import javax.annotation.Resource;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.yeshi.fanli.dao.mybatis.clazz.GoodsSubClassLabelMapMapper;
import com.yeshi.fanli.dao.mybatis.clazz.GoodsSubClassLabelMapper;
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel;
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap;
import com.yeshi.fanli.exception.GoodsClassException;
import com.yeshi.fanli.service.inter.clazz.GoodsSubClassLabelService;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO;
@Service
public class GoodsSubClassLabelServiceImpl implements GoodsSubClassLabelService {
@@ -87,8 +90,39 @@
    @Override
    public GoodsSubClassLabelMap selectBySubClassId(Long subClassId) {
        return goodsSubClassLabelMapMapper.selectBySubClassId(subClassId);
    }
    @Override
    @Cacheable(value = "classCache", key = "'listSubMapCache-'+#classId")
    public List<GoodsSubClassLabelVO> listSubMapCache(Long classId) {
        List<GoodsSubClassLabelVO> list = goodsSubClassLabelMapper.listSubMapByClassId(classId);
        if (list == null || list.size() == 0) {
            return list;
        }
        for (int i = 0; i < list.size(); i++) {
            GoodsSubClassLabelVO labelVO = list.get(i);
            List<GoodsSubClass> listSub = labelVO.getListSub();
            if (listSub == null || listSub.size() == 0) {
                list.remove(labelVO);
                i--;
                continue;
            }
            for (GoodsSubClass goodsSubClass: listSub) {
                String pictureSecond = goodsSubClass.getPictureSecond();
                if (!StringUtil.isNullOrEmpty(pictureSecond)) {
                    goodsSubClass.setPicture(pictureSecond);
                }
            }
            labelVO.setListSub(listSub);
        }
        return list;
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonGoodsServiceImpl.java
@@ -158,9 +158,14 @@
        return commonGoodsMapper.listBySellerId(sellerId);
    } 
    
    @Override
    public long countBySellerIdAndHasCoupon(Long sellerId) {
        return commonGoodsMapper.countBySellerIdAndHasCoupon(sellerId);
    }
    @Override
    public List<CommonGoods> getByListGoodsId(List<Long> list) {
        return commonGoodsMapper.getByListGoodsId(list);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsClassServiceImpl.java
@@ -309,7 +309,7 @@
    @Override
    @Cacheable(value = "classCache", key = "'getEffectiveClassCache'")
    public List<GoodsClass> getEffectiveClassCache() throws Exception {
    public List<GoodsClass> getEffectiveClassCache() {
        return goodsClassMapper.getEffectiveClass();
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarServiceImpl.java
@@ -305,6 +305,20 @@
    public List<HomeNavbar> listQueryEffectiveNavbar() {
        return homeNavbarMapper.listQueryEffective();
    }
    @Override
    @Cacheable(value = "configCache", key = "'listQueryDefaultNavbar'")
    public List<HomeNavbar> listQueryDefaultNavbar() {
        return homeNavbarMapper.listQueryDefaultNavbar();
    }
    @Override
    @Cacheable(value = "configCache", key = "'listQueryFixedNavbar'")
    public List<HomeNavbar> listQueryFixedNavbar() {
        return homeNavbarMapper.listQueryFixedNavbar();
    }
    @Override
    public HomeNavbar getEffectiveByClassId(Long classId) {
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarUserServiceImpl.java
New file
@@ -0,0 +1,257 @@
package com.yeshi.fanli.service.impl.homemodule;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.homemodule.HomeNavbarUserMapper;
import com.yeshi.fanli.entity.bus.homemodule.HomeNavbar;
import com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser;
import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
import com.yeshi.fanli.exception.homemodule.HomeNavbarUserException;
import com.yeshi.fanli.exception.user.UserInfoExtraException;
import com.yeshi.fanli.service.inter.homemodule.HomeNavbarService;
import com.yeshi.fanli.service.inter.homemodule.HomeNavbarUserService;
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.util.StringUtil;
@Service
public class HomeNavbarUserServiceImpl implements HomeNavbarUserService {
    @Resource
    private HomeNavbarUserMapper homeNavbarUserMapper;
    @Resource
    private HomeNavbarService homeNavbarService;
    @Resource
    private UserInfoExtraService userInfoExtraService;
    @Override
    public List<HomeNavbar> listEffectiveNavbar(Long uid, String device) {
        List<HomeNavbar> list = new ArrayList<HomeNavbar>();
        if (uid != null || !StringUtil.isNullOrEmpty(device)) {
            if (uid != null) {
                device = null;
            }
            // 自定义导航
            List<HomeNavbarUser> listUserNavbar = homeNavbarUserMapper.listEffectiveNavbars(uid, device);
            if (listUserNavbar != null && listUserNavbar.size() > 0) {
                // 固定导航
                List<HomeNavbar> listFixed = homeNavbarService.listQueryFixedNavbar();
                if (listFixed != null && listFixed.size() > 0) {
                    list.addAll(listFixed);
                }
                // 遍历用户自定义
                for (HomeNavbarUser uomeNavbarUser : listUserNavbar) {
                    HomeNavbar homeNavbar = uomeNavbarUser.getHomeNavbar();
                    if (homeNavbar == null) {
                        continue;
                    }
                    // 是否是固定项
                    boolean notExist = true;
                    if (listFixed != null && listFixed.size() > 0) {
                        long id = homeNavbar.getId();
                        for (HomeNavbar fixedbar : listFixed) {
                            long fixedId = fixedbar.getId();
                            if (fixedId == id) {
                                notExist = false;
                                listFixed.remove(fixedbar);
                                break;
                            }
                        }
                    }
                    if (notExist) {
                        list.add(homeNavbar);
                    }
                }
            }
        }
        if (list.size() == 0) {
            list = homeNavbarService.listQueryDefaultNavbar();
        }
        return list;
    }
    @Override
    public List<HomeNavbarUser> listUserNavbar(Long uid, String device) throws HomeNavbarUserException {
        if (uid == null && StringUtil.isNullOrEmpty(device)) {
            throw new HomeNavbarUserException(1, "参数不正确");
        }
        if (uid != null && !StringUtil.isNullOrEmpty(device)) {
            device = null;
        }
        return homeNavbarUserMapper.listEffectiveNavbars(uid, device);
    }
    @Override
    public void addNavbarUser(Long uid, String device, List<Long> list) throws HomeNavbarUserException {
        if (uid == null && StringUtil.isNullOrEmpty(device)) {
            throw new HomeNavbarUserException(1, "参数不正确");
        }
        if (list == null || list.size() < 6) {
            throw new HomeNavbarUserException(1, "至少保留6个分类");
        }
        if (list.size() > 16) {
            throw new HomeNavbarUserException(1, "最多显示16个分类");
        }
        // 登录之后 以uid为准
        if (uid != null && !StringUtil.isNullOrEmpty(device)) {
            device = null;
        }
        // 设置已同步
        UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
        if (userInfoExtra != null && !userInfoExtra.getSynchNavbar()) {
            try {
                UserInfoExtra updateExtra = new UserInfoExtra();
                updateExtra.setSynchNavbar(true);
                updateExtra.setId(userInfoExtra.getId());
                userInfoExtraService.saveUserInfoExtra(updateExtra);
            } catch (UserInfoExtraException e) {
                e.printStackTrace();
            }
        }
        List<HomeNavbarUser> listInsert = new ArrayList<HomeNavbarUser>();
        List<HomeNavbarUser> listUpdate = new ArrayList<HomeNavbarUser>();
        // 之前已经定义的导航数据
        List<HomeNavbarUser> listMyNavbars = homeNavbarUserMapper.listMyNavbars(uid, device);
        for (int i = 0; i < list.size(); i++) {
            HomeNavbarUser navbarUser = null;
            if (list.get(i) == null) {
                i--;
                continue;
            }
            long homeId = list.get(i);
            if (listMyNavbars != null && listMyNavbars.size() > 0) {
                for (int j = 0; j < listMyNavbars.size(); j++) {
                    HomeNavbarUser homeNavbarUser = listMyNavbars.get(j);
                    HomeNavbar homeNavbar = homeNavbarUser.getHomeNavbar();
                    if (homeNavbar == null) {
                        listMyNavbars.remove(homeNavbarUser);
                        j--;
                        continue;
                    }
                    long id = homeNavbar.getId();
                    if (homeId == id) {
                        navbarUser = new HomeNavbarUser();
                        navbarUser.setId(homeNavbarUser.getId());
                        navbarUser.setOrder(homeNavbarUser.getOrder());
                        listMyNavbars.remove(homeNavbarUser);
                        break;
                    }
                }
            }
            if (navbarUser != null) {
                Integer order = navbarUser.getOrder();
                if (order != null && i + 1 == order.intValue()) {
                    continue;
                }
                navbarUser.setOrder(i + 1);
                listUpdate.add(navbarUser);
            } else {
                navbarUser = new HomeNavbarUser();
                navbarUser.setOrder(i + 1);
                navbarUser.setUid(uid);
                navbarUser.setDevice(device);
                navbarUser.setHomeNavbar(new HomeNavbar(homeId));
                navbarUser.setCreateTime(new Date());
                listInsert.add(navbarUser);
            }
        }
        // 更新
        if (listUpdate.size() > 0) {
            homeNavbarUserMapper.updateSelectiveBatch(listUpdate);
        }
        // 新增
        if (listInsert.size() > 0) {
            homeNavbarUserMapper.insertBatch(listInsert);
        }
        // 删除
        if (listMyNavbars != null && listMyNavbars.size() > 0) {
            List<Long> listId = new ArrayList<Long>();
            for (HomeNavbarUser homeNavbarUser : listMyNavbars) {
                listId.add(homeNavbarUser.getId());
            }
            homeNavbarUserMapper.deleteByPrimaryKeyBatch(listId);
        }
    }
    @Override
    public List<HomeNavbar> restoreSystemDefault(Long uid, String device) throws HomeNavbarUserException {
        if (uid == null && StringUtil.isNullOrEmpty(device)) {
            throw new HomeNavbarUserException(1, "参数不正确");
        }
        // 删除用户自定义导航
        if (uid != null) {
            homeNavbarUserMapper.deleteByUid(uid);
        } else {
            homeNavbarUserMapper.deleteByDevice(device);
        }
        // 返回有效的
        return homeNavbarService.listQueryEffectiveNavbar();
    }
    @Override
    public void synchroDeviceToUser(Long uid, String device) {
        UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
        if (userInfoExtra == null) {
            userInfoExtra = new UserInfoExtra();
        } else if (userInfoExtra.getSynchNavbar()) {
            return;
        }
        List<HomeNavbarUser> listDevice = homeNavbarUserMapper.listMyNavbars(null, device);
        if (listDevice == null || listDevice.size() == 0) {
            return;
        }
        // 同步设备定义导航
        for (HomeNavbarUser homeNavbarUser : listDevice) {
            homeNavbarUser.setId(null);
            homeNavbarUser.setDevice(null);
            homeNavbarUser.setUid(uid);
            homeNavbarUser.setCreateTime(new Date());
        }
        homeNavbarUserMapper.insertBatch(listDevice);
        // 已同步
        try {
            UserInfoExtra updateExtra = new UserInfoExtra();
            updateExtra.setSynchNavbar(true);
            updateExtra.setId(userInfoExtra.getId());
            userInfoExtraService.saveUserInfoExtra(updateExtra);
        } catch (UserInfoExtraException e) {
            e.printStackTrace();
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFactoryServiceImpl.java
@@ -446,8 +446,11 @@
        for (TaoBaoGoodsBrief goodsBrief : goodsList) {
            listAuctionId.add(goodsBrief.getAuctionId());
        }
        List<Long> listHas = taoBaoGoodsBriefService.listExistById(listAuctionId);
        List<Long> listHas =  new ArrayList<Long>();
        if (listAuctionId.size() > 0) {
            listHas = taoBaoGoodsBriefService.listExistById(listAuctionId);
        }
        
        
        // 遍历商品
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoPunishOrderServiceImpl.java
@@ -21,10 +21,10 @@
import com.yeshi.fanli.service.inter.order.CommonOrderService;
import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoPunishOrderService;
import com.yeshi.fanli.service.inter.user.UserAccountService;
import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
@Service
public class TaoBaoPunishOrderServiceImpl implements TaoBaoPunishOrderService {
@@ -46,6 +46,9 @@
    @Resource
    private UserInfoService userInfoService;
    @Resource
    private UserAccountService userAccountService;
    @Transactional
    @Override
@@ -131,7 +134,7 @@
        for (Iterator<Long> its = uidSets.iterator(); its.hasNext();) {
            Long uid = its.next();
            userInfoService.forbiddenUser(uid, "产生违规订单自动封禁");
            userAccountService.forbiddenUserAll(uid, "产生违规订单自动封禁");
        }
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoShopServiceImpl.java
@@ -1,20 +1,25 @@
package com.yeshi.fanli.service.impl.taobao;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import javax.annotation.Resource;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.yeshi.utils.tencentcloud.COSManager;
import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoShopMapper;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
import com.yeshi.fanli.entity.taobao.TaoBaoShop;
import com.yeshi.fanli.entity.taobao.TaoBaoShopInfo;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.db.MongoDBManager;
@@ -30,6 +35,9 @@
    @Resource
    private TaoBaoShopMapper taoBaoShopMapper;
    @Resource
    private HongBaoManageService hongBaoManageService;
    @Override
    public TaoBaoShopInfo getTaoBaoShopInfo(TaoBaoGoodsBrief goodsInfo) {
@@ -153,4 +161,40 @@
        return shop;
    }
    @Override
    @Cacheable(value = "brandCache", key = "'getShopByKey-'+#key")
    public List<TaoBaoShopVO> getShopByKey(String key) {
        List<TaoBaoShopVO> list = taoBaoShopMapper.getShopByKey(key);
        if (list == null || list.size() == 0) {
            return null;
        }
        BigDecimal proportion = hongBaoManageService.getFanLiRate();
        for (TaoBaoShopVO taoBaoShopVO : list) {
            String shopLink = taoBaoShopVO.getShopLink();
            if (StringUtil.isNullOrEmpty(shopLink)) {
                taoBaoShopVO.setShopLink(TaoBaoUtil.getShopLink(taoBaoShopVO.getId()));
            }
            String shopNameCustom = taoBaoShopVO.getShopNameCustom();
            if (!StringUtil.isNullOrEmpty(shopNameCustom)) {
                taoBaoShopVO.setShopName(shopNameCustom);
            }
            String shopIconCustom = taoBaoShopVO.getShopIconCustom();
            if (!StringUtil.isNullOrEmpty(shopIconCustom)) {
                taoBaoShopVO.setShopIcon(shopIconCustom);
            }
            List<TaoBaoGoodsBriefExtra> listGoods = new ArrayList<TaoBaoGoodsBriefExtra>();
            List<TaoBaoGoodsBrief> listGoodsBrief = taoBaoShopVO.getListGoodsBrief();
            for (TaoBaoGoodsBrief taoBaoGoodsBrief : listGoodsBrief) {
                listGoods.add(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null));
            }
            taoBaoShopVO.setListGoods(listGoods);
        }
        return list;
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java
@@ -31,9 +31,11 @@
import com.yeshi.fanli.entity.bus.user.ThreeSale;
import com.yeshi.fanli.entity.bus.user.UserAccountBindingHistory;
import com.yeshi.fanli.entity.bus.user.UserConnectHistory;
import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.bus.user.WeiXinUser;
import com.yeshi.fanli.exception.UserAccountException;
import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
import com.yeshi.fanli.service.inter.msg.UserAccountMsgNotificationService;
@@ -43,7 +45,9 @@
import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService;
import com.yeshi.fanli.service.inter.user.UserAccountService;
import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.FileUtil;
import com.yeshi.fanli.util.RedisManager;
@@ -62,6 +66,9 @@
    @Resource
    private UserInfoMapper userInfoMapper;
    @Resource
    private UserInfoService userInfoService;
    @Resource
    private BindingAccountService bindingAccountService;
@@ -92,6 +99,10 @@
    @Resource
    private UserAccountBindingHistoryService userAccountBindingHistoryService;
    @Resource
    private UserInfoDeleteRecordService userInfoDeleteRecordService;
    @Transactional
    @Override
@@ -537,6 +548,9 @@
        int addCount = 0;
        userAccountMsgNotificationService.connectSuccess(mainUser.getId(), lessUser.getId());
        userInfoDeleteRecordService.addDeleteRecord(lessUser.getId(), UserInfo.STATE_DELETE, "删除:账号被打通删除");
    }
    /**
@@ -1168,4 +1182,131 @@
        userAccountMsgNotificationService.bindingSuccess(uid, MsgAccountDetailFactory.TYPE_WX);
    }
    @Override
    public void forbiddenUserAll(Long uid, String reason) {
        UserInfo currentInfo = userInfoService.selectByPKey(uid);
        if (currentInfo == null) {
            return;
        }
        if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
            return;
        }
        currentInfo.setState(UserInfo.STATE_FORBIDDEN);
        currentInfo.setStateDesc(reason);
        userInfoService.updateByPrimaryKeySelective(currentInfo);
        // 插入记录
        userInfoDeleteRecordService.addDeleteRecord(uid, UserInfo.STATE_FORBIDDEN, reason);
        // 加入封禁的账号列表
        ForbiddenUserIdentifyCode forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
        forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.wxUnionId);
        forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getWxUnionId());
        forbiddenUserIdentifyCode.setBeiZhu(currentInfo.getWxName());
        try {
            forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
        } catch (ForbiddenUserIdentifyCodeException e) {
            e.printStackTrace();
        }
        // 电话号码
        forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
        forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.phone);
        forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getPhone());
        try {
            forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
        } catch (ForbiddenUserIdentifyCodeException e) {
            e.printStackTrace();
        }
        // 淘宝
        UserExtraTaoBaoInfo taoBao = userExtraTaoBaoInfoService.getByUid(uid);
        if (taoBao != null && !StringUtil.isNullOrEmpty(taoBao.getTaoBaoUid())) {
            forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
            forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid);
            forbiddenUserIdentifyCode.setIdentifyCode(taoBao.getTaoBaoUid());
            try {
                forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
            } catch (ForbiddenUserIdentifyCodeException e) {
                e.printStackTrace();
            }
        }
        // 查询支付宝绑定
        List<BindingAccount> list = bindingAccountService.getBindingAccountByUid(uid);
        if (list != null) {
            for (BindingAccount ba : list) {
                forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
                forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.alipayAccount);
                forbiddenUserIdentifyCode.setIdentifyCode(ba.getAccount());
                forbiddenUserIdentifyCode.setBeiZhu(ba.getName());
                try {
                    forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
                } catch (ForbiddenUserIdentifyCodeException e) {
                    e.printStackTrace();
                }
            }
        }
    }
    @Override
    public void forbiddenUser(Long uid, String reason) {
        UserInfo currentInfo = userInfoService.selectByPKey(uid);
        if (currentInfo == null) {
            return;
        }
        if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
            return;
        }
        currentInfo.setState(UserInfo.STATE_FORBIDDEN);
        currentInfo.setStateDesc(reason);
        userInfoService.updateByPrimaryKeySelective(currentInfo);
        // 插入记录
        userInfoDeleteRecordService.addDeleteRecord(uid, UserInfo.STATE_FORBIDDEN, reason);
    }
    @Override
    public void DeleteUser(Long uid, String reason) {
        UserInfo currentInfo = userInfoService.selectByPKey(uid);
        if (currentInfo == null) {
            return;
        }
        if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
            return;
        }
        currentInfo.setState(UserInfo.STATE_DELETE);
        currentInfo.setStateDesc(reason);
        userInfoService.updateByPrimaryKeySelective(currentInfo);
        // 插入记录
        userInfoDeleteRecordService.addDeleteRecord(uid, UserInfo.STATE_DELETE, reason);
    }
    @Override
    public void DeleteUserOutOfDate(Long uid, String reason) {
        UserInfo currentInfo = userInfoService.selectByPKey(uid);
        if (currentInfo == null) {
            return;
        }
        if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
            return;
        }
        currentInfo.setState(UserInfo.STATE_DELETE_OUT_OF_DATE);
        currentInfo.setStateDesc(reason);
        userInfoService.updateByPrimaryKeySelective(currentInfo);
        // 插入记录
        userInfoDeleteRecordService.addDeleteRecord(uid, UserInfo.STATE_DELETE_OUT_OF_DATE, reason);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoDeleteRecordServiceImpl.java
New file
@@ -0,0 +1,32 @@
package com.yeshi.fanli.service.impl.user;
import java.util.Date;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.user.UserInfoDeleteRecordMapper;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.bus.user.UserInfoDeleteRecord;
import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
@Service
public class UserInfoDeleteRecordServiceImpl implements UserInfoDeleteRecordService {
    @Resource
    private UserInfoDeleteRecordMapper userInfoDeleteRecordMapper;
    @Override
    public void addDeleteRecord(Long uid, int state, String reason) {
         UserInfoDeleteRecord  record = new  UserInfoDeleteRecord();
         record.setState(state);
         record.setReason(reason);
         record.setUserInfo(new UserInfo(uid));
         record.setCreateTime(new Date());
         userInfoDeleteRecordMapper.insertSelective(record);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoExtraServiceImpl.java
@@ -150,7 +150,10 @@
    }
    @Override
    public UserInfoExtra updateUserRankByUid(Long uid) throws UserInfoExtraException{
    public void updateUserRankByUid(Long uid) throws UserInfoExtraException{
        if (uid == null || uid == 0) {
            return;
        }
        
        boolean isupdateRank = true;
        
@@ -173,8 +176,6 @@
        if (isupdateRank) {
            updateRank(userInfoExtra);
        }
        return userInfoExtra;
    }
    
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java
@@ -994,69 +994,4 @@
        userInfoMapper.updateByPrimaryKeySelective(userInfo);
    }
    @Override
    public void forbiddenUser(Long uid, String reason) {
        UserInfo currentInfo = userInfoService.selectByPKey(uid);
        if (currentInfo == null) {
            return;
        }
        if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
            return;
        }
        currentInfo.setState(UserInfo.STATE_FORBIDDEN);
        currentInfo.setStateDesc(reason);
        userInfoService.updateByPrimaryKeySelective(currentInfo);
        // 加入封禁的账号列表
        ForbiddenUserIdentifyCode forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
        forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.wxUnionId);
        forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getWxUnionId());
        forbiddenUserIdentifyCode.setBeiZhu(currentInfo.getWxName());
        try {
            forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
        } catch (ForbiddenUserIdentifyCodeException e) {
            e.printStackTrace();
        }
        // 电话号码
        forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
        forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.phone);
        forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getPhone());
        try {
            forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
        } catch (ForbiddenUserIdentifyCodeException e) {
            e.printStackTrace();
        }
        // 淘宝
        UserExtraTaoBaoInfo taoBao = userExtraTaoBaoInfoService.getByUid(uid);
        if (taoBao != null && !StringUtil.isNullOrEmpty(taoBao.getTaoBaoUid())) {
            forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
            forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid);
            forbiddenUserIdentifyCode.setIdentifyCode(taoBao.getTaoBaoUid());
            try {
                forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
            } catch (ForbiddenUserIdentifyCodeException e) {
                e.printStackTrace();
            }
        }
        // 查询支付宝绑定
        List<BindingAccount> list = bindingAccountService.getBindingAccountByUid(uid);
        if (list != null) {
            for (BindingAccount ba : list) {
                forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
                forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.alipayAccount);
                forbiddenUserIdentifyCode.setIdentifyCode(ba.getAccount());
                forbiddenUserIdentifyCode.setBeiZhu(ba.getName());
                try {
                    forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
                } catch (ForbiddenUserIdentifyCodeException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserShareGoodsRecordServiceImpl.java
@@ -643,7 +643,7 @@
        recordDTO.setSource(ShareSourceTypeEnum.goodsDetail);
        // 分享id
        String key = StringUtil.Md5(uid + "#" + auctionId);
        String key = StringUtil.Md5(uid + "#GoodsDetail#" + auctionId);
        redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
        recordDTO.setRedisKey(key);
@@ -681,7 +681,7 @@
        recordDTO.setSource(ShareSourceTypeEnum.storage);
        // 缓存分享商品信息
        String key = StringUtil.Md5(uid + "##" + id);
        String key = StringUtil.Md5(uid + "#GoodsStorage#" + id);
        recordDTO.setRedisKey(key);
        redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
@@ -720,7 +720,7 @@
        recordDTO.setSharePictureUrl(uploadResult.getUrl());
        recordDTO.setSource(ShareSourceTypeEnum.activity);
        // 缓存分享商品信息
        String key = StringUtil.Md5(uid + "##" + id);
        String key = StringUtil.Md5(uid + "#Activity#" + id);
        recordDTO.setRedisKey(key);
        redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
@@ -756,7 +756,7 @@
        recordDTO.setSource(ShareSourceTypeEnum.activity);
        // 缓存分享商品信息
        String key = StringUtil.Md5(uid + "##" + id);
        String key = StringUtil.Md5(uid + "#Dynamic#" + id);
        recordDTO.setRedisKey(key);
        redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
@@ -889,7 +889,7 @@
            }
        }
        InputStream inputStream = ImageUtil.drawGoodsShareBigImg(erCodeInputStream, portrait, listGoods);
        InputStream inputStream = ImageUtil.drawGoodsSharePicture(erCodeInputStream, portrait, listGoods);
        FileUploadResult shareImg = COSManager.getInstance().uploadInputStream(inputStream,
                "sharegoods/share_" + uid + "_" + shareId + "_" + System.currentTimeMillis() + ".png");
fanli/src/main/java/com/yeshi/fanli/service/inter/clazz/GoodsSubClassLabelService.java
@@ -5,6 +5,7 @@
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel;
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap;
import com.yeshi.fanli.exception.GoodsClassException;
import com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO;
/**
 * 二级分类的标签服务
@@ -69,4 +70,11 @@
     */
    public GoodsSubClassLabelMap selectBySubClassId(Long subClassId);
    /**
     * 查询二级分类、标签
     * @param classId
     * @return
     */
    public List<GoodsSubClassLabelVO> listSubMapCache(Long classId);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/CommonGoodsService.java
@@ -84,4 +84,12 @@
     */
    public long countBySellerIdAndHasCoupon(Long sellerId);
    /**
     * 批量商品id查询商品信息
     * @param list
     * @return
     */
    public List<CommonGoods> getByListGoodsId(List<Long> list);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/goods/GoodsClassService.java
@@ -71,7 +71,7 @@
     * @return
     * @throws Exception
     */
    public List<GoodsClass> getEffectiveClassCache() throws Exception;
    public List<GoodsClass> getEffectiveClassCache();
    /**
     * 查询所有分类、主子类目
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/HomeNavbarService.java
@@ -69,5 +69,18 @@
     * @return
     */
    public HomeNavbar getEffectiveByClassId(@Param("classId") Long classId);
    /**
     * 默认导航栏
     * @return
     */
    public List<HomeNavbar> listQueryDefaultNavbar();
    /**
     *  固定的导航栏
     * @return
     */
    public List<HomeNavbar> listQueryFixedNavbar();
    
}
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/HomeNavbarUserService.java
New file
@@ -0,0 +1,52 @@
package com.yeshi.fanli.service.inter.homemodule;
import java.util.List;
import com.yeshi.fanli.entity.bus.homemodule.HomeNavbar;
import com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser;
import com.yeshi.fanli.exception.homemodule.HomeNavbarUserException;
public interface HomeNavbarUserService {
    /**
     * 查询导航栏
     * @return
     */
    public List<HomeNavbar> listEffectiveNavbar(Long uid, String device);
    /**
     * 保存用户自定义
     * @param uid
     * @param device
     * @param list
     * @throws HomeNavbarUserException
     */
    public void addNavbarUser(Long uid, String device, List<Long> list) throws HomeNavbarUserException;
    /**
     * 还原默认导航栏
     * @param uid
     * @param device
     * @throws HomeNavbarUserException
     */
    public List<HomeNavbar> restoreSystemDefault(Long uid, String device) throws HomeNavbarUserException;
    /**
     * 查询用户已选导航栏
     * @param uid
     * @param device
     * @return
     * @throws HomeNavbarUserException
     */
    public List<HomeNavbarUser> listUserNavbar(Long uid, String device) throws HomeNavbarUserException;
    /**
     * 同步设备上的设置
     * @param uid
     * @param device
     */
    public void synchroDeviceToUser(Long uid, String device);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/taobao/TaoBaoShopService.java
@@ -59,5 +59,12 @@
     */
    public List<TaoBaoShopVO> listBrandShopinfo(long start, int count, Long cid);
    long countBrandShopinfo(Long cid);
    public long countBrandShopinfo(Long cid);
    /**
     * 根据店铺搜索关键词查找
     * @param key
     * @return
     */
    public List<TaoBaoShopVO> getShopByKey(String key);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserAccountService.java
@@ -208,4 +208,32 @@
     * @throws UserAccountException
     */
    public void bindWeiXin(Long uid, String code) throws UserAccountException;
    /**
     * 账户封禁
     * @param uid
     * @param reason
     */
    public void forbiddenUser(Long uid, String reason);
    /**
     * 封禁用户所有信息:手机号、微信、淘宝、支付宝
     * @param uid
     * @param reason
     */
    public void forbiddenUserAll(Long uid, String reason);
    /**
     * 删除账户
     * @param uid
     * @param reason
     */
    public void DeleteUser(Long uid, String reason);
    /**
     * 长时间未登录账户删除
     * @param uid
     * @param reason
     */
    public void DeleteUserOutOfDate(Long uid, String reason);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserInfoDeleteRecordService.java
New file
@@ -0,0 +1,12 @@
package com.yeshi.fanli.service.inter.user;
public interface UserInfoDeleteRecordService {
    /**
     * 创建删除记录
     * @param record
     */
    public void addDeleteRecord(Long uid, int state, String reason);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserInfoExtraService.java
@@ -27,7 +27,7 @@
     * @return
     * @throws UserInfoExtraException
     */
    public UserInfoExtra updateUserRankByUid(Long uid) throws UserInfoExtraException;
    public void updateUserRankByUid(Long uid) throws UserInfoExtraException;
    /**
     * 根据订单更新
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserInfoService.java
@@ -213,11 +213,5 @@
     */
    public void saveUserInfo(String nickName, Long uid) throws UserInfoException;
    /**
     * 封禁用户
     *
     * @param uid
     */
    public void forbiddenUser(Long uid,String reason);
}
fanli/src/main/java/com/yeshi/fanli/util/ImageUtil.java
@@ -753,6 +753,269 @@
        return null;
    }
    /**
     * 绘制大的商品动态分享图
     *
     * @param qrcodeStream
     * @param portrait
     * @param goods
     * @return
     */
    public static InputStream drawGoodsSharePicture(InputStream qrcodeStream, InputStream portrait,
            List<TaoBaoGoodsBrief> goodsList) {
        String fontPath = "/usr/share/fonts/PingFang_Medium.ttf";
        String os = System.getProperty("os.name");
        if (os.toLowerCase().startsWith("win")) {
            fontPath = "D:/PingFang_Medium.ttf";
        }
        String fontBoldPath = "/usr/share/fonts/PingFang_Heavy_0.ttf";
        if (os.toLowerCase().startsWith("win")) {
            fontBoldPath = "D:/PingFang_Heavy_0.ttf";
        }
        final BufferedImage targetImg = new BufferedImage(1420, 1334, BufferedImage.TYPE_INT_RGB);
        HashMap<Key, Object> mapH = new HashMap<Key, Object>();
        mapH.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);// 抗锯齿 (抗锯齿总开关)  
        mapH.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);// 文字抗锯齿 
        final Graphics2D g2d = (Graphics2D) targetImg.getGraphics();
        g2d.setRenderingHints(mapH);
        g2d.setColor(Color.WHITE);
        g2d.fillRect(0, 0, 1420, 1334);
        Font font = null;
        try {
            font = Font.createFont(Font.PLAIN, new File(fontPath)).deriveFont(30.0f);
        } catch (FontFormatException e1) {
            e1.printStackTrace();
        } catch (IOException e1) {
            e1.printStackTrace();
        }
        Font boldFont = null;
        try {
            boldFont = Font.createFont(Font.PLAIN, new File(fontBoldPath)).deriveFont(50.0f);
        } catch (FontFormatException e2) {
            e2.printStackTrace();
        } catch (IOException e2) {
            e2.printStackTrace();
        }
        g2d.setFont(font);
        try {
            // 画第一张
            for (int i = 0; i < goodsList.size(); i++) {
                TaoBaoGoodsBrief goods = goodsList.get(i);
                BigDecimal couplePrice = TaoBaoUtil.getAfterUseCouplePrice(goods);
                // 第一张图需要有价格信息
                if (i == 0) {
                    int topX = 50;
                    int topY = 50;
                    // 画大图 起始点坐标为(50,50)
                    int widht = 650;
                    int height = 650;
                    InputStream goodsPicture = TaoBaoHttpUtil.getAsInputStream(goods.getPictUrl().replace("_.webp", "").replace("_220x220", ""));
                    BufferedImage picImage = ImageIO.read(goodsPicture);
                    picImage = ImageUtil.zoomInImage(picImage, widht, height);
                    g2d.drawImage(picImage, topX, topX, null);
                    // 画边框
                    g2d.setColor(new Color(224, 224, 224));
                    g2d.setStroke(new BasicStroke(1.0f));
                    g2d.drawRect(topX - 1, topY - 1, widht + 1, widht + 1);
                    // 画透明背景
                    g2d.setColor(new Color(255, 255, 255, 210));
                    g2d.fillRect(10, height - 50, widht + 40, 100);
                    // 画券后价金额
                    boldFont = boldFont.deriveFont(42.0f);
                    g2d.setFont(boldFont);
                    g2d.setColor(new Color(229, 0, 92));
                    g2d.drawString("¥", 70 + 10, height);
                    g2d.drawString(couplePrice + "", 70 + 45, height);
                    // 画原价
                    g2d.setColor(new Color(102, 102, 102));
                    font = font.deriveFont(24.0f);
                    g2d.setFont(font);
                    String zkPrice = new BigDecimal((couplePrice + "").replace("¥", "")).add(goods.getCouponAmount())
                            .toString();
                    g2d.drawString("¥ " + zkPrice, 70 + 15, height + 30);
                    // 画删除线
                    FontMetrics fm = g2d.getFontMetrics(font);
                    int textLength = fm.stringWidth(zkPrice);
                    g2d.setStroke(new BasicStroke(2.0f));
                    g2d.drawLine(70 + 20, height + 21, 90 + 10 + textLength, height + 21);
                    BigDecimal withNoZera = MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount());
                    if (withNoZera != null && withNoZera.compareTo(new BigDecimal(0)) > 0) {
                        g2d.setRenderingHints(mapH);
                        // 券值得长度
                        int size  = withNoZera.toString().length() * 22;
                        int place  = withNoZera.toString().length() * 22;
                        // 券红色底部
                        int quanBGWidht = widht-100 - place;
                        int quanBGHeight = height - 33;
                        g2d.setColor(new Color(229, 0, 92));
                        g2d.fillRoundRect(quanBGWidht, quanBGHeight, 130 + size, 70, 10, 10);
                        // 画券字
                        boldFont = boldFont.deriveFont(40.0f);
                        g2d.setFont(boldFont);
                        g2d.setColor(new Color(255, 255, 255));
                        g2d.drawString("券",quanBGWidht + 8, quanBGHeight + 48);
                        // 券白色底部
                        g2d.fillRoundRect(quanBGWidht + 55, quanBGHeight + 4 , 70 + size, 62, 10, 10);
                        // 画券面值
                        g2d.setFont(boldFont);
                        g2d.setColor(new Color(229, 0, 92));
                        g2d.drawString("¥ " + withNoZera + "", quanBGWidht + 70, quanBGHeight + 48);
                    }
                } else {
                    // 计算左上角坐标
                    int topX = 0;
                    int topY = 0;
                    if (i == 1)
                        topX = 50 + (315 + 20) * 0;
                    else if (i == 2 || i % 2 != 0)// 2,3,5,7
                        topX = 50 + (315 + 20) * (i % 2 + 1);
                    else if (i % 2 == 0)// 4,6,8
                        topX = 50 + (315 + 20) * 3;
                    if (i == 1 || i == 2)
                        topY = 50 + 650 + 20;
                    else if (i == 3 || i == 4)
                        topY = 50;
                    else if (i == 5 || i == 6)
                        topY = 50 + (315 + 20) * 1;
                    else if (i == 7 || i == 8)
                        topY = 50 + (315 + 20) * 2;
                    // 画大图
                    InputStream goodsPicture = TaoBaoHttpUtil
                            .getAsInputStream(goods.getPictUrl().replace("_.webp", ""));
                    BufferedImage picImage = ImageIO.read(goodsPicture);
                    picImage = ImageUtil.zoomInImage(picImage, 315, 315);
                    g2d.drawImage(picImage, topX, topY, null);
                    g2d.setColor(new Color(224, 224, 224));
                    // 画边框
                    g2d.setStroke(new BasicStroke(1.0f));
                    g2d.drawRect(topX - 1, topY - 1, 316, 316);
                    // 画券
                    BigDecimal withNoZera = MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount());
                    if (withNoZera != null && withNoZera.compareTo(new BigDecimal(0)) > 0) {
//                        // 画透明背景
//                        g2d.setColor(new Color(255, 255, 255, 210));
//                        g2d.fillRect(topX + 8, topY + 240, 300, 65);
                        g2d.setRenderingHints(mapH);
                        // 券值得长度
                        int size  = withNoZera.toString().length() * 22;
                        int place  = withNoZera.toString().length() * 22;
//                        // 券红色底部
                        int quanBGWidht =  topX + 170 - place;
                        int quanBGHeight = topY + 220;
                        g2d.setColor(new Color(229, 0, 92));
                        g2d.fillRoundRect(quanBGWidht, quanBGHeight, 130 + size, 70, 10, 10);
                        // 画券字
                        boldFont = boldFont.deriveFont(40.0f);
                        g2d.setFont(boldFont);
                        g2d.setColor(new Color(255, 255, 255));
                        g2d.drawString("券",quanBGWidht + 8, quanBGHeight + 48);
                        // 券白色底部
                        g2d.fillRoundRect(quanBGWidht + 55, quanBGHeight + 4 , 70 + size, 62, 10, 10);
                        // 画券面值
                        g2d.setFont(boldFont);
                        g2d.setColor(new Color(229, 0, 92));
                        g2d.drawString("¥ " + withNoZera + "", quanBGWidht + 70, quanBGHeight + 48);
                    }
                }
            }
            g2d.setColor(new Color(247, 247, 247));
            g2d.fillRect(50, 1070, 1320, 214);
            // 画二维码
            BufferedImage qrcodeImage = ImageIO.read(qrcodeStream);
            qrcodeImage = ImageUtil.zoomInImage(qrcodeImage, 170, 170);
            g2d.drawImage(qrcodeImage, 70, 1092, null);
            // 画头像
            if (portrait != null) {
                BufferedImage portraitImg = ImageIO.read(portrait);
                // 放缩大小
                portraitImg = ImageUtil.zoomInImage(portraitImg, 40, 40);
                // 圆角
                portraitImg = ImageUtil.roundImage(portraitImg, 10);
                g2d.drawImage(portraitImg, 70 + (qrcodeImage.getWidth() - portraitImg.getWidth()) / 2,
                        1092 + (qrcodeImage.getHeight() - portraitImg.getHeight()) / 2, null);
            }
            font = font.deriveFont(50.0f);
            g2d.setFont(font);
            g2d.setColor(new Color(229, 0, 93));
            g2d.setColor(new Color(102, 102, 102));
            g2d.drawString("长按识别二维码免费领券", 312, 1150);
            g2d.setColor(new Color(102, 102, 102));
            g2d.drawString("共", 1000, 1150);
            g2d.setColor(new Color(229, 0, 93));
            g2d.drawString(goodsList.size() + "", 1055, 1150);
            g2d.setColor(new Color(102, 102, 102));
            g2d.drawString("个商品", 1090, 1150);
            // 提示语
            BufferedImage tips = ImageIO
                    .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/share/tips1.png"));
            tips = ImageUtil.zoomInImage(tips, 850, 65);
            g2d.drawImage(tips, 312, 1190, null);
            g2d.dispose();
            ByteArrayOutputStream aos = new ByteArrayOutputStream();
            ImageIO.write(targetImg, "JPEG", aos);
            InputStream is = new ByteArrayInputStream(aos.toByteArray());
            return is;
        } catch (Exception e) {
            try {
                LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
                e1.printStackTrace();
            }
        }
        return null;
    }
    // 画商品分享图
    public static InputStream drawGoodsShareImgHCJ(InputStream qrcodeStream, InputStream portrait,
            TaoBaoGoodsBrief goods) throws Exception {
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java
@@ -766,10 +766,10 @@
        tg.setSalesType(1);
        // 测试使用
        // tg.setSalesType(Math.random() > 0.5 ? tg.getSalesType() : 3);
        // List<ClientTextStyleVO> labels = new ArrayList<>();
        // labels.add(new ClientTextStyleVO("标签内容", "#F14242"));
        // labels.add(new ClientTextStyleVO("标签内容", "#00FF00"));
        // tg.setLabels(labels);
         List<ClientTextStyleVO> labels = new ArrayList<>();
         labels.add(new ClientTextStyleVO("标签内容", "#F14242"));
         labels.add(new ClientTextStyleVO("标签内容", "#00FF00"));
         tg.setLabels(labels);
        return tg;
    }
fanli/src/main/java/com/yeshi/fanli/vo/goods/GoodsSubClassLabelVO.java
New file
@@ -0,0 +1,21 @@
package com.yeshi.fanli.vo.goods;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel;
public class GoodsSubClassLabelVO extends GoodsSubClassLabel {
    @Expose
    private List<GoodsSubClass> listSub;
    public List<GoodsSubClass> getListSub() {
        return listSub;
    }
    public void setListSub(List<GoodsSubClass> listSub) {
        this.listSub = listSub;
    }
}