Authored by jianhui_wang

用户查询

package com.yoho.unions.vo;
import com.yoho.unions.common.annotation.BatchExportField;
import com.yoho.unions.common.annotation.BatchImportField;
/**
* Created by jianhui.wang on 2017/7/25.
*/
public class UserMobileAndUidVO {
@BatchImportField(index = 0)
@BatchExportField(name = "mobile")
private String mobile;
@BatchImportField(index = 1)
@BatchExportField(name = "uid")
private Integer uid;
public String getMobile() {
... ...
package com.yoho.unions.vo;
import lombok.Data;
/**
* Created by jianhui.wang on 2017/7/25.
*/
@Data
public class UserPhoneNumberVO {
private String mobile;
private String area;
}
... ... @@ -5,7 +5,6 @@ import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yoho.service.model.union.response.PageuserRegisterBuyResponseBO;
import com.yoho.unions.bo.UserRegisterBuyBO;
import com.yoho.unions.common.model.DeviceIdMatchBO;
import com.yoho.unions.common.service.IBusinessImportService;
import com.yoho.unions.dal.IOrdersMapper;
import com.yoho.unions.dal.IUserProfileDAO;
... ... @@ -15,6 +14,7 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
... ... @@ -34,7 +34,7 @@ public class UserInfoImportServiceImpl implements IBusinessImportService {
@Override
public Class getDataClass() {
return DeviceIdMatchBO.class;
return UserMobileAndUidVO.class;
}
@Override
... ... @@ -73,6 +73,9 @@ public class UserInfoImportServiceImpl implements IBusinessImportService {
logger.warn("UserRegisterBuyInfo:uid is {},mobile is {},userSource is {}", userProfile.getUid(), userProfile.getMobile(), userProfile.getUserSource());
throw new ServiceException(ServiceError.USER_NOT_EXIST);
}
userRegisterBuyBO.setMobile(userProfile.getMobile());
userRegisterBuyBO.setRegister(true);
userRegisterBuyBO.setUid(userProfile.getUid());
... ... @@ -85,6 +88,13 @@ public class UserInfoImportServiceImpl implements IBusinessImportService {
userRegisterBuyList.add(userRegisterBuyBO);
}
userRegisterBuyList=Lists.transform(Lists.newArrayList(userRegisterBuyList),input -> {
UserRegisterBuyBO output = new UserRegisterBuyBO();
BeanUtils.copyProperties(input, output);
return output;
});
PageuserRegisterBuyResponseBO pageuserRegisterBuyResponseBO = new PageuserRegisterBuyResponseBO();
pageuserRegisterBuyResponseBO.setList(userRegisterBuyList);
... ...
... ... @@ -108,6 +108,10 @@
<property name="isIdfa" value="1"/>
</bean>
<bean id="UserInfoImportServiceImpl" class="com.yoho.unions.server.service.impl.UserInfoImportServiceImpl" >
</bean>
<bean id="imeiMatchImportServiceImpl" class="com.yoho.unions.server.service.impl.DeviceIdMatchImportServiceImpl" >
<property name="isIdfa" value="0"/>
</bean>
... ... @@ -115,6 +119,7 @@
<!-- 批量操作服务定义 -->
<util:map id="batchImportBusiness" key-type="java.lang.String"
value-type="com.yoho.unions.common.service.IBusinessImportService">
<entry key="MobileUidImport" value-ref="UserInfoImportServiceImpl"/>
<entry key="idfaMatchImport" value-ref="idfaMatchImportServiceImpl"/>
<entry key="imeiMatchImport" value-ref="idfaMatchImportServiceImpl"/>
</util:map>
... ...
... ... @@ -29,7 +29,7 @@
uploadInputName: "file", //上传文件的控件名称
url: contextPath + "/batch/import", //提交到后端的url
queryParams: {
type: "productBuyLimitImport", //spring-web-context.xml 文件配置实现类 <entry key="productBuyLimitImport" value-ref="productBuyLimitServiceImpl"/>
type: "MobileUidImport", //spring-web-context.xml 文件配置实现类 <entry key="productBuyLimitImport" value-ref="productBuyLimitServiceImpl"/>
args: "import"
}, //提交到后端额外参数
showFileName: false, //上传成功后,是否显示文件名
... ...
... ... @@ -44,27 +44,27 @@
},
columns: [[{
title: "手机号",
field: "productSkn",
width: 65,
field: "mobile",
width: 45,
align: "center"
}, {
title: "uid",
field: "level0Limit",
field: "uid",
width: 65,
align: "center"
}, {
title: "是否注册",
field: "level1Limit",
field: "register",
width: 30,
align: "center"
}, {
title: "注册时间",
field: "level2Limit",
width: 80,
field: "registerTime",
width: 60,
align: "center"
}, {
title: "是否购买",
field: "level2Limit",
field: "Buy",
width: 30,
align: "center"
}]],
... ... @@ -72,7 +72,7 @@
pagination: true,
pageSize: 10,
pageList: [10],
idField: "productSkn",
idField: "mobile",
singleSelect: true,
checkOnSelect: false,
onLoadSuccess: function () {
... ... @@ -84,8 +84,8 @@
function batchProgramDialog() {
var div = $("<div id='batchProgramDialogDiv'>").appendTo($(document.body));
$(div).myDialog({
width: "600px",
height: "50%",
width: "800px",
height: "60%",
href: contextPath + "/html/getUserInfo/userinfoBatch.html",
modal: true,
collapsible: true,
... ...