创建导入用户历史数据类
This commit is contained in:
parent
a0cf596da0
commit
82fc38af08
|
|
@ -79,6 +79,11 @@
|
||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>easyexcel</artifactId>
|
||||||
|
<version>2.2.6</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.ruoyi.business.controller;
|
||||||
|
|
||||||
|
import com.alibaba.excel.EasyExcel;
|
||||||
|
import com.alibaba.excel.ExcelReader;
|
||||||
|
import com.ruoyi.business.sync.UserData;
|
||||||
|
import com.ruoyi.business.sync.UserDataListener;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/data")
|
||||||
|
public class SyncDataController extends BaseController {
|
||||||
|
|
||||||
|
@PostMapping("/user")
|
||||||
|
public AjaxResult user(@RequestParam("file") MultipartFile file) {
|
||||||
|
ExcelReader reader = null;
|
||||||
|
try {
|
||||||
|
reader = EasyExcel.read(file.getInputStream(), UserData.class, new UserDataListener()).build();
|
||||||
|
reader.readAll();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
assert reader != null;
|
||||||
|
reader.finish();
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,185 @@
|
||||||
|
package com.ruoyi.business.sync;
|
||||||
|
|
||||||
|
public class UserData {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String userId;
|
||||||
|
private String name;
|
||||||
|
private String userTelephone;
|
||||||
|
private String referrer;
|
||||||
|
private String referrerTelephone;
|
||||||
|
private String password;
|
||||||
|
private String userType;
|
||||||
|
private String tourismPorints;
|
||||||
|
private String isAdmin;
|
||||||
|
private String enable;
|
||||||
|
private String isHold;
|
||||||
|
private String addtim;
|
||||||
|
private String exterd1;
|
||||||
|
private String exterd2;
|
||||||
|
private String exterd3;
|
||||||
|
private String pecialItemPorints;
|
||||||
|
private String porintsSurplus;
|
||||||
|
private String treamPorints;
|
||||||
|
private String fieldsPorint;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserTelephone() {
|
||||||
|
return userTelephone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserTelephone(String userTelephone) {
|
||||||
|
this.userTelephone = userTelephone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReferrer() {
|
||||||
|
return referrer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReferrer(String referrer) {
|
||||||
|
this.referrer = referrer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReferrerTelephone() {
|
||||||
|
return referrerTelephone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReferrerTelephone(String referrerTelephone) {
|
||||||
|
this.referrerTelephone = referrerTelephone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserType() {
|
||||||
|
return userType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserType(String userType) {
|
||||||
|
this.userType = userType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTourismPorints() {
|
||||||
|
return tourismPorints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTourismPorints(String tourismPorints) {
|
||||||
|
this.tourismPorints = tourismPorints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsAdmin() {
|
||||||
|
return isAdmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsAdmin(String isAdmin) {
|
||||||
|
this.isAdmin = isAdmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnable() {
|
||||||
|
return enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnable(String enable) {
|
||||||
|
this.enable = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsHold() {
|
||||||
|
return isHold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsHold(String isHold) {
|
||||||
|
this.isHold = isHold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtim() {
|
||||||
|
return addtim;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddtim(String addtim) {
|
||||||
|
this.addtim = addtim;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExterd1() {
|
||||||
|
return exterd1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExterd1(String exterd1) {
|
||||||
|
this.exterd1 = exterd1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExterd2() {
|
||||||
|
return exterd2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExterd2(String exterd2) {
|
||||||
|
this.exterd2 = exterd2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExterd3() {
|
||||||
|
return exterd3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExterd3(String exterd3) {
|
||||||
|
this.exterd3 = exterd3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPecialItemPorints() {
|
||||||
|
return pecialItemPorints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPecialItemPorints(String pecialItemPorints) {
|
||||||
|
this.pecialItemPorints = pecialItemPorints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPorintsSurplus() {
|
||||||
|
return porintsSurplus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPorintsSurplus(String porintsSurplus) {
|
||||||
|
this.porintsSurplus = porintsSurplus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTreamPorints() {
|
||||||
|
return treamPorints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTreamPorints(String treamPorints) {
|
||||||
|
this.treamPorints = treamPorints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFieldsPorint() {
|
||||||
|
return fieldsPorint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFieldsPorint(String fieldsPorint) {
|
||||||
|
this.fieldsPorint = fieldsPorint;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.ruoyi.business.sync;
|
||||||
|
|
||||||
|
import com.alibaba.excel.context.AnalysisContext;
|
||||||
|
import com.alibaba.excel.event.AnalysisEventListener;
|
||||||
|
|
||||||
|
public class UserDataListener extends AnalysisEventListener<UserData> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invoke(UserData userData, AnalysisContext analysisContext) {
|
||||||
|
System.out.println(userData);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -285,6 +285,8 @@ public class ShiroConfig
|
||||||
filterChainDefinitionMap.put("/login", "anon,captchaValidate");
|
filterChainDefinitionMap.put("/login", "anon,captchaValidate");
|
||||||
// 注册相关
|
// 注册相关
|
||||||
filterChainDefinitionMap.put("/register", "anon,captchaValidate");
|
filterChainDefinitionMap.put("/register", "anon,captchaValidate");
|
||||||
|
// 前端所有接口放行
|
||||||
|
filterChainDefinitionMap.put("/api/**", "anon");
|
||||||
// 系统权限列表
|
// 系统权限列表
|
||||||
// filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll());
|
// filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll());
|
||||||
|
|
||||||
|
|
|
||||||
27
sql/biz.sql
27
sql/biz.sql
|
|
@ -58,6 +58,7 @@ CREATE TABLE `biz_account_detail` (
|
||||||
`type_detail` tinyint(4) NOT NULL COMMENT '变动详情.1:充值;2:提现;3:转账;4:冲正;5:支付',
|
`type_detail` tinyint(4) NOT NULL COMMENT '变动详情.1:充值;2:提现;3:转账;4:冲正;5:支付',
|
||||||
`before_amount` decimal(12,2) NOT NULL DEFAULT 0.0 COMMENT '账户变更前金额',
|
`before_amount` decimal(12,2) NOT NULL DEFAULT 0.0 COMMENT '账户变更前金额',
|
||||||
`after_amount` decimal(12,2) NOT NULL DEFAULT 0.0 COMMENT '账户变更后金额',
|
`after_amount` decimal(12,2) NOT NULL DEFAULT 0.0 COMMENT '账户变更后金额',
|
||||||
|
`change_desc` varchar(64) DEFAULT '' COMMENT '交易备注:充值【一级推荐奖励】,充值【二级推荐奖励】,充值【团队奖励】,充值【专项划拨】,转账【专项划拨】',
|
||||||
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
|
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
|
||||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
|
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
|
||||||
|
|
@ -66,10 +67,34 @@ CREATE TABLE `biz_account_detail` (
|
||||||
) COMMENT='会员账户明细表';
|
) COMMENT='会员账户明细表';
|
||||||
|
|
||||||
-- 个人团队奖励明细表
|
-- 个人团队奖励明细表
|
||||||
|
CREATE TABLE `biz_team_reward` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '团队奖励ID',
|
||||||
|
`member_id` bigint(20) NOT NULL COMMENT '会员ID',
|
||||||
|
`reward_member_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '团队用户ID',
|
||||||
|
`reward_product_count` int(11) NOT NULL DEFAULT 0 COMMENT '用户购买产品数量',
|
||||||
|
`reward_amount` decimal(12,2) NOT NULL DEFAULT 0.0 COMMENT '奖励的福豆数量',
|
||||||
|
`product_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '产品ID',
|
||||||
|
`reward_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '奖励类型:0:一级直推;1:二级推荐;2:平级;',
|
||||||
|
`reward_date` datetime DEFAULT NULL COMMENT '奖励时间',
|
||||||
|
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
|
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) COMMENT='团队奖励明细表';
|
||||||
-- 三方回调表
|
-- 三方回调表
|
||||||
|
|
||||||
-- 兑现申请记录表
|
-- 兑现申请记录表
|
||||||
|
CREATE TABLE `biz_cash_info` (
|
||||||
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '兑现申请ID',
|
||||||
|
`member_id` bigint(20) NOT NULL COMMENT '会员ID',
|
||||||
|
`account_id` bigint(20) NOT NULL COMMENT '会员账户ID',
|
||||||
|
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
|
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) COMMENT='兑现申请记录表';
|
||||||
|
|
||||||
CREATE TABLE `biz_product_type` (
|
CREATE TABLE `biz_product_type` (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '产品分类ID',
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '产品分类ID',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue