admin
2019-09-23 30a6347998c58ce2c57c8074350c0e63f01c48bd
设备活跃增加mac地址记录
5个文件已修改
62 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/SystemClientController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/push/DeviceActive.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceActiveMapper.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/DeviceActiveServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/SystemClientController.java
@@ -58,7 +58,8 @@
    private UserInfoExtraService userInfoExtraService;
    @RequestMapping("getsystemclientparams")
    public void getSystemClientParams(AcceptData acceptData, Long uid, HttpServletRequest request, PrintWriter out) {
    public void getSystemClientParams(AcceptData acceptData, Long uid, String mac, HttpServletRequest request,
            PrintWriter out) {
        BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
                acceptData.getPackages());
        if (system == null) {
@@ -117,6 +118,7 @@
                    da.setIpInfo(ipInfo);
                    da.setChannel(acceptData.getChannel());
                    da.setImei(acceptData.getImei());
                    da.setMac(mac);
                    deviceActiveService.addDeviceActive(da);
                } catch (Exception e) {
                }
fanli/src/main/java/com/yeshi/fanli/entity/push/DeviceActive.java
@@ -33,6 +33,28 @@
    private String channel;// 渠道
    @Column(name = "da_imei")
    private String imei;
    @Column(name = "da_idfa")
    private String idfa;
    @Column(name = "da_mac")
    private String mac;
    public String getIdfa() {
        return idfa;
    }
    public void setIdfa(String idfa) {
        this.idfa = idfa;
    }
    public String getMac() {
        return mac;
    }
    public void setMac(String mac) {
        this.mac = mac;
    }
    public String getImei() {
        return imei;
fanli/src/main/java/com/yeshi/fanli/mapping/push/DeviceActiveMapper.xml
@@ -17,8 +17,11 @@
        <result column="da_ip" property="ipInfo" jdbcType="VARCHAR" />
        <result column="da_channel" property="channel" jdbcType="VARCHAR" />
        <result column="da_imei" property="imei" jdbcType="VARCHAR" />
        <result column="da_idfa" property="idfa" jdbcType="VARCHAR" />
        <result column="da_mac" property="mac" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">da_id,da_platform,da_device,da_device_token_md5,da_device_token,da_version_code,da_createtime,da_updatetime,da_ip,da_channel,da_imei</sql>
    <sql id="Base_Column_List">da_id,da_platform,da_device,da_device_token_md5,da_device_token,da_version_code,da_createtime,da_updatetime,da_ip,da_channel,da_imei,da_idfa,da_mac
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
@@ -50,22 +53,21 @@
        from yeshi_ec_device_active where da_device = #{0} order by da_id
        limit 1
    </select>
    <select id="selectFirstByImei" resultMap="BaseResultMap"
        parameterType="java.lang.String">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_device_active where da_imei = #{0} order by da_id
        limit 1
        from yeshi_ec_device_active where da_imei = #{0} order by da_id limit
        1
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_device_active where da_id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.push.DeviceActive"
        useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_device_active
        (da_id,da_platform,da_device,da_device_token_md5,da_device_token,da_version_code,da_createtime,da_updatetime,da_ip,da_channel,da_imei)
        (da_id,da_platform,da_device,da_device_token_md5,da_device_token,da_version_code,da_createtime,da_updatetime,da_ip,da_channel,da_imei,da_idfa,da_mac)
        values
        (#{id,jdbcType=BIGINT},#{platform,jdbcType=INTEGER},#{device,jdbcType=VARCHAR},#{deviceTokenMd5,jdbcType=VARCHAR},#{deviceToken,jdbcType=VARCHAR},#{versionCode,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{ipInfo,jdbcType=VARCHAR},#{channel,jdbcType=VARCHAR},#{imei,jdbcType=VARCHAR})</insert>
        (#{id,jdbcType=BIGINT},#{platform,jdbcType=INTEGER},#{device,jdbcType=VARCHAR},#{deviceTokenMd5,jdbcType=VARCHAR},#{deviceToken,jdbcType=VARCHAR},#{versionCode,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{ipInfo,jdbcType=VARCHAR},#{channel,jdbcType=VARCHAR},#{imei,jdbcType=VARCHAR},#{idfa,jdbcType=VARCHAR},#{mac,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.DeviceActive"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_device_active
@@ -81,6 +83,8 @@
            <if test="ipInfo != null">da_ip,</if>
            <if test="channel != null">da_channel,</if>
            <if test="imei != null">da_imei,</if>
            <if test="idfa != null">da_idfa,</if>
            <if test="mac != null">da_mac,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -95,6 +99,8 @@
            <if test="ipInfo != null">#{ipInfo,jdbcType=VARCHAR},</if>
            <if test="channel != null">#{channel,jdbcType=VARCHAR}</if>
            <if test="imei != null">#{imei,jdbcType=VARCHAR}</if>
            <if test="idfa != null">#{idfa,jdbcType=VARCHAR}</if>
            <if test="mac != null">#{mac,jdbcType=VARCHAR}</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.DeviceActive">update
@@ -106,14 +112,16 @@
        #{versionCode,jdbcType=INTEGER},da_createtime =
        #{createTime,jdbcType=TIMESTAMP},da_updatetime =
        #{updateTime,jdbcType=TIMESTAMP},da_ip = #{ipInfo,jdbcType=VARCHAR}
        ,da_channel =#{channel,jdbcType=VARCHAR},da_imei =#{imei,jdbcType=VARCHAR} where da_id =
        #{id,jdbcType=BIGINT}</update>
        ,da_channel =#{channel,jdbcType=VARCHAR},da_imei
        =#{imei,jdbcType=VARCHAR} ,da_idfa =#{idfa,jdbcType=VARCHAR} ,da_mac
        =#{mac,jdbcType=VARCHAR} where da_id = #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.DeviceActive">
        update yeshi_ec_device_active
        <set>
            <if test="platform != null">da_platform=#{platform,jdbcType=INTEGER},</if>
            <if test="device != null">da_device=#{device,jdbcType=VARCHAR},</if>
            <if test="deviceTokenMd5 != null">da_device_token_md5=#{deviceTokenMd5,jdbcType=VARCHAR},</if>
            <if test="deviceTokenMd5 != null">da_device_token_md5=#{deviceTokenMd5,jdbcType=VARCHAR},
            </if>
            <if test="deviceToken != null">da_device_token=#{deviceToken,jdbcType=VARCHAR},</if>
            <if test="versionCode != null">da_version_code=#{versionCode,jdbcType=INTEGER},</if>
            <if test="createTime != null">da_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
@@ -121,6 +129,8 @@
            <if test="ipInfo != null">da_ip=#{ipInfo,jdbcType=VARCHAR},</if>
            <if test="channel !=null">da_channel =#{channel,jdbcType=VARCHAR},</if>
            <if test="imei !=null">da_imei =#{imei,jdbcType=VARCHAR},</if>
            <if test="idfa !=null">da_idfa =#{idfa,jdbcType=VARCHAR},</if>
            <if test="mac !=null">da_mac =#{mac,jdbcType=VARCHAR},</if>
        </set>
        where da_id = #{id,jdbcType=BIGINT}
    </update>
fanli/src/main/java/com/yeshi/fanli/service/impl/push/DeviceActiveServiceImpl.java
@@ -58,6 +58,10 @@
                updateDeviceActive.setDeviceToken(deviceActive.getDeviceToken());
                updateDeviceActive.setDeviceTokenMd5(StringUtil.Md5(deviceActive.getDeviceToken()));
            }
            if (StringUtil.isNullOrEmpty(da.getMac()))
                updateDeviceActive.setImei(deviceActive.getMac());
            deviceActiveMapper.updateByPrimaryKeySelective(updateDeviceActive);
        }
fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java
@@ -173,7 +173,7 @@
            doPDDOrderJob();// 拼多多订单处理
            doImportantTaoBaoGoodsUpdateJob();// 淘宝重要商品的信息更新
            doHongBaoRecieveIntegralGetJob();// 返利到账,金币增加
            doPlaceOrderIntegralJob();// 下单赠送金币任务
//            doPlaceOrderIntegralJob();// 下单赠送金币任务
            doDouYinDeviceActiveJob();// 抖音设备激活广告监测
        }