diff --git a/src/main/java/cn/com/tenlion/operator/controller/api/user/ic/apply/UserIcApplyController.java b/src/main/java/cn/com/tenlion/operator/controller/api/user/ic/apply/UserIcApplyController.java index 74bf0f4..eef5a21 100644 --- a/src/main/java/cn/com/tenlion/operator/controller/api/user/ic/apply/UserIcApplyController.java +++ b/src/main/java/cn/com/tenlion/operator/controller/api/user/ic/apply/UserIcApplyController.java @@ -42,10 +42,10 @@ public class UserIcApplyController extends DefaultBaseController { } } if (ApplyStatusEnum.APPROVED.equals(userIcApplyReview.getApplyStatus())) { - if (userIcApplyReview.getPriceAll() < 0) { + if (userIcApplyReview.getIcPriceAll() < 0) { throw new ParamsException("全托价格不能小于0"); } - if (userIcApplyReview.getPriceMaterial() < 0) { + if (userIcApplyReview.getIcPriceMaterial() < 0) { throw new ParamsException("写材料价格不能小于0"); } if (StringUtils.isBlank(userIcApplyReview.getIc())) { 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 b205893..d759d0c 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 @@ -26,6 +26,8 @@ public class UserExpandDTO extends UserDTO { private Integer freeProjCount; private Integer correctionCount; private String ic; + private Long icPriceAll; + private Long icPriceMaterial; private Integer icRebateRatio; private String icWayToGet; private String icGetTime; @@ -139,6 +141,22 @@ public class UserExpandDTO extends UserDTO { this.ic = ic; } + public Long getIcPriceAll() { + return icPriceAll == null ? 0 : icPriceAll; + } + + public void setIcPriceAll(Long icPriceAll) { + this.icPriceAll = icPriceAll; + } + + public Long getIcPriceMaterial() { + return icPriceMaterial == null ? 0 : icPriceMaterial; + } + + public void setIcPriceMaterial(Long icPriceMaterial) { + this.icPriceMaterial = icPriceMaterial; + } + public Integer getIcRebateRatio() { return icRebateRatio == null ? 0 : icRebateRatio; } diff --git a/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/ic/apply/UserIcApplyDTO.java b/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/ic/apply/UserIcApplyDTO.java index c3dd2c9..b9955b8 100644 --- a/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/ic/apply/UserIcApplyDTO.java +++ b/src/main/java/cn/com/tenlion/operator/pojo/dtos/user/ic/apply/UserIcApplyDTO.java @@ -34,8 +34,8 @@ public class UserIcApplyDTO { @ApiModelProperty(name = "userName", value = "昵称") private String userName; private UserInfoDTO userInfo; - private Long priceAll; - private Long priceMaterial; + private Long icPriceAll; + private Long icPriceMaterial; private String ic; private Integer icRebateRatio; @@ -119,20 +119,20 @@ public class UserIcApplyDTO { this.userInfo = userInfo; } - public Long getPriceAll() { - return priceAll == null ? 0 : priceAll; + public Long getIcPriceAll() { + return icPriceAll == null ? 0 : icPriceAll; } - public void setPriceAll(Long priceAll) { - this.priceAll = priceAll; + public void setIcPriceAll(Long icPriceAll) { + this.icPriceAll = icPriceAll; } - public Long getPriceMaterial() { - return priceMaterial == null ? 0 : priceMaterial; + public Long getIcPriceMaterial() { + return icPriceMaterial == null ? 0 : icPriceMaterial; } - public void setPriceMaterial(Long priceMaterial) { - this.priceMaterial = priceMaterial; + public void setIcPriceMaterial(Long icPriceMaterial) { + this.icPriceMaterial = icPriceMaterial; } public String getIc() { 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 19ba189..bfe0843 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 @@ -25,6 +25,8 @@ public class UserExpandPO { private Integer freeProjCount; private Integer correctionCount; private String ic; + private Long icPriceAll; + private Long icPriceMaterial; private Integer icRebateRatio; private IcWayToGetEnum icWayToGet; private String icGetTime; @@ -146,6 +148,22 @@ public class UserExpandPO { this.ic = ic; } + public Long getIcPriceAll() { + return icPriceAll == null ? 0 : icPriceAll; + } + + public void setIcPriceAll(Long icPriceAll) { + this.icPriceAll = icPriceAll; + } + + public Long getIcPriceMaterial() { + return icPriceMaterial == null ? 0 : icPriceMaterial; + } + + public void setIcPriceMaterial(Long icPriceMaterial) { + this.icPriceMaterial = icPriceMaterial; + } + public Integer getIcRebateRatio() { return icRebateRatio == null ? 0 : icRebateRatio; } 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 b5203ed..657ebed 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 @@ -35,6 +35,8 @@ public class UserExpandVO { @CheckNumberAnnotation(name = "资料补正次数", min = 0, max = 10) private Integer correctionCount; private String ic; + private Double icPriceAll; + private Double icPriceMaterial; private Integer icRebateRatio; public Double getPriceAdditionalPkg() { @@ -141,6 +143,22 @@ public class UserExpandVO { this.ic = ic; } + public Double getIcPriceAll() { + return icPriceAll == null ? 0 : icPriceAll; + } + + public void setIcPriceAll(Double icPriceAll) { + this.icPriceAll = icPriceAll; + } + + public Double getIcPriceMaterial() { + return icPriceMaterial == null ? 0 : icPriceMaterial; + } + + public void setIcPriceMaterial(Double icPriceMaterial) { + this.icPriceMaterial = icPriceMaterial; + } + public Integer getIcRebateRatio() { return icRebateRatio == null ? 0 : icRebateRatio; } diff --git a/src/main/java/cn/com/tenlion/operator/pojo/vos/user/ic/apply/UserIcApplyReviewVO.java b/src/main/java/cn/com/tenlion/operator/pojo/vos/user/ic/apply/UserIcApplyReviewVO.java index 545f9cd..64ac3da 100644 --- a/src/main/java/cn/com/tenlion/operator/pojo/vos/user/ic/apply/UserIcApplyReviewVO.java +++ b/src/main/java/cn/com/tenlion/operator/pojo/vos/user/ic/apply/UserIcApplyReviewVO.java @@ -1,10 +1,7 @@ package cn.com.tenlion.operator.pojo.vos.user.ic.apply; import cn.com.tenlion.operator.enums.ApplyStatusEnum; -import cn.com.tenlion.operator.pojo.vos.user.expand.UserExpandVO; -import ink.wgink.annotation.CheckEmptyAnnotation; import ink.wgink.annotation.CheckNullAnnotation; -import ink.wgink.annotation.CheckNumberAnnotation; /** * ClassName: UserIcApplyVO @@ -18,9 +15,9 @@ public class UserIcApplyReviewVO { @CheckNullAnnotation(name = "申请状态") private ApplyStatusEnum applyStatus; private String applyNotes; - private Double priceAll; - private Double priceMaterial; private String ic; + private Double icPriceAll; + private Double icPriceMaterial; private Integer icRebateRatio; public ApplyStatusEnum getApplyStatus() { @@ -39,21 +36,6 @@ public class UserIcApplyReviewVO { this.applyNotes = applyNotes; } - public Double getPriceAll() { - return priceAll == null ? 0 : priceAll; - } - - public void setPriceAll(Double priceAll) { - this.priceAll = priceAll; - } - - public Double getPriceMaterial() { - return priceMaterial == null ? 0 : priceMaterial; - } - - public void setPriceMaterial(Double priceMaterial) { - this.priceMaterial = priceMaterial; - } public String getIc() { return ic == null ? "" : ic.trim(); @@ -63,6 +45,22 @@ public class UserIcApplyReviewVO { this.ic = ic; } + public Double getIcPriceAll() { + return icPriceAll == null ? 0 : icPriceAll; + } + + public void setIcPriceAll(Double icPriceAll) { + this.icPriceAll = icPriceAll; + } + + public Double getIcPriceMaterial() { + return icPriceMaterial == null ? 0 : icPriceMaterial; + } + + public void setIcPriceMaterial(Double icPriceMaterial) { + this.icPriceMaterial = icPriceMaterial; + } + public Integer getIcRebateRatio() { return icRebateRatio == null ? 0 : icRebateRatio; } 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 0d37c23..69668ab 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 @@ -148,6 +148,8 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx userExpandVO.setPriceMaterial(userExpandVO.getPriceMaterial() * 100); userExpandVO.setPriceMaterialAgent(userExpandVO.getPriceMaterialAgent() * 100); userExpandVO.setPriceMaterialAgentUrgent(userExpandVO.getPriceMaterialAgentUrgent() * 100); + userExpandVO.setIcPriceAll(userExpandVO.getIcPriceAll() * 100); + userExpandVO.setIcPriceMaterial(userExpandVO.getIcPriceMaterial() * 100); Map params = getHashMap(2); params.put("userId", userId); @@ -174,6 +176,8 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx params.remove("ic"); params.remove("icGetTime"); params.remove("icAssignUserId"); + params.remove("icPriceAll"); + params.remove("icPriceMaterial"); } else { if (StringUtils.isNotBlank(userExpandVO.getIc()) && countIc(userExpandVO.getIc()) > 0) { throw new SearchException("邀请码已存在,请重新生成"); @@ -186,8 +190,8 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx } public void saveOrUpdateWithIc(String userId, UserExpandVO userExpandVO) { - userExpandVO.setPriceAll(userExpandVO.getPriceAll() * 100); - userExpandVO.setPriceMaterial(userExpandVO.getPriceMaterial() * 100); + userExpandVO.setIcPriceAll(userExpandVO.getIcPriceAll() * 100); + userExpandVO.setIcPriceMaterial(userExpandVO.getIcPriceMaterial() * 100); userExpandVO.setAvailableProjType("PRICE_ALL,PRICE_MATERIAL,PRICE_FREE"); Map params = getHashMap(2); @@ -296,8 +300,8 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx throw new SearchException("不能绑定自己的邀请码"); } Map params = getHashMap(4); - params.put("priceAll", icUserPO.getPriceAll()); - params.put("priceMaterial", icUserPO.getPriceMaterial()); + params.put("priceAll", icUserPO.getIcPriceAll()); + params.put("priceMaterial", icUserPO.getIcPriceMaterial()); params.put("relationIc", userExpandIcVO.getRelationIc()); params.put("relationIcRebateRatio", icUserPO.getIcRebateRatio()); params.put("relationIcTime", DateUtil.getTime()); diff --git a/src/main/java/cn/com/tenlion/operator/service/user/ic/apply/UserIcApplyService.java b/src/main/java/cn/com/tenlion/operator/service/user/ic/apply/UserIcApplyService.java index 1b109b4..4fdd38c 100644 --- a/src/main/java/cn/com/tenlion/operator/service/user/ic/apply/UserIcApplyService.java +++ b/src/main/java/cn/com/tenlion/operator/service/user/ic/apply/UserIcApplyService.java @@ -104,8 +104,8 @@ public class UserIcApplyService extends DefaultBaseService { } UserExpandPO po = userExpandService.getPO(userIcApplyDTO.getCreator()); if (po != null) { - userIcApplyDTO.setPriceAll(po.getPriceAll()); - userIcApplyDTO.setPriceMaterial(po.getPriceMaterial()); + userIcApplyDTO.setIcPriceAll(po.getIcPriceAll()); + userIcApplyDTO.setIcPriceMaterial(po.getIcPriceMaterial()); userIcApplyDTO.setIc(po.getIc()); userIcApplyDTO.setIcRebateRatio(po.getIcRebateRatio()); } 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 1a3072b..d0095cd 100644 --- a/src/main/resources/mybatis/mapper/user/expand/user-expand.xml +++ b/src/main/resources/mybatis/mapper/user/expand/user-expand.xml @@ -17,6 +17,8 @@ + + @@ -42,6 +44,8 @@ + + @@ -68,6 +72,8 @@ free_proj_count, correction_count, ic, + ic_price_all, + ic_price_material, ic_rebate_ratio, ic_way_to_get, ic_get_time, @@ -87,6 +93,8 @@ #{freeProjCount}, #{correctionCount}, #{ic}, + #{icPriceAll}, + #{icPriceMaterial}, #{icRebateRatio}, #{icWayToGet}, #{icGetTime}, @@ -110,6 +118,12 @@ ic_assign_user_id = #{icAssignUserId}, + + ic_price_all = #{icPriceAll}, + + + ic_price_material = #{icPriceMaterial}, + price_additional_pkg = #{priceAdditionalPkg}, price_additional_video_demo = #{priceAdditionalVideoDemo}, price_additional_urgent = #{priceAdditionalUrgent}, @@ -131,12 +145,12 @@ sys_user_expand SET ic = #{ic}, + ic_price_all = #{icPriceAll}, + ic_price_material = #{icPriceMaterial}, ic_rebate_ratio = #{icRebateRatio}, ic_assign_user_id = #{icAssignUserId}, ic_way_to_get = #{icWayToGet}, - ic_get_time = #{icGetTime}, - price_all = #{priceAll}, - price_material = #{priceMaterial} + ic_get_time = #{icGetTime} WHERE user_id = #{userId} @@ -179,6 +193,8 @@ free_proj_count, correction_count, ic, + ic_price_all, + ic_price_material, ic_rebate_ratio, ic_way_to_get, ic_get_time, @@ -211,6 +227,8 @@ free_proj_count, correction_count, ic, + ic_price_all, + ic_price_material, ic_rebate_ratio, ic_way_to_get, ic_get_time, diff --git a/src/main/resources/templates/accountitem/list.html b/src/main/resources/templates/accountitem/list.html index 6111dfa..3682851 100644 --- a/src/main/resources/templates/accountitem/list.html +++ b/src/main/resources/templates/accountitem/list.html @@ -86,7 +86,7 @@ }else if(rowData == 4) { return '系统扣款'; }else if(rowData == 5) { - return '入账'; + return '订单收入'; } return rowData; } 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 37119c0..49fb29e 100644 --- a/src/main/resources/templates/user/expand/save-or-update.html +++ b/src/main/resources/templates/user/expand/save-or-update.html @@ -41,7 +41,7 @@
- +
@@ -159,6 +159,22 @@ +
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
@@ -214,6 +230,8 @@ data.priceMaterialAgentUrgent = (data.priceMaterialAgentUrgent / 100).toFixed(2) data.priceAdditionalPkg = (data.priceAdditionalPkg / 100).toFixed(2) data.priceAdditionalVideoDemo = (data.priceAdditionalVideoDemo / 100).toFixed(2) + data.icPriceAll = (data.icPriceAll / 100).toFixed(2) + data.icPriceMaterial = (data.icPriceMaterial / 100).toFixed(2) var availableProjTypeArray = data.availableProjType.split(','); availableProjTypeArray.forEach(function(item) { data[`availableProjType[${item}]`] = true @@ -230,7 +248,10 @@ if(data.ic) { var $generateIc = $('#generateIc'); $generateIc.attr('disabled', 'disabled'); - $generateIc.addClass('layui-btn-disabled') + $generateIc.addClass('layui-btn-disabled'); + $('#ic').attr('disabled', 'disabled'); + $('#icPriceAll').attr('disabled', 'disabled'); + $('#icPriceMaterial').attr('disabled', 'disabled'); } slider.render({ elem: '#freeProjCountSlide', diff --git a/src/main/resources/templates/user/ic/apply/list.html b/src/main/resources/templates/user/ic/apply/list.html index c53f76c..d70c75b 100644 --- a/src/main/resources/templates/user/ic/apply/list.html +++ b/src/main/resources/templates/user/ic/apply/list.html @@ -24,6 +24,14 @@
+
+ +
@@ -80,7 +88,7 @@ return rowData; } }, - {field: 'userInfoName', width: 140, title: '用户信息名称', align:'center', + {field: 'userInfoName', width: 300, title: '用户信息名称', align:'center', templet: function(row) { var rowData = row.userInfo.userInfoName; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -127,7 +135,13 @@ }, {field: 'operate', width: 80, title: '操作', align:'center', fixed: 'right', templet: function(row) { - return ``; + if(row.applyStatus === 'PENDING') { + return ``; + } + if(row.applyStatus !== 'PENDING') { + return ``; + } + return '-'; } }, ] @@ -149,7 +163,7 @@ table.reload('dataTable', { where: { keywords: $('#keywords').val(), - userInfoType: $("#userInfoType").val() + applyStatus: $("#applyStatus").val() }, page: { curr: currentPage diff --git a/src/main/resources/templates/user/ic/apply/review.html b/src/main/resources/templates/user/ic/apply/review.html index d7c36bb..0fff78b 100644 --- a/src/main/resources/templates/user/ic/apply/review.html +++ b/src/main/resources/templates/user/ic/apply/review.html @@ -47,25 +47,6 @@
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
@@ -147,8 +146,8 @@ if(data.applyStatus === 'APPROVED') { $approvedContent.show(); } - data.priceAll = (data.priceAll / 100).toFixed(2) - data.priceMaterial = (data.priceMaterial / 100).toFixed(2) + data.icPriceAll = (data.icPriceAll / 100).toFixed(2); + data.icPriceMaterial = (data.icPriceMaterial / 100).toFixed(2); var dataFormData = {}; for(var i in data) { dataFormData[i] = data[i] +'';