流水记录和分账记录功能

This commit is contained in:
wanggeng 2024-08-08 10:29:21 +08:00
parent 58663cb26c
commit 7ddab1ae68
21 changed files with 729 additions and 181 deletions

9
doc/readme.md Normal file
View File

@ -0,0 +1,9 @@
# 邀请码
说明
1. 一个账号可以有两个邀请码,一个邀请码用于其他账号关联,另一个邀请码是关联其他账号。
2. 邀请码的获取有两种方式:
1. 由管理员直接生成
2. 自己发起申请,管理员审核通过后生成
3. 生成邀请码时,必须设置金额和邀请码返利比例

View File

@ -6,6 +6,7 @@ import cn.com.tenlion.operator.service.user.expand.UserExpandServiceImpl;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -35,4 +36,10 @@ public class UserExpandController {
return userExpandService.get(userId);
}
@GetMapping("generate-ic")
public SuccessResultData<String> generateIc() {
String ic = userExpandService.generateIc();
return new SuccessResultData<>(ic);
}
}

View File

@ -54,7 +54,7 @@ public class AccountItemResourceController extends DefaultBaseController {
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("pay-in-shop")
@CheckRequestBodyAnnotation
public SuccessResult payInShop(@RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
public synchronized SuccessResult payInShop(@RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
String code = EncryptUtil.decode(accountItemOrderVO.getCode());
JSONObject jsonObject = JSONObject.parseObject(code);
String time = jsonObject.getString("time");
@ -63,11 +63,11 @@ public class AccountItemResourceController extends DefaultBaseController {
String orderId = jsonObject.getString("orderId");
Date dateTime = sdf.parse(time);
long diffInMillis = Math.abs(System.currentTimeMillis() - dateTime.getTime());
int secondsDiff = (int)(diffInMillis / 1000);
int secondsDiff = (int) (diffInMillis / 1000);
if (secondsDiff > 30) {
throw new SaveException("鉴权失败");
}
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
throw new SaveException("鉴权失败");
}
AccountItemVO accountItemVO = new AccountItemVO();
@ -78,18 +78,18 @@ public class AccountItemResourceController extends DefaultBaseController {
accountItemVO.setDescription(accountItemOrderVO.getDescription());
accountItemVO.setOrderId(accountItemOrderVO.getOrderId());
accountItemVO.setOrderType("shop");
accountItemService.saveShopReturnId( accountItemVO);
accountItemService.saveShopReturnId(accountItemVO);
return new SuccessResult();
}
@ApiOperation(value = "代理商订单完成", notes = "代理商订单完成接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("pay-in-agent")
@CheckRequestBodyAnnotation
public SuccessResult payInAgent(@RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
public synchronized SuccessResult payInAgent(@RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
String code = EncryptUtil.decode(accountItemOrderVO.getCode());
JSONObject jsonObject = JSONObject.parseObject(code);
String time = jsonObject.getString("time");
@ -98,11 +98,11 @@ public class AccountItemResourceController extends DefaultBaseController {
String orderId = jsonObject.getString("orderId");
Date dateTime = sdf.parse(time);
long diffInMillis = Math.abs(System.currentTimeMillis() - dateTime.getTime());
int secondsDiff = (int)(diffInMillis / 1000);
int secondsDiff = (int) (diffInMillis / 1000);
if (secondsDiff > 30) {
throw new SaveException("鉴权失败");
}
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
throw new SaveException("鉴权失败");
}
AccountItemVO accountItemVO = new AccountItemVO();
@ -119,12 +119,12 @@ public class AccountItemResourceController extends DefaultBaseController {
@ApiOperation(value = "入账/订单", notes = "入账/订单接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("pay-in/{type}")
@CheckRequestBodyAnnotation
public SuccessResult payIn(@PathVariable("type") String type, @RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
public synchronized SuccessResult payIn(@PathVariable("type") String type, @RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
String code = EncryptUtil.decode(accountItemOrderVO.getCode());
JSONObject jsonObject = JSONObject.parseObject(code);
String time = jsonObject.getString("time");
@ -133,11 +133,11 @@ public class AccountItemResourceController extends DefaultBaseController {
String orderId = jsonObject.getString("orderId");
Date dateTime = sdf.parse(time);
long diffInMillis = Math.abs(System.currentTimeMillis() - dateTime.getTime());
int secondsDiff = (int)(diffInMillis / 1000);
int secondsDiff = (int) (diffInMillis / 1000);
if (secondsDiff > 30) {
throw new SaveException("鉴权失败");
}
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
throw new SaveException("鉴权失败");
}
AccountItemVO accountItemVO = new AccountItemVO();
@ -156,12 +156,12 @@ public class AccountItemResourceController extends DefaultBaseController {
@ApiOperation(value = "出账/订单", notes = "出账/订单接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("pay-out/{type}")
@CheckRequestBodyAnnotation
public SuccessResult payOut(@PathVariable("type") String type, @RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
public synchronized SuccessResult payOut(@PathVariable("type") String type, @RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
String code = EncryptUtil.decode(accountItemOrderVO.getCode());
JSONObject jsonObject = JSONObject.parseObject(code);
String time = jsonObject.getString("time");
@ -170,11 +170,11 @@ public class AccountItemResourceController extends DefaultBaseController {
String orderId = jsonObject.getString("orderId");
Date dateTime = sdf.parse(time);
long diffInMillis = Math.abs(System.currentTimeMillis() - dateTime.getTime());
int secondsDiff = (int)(diffInMillis / 1000);
int secondsDiff = (int) (diffInMillis / 1000);
if (secondsDiff > 30) {
throw new SaveException("鉴权失败");
}
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
throw new SaveException("鉴权失败");
}
AccountItemVO accountItemVO = new AccountItemVO();
@ -192,7 +192,7 @@ public class AccountItemResourceController extends DefaultBaseController {
@ApiOperation(value = "账户流水列表", notes = "账户流水列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list/{userId}")
@ -210,15 +210,12 @@ public class AccountItemResourceController extends DefaultBaseController {
@ApiImplicitParam(name = "rows", value = "每页数量", paramType = "query")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpage/{userId}/{page}/{rows}")
public SuccessResultList<List<AccountItemBO>> listPage(@PathVariable("userId") String userId, @PathVariable("page") Integer page, @PathVariable("rows") Integer rows) {
ListPage pages = new ListPage();
pages.setPage(page);
pages.setRows(rows);
@GetMapping("listpage/{userId}")
public SuccessResultList<List<AccountItemDTO>> listPage(@PathVariable("userId") String userId, ListPage page) {
Map<String, Object> params = requestParams();
params.put("accountId", userId);
pages.setParams(params);
return accountItemService.listPageBO(pages);
page.setParams(params);
return accountItemService.listPage(page);
}
}

View File

@ -0,0 +1,42 @@
package cn.com.tenlion.operator.controller.resource.user.expand;
import cn.com.tenlion.operator.pojo.vos.user.expand.ic.UserExpandRelationIcVO;
import cn.com.tenlion.operator.service.user.expand.UserExpandServiceImpl;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* ClassName: UserExpandResourceController
* Description:
* Author: wanggeng
* Date: 2024/8/6 下午3:28
* Version: 1.0
*/
@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "用户拓展接口")
@RestController
@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/user/expand")
public class UserExpandResourceController extends DefaultBaseController {
@Autowired
private UserExpandServiceImpl userExpandService;
@ApiOperation(value = "更新关联邀请码", notes = "更新关联邀请码接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-relation-ic/user-id/{userId}")
@CheckRequestBodyAnnotation
public synchronized SuccessResult updateRelationIcByUserId(@PathVariable("userId") String userId,
@RequestBody UserExpandRelationIcVO userExpandIcVO) {
userExpandService.updateRelationIcByUserId(userId, userExpandIcVO);
return new SuccessResult();
}
}

View File

@ -35,9 +35,8 @@ public class AccountItemRouteController extends DefaultBaseController {
}
@GetMapping("list")
public ModelAndView list(String accountId) {
public ModelAndView list() {
ModelAndView mv = new ModelAndView("accountitem/list");
mv.addObject("accountId", accountId);
return mv;
}

View File

@ -18,7 +18,7 @@ import org.springframework.web.servlet.ModelAndView;
public class UserExpandRouteController {
@GetMapping("save-or-update")
public ModelAndView update() {
public ModelAndView saveOrUpdate() {
ModelAndView modelAndView = new ModelAndView("user/expand/save-or-update");
return modelAndView;
}

View File

@ -4,6 +4,7 @@ import cn.com.tenlion.operator.pojo.dtos.user.expand.UserExpandDTO;
import cn.com.tenlion.operator.pojo.pos.user.expand.UserExpandPO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
@ -20,8 +21,16 @@ public interface IUserExpandDao {
void update(Map<String, Object> params);
void updateRelationIc(Map<String, Object> params);
void updateRelationRebateRatio(Map<String, Object> params);
UserExpandDTO get(Map<String, Object> params);
UserExpandPO getPO(Map<String, Object> params);
Integer countIc(String string);
List<String> listUserIdByRelationUserId(String userId);
}

View File

@ -0,0 +1,24 @@
package cn.com.tenlion.operator.enums;
/**
* ClassName: IcWayToGetEnum
* Description:
* Author: wanggeng
* Date: 2024/8/2 下午5:10
* Version: 1.0
*/
public enum IcWayToGetEnum {
ASSIGN("分配"),
APPLY("申请");
private final String text;
IcWayToGetEnum(String text) {
this.text = text;
}
public String getText() {
return text == null ? "" : text.trim();
}
}

View File

@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: AccountItemDTO
* @Description: 客户账户流水
* @Author: CodeFactory
@ -20,6 +19,8 @@ public class AccountItemDTO {
private String accountId;
@ApiModelProperty(name = "accountBeforeMoney", value = "动账前余额")
private Integer accountBeforeMoney;
@ApiModelProperty(name = "accountBeforeMoneyDouble", value = "动账前余额")
private Double accountBeforeMoneyDouble;
@ApiModelProperty(name = "accountAfterMoney", value = "动账后余额")
private Integer accountAfterMoney;
@ApiModelProperty(name = "accountAfterMoney", value = "动账后余额")
@ -45,30 +46,6 @@ public class AccountItemDTO {
@ApiModelProperty(name = "gmtCreate", value = "交易时间")
private String gmtCreate;
public String getOrderType() {
return orderType == null ? "" : orderType.trim();
}
public void setOrderType(String orderType) {
this.orderType = orderType;
}
public Double getAccountAfterMoneyDouble() {
return accountAfterMoneyDouble == null ? 0 : accountAfterMoneyDouble;
}
public void setAccountAfterMoneyDouble(Double accountAfterMoneyDouble) {
this.accountAfterMoneyDouble = accountAfterMoneyDouble;
}
public Double getAccountMoneyDouble() {
return accountMoneyDouble == null ? 0 : accountMoneyDouble;
}
public void setAccountMoneyDouble(Double accountMoneyDouble) {
this.accountMoneyDouble = accountMoneyDouble;
}
public String getAccountItemId() {
return accountItemId == null ? "" : accountItemId.trim();
}
@ -93,6 +70,14 @@ public class AccountItemDTO {
this.accountBeforeMoney = accountBeforeMoney;
}
public Double getAccountBeforeMoneyDouble() {
return accountBeforeMoneyDouble == null ? 0 : accountBeforeMoneyDouble;
}
public void setAccountBeforeMoneyDouble(Double accountBeforeMoneyDouble) {
this.accountBeforeMoneyDouble = accountBeforeMoneyDouble;
}
public Integer getAccountAfterMoney() {
return accountAfterMoney == null ? 0 : accountAfterMoney;
}
@ -101,6 +86,14 @@ public class AccountItemDTO {
this.accountAfterMoney = accountAfterMoney;
}
public Double getAccountAfterMoneyDouble() {
return accountAfterMoneyDouble == null ? 0 : accountAfterMoneyDouble;
}
public void setAccountAfterMoneyDouble(Double accountAfterMoneyDouble) {
this.accountAfterMoneyDouble = accountAfterMoneyDouble;
}
public Integer getAccountMoney() {
return accountMoney == null ? 0 : accountMoney;
}
@ -109,6 +102,14 @@ public class AccountItemDTO {
this.accountMoney = accountMoney;
}
public Double getAccountMoneyDouble() {
return accountMoneyDouble == null ? 0 : accountMoneyDouble;
}
public void setAccountMoneyDouble(Double accountMoneyDouble) {
this.accountMoneyDouble = accountMoneyDouble;
}
public Integer getMode() {
return mode == null ? 0 : mode;
}
@ -141,6 +142,14 @@ public class AccountItemDTO {
this.orderId = orderId;
}
public String getOrderType() {
return orderType == null ? "" : orderType.trim();
}
public void setOrderType(String orderType) {
this.orderType = orderType;
}
public String getCheckStatus() {
return checkStatus == null ? "" : checkStatus.trim();
}
@ -164,6 +173,4 @@ public class AccountItemDTO {
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
}

View File

@ -25,6 +25,15 @@ public class UserExpandDTO extends UserDTO {
private Integer postpaidCount;
private Integer freeProjCount;
private Integer correctionCount;
private String ic;
private Integer icRebateRatio;
private String icWayToGet;
private String icGetTime;
private String icAssignUserId;
private String relationIc;
private Integer relationIcRebateRatio;
private String relationIcTime;
private String relationIcUserId;
public Long getPriceAdditionalPkg() {
return priceAdditionalPkg == null ? 0 : priceAdditionalPkg;
@ -121,4 +130,76 @@ public class UserExpandDTO extends UserDTO {
public void setCorrectionCount(Integer correctionCount) {
this.correctionCount = correctionCount;
}
public String getIc() {
return ic == null ? "" : ic.trim();
}
public void setIc(String ic) {
this.ic = ic;
}
public Integer getIcRebateRatio() {
return icRebateRatio == null ? 0 : icRebateRatio;
}
public void setIcRebateRatio(Integer icRebateRatio) {
this.icRebateRatio = icRebateRatio;
}
public String getIcWayToGet() {
return icWayToGet == null ? "" : icWayToGet.trim();
}
public void setIcWayToGet(String icWayToGet) {
this.icWayToGet = icWayToGet;
}
public String getIcGetTime() {
return icGetTime == null ? "" : icGetTime.trim();
}
public void setIcGetTime(String icGetTime) {
this.icGetTime = icGetTime;
}
public String getIcAssignUserId() {
return icAssignUserId == null ? "" : icAssignUserId.trim();
}
public void setIcAssignUserId(String icAssignUserId) {
this.icAssignUserId = icAssignUserId;
}
public String getRelationIc() {
return relationIc == null ? "" : relationIc.trim();
}
public void setRelationIc(String relationIc) {
this.relationIc = relationIc;
}
public Integer getRelationIcRebateRatio() {
return relationIcRebateRatio == null ? 0 : relationIcRebateRatio;
}
public void setRelationIcRebateRatio(Integer relationIcRebateRatio) {
this.relationIcRebateRatio = relationIcRebateRatio;
}
public String getRelationIcTime() {
return relationIcTime == null ? "" : relationIcTime.trim();
}
public void setRelationIcTime(String relationIcTime) {
this.relationIcTime = relationIcTime;
}
public String getRelationIcUserId() {
return relationIcUserId == null ? "" : relationIcUserId.trim();
}
public void setRelationIcUserId(String relationIcUserId) {
this.relationIcUserId = relationIcUserId;
}
}

View File

@ -29,7 +29,7 @@ public class UserInfoDTO {
private String contactPhone;
@ApiModelProperty(name = "contactName", value = "联系人姓名")
private String contactName;
@ApiModelProperty(name = "contactName", value = "英文名称")
@ApiModelProperty(name = "userInfoNameEn", value = "英文名称")
private String userInfoNameEn;
@ApiModelProperty(name = "userUsername", value = "用户名")
private String userUsername;

View File

@ -1,5 +1,7 @@
package cn.com.tenlion.operator.pojo.pos.user.expand;
import cn.com.tenlion.operator.enums.IcWayToGetEnum;
/**
* @ClassName: UserExpandDTO
* @Description:
@ -22,6 +24,15 @@ public class UserExpandPO {
private Integer postpaidCount;
private Integer freeProjCount;
private Integer correctionCount;
private String ic;
private Integer icRebateRatio;
private IcWayToGetEnum icWayToGet;
private String icGetTime;
private String icAssignUserId;
private String relationIc;
private Integer relationIcRebateRatio;
private String relationIcTime;
private String relationIcUserId;
public String getUserId() {
return userId == null ? "" : userId.trim();
@ -126,4 +137,76 @@ public class UserExpandPO {
public void setCorrectionCount(Integer correctionCount) {
this.correctionCount = correctionCount;
}
public String getIc() {
return ic == null ? "" : ic.trim();
}
public void setIc(String ic) {
this.ic = ic;
}
public Integer getIcRebateRatio() {
return icRebateRatio == null ? 0 : icRebateRatio;
}
public void setIcRebateRatio(Integer icRebateRatio) {
this.icRebateRatio = icRebateRatio;
}
public IcWayToGetEnum getIcWayToGet() {
return icWayToGet;
}
public void setIcWayToGet(IcWayToGetEnum icWayToGet) {
this.icWayToGet = icWayToGet;
}
public String getIcGetTime() {
return icGetTime == null ? "" : icGetTime.trim();
}
public void setIcGetTime(String icGetTime) {
this.icGetTime = icGetTime;
}
public String getIcAssignUserId() {
return icAssignUserId == null ? "" : icAssignUserId.trim();
}
public void setIcAssignUserId(String icAssignUserId) {
this.icAssignUserId = icAssignUserId;
}
public String getRelationIc() {
return relationIc == null ? "" : relationIc.trim();
}
public void setRelationIc(String relationIc) {
this.relationIc = relationIc;
}
public Integer getRelationIcRebateRatio() {
return relationIcRebateRatio == null ? 0 : relationIcRebateRatio;
}
public void setRelationIcRebateRatio(Integer relationIcRebateRatio) {
this.relationIcRebateRatio = relationIcRebateRatio;
}
public String getRelationIcTime() {
return relationIcTime == null ? "" : relationIcTime.trim();
}
public void setRelationIcTime(String relationIcTime) {
this.relationIcTime = relationIcTime;
}
public String getRelationIcUserId() {
return relationIcUserId == null ? "" : relationIcUserId.trim();
}
public void setRelationIcUserId(String relationIcUserId) {
this.relationIcUserId = relationIcUserId;
}
}

View File

@ -34,6 +34,8 @@ public class UserExpandVO {
private Integer freeProjCount;
@CheckNumberAnnotation(name = "资料补正次数", min = 0, max = 10)
private Integer correctionCount;
private String ic;
private Integer icRebateRatio;
public Double getPriceAdditionalPkg() {
return priceAdditionalPkg == null ? 0 : priceAdditionalPkg;
@ -130,4 +132,20 @@ public class UserExpandVO {
public void setCorrectionCount(Integer correctionCount) {
this.correctionCount = correctionCount;
}
public String getIc() {
return ic == null ? "" : ic.trim();
}
public void setIc(String ic) {
this.ic = ic;
}
public Integer getIcRebateRatio() {
return icRebateRatio == null ? 0 : icRebateRatio;
}
public void setIcRebateRatio(Integer icRebateRatio) {
this.icRebateRatio = icRebateRatio;
}
}

View File

@ -0,0 +1,25 @@
package cn.com.tenlion.operator.pojo.vos.user.expand.ic;
import ink.wgink.annotation.CheckEmptyAnnotation;
/**
* ClassName: UserExpandIcVO
* Description:
* Author: wanggeng
* Date: 2024/8/6 下午3:23
* Version: 1.0
*/
public class UserExpandRelationIcVO {
@CheckEmptyAnnotation(name = "关联邀请码")
private String relationIc;
public String getRelationIc() {
return relationIc == null ? "" : relationIc.trim();
}
public void setRelationIc(String relationIc) {
this.relationIc = relationIc;
}
}

View File

@ -223,6 +223,7 @@ public class AccountItemServiceImpl extends DefaultBaseService implements IAccou
for (AccountItemDTO dto : list) {
dto.setAccountMoneyDouble(PayUtil.buiderMoney(dto.getAccountMoney()));
dto.setAccountAfterMoneyDouble(PayUtil.buiderMoney(dto.getAccountAfterMoney()));
dto.setAccountBeforeMoneyDouble(PayUtil.buiderMoney(dto.getAccountBeforeMoney()));
}
return list;
}

View File

@ -1,9 +1,11 @@
package cn.com.tenlion.operator.service.user.expand;
import cn.com.tenlion.operator.dao.user.expand.IUserExpandDao;
import cn.com.tenlion.operator.enums.IcWayToGetEnum;
import cn.com.tenlion.operator.pojo.dtos.user.expand.UserExpandDTO;
import cn.com.tenlion.operator.pojo.pos.user.expand.UserExpandPO;
import cn.com.tenlion.operator.pojo.vos.user.expand.UserExpandVO;
import cn.com.tenlion.operator.pojo.vos.user.expand.ic.UserExpandRelationIcVO;
import com.alibaba.fastjson.JSON;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.SearchException;
@ -12,7 +14,9 @@ import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.dtos.user.UserDTO;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.user.service.IUserService;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
@ -21,6 +25,8 @@ import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.stream.Collectors;
/**
* @ClassName: UserExpandServiceImpl
@ -135,9 +141,6 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
}
public void saveOrUpdate(String userId, UserExpandVO userExpandVO) {
Map<String, Object> params = getHashMap(2);
params.put("userId", userId);
UserExpandDTO userExpandDTO = userExpandDao.get(params);
userExpandVO.setPriceAdditionalPkg(userExpandVO.getPriceAdditionalPkg() * 100);
userExpandVO.setPriceAdditionalVideoDemo(userExpandVO.getPriceAdditionalVideoDemo() * 100);
userExpandVO.setPriceAdditionalUrgent(userExpandVO.getPriceAdditionalUrgent() * 100);
@ -145,13 +148,135 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
userExpandVO.setPriceMaterial(userExpandVO.getPriceMaterial() * 100);
userExpandVO.setPriceMaterialAgent(userExpandVO.getPriceMaterialAgent() * 100);
userExpandVO.setPriceMaterialAgentUrgent(userExpandVO.getPriceMaterialAgentUrgent() * 100);
Map<String, Object> params = getHashMap(2);
params.put("userId", userId);
params = HashMapUtil.beanToMap(userExpandVO);
params.put("userId", userId);
if (StringUtils.isNotBlank(userExpandVO.getIc())) {
params.put("icWayToGet", IcWayToGetEnum.ASSIGN);
params.put("icGetTime", DateUtil.getTime());
}
UserExpandDTO userExpandDTO = userExpandDao.get(params);
if (userExpandDTO == null) {
if (StringUtils.isNotBlank(userExpandVO.getIc()) && countIc(userExpandVO.getIc()) > 0) {
throw new SearchException("邀请码已存在,请重新生成");
}
userExpandDao.save(params);
} else {
if (StringUtils.isNotBlank(userExpandDTO.getRelationIc()) &&
StringUtils.equals("ACTIVE", userExpandVO.getPostpaid())) {
throw new SearchException("已经绑定邀请码的用户不能设置为后付费用户");
}
if (StringUtils.isNotBlank(userExpandDTO.getIc())) {
params.remove("ic");
params.remove("icGetTime");
params.remove("icAssignUserId");
} else {
if (StringUtils.isNotBlank(userExpandVO.getIc()) && countIc(userExpandVO.getIc()) > 0) {
throw new SearchException("邀请码已存在,请重新生成");
}
}
userExpandDao.update(params);
}
updateRedis(userId);
updateBatchRelationRebateRatio(userId, userExpandDTO == null ? 0 : userExpandDTO.getIcRebateRatio(), userExpandVO.getIcRebateRatio());
}
/**
* 批量更新返利比率
*
* @param userId
*/
private void updateBatchRelationRebateRatio(String userId, Integer oldRebateRatio, Integer newRebateRatio) {
if (oldRebateRatio != null && oldRebateRatio.equals(newRebateRatio)) {
return;
}
Map<String, Object> params = getHashMap(4);
params.put("relationIcUserId", userId);
params.put("relationIcRebateRatio", newRebateRatio);
userExpandDao.updateRelationRebateRatio(params);
LOG.debug("批量更新redis");
List<String> relationUserIds = userExpandDao.listUserIdByRelationUserId(userId).stream().map(id -> "user:expand:" + id).collect(Collectors.toList());
if (relationUserIds.isEmpty()) {
LOG.debug("没有关联邀请码的用户");
return;
}
List<String> redisJsons = redisTemplate.opsForValue().multiGet(relationUserIds);
if (redisJsons == null) {
LOG.debug("redis中不存在需要更新返利比率的的用户");
return;
}
redisJsons.forEach(json -> {
UserExpandPO userExpandPO = JSON.parseObject(json, UserExpandPO.class);
userExpandPO.setRelationIcRebateRatio(newRebateRatio);
updateRedis(userExpandPO);
});
}
public String generateIc() {
StringBuilder icSB = new StringBuilder();
Random random = new Random(System.currentTimeMillis());
while (icSB.length() < 6) {
int type = random.nextInt(3);
if (type == 0) {
int num = random.nextInt(10);
icSB.append(num);
} else if (type == 1) {
int letter = 65 + random.nextInt(26);
icSB.append((char) letter);
} else {
int letter = 97 + random.nextInt(26);
icSB.append((char) letter);
}
}
return icSB.toString();
}
/**
* 邀请码数量
*
* @param ic
* @return
*/
private Integer countIc(String ic) {
Integer count = userExpandDao.countIc(ic);
return count == null ? 0 : count;
}
public void updateRelationIcByUserId(String userId, UserExpandRelationIcVO userExpandIcVO) {
UserExpandPO selfPO = getPO(userId);
if (selfPO == null) {
throw new SearchException("用户不存在");
}
if (StringUtils.equals("ACTIVE", selfPO.getPostpaid())) {
throw new SearchException("后付费用户不能绑定邀请码");
}
if (StringUtils.isNotBlank(selfPO.getRelationIc())) {
throw new SearchException("已经绑定过邀请码");
}
UserExpandPO icUserPO = getPOByIc(userExpandIcVO.getRelationIc());
if (icUserPO == null) {
throw new SearchException("邀请码不正确");
}
if (StringUtils.equals(icUserPO.getUserId(), userId)) {
throw new SearchException("不能绑定自己的邀请码");
}
Map<String, Object> params = getHashMap(4);
params.put("priceAll", icUserPO.getPriceAll());
params.put("priceMaterial", icUserPO.getPriceMaterial());
params.put("relationIc", userExpandIcVO.getRelationIc());
params.put("relationIcRebateRatio", icUserPO.getIcRebateRatio());
params.put("relationIcTime", DateUtil.getTime());
params.put("relationIcUserId", icUserPO.getUserId());
params.put("userId", userId);
userExpandDao.updateRelationIc(params);
updateRedis(userId);
}
private UserExpandPO getPOByIc(String ic) {
Map<String, Object> params = getHashMap(2);
params.put("ic", ic);
return userExpandDao.getPO(params);
}
}

View File

@ -16,6 +16,15 @@
<result column="postpaid_count" property="postpaidCount"/>
<result column="free_proj_count" property="freeProjCount"/>
<result column="correction_count" property="correctionCount"/>
<result column="ic" property="ic"/>
<result column="ic_rebate_ratio" property="icRebateRatio"/>
<result column="ic_way_to_get" property="icWayToGet"/>
<result column="ic_get_time" property="icGetTime"/>
<result column="ic_assign_user_id" property="icAssignUserId"/>
<result column="relation_ic" property="relationIc"/>
<result column="relation_ic_rebate_ratio" property="relationIcRebateRatio"/>
<result column="relation_ic_time" property="relationIcTime"/>
<result column="relation_ic_user_id" property="relationIcUserId"/>
</resultMap>
<resultMap id="userExpandPO" type="cn.com.tenlion.operator.pojo.pos.user.expand.UserExpandPO">
@ -32,6 +41,15 @@
<result column="postpaid_count" property="postpaidCount"/>
<result column="free_proj_count" property="freeProjCount"/>
<result column="correction_count" property="correctionCount"/>
<result column="ic" property="ic"/>
<result column="ic_rebate_ratio" property="icRebateRatio"/>
<result column="ic_way_to_get" property="icWayToGet"/>
<result column="ic_get_time" property="icGetTime"/>
<result column="ic_assign_user_id" property="icAssignUserId"/>
<result column="relation_ic" property="relationIc"/>
<result column="relation_ic_rebate_ratio" property="relationIcRebateRatio"/>
<result column="relation_ic_time" property="relationIcTime"/>
<result column="relation_ic_user_id" property="relationIcUserId"/>
</resultMap>
<insert id="save" parameterType="map">
@ -48,7 +66,11 @@
postpaid,
postpaid_count,
free_proj_count,
correction_count
correction_count,
ic,
ic_rebate_ratio,
ic_get_time,
ic_assign_user_id
) VALUES (
#{userId},
#{priceAdditionalPkg},
@ -62,7 +84,11 @@
#{postpaid},
#{postpaidCount},
#{freeProjCount},
#{correctionCount}
#{correctionCount},
#{ic},
#{icRebateRatio},
#{icGetTime},
#{icAssignUserId}
)
</insert>
@ -70,6 +96,18 @@
UPDATE
sys_user_expand
SET
<if test="ic != null and ic != ''">
ic = #{ic},
</if>
<if test="icRebateRatio != null">
ic_rebate_ratio = #{icRebateRatio},
</if>
<if test="icGetTime != null and icGetTime != ''">
ic_get_time = #{icGetTime},
</if>
<if test="icAssignUserId != null and icAssignUserId != ''">
ic_assign_user_id = #{icAssignUserId},
</if>
price_additional_pkg = #{priceAdditionalPkg},
price_additional_video_demo = #{priceAdditionalVideoDemo},
price_additional_urgent = #{priceAdditionalUrgent},
@ -86,6 +124,29 @@
user_id = #{userId}
</update>
<update id="updateRelationIc" parameterType="map">
UPDATE
sys_user_expand
SET
price_all = #{priceAll},
price_material = #{priceMaterial},
relation_ic = #{relationIc},
relation_ic_rebate_ratio = #{relationIcRebateRatio},
relation_ic_time = #{relationIcTime},
relation_ic_user_id = #{relationIcUserId}
WHERE
user_id = #{userId}
</update>
<update id="updateRelationRebateRatio" parameterType="map">
UPDATE
sys_user_expand
SET
relation_ic_rebate_ratio = #{relationIcRebateRatio}
WHERE
relation_ic_user_id = #{relationIcUserId}
</update>
<select id="get" parameterType="map" resultMap="userExpandDTO">
SELECT
price_additional_pkg,
@ -99,7 +160,16 @@
postpaid,
postpaid_count,
free_proj_count,
correction_count
correction_count,
ic,
ic_rebate_ratio,
ic_way_to_get,
ic_get_time,
ic_assign_user_id,
relation_ic,
relation_ic_rebate_ratio,
relation_ic_time,
relation_ic_user_id
FROM
sys_user_expand
WHERE
@ -122,13 +192,43 @@
postpaid,
postpaid_count,
free_proj_count,
correction_count
correction_count,
ic,
ic_rebate_ratio,
ic_way_to_get,
ic_get_time,
ic_assign_user_id,
relation_ic,
relation_ic_rebate_ratio,
relation_ic_time,
relation_ic_user_id
FROM
sys_user_expand
WHERE
<if test="userId != null and userId != ''">
user_id = #{userId}
</if>
<if test="ic != null and ic != ''">
ic = #{ic}
</if>
</select>
<select id="countIc" parameterType="java.lang.String" resultType="java.lang.Integer">
SELECT
COUNT(ic)
FROM
sys_user_expand
WHERE
ic = #{_parameter}
</select>
<select id="listUserIdByRelationUserId" parameterType="java.lang.String" resultType="java.lang.String">
SELECT
user_id
FROM
sys_user_expand
WHERE
relation_ic_user_id = #{_parameter}
</select>
</mapper>

View File

@ -11,14 +11,14 @@
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入描述关键字">
</div>
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
@ -51,7 +51,8 @@
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/accountitem/listpage?accountId=[[${accountId}]]';
var query = top.restAjax.params(window.location.href);
var tableUrl = `api/accountitem/listpage?accountId=${query.accountId}`;
// 初始化表格
function initTable() {
@ -60,7 +61,7 @@
id: 'dataTable',
url: top.restAjax.path(tableUrl, []),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90,
height: $win.height() - 60,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
request: {
@ -69,43 +70,72 @@
},
cols: [
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'type', width: 180, title: '类型', align:'center',
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_NUM}}</span>'},
{field: 'type', width: 100, title: '类型', align:'center', fixed: 'left',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if(rowData == 1) {
return '充值';
return '<span class="layui-badge layui-bg-green">充值</span>';
}else if(rowData == 2) {
return '支出';
return '<span class="layui-badge">支出</span>';
}else if(rowData == 3) {
return '提现';
return '<span class="layui-badge">提现</span>';
}else if(rowData == 4) {
return '系统扣款';
return '<span class="layui-badge">系统扣款</span>';
}else if(rowData == 5) {
return '入账';
return '<span class="layui-badge layui-bg-green">入账</span>';
}
return rowData;
}
},
{field: 'accountMoneyDouble', width: 180, title: '本次金额', align:'center',
{field: 'accountBeforeMoneyDouble', width: 120, title: '交易前金额', align:'center', fixed: 'left',
templet: function(row) {
var rowData = row[this.field];
return "<b>" + rowData + "</b>";
}
},
{field: 'accountMoneyDouble', width: 120, title: '交易金额', align:'center', fixed: 'left',
templet: function(row) {
var rowData = row[this.field];
var mode = row['mode'];
if (mode == 1) {
return "<b style='color:red'>+" + rowData + "</b>";
if (mode === 1) {
return "<b> + " + rowData + "</b>";
}else{
return "<b style='color:green'>-" + rowData + "</b>";
return "<b> - " + rowData + "</b>";
}
}
},
{field: 'accountAfterMoneyDouble', width: 180, title: '本次余额', align:'center',
{field: 'accountAfterMoneyDouble', width: 120, title: '交易后余额', align:'center', fixed: 'left',
templet: function(row) {
var rowData = row[this.field];
return "<b style='color:green'>" + rowData + "</b>";
return "<b>" + rowData + "</b>";
}
},
{field: 'orderId', width: 300, title: '关联订单编号', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'orderType', width: 120, title: '关联订单类型', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if(rowData === 'ai') {
return 'AI秒著引擎'
}
if(rowData === 'agent') {
return '代理商平台'
}
return rowData;
}
},
{field: 'gmtCreate', width: 180, title: '交易时间', align:'center',
@ -117,7 +147,7 @@
return rowData;
}
},
{field: 'description', width: 400, title: '描述', align:'center',
{field: 'description', width: 600, title: '描述', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -151,7 +181,6 @@
page: {
curr: currentPage
},
height: $win.height() - 90,
});
}
// 初始化日期
@ -202,56 +231,9 @@
reloadTable(1);
});
// 事件 - 增删改
table.on('toolbar(dataTable)', function(obj) {
table.on('tool(dataTable)', function(obj) {
var layEvent = obj.event;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent === 'saveEvent') {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/accountitem/save', []),
end: function() {
reloadTable();
}
});
} else if(layEvent === 'updateEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/accountitem/update?accountItemId={accountItemId}', [checkDatas[0].accountItemId]),
end: function() {
reloadTable();
}
});
}
} else if(layEvent === 'removeEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectDelete);
} else {
var ids = '';
for(var i = 0, item; item = checkDatas[i++];) {
if(i > 1) {
ids += '_';
}
ids += item['accountItemId'];
}
removeData(ids);
}
}
var dataObj = obj.data;
});
});
</script>

View File

@ -99,7 +99,7 @@
if(!item.account) {
return '-';
}
return `¥${(item.account.accountMoney / 100).toFixed(2)}`;
return `<a href="javascript:void(0);" lay-event="accountItemEvent" style="font-weight: bold;">¥${(item.account.accountMoney / 100).toFixed(2)}</a>`;
}
},
{field:'userInfoName', width:200, title: '用户/公司名称', align:'center',
@ -362,6 +362,19 @@
reloadTable();
}
});
} else if(layEvent === 'accountItemEvent') {
if(!dataObj.account) {
return;
}
top.dialog.open({
title: '【'+ dataObj.userName +'】资金流水',
url: `route/accountitem/list?accountId=${dataObj.account.accountId}`,
width: '80%',
height: '80%',
onClose: function() {
}
})
} else if(layEvent === 'operateEvent') {
var datas = [{
id: 'resetPasswordEvent',

View File

@ -13,6 +13,8 @@
.layui-form-item {margin-bottom: 0;}
.layui-form-label-new {width: 180px !important;}
.layui-input-block-new {margin-left: 180px !important;}
.layui-input-block-new-center {margin-left: 180px !important; margin-right: 80px;}
.layui-form-btn {width: 80px; text-align: center; position: absolute; top: 0; right: 0; border-color: #eeeeee;}
.slide {width: 100%}
.slide .layui-slider {height: 38px;}
.slide .layui-slider .layui-slider-step {height: 100%;}
@ -23,7 +25,7 @@
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-body" style="padding: 15px;">
<div class="layui-card-body" style="padding: 15px 15px 35px 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<blockquote class="layui-elem-quote">【项目价格设置】单位为<b>元(¥)</b>可保留两位小数如要使用系统默认金额设置为0即可</blockquote>
<div class=" layui-row layui-col-space15">
@ -86,7 +88,7 @@
</div>
</div>
</div>
<blockquote class="layui-elem-quote" style="margin-top: 15px;">其他设置</blockquote>
<blockquote class="layui-elem-quote" style="margin-top: 15px;">项目其他设置</blockquote>
<div class=" layui-row layui-col-space15">
<div class="layui-col-xs6">
<div class="layui-form-item">
@ -137,6 +139,27 @@
</div>
</div>
</div>
<blockquote class="layui-elem-quote" style="margin-top: 15px;">邀请码设置</blockquote>
<div class=" layui-row layui-col-space15">
<div class="layui-col-xs6">
<div class="layui-form-item">
<label class="layui-form-label layui-form-label-new">邀请码</label>
<div class="layui-input-block layui-input-block-new-center">
<input type="text" id="ic" name="ic" class="layui-input" placeholder="邀请码" maxlength="50" readonly>
</div>
<button type="button" class="layui-form-btn layui-btn layui-btn-primary" id="generateIc">生成</button>
</div>
</div>
<div class="layui-col-xs6">
<div class="layui-form-item">
<label class="layui-form-label layui-form-label-new">返利比率</label>
<div class="layui-input-block layui-input-block-new">
<input type="hidden" id="icRebateRatio" name="icRebateRatio">
<div id="icRebateRatioSlide" class="slide"></div>
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
@ -161,6 +184,26 @@
var slider = layui.slider;
var common = layui.common;
var userId = top.restAjax.params(window.location.href).userId;
var icRebateRatioSlide;
var $icRebateRatio = $('#icRebateRatio');
function generateIc() {
var loadLayerIndex;
top.restAjax.get(`api/user/expand/generate-ic`, {}, null, function(code, data) {
form.val('dataForm', {
ic: data.data
})
if(parseInt($icRebateRatio.val()) <= 0) {
icRebateRatioSlide.setValue(10);
}
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg('生成中...', {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
function init() {
var loadLayerIndex;
@ -184,6 +227,11 @@
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
if(data.ic) {
var $generateIc = $('#generateIc');
$generateIc.attr('disabled', 'disabled');
$generateIc.addClass('layui-btn-disabled')
}
slider.render({
elem: '#freeProjCountSlide',
max: 10,
@ -208,6 +256,18 @@
$('#correctionCount').val(value);
}
})
icRebateRatioSlide = slider.render({
elem: '#icRebateRatioSlide',
max: 50,
min: 0,
step: 1,
showstep: true,
value: data.icRebateRatio,
range: false,
change: function(value) {
$icRebateRatio.val(value);
}
})
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
@ -222,7 +282,6 @@
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
console.log(formData.field)
var availableProjTypeArray = [];
var postpaidArray = [];
for(var key in formData.field) {
@ -269,6 +328,10 @@
closeBox();
});
$('#generateIc').click(function() {
generateIc();
})
// 校验
form.verify({
});

View File

@ -44,63 +44,26 @@
<input type="text" readonly id="idCardNumber" name="idCardNumber" class="layui-input" value="" placeholder="证件号" maxlength="255" lay-verify="required">
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">证件照正反面:</label>
<div class="layui-input-block" id="idCardFrontBack"></div>
</div>
<div class="layui-row layui-col-space15">
<div class="layui-col-xs6">
<div class="layui-form-item" style="margin-bottom: 0">
<label class="layui-form-label" style="width: 120px">证件开始时间:</label>
<div class="layui-input-block" style="margin-left: 120px">
<input type="text" id="idCardStartDate" readonly name="idCardStartDate" class="layui-input" value="" placeholder="证件开始时间" maxlength="20">
</div>
</div>
</div>
<div class="layui-col-xs6">
<div class="layui-form-item" style="margin-bottom: 0">
<label class="layui-form-label" style="width: 120px">证件结束时间:</label>
<div class="layui-input-block" style="margin-left: 120px">
<input type="text" id="idCardEndDate" readonly name="idCardEndDate" class="layui-input" value="" placeholder="证件结束时间" maxlength="20">
</div>
</div>
</div>
</div>
<div id="enterpriseItemsContainer" style="display: none;">
<blockquote class="layui-elem-quote">企业信息</blockquote>
<div class="layui-row layui-col-space15">
<div class="layui-col-xs6">
<div class="layui-form-item" style="margin-bottom: 0">
<label class="layui-form-label">法人姓名:</label>
<div class="layui-input-block">
<input type="text" id="legalPerson" readonly name="legalPerson" class="layui-input" value="" placeholder="法人" maxlength="255">
</div>
</div>
</div>
<div class="layui-col-xs6">
<div class="layui-form-item" style="margin-bottom: 0">
<label class="layui-form-label">成立时间:</label>
<div class="layui-input-block">
<input type="text" id="establishDate" readonly name="establishDate" class="layui-input" value="" placeholder="成立时间" maxlength="20">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">联系电话:</label>
<div class="layui-input-block">
<input type="text" id="contactPhone" readonly name="contactPhone" class="layui-input" value="" placeholder="联系电话" maxlength="255" lay-verify="required">
</div>
</div>
<div class="layui-row layui-col-space15">
<div class="layui-col-xs6">
<div class="layui-form-item">
<label class="layui-form-label">联系地址:</label>
<label class="layui-form-label">联系人姓名:</label>
<div class="layui-input-block">
<input type="text" id="contactAddress" readonly name="contactAddress" class="layui-input" value="" placeholder="联系地址" maxlength="255" lay-verify="required">
<input type="text" id="contactName" readonly name="contactName" class="layui-input" value="" placeholder="联系人姓名" maxlength="255" lay-verify="required">
</div>
</div>
</div>
<div class="layui-col-xs6">
<div class="layui-form-item">
<label class="layui-form-label">联系电话:</label>
<div class="layui-input-block">
<input type="text" id="contactPhone" readonly name="contactPhone" class="layui-input" value="" placeholder="联系电话" maxlength="255" lay-verify="required">
<label class="layui-form-label" style="width: 120px;">联系人英文名:</label>
<div class="layui-input-block" style="margin-left: 120px;">
<input type="text" id="contactNameEn" readonly name="contactNameEn" class="layui-input" value="" placeholder="联系人英文名" maxlength="255" lay-verify="required">
</div>
</div>
</div>