Browse Source

商户记录

wuwen 5 years ago
parent
commit
8c3bc4156e

+ 28 - 2
src/main/java/com/ssj/api/controller/ApiMerchantController.java

@@ -7,6 +7,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -75,14 +76,39 @@ public class ApiMerchantController extends BaseController {
 						TbLibJoinConsume consume=new TbLibJoinConsume();
 						consume.setFromLibId(merchant.getLibId());
 						consume.setFromMerchantId(merchant.getId());
-						consume.setLibService(0);
+						consume.setLibService(merchant.getLibService());
 						consume.setPlatformService(0);
 						consume.setType(7);
 						consume.setSignType(merchant.getSignType());
+						consume.setComputeNum(merchant.getCurIsSummary());
 						consume.setRemarks("激活期扣费【服务包扣费】-来源开放接口");
 						consume.setCreateTime(new Date());
 						libJoinConsumeService.save(consume);
-        			}
+        			}else {
+        				
+        				//自主激活的第一条都要记录,所以判断之前的数据是否有自主激活的,没有就保存一条。
+        				boolean isActive=false;
+            			for (TbLibJoinConsume tbLibJoinConsume : consumes) {
+    						if(StringUtils.isNotEmpty(tbLibJoinConsume.getRemarks()) && tbLibJoinConsume.getRemarks().contains("来源开放接口")) {
+    							isActive=true;
+    						}
+    					}
+            			if(!isActive) {
+            				//记录
+    						TbLibJoinConsume consume=new TbLibJoinConsume();
+    						consume.setFromLibId(merchant.getLibId());
+    						consume.setFromMerchantId(merchant.getId());
+    						consume.setLibService(merchant.getLibService());
+    						consume.setPlatformService(0);
+    						consume.setType(7);
+    						consume.setSignType(merchant.getSignType());
+    						consume.setComputeNum(merchant.getCurIsSummary());
+    						consume.setRemarks("激活期扣费【服务包扣费】-来源开放接口");
+    						consume.setCreateTime(new Date());
+    						libJoinConsumeService.save(consume);
+            			}
+            			
+            		}
         		}
 	        	
 	        	DateFormat format = new SimpleDateFormat("yyyy-MM-dd");

+ 38 - 6
src/main/resources/templates/sys/fx/consumeList.html

@@ -165,24 +165,56 @@
 </div>
 
 
-<ul style="margin-bottom: 100px;margin-left: 20px;display: none">
+<ul style="margin-bottom: 100px;margin-left: 20px;">
 		<li style="line-height: 25px;">
 			<span style="font-size: 14px;">操作名词解释</span>
 		</li>
 		<li style="line-height: 25px;color: red;">
-			<span style="font-size: 14px;">充值:财务直接充值塾币[至商户]账号下。</span>
+			<span style="font-size: 14px;">塾币充值【旧模式】:财务直接充值塾币[至商户]账号下。</span>
 		</li>
 		<li style="line-height: 25px;color: red;">
-			<span style="font-size: 14px;">消费:[始商户]的自消费塾币。</span>
+			<span style="font-size: 14px;">塾币消费【旧模式】:[始商户]的自消费塾币。</span>
 		</li>
 		<li style="line-height: 25px;color: red;">
-			<span style="font-size: 14px;">服务扣除:结算日不足端口扣除的[始商户]塾币。</span>
+			<span style="font-size: 14px;">服务扣除【旧模式】:结算日不足端口扣除的[始商户]塾币。</span>
 		</li>
 		<li style="line-height: 25px;color: red;">
-			<span style="font-size: 14px;">上级分配币:上级分配给我的塾币,我是[至商户]。</span>
+			<span style="font-size: 14px;">上级分配币【旧模式】 :上级分配给我的塾币,我是[至商户]。</span>
 		</li>
 		<li style="line-height: 25px;color: red;">
-			<span style="font-size: 14px;">向下分配币:我向下级分配的塾币,我是[始商户]</span>
+			<span style="font-size: 14px;">向下分配币【旧模式】:我向下级分配的塾币,我是[始商户]</span>
+		</li>
+		
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">服务包开通【新模式】:服务包的开通或者续费月份</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">激活期扣费【服务包扣费】:开始计费日前,由系统激活的流水</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">激活期扣费【服务包扣费】-来源开放接口:开始计费日前,由商户自主激活的流水</span>
+		</li>
+		
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">激活期失效【服务包失效】:开始计费日前,失效流水</span>
+		</li>
+		
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">计费期扣费:开始计费日后,激活扣费流水</span>
+		</li>
+		
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">计费期失效:开始计费日后,失效流水</span>
+		</li>
+		
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">加油包开通【新模式】:加油包的开通</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">加油包激活【加油包激活】:加油包的激活</span>
+		</li>
+		<li style="line-height: 25px;color: red;">
+			<span style="font-size: 14px;">加油包失效【加油包过期】:加油包的过期失效</span>
 		</li>
 	</ul>