From 7ddab1ae680e00a386030416b9589ac04e8abe3c Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Thu, 8 Aug 2024 10:29:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E6=B0=B4=E8=AE=B0=E5=BD=95=E5=92=8C?= =?UTF-8?q?=E5=88=86=E8=B4=A6=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/readme.md | 9 ++ .../api/user/expand/UserExpandController.java | 7 + .../AccountItemResourceController.java | 45 +++--- .../expand/UserExpandResourceController.java | 42 ++++++ .../AccountItemRouteController.java | 3 +- .../expand/UserExpandRouteController.java | 2 +- .../dao/user/expand/IUserExpandDao.java | 9 ++ .../operator/enums/IcWayToGetEnum.java | 24 ++++ .../pojo/dtos/accountitem/AccountItemDTO.java | 61 ++++---- .../pojo/dtos/user/expand/UserExpandDTO.java | 81 +++++++++++ .../pojo/dtos/user/info/UserInfoDTO.java | 2 +- .../pojo/pos/user/expand/UserExpandPO.java | 83 +++++++++++ .../pojo/vos/user/expand/UserExpandVO.java | 18 +++ .../expand/ic/UserExpandRelationIcVO.java | 25 ++++ .../impl/AccountItemServiceImpl.java | 1 + .../user/expand/UserExpandServiceImpl.java | 131 +++++++++++++++++- .../mapper/user/expand/user-expand.xml | 108 ++++++++++++++- .../resources/templates/accountitem/list.html | 120 +++++++--------- .../resources/templates/user/custom/list.html | 15 +- .../templates/user/expand/save-or-update.html | 69 ++++++++- .../resources/templates/user/info/get.html | 55 ++------ 21 files changed, 729 insertions(+), 181 deletions(-) create mode 100644 doc/readme.md create mode 100644 src/main/java/cn/com/tenlion/operator/controller/resource/user/expand/UserExpandResourceController.java create mode 100644 src/main/java/cn/com/tenlion/operator/enums/IcWayToGetEnum.java create mode 100644 src/main/java/cn/com/tenlion/operator/pojo/vos/user/expand/ic/UserExpandRelationIcVO.java diff --git a/doc/readme.md b/doc/readme.md new file mode 100644 index 0000000..3a94b94 --- /dev/null +++ b/doc/readme.md @@ -0,0 +1,9 @@ +# 邀请码 + +说明 + +1. 一个账号可以有两个邀请码,一个邀请码用于其他账号关联,另一个邀请码是关联其他账号。 +2. 邀请码的获取有两种方式: + 1. 由管理员直接生成 + 2. 自己发起申请,管理员审核通过后生成 +3. 生成邀请码时,必须设置金额和邀请码返利比例 \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/operator/controller/api/user/expand/UserExpandController.java b/src/main/java/cn/com/tenlion/operator/controller/api/user/expand/UserExpandController.java index 1a4d6f7..250f1ee 100644 --- a/src/main/java/cn/com/tenlion/operator/controller/api/user/expand/UserExpandController.java +++ b/src/main/java/cn/com/tenlion/operator/controller/api/user/expand/UserExpandController.java @@ -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 generateIc() { + String ic = userExpandService.generateIc(); + return new SuccessResultData<>(ic); + } + } diff --git a/src/main/java/cn/com/tenlion/operator/controller/resource/accountitem/AccountItemResourceController.java b/src/main/java/cn/com/tenlion/operator/controller/resource/accountitem/AccountItemResourceController.java index 36508c5..1b795d3 100644 --- a/src/main/java/cn/com/tenlion/operator/controller/resource/accountitem/AccountItemResourceController.java +++ b/src/main/java/cn/com/tenlion/operator/controller/resource/accountitem/AccountItemResourceController.java @@ -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> 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> listPage(@PathVariable("userId") String userId, ListPage page) { Map params = requestParams(); params.put("accountId", userId); - pages.setParams(params); - return accountItemService.listPageBO(pages); + page.setParams(params); + return accountItemService.listPage(page); } } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/operator/controller/resource/user/expand/UserExpandResourceController.java b/src/main/java/cn/com/tenlion/operator/controller/resource/user/expand/UserExpandResourceController.java new file mode 100644 index 0000000..f3512ed --- /dev/null +++ b/src/main/java/cn/com/tenlion/operator/controller/resource/user/expand/UserExpandResourceController.java @@ -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(); + } + +} diff --git a/src/main/java/cn/com/tenlion/operator/controller/route/accountitem/AccountItemRouteController.java b/src/main/java/cn/com/tenlion/operator/controller/route/accountitem/AccountItemRouteController.java index 0594f97..25f4bec 100644 --- a/src/main/java/cn/com/tenlion/operator/controller/route/accountitem/AccountItemRouteController.java +++ b/src/main/java/cn/com/tenlion/operator/controller/route/accountitem/AccountItemRouteController.java @@ -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; } diff --git a/src/main/java/cn/com/tenlion/operator/controller/route/user/expand/UserExpandRouteController.java b/src/main/java/cn/com/tenlion/operator/controller/route/user/expand/UserExpandRouteController.java index b1dcf9a..d6bce5f 100644 --- a/src/main/java/cn/com/tenlion/operator/controller/route/user/expand/UserExpandRouteController.java +++ b/src/main/java/cn/com/tenlion/operator/controller/route/user/expand/UserExpandRouteController.java @@ -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; } diff --git a/src/main/java/cn/com/tenlion/operator/dao/user/expand/IUserExpandDao.java b/src/main/java/cn/com/tenlion/operator/dao/user/expand/IUserExpandDao.java index 9970369..43db1ce 100644 --- a/src/main/java/cn/com/tenlion/operator/dao/user/expand/IUserExpandDao.java +++ b/src/main/java/cn/com/tenlion/operator/dao/user/expand/IUserExpandDao.java @@ -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 params); + void updateRelationIc(Map params); + + void updateRelationRebateRatio(Map params); + UserExpandDTO get(Map params); UserExpandPO getPO(Map params); + Integer countIc(String string); + + List listUserIdByRelationUserId(String userId); + } diff --git a/src/main/java/cn/com/tenlion/operator/enums/IcWayToGetEnum.java b/src/main/java/cn/com/tenlion/operator/enums/IcWayToGetEnum.java new file mode 100644 index 0000000..a8d9fd4 --- /dev/null +++ b/src/main/java/cn/com/tenlion/operator/enums/IcWayToGetEnum.java @@ -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(); + } +} diff --git a/src/main/java/cn/com/tenlion/operator/pojo/dtos/accountitem/AccountItemDTO.java b/src/main/java/cn/com/tenlion/operator/pojo/dtos/accountitem/AccountItemDTO.java index 850f6c2..ce954dd 100644 --- a/src/main/java/cn/com/tenlion/operator/pojo/dtos/accountitem/AccountItemDTO.java +++ b/src/main/java/cn/com/tenlion/operator/pojo/dtos/accountitem/AccountItemDTO.java @@ -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; } - - } diff --git a/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/expand/UserExpandDTO.java b/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/expand/UserExpandDTO.java index 4105591..b205893 100644 --- a/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/expand/UserExpandDTO.java +++ b/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/expand/UserExpandDTO.java @@ -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; + } } diff --git a/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/info/UserInfoDTO.java b/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/info/UserInfoDTO.java index 1bb6395..b76eb44 100644 --- a/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/info/UserInfoDTO.java +++ b/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/info/UserInfoDTO.java @@ -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; diff --git a/src/main/java/cn/com/tenlion/operator/pojo/pos/user/expand/UserExpandPO.java b/src/main/java/cn/com/tenlion/operator/pojo/pos/user/expand/UserExpandPO.java index 65c16db..19ba189 100644 --- a/src/main/java/cn/com/tenlion/operator/pojo/pos/user/expand/UserExpandPO.java +++ b/src/main/java/cn/com/tenlion/operator/pojo/pos/user/expand/UserExpandPO.java @@ -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; + } } diff --git a/src/main/java/cn/com/tenlion/operator/pojo/vos/user/expand/UserExpandVO.java b/src/main/java/cn/com/tenlion/operator/pojo/vos/user/expand/UserExpandVO.java index 0bfef22..b5203ed 100644 --- a/src/main/java/cn/com/tenlion/operator/pojo/vos/user/expand/UserExpandVO.java +++ b/src/main/java/cn/com/tenlion/operator/pojo/vos/user/expand/UserExpandVO.java @@ -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; + } } diff --git a/src/main/java/cn/com/tenlion/operator/pojo/vos/user/expand/ic/UserExpandRelationIcVO.java b/src/main/java/cn/com/tenlion/operator/pojo/vos/user/expand/ic/UserExpandRelationIcVO.java new file mode 100644 index 0000000..d97aa93 --- /dev/null +++ b/src/main/java/cn/com/tenlion/operator/pojo/vos/user/expand/ic/UserExpandRelationIcVO.java @@ -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; + } + +} diff --git a/src/main/java/cn/com/tenlion/operator/service/accountitem/impl/AccountItemServiceImpl.java b/src/main/java/cn/com/tenlion/operator/service/accountitem/impl/AccountItemServiceImpl.java index 272dea8..d809a57 100644 --- a/src/main/java/cn/com/tenlion/operator/service/accountitem/impl/AccountItemServiceImpl.java +++ b/src/main/java/cn/com/tenlion/operator/service/accountitem/impl/AccountItemServiceImpl.java @@ -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; } diff --git a/src/main/java/cn/com/tenlion/operator/service/user/expand/UserExpandServiceImpl.java b/src/main/java/cn/com/tenlion/operator/service/user/expand/UserExpandServiceImpl.java index af529fd..31fa442 100644 --- a/src/main/java/cn/com/tenlion/operator/service/user/expand/UserExpandServiceImpl.java +++ b/src/main/java/cn/com/tenlion/operator/service/user/expand/UserExpandServiceImpl.java @@ -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 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 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 params = getHashMap(4); + params.put("relationIcUserId", userId); + params.put("relationIcRebateRatio", newRebateRatio); + userExpandDao.updateRelationRebateRatio(params); + LOG.debug("批量更新redis"); + List relationUserIds = userExpandDao.listUserIdByRelationUserId(userId).stream().map(id -> "user:expand:" + id).collect(Collectors.toList()); + if (relationUserIds.isEmpty()) { + LOG.debug("没有关联邀请码的用户"); + return; + } + List 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 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 params = getHashMap(2); + params.put("ic", ic); + return userExpandDao.getPO(params); } } diff --git a/src/main/resources/mybatis/mapper/user/expand/user-expand.xml b/src/main/resources/mybatis/mapper/user/expand/user-expand.xml index 7e1f91e..959446f 100644 --- a/src/main/resources/mybatis/mapper/user/expand/user-expand.xml +++ b/src/main/resources/mybatis/mapper/user/expand/user-expand.xml @@ -16,6 +16,15 @@ + + + + + + + + + @@ -32,6 +41,15 @@ + + + + + + + + + @@ -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} ) @@ -70,6 +96,18 @@ UPDATE sys_user_expand SET + + ic = #{ic}, + + + ic_rebate_ratio = #{icRebateRatio}, + + + ic_get_time = #{icGetTime}, + + + ic_assign_user_id = #{icAssignUserId}, + price_additional_pkg = #{priceAdditionalPkg}, price_additional_video_demo = #{priceAdditionalVideoDemo}, price_additional_urgent = #{priceAdditionalUrgent}, @@ -86,6 +124,29 @@ user_id = #{userId} + + 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 + sys_user_expand + SET + relation_ic_rebate_ratio = #{relationIcRebateRatio} + WHERE + relation_ic_user_id = #{relationIcUserId} + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/accountitem/list.html b/src/main/resources/templates/accountitem/list.html index 9f9ee7d..6111dfa 100644 --- a/src/main/resources/templates/accountitem/list.html +++ b/src/main/resources/templates/accountitem/list.html @@ -11,14 +11,14 @@ -
+
- +
@@ -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: '{{d.LAY_INDEX}}'}, - {field: 'type', width: 180, title: '类型', align:'center', + {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_NUM}}'}, + {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 '充值'; }else if(rowData == 2) { - return '支出'; + return '支出'; }else if(rowData == 3) { - return '提现'; + return '提现'; }else if(rowData == 4) { - return '系统扣款'; + return '系统扣款'; }else if(rowData == 5) { - return '入账'; + return '入账'; } 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 "" + rowData + ""; + } + }, + {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 "+" + rowData + ""; + if (mode === 1) { + return " + " + rowData + ""; }else{ - return "-" + rowData + ""; + return " - " + rowData + ""; } } }, - {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 "" + rowData + ""; + return "" + rowData + ""; + } + }, + {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; }); }); diff --git a/src/main/resources/templates/user/custom/list.html b/src/main/resources/templates/user/custom/list.html index cd0310b..86c72eb 100644 --- a/src/main/resources/templates/user/custom/list.html +++ b/src/main/resources/templates/user/custom/list.html @@ -99,7 +99,7 @@ if(!item.account) { return '-'; } - return `¥${(item.account.accountMoney / 100).toFixed(2)}`; + return `¥${(item.account.accountMoney / 100).toFixed(2)}`; } }, {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', diff --git a/src/main/resources/templates/user/expand/save-or-update.html b/src/main/resources/templates/user/expand/save-or-update.html index e5b8605..37119c0 100644 --- a/src/main/resources/templates/user/expand/save-or-update.html +++ b/src/main/resources/templates/user/expand/save-or-update.html @@ -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 @@
-
+
【项目价格设置】单位为元(¥),可保留两位小数,如要使用系统默认金额,设置为0即可
@@ -86,7 +88,7 @@
-
其他设置
+
项目其他设置
@@ -137,6 +139,27 @@
+
邀请码设置
+
+
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
-
- -
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-