yujian
2019-03-12 4a05f1c9c508ab7f10c5eae22a5c716f5454ca02
冲突提交
45个文件已修改
1498 ■■■■ 已修改文件
fanli/.classpath 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/.project 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/aspect/ActiveUserAspect.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/aspect/SignValidateAspect.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java 140 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/TaoBaoGoodsBriefAdminController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SwiperBannerAdminController.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/UserInfoMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/push/DeviceTokenIOSMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/user/ForbiddenUserIdentifyCodeMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/SwiperPicture.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/push/PushCoupon.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/push/PushGoods.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/push/PushQueueRecord.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SwiperPictureMapper.xml 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceTokenIOSMapper.xml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushCouponMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushRecordMapper.xml 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/user/ForbiddenUserIdentifyCodeMapper.xml 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/config/AppVersionServiceImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/HWPushServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/IOSPushServiceImpl.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponRecordServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushGoodsServiceImpl.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/XMPushServiceImpl.java 147 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/ForbiddenUserIdentifyCodeServiceImpl.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserNotificationServiceImpl.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/config/AppVersionService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SwiperPictureService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/push/BasePushService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/push/IOSPushService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/push/PushCouponRecordService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/push/PushService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/ForbiddenUserIdentifyCodeService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/Constant.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/druid.properties 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/test/java/org/fanli/MyBatisProduce.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/test/java/org/fanli/random/ExtractGift.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/.classpath
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src/main/resource"/>
    <classpathentry kind="src" output="target/classes" path="src/main/java">
    <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resource">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
        <attributes>
            <attribute name="optional" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
@@ -11,6 +15,7 @@
        <attributes>
            <attribute name="optional" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
            <attribute name="test" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
fanli/.project
@@ -21,12 +21,12 @@
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.m2e.core.maven2Builder</name>
            <name>org.eclipse.wst.validation.validationbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.validation.validationbuilder</name>
            <name>org.eclipse.m2e.core.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>
fanli/src/main/java/com/yeshi/fanli/aspect/ActiveUserAspect.java
@@ -38,7 +38,7 @@
    
    public static final String EDP = "execution(* com.yeshi.fanli.controller.client.*.*(..))";
//    @Around(EDP)
    @Around(EDP)
    public Object activeAround(ProceedingJoinPoint joinPoint) throws Throwable {
        Long uid = null;
@@ -63,18 +63,18 @@
                    return;
                }
                
                // 缓存uid的Key
                String key = "activeUid_" + uuid;
                // 缓存中是否存在uid
                String cacheValue = redisManager.getCommonString(key);
                if (cacheValue != null && cacheValue.trim().length() > 0) {
                    return;
                }
                // 加入缓存 20分钟
                redisManager.cacheCommonString("activeUid_" + uuid, uuid.toString(), 60 * 20);
//                // 缓存uid的Key
//                String key = "activeUid_" + uuid;
//
//                // 缓存中是否存在uid
//                String cacheValue = redisManager.getCommonString(key);
//                if (cacheValue != null && cacheValue.trim().length() > 0) {
//                    return;
//                }
//
//                // 加入缓存 20分钟
//                redisManager.cacheCommonString("activeUid_" + uuid, uuid.toString(), 60 * 20);
//
                
                // 接收券
                try {
fanli/src/main/java/com/yeshi/fanli/aspect/SignValidateAspect.java
@@ -14,6 +14,7 @@
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@@ -29,6 +30,7 @@
//客户端接口签名验证
@Component
@Aspect
@Order(2)
public class SignValidateAspect {
    public static final String EDP = "execution(* com.yeshi.fanli.controller.client.*.*(..))";
@@ -91,7 +93,6 @@
            // return null;
            // }
            //uid
            Object obj = null;
            try {
fanli/src/main/java/com/yeshi/fanli/controller/admin/PushController.java
@@ -1,6 +1,8 @@
package com.yeshi.fanli.controller.admin;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Resource;
@@ -74,29 +76,41 @@
     * @throws Exception
     */
    @RequestMapping(value = "pushGoodsAll_f", method = RequestMethod.POST)
    public void pushGoods(Long uId, String url, String title, String content, PrintWriter out) throws Exception {
        String auctionId = null;
        if (!StringUtil.isNullOrEmpty(url) && url.contains("id=")) {
            String[] sts = url.split("\\?")[1].split("&");
            for (String st : sts)
                if (st.contains("id=")) {
                    auctionId = st.replace("id=", "");
                }
        }
    public void pushGoods(Long uId, String url, String title, String content, String versions, PrintWriter out) throws Exception {
        try {
            String auctionId = null;
            if (!StringUtil.isNullOrEmpty(url) && url.contains("id=")) {
                String[] sts = url.split("\\?")[1].split("&");
                for (String st : sts)
                    if (st.contains("id=")) {
                        auctionId = st.replace("id=", "");
                    }
            }
        if (StringUtil.isNullOrEmpty(auctionId)) {
            out.print(JsonUtil.loadFalseResult("提取商品ID失败"));
            return;
        }
            if (StringUtil.isNullOrEmpty(auctionId)) {
                out.print(JsonUtil.loadFalseResult("提取商品ID失败"));
                return;
            }
        JSONObject json = IOSPushFactory.createGoodsPush(Long.parseLong(auctionId), title, content);
        if (json.toString().getBytes().length > 256) {
            out.print(JsonUtil.loadFalseResult("标题或内容过长,请删减后再试"));
            return;
        }
            JSONObject json = IOSPushFactory.createGoodsPush(Long.parseLong(auctionId), title, content);
            if (json.toString().getBytes().length > 256) {
                out.print(JsonUtil.loadFalseResult("标题或内容过长,请删减后再试"));
                return;
            }
        pushService.pushGoods(uId, url, title, content);
        out.print(JsonUtil.loadTrueResult("推送成功"));
            List<String> listVersion = null;
            if (versions != null && versions.trim().length() > 0) {
                listVersion  = Arrays.asList(versions.split(","));
            }
            pushService.pushGoods(uId, url, title, content, listVersion);
            out.print(JsonUtil.loadTrueResult("推送成功"));
        } catch (PushException e) {
            out.print(JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("推送失败"));
            e.printStackTrace();
        }
    }
    /**
@@ -109,7 +123,7 @@
     * @throws Exception
     */
    @RequestMapping(value = "pushUrlAll_f", method = RequestMethod.POST)
    public void pushUrl(String url, String title, String content, PrintWriter out) throws Exception {
    public void pushUrl(String url, String title, String content, String versions, PrintWriter out) throws Exception {
        if (StringUtil.isNullOrEmpty(url) || StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
            out.print(JsonUtil.loadFalseResult("请填写链接,标题与内容"));
            return;
@@ -120,8 +134,22 @@
            out.print(JsonUtil.loadFalseResult("标题或内容过长,请删减后再试"));
            return;
        }
        pushService.pushUrl(null, url, title, content);
        out.print(JsonUtil.loadTrueResult("推送成功"));
        try {
            List<String> listVersion = null;
            if (versions != null && versions.trim().length() > 0) {
                listVersion  = Arrays.asList(versions.split(","));
            }
            pushService.pushUrl(null, url, title, content, listVersion);
            out.print(JsonUtil.loadTrueResult("推送成功"));
        } catch (PushException e) {
            out.print(JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("推送失败"));
            e.printStackTrace();
        }
    }
    /**
@@ -135,9 +163,23 @@
     * @throws Exception
     */
    @RequestMapping(value = "pushFanZNX_f", method = RequestMethod.POST)
    public void pushSystemZnx(Long uId, String title, String content, PrintWriter out) throws Exception {
        pushService.pushZNX(uId, title, content);
        out.print(JsonUtil.loadTrueResult("推送成功"));
    public void pushSystemZnx(Long uId, String title, String content, String versions, PrintWriter out) throws Exception {
        try {
            List<String> listVersion = null;
            if (versions != null && versions.trim().length() > 0) {
                listVersion  = Arrays.asList(versions.split(","));
            }
            pushService.pushZNX(uId, title, content, listVersion);
            out.print(JsonUtil.loadTrueResult("推送成功"));
        } catch (PushException e) {
            out.print(JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("推送失败"));
            e.printStackTrace();
        }
    }
    /**
@@ -184,7 +226,7 @@
     * @throws Exception
     */
    @RequestMapping(value = "newPushGoodsAll")
    public void newPushGoodsAll(String callback, Long uid, String url, String title, String content, PrintWriter out)
    public void newPushGoodsAll(String callback, Long uid, String url, String title, String content, String versions, PrintWriter out)
            throws Exception {
        String auctionId = null;
@@ -208,8 +250,15 @@
        }
        try {
            pushService.pushGoods(uid, url, title, content);
            List<String> listVersion = null;
            if (versions != null && versions.trim().length() > 0) {
                listVersion  = Arrays.asList(versions.split(","));
            }
            pushService.pushGoods(uid, url, title, content, listVersion);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("推送成功"));
        } catch (PushException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("推送失败"));
            e.printStackTrace();
@@ -226,7 +275,7 @@
     * @throws Exception
     */
    @RequestMapping(value = "newPushUrlAll")
    public void newPushUrlAll(String callback, String url, String title, String content, PrintWriter out) {
    public void newPushUrlAll(String callback, String url, String title, String content, String versions, PrintWriter out) {
        if (StringUtil.isNullOrEmpty(url) || StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请填写链接,标题与内容"));
@@ -240,9 +289,16 @@
        }
        try {
            pushService.pushUrl(null, url, title, content);
            List<String> listVersion = null;
            if (versions != null && versions.trim().length() > 0) {
                listVersion  = Arrays.asList(versions.split(","));
            }
            pushService.pushUrl(null, url, title, content, listVersion);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("推送成功"));
        } catch (PushException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("推送失败"));
            e.printStackTrace();
        }
@@ -258,7 +314,7 @@
     * @throws Exception
     */
    @RequestMapping(value = "newPushFanZNX")
    public void newPushFanZNX(String callback, String uids, String title, String content, PrintWriter out) {
    public void newPushFanZNX(String callback, String uids, String title, String content, String versions, PrintWriter out) {
        if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请填写标题与内容"));
@@ -271,14 +327,19 @@
            if (uids != null) {
                uidArray = uids.split(",");
            }
            List<String> listVersion = null;
            if (versions != null && versions.trim().length() > 0) {
                listVersion  = Arrays.asList(versions.split(","));
            }
            if (uidArray == null) {
                pushService.pushZNX(null, title, content);
                pushService.pushZNX(null, title, content, listVersion);
            } else {
                for (int i = 0; i < uidArray.length; i++) {
                    String str_uid = uidArray[i];
                    if (str_uid != null && str_uid.trim().length() > 0) {
                        pushService.pushZNX(Long.parseLong(str_uid), title, content);
                        pushService.pushZNX(Long.parseLong(str_uid), title, content, listVersion);
                        userSystemMsgService.addUserSystemMsg(Long.parseLong(str_uid), UserSystemMsgTypeEnum.question,
                                title, content, UserSystemMsg.TIME_TAG_EMERGENT, null);
@@ -304,7 +365,7 @@
     * @throws Exception
     */
    @RequestMapping(value = "pushBaiChuan")
    public void pushBaiChuan(String callback, String uids, String title, String content, String url, PrintWriter out) {
    public void pushBaiChuan(String callback, String uids, String title, String content, String url, String versions, PrintWriter out) {
        if (StringUtil.isNullOrEmpty(title) || StringUtil.isNullOrEmpty(content)) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请填写标题与内容"));
@@ -318,13 +379,18 @@
                uidArray = uids.split(",");
            }
            List<String> listVersion = null;
            if (versions != null && versions.trim().length() > 0) {
                listVersion  = Arrays.asList(versions.split(","));
            }
            if (uidArray == null) {
                pushService.pushBaiChuanUrl(null, title, content, url);
                pushService.pushBaiChuanUrl(null, title, content, url, listVersion);
            } else {
                for (int i = 0; i < uidArray.length; i++) {
                    String str_uid = uidArray[i];
                    if (str_uid != null && str_uid.trim().length() > 0) {
                        pushService.pushBaiChuanUrl(Long.parseLong(str_uid), title, content, url);
                        pushService.pushBaiChuanUrl(Long.parseLong(str_uid), title, content, url, listVersion);
                    }
                }
            }
fanli/src/main/java/com/yeshi/fanli/controller/admin/TaoBaoGoodsBriefAdminController.java
@@ -384,7 +384,7 @@
    }
    
    /**
     *
     *  加入精选库商品
     * @param callback
     * @param pageIndex
     * @param key
fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java
@@ -73,6 +73,7 @@
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.util.factory.AccountDetailsFactory;
import com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -133,6 +134,7 @@
    @Resource
    private UserRankService userRankService;
    @Resource
    private UserMoneyDetailService userMoneyDetailService;
@@ -1624,4 +1626,84 @@
        }
    }
    /**
     * 查询封禁
     * @param callback
     * @param pageIndex
     * @param pageSize
     * @param key
     * @param type
     * @param out
     */
    @RequestMapping(value = "forbiddenQuery")
    public void forbiddenQuery(String callback, Integer pageIndex, Integer pageSize, String key, Integer type, PrintWriter out) {
        try {
            if (pageIndex == null)
                pageIndex = 1;
            if (pageSize == null)
                pageSize = Constant.PAGE_SIZE;
            List<ForbiddenUserIdentifyCodeVO> list = forbiddenUserIdentifyCodeService.listQuery((pageIndex - 1) * pageSize,
                    pageSize, key, type);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无相关数据"));
                return;
            }
            long count = forbiddenUserIdentifyCodeService.countQuery(key, type);
            int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
            PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
            GsonBuilder gsonBuilder = new GsonBuilder();
            gsonBuilder.serializeNulls();
            Gson gson = gsonBuilder.create();
            JSONObject data = new JSONObject();
            data.put("pe", pe);
            data.put("result_list", gson.toJson(list));
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            e.printStackTrace();
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
        }
    }
    /**
     * 用户账号- 封禁/解封
     * @param callback
     * @param code
     * @param type 1("微信unionId"), 2("淘宝ID"), 3("手机号"), 4("支付宝账号");
     * @param out
     */
    @RequestMapping(value = "saveForbiddenInfo")
    public void saveForbiddenInfo(String callback, String code, Integer type, boolean state, PrintWriter out) {
        try {
            if (code == null || code.trim().length() == 0 || type == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("参数不能为空"));
            }
            forbiddenUserIdentifyCodeService.saveForbiddenInfo(code, type, state);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("修改成功"));
        } catch (ForbiddenUserIdentifyCodeException e) {
            e.printStackTrace();
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            e.printStackTrace();
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SwiperBannerAdminController.java
@@ -384,6 +384,7 @@
            record.setOrder(maxOrder + 1);
            // 默认停用
            record.setState(1);
            record.setAutoControl(1);
            record.setCreatetime(new Date());
            record.setUpdatetime(new Date());
            
@@ -470,40 +471,7 @@
                return;
            }
            SwiperPicture resultObj = swiperPictureService.selectByPrimaryKey(id);
            if (resultObj == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
                return;
            }
            String params = record.getParams();
            String remark = record.getRemark();
            if (StringUtil.isNullOrEmpty(params) && StringUtil.isNullOrEmpty(jumpType)
                    && StringUtil.isNullOrEmpty(remark)) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作内容不能为空"));
                return;
            }
            if (!StringUtil.isNullOrEmpty(params)) {
                String jumpValue = systemConfigService.get("jump");
                if (StringUtil.isNullOrEmpty(jumpValue)) {
                    jumpValue = "{\"url\":\"#\"}";
                }
                params = jumpValue.replace("#", params);
                record.setParams(params);
            }
            if (!StringUtil.isNullOrEmpty(jumpType)) {
                List<JumpDetailV2> listByType = jumpDetailV2Service.listByType(jumpType);
                if (listByType !=null && listByType.size() > 0) {
                    record.setJumpDetail(listByType.get(0));
                }
            }
            swiperPictureService.updateByPrimaryKeySelective(record);
            swiperPictureService.save(record);
            
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
            
@@ -588,6 +556,48 @@
            e.printStackTrace();
        }
    }
    /**
     *  更新自动控制状态
     * @param callback
     * @param id
     * @param out
     */
    @RequestMapping(value = "updateAutoControl")
    public void updateAutoControl(String callback, Long id, PrintWriter out) {
        try {
            if (id == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
                return;
            }
            SwiperPicture resultObj = swiperPictureService.selectByPrimaryKey(id);
            if (resultObj == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在"));
                return;
            }
            Integer state = resultObj.getAutoControl();
            if (state == null ||  state.equals(1) || state == 1) {
                resultObj.setAutoControl(0);
            } else {
                resultObj.setAutoControl(1);
            }
            swiperPictureService.updateByPrimaryKeySelective(resultObj);
            JSONObject data = new JSONObject();
            data.put("state", resultObj.getState());
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (SwiperPictureException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
        }
    }
    /**
     * 修改排序
fanli/src/main/java/com/yeshi/fanli/controller/client/PushController.java
@@ -185,7 +185,7 @@
    }
    /**
     * 解绑推送
     * 商品推送记录
     * 
     * @param acceptData
     * @param out
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/UserInfoMapper.java
@@ -167,4 +167,12 @@
     */
    UserInfo getInfoByPhoneOrInviteCode(@Param("phone")String phone, @Param("inviteCode")String inviteCode);
    // 根据AppId与电话号码获取用户
    List<UserInfo> listByClosed(@Param("appId") String appId, @Param("phone") String phone);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/push/DeviceTokenIOSMapper.java
@@ -20,9 +20,9 @@
    
    DeviceTokenIOS selectByDeviceToken(String deviceToken);
    
    List<DeviceTokenIOS> selectByUid(Long uid);
    List<DeviceTokenIOS> selectByUid( @Param("uid")Long uid,  @Param("list")List<Integer> list);
    
    List<DeviceTokenIOS> selectList(@Param("start")Long start,@Param("count")int count);
    List<DeviceTokenIOS> selectList(@Param("start")Long start,@Param("count")int count, @Param("array")String[] arrayVersion);
    
    long selectCount();
    
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/user/ForbiddenUserIdentifyCodeMapper.java
@@ -7,6 +7,7 @@
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode;
import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
import com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO;
public interface ForbiddenUserIdentifyCodeMapper extends BaseMapper<ForbiddenUserIdentifyCode> {
@@ -19,5 +20,19 @@
     */
    List<ForbiddenUserIdentifyCode> listByTypeAndIdentifyCode(@Param("type") ForbiddenUserIdentifyCodeTypeEnum type,
            @Param("identifyCode") String identifyCode);
    /**
     *       查询封禁记录
     * @param start
     * @param count
     * @param key
     * @return
     */
    List<ForbiddenUserIdentifyCodeVO> listQuery(@Param("start") long start, @Param("count") int count,
            @Param("key") String key, @Param("type") Integer type);
    long countQuery(@Param("key") String key, @Param("type") Integer type);
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/SwiperPicture.java
@@ -12,9 +12,16 @@
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.springframework.format.annotation.DateTimeFormat;
import com.google.gson.annotations.Expose;
import com.yeshi.fanli.entity.common.JumpDetailV2;
/**
 * 轮播图 图片管理
 * @author Administrator
 *
 */
@Entity
@Table(name = "yeshi_ec_swiper_banner_picture")
@org.yeshi.utils.mybatis.Table("yeshi_ec_swiper_banner_picture")
@@ -28,26 +35,42 @@
    @org.yeshi.utils.mybatis.Column(name = "pic_id")
    private Long id;
    // 轮播图标识ID
    @JoinColumn(name = "pic_banner_id")
    @org.yeshi.utils.mybatis.Column(name = "pic_banner_id")
    private Long bannerId;
    // 图片链接
    @Expose
    @JoinColumn(name = "pic_src")
    @org.yeshi.utils.mybatis.Column(name = "pic_src")
    private String src;
    // 跳转方式
    @Expose
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "pic_jumpid")
    @org.yeshi.utils.mybatis.Column(name = "pic_jumpid")
    private JumpDetailV2 jumpDetail;
    // 跳转参数
    @Expose
    @JoinColumn(name = "pic_params")
    @org.yeshi.utils.mybatis.Column(name = "pic_params")
    private String params;
    // 跳转是否需要登陆
    @JoinColumn(name = "pic_jump_need_login")
    @org.yeshi.utils.mybatis.Column(name = "pic_jump_need_login")
    private boolean jumpNeedLogin;
    // 显示状态:everyday每天展示一次 、always 每次打开首页都展示
    @Expose
    @JoinColumn(name = "pic_show_state")
    @org.yeshi.utils.mybatis.Column(name = "pic_show_state")
    private String showState;
    // 排序
    @JoinColumn(name = "pic_order")
    @org.yeshi.utils.mybatis.Column(name = "pic_order")
    private Integer order;
@@ -56,9 +79,28 @@
    @org.yeshi.utils.mybatis.Column(name = "pic_remark")
    private String remark;
    // 启用状态
    @JoinColumn(name = "pic_state")
    @org.yeshi.utils.mybatis.Column(name = "pic_state")
    private Integer state;
    // 自动控制
    @JoinColumn(name = "pic_auto_control")
    @org.yeshi.utils.mybatis.Column(name = "pic_auto_control")
    private Integer autoControl;
    // 起始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JoinColumn(name = "pic_start_time")
    @org.yeshi.utils.mybatis.Column(name = "pic_start_time")
    private Date startTime;
    // 结束时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JoinColumn(name = "pic_end_time")
    @org.yeshi.utils.mybatis.Column(name = "pic_end_time")
    private Date endTime;
    @JoinColumn(name = "pic_createtime")
    @org.yeshi.utils.mybatis.Column(name = "pic_createtime")
@@ -147,4 +189,46 @@
    public void setParams(String params) {
        this.params = params;
    }
    public Integer getAutoControl() {
        return autoControl;
    }
    public void setAutoControl(Integer autoControl) {
        this.autoControl = autoControl;
    }
    public Date getStartTime() {
        return startTime;
    }
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    public boolean isJumpNeedLogin() {
        return jumpNeedLogin;
    }
    public void setJumpNeedLogin(boolean jumpNeedLogin) {
        this.jumpNeedLogin = jumpNeedLogin;
    }
    public String getShowState() {
        return showState;
    }
    public void setShowState(String showState) {
        this.showState = showState;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/push/PushCoupon.java
@@ -33,6 +33,10 @@
    @Column(name = "pc_uids")
    private String uids;
    // 版本号
    @Column(name = "pc_versions")
    private String versions;
    // 单推用户id
    @Column(name = "pc_remark")
    private String remark;
@@ -172,4 +176,12 @@
        this.updateTime = updateTime;
    }
    public String getVersions() {
        return versions;
    }
    public void setVersions(String versions) {
        this.versions = versions;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/push/PushGoods.java
@@ -32,8 +32,11 @@
    private String picture;
    
    // 推送用户id 使用于单推
    @Column(name = "pg_uid")
//    @Column(name = "pg_uid")
    private Long uid;
    @Column(name = "pg_versions")
    private String versions;
    
    // 是否已推送
    @Column(name = "pg_is_push")
@@ -134,14 +137,6 @@
        this.updateTime = updateTime;
    }
    public Long getUid() {
        return uid;
    }
    public void setUid(Long uid) {
        this.uid = uid;
    }
    public Long getCountGoods() {
        return countGoods;
    }
@@ -157,5 +152,21 @@
    public void setPicture(String picture) {
        this.picture = picture;
    }
    public String getVersions() {
        return versions;
    }
    public void setVersions(String versions) {
        this.versions = versions;
    }
    public Long getUid() {
        return uid;
    }
    public void setUid(Long uid) {
        this.uid = uid;
    }
    
}
fanli/src/main/java/com/yeshi/fanli/entity/push/PushQueueRecord.java
@@ -50,6 +50,10 @@
    @org.yeshi.utils.mybatis.Column(name = "qe_push_num")
    private Integer pushNum;
    
    /* 推送的版本号 */
    @Column(name="`qe_versions`")
    @org.yeshi.utils.mybatis.Column(name = "qe_versions")
    private String versions;
    
    /* 状态: 执行状态 :0 未执行   1执行完成   2执行失败 */
    @Column(name="`qe_state`")
@@ -146,5 +150,13 @@
    public void setEndtime(Date endtime) {
        this.endtime = endtime;
    }
    public String getVersions() {
        return versions;
    }
    public void setVersions(String versions) {
        this.versions = versions;
    }
    
}
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SwiperPictureMapper.xml
@@ -7,21 +7,25 @@
    <result column="pic_banner_id" property="bannerId" jdbcType="BIGINT"/>
    <result column="pic_src" property="src" jdbcType="VARCHAR"/>
    <result column="pic_params" property="params" jdbcType="VARCHAR"/>
    <result column="pic_jump_need_login" property="jumpNeedLogin" jdbcType="VARCHAR"/>
    <result column="pic_show_state" property="showState" jdbcType="VARCHAR"/>
    <result column="pic_order" property="order" jdbcType="INTEGER"/>
    <result column="pic_remark" property="remark" jdbcType="VARCHAR"/>
    <result column="pic_state" property="state" jdbcType="INTEGER"/>
    <result column="pic_auto_control" property="autoControl" jdbcType="INTEGER"/>
    <result column="pic_start_time" property="startTime" jdbcType="TIMESTAMP"/>
    <result column="pic_end_time" property="endTime" jdbcType="TIMESTAMP"/>
    <result column="pic_createtime" property="createtime" jdbcType="TIMESTAMP"/>
    <result column="pic_updatetime" property="updatetime" jdbcType="TIMESTAMP"/>
    <association property="jumpDetail" column="pic_jumpid" resultMap="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.BaseResultMap"/>
    <association property="jumpDetail" column="pic_jumpid" resultMap="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.BaseResultMap"/>
  </resultMap>
  <sql id="Base_Column_List">pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_order,pic_remark,pic_state,pic_createtime,pic_updatetime</sql>
  <sql id="Base_Column_List">pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_jump_need_login,pic_show_state,pic_order,pic_remark,pic_state,pic_auto_control,pic_start_time,pic_end_time,pic_createtime,pic_updatetime</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_swiper_banner_picture where pic_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_swiper_banner_picture where pic_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture (pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_order,pic_remark,pic_state,pic_createtime,pic_updatetime) values (#{id,jdbcType=BIGINT},#{bannerId,jdbcType=BIGINT},#{src,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture (pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_jump_need_login,pic_show_state,pic_order,pic_remark,pic_state,pic_auto_control,pic_start_time,pic_end_time,pic_createtime,pic_updatetime) values (#{id,jdbcType=BIGINT},#{bannerId,jdbcType=BIGINT},#{src,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{jumpNeedLogin,jdbcType=VARCHAR},#{showState,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{autoControl,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">pic_id,</if>
@@ -29,9 +33,14 @@
      <if test="src != null">pic_src,</if>
      <if test="jumpDetail != null">pic_jumpid,</if>
      <if test="params != null">pic_params,</if>
      <if test="jumpNeedLogin != null">pic_jump_need_login,</if>
      <if test="showState != null">pic_show_state,</if>
      <if test="order != null">pic_order,</if>
      <if test="remark != null">pic_remark,</if>
      <if test="state != null">pic_state,</if>
      <if test="autoControl != null">pic_auto_control,</if>
      <if test="startTime != null">pic_start_time,</if>
      <if test="endTime != null">pic_end_time,</if>
      <if test="createtime != null">pic_createtime,</if>
      <if test="updatetime != null">pic_updatetime,</if>
    </trim>values
@@ -41,23 +50,33 @@
      <if test="src != null">#{src,jdbcType=VARCHAR},</if>
      <if test="jumpDetail != null">#{jumpDetail.id,jdbcType=BIGINT},</if>
      <if test="params != null">#{params,jdbcType=VARCHAR},</if>
      <if test="jumpNeedLogin != null">#{jumpNeedLogin,jdbcType=VARCHAR},</if>
      <if test="showState != null">#{showState,jdbcType=VARCHAR},</if>
      <if test="order != null">#{order,jdbcType=INTEGER},</if>
      <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
      <if test="state != null">#{state,jdbcType=INTEGER},</if>
      <if test="autoControl != null">#{autoControl,jdbcType=INTEGER},</if>
      <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if>
      <if test="endTime != null">#{endTime,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.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture set pic_banner_id = #{bannerId,jdbcType=BIGINT},pic_src = #{src,jdbcType=VARCHAR},pic_jumpid = #{jumpDetail.id,jdbcType=BIGINT},pic_params = #{params,jdbcType=VARCHAR},pic_order = #{order,jdbcType=INTEGER},pic_remark = #{remark,jdbcType=VARCHAR},pic_state = #{state,jdbcType=INTEGER},pic_createtime = #{createtime,jdbcType=TIMESTAMP},pic_updatetime = #{updatetime,jdbcType=TIMESTAMP} where pic_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture set pic_banner_id = #{bannerId,jdbcType=BIGINT},pic_src = #{src,jdbcType=VARCHAR},pic_jumpid = #{jumpDetail.id,jdbcType=BIGINT},pic_params = #{params,jdbcType=VARCHAR},pic_jump_need_login = #{jumpNeedLogin,jdbcType=VARCHAR},pic_show_state = #{showState,jdbcType=VARCHAR},pic_order = #{order,jdbcType=INTEGER},pic_remark = #{remark,jdbcType=VARCHAR},pic_state = #{state,jdbcType=INTEGER},pic_auto_control = #{autoControl,jdbcType=INTEGER},pic_start_time = #{startTime,jdbcType=TIMESTAMP},pic_end_time = #{endTime,jdbcType=TIMESTAMP},pic_createtime = #{createtime,jdbcType=TIMESTAMP},pic_updatetime = #{updatetime,jdbcType=TIMESTAMP} where pic_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture
    <set>
      <if test="bannerId != null">pic_banner_id=#{bannerId,jdbcType=BIGINT},</if>
      <if test="src != null">pic_src=#{src,jdbcType=VARCHAR},</if>
      <if test="jumpDetail != null">pic_jumpid=#{jumpDetail.id,jdbcType=BIGINT},</if>
      <if test="params != null">pic_params=#{params,jdbcType=VARCHAR},</if>
      <if test="jumpNeedLogin != null">pic_jump_need_login=#{jumpNeedLogin,jdbcType=VARCHAR},</if>
      <if test="showState != null">pic_show_state=#{showState,jdbcType=VARCHAR},</if>
      <if test="order != null">pic_order=#{order,jdbcType=INTEGER},</if>
      <if test="remark != null">pic_remark=#{remark,jdbcType=VARCHAR},</if>
      <if test="state != null">pic_state=#{state,jdbcType=INTEGER},</if>
      <if test="autoControl != null">pic_auto_control=#{autoControl,jdbcType=INTEGER},</if>
      <if test="startTime != null">pic_start_time=#{startTime,jdbcType=TIMESTAMP},</if>
      <if test="endTime != null">pic_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
      <if test="createtime != null">pic_createtime=#{createtime,jdbcType=TIMESTAMP},</if>
      <if test="updatetime != null">pic_updatetime=#{updatetime,jdbcType=TIMESTAMP},</if>
    </set> where pic_id = #{id,jdbcType=BIGINT}
@@ -124,9 +143,10 @@
   
    <select id="getByBannerCard" resultMap="BaseResultMap">
        SELECT * FROM `yeshi_ec_swiper_banner` w 
        LEFT JOIN  `yeshi_ec_swiper_banner_picture` p ON p.`pic_banner_id` = w.`sp_id`
        LEFT JOIN `yeshi_ec_action_jumpdetail_v2` j ON j.`jp_id` = p.`pic_jumpid`
        LEFT JOIN  `yeshi_ec_swiper_banner_picture` p ON p.`pic_banner_id` = w.`sp_id`
        LEFT JOIN `yeshi_ec_action_jumpdetail_v2` j ON j.`jp_id` = p.`pic_jumpid`
        WHERE w.`sp_card` = #{card} AND w.`sp_state` = 0 AND p.`pic_state`= 0
            <![CDATA[AND IF(p.`pic_auto_control` = 1, p.`pic_start_time` <= NOW() AND p.`pic_end_time` >= NOW(),TRUE)]]>
        ORDER BY p.`pic_order`
   </select>
   
fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceTokenIOSMapper.xml
@@ -40,14 +40,29 @@
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_uid_devicetoken_ios where uid = #{0}
        from yeshi_ec_uid_devicetoken_ios WHERE uid = #{uid}
         <if test="list != null and list.size() > 0">
             AND version in
             <foreach collection="list" item="item" open="(" separator="," close=")">
                 #{item}
             </foreach>
         </if>
    </select>
    <select id="selectList" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_uid_devicetoken_ios limit #{start},#{count}
        from yeshi_ec_uid_devicetoken_ios
         <if test="array != null">
             WHERE version in
             <foreach collection="array" item="item" open="(" separator="," close=")">
                 #{item}
             </foreach>
         </if>
        limit #{start},#{count}
    </select>
    <select id="selectCount" resultType="java.lang.Long">select count(id) from
    <select id="selectCount" resultType="java.lang.Long">
        select count(id) from
        yeshi_ec_uid_devicetoken_ios
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushCouponMapper.xml
@@ -9,6 +9,7 @@
    <result column="pc_amount" property="amount" jdbcType="INTEGER"/>
    <result column="pc_percent" property="percent" jdbcType="DECIMAL"/>
    <result column="pc_uids" property="uids" jdbcType="VARCHAR"/>
    <result column="pc_versions" property="versions" jdbcType="VARCHAR"/>
    <result column="pc_remark" property="remark" jdbcType="VARCHAR"/>
    <result column="pc_start_time" property="startTime" jdbcType="TIMESTAMP"/>
    <result column="pc_end_time" property="endTime" jdbcType="TIMESTAMP"/>
@@ -17,12 +18,12 @@
    <result column="pc_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="pc_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
  </resultMap>
  <sql id="Base_Column_List">pc_id,pc_title,pc_content,pc_amount,pc_percent,pc_uids,pc_remark,pc_start_time,pc_end_time,pc_pushed,pc_push_time,pc_create_time,pc_update_time</sql>
  <sql id="Base_Column_List">pc_id,pc_title,pc_content,pc_amount,pc_percent,pc_uids,pc_versions,pc_remark,pc_start_time,pc_end_time,pc_pushed,pc_push_time,pc_create_time,pc_update_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_push_coupon where pc_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_push_coupon where pc_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_coupon (pc_id,pc_title,pc_content,pc_amount,pc_percent,pc_uids,pc_remark,pc_start_time,pc_end_time,pc_pushed,pc_push_time,pc_create_time,pc_update_time) values (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{amount,jdbcType=INTEGER},#{percent,jdbcType=DECIMAL},#{uids,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{pushed,jdbcType=VARCHAR},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_coupon (pc_id,pc_title,pc_content,pc_amount,pc_percent,pc_uids,pc_versions,pc_remark,pc_start_time,pc_end_time,pc_pushed,pc_push_time,pc_create_time,pc_update_time) values (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{amount,jdbcType=INTEGER},#{percent,jdbcType=DECIMAL},#{uids,jdbcType=VARCHAR},#{versions,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{pushed,jdbcType=VARCHAR},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_coupon
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">pc_id,</if>
@@ -31,6 +32,7 @@
      <if test="amount != null">pc_amount,</if>
      <if test="percent != null">pc_percent,</if>
      <if test="uids != null">pc_uids,</if>
      <if test="versions != null">pc_versions,</if>
      <if test="remark != null">pc_remark,</if>
      <if test="startTime != null">pc_start_time,</if>
      <if test="endTime != null">pc_end_time,</if>
@@ -46,6 +48,7 @@
      <if test="amount != null">#{amount,jdbcType=INTEGER},</if>
      <if test="percent != null">#{percent,jdbcType=DECIMAL},</if>
      <if test="uids != null">#{uids,jdbcType=VARCHAR},</if>
      <if test="versions != null">#{versions,jdbcType=VARCHAR},</if>
      <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
      <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if>
      <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
@@ -55,7 +58,7 @@
      <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushCoupon">update yeshi_ec_push_coupon set pc_title = #{title,jdbcType=VARCHAR},pc_content = #{content,jdbcType=VARCHAR},pc_amount = #{amount,jdbcType=INTEGER},pc_percent = #{percent,jdbcType=DECIMAL},pc_uids = #{uids,jdbcType=VARCHAR},pc_remark = #{remark,jdbcType=VARCHAR},pc_start_time = #{startTime,jdbcType=TIMESTAMP},pc_end_time = #{endTime,jdbcType=TIMESTAMP},pc_pushed = #{pushed,jdbcType=VARCHAR},pc_push_time = #{pushTime,jdbcType=TIMESTAMP},pc_create_time = #{createTime,jdbcType=TIMESTAMP},pc_update_time = #{updateTime,jdbcType=TIMESTAMP} where pc_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushCoupon">update yeshi_ec_push_coupon set pc_title = #{title,jdbcType=VARCHAR},pc_content = #{content,jdbcType=VARCHAR},pc_amount = #{amount,jdbcType=INTEGER},pc_percent = #{percent,jdbcType=DECIMAL},pc_uids = #{uids,jdbcType=VARCHAR},pc_versions = #{versions,jdbcType=VARCHAR},pc_remark = #{remark,jdbcType=VARCHAR},pc_start_time = #{startTime,jdbcType=TIMESTAMP},pc_end_time = #{endTime,jdbcType=TIMESTAMP},pc_pushed = #{pushed,jdbcType=VARCHAR},pc_push_time = #{pushTime,jdbcType=TIMESTAMP},pc_create_time = #{createTime,jdbcType=TIMESTAMP},pc_update_time = #{updateTime,jdbcType=TIMESTAMP} where pc_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushCoupon">update yeshi_ec_push_coupon
    <set>
      <if test="title != null">pc_title=#{title,jdbcType=VARCHAR},</if>
@@ -63,6 +66,7 @@
      <if test="amount != null">pc_amount=#{amount,jdbcType=INTEGER},</if>
      <if test="percent != null">pc_percent=#{percent,jdbcType=DECIMAL},</if>
      <if test="uids != null">pc_uids=#{uids,jdbcType=VARCHAR},</if>
      <if test="versions != null">pc_versions=#{versions,jdbcType=VARCHAR},</if>
      <if test="remark != null">pc_remark=#{remark,jdbcType=VARCHAR},</if>
      <if test="startTime != null">pc_start_time=#{startTime,jdbcType=TIMESTAMP},</if>
      <if test="endTime != null">pc_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
@@ -72,7 +76,6 @@
      <if test="updateTime != null">pc_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
    </set> where pc_id = #{id,jdbcType=BIGINT}
  </update>
  <select id="listQuery" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />  FROM yeshi_ec_push_coupon
        WHERE 1=1
@@ -102,5 +105,5 @@
        WHERE pc_pushed = 1    
            AND DATE_FORMAT(CURDATE(),'%Y%m%d') <![CDATA[ <= ]]>DATE_FORMAT(pc_end_time,'%Y%m%d');
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml
@@ -9,18 +9,18 @@
    <result column="pg_title" property="title" jdbcType="VARCHAR"/>
    <result column="pg_content" property="content" jdbcType="VARCHAR"/>
    <result column="pg_picture" property="picture" jdbcType="VARCHAR"/>
    <result column="pg_uid" property="uid" jdbcType="BIGINT"/>
    <result column="pg_versions" property="versions" jdbcType="VARCHAR"/>
    <result column="pg_is_push" property="isPush" jdbcType="VARCHAR"/>
    <result column="pg_push_time" property="pushTime" jdbcType="TIMESTAMP"/>
    <result column="pg_createtime" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="pg_updatetime" property="updateTime" jdbcType="TIMESTAMP"/>
  </resultMap>
  <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_is_push,pg_push_time,pg_createtime,pg_updatetime</sql>
  <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_versions,pg_is_push,pg_push_time,pg_createtime,pg_updatetime</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_push_goods where pg_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_push_goods where pg_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods (pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_is_push,pg_push_time,pg_createtime,pg_updatetime) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{isPush,jdbcType=VARCHAR},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods (pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_versions,pg_is_push,pg_push_time,pg_createtime,pg_updatetime) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{versions,jdbcType=VARCHAR},#{isPush,jdbcType=VARCHAR},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">pg_id,</if>
@@ -29,7 +29,7 @@
      <if test="title != null">pg_title,</if>
      <if test="content != null">pg_content,</if>
      <if test="picture != null">pg_picture,</if>
      <if test="uid != null">pg_uid,</if>
      <if test="versions != null">pg_versions,</if>
      <if test="isPush != null">pg_is_push,</if>
      <if test="pushTime != null">pg_push_time,</if>
      <if test="createTime != null">pg_createtime,</if>
@@ -42,14 +42,14 @@
      <if test="title != null">#{title,jdbcType=VARCHAR},</if>
      <if test="content != null">#{content,jdbcType=VARCHAR},</if>
      <if test="picture != null">#{picture,jdbcType=VARCHAR},</if>
      <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
      <if test="versions != null">#{versions,jdbcType=VARCHAR},</if>
      <if test="isPush != null">#{isPush,jdbcType=VARCHAR},</if>
      <if test="pushTime != null">#{pushTime,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.push.PushGoods">update yeshi_ec_push_goods set pg_alert_title = #{alertTitle,jdbcType=VARCHAR},pg_alert_content = #{alertContent,jdbcType=VARCHAR},pg_title = #{title,jdbcType=VARCHAR},pg_content = #{content,jdbcType=VARCHAR},pg_picture = #{picture,jdbcType=VARCHAR},pg_uid = #{uid,jdbcType=BIGINT},pg_is_push = #{isPush,jdbcType=VARCHAR},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP} where pg_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods set pg_alert_title = #{alertTitle,jdbcType=VARCHAR},pg_alert_content = #{alertContent,jdbcType=VARCHAR},pg_title = #{title,jdbcType=VARCHAR},pg_content = #{content,jdbcType=VARCHAR},pg_picture = #{picture,jdbcType=VARCHAR},pg_versions = #{versions,jdbcType=VARCHAR},pg_is_push = #{isPush,jdbcType=VARCHAR},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP} where pg_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods
    <set>
      <if test="alertTitle != null">pg_alert_title=#{alertTitle,jdbcType=VARCHAR},</if>
@@ -57,16 +57,14 @@
      <if test="title != null">pg_title=#{title,jdbcType=VARCHAR},</if>
      <if test="content != null">pg_content=#{content,jdbcType=VARCHAR},</if>
      <if test="picture != null">pg_picture=#{picture,jdbcType=VARCHAR},</if>
      <if test="uid != null">pg_uid=#{uid,jdbcType=BIGINT},</if>
      <if test="versions != null">pg_versions=#{versions,jdbcType=VARCHAR},</if>
      <if test="isPush != null">pg_is_push=#{isPush,jdbcType=VARCHAR},</if>
      <if test="pushTime != null">pg_push_time=#{pushTime,jdbcType=TIMESTAMP},</if>
      <if test="createTime != null">pg_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">pg_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
    </set> where pg_id = #{id,jdbcType=BIGINT}
  </update>
   <delete id="deleteBatchByPrimaryKey"  parameterType="java.util.List">
<delete id="deleteBatchByPrimaryKey"  parameterType="java.util.List">
        delete from yeshi_ec_push_goods where pg_id in
        <foreach item="item" collection="list" open="(" separator=","
            close=")">#{item}</foreach>
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushRecordMapper.xml
@@ -2,93 +2,66 @@
<!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.push.PushRecordMapper">
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.xinge.PushRecord">
        <id column="id" property="id" jdbcType="BIGINT" />
        <result column="url" property="url" jdbcType="VARCHAR" />
        <result column="type" property="type" jdbcType="INTEGER" />
        <result column="title" property="title" jdbcType="VARCHAR" />
        <result column="state" property="state" jdbcType="INTEGER" />
        <result column="createtime" property="createtime" jdbcType="BIGINT" />
        <result column="count" property="count" jdbcType="BIGINT" />
        <result column="iosPushId" property="iosPushId" jdbcType="VARCHAR" />
        <result column="androidPushId" property="androidPushId"
            jdbcType="VARCHAR" />
        <result column="account" property="account" jdbcType="INTEGER" />
        <result column="appName" property="appName" jdbcType="VARCHAR" />
        <result column="uid" property="uid" jdbcType="BIGINT" />
    </resultMap>
    <sql id="Base_Column_List">id,url,type,title,state,createtime,count,iosPushId,androidPushId,account,appName,uid</sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_push_record where id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_push_record where id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.xinge.PushRecord"
        useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_record
        (id,url,type,title,state,createtime,count,iosPushId,androidPushId,account,appName,uid)
        values
        (#{id,jdbcType=BIGINT},#{url,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{title,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createtime,jdbcType=BIGINT},#{count,jdbcType=BIGINT},#{iosPushId,jdbcType=VARCHAR},#{androidPushId,jdbcType=VARCHAR},#{account,jdbcType=INTEGER},#{appName,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT})</insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.xinge.PushRecord"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_push_record
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="url != null">url,</if>
            <if test="type != null">type,</if>
            <if test="title != null">title,</if>
            <if test="state != null">state,</if>
            <if test="createtime != null">createtime,</if>
            <if test="count != null">count,</if>
            <if test="iosPushId != null">iosPushId,</if>
            <if test="androidPushId != null">androidPushId,</if>
            <if test="account != null">account,</if>
            <if test="appName != null">appName,</if>
            <if test="uid != null">uid,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="url != null">#{url,jdbcType=VARCHAR},</if>
            <if test="type != null">#{type,jdbcType=INTEGER},</if>
            <if test="title != null">#{title,jdbcType=VARCHAR},</if>
            <if test="state != null">#{state,jdbcType=INTEGER},</if>
            <if test="createtime != null">#{createtime,jdbcType=BIGINT},</if>
            <if test="count != null">#{count,jdbcType=BIGINT},</if>
            <if test="iosPushId != null">#{iosPushId,jdbcType=VARCHAR},</if>
            <if test="androidPushId != null">#{androidPushId,jdbcType=VARCHAR},</if>
            <if test="account != null">#{account,jdbcType=INTEGER},</if>
            <if test="appName != null">#{appName,jdbcType=VARCHAR},</if>
            <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.xinge.PushRecord">update
        yeshi_ec_push_record set url = #{url,jdbcType=VARCHAR},type =
        #{type,jdbcType=INTEGER},title = #{title,jdbcType=VARCHAR},state =
        #{state,jdbcType=INTEGER},createtime =
        #{createtime,jdbcType=BIGINT},count =
        #{count,jdbcType=BIGINT},iosPushId =
        #{iosPushId,jdbcType=VARCHAR},androidPushId =
        #{androidPushId,jdbcType=VARCHAR},account =
        #{account,jdbcType=INTEGER},appName = #{appName,jdbcType=VARCHAR},uid
        = #{uid,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.xinge.PushRecord">
        update yeshi_ec_push_record
        <set>
            <if test="url != null">url=#{url,jdbcType=VARCHAR},</if>
            <if test="type != null">type=#{type,jdbcType=INTEGER},</if>
            <if test="title != null">title=#{title,jdbcType=VARCHAR},</if>
            <if test="state != null">state=#{state,jdbcType=INTEGER},</if>
            <if test="createtime != null">createtime=#{createtime,jdbcType=BIGINT},</if>
            <if test="count != null">count=#{count,jdbcType=BIGINT},</if>
            <if test="iosPushId != null">iosPushId=#{iosPushId,jdbcType=VARCHAR},</if>
            <if test="androidPushId != null">androidPushId=#{androidPushId,jdbcType=VARCHAR},</if>
            <if test="account != null">account=#{account,jdbcType=INTEGER},</if>
            <if test="appName != null">appName=#{appName,jdbcType=VARCHAR},</if>
            <if test="uid != null">uid=#{uid,jdbcType=BIGINT},</if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.push.PushQueueRecord">
    <id column="qe_id" property="id" jdbcType="BIGINT"/>
    <result column="qe_type" property="type" jdbcType="INTEGER"/>
    <result column="qe_content" property="jsonContent" jdbcType="VARCHAR"/>
    <result column="qe_start_cursor" property="startCursor" jdbcType="BIGINT"/>
    <result column="qe_end_cursor" property="endCursor" jdbcType="BIGINT"/>
    <result column="qe_record_cursor" property="recordCursor" jdbcType="BIGINT"/>
    <result column="qe_push_num" property="pushNum" jdbcType="INTEGER"/>
    <result column="qe_versions" property="versions" jdbcType="VARCHAR"/>
    <result column="qe_state" property="state" jdbcType="INTEGER"/>
    <result column="qe_createtime" property="createtime" jdbcType="TIMESTAMP"/>
    <result column="qe_endtime" property="endtime" jdbcType="TIMESTAMP"/>
  </resultMap>
  <sql id="Base_Column_List">qe_id,qe_type,qe_content,qe_start_cursor,qe_end_cursor,qe_record_cursor,qe_push_num,qe_versions,qe_state,qe_createtime,qe_endtime</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_push_queue where qe_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_push_queue where qe_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushQueueRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_queue (qe_id,qe_type,qe_content,qe_start_cursor,qe_end_cursor,qe_record_cursor,qe_push_num,qe_versions,qe_state,qe_createtime,qe_endtime) values (#{id,jdbcType=BIGINT},#{type,jdbcType=INTEGER},#{jsonContent,jdbcType=VARCHAR},#{startCursor,jdbcType=BIGINT},#{endCursor,jdbcType=BIGINT},#{recordCursor,jdbcType=BIGINT},#{pushNum,jdbcType=INTEGER},#{versions,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{endtime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushQueueRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_queue
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">qe_id,</if>
      <if test="type != null">qe_type,</if>
      <if test="jsonContent != null">qe_content,</if>
      <if test="startCursor != null">qe_start_cursor,</if>
      <if test="endCursor != null">qe_end_cursor,</if>
      <if test="recordCursor != null">qe_record_cursor,</if>
      <if test="pushNum != null">qe_push_num,</if>
      <if test="versions != null">qe_versions,</if>
      <if test="state != null">qe_state,</if>
      <if test="createtime != null">qe_createtime,</if>
      <if test="endtime != null">qe_endtime,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="type != null">#{type,jdbcType=INTEGER},</if>
      <if test="jsonContent != null">#{jsonContent,jdbcType=VARCHAR},</if>
      <if test="startCursor != null">#{startCursor,jdbcType=BIGINT},</if>
      <if test="endCursor != null">#{endCursor,jdbcType=BIGINT},</if>
      <if test="recordCursor != null">#{recordCursor,jdbcType=BIGINT},</if>
      <if test="pushNum != null">#{pushNum,jdbcType=INTEGER},</if>
      <if test="versions != null">#{versions,jdbcType=VARCHAR},</if>
      <if test="state != null">#{state,jdbcType=INTEGER},</if>
      <if test="createtime != null">#{createtime,jdbcType=TIMESTAMP},</if>
      <if test="endtime != null">#{endtime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushQueueRecord">update yeshi_ec_push_queue set qe_type = #{type,jdbcType=INTEGER},qe_content = #{jsonContent,jdbcType=VARCHAR},qe_start_cursor = #{startCursor,jdbcType=BIGINT},qe_end_cursor = #{endCursor,jdbcType=BIGINT},qe_record_cursor = #{recordCursor,jdbcType=BIGINT},qe_push_num = #{pushNum,jdbcType=INTEGER},qe_versions = #{versions,jdbcType=VARCHAR},qe_state = #{state,jdbcType=INTEGER},qe_createtime = #{createtime,jdbcType=TIMESTAMP},qe_endtime = #{endtime,jdbcType=TIMESTAMP} where qe_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushQueueRecord">update yeshi_ec_push_queue
    <set>
      <if test="type != null">qe_type=#{type,jdbcType=INTEGER},</if>
      <if test="jsonContent != null">qe_content=#{jsonContent,jdbcType=VARCHAR},</if>
      <if test="startCursor != null">qe_start_cursor=#{startCursor,jdbcType=BIGINT},</if>
      <if test="endCursor != null">qe_end_cursor=#{endCursor,jdbcType=BIGINT},</if>
      <if test="recordCursor != null">qe_record_cursor=#{recordCursor,jdbcType=BIGINT},</if>
      <if test="pushNum != null">qe_push_num=#{pushNum,jdbcType=INTEGER},</if>
      <if test="versions != null">qe_versions=#{versions,jdbcType=VARCHAR},</if>
      <if test="state != null">qe_state=#{state,jdbcType=INTEGER},</if>
      <if test="createtime != null">qe_createtime=#{createtime,jdbcType=TIMESTAMP},</if>
      <if test="endtime != null">qe_endtime=#{endtime,jdbcType=TIMESTAMP},</if>
    </set> where qe_id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/user/ForbiddenUserIdentifyCodeMapper.xml
@@ -17,6 +17,21 @@
        <result column="fuc_update_time" property="updateTime"
            jdbcType="TIMESTAMP" />
    </resultMap>
    <resultMap id="BaseResultMapVO" type="com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO">
        <result column="f_wxUnionId" property="f_wxUnionId"    jdbcType="VARCHAR" />
        <result column="f_taobaoUid" property="f_taobaoUid"    jdbcType="VARCHAR" />
        <result column="f_phone" property="f_phone"    jdbcType="VARCHAR" />
        <result column="f_alipayAccount" property="f_alipayAccount"    jdbcType="VARCHAR" />
        <result column="alipayAccount" property="alipayAccount"    jdbcType="VARCHAR" />
        <result column="alipayAccountName" property="alipayAccountName"    jdbcType="VARCHAR" />
        <association property="userInfo" column="id"
            resultMap="com.yeshi.fanli.dao.mybatis.UserInfoMapper.BaseResultMap"/>
    </resultMap>
    <sql id="Base_Column_List">fuc_id,fuc_type,fuc_identify_code,fuc_effective,fuc_create_time,fuc_update_time,fuc_beizhu
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
@@ -95,4 +110,70 @@
        </set>
        where fuc_id = #{id,jdbcType=BIGINT}
    </update>
    <select id="listQuery" resultMap="BaseResultMapVO">
        SELECT * FROM (SELECT A.uid,A.alipayAccount,A.alipayAccountName,MAX(A.f_wxUnionId) AS f_wxUnionId ,MAX(A.f_taobaoUid) AS f_taobaoUid,MAX(A.f_phone) AS f_phone,MAX(A.f_alipayAccount) AS f_alipayAccount FROM
        (SELECT u.`id`AS uid,b.account AS alipayAccount,b.name AS alipayAccountName,fu.* FROM yeshi_ec_user u
        LEFT JOIN yeshi_ec_binding_account b ON b.`uid` = u.`id`
        LEFT JOIN (SELECT fc.fuc_effective,IF(fc.`fuc_type` = 'wxUnionId',fc.`fuc_identify_code`,NULL)AS f_wxUnionId,
            IF(fc.`fuc_type` = 'taobaoUid',fc.`fuc_identify_code`,NULL)AS f_taobaoUid,
            IF(fc.`fuc_type` = 'phone',fc.`fuc_identify_code`,NULL)AS f_phone,
            IF(fc.`fuc_type` = 'alipayAccount',fc.`fuc_identify_code`,NULL)AS f_alipayAccount
        FROM yeshi_ec_forbidden_user_identify_code fc)fu ON (fu.f_wxUnionId = u.`wx_union_id` OR fu.f_taobaoUid = u.`identifycode` OR fu.f_phone = u.`phone` OR fu.f_alipayAccount = b.`account`)
        WHERE b.`type`= 1 AND fu.fuc_effective = 1
            <if test="key != null and key != '' ">
                AND fu.fuc_identify_code = '%#{key}%'
            </if>
            <if test="type == 1">
                AND fu.fuc_type = 'wxUnionId'
            </if>
            <if test="type == 2">
                AND fu.fuc_type = 'taobaoUid'
            </if>
            <if test="type == 3">
                AND fu.fuc_type = 'phone'
            </if>
            <if test="type == 4">
                AND fu.fuc_type = 'alipayAccount'
            </if>
        )A
        GROUP BY A.uid) B
        LEFT JOIN yeshi_ec_user u ON u.id= B.uid
        LIMIT ${start},${count}
    </select>
    <select id="countQuery" resultType="java.lang.Long">
        SELECT IFNULL(COUNT(DISTINCT A.uid),0) FROM
        (SELECT u.`id`AS uid,fu.* FROM yeshi_ec_user u
        LEFT JOIN yeshi_ec_binding_account b ON b.`uid` = u.`id`
        LEFT JOIN (SELECT fc.fuc_effective,IF(fc.`fuc_type` = 'wxUnionId',fc.`fuc_identify_code`,NULL)AS f_wxUnionId,
            IF(fc.`fuc_type` = 'taobaoUid',fc.`fuc_identify_code`,NULL)AS f_taobaoUid,
            IF(fc.`fuc_type` = 'phone',fc.`fuc_identify_code`,NULL)AS f_phone,
            IF(fc.`fuc_type` = 'alipayAccount',fc.`fuc_identify_code`,NULL)AS f_alipayAccount
        FROM yeshi_ec_forbidden_user_identify_code fc)fu ON (fu.f_wxUnionId = u.`wx_union_id` OR fu.f_taobaoUid = u.`identifycode` OR fu.f_phone = u.`phone` OR fu.f_alipayAccount = b.`account`)
        WHERE b.`type`= 1 AND fu.fuc_effective = 1
            <if test="key != null and key != '' ">
                AND fu.fuc_identify_code = '%#{key}%'
            </if>
            <if test="type == 1">
                AND fu.fuc_type = 'wxUnionId'
            </if>
            <if test="type == 2">
                AND fu.fuc_type = 'taobaoUid'
            </if>
            <if test="type == 3">
                AND fu.fuc_type = 'phone'
            </if>
            <if test="type == 4">
                AND fu.fuc_type = 'alipayAccount'
            </if>
        )A
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/service/impl/config/AppVersionServiceImpl.java
@@ -1,5 +1,6 @@
package com.yeshi.fanli.service.impl.config;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -63,4 +64,39 @@
        return null;
    }
    @Override
    public List<Integer> listVersionCodeByVersions(String platform, List<String> listVersion){
        List<Integer> listVersionCode = null;
        if (listVersion == null || listVersion.size() == 0) {
            return listVersionCode;
        }
        listVersionCode = new ArrayList<Integer>();
        for (String version: listVersion) {
            AppVersionInfo appVersion= getByPlatformAndVersion(platform, version);
            if (appVersion != null && appVersion.getVersionCode() != null) {
                listVersionCode.add(appVersion.getVersionCode());
            }
        }
        return listVersionCode;
    }
    @Override
    public List<AppVersionInfo> listByVersions(String platform, List<String> listVersion){
        List<AppVersionInfo> listVersionCode = null;
        if (listVersion == null || listVersion.size() == 0) {
            return listVersionCode;
        }
        listVersionCode = new ArrayList<AppVersionInfo>();
        for (String version: listVersion) {
            AppVersionInfo appVersion= getByPlatformAndVersion(platform, version);
            if (appVersion != null) {
                listVersionCode.add(appVersion);
            }
        }
        return listVersionCode;
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SwiperPictureServiceImpl.java
@@ -11,20 +11,24 @@
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.homemodule.SwiperPictureMapper;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.exception.NotExistObjectException;
import com.yeshi.fanli.exception.banner.SwiperPictureException;
import com.yeshi.fanli.service.inter.config.SystemConfigService;
import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
import com.yeshi.fanli.util.StringUtil;
import org.yeshi.utils.tencentcloud.COSManager;
@Service
public class SwiperPictureServiceImpl implements SwiperPictureService {
    @Resource
    private SwiperPictureMapper swiperPictureMapper;
    @Resource
    private SystemConfigService systemConfigService;
    
    @Override
    public int deleteByPrimaryKey(Long id) throws SwiperPictureException{
@@ -66,6 +70,66 @@
        return swiperPictureMapper.countQueryByBannerID(bannerId);
    }
    @Override
    public void save(SwiperPicture record) throws SwiperPictureException{
        if (record == null) {
            throw new SwiperPictureException(1, "参数不能为空");
        }
        Long bannerId = record.getBannerId();
        if (bannerId == null) {
            throw new SwiperPictureException(1, "标识管理ID不能为空");
        }
        String params = record.getParams();
        if (!StringUtil.isNullOrEmpty(params)) {
            try {
                String jumpValue = systemConfigService.get("jump");
                if (StringUtil.isNullOrEmpty(jumpValue)) {
                    jumpValue = "{\"url\":\"#\"}";
                }
                params = jumpValue.replace("#", params);
            } catch (NotExistObjectException e) {
                e.printStackTrace();
            }
        }
        Long id = record.getId();
        if (id == null) {
            // 新增
            int maxOrder = swiperPictureMapper.getMaxOrderByBannerID(bannerId);
            record.setOrder(maxOrder + 1);
            // 默认停用
            record.setState(1);
            // 默认非系统控制
            record.setAutoControl(1);
            // 默认非登陆
            record.setJumpNeedLogin(false);
            record.setCreatetime(new Date());
            record.setUpdatetime(new Date());
            swiperPictureMapper.insert(record);
        } else {
            // 修改
            SwiperPicture resultObj = swiperPictureMapper.selectByPrimaryKey(id);
            if (resultObj == null) {
                throw new SwiperPictureException(1, "参数不能为空");
            }
            record.setOrder(resultObj.getOrder());
            record.setCreatetime(resultObj.getCreatetime());
            record.setUpdatetime(new Date());
            swiperPictureMapper.updateByPrimaryKey(record);
        }
    }
    @Override
    @Transactional
    public int deleteBatchByPrimaryKey(List<Long> list) throws SwiperPictureException{
fanli/src/main/java/com/yeshi/fanli/service/impl/push/HWPushServiceImpl.java
@@ -30,7 +30,7 @@
    private DeviceTokenHWService deviceTokenHWService;
    @Override
    public void pushGoods(Long uid, Long auctionId, String title, String content) throws PushException {
    public void pushGoods(Long uid, Long auctionId, String title, String content, List<String> listVersion) throws PushException {
        String gid = auctionId + "";
        JSONObject json = new JSONObject();
        json.put("url", "");
@@ -83,7 +83,7 @@
    }
    @Override
    public void pushUrl(Long uid, String url, String title, String content) throws PushException {
    public void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
        JSONObject json = new JSONObject();
        json.put("url", url);
        json.put("type", "url");
@@ -152,7 +152,7 @@
    }
    @Override
    public void pushZNX(Long uid, AccountMessage msg, SystemZnx systemZNX) throws PushException {
    public void pushZNX(Long uid, AccountMessage msg, SystemZnx systemZNX, List<String> listVersion) throws PushException {
        JSONObject contentJson = new JSONObject();
        contentJson.put("isOpen", 0);
@@ -204,19 +204,19 @@
    }
    @Override
    public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException {
    public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException {
        // TODO 推送weex页面
    }
    @Override
    public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException {
    public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException {
        // TODO 推送淘客百川链接
    }
    @Override
    public void pushWelfareCenter(Long uid, String title, String content) throws PushException {
    public void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException {
        // TODO Auto-generated method stub
        
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/push/IOSPushServiceImpl.java
@@ -13,6 +13,7 @@
import com.yeshi.fanli.controller.admin.PushController;
import com.yeshi.fanli.dao.mybatis.push.DeviceTokenIOSMapper;
import com.yeshi.fanli.dao.mybatis.push.PushQueueRecordMapper;
import com.yeshi.fanli.entity.AppVersionInfo;
import com.yeshi.fanli.entity.bus.user.AccountMessage;
import com.yeshi.fanli.entity.push.DeviceTokenIOS;
import com.yeshi.fanli.entity.push.PushQueueRecord;
@@ -21,6 +22,7 @@
import com.yeshi.fanli.entity.xinge.PushRecord;
import com.yeshi.fanli.exception.PushException;
import com.yeshi.fanli.log.PushLogHelper;
import com.yeshi.fanli.service.inter.config.AppVersionService;
import com.yeshi.fanli.service.inter.push.IOSPushService;
import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
import com.yeshi.fanli.util.CMQManager;
@@ -41,9 +43,13 @@
    @Resource
    private UserCustomSettingsService userCustomSettingsService;
    @Resource
    private AppVersionService appVersionService;
    @Override
    public void pushGoods(Long uid, Long auctionId, String title, String content) throws PushException {
    public void pushGoods(Long uid, Long auctionId, String title, String content, List<String> listVersion) throws PushException {
        String url = "https://item.taobao.com/item.htm?id=" + auctionId;
        JSONObject json = new JSONObject();
@@ -69,7 +75,7 @@
        if (uid == null || uid == 0) {
            addPushIOSQueue(info, url, PushController.GOODS);
            addPushIOSQueue(info, url, PushController.GOODS, listVersion);
            /*
             * // 查询IOS所有设备号 // TODO 需要全推 List<String> deviceTokenList =
@@ -89,7 +95,7 @@
            }
            // IOS 单推
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
            List<String> deviceTokenList = new ArrayList<>();
            if (deviceTokenIosList != null)
                for (DeviceTokenIOS ios : deviceTokenIosList) {
@@ -106,7 +112,7 @@
    }
    @Override
    public void pushUrl(Long uid, String url, String title, String content) throws PushException {
    public void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
        JSONObject json = new JSONObject();
        json.put("url", url);
        json.put("type", "url");
@@ -128,7 +134,7 @@
        if (uid == null || uid == 0) {
            // TODO 需要全推
            addPushIOSQueue(info, url, PushController.URL);
            addPushIOSQueue(info, url, PushController.URL, listVersion);
            /*
             * List<String> deviceTokenList = getDeviceTokenList(1, 1000);
@@ -146,7 +152,7 @@
                return; // 通知免打扰(20:00-24:00 / 00:00 -08:00)
            }
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
            List<String> deviceTokenList = new ArrayList<>();
            if (deviceTokenIosList != null)
                for (DeviceTokenIOS ios : deviceTokenIosList) {
@@ -161,7 +167,7 @@
    }
    @Override
    public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX) throws PushException {
    public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX, List<String> listVersion) throws PushException {
        MessageInfo info = new MessageInfo();
        info.setPackageName(Constant.systemCommonConfig.getAndroidPackageName());
@@ -191,7 +197,7 @@
            // TODO 需要全推
            addPushIOSQueue(info, id + "", PushController.ZNX);
            addPushIOSQueue(info, id + "", PushController.ZNX, listVersion);
            /*
             * List<String> deviceTokenList = getDeviceTokenList(1, 1000);
@@ -234,7 +240,7 @@
            json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
                    Constant.systemCommonConfig.getAndroidBaseactivityName()));
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(msg.getUserInfo().getId());
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(msg.getUserInfo().getId(), listVersion);
            List<String> deviceTokenList = new ArrayList<>();
            if (deviceTokenIosList != null)
                for (DeviceTokenIOS ios : deviceTokenIosList) {
@@ -282,13 +288,16 @@
    }
    @Override
    public List<DeviceTokenIOS> getDeviceTokenListByUid(Long uid) {
        return deviceTokenIOSMapper.selectByUid(uid);
    public List<DeviceTokenIOS> getDeviceTokenListByUid(Long uid, List<String> listVersion) {
        // 版本号
        List<Integer> listCode = appVersionService.listVersionCodeByVersions(AppVersionInfo.PLATFORM_IOS,listVersion);
        return deviceTokenIOSMapper.selectByUid(uid, listCode);
    }
    @Override
    public List<String> getDeviceTokenList(int page, int size) {
        List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList((long) ((page - 1) * size), size);
        List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList((long) ((page - 1) * size), size, null);
        List<String> tokenList = new ArrayList<>();
        for (DeviceTokenIOS ios : list)
            if (!StringUtil.isNullOrEmpty(ios.getDeviceToken()))
@@ -320,7 +329,7 @@
     * @param json
     */
    @Transactional
    public void addPushIOSQueue(MessageInfo info, String url, int type) {
    public void addPushIOSQueue(MessageInfo info, String url, int type, List<String> listVersion) {
        try {
@@ -335,6 +344,20 @@
            // 每次执行条目
            int pushNum = 50;
            String versionCodes = "";
            List<Integer> listCode = appVersionService.listVersionCodeByVersions(AppVersionInfo.PLATFORM_IOS,listVersion);
            if (listCode != null && listCode.size() > 0) {
                for (Integer code: listCode) {
                    versionCodes = versionCodes + code + ",";
                }
                // 去除末尾逗号
                if (versionCodes.endsWith(",")) {
                    versionCodes = versionCodes.substring(0, versionCodes.length() - 1);
                }
            }
            for (long i = 0; i < tokenCount + totalCount;) {
                PushQueueRecord pushQueueRecord = new PushQueueRecord();
@@ -348,6 +371,9 @@
                pushQueueRecord.setPushNum(pushNum);
                // 推送端 IOS
                pushQueueRecord.setType(1);
                // 版本号
                pushQueueRecord.setVersions(versionCodes);
                if (tokenCount - i < totalCount) {
                    // 起始游标
@@ -398,7 +424,13 @@
        Long startCursor = pushQueueRecord.getStartCursor();
        // 结束位置
        Long endCursor = pushQueueRecord.getEndCursor();
        // 版本号
        String[] versionArray = null;
        String versions = pushQueueRecord.getVersions();
        if (versions != null && versions.trim().length() == 0) {
            versionArray = versions.split(",");
        }
        if (startCursor == null && endCursor == null) {
            return;
        }
@@ -417,11 +449,12 @@
        long recordCursor = startCursor;
        for (int i = 0; i < count; i++) {
            // 不足50个数据
            if (moveNum > total) {
                moveNum = (int) (endCursor - startCursor);
                List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(startCursor, moveNum);
                List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(startCursor, moveNum, versionArray);
                recordCursor = endCursor;
                if (list != null) {
@@ -435,7 +468,7 @@
                    // System.out.println("recordCursorend:" +recordCursor);
                    moveNum = (int) (endCursor - recordCursor);
                    // System.out.println(moveNum);
                    List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(recordCursor, moveNum);
                    List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(recordCursor, moveNum, versionArray);
                    if (list != null) {
                        executePushIOS(list, pushQueueRecord, endCursor);
                        PushLogHelper.iosInfo("推送游标:" + recordCursor + "," + moveNum);
@@ -443,7 +476,7 @@
                    recordCursor = endCursor;
                } else {
                    List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(recordCursor, moveNum);
                    List<DeviceTokenIOS> list = deviceTokenIOSMapper.selectList(recordCursor, moveNum, versionArray);
                    recordCursor = recordCursor + 50;
                    if (list != null) {
@@ -518,16 +551,16 @@
    }
    @Override
    public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException {
    public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException {
        MessageInfo info = new MessageInfo();
        info.setTitle(title);
        info.setContent(content);
        info.setDescription(content);
        // IOS 全推
        if (uid == null || uid == 0) {
            addPushIOSQueue(info, weexUrl, PushController.WEEX);
            addPushIOSQueue(info, weexUrl, PushController.WEEX, listVersion);
        } else {
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
            List<String> deviceTokenList = new ArrayList<>();
            if (deviceTokenIosList != null)
                for (DeviceTokenIOS ios : deviceTokenIosList) {
@@ -542,16 +575,16 @@
    }
    @Override
    public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException {
    public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException {
        MessageInfo info = new MessageInfo();
        info.setTitle(title);
        info.setContent(content);
        info.setDescription(content);
        // IOS 全推
        if (uid == null || uid == 0) {
            addPushIOSQueue(info, url, PushController.BAICHUAN);
            addPushIOSQueue(info, url, PushController.BAICHUAN, listVersion);
        } else {
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
            List<String> deviceTokenList = new ArrayList<>();
            if (deviceTokenIosList != null)
                for (DeviceTokenIOS ios : deviceTokenIosList) {
@@ -590,19 +623,19 @@
    }
    @Override
    public void pushWelfareCenter(Long uid, String title, String content) throws PushException {
    public void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException {
        MessageInfo info = new MessageInfo();
        info.setTitle(title);
        info.setContent(content);
        info.setDescription(content);
        // IOS 全推
        if (uid == null || uid == 0) {
            addPushIOSQueue(info, "", PushController.WELFARE_CENTER);
            addPushIOSQueue(info, "", PushController.WELFARE_CENTER, listVersion);
        } else {
            if (!validateNotDisturbSingle(uid)) {
                return;
            }
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid);
            List<DeviceTokenIOS> deviceTokenIosList = getDeviceTokenListByUid(uid, listVersion);
            List<String> deviceTokenList = new ArrayList<>();
            if (deviceTokenIosList != null)
                for (DeviceTokenIOS ios : deviceTokenIosList) {
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponRecordServiceImpl.java
@@ -28,7 +28,7 @@
    }
    @Override
    public int insertSelective(PushCouponRecord record) {
    public int insertSelective(PushCouponRecord record) throws Exception{
        return pushCouponRecordMapper.insertSelective(record);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponServiceImpl.java
@@ -1,5 +1,6 @@
package com.yeshi.fanli.service.impl.push;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -134,6 +135,11 @@
        if (pushCoupon == null) {
            throw new PushCouponException(1, "推送信息已不存在");
        }
        if(pushCoupon.isPushed()) {
            throw new PushCouponException(1, "该信息不能重复推送");
        }
        String title = pushCoupon.getTitle();
        String content = pushCoupon.getContent();
@@ -141,11 +147,15 @@
            throw new PushCouponException(1, "标题或内容不能为空");
        }
        
        List<String> listVersion = null;
        String versions = pushCoupon.getVersions();
        if (versions != null && versions.trim().length() > 0) {
            listVersion  = Arrays.asList(versions.split(","));
        }
        String uids = pushCoupon.getUids();
        if (uids == null || uids.trim().length() == 0) {
            // 全推
            pushService.pushWelfareCenter(null, title, content);
            pushService.pushWelfareCenter(null, title, content, listVersion);
            
        } else {
            // 指定用户推送
@@ -155,7 +165,7 @@
                for (int i = 0; i < uidArray.length; i++) {
                    String str_uid = uidArray[i];
                    if (str_uid != null && str_uid.trim().length() > 0) {
                        pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content);
                        pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content, listVersion);
                    }
                }
            }
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushGoodsServiceImpl.java
@@ -1,6 +1,7 @@
package com.yeshi.fanli.service.impl.push;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -229,7 +230,13 @@
        if (goodsList == null || goodsList.size() == 0) {
            throw new PushException(1, "推送无商品,请完善数据");
        }
        List<String> listVersion = null;
        String versions = pushGoods.getVersions();
        if (versions != null && versions.trim().length() > 0) {
            listVersion  = Arrays.asList(versions.split(","));
        }
        if (goodsList.size() == 1) {
            /* 单个商品推送: 直接处理为商品信息  */
            PushGoodsGroup pushGoodsGroup = goodsList.get(0);
@@ -240,9 +247,9 @@
            Long goodsId = commonGoods.getGoodsId();
            String url = "https://item.taobao.com/item.htm?id=" + goodsId;
            pushService.pushGoods(pushGoods.getUid(), url, alertTitle, alertContent, listVersion);
            
            pushService.pushGoods(pushGoods.getUid(), url, alertTitle, alertContent);
        } else {
            /*   多个商品推送    */
            String url = configService.get("push_goods_details");
@@ -252,7 +259,7 @@
            // 生成链接
            url = url + "?id=" + id;
            pushService.pushUrl(pushGoods.getUid(), url, alertTitle, alertContent);
            pushService.pushUrl(pushGoods.getUid(), url, alertTitle, alertContent, listVersion);
        }
        
        // 已推送
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java
@@ -1,5 +1,7 @@
package com.yeshi.fanli.service.impl.push;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.scheduling.annotation.Async;
@@ -64,7 +66,7 @@
    @Async("pushExecutor")
    @Override
    public void pushGoods(Long uid, String url, String title, String content) throws PushException {
    public void pushGoods(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
        String gids = url.split("id=")[1];
        String gid = gids.split("&")[0];
        if (StringUtil.isNullOrEmpty(gid))
@@ -72,7 +74,7 @@
        if (StringUtil.isNullOrEmpty(title))
            throw new PushException(1, "请填写推送标题");
        if (StringUtil.isNullOrEmpty(content))
            throw new PushException(1, "请填写推送内容");
            throw new PushException(1, "请填写推送内容");
        PushRecord pushRecord = new PushRecord();
        pushRecord.setState(1);
@@ -83,8 +85,8 @@
        pushRecord.setAccount(1);
        pushRecord.setCreatetime(java.lang.System.currentTimeMillis());
        xmPushService.pushGoods(uid, Long.parseLong(gid), title, content);
        iosPushService.pushGoods(uid, Long.parseLong(gid), title, content);
        xmPushService.pushGoods(uid, Long.parseLong(gid), title, content, listVersion);
        iosPushService.pushGoods(uid, Long.parseLong(gid), title, content, listVersion);
        // hwPushService.pushGoods(uid, Long.parseLong(gid), title, content);
        pushRecordMapper.insertSelective(pushRecord);
@@ -92,7 +94,7 @@
    @Async("pushExecutor")
    @Override
    public void pushUrl(Long uid, String url, String title, String content) throws PushException {
    public void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
        if (StringUtil.isNullOrEmpty(url))
            throw new PushException(1, "无推送链接");
@@ -109,15 +111,15 @@
        pushRecord.setAppName(Constant.systemCommonConfig.getProjectChineseName());
        pushRecord.setCreatetime(java.lang.System.currentTimeMillis());
        xmPushService.pushUrl(uid, url, title, content);
        iosPushService.pushUrl(uid, url, title, content);
        hwPushService.pushUrl(uid, url, title, content);
        xmPushService.pushUrl(uid, url, title, content, listVersion);
        iosPushService.pushUrl(uid, url, title, content, listVersion);
        hwPushService.pushUrl(uid, url, title, content, listVersion);
        pushRecordMapper.insertSelective(pushRecord);
    }
    @Async("pushExecutor")
    @Override
    public void pushZNX(Long uId, String title, String content) throws PushException {
    public void pushZNX(Long uId, String title, String content, List<String> listVersion) throws PushException {
        if (StringUtil.isNullOrEmpty(title))
            throw new PushException(1, "无推送标题");
        if (StringUtil.isNullOrEmpty(content))
@@ -139,9 +141,9 @@
            pushRecord.setAppName(Constant.systemCommonConfig.getProjectChineseName());
            pushRecord.setCreatetime(java.lang.System.currentTimeMillis());
            
            xmPushService.pushZNX(uId, null, systemZnx);
            iosPushService.pushZNX(uId, null, systemZnx);
            hwPushService.pushZNX(uId, null, systemZnx);
            xmPushService.pushZNX(uId, null, systemZnx, listVersion);
            iosPushService.pushZNX(uId, null, systemZnx, listVersion);
            hwPushService.pushZNX(uId, null, systemZnx, listVersion);
            // 插入推送记录
            pushRecordMapper.insertSelective(pushRecord);
        } else {
@@ -153,9 +155,9 @@
            accountMessage.setContent(content);
            accountMessageMapper.insertSelective(accountMessage);
            xmPushService.pushZNX(uId, accountMessage, null);
            iosPushService.pushZNX(uId, accountMessage, null);
            hwPushService.pushZNX(uId, accountMessage, null);
            xmPushService.pushZNX(uId, accountMessage, null, listVersion);
            iosPushService.pushZNX(uId, accountMessage, null, listVersion);
            hwPushService.pushZNX(uId, accountMessage, null, listVersion);
            // 插入推送记录
            PushRecord pushRecord = new PushRecord();
@@ -171,24 +173,24 @@
    }
    @Override
    public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException {
    public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException {
        if (StringUtil.isNullOrEmpty(title))
            throw new PushException(1, "无推送标题");
        if (StringUtil.isNullOrEmpty(content))
            throw new PushException(1, "无推送内容");
        iosPushService.pushWEEX(uid, title, content, weexUrl);
        iosPushService.pushWEEX(uid, title, content, weexUrl, listVersion);
    }
    @Override
    public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException {
        iosPushService.pushBaiChuanUrl(uid, title, content, url);
        xmPushService.pushBaiChuanUrl(uid, title, content, url);
    public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException {
        iosPushService.pushBaiChuanUrl(uid, title, content, url, listVersion);
        xmPushService.pushBaiChuanUrl(uid, title, content, url, listVersion);
    }
    @Override
    public void pushWelfareCenter(Long uid, String title, String content) throws PushException {
        iosPushService.pushWelfareCenter(uid, title, content);
        xmPushService.pushWelfareCenter(uid, title, content);
    public void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException {
        iosPushService.pushWelfareCenter(uid, title, content, listVersion);
        xmPushService.pushWelfareCenter(uid, title, content, listVersion);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/push/XMPushServiceImpl.java
@@ -14,6 +14,7 @@
import com.yeshi.fanli.entity.xinge.PushRecord;
import com.yeshi.fanli.exception.PushException;
import com.yeshi.fanli.log.PushLogHelper;
import com.yeshi.fanli.service.inter.config.AppVersionService;
import com.yeshi.fanli.service.inter.push.XMPushService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.push.PushUtils;
@@ -25,9 +26,22 @@
    @Resource
    private AppVersionInfoMapper appVersionInfoMapper;
    @Resource
    private AppVersionService appVersionService;
    @Override
    public void pushGoods(Long uid, Long auctionId, String title, String content) throws PushException {
    public void pushGoods(Long uid, Long auctionId, String title, String content, List<String> listVersion) throws PushException {
        // 无最低版本限制
        int minVersionCode = 0;
        String appVersion = null;
        if (listVersion != null && listVersion.size() > 0) {
            appVersion = getCanPushVersions(minVersionCode, listVersion);
        } else if (minVersionCode > 0) {
            appVersion = getVersionByMinVersionCode(minVersionCode);
        }
        String gid = auctionId + "";
        JSONObject json = new JSONObject();
        // json.put("url", "http://item.taobao.com/item.htm?id=" + gid);// IOS使用
@@ -35,7 +49,11 @@
        json.put("type", "goodsdetail");
        json.put("miPushUrl", String.format("%s.ui.recommend.GoodsBrowserActivity",
                Constant.systemCommonConfig.getAndroidBaseactivityName()));
        // 版本推送
        if (appVersion != null && appVersion.trim().length() > 0) {
            json.put("app_version", appVersion);
        }
        MessageInfo info = new MessageInfo();
        info.setTitle(title);
        info.setContent(content);
@@ -60,13 +78,27 @@
    }
    @Override
    public void pushUrl(Long uid, String url, String title, String content) throws PushException {
    public void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException {
        // 无最低版本限制
        int minVersionCode = 0;
        String appVersion = null;
        if (listVersion != null && listVersion.size() > 0) {
            appVersion = getCanPushVersions(minVersionCode, listVersion);
        } else if (minVersionCode > 0) {
            appVersion = getVersionByMinVersionCode(minVersionCode);
        }
        JSONObject json = new JSONObject();
        json.put("url", url);
        json.put("type", "url");
        json.put("webUrl", url);
        json.put("miPushUrl", String.format("%s.ui.invite.ShareBrowserActivity",
                Constant.systemCommonConfig.getAndroidBaseactivityName()));
        // 版本推送
        if (appVersion != null && appVersion.trim().length() > 0) {
            json.put("app_version", appVersion);
        }
        MessageInfo info = new MessageInfo();
        info.setTitle(title);
@@ -94,13 +126,21 @@
    }
    @Override
    public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX) throws PushException {
    public void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX, List<String> listVersion) throws PushException {
        // 无最低版本限制
        int minVersionCode = 0;
        String appVersion = null;
        if (listVersion != null && listVersion.size() > 0) {
            appVersion = getCanPushVersions(minVersionCode, listVersion);
        } else if (minVersionCode > 0) {
            appVersion = getVersionByMinVersionCode(minVersionCode);
        }
        MessageInfo info = new MessageInfo();
        info.setPackageName(Constant.systemCommonConfig.getAndroidPackageName());
        JSONObject contentJson = new JSONObject();
        contentJson.put("isOpen", 0);
        contentJson.put("createTime", java.lang.System.currentTimeMillis());
@@ -120,7 +160,11 @@
            json.put("content", contentJson);
            json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
                    Constant.systemCommonConfig.getAndroidBaseactivityName()));
            // 版本推送
            if (appVersion != null && appVersion.trim().length() > 0) {
                json.put("app_version", appVersion);
            }
            PushRecord pushRecord = new PushRecord();
            // 小米 全推
@@ -149,6 +193,12 @@
            json.put("content", contentJson);
            json.put("miPushUrl", String.format("%s.ui.mine.AppMailDetailActivity",
                    Constant.systemCommonConfig.getAndroidBaseactivityName()));
            // 版本推送
            if (appVersion != null && appVersion.trim().length() > 0) {
                json.put("app_version", appVersion);
            }
            // 小米 单推
            try {
                PushUtils.singlePushXiaoMi(info, json, pushRecord);
@@ -159,13 +209,25 @@
    }
    @Override
    public void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException {
        // TODO 推送weex页面
    public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException {
        // 设置可推送版本,1.4.8以后的版本可推送
        int minVersionCode = 31;
        String appVersion = null;
        if (listVersion != null && listVersion.size() > 0) {
            appVersion = getCanPushVersions(minVersionCode, listVersion);
        } else if (minVersionCode > 0) {
            appVersion = getVersionByMinVersionCode(minVersionCode);
        }
        JSONObject json = new JSONObject();
        json.put("url", weexUrl);
        json.put("type", "weex");
        // 设置可推送版本,1.4.8以后的版本可推送
        json.put("app_version", getVersionByMinVersionCode(31));
        // 版本推送
        if (appVersion != null && appVersion.trim().length() > 0) {
            json.put("app_version", appVersion);
        }
        MessageInfo info = new MessageInfo();
        info.setTitle(title);
        info.setContent(content);
@@ -204,14 +266,52 @@
        return versions;
    }
    /**
     * 查询能推送版本号
     * @param versionCode
     * @param listVersion
     * @return
     */
    private String getCanPushVersions(int versionCode, List<String> listVersion) {
        List<AppVersionInfo> list = appVersionService.listByVersions(AppVersionInfo.PLATFORM_ANDROID, listVersion);
        String versions = "";
        if (list != null) {
            for (AppVersionInfo appVersion : list) {
                Integer code =    appVersion.getVersionCode();
                if (code != null && code >= versionCode) {
                    versions += appVersion.getVersion() + ",";
                }
            }
        }
        if (versions.endsWith(",")) {
            versions = versions.substring(0, versions.length() - 1);
        }
        return versions;
    }
    @Override
    public void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException {
    public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException {
        // 设置可推送版本,1.4.8以后的版本可推送
        int minVersionCode = 31;
        String appVersion = null;
        if (listVersion != null && listVersion.size() > 0) {
            appVersion = getCanPushVersions(minVersionCode, listVersion);
        } else if (minVersionCode > 0){
            appVersion = getVersionByMinVersionCode(minVersionCode);
        }
        JSONObject json = new JSONObject();
        json.put("url", url);
        json.put("type", "baichuan");
        // 设置可推送版本,1.4.8以后的版本可推送
        json.put("app_version", getVersionByMinVersionCode(31));
        // 版本推送
        if (appVersion != null && appVersion.trim().length() > 0) {
            json.put("app_version", appVersion);
        }
        MessageInfo info = new MessageInfo();
        info.setTitle(title);
@@ -237,14 +337,25 @@
    }
    @Override
    public void pushWelfareCenter(Long uid, String title, String content) throws PushException {
    public void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException {
        // 1.5.1之后的版本可推送
        int minVersionCode = 36;
        String appVersion = null;
        if (listVersion != null && listVersion.size() > 0) {
            appVersion = getCanPushVersions(minVersionCode, listVersion);
        } else if (minVersionCode > 0){
            appVersion = getVersionByMinVersionCode(minVersionCode);
        }
        JSONObject json = new JSONObject();
        json.put("type", "welfare");
        json.put("miPushUrl", String.format("%s.ui.mine.WelfareCenterActivity",
                Constant.systemCommonConfig.getAndroidBaseactivityName()));
        // 1.5.1之后的版本可推送
        json.put("app_version", getVersionByMinVersionCode(36));
        // 版本推送
        if (appVersion != null && appVersion.trim().length() > 0) {
            json.put("app_version", appVersion);
        }
        MessageInfo info = new MessageInfo();
        info.setTitle(title);
fanli/src/main/java/com/yeshi/fanli/service/impl/user/.gitignore
@@ -1 +1,2 @@
/UserShareGoodsGroupServiceImpl.java
/UserSystemCouponServiceImpl.java
fanli/src/main/java/com/yeshi/fanli/service/impl/user/ForbiddenUserIdentifyCodeServiceImpl.java
@@ -13,6 +13,7 @@
import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO;
@Service
public class ForbiddenUserIdentifyCodeServiceImpl implements ForbiddenUserIdentifyCodeService {
@@ -62,4 +63,94 @@
        forbiddenUserIdentifyCodeMapper.deleteByPrimaryKey(identifyCode.getId());
    }
    @Override
    public List<ForbiddenUserIdentifyCodeVO> listQuery(long start, int count, String key, Integer type) {
        List<ForbiddenUserIdentifyCodeVO> list = forbiddenUserIdentifyCodeMapper.listQuery(start, count, key, type);
        if (list == null || list.size() == 0) {
            return list;
        }
        for (ForbiddenUserIdentifyCodeVO forbiddenUserIdentifyCodeVO: list) {
            String f_alipayAccount = forbiddenUserIdentifyCodeVO.getF_alipayAccount();
            if (f_alipayAccount != null && f_alipayAccount.trim().length() > 0) {
                forbiddenUserIdentifyCodeVO.setAlipayAccountState(1);
            }
            String f_phone = forbiddenUserIdentifyCodeVO.getF_phone();
            if (f_phone != null && f_phone.trim().length() > 0) {
                forbiddenUserIdentifyCodeVO.setPhoneState(1);
            }
            String f_taobaoUid = forbiddenUserIdentifyCodeVO.getF_taobaoUid();
            if (f_taobaoUid != null && f_taobaoUid.trim().length() > 0) {
                forbiddenUserIdentifyCodeVO.setTaobaoUidState(1);
            }
            String f_wxUnionId = forbiddenUserIdentifyCodeVO.getF_wxUnionId();
            if (f_wxUnionId != null && f_wxUnionId.trim().length() > 0) {
                forbiddenUserIdentifyCodeVO.setWxUnionIdState(1);
            }
        }
        return list;
    }
    @Override
    public long countQuery(String key,  Integer type) {
        return forbiddenUserIdentifyCodeMapper.countQuery(key, type);
    }
    @Override
    public void saveForbiddenInfo(String identifyCode, Integer type, boolean state) throws ForbiddenUserIdentifyCodeException{
        ForbiddenUserIdentifyCodeTypeEnum typeEnum = null;
        switch(type) {
            case 1: // 微信账号
                typeEnum = ForbiddenUserIdentifyCodeTypeEnum.wxUnionId;
                break;
            case 2: // 淘宝账号
                typeEnum = ForbiddenUserIdentifyCodeTypeEnum.taobaoUid;
                break;
            case 3: // 电话号码
                typeEnum = ForbiddenUserIdentifyCodeTypeEnum.phone;
                break;
            case 4: // 支付宝账号
                typeEnum = ForbiddenUserIdentifyCodeTypeEnum.alipayAccount;
                break;
            default:
                break;
        }
        if (typeEnum == null) {
            throw new ForbiddenUserIdentifyCodeException(1, "类型不匹配");
        }
        ForbiddenUserIdentifyCode codeObject = listByTypeAndIdentifyCode(typeEnum ,identifyCode);
        if (codeObject == null) {
            // 封禁账户
            if (state) {
                codeObject = new ForbiddenUserIdentifyCode();
                codeObject.setType(typeEnum);
                codeObject.setIdentifyCode(identifyCode);
                codeObject.setEffective(state);
                codeObject.setCreateTime(new Date());
                codeObject.setUpdateTime(new Date());
                forbiddenUserIdentifyCodeMapper.insertSelective(codeObject);
            } else {
                throw new ForbiddenUserIdentifyCodeException(1, "未找到可解封号码");
            }
        } else {
            codeObject.setEffective(state);
            codeObject.setUpdateTime(new Date());
            forbiddenUserIdentifyCodeMapper.updateByPrimaryKeySelective(codeObject);
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserNotificationServiceImpl.java
@@ -39,7 +39,7 @@
            return;
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getNewerHongbaoTitle(),
                    Constant.znxConfig.getNewerHongbaoMsg().replace("[金额]", money.toString()));
                    Constant.znxConfig.getNewerHongbaoMsg().replace("[金额]", money.toString()), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -51,7 +51,7 @@
            return;
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getOrderFanliRecieveTitle(), Constant.znxConfig
                    .getOrderFanliRecieveMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()));
                    .getOrderFanliRecieveMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -63,7 +63,7 @@
            return;
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getShareMoneyRecieveTitle(),
                    Constant.znxConfig.getShareMoneyRecieveMsg().replace("[金额]", money.toString()));
                    Constant.znxConfig.getShareMoneyRecieveMsg().replace("[金额]", money.toString()), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -76,7 +76,7 @@
            return;
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getFanliOrderStatisticedTitle(),
                    Constant.znxConfig.getFanliOrderStatisticedMsg().replace("[订单号]", orderId));
                    Constant.znxConfig.getFanliOrderStatisticedMsg().replace("[订单号]", orderId), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -89,7 +89,7 @@
        orderId = orderId.substring(0, orderId.length() - 6) + "******";
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getTichengOrderStatisticedTitle(), Constant.znxConfig
                    .getTichengOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()));
                    .getTichengOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -131,7 +131,7 @@
            return;
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getExtractApplayTitle(),
                    Constant.znxConfig.getExtractApplayMsg());
                    Constant.znxConfig.getExtractApplayMsg(), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -143,7 +143,7 @@
            return;
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getExtractTransferFailTitle(),
                    Constant.znxConfig.getExtractTransferFailMsg().replace("[时间]", time));
                    Constant.znxConfig.getExtractTransferFailMsg().replace("[时间]", time), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -170,7 +170,7 @@
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getExtractWrongTitle(),
                    Constant.znxConfig.getExtractWrongMsg().replace("[时间]", time));
                    Constant.znxConfig.getExtractWrongMsg().replace("[时间]", time), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -198,7 +198,7 @@
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getExtractSuccessTitle(),
                    Constant.znxConfig.getExtractSuccessMsg().replace("[时间]", time));
                    Constant.znxConfig.getExtractSuccessMsg().replace("[时间]", time), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -228,7 +228,7 @@
            return;
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getInviteMoneyRecieveTitle(),
                    Constant.znxConfig.getInviteMoneyRecieveMsg().replace("[金额]", money.toString()));
                    Constant.znxConfig.getInviteMoneyRecieveMsg().replace("[金额]", money.toString()), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -241,7 +241,7 @@
            return;
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getShareMoneyRecieveTitle(),
                    Constant.znxConfig.getShareMoneyRecieveMsg().replace("[金额]", money.toString()));
                    Constant.znxConfig.getShareMoneyRecieveMsg().replace("[金额]", money.toString()), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -256,7 +256,7 @@
        orderId = orderId.substring(0, orderId.length() - 6) + "******";
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getShareOrderStatisticedTitle(), Constant.znxConfig
                    .getShareOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()));
                    .getShareOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
@@ -271,7 +271,7 @@
        orderId = orderId.substring(0, orderId.length() - 6) + "******";
        try {
            pushService.pushZNX(uid, Constant.znxConfig.getInviteOrderStatisticedTitle(), Constant.znxConfig
                    .getInviteOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()));
                    .getInviteOrderStatisticedMsg().replace("[订单号]", orderId).replace("[金额]", money.toString()), null);
        } catch (PushException e) {
            e.printStackTrace();
        }
fanli/src/main/java/com/yeshi/fanli/service/inter/config/AppVersionService.java
@@ -53,4 +53,19 @@
     */
    public List<AppVersionInfo> listByPlatformAndMinVersion(String platform,String version);
    /**
     * 根据平台、版本号批量查询
     * @param listVersion
     * @return
     */
    public List<Integer> listVersionCodeByVersions(String platform, List<String> listVersion);
    /**
     * 根据平台、版本号批量查询
     * @param platform
     * @param listVersion
     * @return
     */
    public List<AppVersionInfo> listByVersions(String platform, List<String> listVersion);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SwiperPictureService.java
@@ -90,4 +90,11 @@
     * @return
     */
    public List<SwiperPicture> getByBannerCard(String card)    throws SwiperPictureException;
    /**
     * 保存信息
     * @param record
     * @throws SwiperPictureException
     */
    public void save(SwiperPicture record) throws SwiperPictureException;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/push/BasePushService.java
@@ -1,5 +1,7 @@
package com.yeshi.fanli.service.inter.push;
import java.util.List;
import com.yeshi.fanli.entity.bus.user.AccountMessage;
import com.yeshi.fanli.entity.system.SystemZnx;
import com.yeshi.fanli.exception.PushException;
@@ -14,7 +16,7 @@
     * @param content
     * @throws PushException
     */
    void pushGoods(Long uid, Long auctionId, String title, String content) throws PushException;
    void pushGoods(Long uid, Long auctionId, String title, String content, List<String> listVersion) throws PushException;
    /**
     * 推送链接
@@ -25,7 +27,7 @@
     * @param content
     * @throws PushException
     */
    void pushUrl(Long uid, String url, String title, String content) throws PushException;
    void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException;
    /**
     * 推送站内信
@@ -35,7 +37,7 @@
     * @param content
     * @throws PushException
     */
    void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX) throws PushException;
    void pushZNX(Long uId, AccountMessage msg, SystemZnx systemZNX, List<String> listVersion) throws PushException;
    /**
     * 适用版本 1.4.8及以后 推送weex页面
@@ -46,7 +48,7 @@
     * @param weexUrl
     * @throws PushException
     */
    void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException;
    void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException;
    /**
     * 适用版本 1.4.8及以后 推送百川网页
@@ -57,7 +59,7 @@
     * @param url
     * @throws PushException
     */
    void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException;
    void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException;
    /**
     * 推送福利中心(版本号:1.5.1后)
@@ -67,5 +69,5 @@
     * @param content
     * @throws PushException
     */
    void pushWelfareCenter(Long uid, String title, String content) throws PushException;
    void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/push/IOSPushService.java
@@ -4,7 +4,6 @@
import com.yeshi.fanli.entity.push.DeviceTokenIOS;
import com.yeshi.fanli.entity.push.PushQueueRecord;
import com.yeshi.fanli.exception.PushException;
/**
 * IOS推送服务
@@ -21,7 +20,7 @@
     * @param deviceToken
     * @param device
     */
    public void addDeviceToken(Long uid, int version, String deviceToken, String device);
    public void addDeviceToken(Long uid, int version, String deviceToken,  String device);
    /**
     * 更新设备的deviceToken
@@ -44,7 +43,7 @@
     * @param uid
     * @return
     */
    public List<DeviceTokenIOS> getDeviceTokenListByUid(Long uid);
    public List<DeviceTokenIOS> getDeviceTokenListByUid(Long uid, List<String> listVersion);
    /**
     * 获取DeviceToken不为空的列表
fanli/src/main/java/com/yeshi/fanli/service/inter/push/PushCouponRecordService.java
@@ -10,7 +10,7 @@
    public int insert(PushCouponRecord record);
    public int insertSelective(PushCouponRecord record);
    public int insertSelective(PushCouponRecord record) throws Exception;
    public PushCouponRecord selectByPrimaryKey(Long id);
fanli/src/main/java/com/yeshi/fanli/service/inter/push/PushService.java
@@ -1,5 +1,7 @@
package com.yeshi.fanli.service.inter.push;
import java.util.List;
import com.yeshi.fanli.exception.PushException;
public interface PushService {
@@ -12,7 +14,7 @@
     * @param content
     * @throws PushException
     */
    void pushGoods(Long uid, String url, String title, String content) throws PushException;
    void pushGoods(Long uid, String url, String title, String content, List<String> listVersion) throws PushException;
    /**
     * 推送链接
@@ -23,7 +25,7 @@
     * @param content
     * @throws PushException
     */
    void pushUrl(Long uid, String url, String title, String content) throws PushException;
    void pushUrl(Long uid, String url, String title, String content, List<String> listVersion) throws PushException;
    /**
     * 推送站内信
@@ -33,7 +35,7 @@
     * @param content
     * @throws PushException
     */
    void pushZNX(Long uId, String title, String content) throws PushException;
    void pushZNX(Long uId, String title, String content, List<String> listVersion) throws PushException;
    /**
     * 适用版本 1.4.8及以后 推送weex页面
@@ -44,7 +46,7 @@
     * @param weexUrl
     * @throws PushException
     */
    void pushWEEX(Long uid, String title, String content, String weexUrl) throws PushException;
    void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listVersion) throws PushException;
    /**
     * 适用版本 1.4.8及以后 推送百川网页
@@ -55,7 +57,7 @@
     * @param url
     * @throws PushException
     */
    void pushBaiChuanUrl(Long uid, String title, String content, String url) throws PushException;
    void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listVersion) throws PushException;
    /**
     * 推送福利中心
@@ -65,5 +67,5 @@
     * @param content
     * @throws PushException
     */
    void pushWelfareCenter(Long uid, String title, String content) throws PushException;
    void pushWelfareCenter(Long uid, String title, String content, List<String> listVersion) throws PushException;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/user/ForbiddenUserIdentifyCodeService.java
@@ -1,8 +1,11 @@
package com.yeshi.fanli.service.inter.user;
import java.util.List;
import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode;
import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
import com.yeshi.fanli.vo.user.ForbiddenUserIdentifyCodeVO;
public interface ForbiddenUserIdentifyCodeService {
@@ -36,4 +39,25 @@
     */
    public void delete(ForbiddenUserIdentifyCode identifyCode);
    /**
     * 查询已封禁的号码   用户信息
     * @param start
     * @param count
     * @param key
     * @param type
     * @return
     */
    public List<ForbiddenUserIdentifyCodeVO> listQuery(long start, int count, String key, Integer type);
    public long countQuery(String key, Integer type);
    /**
     * 对账号封禁、解封操作
     * @param identifyCode 号码
     * @param type  类型
     * @param state  状态: true 封
     * @throws ForbiddenUserIdentifyCodeException
     */
    public void saveForbiddenInfo(String identifyCode, Integer type, boolean state) throws ForbiddenUserIdentifyCodeException;
}
fanli/src/main/java/com/yeshi/fanli/util/Constant.java
@@ -13,9 +13,9 @@
public class Constant {
    public static boolean IS_TASK = false;
    // 外网环境
    public static boolean IS_OUTNET = true;
    public static boolean IS_OUTNET = false;
    public static boolean IS_TEST = false;
    public static boolean IS_TEST = true;
    public static int PAGE_SIZE = 20;
    public static int[] TASK_TYPE = { 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008// 微信任务类型编号
fanli/src/main/resource/druid.properties
@@ -5,14 +5,14 @@
#druid.password=hexiaohui
#druid.url=jdbc:mysql://192.168.1.253:3306/ec_quan
#druid.username=root
#druid.password=123456
druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan_test
druid.url=jdbc:mysql://192.168.1.253:3306/ec_quan
druid.username=root
druid.password=Yeshi2016@
druid.password=123456
#druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan_test
#druid.username=root
#druid.password=Yeshi2016@
#druid.url=jdbc:mysql://172.16.16.17:3306/ec_quan_test_online
fanli/src/test/java/org/fanli/MyBatisProduce.java
@@ -4,15 +4,13 @@
import org.junit.Test;
import org.yeshi.utils.mybatis.MyBatisMapperUtil;
import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
import com.yeshi.fanli.entity.taobao.TaoBaoUnionAuthRecord;
import com.yeshi.fanli.entity.push.PushCoupon;
public class MyBatisProduce {
    @Test
    public void test3() {
        MyBatisMapperUtil.createMapper(UserExtraTaoBaoInfo.class);
        MyBatisMapperUtil.createMapper(TaoBaoUnionAuthRecord.class);
        MyBatisMapperUtil.createMapper(PushCoupon.class);
    }
}
fanli/src/test/java/org/fanli/random/ExtractGift.java
@@ -40,11 +40,9 @@
            System.out.println("maxRange: "+maxRange);
            System.out.println("minRange: "+minRange);
            
            if (probability != 0) {
                if (result > minRange && result <= maxRange) {
                    returnobj = obj2;
                    break;
                }
            if (result > minRange && result <= maxRange) {
                returnobj = obj2;
                break;
            }
        }
        
@@ -53,7 +51,9 @@
    public static void main(String[] args) {
        System.out.println(JSON.toJSONString(generateAward()));
        for (int i =0 ; i<10 ;i ++) {
            System.out.println(1+ Math.round(Math.random() * (3)));
        }
    }
}