Showing
6 changed files
with
36 additions
and
25 deletions
1 | package com.yoho.unions.vo; | 1 | package com.yoho.unions.vo; |
2 | 2 | ||
3 | +import com.yoho.unions.common.annotation.BatchExportField; | ||
4 | +import com.yoho.unions.common.annotation.BatchImportField; | ||
5 | + | ||
3 | /** | 6 | /** |
4 | * Created by jianhui.wang on 2017/7/25. | 7 | * Created by jianhui.wang on 2017/7/25. |
5 | */ | 8 | */ |
6 | 9 | ||
7 | public class UserMobileAndUidVO { | 10 | public class UserMobileAndUidVO { |
11 | + @BatchImportField(index = 0) | ||
12 | + @BatchExportField(name = "mobile") | ||
13 | + | ||
8 | private String mobile; | 14 | private String mobile; |
15 | + @BatchImportField(index = 1) | ||
16 | + @BatchExportField(name = "uid") | ||
9 | private Integer uid; | 17 | private Integer uid; |
10 | 18 | ||
11 | public String getMobile() { | 19 | public String getMobile() { |
@@ -5,7 +5,6 @@ import com.yoho.error.ServiceError; | @@ -5,7 +5,6 @@ import com.yoho.error.ServiceError; | ||
5 | import com.yoho.error.exception.ServiceException; | 5 | import com.yoho.error.exception.ServiceException; |
6 | import com.yoho.service.model.union.response.PageuserRegisterBuyResponseBO; | 6 | import com.yoho.service.model.union.response.PageuserRegisterBuyResponseBO; |
7 | import com.yoho.unions.bo.UserRegisterBuyBO; | 7 | import com.yoho.unions.bo.UserRegisterBuyBO; |
8 | -import com.yoho.unions.common.model.DeviceIdMatchBO; | ||
9 | import com.yoho.unions.common.service.IBusinessImportService; | 8 | import com.yoho.unions.common.service.IBusinessImportService; |
10 | import com.yoho.unions.dal.IOrdersMapper; | 9 | import com.yoho.unions.dal.IOrdersMapper; |
11 | import com.yoho.unions.dal.IUserProfileDAO; | 10 | import com.yoho.unions.dal.IUserProfileDAO; |
@@ -15,6 +14,7 @@ import org.apache.commons.collections.CollectionUtils; | @@ -15,6 +14,7 @@ import org.apache.commons.collections.CollectionUtils; | ||
15 | import org.apache.commons.lang3.StringUtils; | 14 | import org.apache.commons.lang3.StringUtils; |
16 | import org.slf4j.Logger; | 15 | import org.slf4j.Logger; |
17 | import org.slf4j.LoggerFactory; | 16 | import org.slf4j.LoggerFactory; |
17 | +import org.springframework.beans.BeanUtils; | ||
18 | import org.springframework.beans.factory.annotation.Autowired; | 18 | import org.springframework.beans.factory.annotation.Autowired; |
19 | import org.springframework.stereotype.Service; | 19 | import org.springframework.stereotype.Service; |
20 | 20 | ||
@@ -34,7 +34,7 @@ public class UserInfoImportServiceImpl implements IBusinessImportService { | @@ -34,7 +34,7 @@ public class UserInfoImportServiceImpl implements IBusinessImportService { | ||
34 | 34 | ||
35 | @Override | 35 | @Override |
36 | public Class getDataClass() { | 36 | public Class getDataClass() { |
37 | - return DeviceIdMatchBO.class; | 37 | + return UserMobileAndUidVO.class; |
38 | } | 38 | } |
39 | 39 | ||
40 | @Override | 40 | @Override |
@@ -73,6 +73,9 @@ public class UserInfoImportServiceImpl implements IBusinessImportService { | @@ -73,6 +73,9 @@ public class UserInfoImportServiceImpl implements IBusinessImportService { | ||
73 | logger.warn("UserRegisterBuyInfo:uid is {},mobile is {},userSource is {}", userProfile.getUid(), userProfile.getMobile(), userProfile.getUserSource()); | 73 | logger.warn("UserRegisterBuyInfo:uid is {},mobile is {},userSource is {}", userProfile.getUid(), userProfile.getMobile(), userProfile.getUserSource()); |
74 | throw new ServiceException(ServiceError.USER_NOT_EXIST); | 74 | throw new ServiceException(ServiceError.USER_NOT_EXIST); |
75 | } | 75 | } |
76 | + | ||
77 | + | ||
78 | + | ||
76 | userRegisterBuyBO.setMobile(userProfile.getMobile()); | 79 | userRegisterBuyBO.setMobile(userProfile.getMobile()); |
77 | userRegisterBuyBO.setRegister(true); | 80 | userRegisterBuyBO.setRegister(true); |
78 | userRegisterBuyBO.setUid(userProfile.getUid()); | 81 | userRegisterBuyBO.setUid(userProfile.getUid()); |
@@ -85,6 +88,13 @@ public class UserInfoImportServiceImpl implements IBusinessImportService { | @@ -85,6 +88,13 @@ public class UserInfoImportServiceImpl implements IBusinessImportService { | ||
85 | userRegisterBuyList.add(userRegisterBuyBO); | 88 | userRegisterBuyList.add(userRegisterBuyBO); |
86 | } | 89 | } |
87 | 90 | ||
91 | + | ||
92 | + userRegisterBuyList=Lists.transform(Lists.newArrayList(userRegisterBuyList),input -> { | ||
93 | + UserRegisterBuyBO output = new UserRegisterBuyBO(); | ||
94 | + BeanUtils.copyProperties(input, output); | ||
95 | + return output; | ||
96 | + }); | ||
97 | + | ||
88 | PageuserRegisterBuyResponseBO pageuserRegisterBuyResponseBO = new PageuserRegisterBuyResponseBO(); | 98 | PageuserRegisterBuyResponseBO pageuserRegisterBuyResponseBO = new PageuserRegisterBuyResponseBO(); |
89 | pageuserRegisterBuyResponseBO.setList(userRegisterBuyList); | 99 | pageuserRegisterBuyResponseBO.setList(userRegisterBuyList); |
90 | 100 |
@@ -108,6 +108,10 @@ | @@ -108,6 +108,10 @@ | ||
108 | <property name="isIdfa" value="1"/> | 108 | <property name="isIdfa" value="1"/> |
109 | </bean> | 109 | </bean> |
110 | 110 | ||
111 | + <bean id="UserInfoImportServiceImpl" class="com.yoho.unions.server.service.impl.UserInfoImportServiceImpl" > | ||
112 | + | ||
113 | + </bean> | ||
114 | + | ||
111 | <bean id="imeiMatchImportServiceImpl" class="com.yoho.unions.server.service.impl.DeviceIdMatchImportServiceImpl" > | 115 | <bean id="imeiMatchImportServiceImpl" class="com.yoho.unions.server.service.impl.DeviceIdMatchImportServiceImpl" > |
112 | <property name="isIdfa" value="0"/> | 116 | <property name="isIdfa" value="0"/> |
113 | </bean> | 117 | </bean> |
@@ -115,6 +119,7 @@ | @@ -115,6 +119,7 @@ | ||
115 | <!-- 批量操作服务定义 --> | 119 | <!-- 批量操作服务定义 --> |
116 | <util:map id="batchImportBusiness" key-type="java.lang.String" | 120 | <util:map id="batchImportBusiness" key-type="java.lang.String" |
117 | value-type="com.yoho.unions.common.service.IBusinessImportService"> | 121 | value-type="com.yoho.unions.common.service.IBusinessImportService"> |
122 | + <entry key="MobileUidImport" value-ref="UserInfoImportServiceImpl"/> | ||
118 | <entry key="idfaMatchImport" value-ref="idfaMatchImportServiceImpl"/> | 123 | <entry key="idfaMatchImport" value-ref="idfaMatchImportServiceImpl"/> |
119 | <entry key="imeiMatchImport" value-ref="idfaMatchImportServiceImpl"/> | 124 | <entry key="imeiMatchImport" value-ref="idfaMatchImportServiceImpl"/> |
120 | </util:map> | 125 | </util:map> |
@@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
29 | uploadInputName: "file", //上传文件的控件名称 | 29 | uploadInputName: "file", //上传文件的控件名称 |
30 | url: contextPath + "/batch/import", //提交到后端的url | 30 | url: contextPath + "/batch/import", //提交到后端的url |
31 | queryParams: { | 31 | queryParams: { |
32 | - type: "productBuyLimitImport", //spring-web-context.xml 文件配置实现类 <entry key="productBuyLimitImport" value-ref="productBuyLimitServiceImpl"/> | 32 | + type: "MobileUidImport", //spring-web-context.xml 文件配置实现类 <entry key="productBuyLimitImport" value-ref="productBuyLimitServiceImpl"/> |
33 | args: "import" | 33 | args: "import" |
34 | }, //提交到后端额外参数 | 34 | }, //提交到后端额外参数 |
35 | showFileName: false, //上传成功后,是否显示文件名 | 35 | showFileName: false, //上传成功后,是否显示文件名 |
@@ -44,27 +44,27 @@ | @@ -44,27 +44,27 @@ | ||
44 | }, | 44 | }, |
45 | columns: [[{ | 45 | columns: [[{ |
46 | title: "手机号", | 46 | title: "手机号", |
47 | - field: "productSkn", | ||
48 | - width: 65, | 47 | + field: "mobile", |
48 | + width: 45, | ||
49 | align: "center" | 49 | align: "center" |
50 | }, { | 50 | }, { |
51 | title: "uid", | 51 | title: "uid", |
52 | - field: "level0Limit", | 52 | + field: "uid", |
53 | width: 65, | 53 | width: 65, |
54 | align: "center" | 54 | align: "center" |
55 | }, { | 55 | }, { |
56 | title: "是否注册", | 56 | title: "是否注册", |
57 | - field: "level1Limit", | 57 | + field: "register", |
58 | width: 30, | 58 | width: 30, |
59 | align: "center" | 59 | align: "center" |
60 | }, { | 60 | }, { |
61 | title: "注册时间", | 61 | title: "注册时间", |
62 | - field: "level2Limit", | ||
63 | - width: 80, | 62 | + field: "registerTime", |
63 | + width: 60, | ||
64 | align: "center" | 64 | align: "center" |
65 | }, { | 65 | }, { |
66 | title: "是否购买", | 66 | title: "是否购买", |
67 | - field: "level2Limit", | 67 | + field: "Buy", |
68 | width: 30, | 68 | width: 30, |
69 | align: "center" | 69 | align: "center" |
70 | }]], | 70 | }]], |
@@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
72 | pagination: true, | 72 | pagination: true, |
73 | pageSize: 10, | 73 | pageSize: 10, |
74 | pageList: [10], | 74 | pageList: [10], |
75 | - idField: "productSkn", | 75 | + idField: "mobile", |
76 | singleSelect: true, | 76 | singleSelect: true, |
77 | checkOnSelect: false, | 77 | checkOnSelect: false, |
78 | onLoadSuccess: function () { | 78 | onLoadSuccess: function () { |
@@ -84,8 +84,8 @@ | @@ -84,8 +84,8 @@ | ||
84 | function batchProgramDialog() { | 84 | function batchProgramDialog() { |
85 | var div = $("<div id='batchProgramDialogDiv'>").appendTo($(document.body)); | 85 | var div = $("<div id='batchProgramDialogDiv'>").appendTo($(document.body)); |
86 | $(div).myDialog({ | 86 | $(div).myDialog({ |
87 | - width: "600px", | ||
88 | - height: "50%", | 87 | + width: "800px", |
88 | + height: "60%", | ||
89 | href: contextPath + "/html/getUserInfo/userinfoBatch.html", | 89 | href: contextPath + "/html/getUserInfo/userinfoBatch.html", |
90 | modal: true, | 90 | modal: true, |
91 | collapsible: true, | 91 | collapsible: true, |
-
Please register or login to post a comment