Authored by linlong

update

... ... @@ -15,6 +15,16 @@ public class UnionLogs {
private String unionType;
private String unionName;
public String getUnionName() {
return unionName;
}
public void setUnionName(String unionName) {
this.unionName = unionName;
}
private String addParams;
private String activateParams;
... ...
... ... @@ -18,6 +18,7 @@
<result column="td" property="td" jdbcType="VARCHAR" />
<result column="app_key" property="appKey" jdbcType="VARCHAR" />
<result column="interface_type" property="interfaceType" jdbcType="VARCHAR" />
<result column="union_name" property="unionName" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="ActivateMap" type="com.yoho.service.model.union.response.ActivateDeviceIdRspBO">
<result column="union_type" property="unionType" jdbcType="VARCHAR" />
... ... @@ -28,7 +29,7 @@
<sql id="Base_Column_List">
id, app_id, udid, idfa, imei, is_activate, union_type, add_params,
activate_params,
create_time, update_time, client_type, td, app_key,interface_type
create_time, update_time, client_type, td, app_key,interface_type,union_name
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
parameterType="java.lang.Integer">
... ... @@ -45,13 +46,13 @@
insert into union_logs (id, app_id, udid,
idfa, imei, is_activate,
union_type, add_params, activate_params,
create_time, update_time, client_type, td, app_key,interface_type)
create_time, update_time, client_type, td, app_key,interface_type,union_name)
values (#{id,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR},
#{udid,jdbcType=VARCHAR},
#{idfa,jdbcType=VARCHAR}, #{imei,jdbcType=VARCHAR}, #{isActivate,jdbcType=TINYINT},
#{unionType,jdbcType=INTEGER}, #{addParams,jdbcType=VARCHAR},
#{activateParams,jdbcType=VARCHAR},
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{clientType}, #{td}, #{appKey}, #{interfaceType})
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{clientType}, #{td}, #{appKey}, #{interfaceType},#{unionName})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.UnionLogs">
update union_logs
... ... @@ -66,7 +67,8 @@
update_time = #{updateTime,jdbcType=INTEGER},
client_type=#{clientType},
app_key=#{appKey},
interface_type=#{interfaceType}
interface_type=#{interfaceType},
union_name=#{unionName}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateUnionLogs">
... ...
... ... @@ -441,8 +441,14 @@ public class UnionServiceImpl implements IUnionService,ApplicationEventPublisher
logs.setTd(request.getTd());
logs.setAppKey(request.getAppkey());
logs.setInterfaceType(click.getInterfaceType());
unionLogsDAO.insert(logs);
log.info("activateUnion add db success with request is {}, and dbData={}", request, logs);
logs.setUnionName(mktMarketingUrl.getName());
try{
unionLogsDAO.insert(logs);
log.info("activateUnion add db success with request is {}, and dbData={}", request, logs);
}catch (Exception e){
log.error("activity save unionlog error is {}",e.getMessage());
}
// 记录日志
JSONObject j = new JSONObject();
... ...
... ... @@ -41,7 +41,7 @@
{ id: 'addMonitor_ios', text: 'addMonitor_ios' },
{ id: 'addMonitor_android', text: 'addMonitor_android' }
]"/>
<input name="activateTime" type="text" class="easyui-datebox" editable="false" data-options="prompt:'请选择激活日期'">
<input id ="activateTime" name="activateTime" type="text" class="easyui-datebox" editable="false" data-options="prompt:'请选择激活日期'">
<a id="searchBtn" class="easyui-linkbutton btn-info" style="margin-left: 30px; "></a>
</form>
</div>
... ... @@ -54,12 +54,16 @@
<script>
$(function () {
var currentDate = getNowFormatDate();
$('#activateTime').datebox('setValue', currentDate);
$("#activateTalbe").myDatagrid({
fit: true,
fitColumns: true,
//queryParams: param,
nowrap: false,
url: contextPath + "/ActivateUnionRest/queryActivateDeviceId",
url:'',
// url: contextPath + "/ActivateUnionRest/queryActivateDeviceId",
method: 'POST',
queryParams: getParams(),
loadFilter: function (data) {
... ... @@ -108,12 +112,32 @@
return params;
}
function getNowFormatDate() {
var date = new Date();
var seperator1 = "-";
var year = date.getFullYear();
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = year + seperator1 + month + seperator1 + strDate;
return currentdate;
}
$("#searchBtn").linkbutton({
iconCls: "icon-search",
text: "查询",
onClick: function () {
$("#activateTalbe").datagrid('reload', getParams());
$("#activateTalbe").datagrid(
{url:contextPath + "/ActivateUnionRest/queryActivateDeviceId",
queryParams: getParams()
});
// $("#activateTalbe").datagrid('reload', getParams());
}
});
});
... ...