Bladeren bron

Merge branch 'master' of http://git.iamberry.com/liuzhiwei/iamberry-common-tooth

wangxiaoming 6 jaren geleden
bovenliggende
commit
42b8e0bece
14 gewijzigde bestanden met toevoegingen van 666 en 54 verwijderingen
  1. 20 0
      tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/ChildChannel.java
  2. 9 10
      tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/MainChannel.java
  3. 3 1
      tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/ChildChannelService.java
  4. 4 2
      tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/MainChannelService.java
  5. 10 3
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/ChildChannelServiceImpl.java
  6. 10 3
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/MainChannelServiceImpl.java
  7. 3 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/channelRebateMapper.xml
  8. 24 12
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/childChannelMapper.xml
  9. 14 11
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/mainChannelMapper.xml
  10. 89 3
      tooth-wechat-web/src/main/java/com/iamberry/wechat/handles/channel/AdminChannelHandler.java
  11. 34 9
      tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/channelRebate_list.jsp
  12. 134 0
      tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/child_channel_list.jsp
  13. 188 0
      tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/main_channel_list.jsp
  14. 124 0
      tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/settlement.jsp

+ 20 - 0
tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/ChildChannel.java

@@ -48,6 +48,10 @@ public class ChildChannel  implements  Serializable{
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date childChannelUpdateTime;
 
+    private String mainChannelName;
+
+    private String rebackAmount;//账户余额
+
     public Integer getChildChannelId(){
         return childChannelId;
     }
@@ -175,4 +179,20 @@ public class ChildChannel  implements  Serializable{
     public void setChildChannelQrcode(String childChannelQrcode) {
         this.childChannelQrcode = childChannelQrcode;
     }
+
+    public String getMainChannelName() {
+        return mainChannelName;
+    }
+
+    public void setMainChannelName(String mainChannelName) {
+        this.mainChannelName = mainChannelName;
+    }
+
+    public String getRebackAmount() {
+        return rebackAmount;
+    }
+
+    public void setRebackAmount(String rebackAmount) {
+        this.rebackAmount = rebackAmount;
+    }
 }

+ 9 - 10
tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/MainChannel.java

@@ -21,8 +21,6 @@ public class MainChannel  implements  Serializable{
     private String mainChannelDockingName;
     //对接人手机
     private String mainChannelDockingTel;
-    //账户余额
-    private Integer mainChannelBalance;
     //账户银行
     private String mainChannelBank;
     //账户银行账号
@@ -46,6 +44,7 @@ public class MainChannel  implements  Serializable{
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date mainChannelUpdateTime;
 
+    private String rebackAmount;//账户余额
     public Integer getMainChannelId(){
         return mainChannelId;
     }
@@ -86,14 +85,6 @@ public class MainChannel  implements  Serializable{
         this.mainChannelDockingTel=mainChannelDockingTel;
     }
 
-    public Integer getMainChannelBalance(){
-        return mainChannelBalance;
-    }
-
-    public void setMainChannelBalance(Integer  mainChannelBalance){
-        this.mainChannelBalance=mainChannelBalance;
-    }
-
     public String getMainChannelBank(){
         return mainChannelBank;
     }
@@ -165,4 +156,12 @@ public class MainChannel  implements  Serializable{
     public void setMainChannelQrcode(String mainChannelQrcode) {
         this.mainChannelQrcode = mainChannelQrcode;
     }
+
+    public String getRebackAmount() {
+        return rebackAmount;
+    }
+
+    public void setRebackAmount(String rebackAmount) {
+        this.rebackAmount = rebackAmount;
+    }
 }

+ 3 - 1
tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/ChildChannelService.java

@@ -1,6 +1,8 @@
 package com.iamberry.wechat.face.channel;
 
 import com.iamberry.wechat.core.entity.channel.ChildChannel;
+import com.iamberry.wechat.core.entity.page.PageRequest;
+import com.iamberry.wechat.core.entity.page.PagedResult;
 
 import java.util.List;
 
@@ -15,7 +17,7 @@ public interface ChildChannelService {
      * @param  childChannel
      * @return List
      */
-    List<ChildChannel> getChildChannelList(ChildChannel childChannel);
+    PagedResult<ChildChannel> getChildChannelList(PageRequest<ChildChannel> childChannel);
     /**
      * 查询单条数据
      * @param  id

+ 4 - 2
tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/MainChannelService.java

@@ -1,6 +1,8 @@
 package com.iamberry.wechat.face.channel;
 
 import com.iamberry.wechat.core.entity.channel.MainChannel;
+import com.iamberry.wechat.core.entity.page.PageRequest;
+import com.iamberry.wechat.core.entity.page.PagedResult;
 
 import java.util.List;
 
@@ -12,10 +14,10 @@ import java.util.List;
 public interface MainChannelService {
     /**
      * 获取集合
-     * @param  mainChannel
+     * @param
      * @return List
      */
-    List<MainChannel> getMainChannelList(MainChannel mainChannel);
+    PagedResult<MainChannel> getMainChannelList(PageRequest<MainChannel> pageRequest);
     /**
      * 查询单条数据
      * @param  id

+ 10 - 3
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/ChildChannelServiceImpl.java

@@ -1,9 +1,14 @@
 package com.iamberry.wechat.service.channel;
+import com.github.pagehelper.PageHelper;
 import com.iamberry.wechat.core.entity.channel.ChildChannel;
+import com.iamberry.wechat.core.entity.channel.MainChannel;
+import com.iamberry.wechat.core.entity.page.PageRequest;
+import com.iamberry.wechat.core.entity.page.PagedResult;
 import com.iamberry.wechat.face.channel.ChildChannelService;
 import com.iamberry.wechat.service.mapper.ChildChannelMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import util.PageUtil;
 
 import java.util.List;
 
@@ -18,12 +23,14 @@ public class ChildChannelServiceImpl  implements ChildChannelService {
     private ChildChannelMapper childChannelMapper;
     /**
      * 获取集合
-     * @param  childChannel
+     * @param
      * @return List
      */
     @Override
-    public List<ChildChannel> getChildChannelList(ChildChannel  childChannel){
-        return  childChannelMapper.getChildChannelList(childChannel);
+    public PagedResult<ChildChannel> getChildChannelList(PageRequest<ChildChannel> pageRequest){
+        PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());
+        List<ChildChannel> customerBasicList = childChannelMapper.getChildChannelList(pageRequest.getData());
+        return PageUtil.getPage(customerBasicList);
     }
     /**
      * 查询单条数据

+ 10 - 3
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/MainChannelServiceImpl.java

@@ -1,10 +1,15 @@
 package com.iamberry.wechat.service.channel;
 
+import com.github.pagehelper.PageHelper;
+import com.iamberry.wechat.core.entity.channel.ChannelRebate;
 import com.iamberry.wechat.core.entity.channel.MainChannel;
+import com.iamberry.wechat.core.entity.page.PageRequest;
+import com.iamberry.wechat.core.entity.page.PagedResult;
 import com.iamberry.wechat.face.channel.MainChannelService;
 import com.iamberry.wechat.service.mapper.MainChannelMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import util.PageUtil;
 
 import java.util.List;
 
@@ -19,12 +24,14 @@ public class MainChannelServiceImpl  implements MainChannelService {
     private MainChannelMapper mainChannelMapper;
     /**
      * 获取集合
-     * @param  mainChannel
+     * @param
      * @return List
      */
     @Override
-    public List<MainChannel> getMainChannelList(MainChannel  mainChannel){
-        return  mainChannelMapper.getMainChannelList(mainChannel);
+    public PagedResult<MainChannel> getMainChannelList(PageRequest<MainChannel> pageRequest){
+        PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());
+        List<MainChannel> customerBasicList = mainChannelMapper.getMainChannelList(pageRequest.getData());
+        return PageUtil.getPage(customerBasicList);
     }
     /**
      * 查询单条数据

+ 3 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/channelRebateMapper.xml

@@ -61,6 +61,9 @@
             <if test="rebackChannelId != null  and rebackChannelId != ''">
                 AND t.reback_channel_id = #{rebackChannelId}
             </if >
+            <if test="rebackChannelType != null  and rebackChannelType != ''">
+                AND t.reback_channel_type = #{rebackChannelType}
+            </if >
         </where>
     </select>
     <select id="getChannelRebateById" resultMap="BaseResultMap" parameterType="Integer" >

+ 24 - 12
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/childChannelMapper.xml

@@ -8,7 +8,6 @@
         <result    column="child_channel_name"    property="childChannelName" />
         <result    column="child_channel_docking_name"    property="childChannelDockingName" />
         <result    column="child_channel_docking_tel"    property="childChannelDockingTel" />
-        <result    column="child_channel_balance"    property="childChannelBalance" />
         <result    column="child_channel_bank"    property="childChannelBank" />
         <result    column="child_channel_bank_account"    property="childChannelBankAccount" />
         <result    column="child_channel_bank_name"    property="childChannelBankName" />
@@ -26,7 +25,6 @@
         t.child_channel_name,
         t.child_channel_docking_name,
         t.child_channel_docking_tel,
-        t.child_channel_balance,
         t.child_channel_bank,
         t.child_channel_bank_account,
         t.child_channel_bank_name,
@@ -37,10 +35,32 @@
         t.child_channel_create_time,
         t.child_channel_update_time
     </sql>
-    <select id="getChildChannelList" resultMap="BaseResultMap" parameterType="ChildChannel" >
+    <select id="getChildChannelList" resultType="ChildChannel" parameterType="ChildChannel" >
         select
-        <include refid="Base_List" />
+        t.child_channel_id,
+        t.child_channel_open_id,
+        t.main_channel_id,
+        t.child_channel_name,
+        t.child_channel_docking_name,
+        t.child_channel_docking_tel,
+        t.child_channel_bank,
+        t.child_channel_bank_account,
+        t.child_channel_bank_name,
+        t.child_channel_bank_branch,
+        t.child_channel_qrcode,
+        t.child_channel_status,
+        t.child_channel_desc,
+        t.child_channel_create_time,
+        t.child_channel_update_time,
+        mt.main_channel_name,
+        SUM(cr.reback_amount) rebackAmount
         from tb_iamberry_child_channel t
+        left JOIN tb_iamberry_main_channel mt
+        ON t.main_channel_id = mt.main_channel_id
+        left JOIN tb_iamberry_channel_rebate cr
+        on t.child_channel_id = cr.reback_channel_id
+        where cr.reback_channel_type = 2
+        GROUP BY child_channel_id
         <where>
             <if test="childChannelId != null ">
                 AND t.child_channel_id = #{childChannelId}
@@ -60,9 +80,6 @@
             <if test="childChannelDockingTel != null and childChannelDockingTel != ''">
                 AND t.child_channel_docking_tel  like  CONCAT ('%',#{childChannelDockingTel},'%')
             </if >
-            <if test="childChannelBalance != null ">
-                AND t.child_channel_balance = #{childChannelBalance}
-            </if >
             <if test="childChannelBank != null and childChannelBank != ''">
                 AND t.child_channel_bank = #{childChannelBank}
             </if >
@@ -89,7 +106,6 @@
         child_channel_name,
         child_channel_docking_name,
         child_channel_docking_tel,
-        child_channel_balance,
         child_channel_bank,
         child_channel_bank_account,
         child_channel_bank_name,
@@ -105,7 +121,6 @@
         #{childChannelName},
         #{childChannelDockingName},
         #{childChannelDockingTel},
-        #{childChannelBalance},
         #{childChannelBank},
         #{childChannelBankAccount},
         #{childChannelBankName},
@@ -134,9 +149,6 @@
             <if test="childChannelDockingTel != null and childChannelDockingTel != ''">
                 child_channel_docking_tel = #{childChannelDockingTel},
             </if >
-            <if test="childChannelBalance != null ">
-                child_channel_balance = #{childChannelBalance},
-            </if >
             <if test="childChannelBank != null and childChannelBank != ''">
                 child_channel_bank = #{childChannelBank},
             </if >

+ 14 - 11
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/mainChannelMapper.xml

@@ -7,7 +7,6 @@
         <result    column="main_channel_name"    property="mainChannelName" />
         <result    column="main_channel_docking_name"    property="mainChannelDockingName" />
         <result    column="main_channel_docking_tel"    property="mainChannelDockingTel" />
-        <result    column="main_channel_balance"    property="mainChannelBalance" />
         <result    column="main_channel_bank"    property="mainChannelBank" />
         <result    column="main_channel_bank_account"    property="mainChannelBankAccount" />
         <result    column="main_channel_bank_name"    property="mainChannelBankName" />
@@ -24,7 +23,6 @@
         t.main_channel_name,
         t.main_channel_docking_name,
         t.main_channel_docking_tel,
-        t.main_channel_balance,
         t.main_channel_bank,
         t.main_channel_bank_account,
         t.main_channel_bank_name,
@@ -36,10 +34,15 @@
         t.main_channel_update_time
     </sql>
 
-    <select id="getMainChannelList" resultMap="BaseResultMap" parameterType="MainChannel" >
+    <select id="getMainChannelList" resultType="MainChannel" parameterType="MainChannel" >
         select
-        <include refid="Base_List" />
+        <include refid="Base_List" />,
+        SUM(cr.reback_amount) rebackAmount
         from tb_iamberry_main_channel t
+        left JOIN tb_iamberry_channel_rebate cr
+        on t.main_channel_id = cr.reback_channel_id
+        where cr.reback_channel_type = 1
+        GROUP BY t.main_channel_id
         <where>
             <if test="mainChannelId != null ">
                 AND t.main_channel_id = #{mainChannelId}
@@ -61,10 +64,15 @@
             </if >
         </where>
     </select>
-    <select id="getMainChannelById" resultMap="BaseResultMap" parameterType="Integer" >
+    <select id="getMainChannelById" resultType="MainChannel" parameterType="Integer" >
         select
-        <include refid="Base_List" />
+        <include refid="Base_List" />,
+        SUM(cr.reback_amount) rebackAmount
         from tb_iamberry_main_channel t
+        left JOIN tb_iamberry_channel_rebate cr
+        on t.main_channel_id = cr.reback_channel_id
+        where cr.reback_channel_type = 1
+        GROUP BY t.main_channel_id
         where t.main_channel_id= #{mainChannelId}
     </select>
     <insert id="save" parameterType="MainChannel" >
@@ -75,7 +83,6 @@
         main_channel_name,
         main_channel_docking_name,
         main_channel_docking_tel,
-        main_channel_balance,
         main_channel_bank,
         main_channel_bank_account,
         main_channel_bank_name,
@@ -90,7 +97,6 @@
         #{mainChannelName},
         #{mainChannelDockingName},
         #{mainChannelDockingTel},
-        #{mainChannelBalance},
         #{mainChannelBank},
         #{mainChannelBankAccount},
         #{mainChannelBankName},
@@ -116,9 +122,6 @@
             <if test="mainChannelDockingTel != null and mainChannelDockingTel != ''">
                 main_channel_docking_tel = #{mainChannelDockingTel},
             </if >
-            <if test="mainChannelBalance != null ">
-                main_channel_balance = #{mainChannelBalance},
-            </if >
             <if test="mainChannelBank != null and mainChannelBank != ''">
                 main_channel_bank = #{mainChannelBank},
             </if >

+ 89 - 3
tooth-wechat-web/src/main/java/com/iamberry/wechat/handles/channel/AdminChannelHandler.java

@@ -3,11 +3,15 @@ package com.iamberry.wechat.handles.channel;
 import com.iamberry.wechat.core.entity.ResultMsg;
 import com.iamberry.wechat.core.entity.banner.MessageDTO;
 import com.iamberry.wechat.core.entity.channel.ChannelRebate;
+import com.iamberry.wechat.core.entity.channel.ChildChannel;
+import com.iamberry.wechat.core.entity.channel.MainChannel;
 import com.iamberry.wechat.core.entity.coupon.AdminCouponItemDto;
 import com.iamberry.wechat.core.entity.page.PageRequest;
 import com.iamberry.wechat.core.entity.page.PagedResult;
 import com.iamberry.wechat.core.entity.receive.ChargerReceive;
 import com.iamberry.wechat.face.channel.ChannelRebateService;
+import com.iamberry.wechat.face.channel.ChildChannelService;
+import com.iamberry.wechat.face.channel.MainChannelService;
 import com.iamberry.wechat.face.coupon.AdminCouponItemService;
 import com.iamberry.wechat.tools.NameUtils;
 import com.iamberry.wechat.tools.ResultInfo;
@@ -25,6 +29,7 @@ import java.net.URLEncoder;
 import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 
 @Controller
@@ -33,6 +38,10 @@ public class AdminChannelHandler {
 	
 	@Autowired
 	private ChannelRebateService channelRebateService;
+	@Autowired
+	private MainChannelService mainChannelService;
+	@Autowired
+	private ChildChannelService childChannelService;
 
 	/**
 	 * 查询返利列表
@@ -81,13 +90,13 @@ public class AdminChannelHandler {
 	}
 
 	/**
-	 * 发货
+	 * 修改状态
 	 * 2018年2月24日
-	 * @author mzx
+	 * @author
 	 * @return
 	 */
 	@ResponseBody
-	@RequestMapping("/update_state")
+	@RequestMapping("/updateState")
 	public ResultMsg update_state(ChannelRebate channelRebate, HttpServletRequest request) throws Exception {
 		ResultMsg msg = new ResultMsg();
 		if(channelRebate.getRebateId() == null  || channelRebate.getRebackStatus() == null || "".equals(channelRebate.getRebateId())
@@ -97,6 +106,7 @@ public class AdminChannelHandler {
 			msg.setStatus(false);
 			return msg;
 		}
+		channelRebate.setRebackTime(new Date());
 		Integer flag = channelRebateService.update(channelRebate);
 		if(flag == 1){
 			msg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
@@ -110,4 +120,80 @@ public class AdminChannelHandler {
 			return msg;
 		}
 	}
+
+
+	/**
+	 * 查询主渠道列表
+	 *
+	 * @return
+	 * @author LJK
+	 * @date 时间
+	 */
+	@RequestMapping("/listMainChannel")
+	public ModelAndView listMainChannel(HttpServletRequest request, MainChannel mainChannel,
+										  @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+										  @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
+										  @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) {
+		ModelAndView mv = new ModelAndView("/admin/adminChannel/main_channel_list");
+		// 封装请求数据
+		PageRequest<MainChannel> pageRequest = new PageRequest<>(mainChannel, pageNO, pageSize, totalNum == 0);
+		// 查询订单列表
+		PagedResult<MainChannel> result = mainChannelService.getMainChannelList(pageRequest);
+		if (totalNum != 0) {
+			result.setTotal(totalNum);
+		}
+		StitchAttrUtil sa = StitchAttrUtil.getSa();
+		sa.setModelAndView(mainChannel, mv, "/admin/channel/listMainChannel", result);
+		return mv;
+	}
+
+	/**
+	 * 查询子渠道列表
+	 *
+	 * @return
+	 * @author LJK
+	 * @date 时间
+	 */
+	@RequestMapping("/listChildChannel")
+	public ModelAndView listCMainChannel(HttpServletRequest request, ChildChannel childChannel,
+										@RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+										@RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
+										@RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) {
+		ModelAndView mv = new ModelAndView("/admin/adminChannel/child_channel_list");
+		// 封装请求数据
+		PageRequest<ChildChannel> pageRequest = new PageRequest<>(childChannel, pageNO, pageSize, totalNum == 0);
+		// 查询订单列表
+		PagedResult<ChildChannel> result = childChannelService.getChildChannelList(pageRequest);
+		if (totalNum != 0) {
+			result.setTotal(totalNum);
+		}
+		StitchAttrUtil sa = StitchAttrUtil.getSa();
+		sa.setModelAndView(childChannel, mv, "/admin/channel/listChildChannel", result);
+		return mv;
+	}
+	/**
+	 * 结算
+	 *
+	 * @return
+	 * @author LJK
+	 */
+	@RequestMapping("/settlement")
+	public ModelAndView settlement(HttpServletRequest request) {
+		ModelAndView mv = new ModelAndView("/admin/adminChannel/settlement");
+		String rebackChannelId = request.getParameter("rebackChannelId");
+		String rebackChannelType = request.getParameter("rebackChannelType");
+		if(rebackChannelId == null || rebackChannelId.equals("")|| rebackChannelType == null || rebackChannelType.equals("")){
+			return mv;
+		}
+		if(rebackChannelType.equals("1")){
+			MainChannel mainChannel = mainChannelService.getMainChannelById(Integer.valueOf(rebackChannelId));
+			mv.addObject("info",mainChannel);
+		}
+		if(rebackChannelType.equals("2")){
+			ChildChannel childChannel = childChannelService.getChildChannelById(Integer.valueOf(rebackChannelId));
+			mv.addObject("info",childChannel);
+		}
+
+		return mv;
+	}
 }

+ 34 - 9
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/channelRebate_list.jsp

@@ -40,8 +40,9 @@
 					<select id="rebackStatus" name="rebackStatus" class="select">
                         <option value="">返利状态</option>
 						<option ${rebackStatus==1?'selected':'' } value="1">待返利</option>
-						<option ${rebackStatus==2?'selected':'' } value="2">已返利入账</option>
-						<option ${rebackStatus==3?'selected':'' } value="3">已取消</option>
+						<option ${rebackStatus==2?'selected':'' } value="2">已返利待打款</option>
+						<option ${rebackStatus==3?'selected':'' } value="3">已返利已打款</option>
+						<option ${rebackStatus==4?'selected':'' } value="4">已取消</option>
 					</select>
 		</span>
         <input name="salesOrderid" id="salesOrderid" value="${salesOrderid }" placeholder="订单编号" style="width: 150px" class="input-text" type="text">
@@ -56,7 +57,7 @@
         <table class="table table-border table-bordered table-bg">
             <thead>
             <tr>
-                <th scope="col" colspan="7">积分记录列表</th>
+                <th scope="col" colspan="10">积分记录列表</th>
             </tr>
             <tr class="text-c">
                 <th width="150">订单编号</th>
@@ -82,9 +83,13 @@
                 <td>${infolist.colorName}</td>
                 <td>${infolist.itemNum}</td>
                 <td>${infolist.rebackAmount}</td>
-                <td>${infolist.rebackStatus==1?'待返利':''}${infolist.rebackStatus==2?'已返利入账':''}${infolist.rebackStatus==3?'已取消':''}</td>
+                <td>${infolist.rebackStatus==1?'待返利':''}${infolist.rebackStatus==2?'已返利待打款':''}${infolist.rebackStatus==3?'已返利已打款':''}${infolist.rebackStatus==4?'已取消':''}</td>
                 <td><fmt:formatDate value="${infolist.rebackTime}" pattern="yyyy-MM-dd"/></td>
-                <td><a>标记已返利</a></td>
+                <td>
+                    <c:if test="${infolist.rebackStatus == 2 }">
+                        <a onclick="update_status(${infolist.rebateId})">标记已返利</a>
+                    </c:if>
+                </td>
                 </c:forEach>
                 </c:if>
                 <c:if test="${empty page.dataList}">
@@ -104,10 +109,30 @@
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script>
 <script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script>
 <script type="text/javascript">
-    /* $(document).ready(function(){
-     $('#beginDate').datepicker();//时间控件
-     $('#endDate').datepicker();
-     }); */
+
+    function update_status(id){
+        layer.confirm('确认要修改返利状态吗?',function(index){
+                $.ajax({
+                    url: '${pageContext.request.contextPath }/admin/channel/updateState',
+                    type: "POST",
+                    dataType: "json",
+                    data: {rebateId : id,rebackStatus : 3},
+                    error:function(data){
+                        layer.msg(data.status,{icon: 5,time:2000});
+                    },
+                    success:  function(data){
+                        if(data.status){
+                            layer.msg("已修改为已打款",{icon: 1,time:2000});
+                        }else{
+                            layer.msg("修改状态失败",{icon: 5,time:2000});
+                        }
+
+                    }
+                });
+            }
+        );
+
+    }
 </script>
 </body>
 </html>

+ 134 - 0
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/child_channel_list.jsp

@@ -0,0 +1,134 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+         pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <LINK rel="Bookmark" href="/favicon.ico">
+    <LINK rel="Shortcut Icon" href="/favicon.ico" />
+    <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
+    <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
+    <link href="${pageContext.request.contextPath }/common/admin/skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />
+    <link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
+    <link href="${pageContext.request.contextPath }/common/admin/css/style.css" rel="stylesheet" type="text/css" />
+
+    <!--[if IE 6]>
+    <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
+    <script>DD_belatedPNG.fix('*');</script>
+    <![endif]-->
+    <title>子渠道列表</title>
+</head>
+<body>
+<nav class="breadcrumb">
+    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
+    子渠道 <span class="c-gray en">&gt;</span> 子渠道列表 <a
+        class="btn btn-success radius r mr-20"
+        style="line-height: 1.6em; margin-top: 3px"
+        href="javascript:location.replace(location.href);" title="刷新"><i
+        class="Hui-iconfont">&#xe68f;</i></a>
+</nav>
+<div class="pd-20">
+    <form action="${pageContext.request.contextPath }/admin/channel/listChildChannel" method="post" style="margin-bottom: 20px;text-align: center;">
+       <input name="childChannelName" id="childChannelName" value="${childChannelName }" placeholder="渠道名称" style="width: 150px" class="input-text" type="text">
+       <input name="childChannelDockingName" id="childChannelDockingName" value="${childChannelDockingName }" placeholder="对接人名称" style="width: 150px" class="input-text" type="text">
+       <input name="childChannelDockingTel" id="childChannelDockingTel" value="${childChannelDockingTel }" placeholder="对接人手机" style="width: 150px" class="input-text" type="text">
+       <button name="" id="submitBtn" class="btn btn-success" type="submit">
+            <i class="Hui-iconfont"></i> 搜索
+        </button>
+
+    </form>
+    <form id="goodsform" >
+        <table class="table table-border table-bordered table-bg">
+            <thead>
+            <tr>
+                <th scope="col" colspan="11">子渠道列表</th>
+            </tr>
+            <tr class="text-c">
+                <th width="150">渠道名称</th>
+                <th width="150">所属渠道</th>
+                <th width="150">对接人</th>
+                <th width="90">对接人手机</th>
+                <th width="90">账户余额</th>
+                <th width="130">账户银行</th>
+                <th width="100">收款账号</th>
+                <th width="100">开户名称</th>
+                <th width="100">开户支行</th>
+                <th width="100">备注</th>
+                <th width="100">添加日期</th>
+                <th width="100">操作</th>
+            </tr>
+            </thead>
+            <tbody>
+            <c:if test="${! (empty page.dataList) }">
+            <c:forEach items="${page.dataList }" var="infolist">
+            <tr class="text-c">
+                <td>${infolist.childChannelName }</td>
+                <td>${infolist.mainChannelName }</td>
+                <td>${infolist.childChannelDockingName }</td>
+                <td>${infolist.childChannelDockingTel }</td>
+                <td>${infolist.rebackAmount }</td>
+                <td>${infolist.childChannelBank }</td>
+                <td>${infolist.childChannelBankAccount}</td>
+                <td>${infolist.childChannelBankName}</td>
+                <td>${infolist.childChannelBankBranch}</td>
+                <td>${infolist.childChannelDesc}</td>
+                <td><fmt:formatDate value="${infolist.childChannelCreateTime}" pattern="yyyy-MM-dd"/></td>
+                <td>
+                    <a onclick="toRebateList(${infolist.mainChannelId})">查看明细</a>
+                </td>
+                </c:forEach>
+                </c:if>
+                <c:if test="${empty page.dataList}">
+                    <tr align="center"><td colspan="11" style="text-align: center;">未查询到该类数据!</td></tr>
+                </c:if>
+            </tbody>
+        </table>
+        <div align="right" class="mt-10 mb-10 mr-10">
+            <%@include file="/common/other/paper/pager.jsp"%>
+        </div>
+    </form>
+</div>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    /*function update_status(id){
+        layer.confirm('确认要修改返利状态吗?',function(index){
+                $.ajax({
+                    url: '${pageContext.request.contextPath }/admin/channel/updateState',
+                    type: "POST",
+                    dataType: "json",
+                    data: {rebateId : id,rebackStatus : 3},
+                    error:function(data){
+                        layer.msg(data.status,{icon: 5,time:2000});
+                    },
+                    success:  function(data){
+                        if(data.status){
+                            layer.msg("已修改为已打款",{icon: 1,time:2000});
+                        }else{
+                            layer.msg("修改状态失败",{icon: 5,time:2000});
+                        }
+
+                    }
+                });
+            }
+        );
+
+    }*/
+    function toRebateList(id) {
+        window.location.href = '${pageContext.request.contextPath }/admin/channel/listChannelRebate?rebackChannelType=2&rebackChannelId='+id;
+    }
+</script>
+</body>
+</html>

+ 188 - 0
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/main_channel_list.jsp

@@ -0,0 +1,188 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+         pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <LINK rel="Bookmark" href="/favicon.ico">
+    <LINK rel="Shortcut Icon" href="/favicon.ico" />
+    <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
+    <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
+    <link href="${pageContext.request.contextPath }/common/admin/skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />
+    <link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
+    <link href="${pageContext.request.contextPath }/common/admin/css/style.css" rel="stylesheet" type="text/css" />
+
+    <!--[if IE 6]>
+    <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
+    <script>DD_belatedPNG.fix('*');</script>
+    <![endif]-->
+    <title>主渠道列表</title>
+</head>
+<body>
+<nav class="breadcrumb">
+    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
+    返利记录 <span class="c-gray en">&gt;</span> 主渠道列表 <a
+        class="btn btn-success radius r mr-20"
+        style="line-height: 1.6em; margin-top: 3px"
+        href="javascript:location.replace(location.href);" title="刷新"><i
+        class="Hui-iconfont">&#xe68f;</i></a>
+</nav>
+<div class="pd-20">
+    <form action="${pageContext.request.contextPath }/admin/channel/listMainChannel" method="post" style="margin-bottom: 20px;text-align: center;">
+       <input name="mainChannelName" id="mainChannelName" value="${mainChannelName }" placeholder="渠道名称" style="width: 150px" class="input-text" type="text">
+       <input name="mainChannelDockingName" id="mainChannelDockingName" value="${mainChannelDockingName }" placeholder="对接人名称" style="width: 150px" class="input-text" type="text">
+       <input name="mainChannelDockingTel" id="mainChannelDockingTel" value="${mainChannelDockingTel }" placeholder="对接人手机" style="width: 150px" class="input-text" type="text">
+       <button name="" id="submitBtn" class="btn btn-success" type="submit">
+            <i class="Hui-iconfont"></i> 搜索
+        </button>
+
+    </form>
+    <form id="goodsform" >
+        <table class="table table-border table-bordered table-bg">
+            <thead>
+            <tr>
+                <th scope="col" colspan="11">主渠道列表</th>
+            </tr>
+            <tr class="text-c">
+                <th width="150">渠道名称</th>
+                <th width="150">对接人</th>
+                <th width="90">对接人手机</th>
+                <th width="90">账户余额</th>
+                <th width="130">账户银行</th>
+                <th width="100">收款账号</th>
+                <th width="100">开户名称</th>
+                <th width="100">开户支行</th>
+                <th width="100">备注</th>
+                <th width="100">添加日期</th>
+                <th width="100">操作</th>
+            </tr>
+            </thead>
+            <tbody>
+            <c:if test="${! (empty page.dataList) }">
+            <c:forEach items="${page.dataList }" var="infolist">
+            <tr class="text-c">
+                <td>${infolist.mainChannelName }</td>
+                <td>${infolist.mainChannelDockingName }</td>
+                <td>${infolist.mainChannelDockingTel }</td>
+                <td>${infolist.rebackAmount }</td>
+                <td>${infolist.mainChannelBank }</td>
+                <td>${infolist.mainChannelBankAccount}</td>
+                <td>${infolist.mainChannelBankName}</td>
+                <td>${infolist.mainChannelBankBranch}</td>
+                <td>${infolist.mainChannelDesc}</td>
+                <td><fmt:formatDate value="${infolist.mainChannelCreateTime}" pattern="yyyy-MM-dd"/></td>
+                <td>
+                    <a onclick="toRebateList(${infolist.mainChannelId})">查看明细</a><br>
+                    <a href="#" onclick="settlement(${infolist.mainChannelId});">结算</a>
+                </td>
+                </c:forEach>
+                </c:if>
+                <c:if test="${empty page.dataList}">
+                    <tr align="center"><td colspan="10" style="text-align: center;">未查询到该类数据!</td></tr>
+                </c:if>
+            </tbody>
+        </table>
+        <div align="right" class="mt-10 mb-10 mr-10">
+            <%@include file="/common/other/paper/pager.jsp"%>
+        </div>
+    </form>
+    <div class="layui-layer layui-anim layui-layer-iframe" id="layui-layer4" times="4" showtime="0" contype="string" style="display:none;z-index: 19891018; width: 550px; height: 360px; position: absolute; top: 100px; left: 379px;">
+        <div class="layui-layer-title" id="sendOrderNote" style="cursor: move;" move="ok">结算</div>
+        <br>
+        <div class="row cl">
+            <label class="form-label col-2">&nbsp;&nbsp;渠道名称:</label>
+            <div class="formControls col-3">
+                    <span class="">
+                        鄂锐鄂锐
+					</span>
+            </div>
+        </div>
+        <div class="row cl">
+            <label class="form-label col-2">&nbsp;&nbsp;本次金额:</label>
+            <div class="formControls col-3">
+                        <span class="">
+                            10000元
+                        </span>
+            </div>
+        </div>
+        <br>
+        <div class="row cl">
+            <div class="formControls col-5">
+            <table class="table table-border table-bordered table-bg" style="width: 450px;">
+                <thead>
+                <tr class="text-c">
+                    <th width="150">账户银行</th>
+                    <th width="150">收款账号</th>
+                    <th width="150">开户名称</th>
+                    <th width="90">开户支行</th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr class="text-c">
+                    <td>1</td>
+                    <td>1</td>
+                    <td>1</td>
+                    <td>1</td>
+                </tbody>
+            </table>
+            </div>
+        </div>
+        <br>
+
+        <div class="col-9 col-offset-3">
+            <input class="btn btn-danger" type="button" onclick="remrakSumbit()" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
+        </div>
+        <span class="layui-layer-setwin">
+			<a class="layui-layer-ico layui-layer-close layui-layer-close1" onclick="exitWindowsDiv(this)" href="javascript:;"></a>
+		</span>
+    </div>
+</div>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    /*function update_status(id){
+        layer.confirm('确认要修改返利状态吗?',function(index){
+                $.ajax({
+                    url: '${pageContext.request.contextPath }/admin/channel/updateState',
+                    type: "POST",
+                    dataType: "json",
+                    data: {rebateId : id,rebackStatus : 3},
+                    error:function(data){
+                        layer.msg(data.status,{icon: 5,time:2000});
+                    },
+                    success:  function(data){
+                        if(data.status){
+                            layer.msg("已修改为已打款",{icon: 1,time:2000});
+                        }else{
+                            layer.msg("修改状态失败",{icon: 5,time:2000});
+                        }
+
+                    }
+                });
+            }
+        );
+
+    }*/
+    function toRebateList(id) {
+        window.location.href = '${pageContext.request.contextPath }/admin/channel/listChannelRebate?rebackChannelType=1&rebackChannelId='+id;
+    }
+
+    function settlement(type,id) {
+        $("#layui-layer4").show();
+    }
+
+</script>
+</body>
+</html>

+ 124 - 0
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/adminChannel/settlement.jsp

@@ -0,0 +1,124 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+         pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <LINK rel="Bookmark" href="/favicon.ico">
+    <LINK rel="Shortcut Icon" href="/favicon.ico" />
+    <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
+    <link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
+    <link href="${pageContext.request.contextPath }/common/admin/skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />
+    <link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
+    <link href="${pageContext.request.contextPath }/common/admin/css/style.css" rel="stylesheet" type="text/css" />
+
+    <!--[if IE 6]>
+    <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
+    <script>DD_belatedPNG.fix('*');</script>
+    <![endif]-->
+    <title>结算</title>
+</head>
+<body>
+<nav class="breadcrumb">
+    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
+    渠道 <span class="c-gray en">&gt;</span> 结算
+</nav>
+<div class="pd-20">
+    <div class="layui-layer layui-anim layui-layer-iframe" id="layui-remark" times="4" showtime="0" contype="string" style="display:none;z-index: 19891018; width: 600px; height: 400px; position: absolute; top: 100px; left: 379px;">
+            <div class="layui-layer-title" id="sendOrderNote" style="cursor: move;" move="ok">结算</div>
+            <br>
+            <div class="row cl">
+                <label class="form-label col-3"><span class="c-red">*</span>&nbsp;&nbsp;渠道名称:</label>
+                <div class="formControls col-5">
+                    <span class="">
+                        鄂锐鄂锐
+					</span>
+                </div>
+            </div>
+            <div class="row cl">
+                <label class="form-label col-3"><span class="c-red">*</span>&nbsp;&nbsp;本次金额:</label>
+                <div class="formControls col-5">
+                        <span class="">
+                            10000元
+                        </span>
+                </div>
+            </div>
+            <br>
+            <div class="row cl">
+                <table class="table table-border table-bordered table-bg">
+                    <thead>
+                    <tr class="text-c">
+                        <th width="150">账户银行</th>
+                        <th width="150">收款账号</th>
+                        <th width="150">开户名称</th>
+                        <th width="90">开户支行</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr class="text-c">
+                        <td>1</td>
+                        <td>1</td>
+                        <td>1</td>
+                        <td>1</td>
+                    </tbody>
+                </table>
+            </div>
+            <br>
+
+            <div class="col-9 col-offset-3">
+                <input class="btn btn-danger" type="button" onclick="remrakSumbit()" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
+            </div>
+        <span class="layui-layer-setwin">
+			<a class="layui-layer-ico layui-layer-close layui-layer-close1" onclick="exitWindowsDiv(this)" href="javascript:;"></a>
+		</span>
+    </div>
+</div>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script>
+<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    /*function update_status(id){
+        layer.confirm('确认要修改返利状态吗?',function(index){
+                $.ajax({
+                    url: '${pageContext.request.contextPath }/admin/channel/updateState',
+                    type: "POST",
+                    dataType: "json",
+                    data: {rebateId : id,rebackStatus : 3},
+                    error:function(data){
+                        layer.msg(data.status,{icon: 5,time:2000});
+                    },
+                    success:  function(data){
+                        if(data.status){
+                            layer.msg("已修改为已打款",{icon: 1,time:2000});
+                        }else{
+                            layer.msg("修改状态失败",{icon: 5,time:2000});
+                        }
+
+                    }
+                });
+            }
+        );
+
+    }*/
+    function toRebateList(id) {
+        window.location.href = '${pageContext.request.contextPath }/admin/channel/listChannelRebate?rebackChannelType=1&rebackChannelId='+id;
+    }
+
+    function settlement(title, url, w, h) {
+        layer_show(title,url,w,h);
+    }
+
+</script>
+</body>
+</html>