Authored by tanling

市场推广活动activity移到unions

... ... @@ -30,6 +30,9 @@
<value>/pushUnionOrders</value>
<value>/ClickUnionRest/addUnion4Jump</value>
<value>/UnionRest/addBigData</value>
<value>/tencentMkt/TencentMktController/sendSms</value>
<value>/tencentMkt/TencentMktController/getActivityInfo</value>
<value>/tencentMkt/TencentMktController/validRegCodeAndSendCode</value>
</list>
</property>
<property name="excludeMethods">
... ...
... ... @@ -25,6 +25,16 @@ public class MktMarketingUrl {
private Integer createTime;
private String mktActivityCode;
public String getMktActivityCode() {
return mktActivityCode;
}
public void setMktActivityCode(String mktActivityCode) {
this.mktActivityCode = mktActivityCode;
}
public Long getUnionType() {
return unionType;
}
... ...
... ... @@ -14,10 +14,11 @@
<result column="dest_url" property="destUrl" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="mkt_activity_code" property="mktActivityCode" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
union_type, division_code, class_code, channel_code, device_code, dept_id, create_id,
name, src_url, dest_url, status, create_time
name, src_url, dest_url, status, create_time,mkt_activity_code
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select
... ...
... ... @@ -19,8 +19,10 @@ import com.yoho.service.model.union.response.TencentMktActivityBO;
import com.yoho.service.model.union.response.TencentMktBO;
import com.yoho.unions.common.constant.Constant;
import com.yoho.unions.convert.TencentMktActivityConvert;
import com.yoho.unions.dal.IMktMarketingUrlDAO;
import com.yoho.unions.dal.ITencentMktActivityDAO;
import com.yoho.unions.dal.ITencentMktCouponHistoryDAO;
import com.yoho.unions.dal.model.MktMarketingUrl;
import com.yoho.unions.dal.model.TencentMktActivity;
import com.yoho.unions.dal.model.TencentMktCouponHistory;
import com.yoho.unions.helper.*;
... ... @@ -60,6 +62,9 @@ public class TencentMktServiceImpl implements ITencentMktService {
private ITencentMktActivityDAO tencentMktActivityDAO;
@Resource
private IMktMarketingUrlDAO mktMarketingUrlDAO;
@Resource
private ServiceCaller service;
@Resource(name = "yhValueOperations")
... ... @@ -319,6 +324,8 @@ public class TencentMktServiceImpl implements ITencentMktService {
}
//缓存不命中,从数据库获取
TencentMktActivity db = tencentMktActivityDAO.selectByActivityCode(activityCode);
if (db == null) {
log.error("no tencent mkt activity exists");
... ... @@ -351,12 +358,22 @@ public class TencentMktServiceImpl implements ITencentMktService {
return bo;
}
// 这边的入口参数实际是改成 union_type 先从统一链接的表中查询出 真正的活动code
MktMarketingUrl mktMarketingUrl = mktMarketingUrlDAO.selectByPrimaryKey(Long.parseLong(activityCode));
if (mktMarketingUrl == null || StringUtils.isBlank(mktMarketingUrl.getMktActivityCode())){
// 活动不存在
log.warn("there is not mktMarketingUrl,params is activityCode={}", activityCode);
bo.setFlag(2);
bo.setReturnMsg("不存在该活动");
return bo;
}
// 1、查询此活动
TencentMktActivityBO activitydb = getActivityInfoByCode(activityCode);
TencentMktActivityBO activitydb = getActivityInfoByCode(mktMarketingUrl.getMktActivityCode());
if (activitydb == null) {
// 活动不存在
log.warn("there is not activity,params is activityCode={}", activityCode);
log.warn("there is not activity,params is activityCode={}", mktMarketingUrl.getMktActivityCode());
bo.setFlag(2);
bo.setReturnMsg("不存在该活动");
return bo;
... ...
... ... @@ -23,13 +23,13 @@ activeTime_4=24
#微博
# ******************** redis servers ********************
redis.readonly.proxy.address=test-bigdata-redis-1903805580.cn-north-1.elb.amazonaws.com.cn
redis.readonly.proxy.address=192.168.102.12
redis.readonly.proxy.port=6379
redis.readonly.proxy.auth=
redis.readonly.proxy.database=1
redis.proxy.address=test-bigdata-redis-1903805580.cn-north-1.elb.amazonaws.com.cn
redis.proxy.address=192.168.102.12
redis.proxy.port=6379
redis.proxy.auth=
redis.proxy.database=1
... ...
... ... @@ -23,6 +23,12 @@
<url-pattern>/downyohoshow.html</url-pattern>
<url-pattern>/downapp3.html</url-pattern>
<url-pattern>/app-downloads.html</url-pattern>
<url-pattern>/js/*</url-pattern>
<url-pattern>/tencentMkt/index.html</url-pattern>
<url-pattern>/tencentMkt/css/*</url-pattern>
<url-pattern>/tencentMkt/font/*</url-pattern>
<url-pattern>/tencentMkt/img/*</url-pattern>
<url-pattern>/tencentMkt/js/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
... ...
... ... @@ -29,47 +29,30 @@
<body>
<script>
var activityInfo = {};
/* function getUser() {
var c = cookie('_UID'), user;
if (typeof c === 'undefined') {
return 0;
}
user = c.split('::');
if (typeof user === 'undefined' || user.length < 4) {
return 0;
}
return user;
}
function getUid() {
var user = getUser();
if (user === 0) {
return 0;
}
return user[1];
}
(function(w, d, s, j, f) {
var a = d.createElement(s);
var m = d.getElementsByTagName(s)[0];
w.YohoAcquisitionObject = f;
w[f] = function() {
w[f].p = arguments;
};
a.async = 1;
a.src = j;
m.parentNode.insertBefore(a, m);
})(window, document, 'script', ('https:' === document.location.protocol ? 'https' : 'http') + '://' +
'cdn.yoho.cn/yas-jssdk/1.0.17/yas.js', '_yas');
(function() {
var uid = getUid();
uid = uid === 0 ? '' : uid;
window._ozuid = uid;// 暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '1.0.17', 'yohobuy_m', uid, '', '');
}
}()); */
/**
(function(w, d, s, j, f) {
var a = d.createElement(s);
var m = d.getElementsByTagName(s)[0];
w.YohoAcquisitionObject = f;
w[f] = function() {
w[f].p = arguments;
};
a.async = 1;
a.src = j;
m.parentNode.insertBefore(a, m);
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/1.0.17/yas.js', '_yas'));
(function() {
if (window._yas) {
window._yas(1 * new Date(), '1.0.17', 'yohobuy_m', '', '', '');
}
}());
/**
* html中传递参数,获取方法
* @param key
* @returns
... ... @@ -81,34 +64,17 @@
}
var activityCode = getQueryStr("code");
var activityData = null;
(function(w, d, s, j, f) {
var a = d.createElement(s);
var m = d.getElementsByTagName(s)[0];
w.YohoAcquisitionObject = f;
let search = window.location.search;
if (search.indexOf('&expires=') === -1) {
search = search ? (search + '&') : '?';
search = search + 'expires=' + (7 * 24 * 60 * 60 * 1000);
search = search + '&union_type='+activityCode;
}
$('<iframe style="display:none;" src="//m.yohobuy.com/activity/wechat/1111' + search + '"></iframe>').prependTo('body');
w[f] = function() {
w[f].p = arguments;
};
a.async = 1;
a.src = j;
m.parentNode.insertBefore(a, m);
})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.18/yas.js', '_yas');
$(function() {
if (window._yas) {
window._yas(1 * new Date(), '1.0.18', 'yohobuy_m', 0, '', '');
}
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({}, true);
}
});
</script>
</script>
<div class="main-wrap">
<div class="receive-coupon-page">
... ...