Просмотр исходного кода

[会员列表][修改][导入]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
dcf12895b5
4 измененных файлов: 10 добавлений и 13 удалений
  1. +2
    -1
      mallinkAdmin/src/main/java/com/iformall/interceptor/RequestInterceptor.java
  2. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/CUserBaseInfoT.java
  3. +5
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
  4. +1
    -8
      pom.xml

+ 2
- 1
mallinkAdmin/src/main/java/com/iformall/interceptor/RequestInterceptor.java Просмотреть файл

@@ -46,7 +46,8 @@ public class RequestInterceptor extends HandlerInterceptorAdapter {
if(url.contains("pvlog") if(url.contains("pvlog")
|| url.contains("awsFileUpload") || url.contains("awsFileUpload")
|| url.contains("cimgUpload") || url.contains("cimgUpload")
|| url.contains("ueditor/exec")) {
|| url.contains("ueditor/exec")
|| url.contains("/wxCUserBasicInfo/importTemplate")) {
// pvlog不检查幂等 // pvlog不检查幂等
// awsFileUpload不检查幂等 // awsFileUpload不检查幂等
// ueditor 不检查幂等 // ueditor 不检查幂等


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/vo/CUserBaseInfoT.java Просмотреть файл

@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.annotation.Excel;


import javax.persistence.Transient; import javax.persistence.Transient;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable; import java.io.Serializable;


public class CUserBaseInfoT implements Serializable { public class CUserBaseInfoT implements Serializable {
@@ -19,6 +20,7 @@ public class CUserBaseInfoT implements Serializable {
@Excel(name="手机号",width = 20,orderNum = "3") @Excel(name="手机号",width = 20,orderNum = "3")
@io.swagger.annotations.ApiModelProperty(value="微信用户绑定的手机号",name="phone") @io.swagger.annotations.ApiModelProperty(value="微信用户绑定的手机号",name="phone")
@NotNull @NotNull
@Pattern(regexp = "1[34578]\\d{9}", message = "手机号不正确")
private String phone; private String phone;
/**用户昵称**/ /**用户昵称**/
@Excel(name="微信昵称",width = 20,orderNum = "4") @Excel(name="微信昵称",width = 20,orderNum = "4")


+ 5
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java Просмотреть файл

@@ -514,12 +514,13 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService {
final IdWorker idWorker = IdWorker.get(); final IdWorker idWorker = IdWorker.get();


ImportParams params = new ImportParams(); ImportParams params = new ImportParams();
IExcelDataHandler<CUserBaseInfoT> handler = new UserExcelHandler();
handler.setNeedHandlerFields(new String[]{"姓名", "性别", "手机号", "微信昵称", "学历", "生日", "地址", "上次活跃时间", "注册时间", "标签", "成长值"});// 注意这里对应的是excel的列名。也就是对象上指定的列名。
params.setDataHandler(handler);
//IExcelDataHandler<CUserBaseInfoT> handler = new UserExcelHandler();
//handler.setNeedHandlerFields(new String[]{"姓名", "性别", "手机号", "微信昵称", "学历", "生日", "地址", "上次活跃时间", "注册时间", "标签", "成长值"});// 注意这里对应的是excel的列名。也就是对象上指定的列名。
//params.setDataHandler(handler);
//params.setVerifyHandler(); //params.setVerifyHandler();
// 需要验证 // 需要验证
params.setNeedVerfiy(true);
params.setImportFields(new String[]{"姓名", "性别", "手机号", "微信昵称", "学历", "生日", "地址", "上次活跃时间", "注册时间", "标签", "成长值"});
params.setNeedVerify(true);


try { try {




+ 1
- 8
pom.xml Просмотреть файл

@@ -260,14 +260,7 @@
<dependency> <dependency>
<groupId>cn.afterturn</groupId> <groupId>cn.afterturn</groupId>
<artifactId>easypoi-spring-boot-starter</artifactId> <artifactId>easypoi-spring-boot-starter</artifactId>
<version>3.3.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.15</version>
<version>4.0.0</version>
</dependency> </dependency>


<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp --> <!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->


Загрузка…
Отмена
Сохранить