yujian
2019-09-11 f1aa196ca63b8c287c5af61214881259c13db69b
Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div
34个文件已修改
722 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/ConfigAdminController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/MessageController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/config/SystemClientParamsAdminController.java 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5UserRankingsController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ApiController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/HelpController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/LostOrderController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ShareController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/h5/H5SearchController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/web/WebSearchController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/xcx/XcxSearchController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ConfigMapper.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/SystemClientParamsMapper.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgDeviceReadState.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/common/Config.java 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/system/SystemClientParams.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/ConfigMapper.xml 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/SystemClientParamsMapper.xml 216 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/config/ConfigServiceImpl.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/config/SystemClientParamsServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/config/ConfigService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/Constant.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/ImageUtil.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/VersionUtil.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoLiJinUtil.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/app.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/system_config.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/wx_gz_config.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/znx_msg.properties 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/ConfigAdminController.java
@@ -2,7 +2,9 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
@@ -52,7 +54,22 @@
                pageIndex = 1;
            }
            List<AppVersionInfo> versionList = appVersionService.getAppVersionInfoListByPlatform("android");
            Map<Integer, String> androidMapName = new HashMap<>();
            for (AppVersionInfo version : versionList)
                androidMapName.put(version.getVersionCode(), version.getVersion());
            versionList = appVersionService.getAppVersionInfoListByPlatform("ios");
            Map<Integer, String> iosMapName = new HashMap<>();
            for (AppVersionInfo version : versionList)
                iosMapName.put(version.getVersionCode(), version.getVersion());
            List<Config> list = configService.listObjects(key, pageIndex);
            for (Config config : list) {
                config.setMinAndroidVersion(androidMapName.get(config.getMinAndroidVersionCode()));
                config.setMinIosVersion(iosMapName.get(config.getMinIosVersionCode()));
            }
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无更多数据"));
@@ -121,10 +138,9 @@
        }
    }
    /**
     * 版本号信息
     *
     * @param callback
     * @param out
     */
fanli/src/main/java/com/yeshi/fanli/controller/admin/MessageController.java
@@ -27,7 +27,7 @@
    @RequestMapping(value = "getZhuShou")
    public void getZhuShou(String callback, PrintWriter out) {
        // 返利券小助手
        // 板栗快省小助手
        MsgCommonDTO zhuShouMsg = msgConfigService.getZhuShouMsg();
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(new Gson().toJson(zhuShouMsg)));
    }
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
@@ -726,7 +726,7 @@
    }
    /**
     * 订单跟踪准确率(返利券用户订单/淘宝联盟订单)
     * 订单跟踪准确率(板栗快省用户订单/淘宝联盟订单)
     * 
     * @param callback
     * @param dateType
fanli/src/main/java/com/yeshi/fanli/controller/admin/config/SystemClientParamsAdminController.java
@@ -2,7 +2,9 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
@@ -12,7 +14,11 @@
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.entity.AppVersionInfo;
import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.entity.system.SystemClientParams;
import com.yeshi.fanli.service.inter.config.AppVersionService;
import com.yeshi.fanli.service.inter.config.BusinessSystemService;
import com.yeshi.fanli.service.inter.config.SystemClientParamsService;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
@@ -23,14 +29,19 @@
@Controller
@RequestMapping("admin/new/api/v1/clientParams")
public class SystemClientParamsAdminController {
    @Resource
    private SystemClientParamsService systemClientParamsService;
    @Resource
    private AppVersionService appVersionService;
    @Resource
    private BusinessSystemService businessSystemService;
    /**
     * 后端查询-新后台
     *
     * @param callback
     * @param pageIndex
     * @param pageSize
@@ -38,9 +49,9 @@
     * @param systemId
     * @param out
     */
    @RequestMapping(value="query")
    public void query(String callback, Integer pageIndex, Integer pageSize, String key,
            Long systemId, PrintWriter out) {
    @RequestMapping(value = "query")
    public void query(String callback, Integer pageIndex, Integer pageSize, String key, Long systemId,
            PrintWriter out) {
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
@@ -50,63 +61,84 @@
            pageSize = Constant.PAGE_SIZE;
        }
        List<AppVersionInfo> versionList = appVersionService.getAppVersionInfoListByPlatform("android");
        Map<Integer, String> androidMapName = new HashMap<>();
        for (AppVersionInfo version : versionList)
            androidMapName.put(version.getVersionCode(), version.getVersion());
        versionList = appVersionService.getAppVersionInfoListByPlatform("ios");
        Map<Integer, String> iosMapName = new HashMap<>();
        for (AppVersionInfo version : versionList)
            iosMapName.put(version.getVersionCode(), version.getVersion());
        BusinessSystem businessSystem = businessSystemService.getById(systemId);
        try {
            List<SystemClientParams> list = systemClientParamsService.listQuery((pageIndex - 1) * pageSize, pageSize,
            List<SystemClientParams> list = systemClientParamsService.listQuery((pageIndex - 1) * pageSize, pageSize,
                    key, systemId);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
            for (SystemClientParams params : list) {
                if (businessSystem.getPlatform() == 1)
                    params.setVersion(androidMapName.get(params.getMinVersion()));
                else
                    params.setVersion(iosMapName.get(params.getMinVersion()));
            }
            long count = systemClientParamsService.countQuery(key, systemId);
            int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
            PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
            JSONObject data = new JSONObject();
            data.put("pe", pe);
            data.put("result_list", list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
        }
    }
    /**
     * 新增
     *
     * @param callback
     * @param special
     * @param out
     */
    @RequestMapping(value = "saveAdd")
    public void saveAdd(String callback, SystemClientParams systemClientParams, String idArray, PrintWriter out) {
        String key = systemClientParams.getKey();
        String name = systemClientParams.getName();
        String value = systemClientParams.getValue();
        if (StringUtil.isNullOrEmpty(key) || StringUtil.isNullOrEmpty(name)
                || StringUtil.isNullOrEmpty(value) || StringUtil.isNullOrEmpty(idArray)) {
        if (StringUtil.isNullOrEmpty(key) || StringUtil.isNullOrEmpty(name) || StringUtil.isNullOrEmpty(value)
                || StringUtil.isNullOrEmpty(idArray)) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("名称、key、value、系统不能为空"));
            return;
        }
        Gson gson = new Gson();
        List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {}.getType());
        List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {
        }.getType());
        if (list == null || list.size() == 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("系统不能为空"));
            return;
        }
        try {
            systemClientParamsService.saveAdd(systemClientParams, list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("添加成功"));
        } catch (Exception e) {
@@ -117,36 +149,36 @@
    /**
     * 修改
     *
     * @param callback
     * @param special
     * @param out
     */
    @RequestMapping(value = "saveModify")
    public void saveModify(String callback, SystemClientParams systemClientParams, PrintWriter out) {
        String key = systemClientParams.getKey();
        String name = systemClientParams.getName();
        String value = systemClientParams.getValue();
        if (StringUtil.isNullOrEmpty(key) || StringUtil.isNullOrEmpty(name)
                || StringUtil.isNullOrEmpty(value)) {
        if (StringUtil.isNullOrEmpty(key) || StringUtil.isNullOrEmpty(name) || StringUtil.isNullOrEmpty(value)) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("名称、key、value不能为空"));
            return;
        }
        try {
            SystemClientParams resultObject= systemClientParamsService.selectByPrimaryKey(systemClientParams.getId());
            SystemClientParams resultObject = systemClientParamsService.selectByPrimaryKey(systemClientParams.getId());
            if (resultObject == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
                return;
                return;
            }
            systemClientParams.setSystem(resultObject.getSystem());
            systemClientParams.setUpdatetime(java.lang.System.currentTimeMillis());
            systemClientParamsService.update(systemClientParams);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("修改成功"));
        } catch (Exception e) {
@@ -154,10 +186,10 @@
            e.printStackTrace();
        }
    }
    /**
     * 删除
     *
     * @param callback
     * @param idArray
     * @param out
@@ -172,15 +204,16 @@
            }
            Gson gson = new Gson();
            List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {}.getType());
            List<Long> list = gson.fromJson(idArray, new TypeToken<ArrayList<Long>>() {
            }.getType());
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检测到删除的数据"));
                return;
            }
            systemClientParamsService.deleteBatchByPrimaryKey(list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("删除成功"));
        } catch (Exception e) {
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5UserRankingsController.java
@@ -36,7 +36,7 @@
    @Resource
    private HongBaoV2CountService hongBaoV2CountService;
    /**
     * 返利券排行榜
     * 板栗快省排行榜
     * @param callback
     * @param out
     */
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ApiController.java
@@ -6,13 +6,13 @@
import org.springframework.web.bind.annotation.RequestMapping;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.util.Constant;
@Controller
@RequestMapping("api/v1")
public class ApiController {
    @RequestMapping("hello")
    public void hello(AcceptData acceptData,PrintWriter out){
        out.print("返利券");
    public void hello(AcceptData acceptData, PrintWriter out) {
        out.print(Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()));
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/HelpController.java
@@ -15,6 +15,7 @@
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.help.AppPageNotification;
import com.yeshi.fanli.service.inter.help.AppPageNotificationService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
@@ -53,7 +54,7 @@
            no.setType(ap.getType());
            no.setUpdateTime(ap.getUpdateTime());
            no.setCanClose(false);
            no.setContent("尊敬的用户,为更加准确高效的为你返利、省钱,请升级到返利券最新版本");
            no.setContent(String.format("尊敬的用户,为更加准确高效的为你返利、省钱,请升级到%s最新版本",Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
            Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
            out.print(JsonUtil.loadTrueResult(gson.toJson(no)));
            return;
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/LostOrderController.java
@@ -142,7 +142,7 @@
        if (type == null) {
            type = Constant.SOURCE_TYPE_TAOBAO;
        }
        boolean orderNum = true;
        String orderId = lostOrder.getOrderId();
        if (type == Constant.SOURCE_TYPE_TAOBAO) {
@@ -151,7 +151,7 @@
            } else {
                orderNum = Utils.isOrderNum(orderId);
            }
        } else if  (type == Constant.SOURCE_TYPE_JD) {
        } else if (type == Constant.SOURCE_TYPE_JD) {
            if (!NumberUtil.isNumeric(orderId) || (orderId.length() < 6 || orderId.length() > 20)) {
                orderNum = false;
            }
@@ -172,7 +172,8 @@
        if (lostOrder.getUserInfo() == null || lostOrder.getUserInfo().getId() == null
                || lostOrder.getUserInfo().getId() <= 0) {
            out.print(JsonUtil.loadFalseResult(1, "请登录返利券账号"));
            out.print(JsonUtil.loadFalseResult(1,
                    String.format("请登录%s账号", Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()))));
            return;
        }
        lostOrder.setIpInfo(IPUtil.getRemotIP(request) + ":" + request.getRemotePort());
@@ -196,7 +197,7 @@
                stateInfo = "该订单申诉已失败,请在订单列表中查看";
            } else if (state == -7) {
                stateInfo = "今日申诉次数已达上限";
            }else if (state == -1001) {
            } else if (state == -1001) {
                stateInfo = "订单违规";
            }
        }
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ShareController.java
@@ -977,7 +977,7 @@
                    title = "给你推荐精选好物优惠券,购物前先领券,别错过优惠哦~";
                }
                data.put("title", title);
                data.put("content", "我在返利券发现了一个很好的商品,快来看看~");
                data.put("content",String.format("我在%s发现了一个很好的商品,快来看看~",Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
                // 分享奖金
                ClientTextStyleVO desc = dynamicInfo.getDesc();
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java
@@ -594,7 +594,7 @@
            // 创建时间在28号后的才有新人欢迎
            if ((time > TimeUtil.convertToTimeTemp("2019-01-28", "yyyy-MM-dd") || uid == null)) {
                UserHomeMsgVO vo = new UserHomeMsgVO();
                vo.setContent("恭喜你,成为返利券的用户\n独家优惠券帮你省钱;\n参与奖金活动帮你赚钱;\n让返利券成为你的省钱助手吧!");
                vo.setContent(String.format("恭喜你,成为%s的用户\n独家优惠券帮你省钱;\n参与奖金活动帮你赚钱;\n让%s成为你的省钱助手吧!",Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()),Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
                vo.setTitle("新人欢迎");
                vo.setCreateTime(getTimeDesc(now, new Date(time)));
                vo.setType(UserHomeMsgVO.TYPE_WELCOME);
@@ -693,7 +693,7 @@
            }
        }
        // 返利券小助手
        // 板栗快省小助手
        MsgCommonDTO zhuShouMsg = msgConfigService.getZhuShouMsg();
        if (zhuShouMsg != null && zhuShouMsg.getShow() == true) {
            boolean read = false;
@@ -844,7 +844,7 @@
        if ((time > TimeUtil.convertToTimeTemp("2019-01-28", "yyyy-MM-dd") || uid == null)) {
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("title", "新人欢迎");
            map.put("content", "恭喜你,成为返利券的用户\n独家优惠券帮你省钱;\n参与奖金活动帮你赚钱;\n让返利券成为你的省钱助手吧!");
            map.put("content",String.format("恭喜你,成为%s的用户\n独家优惠券帮你省钱;\n参与奖金活动帮你赚钱;\n让%s成为你的省钱助手吧!",Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()),Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
            map.put("createTime", new Date(time));
            UserMsgCenter msgCenternre = new UserMsgCenter();
            msgCenternre.setWelcomeMsg(map);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -540,8 +540,8 @@
            OtherInfo otherInfo = new OtherInfo();
            RewardCouponVO rewardCoupon = new RewardCouponVO();
            rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
            rewardCoupon.setMaxMoney("¥" + MoneyBigDecimalUtil.mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate),
                    Constant.MAX_REWARD_RATE));
            rewardCoupon.setMaxMoney("¥" +TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate).add( MoneyBigDecimalUtil.mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate),
                    Constant.MAX_REWARD_RATE)));
            rewardCoupon.setDesc("用返利奖励券最高返");
            otherInfo.setRewardCoupon(rewardCoupon);
            goodsDetail.setOtherInfo(otherInfo);
@@ -630,7 +630,7 @@
        RewardCouponVO rewardCoupon = new RewardCouponVO();
        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
        rewardCoupon.setMaxMoney(
                "¥" + MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE));
                "¥" +JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate).add( MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE)));
        rewardCoupon.setDesc("用返利奖励券最高返");
        otherInfo.setRewardCoupon(rewardCoupon);
        goodsDetail.setOtherInfo(otherInfo);
@@ -774,8 +774,8 @@
        OtherInfo otherInfo = new OtherInfo();
        RewardCouponVO rewardCoupon = new RewardCouponVO();
        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
        rewardCoupon.setMaxMoney("¥" + MoneyBigDecimalUtil.mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate),
                Constant.MAX_REWARD_RATE));
        rewardCoupon.setMaxMoney("¥" +PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate).add(MoneyBigDecimalUtil.mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate),
                Constant.MAX_REWARD_RATE)));
        rewardCoupon.setDesc("用返利奖励券最高返");
        otherInfo.setRewardCoupon(rewardCoupon);
        goodsDetail.setOtherInfo(otherInfo);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -210,7 +210,7 @@
                    if (userInfoExtra != null && !StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin())) {
                        object.put("weiXin", userInfoExtra.getWeiXin());
                        object.put("weiXinState", 3);
                        object.put("weiXinTip", "添加TA的微信,你可教授TA如何通过板栗快省赚钱技巧。");
                        object.put("weiXinTip", "添加TA的微信,你可教授TA如何通过返利券赚钱技巧。");
                    } else {
                        if (!threeSaleExtraInfoSerivce.isRemindWorker(uid, workerId)) {
                            object.put("weiXinState", 1);
@@ -317,7 +317,7 @@
            if (userInfoExtra != null && !StringUtil.isNullOrEmpty(userInfoExtra.getWeiXin())) {
                bossData.put("weiXin", userInfoExtra.getWeiXin());
                bossData.put("weiXinState", 3);
                bossData.put("weiXinTip", "添加TA的微信,你可向TA学习如何通过板栗快省赚钱。");
                bossData.put("weiXinTip", "添加TA的微信,你可向TA学习如何通过返利券赚钱。");
            } else {
                if (!threeSaleExtraInfoSerivce.isRemindBoss(boss.getId(), uid)) {
                    bossData.put("weiXinState", 1);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java
@@ -173,7 +173,7 @@
            if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
                root.put("scoreExchange", getScoreExchangeInfo(acceptData));
            if (VersionUtil.greaterThan_2_0_0(acceptData.getPlatform(), acceptData.getVersion()))
            if (VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion()))
                root.put("searchDiscovery", getSearchDiscoveryInfo(acceptData));
            out.print(JsonUtil.loadTrueResult(root));
@@ -723,9 +723,10 @@
    public void getSpecialChannelActivity(AcceptData acceptData, Long uid, String callback, PrintWriter out) {
        int platformCode = Constant.getPlatformCode(acceptData.getPlatform());
        List<Special> list = specialService.listByPlaceKey("special_channel_activity",platformCode, Integer.parseInt(acceptData.getVersion()));
        List<Special> list = specialService.listByPlaceKey("special_channel_activity", platformCode,
                Integer.parseInt(acceptData.getVersion()));
        long time = System.currentTimeMillis();
        // 删除尚未启用的过期的
        for (int i = 0; i < list.size(); i++) {
@@ -733,6 +734,11 @@
            if (special.getState() == 1L) {
                list.remove(i--);
            } else {
                if (special.getStartTime() != null && special.getEndTime() != null)
                    special.setTimeTask(true);
                else
                    special.setTimeTask(false);
                if (special.isTimeTask()) {
                    if (time < special.getStartTime().getTime() || time > special.getEndTime().getTime()) {
                        list.remove(i--);
fanli/src/main/java/com/yeshi/fanli/controller/h5/H5SearchController.java
@@ -301,7 +301,7 @@
         * out.print(JsonUtil.loadFalseResult(XcxMiniControllerUtil.NOSYSTEM));
         * return; }
         */
        List<SuperHotSearch> superHotSearchList = superHotSearchSerivce.getSuperHotSearchBySystemId(4, null); // 返利券app
        List<SuperHotSearch> superHotSearchList = superHotSearchSerivce.getSuperHotSearchBySystemId(4, null); // 板栗快省app
        if (superHotSearchList == null || superHotSearchList.size() == 0) {
            out.print(JsonUtil.loadFalseResult(H5ControllerUtil.NODATA));
            return;
fanli/src/main/java/com/yeshi/fanli/controller/web/WebSearchController.java
@@ -436,7 +436,7 @@
         * out.print(JsonUtil.loadFalseResult(XcxMiniControllerUtil.NOSYSTEM));
         * return; }
         */
        List<SuperHotSearch> superHotSearchList = superHotSearchSerivce.getSuperHotSearchBySystemId(4,null); // 返利券app
        List<SuperHotSearch> superHotSearchList = superHotSearchSerivce.getSuperHotSearchBySystemId(4,null); // 板栗快省app
        if (superHotSearchList == null || superHotSearchList.size() == 0) {
            out.print(JsonUtil.loadFalseResult(WebControllerUtil.NODATA));
            return;
fanli/src/main/java/com/yeshi/fanli/controller/xcx/XcxSearchController.java
@@ -77,7 +77,7 @@
         * out.print(JsonUtil.loadFalseResult(XcxMiniControllerUtil.NOSYSTEM));
         * return; }
         */
        List<SuperHotSearch> superHotSearchList = superHotSearchSerivce.getSuperHotSearchBySystemId(4, null); // 返利券app
        List<SuperHotSearch> superHotSearchList = superHotSearchSerivce.getSuperHotSearchBySystemId(4, null); // 板栗快省app
        if (superHotSearchList == null || superHotSearchList.size() == 0) {
            out.print(JsonUtil.loadFalseResult(XcxMiniControllerUtil.NODATA));
            return;
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ConfigMapper.java
@@ -33,11 +33,14 @@
    long countSearchByName(@Param("key") String key);
    /**
     * 根据关键词获取
     * 根据关键词提取
     * 
     * @param key
     * @param minAndroidVersion
     * @param maxAndroidVersion
     * @return
     */
    List<Config> listByKey(String key);
    List<Config> listByKey(@Param("key") String key, @Param("minAndroidVersion") Integer minAndroidVersion,
            @Param("minIosVersion") Integer minIosVersion);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/SystemClientParamsMapper.java
@@ -7,21 +7,15 @@
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.system.SystemClientParams;
public interface SystemClientParamsMapper extends BaseMapper<SystemClientParams>{
    /**
     *  根据系统id查询
     * @param systemId
     * @return
     */
    List<SystemClientParams> listBySystemId(@Param("systemId") Long systemId);
public interface SystemClientParamsMapper extends BaseMapper<SystemClientParams> {
    List<SystemClientParams> listBySystemIdAndMinVersion(@Param("systemId") Long systemId,
            @Param("minVersion") Integer version);
    SystemClientParams getSystemClientParamsBySystemAndKey(@Param("systemId") Long systemId, @Param("key") String key);
    List<SystemClientParams> listQuery( @Param("start") long start,  @Param("count") int count,
    List<SystemClientParams> listQuery(@Param("start") long start, @Param("count") int count,
            @Param("systemId") Long systemId, @Param("key") String key);
    long countQuery(@Param("systemId") Long systemId, @Param("key") String key);
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgDeviceReadState.java
@@ -10,7 +10,7 @@
 */
@Table("yeshi_ec_msg_device_read_state")
public class MsgDeviceReadState {
    public static String TYPE_ZHUSHOU = "zhushou";// 返利券小助手
    public static String TYPE_ZHUSHOU = "zhushou";// 板栗快省小助手
    public static String TYPE_RECOMMEND = "recommend";// 推荐
    public static String TYPE_KEFU = "kefu";
fanli/src/main/java/com/yeshi/fanli/entity/common/Config.java
@@ -2,44 +2,76 @@
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
//系统总配�?
@Entity
@Table(name = "`yeshi_ec_config`")
@org.yeshi.utils.mybatis.Table("yeshi_ec_config")
public class Config implements Serializable{
import org.yeshi.utils.mybatis.Column;
import org.yeshi.utils.mybatis.Table;
@Table("yeshi_ec_config")
public class Config implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    @org.yeshi.utils.mybatis.Column(name="id")
    private Long id;
    @Column(name = "`key`", length = 32)
    @org.yeshi.utils.mybatis.Column(name="key")
    @Column(name = "key")
    private String key;
    @Column(name = "`value`", length = 4096)
    @org.yeshi.utils.mybatis.Column(name="value")
    @Column(name = "value")
    private String value;
    @Column(name = "`name`", length = 1024)
    @org.yeshi.utils.mybatis.Column(name="name")
    @Column(name = "name")
    private String name;
    @Column(name = "`beizhu`", length = 1024)
    @org.yeshi.utils.mybatis.Column(name="beizhu")
    @Column(name = "beizhu")
    private String beizhu;
    @Column(name = "`createtime`", length = 16)
    @org.yeshi.utils.mybatis.Column(name="createtime")
    @Column(name = "createtime")
    private String createtime;
    @Column(name = "min_android_version")
    private Integer minAndroidVersionCode;// android最小版本
    @Column(name = "min_ios_version")
    private Integer minIosVersionCode;// ios最小版本
    
    //后台展现
    private String minAndroidVersion;
    private String minIosVersion;
    public String getMinAndroidVersion() {
        return minAndroidVersion;
    }
    public void setMinAndroidVersion(String minAndroidVersion) {
        this.minAndroidVersion = minAndroidVersion;
    }
    public String getMinIosVersion() {
        return minIosVersion;
    }
    public void setMinIosVersion(String minIosVersion) {
        this.minIosVersion = minIosVersion;
    }
    public Integer getMinAndroidVersionCode() {
        return minAndroidVersionCode;
    }
    public void setMinAndroidVersionCode(Integer minAndroidVersionCode) {
        this.minAndroidVersionCode = minAndroidVersionCode;
    }
    public Integer getMinIosVersionCode() {
        return minIosVersionCode;
    }
    public void setMinIosVersionCode(Integer minIosVersionCode) {
        this.minIosVersionCode = minIosVersionCode;
    }
    public Long getId() {
        return id;
    }
fanli/src/main/java/com/yeshi/fanli/entity/system/SystemClientParams.java
@@ -14,39 +14,59 @@
 *
 */
@Table("yeshi_ec_system_clientparams")
public class SystemClientParams implements Serializable{
public class SystemClientParams implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    @Column(name = "id")
    private Long id;
    @Column(name = "systemid")
    private BusinessSystem system;
    @Column(name = "key")
    @Expose
    private String key;
    @Expose
    @Column(name = "value")
    private String value;
    @Expose
    @Column(name = "name")
    private String name;
    @Expose
    @Column(name = "updatetime")
    private Long updatetime;
    @Column(name = "min_version")
    private Integer minVersion;
    
    private String version;
    public String getVersion() {
        return version;
    }
    public void setVersion(String version) {
        this.version = version;
    }
    public Integer getMinVersion() {
        return minVersion;
    }
    public void setMinVersion(Integer minVersion) {
        this.minVersion = minVersion;
    }
    public SystemClientParams() {
    }
    public SystemClientParams(BusinessSystem system, String key, String value) {
        super();
        this.system = system;
fanli/src/main/java/com/yeshi/fanli/mapping/ConfigMapper.xml
@@ -9,52 +9,53 @@
        <result column="`name`" property="name" jdbcType="VARCHAR" />
        <result column="beizhu" property="beizhu" jdbcType="VARCHAR" />
        <result column="createtime" property="createtime" jdbcType="VARCHAR" />
        <result column="min_android_version" property="minAndroidVersionCode"
            jdbcType="INTEGER" />
        <result column="min_ios_version" property="minIosVersionCode"
            jdbcType="INTEGER" />
    </resultMap>
    <sql id="Base_Column_List">`id`,`key`,`value`,`name`,beizhu,createtime</sql>
    <sql id="Base_Column_List">`id`,`key`,`value`,`name`,beizhu,createtime,min_android_version,min_ios_version
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_config where id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectByKey" resultMap="BaseResultMap"
        parameterType="java.lang.String">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_config where `key` = #{0} limit 1
    </select>
    <select id="listAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_config
    </select>
    <select id="listSearchByName" resultMap="BaseResultMap"
        parameterType="java.lang.String">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_config where `name` like '%${key}%' limit #{start},#{count}
        from yeshi_ec_config where `name` like '%${key}%' limit
        #{start},#{count}
    </select>
    <select id="countSearchByName" resultType="java.lang.Long"
        parameterType="java.lang.String">
        select
        count(*)
        from yeshi_ec_config where `name` like
        '%${key}%'
    </select>
        parameterType="java.lang.String">select count(*) from yeshi_ec_config where `name` like
        '%${key}%'</select>
    <select id="listByKey" resultMap="BaseResultMap" parameterType="java.lang.String">
    <select id="listByKey" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_config where `key`=#{0}
        from yeshi_ec_config where `key`=#{key}
        <if test="minAndroidVersion!=null">
            and #{minAndroidVersion} >= min_android_version
            order by min_android_version desc
        </if>
        <if test="minIosVersion!=null">
            and #{minIosVersion} >= min_ios_version
            order by min_ios_version desc
        </if>
    </select>
@@ -65,8 +66,9 @@
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.common.Config"
        useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_config
        (id,key,value,name,beizhu,createtime) values
        (#{id,jdbcType=BIGINT},#{key,jdbcType=VARCHAR},#{value,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},#{beizhu,jdbcType=VARCHAR},#{createtime,jdbcType=VARCHAR})
        (id,key,value,name,beizhu,createtime,min_android_version,min_ios_version)
        values
        (#{id,jdbcType=BIGINT},#{key,jdbcType=VARCHAR},#{value,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},#{beizhu,jdbcType=VARCHAR},#{createtime,jdbcType=VARCHAR},#{minAndroidVersionCode,jdbcType=INTEGER},#{minIosVersionCode,jdbcType=INTEGER})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.common.Config"
        useGeneratedKeys="true" keyProperty="id">
@@ -78,6 +80,8 @@
            <if test="name != null">`name`,</if>
            <if test="beizhu != null">beizhu,</if>
            <if test="createtime != null">createtime,</if>
            <if test="minAndroidVersionCode != null">min_android_version,</if>
            <if test="minIosVersionCode != null">min_ios_version,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -87,14 +91,17 @@
            <if test="name != null">#{name,jdbcType=VARCHAR},</if>
            <if test="beizhu != null">#{beizhu,jdbcType=VARCHAR},</if>
            <if test="createtime != null">#{createtime,jdbcType=VARCHAR},</if>
            <if test="minAndroidVersionCode != null">#{minAndroidVersionCode,jdbcType=INTEGER},</if>
            <if test="minIosVersionCode != null">#{minIosVersionCode,jdbcType=INTEGER}</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.common.Config">update
        yeshi_ec_config set `key` = #{key,jdbcType=VARCHAR},`value` =
        #{value,jdbcType=VARCHAR},`name` = #{name,jdbcType=VARCHAR},beizhu =
        #{beizhu,jdbcType=VARCHAR},createtime =
        #{createtime,jdbcType=VARCHAR}
        where id = #{id,jdbcType=BIGINT}
        #{beizhu,jdbcType=VARCHAR},createtime = #{createtime,jdbcType=VARCHAR}
        ,min_android_version =#{minAndroidVersionCode,jdbcType=INTEGER}
        ,min_ios_version =#{minIosVersionCode,jdbcType=INTEGER} where id =
        #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.common.Config">
        update yeshi_ec_config
@@ -104,6 +111,11 @@
            <if test="name != null">`name`=#{name,jdbcType=VARCHAR},</if>
            <if test="beizhu != null">beizhu=#{beizhu,jdbcType=VARCHAR},</if>
            <if test="createtime != null">createtime=#{createtime,jdbcType=VARCHAR},</if>
            <if test="minAndroidVersionCode !=null">min_android_version
                =#{minAndroidVersionCode,jdbcType=INTEGER},
            </if>
            <if test="minIosVersionCode !=null">min_ios_version =#{minIosVersionCode,jdbcType=INTEGER},
            </if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
fanli/src/main/java/com/yeshi/fanli/mapping/SystemClientParamsMapper.xml
@@ -1,98 +1,118 @@
<?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.SystemClientParamsMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.system.SystemClientParams">
    <id column="id" property="id" jdbcType="BIGINT"/>
    <result column="key" property="key" jdbcType="VARCHAR"/>
    <result column="value" property="value" jdbcType="VARCHAR"/>
    <result column="name" property="name" jdbcType="VARCHAR"/>
    <result column="updatetime" property="updatetime" jdbcType="BIGINT"/>
     <association property="system" column="systemid" javaType="com.yeshi.fanli.entity.system.BusinessSystem">
        <id column="systemid" property="id" jdbcType="BIGINT" />
    </association>
  </resultMap>
  <sql id="Base_Column_List">id,`systemid`,`key`,`value`,`name`,updatetime</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_system_clientparams where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_system_clientparams where id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.system.SystemClientParams" useGeneratedKeys="true" keyProperty="id">
      insert into yeshi_ec_system_clientparams
          (id,`systemid`,`key`,`value`,`name`,updatetime)
          values
          (#{id,jdbcType=BIGINT},
        #{system.id,jdbcType=BIGINT},
        #{key,jdbcType=VARCHAR},
        #{value,jdbcType=VARCHAR},
        #{name,jdbcType=VARCHAR},
        #{updatetime,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.system.SystemClientParams" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_system_clientparams
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">id,</if>
      <if test="system != null">`systemid`,</if>
      <if test="key != null">`key`,</if>
      <if test="value != null">`value`,</if>
      <if test="name != null">`name`,</if>
      <if test="updatetime != null">updatetime,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="system != null">#{system.id,jdbcType=BIGINT},</if>
      <if test="key != null">#{key,jdbcType=VARCHAR},</if>
      <if test="value != null">#{value,jdbcType=VARCHAR},</if>
      <if test="name != null">#{name,jdbcType=VARCHAR},</if>
      <if test="updatetime != null">#{updatetime,jdbcType=BIGINT},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.system.SystemClientParams">update yeshi_ec_system_clientparams set systemid = #{system.id,jdbcType=BIGINT},`key` = #{key,jdbcType=VARCHAR},`value` = #{value,jdbcType=VARCHAR},`name` = #{name,jdbcType=VARCHAR},updatetime = #{updatetime,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.system.SystemClientParams">update yeshi_ec_system_clientparams
    <set>
      <if test="system != null">`systemid`=#{system.id,jdbcType=BIGINT},</if>
      <if test="key != null">`key`=#{key,jdbcType=VARCHAR},</if>
      <if test="value != null">`value`=#{value,jdbcType=VARCHAR},</if>
      <if test="name != null">`name`=#{name,jdbcType=VARCHAR},</if>
      <if test="updatetime != null">updatetime=#{updatetime,jdbcType=BIGINT},</if>
    </set> where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="listBySystemId" resultMap="BaseResultMap">
      SELECT * FROM yeshi_ec_system_clientparams cp
    WHERE cp.`systemid` = #{systemId}
  </select>
  <select id="getSystemClientParamsBySystemAndKey" resultMap="BaseResultMap">
      SELECT * FROM yeshi_ec_system_clientparams cp
    WHERE cp.`systemid` =  #{systemId}  AND cp.`key` = #{key}
    LIMIT 1
  </select>
  <select id="listQuery" resultMap="BaseResultMap">
     SELECT * FROM yeshi_ec_system_clientparams cp
    WHERE 1=1
        <if test="systemId != null">
            AND cp.`systemid` =  #{systemId}
        </if>
        <if test="key != null and key != '' ">
            AND (cp.`name` LIKE '%${key}%' or  cp.`key` LIKE  '%${key}%' )
        </if>
    LIMIT #{start},#{count}
  </select>
  <select id="countQuery" resultType="java.lang.Long">
     SELECT IFNULL(COUNT(cp.`id`),0)  FROM yeshi_ec_system_clientparams cp
    WHERE 1=1
        <if test="systemId != null">
            AND cp.`systemid` =  #{systemId}
        </if>
        <if test="key != null and key != '' ">
            AND (cp.`name` LIKE '%${key}%' or  cp.`key` LIKE  '%${key}%' )
        </if>
  </select>
</mapper>
<?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.SystemClientParamsMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.system.SystemClientParams">
        <id column="id" property="id" jdbcType="BIGINT" />
        <result column="key" property="key" jdbcType="VARCHAR" />
        <result column="value" property="value" jdbcType="VARCHAR" />
        <result column="name" property="name" jdbcType="VARCHAR" />
        <result column="updatetime" property="updatetime" jdbcType="BIGINT" />
        <result column="min_version" property="minVersion" jdbcType="INTEGER" />
        <association property="system" column="systemid"
            javaType="com.yeshi.fanli.entity.system.BusinessSystem">
            <id column="systemid" property="id" jdbcType="BIGINT" />
        </association>
    </resultMap>
    <sql id="Base_Column_List">id,`systemid`,`key`,`value`,`name`,updatetime,min_version
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_system_clientparams where id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_system_clientparams where id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.system.SystemClientParams"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_system_clientparams
        (id,`systemid`,`key`,`value`,`name`,updatetime,min_version)
        values
        (#{id,jdbcType=BIGINT}, #{system.id,jdbcType=BIGINT},
        #{key,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR},
        #{name,jdbcType=VARCHAR},
        #{updatetime,jdbcType=BIGINT},#{minVersion,jdbcType=INTEGER})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.system.SystemClientParams"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_system_clientparams
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="system != null">`systemid`,</if>
            <if test="key != null">`key`,</if>
            <if test="value != null">`value`,</if>
            <if test="name != null">`name`,</if>
            <if test="updatetime != null">updatetime,</if>
            <if test="minVersion != null">min_version,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="system != null">#{system.id,jdbcType=BIGINT},</if>
            <if test="key != null">#{key,jdbcType=VARCHAR},</if>
            <if test="value != null">#{value,jdbcType=VARCHAR},</if>
            <if test="name != null">#{name,jdbcType=VARCHAR},</if>
            <if test="updatetime != null">#{updatetime,jdbcType=BIGINT},</if>
            <if test="minVersion != null">#{minVersion,jdbcType=INTEGER}</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.system.SystemClientParams">update
        yeshi_ec_system_clientparams set systemid =
        #{system.id,jdbcType=BIGINT},`key` = #{key,jdbcType=VARCHAR},`value` =
        #{value,jdbcType=VARCHAR},`name` = #{name,jdbcType=VARCHAR},updatetime
        = #{updatetime,jdbcType=BIGINT} ,min_version
        =#{minVersion,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.system.SystemClientParams">
        update yeshi_ec_system_clientparams
        <set>
            <if test="system != null">`systemid`=#{system.id,jdbcType=BIGINT},</if>
            <if test="key != null">`key`=#{key,jdbcType=VARCHAR},</if>
            <if test="value != null">`value`=#{value,jdbcType=VARCHAR},</if>
            <if test="name != null">`name`=#{name,jdbcType=VARCHAR},</if>
            <if test="updatetime != null">updatetime=#{updatetime,jdbcType=BIGINT},</if>
            <if test="minVersion !=null">min_version =#{minVersion,jdbcType=INTEGER},</if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
    <select id="listBySystemIdAndMinVersion" resultMap="BaseResultMap">
        SELECT * FROM (
        SELECT * FROM
        yeshi_ec_system_clientparams cp WHERE
        cp.`systemid` =
        #{systemId}
        <if test="minVersion!=null">
            and #{minVersion}>=min_version
            order by min_version desc
        </if>
        )a group by a.key
    </select>
    <select id="getSystemClientParamsBySystemAndKey" resultMap="BaseResultMap">SELECT
        * FROM yeshi_ec_system_clientparams cp WHERE cp.`systemid` =
        #{systemId} AND cp.`key` = #{key} LIMIT 1
    </select>
    <select id="listQuery" resultMap="BaseResultMap">
        SELECT * FROM yeshi_ec_system_clientparams cp WHERE 1=1
        <if test="systemId != null">AND cp.`systemid` = #{systemId}</if>
        <if test="key != null and key != '' ">AND (cp.`name` LIKE '%${key}%' or cp.`key` LIKE
            '%${key}%'
            )
        </if>
        LIMIT #{start},#{count}
    </select>
    <select id="countQuery" resultType="java.lang.Long">
        SELECT IFNULL(COUNT(cp.`id`),0) FROM yeshi_ec_system_clientparams cp
        WHERE 1=1
        <if test="systemId != null">AND cp.`systemid` = #{systemId}</if>
        <if test="key != null and key != '' ">AND (cp.`name` LIKE '%${key}%' or cp.`key` LIKE
            '%${key}%'
            )
        </if>
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/service/impl/config/ConfigServiceImpl.java
@@ -63,7 +63,24 @@
    @Cacheable(value = "config", key = "#p0+'Str'")
    public String get(String key) {
        List<Config> list = configMapper.listByKey(key);
        List<Config> list = configMapper.listByKey(key, null, null);
        if (list.size() == 0) {
            return null;
        }
        String value = list.get(0).getValue();
        return value;
    }
    @Cacheable(value = "config", key = "'getByVersion'+'-'+#key+'-'+#platform+'-'+#version ")
    public String getByVersion(String key, String platform, int version) {
        Integer minAndroidVersion = null;
        Integer minIosVersion = null;
        if ("android".equalsIgnoreCase(platform)) {
            minAndroidVersion = version;
        } else
            minIosVersion = version;
        List<Config> list = configMapper.listByKey(key, minAndroidVersion, minIosVersion);
        if (list.size() == 0) {
            return null;
        }
@@ -73,7 +90,7 @@
    @Cacheable(value = "config", key = "#p0")
    public Config getConfig(String key) {
        List<Config> list = configMapper.listByKey(key);
        List<Config> list = configMapper.listByKey(key, null, null);
        if (list.size() == 0) {
            return null;
        }
@@ -188,52 +205,50 @@
    @Override
    public void save(Config config) {
        List<Config> list = configMapper.listByKey(config.getKey());
        List<Config> list = configMapper.listByKey(config.getKey(), null, null);
        if (list == null || list.size() == 0) {
            configMapper.insertSelective(config);
        }
    }
    @Cacheable(value = "config", key = "'getSearchDiscoveryKeys'")
    @Override
    public String getSearchDiscoveryKeys() {
        List<Config> list = configMapper.listByKey("search_discovery_keys");
        List<Config> list = configMapper.listByKey("search_discovery_keys", null, null);
        if (list == null || list.size() == 0)
            return null;
        Config config = list.get(0);
        if (config == null)
            return null;
        // 更新
        updateSearchDiscoveryKeys(config);
        String value = config.getValue();
        return value;
    }
    /**
     * 更新搜索发现词
     *
     * @param config
     */
    @Async
    private void updateSearchDiscoveryKeys(Config config) {
        long currentTime = java.lang.System.currentTimeMillis();
        String createtime = config.getCreatetime();
        if (!StringUtil.isNullOrEmpty(createtime)) {
            long diff = currentTime - Long.parseLong(createtime);
            if (diff < 1000 * 60 * 60)
            if (diff < 1000 * 60 * 60)
                return; // 超过一个小时更新
        }
        String hotWords = DaTaoKeApiUtil.getHotWords();
        if (StringUtil.isNullOrEmpty(hotWords))
            return ;
            return;
        config.setValue(hotWords);
        config.setCreatetime(currentTime + "");
        configMapper.updateByPrimaryKeySelective(config);
fanli/src/main/java/com/yeshi/fanli/service/impl/config/SystemClientParamsServiceImpl.java
@@ -22,7 +22,8 @@
    
    @Cacheable(value = "clientParamCache", key = "#systemId+'-'+#version")
    public List<SystemClientParams> getSystemClientParamsBySystemId(long systemId, int version) {
        return systemClientParamsMapper.listBySystemId(systemId);
        return systemClientParamsMapper.listBySystemIdAndMinVersion(systemId,version);
    }
fanli/src/main/java/com/yeshi/fanli/service/inter/config/ConfigService.java
@@ -19,6 +19,8 @@
    void save(Config config);
    String get(String string);
    String getByVersion(String key,String platform,int version);
    Config getConfig(String key);
fanli/src/main/java/com/yeshi/fanli/util/Constant.java
@@ -7,6 +7,7 @@
import org.yeshi.utils.annotation.MapUtil;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.config.AlipayConfig;
import com.yeshi.fanli.entity.config.ConstantConfig;
import com.yeshi.fanli.entity.config.SMSConfig;
@@ -80,9 +81,9 @@
    public static final String TAOBAO_AUTH_APPSECRET = "e0a2e05deabf5ce039b52e5b492d5382";
    public static final String TAOBAO_RELATION_PID_DEFAULT = "mm_124933865_56750082_87140050199";
    public static final String TAOBAO_SPECIAL_PID_DEFAULT = "mm_124933865_56750082_89555600043";
    //奖励券最高比例
   public static final BigDecimal MAX_REWARD_RATE=new BigDecimal("0.35");
    // 奖励券最高比例
    public static final BigDecimal MAX_REWARD_RATE = new BigDecimal("0.35");
    // 返回给客户端的账号封禁提示语
    public static final String FORBIDDEN_USER_REASON_DESC = "你的账号或绑定的第三方账号已被封禁,封禁原因可在帮助中心的相关规则中参看,如有疑问或申诉解除封禁请联系客服";
@@ -167,7 +168,7 @@
     */
    public static final String BINDUSER = "2";
    /**
     * 返利券系统的ID(安卓)
     * 系统的ID(安卓)
     */
    public static final long FANLI = 4;
    /**
@@ -260,4 +261,11 @@
        else
            return 0;// 未知
    }
    public static String getAppName(String platform, String version) {
        if (VersionUtil.greaterThan_2_0(platform, version))
            return Constant.systemCommonConfig.getProjectName();
        else
            return "返利券";
    }
}
fanli/src/main/java/com/yeshi/fanli/util/ImageUtil.java
@@ -200,7 +200,6 @@
            font = font.deriveFont(30.0f);
            g2d.setFont(font);
            g2d.setColor(new Color(229, 0, 93));
            // g2d.drawString("返利券提醒您", 250 + 17, 1080 + 17);
            g2d.setColor(new Color(102, 102, 102));
            g2d.drawString("长按识别二维码领取优惠券", 250 + 17, 1130 + 17);
@@ -450,7 +449,6 @@
            font = font.deriveFont(50.0f);
            g2d.setFont(font);
            g2d.setColor(new Color(229, 0, 93));
            // g2d.drawString("返利券提醒您", 312, 1118 + 40);
            g2d.setColor(new Color(102, 102, 102));
            g2d.drawString("长按识别二维码领取优惠券", 312, 1118 + 77);
@@ -717,7 +715,6 @@
            font = font.deriveFont(50.0f);
            g2d.setFont(font);
            g2d.setColor(new Color(229, 0, 93));
            // g2d.drawString("返利券提醒您", 312, 1118 + 40);
            g2d.setColor(new Color(102, 102, 102));
            g2d.drawString("长按识别二维码免费领券", 312, 1150);
fanli/src/main/java/com/yeshi/fanli/util/VersionUtil.java
@@ -50,14 +50,7 @@
        else
            return false;
    }
    public static boolean greaterThan_2_0_0(String platform, String versionCode) {
        if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 48))
                || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 66)))
            return true;
        else
            return false;
    }
    
    public static boolean greaterThan_2_0(String platform, String versionCode) {
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoLiJinUtil.java
@@ -2,7 +2,9 @@
import java.math.BigDecimal;
import com.google.gson.Gson;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.util.MoneyBigDecimalUtil;
/**
@@ -21,8 +23,10 @@
     * @return
     */
    public static BigDecimal getSpreadMoney(String warningRate, TaoBaoGoodsBrief goodsBrief) {
        LogHelper.error("推广红包-商品信息:"+new Gson().toJson(goodsBrief));
        BigDecimal spreadMoney = TaoBaoUtil.getGoodsHongBaoMoney(goodsBrief, new BigDecimal(100));
        return MoneyBigDecimalUtil.mul(new BigDecimal(warningRate).multiply(new BigDecimal("0.01")), spreadMoney);
        LogHelper.error("推广红包-商品总佣金:"+spreadMoney);
        return MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.div(new BigDecimal(warningRate),new BigDecimal("100")), spreadMoney);
    }
}
fanli/src/main/resource/app.properties
@@ -71,7 +71,7 @@
share_content=来自你的分享赚订单号:{0}的分享提成¥{1}元已经转入到你的余额中
service_title=售后订单扣款提示
service_content=订单号:{0}的订单淘宝已售后退款处理,其订单返利/分享提成¥{1}元,将从你的余额中扣出。因为任何订单出现退款或售后,商家均不会支付相应订单的广告费,所以返利券也无法提供返利,非常遗憾。温馨提示:恶意的提交售后申请,淘宝会对该用户做相应的处罚,购物信用将永远有记录;另一方面返利券也会做出相应处罚。
service_content=订单号:{0}的订单淘宝已售后退款处理,其订单返利/分享提成¥{1}元,将从你的余额中扣出。因为任何订单出现退款或售后,商家均不会支付相应订单的广告费,所以板栗快省也无法提供返利,非常遗憾。温馨提示:恶意的提交售后申请,淘宝会对该用户做相应的处罚,购物信用将永远有记录;另一方面板栗快省也会做出相应处罚。
extract_apply_title=你已成功提交提现申请
extract_apply_content=你已成功提交提现申请,我们会尽快审核,如账目明细无误,我们将在24小时内为您转账。
fanli/src/main/resource/system_config.properties
@@ -3,7 +3,7 @@
#项目名称
project_name=fanli
project_chinese_name=返利券
project_chinese_name=板栗快省
#项目域名
project_host=flq.yeshitv.com
#公众号appid
fanli/src/main/resource/wx_gz_config.properties
@@ -1,7 +1,7 @@
#微信公众号配置
#欢迎语
welcome_msg=你好啊,欢迎来到《返利券》官方公众号[爱心][爱心] \n 平时购物领券可是一种生活方式哦,券后价非常给力,下载《返利券》APP有返利哦,现在可以购物领券啦![發][發]  \n [礼物]你可以回复,例如:衣服,可快速查询优惠券。\n [强]购物领券,绝对超给力 \n\n ↓↓下载APP不光能领券↓↓ \n ↓↓还有返利哦↓↓ \n <a href='http://sj.qq.com/myapp/detail.htm?apkName=com.yeshi.ec.rebate'> >>>戳此下载</a>
welcome_msg=你好啊,欢迎来到《板栗快省》官方公众号[爱心][爱心] \n 平时购物领券可是一种生活方式哦,券后价非常给力,下载《板栗快省》APP有返利哦,现在可以购物领券啦![發][發]  \n [礼物]你可以回复,例如:衣服,可快速查询优惠券。\n [强]购物领券,绝对超给力 \n\n ↓↓下载APP不光能领券↓↓ \n ↓↓还有返利哦↓↓ \n <a href='http://sj.qq.com/myapp/detail.htm?apkName=com.yeshi.ec.rebate'> >>>戳此下载</a>
#app下载链接
app_download_link=http://sj.qq.com/myapp/detail.htm?apkName=com.yeshi.ec.rebate
fanli/src/main/resource/znx_msg.properties
@@ -61,18 +61,18 @@
#售后维权订单扣款提示
weiquan_drawback_fanli_title=售后维权订单扣款提示
weiquan_drawback_fanli_push=您有一个【订单号:[订单号]】的返利订单,淘宝已维权成功退款,其 订单对应的返利  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以返利券也无法提供返利,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_fanli_msg=您有一个【订单号:[订单号]】 的返利订单,淘宝已维权成功退款,其 订单对应的提成  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以返利券也无法提供返利,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_fanli_push=您有一个【订单号:[订单号]】的返利订单,淘宝已维权成功退款,其 订单对应的返利  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以本APP也无法提供返利,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_fanli_msg=您有一个【订单号:[订单号]】 的返利订单,淘宝已维权成功退款,其 订单对应的提成  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以本APP也无法提供返利,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_invite_title=售后维权订单扣款提示
weiquan_drawback_invite_push=您有一个【订单号:[订单号]】的邀请订单,淘宝已维权成功退款,其 订单对应的返利  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以返利券也无法提供奖金,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_invite_msg=您有一个【订单号:[订单号]】 的邀请订单,淘宝已维权成功退款,其 订单对应的提成  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以返利券也无法提供奖金,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_invite_push=您有一个【订单号:[订单号]】的邀请订单,淘宝已维权成功退款,其 订单对应的返利  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以本APP也无法提供奖金,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_invite_msg=您有一个【订单号:[订单号]】 的邀请订单,淘宝已维权成功退款,其 订单对应的提成  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以本APP也无法提供奖金,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_share_title=售后维权订单扣款提示
weiquan_drawback_share_push=您有一个【订单号:[订单号]】的分享订单,淘宝已维权成功退款,其 订单对应的返利  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以返利券也无法提供奖金,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_share_msg=您有一个【订单号:[订单号]】 的分享订单,淘宝已维权成功退款,其 订单对应的提成  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以返利券也无法提供奖金,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_share_push=您有一个【订单号:[订单号]】的分享订单,淘宝已维权成功退款,其 订单对应的返利  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以本APP也无法提供奖金,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。
weiquan_drawback_share_msg=您有一个【订单号:[订单号]】 的分享订单,淘宝已维权成功退款,其 订单对应的提成  ¥[金额]元,将从你的余额中扣出。因为订单出现退款或售后,淘宝将会扣除相应返利,所以本APP也无法提供奖金,非常遗憾。温馨提示:请勿恶意提交售后申请,淘宝会对其做相应的处罚;我们也倡导用户诚信网购。