Sfoglia il codice sorgente

上朵分销系统

wangxiaoming 6 anni fa
parent
commit
216194db4e
21 ha cambiato i file con 1612 aggiunte e 0 eliminazioni
  1. 90 0
      tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/ChannelPrice.java
  2. 101 0
      tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/ChannelRebate.java
  3. 161 0
      tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/ChildChannel.java
  4. 151 0
      tooth-common-core/src/main/java/com/iamberry/wechat/core/entity/channel/MainChannel.java
  5. 55 0
      tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/ChannelPriceService.java
  6. 37 0
      tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/ChannelRebateService.java
  7. 37 0
      tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/ChildChannelService.java
  8. 37 0
      tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/MainChannelService.java
  9. 83 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/ChannelPriceServiceImpl.java
  10. 56 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/ChannelRebateServiceImpl.java
  11. 55 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/ChildChannelServiceImpl.java
  12. 56 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/MainChannelServiceImpl.java
  13. 55 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/ChannelPriceMapper.java
  14. 37 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/ChannelRebateMapper.java
  15. 37 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/ChildChannelMapper.java
  16. 37 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/MainChannelMapper.java
  17. 130 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/channelPriceMapper.xml
  18. 97 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/channelRebateMapper.xml
  19. 148 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/childChannelMapper.xml
  20. 138 0
      tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/mainChannelMapper.xml
  21. 14 0
      tooth-wechat-web/src/main/resources/iamberry-wechat-service-mybatis.xml

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

@@ -0,0 +1,90 @@
+package com.iamberry.wechat.core.entity.channel;
+import  java.util.Date;
+import  java.io.Serializable;
+/**
+ *  渠道对应产品返利价格表类
+ * @author xm
+ * @Date 2018-07-23
+ */
+public class ChannelPrice  implements  Serializable{
+    //返利价格id
+    private Integer channelPriceId;
+    //渠道id
+    private Integer channelId;
+    //产品id
+    private Integer productId;
+    //颜色id
+    private Integer colorId;
+    //价格
+    private Integer channelPriceOffer;
+    //状态:1使用中 2:未使用
+    private Integer channelPriceStatus;
+    //创建时间
+    private Date channelPriceCreateTime;
+    //修改时间'
+    private Date channelPriceUpdateTime;
+
+    public Integer getChannelPriceId(){
+        return channelPriceId;
+    }
+
+    public void setChannelPriceId(Integer  channelPriceId){
+        this.channelPriceId=channelPriceId;
+    }
+
+    public Integer getChannelId(){
+        return channelId;
+    }
+
+    public void setChannelId(Integer  channelId){
+        this.channelId=channelId;
+    }
+
+    public Integer getProductId(){
+        return productId;
+    }
+
+    public void setProductId(Integer  productId){
+        this.productId=productId;
+    }
+
+    public Integer getColorId(){
+        return colorId;
+    }
+
+    public void setColorId(Integer  colorId){
+        this.colorId=colorId;
+    }
+
+    public Integer getChannelPriceOffer(){
+        return channelPriceOffer;
+    }
+
+    public void setChannelPriceOffer(Integer  channelPriceOffer){
+        this.channelPriceOffer=channelPriceOffer;
+    }
+
+    public Integer getChannelPriceStatus(){
+        return channelPriceStatus;
+    }
+
+    public void setChannelPriceStatus(Integer  channelPriceStatus){
+        this.channelPriceStatus=channelPriceStatus;
+    }
+
+    public Date getChannelPriceCreateTime(){
+        return channelPriceCreateTime;
+    }
+
+    public void setChannelPriceCreateTime(Date  channelPriceCreateTime){
+        this.channelPriceCreateTime=channelPriceCreateTime;
+    }
+
+    public Date getChannelPriceUpdateTime(){
+        return channelPriceUpdateTime;
+    }
+
+    public void setChannelPriceUpdateTime(Date  channelPriceUpdateTime){
+        this.channelPriceUpdateTime=channelPriceUpdateTime;
+    }
+}

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

@@ -0,0 +1,101 @@
+package com.iamberry.wechat.core.entity.channel;
+
+import  java.util.Date;
+import  java.io.Serializable;
+/**
+ *  上朵分销返利记录类
+ * @author xm
+ * @Date 2018-07-23
+ */
+public class ChannelRebate  implements  Serializable{
+    //返利id
+    private Integer rebateId;
+    //订单号
+    private String rebateSalesOrderId;
+    //订单人openid
+    private String rebackFromOpenId;
+    //返利渠道 渠道id-返利到该渠道
+    private Integer rebackChannelId;
+    //返利金额
+    private Integer rebackAmount;
+    //返利状态 1:待返利 2:已返利入账 3:已取消
+    private Integer rebackStatus;
+    //返利时间
+    private Date rebackTime;
+    //创建时间
+    private Date rebackCreateTime;
+    //修改时间'
+    private Date rebackUpdateTime;
+
+    public Integer getRebateId(){
+        return rebateId;
+    }
+
+    public void setRebateId(Integer  rebateId){
+        this.rebateId=rebateId;
+    }
+
+    public String getRebateSalesOrderId(){
+        return rebateSalesOrderId;
+    }
+
+    public void setRebateSalesOrderId(String  rebateSalesOrderId){
+        this.rebateSalesOrderId=rebateSalesOrderId;
+    }
+
+    public String getRebackFromOpenId(){
+        return rebackFromOpenId;
+    }
+
+    public void setRebackFromOpenId(String  rebackFromOpenId){
+        this.rebackFromOpenId=rebackFromOpenId;
+    }
+
+    public Integer getRebackChannelId(){
+        return rebackChannelId;
+    }
+
+    public void setRebackChannelId(Integer  rebackChannelId){
+        this.rebackChannelId=rebackChannelId;
+    }
+
+    public Integer getRebackAmount(){
+        return rebackAmount;
+    }
+
+    public void setRebackAmount(Integer  rebackAmount){
+        this.rebackAmount=rebackAmount;
+    }
+
+    public Integer getRebackStatus(){
+        return rebackStatus;
+    }
+
+    public void setRebackStatus(Integer  rebackStatus){
+        this.rebackStatus=rebackStatus;
+    }
+
+    public Date getRebackTime(){
+        return rebackTime;
+    }
+
+    public void setRebackTime(Date  rebackTime){
+        this.rebackTime=rebackTime;
+    }
+
+    public Date getRebackCreateTime(){
+        return rebackCreateTime;
+    }
+
+    public void setRebackCreateTime(Date  rebackCreateTime){
+        this.rebackCreateTime=rebackCreateTime;
+    }
+
+    public Date getRebackUpdateTime(){
+        return rebackUpdateTime;
+    }
+
+    public void setRebackUpdateTime(Date  rebackUpdateTime){
+        this.rebackUpdateTime=rebackUpdateTime;
+    }
+}

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

@@ -0,0 +1,161 @@
+package com.iamberry.wechat.core.entity.channel;
+
+import  java.util.Date;
+import  java.io.Serializable;
+/**
+ *  子渠道基本信息类
+ * @author xm
+ * @Date 2018-07-23
+ */
+public class ChildChannel  implements  Serializable{
+    //渠道id
+    private Integer childChannelId;
+    //openid
+    private String childChannelOpenId;
+    //主渠道id
+    private Integer mainChannelId;
+    //渠道名称
+    private String childChannelName;
+    //对接人
+    private String childChannelDockingName;
+    //对接人手机
+    private String childChannelDockingTel;
+    //账户余额
+    private Integer childChannelBalance;
+    //账户银行
+    private String childChannelBank;
+    //账户银行账号
+    private String childChannelBankAccount;
+    //开户名称
+    private String childChannelBankName;
+    //开户支行
+    private String childChannelBankBranch;
+    //状态1:使用中 2:未使用
+    private Integer childChannelStatus;
+    //备注
+    private String childChannelDesc;
+    //创建时间
+    private Date childChannelCreateTime;
+    //修改时间'
+    private Date childChannelUpdateTime;
+
+    public Integer getChildChannelId(){
+        return childChannelId;
+    }
+
+    public void setChildChannelId(Integer  childChannelId){
+        this.childChannelId=childChannelId;
+    }
+
+    public String getChildChannelOpenId(){
+        return childChannelOpenId;
+    }
+
+    public void setChildChannelOpenId(String  childChannelOpenId){
+        this.childChannelOpenId=childChannelOpenId;
+    }
+
+    public Integer getMainChannelId(){
+        return mainChannelId;
+    }
+
+    public void setMainChannelId(Integer  mainChannelId){
+        this.mainChannelId=mainChannelId;
+    }
+
+    public String getChildChannelName(){
+        return childChannelName;
+    }
+
+    public void setChildChannelName(String  childChannelName){
+        this.childChannelName=childChannelName;
+    }
+
+    public String getChildChannelDockingName(){
+        return childChannelDockingName;
+    }
+
+    public void setChildChannelDockingName(String  childChannelDockingName){
+        this.childChannelDockingName=childChannelDockingName;
+    }
+
+    public String getChildChannelDockingTel(){
+        return childChannelDockingTel;
+    }
+
+    public void setChildChannelDockingTel(String  childChannelDockingTel){
+        this.childChannelDockingTel=childChannelDockingTel;
+    }
+
+    public Integer getChildChannelBalance(){
+        return childChannelBalance;
+    }
+
+    public void setChildChannelBalance(Integer  childChannelBalance){
+        this.childChannelBalance=childChannelBalance;
+    }
+
+    public String getChildChannelBank(){
+        return childChannelBank;
+    }
+
+    public void setChildChannelBank(String  childChannelBank){
+        this.childChannelBank=childChannelBank;
+    }
+
+    public String getChildChannelBankAccount(){
+        return childChannelBankAccount;
+    }
+
+    public void setChildChannelBankAccount(String  childChannelBankAccount){
+        this.childChannelBankAccount=childChannelBankAccount;
+    }
+
+    public String getChildChannelBankName(){
+        return childChannelBankName;
+    }
+
+    public void setChildChannelBankName(String  childChannelBankName){
+        this.childChannelBankName=childChannelBankName;
+    }
+
+    public String getChildChannelBankBranch(){
+        return childChannelBankBranch;
+    }
+
+    public void setChildChannelBankBranch(String  childChannelBankBranch){
+        this.childChannelBankBranch=childChannelBankBranch;
+    }
+
+    public Integer getChildChannelStatus(){
+        return childChannelStatus;
+    }
+
+    public void setChildChannelStatus(Integer  childChannelStatus){
+        this.childChannelStatus=childChannelStatus;
+    }
+
+    public String getChildChannelDesc(){
+        return childChannelDesc;
+    }
+
+    public void setChildChannelDesc(String  childChannelDesc){
+        this.childChannelDesc=childChannelDesc;
+    }
+
+    public Date getChildChannelCreateTime(){
+        return childChannelCreateTime;
+    }
+
+    public void setChildChannelCreateTime(Date  childChannelCreateTime){
+        this.childChannelCreateTime=childChannelCreateTime;
+    }
+
+    public Date getChildChannelUpdateTime(){
+        return childChannelUpdateTime;
+    }
+
+    public void setChildChannelUpdateTime(Date  childChannelUpdateTime){
+        this.childChannelUpdateTime=childChannelUpdateTime;
+    }
+}

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

@@ -0,0 +1,151 @@
+package com.iamberry.wechat.core.entity.channel;
+
+import  java.util.Date;
+import  java.io.Serializable;
+/**
+ *  主渠道基本信息类
+ * @author xm
+ * @Date 2018-07-23
+ */
+public class MainChannel  implements  Serializable{
+    //渠道id
+    private Integer mainChannelId;
+    //openid
+    private String mainChannelOpenId;
+    //渠道名称
+    private String mainChannelName;
+    //对接人
+    private String mainChannelDockingName;
+    //对接人手机
+    private String mainChannelDockingTel;
+    //账户余额
+    private Integer mainChannelBalance;
+    //账户银行
+    private String mainChannelBank;
+    //账户银行账号
+    private String mainChannelBankAccount;
+    //开户名称
+    private String mainChannelBankName;
+    //开户支行
+    private String mainChannelBankBranch;
+    //状态1:使用中 2:未使用
+    private Integer mainChannelStatus;
+    //备注
+    private String mainChannelDesc;
+    //创建时间
+    private Date mainChannelCreateTime;
+    //修改时间'
+    private Date mainChannelUpdateTime;
+
+    public Integer getMainChannelId(){
+        return mainChannelId;
+    }
+
+    public void setMainChannelId(Integer  mainChannelId){
+        this.mainChannelId=mainChannelId;
+    }
+
+    public String getMainChannelOpenId(){
+        return mainChannelOpenId;
+    }
+
+    public void setMainChannelOpenId(String  mainChannelOpenId){
+        this.mainChannelOpenId=mainChannelOpenId;
+    }
+
+    public String getMainChannelName(){
+        return mainChannelName;
+    }
+
+    public void setMainChannelName(String  mainChannelName){
+        this.mainChannelName=mainChannelName;
+    }
+
+    public String getMainChannelDockingName(){
+        return mainChannelDockingName;
+    }
+
+    public void setMainChannelDockingName(String  mainChannelDockingName){
+        this.mainChannelDockingName=mainChannelDockingName;
+    }
+
+    public String getMainChannelDockingTel(){
+        return mainChannelDockingTel;
+    }
+
+    public void setMainChannelDockingTel(String  mainChannelDockingTel){
+        this.mainChannelDockingTel=mainChannelDockingTel;
+    }
+
+    public Integer getMainChannelBalance(){
+        return mainChannelBalance;
+    }
+
+    public void setMainChannelBalance(Integer  mainChannelBalance){
+        this.mainChannelBalance=mainChannelBalance;
+    }
+
+    public String getMainChannelBank(){
+        return mainChannelBank;
+    }
+
+    public void setMainChannelBank(String  mainChannelBank){
+        this.mainChannelBank=mainChannelBank;
+    }
+
+    public String getMainChannelBankAccount(){
+        return mainChannelBankAccount;
+    }
+
+    public void setMainChannelBankAccount(String  mainChannelBankAccount){
+        this.mainChannelBankAccount=mainChannelBankAccount;
+    }
+
+    public String getMainChannelBankName(){
+        return mainChannelBankName;
+    }
+
+    public void setMainChannelBankName(String  mainChannelBankName){
+        this.mainChannelBankName=mainChannelBankName;
+    }
+
+    public String getMainChannelBankBranch(){
+        return mainChannelBankBranch;
+    }
+
+    public void setMainChannelBankBranch(String  mainChannelBankBranch){
+        this.mainChannelBankBranch=mainChannelBankBranch;
+    }
+
+    public Integer getMainChannelStatus(){
+        return mainChannelStatus;
+    }
+
+    public void setMainChannelStatus(Integer  mainChannelStatus){
+        this.mainChannelStatus=mainChannelStatus;
+    }
+
+    public String getMainChannelDesc(){
+        return mainChannelDesc;
+    }
+
+    public void setMainChannelDesc(String  mainChannelDesc){
+        this.mainChannelDesc=mainChannelDesc;
+    }
+
+    public Date getMainChannelCreateTime(){
+        return mainChannelCreateTime;
+    }
+
+    public void setMainChannelCreateTime(Date  mainChannelCreateTime){
+        this.mainChannelCreateTime=mainChannelCreateTime;
+    }
+
+    public Date getMainChannelUpdateTime(){
+        return mainChannelUpdateTime;
+    }
+
+    public void setMainChannelUpdateTime(Date  mainChannelUpdateTime){
+        this.mainChannelUpdateTime=mainChannelUpdateTime;
+    }
+}

+ 55 - 0
tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/ChannelPriceService.java

@@ -0,0 +1,55 @@
+package com.iamberry.wechat.face.channel;
+
+import com.iamberry.wechat.core.entity.channel.ChannelPrice;
+
+import java.util.List;
+
+/**
+ *  渠道对应产品返利价格表接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+public interface ChannelPriceService {
+    /**
+     * 获取集合
+     * @param  channelPrice
+     * @return List
+     */
+    List<ChannelPrice> getChannelPriceList(ChannelPrice  channelPrice);
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  channelPrice
+     */
+    ChannelPrice  getChannelPriceById(Integer  id);
+    /**
+     * 增加数据
+     * @param  channelPrice
+     * @return Integer
+     */
+    Integer  save(ChannelPrice  channelPrice);
+    /**
+     * 修改数据
+     * @param  channelPrice
+     * @return Integer
+     */
+    Integer  update(ChannelPrice  channelPrice);
+    /**
+     * 删除数据
+     * @param  id
+     * @return Integer
+     */
+    Integer  delete(Integer  id);
+    /**
+     * 增加数据 <集合>
+     * @param  channelPriceList
+     * @return Integer
+     */
+    Integer  saveList(List<ChannelPrice>  channelPriceList);
+    /**
+     * 删除数据 <集合>
+     * @param  ids
+     * @return Integer
+     */
+    Integer  deleteList(Integer[]  ids);
+}

+ 37 - 0
tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/ChannelRebateService.java

@@ -0,0 +1,37 @@
+package com.iamberry.wechat.face.channel;
+
+import com.iamberry.wechat.core.entity.channel.ChannelRebate;
+
+import java.util.List;
+
+/**
+ *  上朵分销返利记录接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+public interface ChannelRebateService {
+    /**
+     * 获取集合
+     * @param  channelRebate
+     * @return List
+     */
+    List<ChannelRebate> getChannelRebateList(ChannelRebate  channelRebate);
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  channelRebate
+     */
+    ChannelRebate  getChannelRebateById(Integer  id);
+    /**
+     * 增加数据
+     * @param  channelRebate
+     * @return Integer
+     */
+    Integer  save(ChannelRebate  channelRebate);
+    /**
+     * 修改数据
+     * @param  channelRebate
+     * @return Integer
+     */
+    Integer  update(ChannelRebate  channelRebate);
+}

+ 37 - 0
tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/ChildChannelService.java

@@ -0,0 +1,37 @@
+package com.iamberry.wechat.face.channel;
+
+import com.iamberry.wechat.core.entity.channel.ChildChannel;
+
+import java.util.List;
+
+/**
+ *  子渠道基本信息接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+public interface ChildChannelService {
+    /**
+     * 获取集合
+     * @param  childChannel
+     * @return List
+     */
+    List<ChildChannel> getChildChannelList(ChildChannel childChannel);
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  childChannel
+     */
+    ChildChannel  getChildChannelById(Integer  id);
+    /**
+     * 增加数据
+     * @param  childChannel
+     * @return Integer
+     */
+    Integer  save(ChildChannel  childChannel);
+    /**
+     * 修改数据
+     * @param  childChannel
+     * @return Integer
+     */
+    Integer  update(ChildChannel  childChannel);
+}

+ 37 - 0
tooth-wechat-interface/src/main/java/com/iamberry/wechat/face/channel/MainChannelService.java

@@ -0,0 +1,37 @@
+package com.iamberry.wechat.face.channel;
+
+import com.iamberry.wechat.core.entity.channel.MainChannel;
+
+import java.util.List;
+
+/**
+ *  主渠道基本信息接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+public interface MainChannelService {
+    /**
+     * 获取集合
+     * @param  mainChannel
+     * @return List
+     */
+    List<MainChannel> getMainChannelList(MainChannel mainChannel);
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  mainChannel
+     */
+    MainChannel  getMainChannelById(Integer  id);
+    /**
+     * 增加数据
+     * @param  mainChannel
+     * @return Integer
+     */
+    Integer  save(MainChannel  mainChannel);
+    /**
+     * 修改数据
+     * @param  mainChannel
+     * @return Integer
+     */
+    Integer  update(MainChannel  mainChannel);
+}

+ 83 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/ChannelPriceServiceImpl.java

@@ -0,0 +1,83 @@
+package com.iamberry.wechat.service.channel;
+
+import com.iamberry.wechat.core.entity.channel.ChannelPrice;
+import com.iamberry.wechat.face.channel.ChannelPriceService;
+import com.iamberry.wechat.service.mapper.ChannelPriceMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *  渠道对应产品返利价格表接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+@Service
+public class ChannelPriceServiceImpl  implements ChannelPriceService {
+    @Autowired
+    private ChannelPriceMapper channelPriceMapper;
+    /**
+     * 获取集合
+     * @param  channelPrice
+     * @return List
+     */
+    @Override
+    public List<ChannelPrice> getChannelPriceList(ChannelPrice  channelPrice){
+        return  channelPriceMapper.getChannelPriceList(channelPrice);
+    }
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  channelPrice
+     */
+    @Override
+    public  ChannelPrice  getChannelPriceById(Integer  id){
+        return  channelPriceMapper.getChannelPriceById(id);
+    }
+    /**
+     * 增加数据
+     * @param  channelPrice
+     * @return Integer
+     */
+    @Override
+    public  Integer  save(ChannelPrice  channelPrice){
+        return  channelPriceMapper.save(channelPrice);
+    }
+    /**
+     * 修改数据
+     * @param  channelPrice
+     * @return Integer
+     */
+    @Override
+    public  Integer  update(ChannelPrice  channelPrice){
+        return  channelPriceMapper.update(channelPrice);
+    }
+    /**
+     * 删除数据
+     * @param  id
+     * @return Integer
+     */
+    @Override
+    public  Integer  delete(Integer  id){
+        return  channelPriceMapper.delete(id);
+    }
+    /**
+     * 增加数据 <集合>
+     * @param  channelPriceList
+     * @return Integer
+     */
+    @Override
+    public  Integer  saveList(List<ChannelPrice>  channelPriceList){
+        return  channelPriceMapper.saveList(channelPriceList);
+    }
+    /**
+     * 删除数据 <集合>
+     * @param  ids
+     * @return Integer
+     */
+    @Override
+    public  Integer  deleteList(Integer[]  ids){
+        return  channelPriceMapper.deleteList(ids);
+    }
+}

+ 56 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/ChannelRebateServiceImpl.java

@@ -0,0 +1,56 @@
+package com.iamberry.wechat.service.channel;
+
+import com.iamberry.wechat.core.entity.channel.ChannelRebate;
+import com.iamberry.wechat.face.channel.ChannelRebateService;
+import com.iamberry.wechat.service.mapper.ChannelRebateMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ *  上朵分销返利记录接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+@Service
+public class ChannelRebateServiceImpl  implements ChannelRebateService {
+    @Autowired
+    private ChannelRebateMapper channelRebateMapper;
+    /**
+     * 获取集合
+     * @param  channelRebate
+     * @return List
+     */
+    @Override
+    public List<ChannelRebate> getChannelRebateList(ChannelRebate  channelRebate){
+        return  channelRebateMapper.getChannelRebateList(channelRebate);
+    }
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  channelRebate
+     */
+    @Override
+    public  ChannelRebate  getChannelRebateById(Integer  id){
+        return  channelRebateMapper.getChannelRebateById(id);
+    }
+    /**
+     * 增加数据
+     * @param  channelRebate
+     * @return Integer
+     */
+    @Override
+    public  Integer  save(ChannelRebate  channelRebate){
+        return  channelRebateMapper.save(channelRebate);
+    }
+    /**
+     * 修改数据
+     * @param  channelRebate
+     * @return Integer
+     */
+    @Override
+    public  Integer  update(ChannelRebate  channelRebate){
+        return  channelRebateMapper.update(channelRebate);
+    }
+}

+ 55 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/ChildChannelServiceImpl.java

@@ -0,0 +1,55 @@
+package com.iamberry.wechat.service.channel;
+import com.iamberry.wechat.core.entity.channel.ChildChannel;
+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 java.util.List;
+
+/**
+ *  子渠道基本信息接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+@Service
+public class ChildChannelServiceImpl  implements ChildChannelService {
+    @Autowired
+    private ChildChannelMapper childChannelMapper;
+    /**
+     * 获取集合
+     * @param  childChannel
+     * @return List
+     */
+    @Override
+    public List<ChildChannel> getChildChannelList(ChildChannel  childChannel){
+        return  childChannelMapper.getChildChannelList(childChannel);
+    }
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  childChannel
+     */
+    @Override
+    public  ChildChannel  getChildChannelById(Integer  id){
+        return  childChannelMapper.getChildChannelById(id);
+    }
+    /**
+     * 增加数据
+     * @param  childChannel
+     * @return Integer
+     */
+    @Override
+    public  Integer  save(ChildChannel childChannel){
+        return  childChannelMapper.save(childChannel);
+    }
+    /**
+     * 修改数据
+     * @param  childChannel
+     * @return Integer
+     */
+    @Override
+    public  Integer  update(ChildChannel  childChannel){
+        return  childChannelMapper.update(childChannel);
+    }
+}

+ 56 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/channel/MainChannelServiceImpl.java

@@ -0,0 +1,56 @@
+package com.iamberry.wechat.service.channel;
+
+import com.iamberry.wechat.core.entity.channel.MainChannel;
+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 java.util.List;
+
+/**
+ *  主渠道基本信息接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+@Service
+public class MainChannelServiceImpl  implements MainChannelService {
+    @Autowired
+    private MainChannelMapper mainChannelMapper;
+    /**
+     * 获取集合
+     * @param  mainChannel
+     * @return List
+     */
+    @Override
+    public List<MainChannel> getMainChannelList(MainChannel  mainChannel){
+        return  mainChannelMapper.getMainChannelList(mainChannel);
+    }
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  mainChannel
+     */
+    @Override
+    public  MainChannel  getMainChannelById(Integer  id){
+        return  mainChannelMapper.getMainChannelById(id);
+    }
+    /**
+     * 增加数据
+     * @param  mainChannel
+     * @return Integer
+     */
+    @Override
+    public  Integer  save(MainChannel  mainChannel){
+        return  mainChannelMapper.save(mainChannel);
+    }
+    /**
+     * 修改数据
+     * @param  mainChannel
+     * @return Integer
+     */
+    @Override
+    public  Integer  update(MainChannel  mainChannel){
+        return  mainChannelMapper.update(mainChannel);
+    }
+}

+ 55 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/ChannelPriceMapper.java

@@ -0,0 +1,55 @@
+package com.iamberry.wechat.service.mapper;
+
+import com.iamberry.wechat.core.entity.channel.ChannelPrice;
+
+import java.util.List;
+
+/**
+ *  渠道对应产品返利价格表接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+public interface ChannelPriceMapper {
+    /**
+     * 获取集合
+     * @param  channelPrice
+     * @return List
+     */
+    List<ChannelPrice> getChannelPriceList(ChannelPrice channelPrice);
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  channelPrice
+     */
+    ChannelPrice  getChannelPriceById(Integer  id);
+    /**
+     * 增加数据
+     * @param  channelPrice
+     * @return Integer
+     */
+    Integer  save(ChannelPrice  channelPrice);
+    /**
+     * 修改数据
+     * @param  channelPrice
+     * @return Integer
+     */
+    Integer  update(ChannelPrice  channelPrice);
+    /**
+     * 删除数据
+     * @param  id
+     * @return Integer
+     */
+    Integer  delete(Integer  id);
+    /**
+     * 增加数据 <集合>
+     * @param  channelPriceList
+     * @return Integer
+     */
+    Integer  saveList(List<ChannelPrice>  channelPriceList);
+    /**
+     * 删除数据 <集合>
+     * @param  ids
+     * @return Integer
+     */
+    Integer  deleteList(Integer[]  ids);
+}

+ 37 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/ChannelRebateMapper.java

@@ -0,0 +1,37 @@
+package com.iamberry.wechat.service.mapper;
+
+import com.iamberry.wechat.core.entity.channel.ChannelRebate;
+
+import java.util.List;
+
+/**
+ *  上朵分销返利记录接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+public interface ChannelRebateMapper {
+    /**
+     * 获取集合
+     * @param  channelRebate
+     * @return List
+     */
+    List<ChannelRebate> getChannelRebateList(ChannelRebate  channelRebate);
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  channelRebate
+     */
+    ChannelRebate  getChannelRebateById(Integer  id);
+    /**
+     * 增加数据
+     * @param  channelRebate
+     * @return Integer
+     */
+    Integer  save(ChannelRebate  channelRebate);
+    /**
+     * 修改数据
+     * @param  channelRebate
+     * @return Integer
+     */
+    Integer  update(ChannelRebate  channelRebate);
+}

+ 37 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/ChildChannelMapper.java

@@ -0,0 +1,37 @@
+package com.iamberry.wechat.service.mapper;
+
+import com.iamberry.wechat.core.entity.channel.ChildChannel;
+
+import java.util.List;
+
+/**
+ *  子渠道基本信息接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+public interface ChildChannelMapper {
+    /**
+     * 获取集合
+     * @param  childChannel
+     * @return List
+     */
+    List<ChildChannel> getChildChannelList(ChildChannel childChannel);
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  childChannel
+     */
+    ChildChannel  getChildChannelById(Integer  id);
+    /**
+     * 增加数据
+     * @param  childChannel
+     * @return Integer
+     */
+    Integer  save(ChildChannel  childChannel);
+    /**
+     * 修改数据
+     * @param  childChannel
+     * @return Integer
+     */
+    Integer  update(ChildChannel  childChannel);
+}

+ 37 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/MainChannelMapper.java

@@ -0,0 +1,37 @@
+package com.iamberry.wechat.service.mapper;
+
+import com.iamberry.wechat.core.entity.channel.MainChannel;
+
+import java.util.List;
+
+/**
+ *  主渠道基本信息接口
+ * @author xm
+ * @Date 2018-07-23
+ */
+public interface MainChannelMapper {
+    /**
+     * 获取集合
+     * @param  mainChannel
+     * @return List
+     */
+    List<MainChannel> getMainChannelList(MainChannel  mainChannel);
+    /**
+     * 查询单条数据
+     * @param  id
+     * @return  mainChannel
+     */
+    MainChannel  getMainChannelById(Integer  id);
+    /**
+     * 增加数据
+     * @param  mainChannel
+     * @return Integer
+     */
+    Integer  save(MainChannel  mainChannel);
+    /**
+     * 修改数据
+     * @param  mainChannel
+     * @return Integer
+     */
+    Integer  update(MainChannel  mainChannel);
+}

+ 130 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/channelPriceMapper.xml

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.iamberry.wechat.service.mapper.ChannelPriceMapper">
+    <resultMap  id="BaseResultMap" type="ChannelPrice" >
+        <result    column="channel_price_id"    property="channelPriceId" />
+        <result    column="channel_id"    property="channelId" />
+        <result    column="product_id"    property="productId" />
+        <result    column="color_id"    property="colorId" />
+        <result    column="channel_price_offer"    property="channelPriceOffer" />
+        <result    column="channel_price_status"    property="channelPriceStatus" />
+        <result    column="channel_price_create_time"    property="channelPriceCreateTime" />
+        <result    column="channel_price_update_time"    property="channelPriceUpdateTime" />
+    </resultMap>
+    <sql    id="Base_List" >
+        t.channel_price_id,
+        t.channel_id,
+        t.product_id,
+        t.color_id,
+        t.channel_price_offer,
+        t.channel_price_status,
+        t.channel_price_create_time,
+        t.channel_price_update_time
+    </sql>
+    <select id="getChannelPriceList" resultMap="BaseResultMap" parameterType="ChannelPrice" >
+        select
+        <include refid="Base_List" />
+        from tb_iamberry_channel_price t
+        <where>
+            <if test="channelPriceId != null ">
+                AND t.channel_price_id = #{channelPriceId}
+            </if >
+            <if test="channelId != null ">
+                AND t.channel_id = #{channelId}
+            </if >
+            <if test="productId != null ">
+                AND t.product_id = #{productId}
+            </if >
+            <if test="colorId != null ">
+                AND t.color_id = #{colorId}
+            </if >
+            <if test="channelPriceOffer != null ">
+                AND t.channel_price_offer = #{channelPriceOffer}
+            </if >
+            <if test="channelPriceStatus != null ">
+                AND t.channel_price_status = #{channelPriceStatus}
+            </if >
+        </where>
+    </select>
+    <select id="getChannelPriceById" resultMap="BaseResultMap" parameterType="Integer" >
+        select
+        <include refid="Base_List" />
+        from tb_iamberry_channel_price t
+        where t.channel_price_id= #{channelPriceId}
+    </select>
+    <insert id="save" parameterType="ChannelPrice" >
+        insert into
+        tb_iamberry_channel_price
+        (
+        channel_id,
+        product_id,
+        color_id,
+        channel_price_offer,
+        channel_price_status
+        )
+        values
+        (
+        #{channelId},
+        #{productId},
+        #{colorId},
+        #{channelPriceOffer},
+        #{channelPriceStatus}
+        )
+    </insert>
+    <update id="update" parameterType="ChannelPrice" >
+        update
+        tb_iamberry_channel_price
+        <set >
+            <if test="channelId != null ">
+                channel_id = #{channelId},
+            </if >
+            <if test="productId != null ">
+                product_id = #{productId},
+            </if >
+            <if test="colorId != null ">
+                color_id = #{colorId},
+            </if >
+            <if test="channelPriceOffer != null ">
+                channel_price_offer = #{channelPriceOffer},
+            </if >
+            <if test="channelPriceStatus != null ">
+                channel_price_status = #{channelPriceStatus},
+            </if >
+        </set >
+        where channel_price_id= #{channelPriceId}
+    </update>
+    <delete id="delete" parameterType="Integer" >
+        delete
+        tb_iamberry_channel_price
+        where channel_price_id=#{channelPriceId}
+    </delete>
+    <insert id="saveList" parameterType="java.util.List" >
+        insert into
+        tb_iamberry_channel_price
+        (
+        channel_id,
+        product_id,
+        color_id,
+        channel_price_offer,
+        channel_price_status
+        )
+        values
+        <foreach collection="list" item="node" index="index" separator="," open="" close="">
+            (
+            #{node.channelId},
+            #{node.productId},
+            #{node.colorId},
+            #{node.channelPriceOffer},
+            #{node.channelPriceStatus}
+            )
+        </foreach >
+    </insert>
+    <delete id="deleteList" parameterType="String" >
+        delete
+        tb_iamberry_channel_price
+        where channel_price_id  in
+        <foreach collection="ids" item="item" index="index" separator="," open="(" close=")">
+            #{item}
+        </foreach >
+    </delete>
+</mapper>

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

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.iamberry.wechat.service.mapper.ChannelRebateMapper">
+    <resultMap  id="BaseResultMap" type="ChannelRebate" >
+        <result    column="rebate_id"    property="rebateId" />
+        <result    column="rebate_sales_order_id"    property="rebateSalesOrderId" />
+        <result    column="reback_from_open_id"    property="rebackFromOpenId" />
+        <result    column="reback_channel_id"    property="rebackChannelId" />
+        <result    column="reback_amount"    property="rebackAmount" />
+        <result    column="reback_status"    property="rebackStatus" />
+        <result    column="reback_time"    property="rebackTime" />
+        <result    column="reback_create_time"    property="rebackCreateTime" />
+        <result    column="reback_update_time"    property="rebackUpdateTime" />
+    </resultMap>
+    <sql    id="Base_List" >
+        t.rebate_id,
+        t.rebate_sales_order_id,
+        t.reback_from_open_id,
+        t.reback_channel_id,
+        t.reback_amount,
+        t.reback_status,
+        t.reback_time,
+        t.reback_create_time,
+        t.reback_update_time
+    </sql>
+    <select id="getChannelRebateList" resultMap="BaseResultMap" parameterType="ChannelRebate" >
+        select
+        <include refid="Base_List" />
+        from tb_iamberry_channel_rebate t
+        <where>
+            <if test="rebateId != null ">
+                AND t.rebate_id = #{rebateId}
+            </if >
+            <if test="rebateSalesOrderId != null and rebateSalesOrderId != ''">
+                AND t.rebate_sales_order_id = #{rebateSalesOrderId}
+            </if >
+            <if test="rebackChannelId != null ">
+                AND t.reback_channel_id = #{rebackChannelId}
+            </if >
+            <if test="rebackStatus != null ">
+                AND t.reback_status = #{rebackStatus}
+            </if >
+        </where>
+    </select>
+    <select id="getChannelRebateById" resultMap="BaseResultMap" parameterType="Integer" >
+        select
+        <include refid="Base_List" />
+        from tb_iamberry_channel_rebate t
+        where t.rebate_id= #{rebateId}
+    </select>
+    <insert id="save" parameterType="ChannelRebate" >
+        insert into
+        tb_iamberry_channel_rebate
+        (
+        rebate_sales_order_id,
+        reback_from_open_id,
+        reback_channel_id,
+        reback_amount,
+        reback_status,
+        reback_time
+        )
+        values
+        (
+        #{rebateSalesOrderId},
+        #{rebackFromOpenId},
+        #{rebackChannelId},
+        #{rebackAmount},
+        #{rebackStatus},
+        #{rebackTime}
+        )
+    </insert>
+    <update id="update" parameterType="ChannelRebate" >
+        update
+        tb_iamberry_channel_rebate
+        <set >
+            <if test="rebateSalesOrderId != null and rebateSalesOrderId != ''">
+                rebate_sales_order_id = #{rebateSalesOrderId},
+            </if >
+            <if test="rebackFromOpenId != null and rebackFromOpenId != ''">
+                reback_from_open_id = #{rebackFromOpenId},
+            </if >
+            <if test="rebackChannelId != null ">
+                reback_channel_id = #{rebackChannelId},
+            </if >
+            <if test="rebackAmount != null ">
+                reback_amount = #{rebackAmount},
+            </if >
+            <if test="rebackStatus != null ">
+                reback_status = #{rebackStatus},
+            </if >
+            <if test="rebackTime != null and rebackTime != ''">
+                reback_time = #{rebackTime},
+            </if >
+        </set >
+        where rebate_id= #{rebateId}
+    </update>
+</mapper>

+ 148 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/childChannelMapper.xml

@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.iamberry.wechat.service.mapper.ChildChannelMapper">
+    <resultMap  id="BaseResultMap" type="ChildChannel" >
+        <result    column="child_channel_id"    property="childChannelId" />
+        <result    column="child_channel_open_id"    property="childChannelOpenId" />
+        <result    column="main_channel_id"    property="mainChannelId" />
+        <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" />
+        <result    column="child_channel_bank_branch"    property="childChannelBankBranch" />
+        <result    column="child_channel_status"    property="childChannelStatus" />
+        <result    column="child_channel_desc"    property="childChannelDesc" />
+        <result    column="child_channel_create_time"    property="childChannelCreateTime" />
+        <result    column="child_channel_update_time"    property="childChannelUpdateTime" />
+    </resultMap>
+    <sql    id="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_balance,
+        t.child_channel_bank,
+        t.child_channel_bank_account,
+        t.child_channel_bank_name,
+        t.child_channel_bank_branch,
+        t.child_channel_status,
+        t.child_channel_desc,
+        t.child_channel_create_time,
+        t.child_channel_update_time
+    </sql>
+    <select id="getChildChannelList" resultMap="BaseResultMap" parameterType="ChildChannel" >
+        select
+        <include refid="Base_List" />
+        from tb_iamberry_child_channel t
+        <where>
+            <if test="childChannelId != null ">
+                AND t.child_channel_id = #{childChannelId}
+            </if >
+            <if test="childChannelOpenId != null and childChannelOpenId != ''">
+                AND t.child_channel_open_id = #{childChannelOpenId}
+            </if >
+            <if test="mainChannelId != null ">
+                AND t.main_channel_id = #{mainChannelId}
+            </if >
+            <if test="childChannelName != null and childChannelName != ''">
+                AND t.child_channel_name  like  CONCAT ('%',#{childChannelName},'%')
+            </if >
+            <if test="childChannelDockingName != null and childChannelDockingName != ''">
+                AND t.child_channel_docking_name  like  CONCAT ('%',#{childChannelDockingName},'%')
+            </if >
+            <if test="childChannelDockingTel != null and childChannelDockingTel != ''">
+                AND t.child_channel_docking_tel  like  CONCAT ('%',#{childChannelDockingTel},'%')
+            </if >
+            <if test="childChannelStatus != null ">
+                AND t.child_channel_status = #{childChannelStatus}
+            </if >
+        </where>
+    </select>
+    <select id="getChildChannelById" resultMap="BaseResultMap" parameterType="Integer" >
+        select
+        <include refid="Base_List" />
+        from tb_iamberry_child_channel t
+        where t.child_channel_id= #{childChannelId}
+    </select>
+    <insert id="save" parameterType="ChildChannel" >
+        insert into
+        tb_iamberry_child_channel
+        (
+        child_channel_open_id,
+        main_channel_id,
+        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,
+        child_channel_bank_branch,
+        child_channel_status,
+        child_channel_desc
+        )
+        values
+        (
+        #{childChannelOpenId},
+        #{mainChannelId},
+        #{childChannelName},
+        #{childChannelDockingName},
+        #{childChannelDockingTel},
+        #{childChannelBalance},
+        #{childChannelBank},
+        #{childChannelBankAccount},
+        #{childChannelBankName},
+        #{childChannelBankBranch},
+        #{childChannelStatus},
+        #{childChannelDesc}
+        )
+    </insert>
+    <update id="update" parameterType="ChildChannel" >
+        update
+        tb_iamberry_child_channel
+        <set >
+            <if test="childChannelOpenId != null and childChannelOpenId != ''">
+                child_channel_open_id = #{childChannelOpenId},
+            </if >
+            <if test="mainChannelId != null ">
+                main_channel_id = #{mainChannelId},
+            </if >
+            <if test="childChannelName != null and childChannelName != ''">
+                child_channel_name = #{childChannelName},
+            </if >
+            <if test="childChannelDockingName != null and childChannelDockingName != ''">
+                child_channel_docking_name = #{childChannelDockingName},
+            </if >
+            <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 >
+            <if test="childChannelBankAccount != null and childChannelBankAccount != ''">
+                child_channel_bank_account = #{childChannelBankAccount},
+            </if >
+            <if test="childChannelBankName != null and childChannelBankName != ''">
+                child_channel_bank_name = #{childChannelBankName},
+            </if >
+            <if test="childChannelBankBranch != null and childChannelBankBranch != ''">
+                child_channel_bank_branch = #{childChannelBankBranch},
+            </if >
+            <if test="childChannelStatus != null ">
+                child_channel_status = #{childChannelStatus},
+            </if >
+            <if test="childChannelDesc != null and childChannelDesc != ''">
+                child_channel_desc = #{childChannelDesc},
+            </if >
+        </set >
+        where child_channel_id= #{childChannelId}
+    </update>
+</mapper>

+ 138 - 0
tooth-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/mainChannelMapper.xml

@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.iamberry.wechat.service.mapper.MainChannelMapper">
+    <resultMap  id="BaseResultMap" type="MainChannel" >
+        <result    column="main_channel_id"    property="mainChannelId" />
+        <result    column="main_channel_open_id"    property="mainChannelOpenId" />
+        <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" />
+        <result    column="main_channel_bank_branch"    property="mainChannelBankBranch" />
+        <result    column="main_channel_status"    property="mainChannelStatus" />
+        <result    column="main_channel_desc"    property="mainChannelDesc" />
+        <result    column="main_channel_create_time"    property="mainChannelCreateTime" />
+        <result    column="main_channel_update_time"    property="mainChannelUpdateTime" />
+    </resultMap>
+    <sql    id="Base_List" >
+        t.main_channel_id,
+        t.main_channel_open_id,
+        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,
+        t.main_channel_bank_branch,
+        t.main_channel_status,
+        t.main_channel_desc,
+        t.main_channel_create_time,
+        t.main_channel_update_time
+    </sql>
+    <select id="getMainChannelList" resultMap="BaseResultMap" parameterType="MainChannel" >
+        select
+        <include refid="Base_List" />
+        from tb_iamberry_main_channel t
+        <where>
+            <if test="mainChannelId != null ">
+                AND t.main_channel_id = #{mainChannelId}
+            </if >
+            <if test="mainChannelOpenId != null and mainChannelOpenId != ''">
+                AND t.main_channel_open_id = #{mainChannelOpenId}
+            </if >
+            <if test="mainChannelName != null and mainChannelName != ''">
+                AND t.main_channel_name  like  CONCAT ('%',#{mainChannelName},'%')
+            </if >
+            <if test="mainChannelDockingName != null and mainChannelDockingName != ''">
+                AND t.main_channel_docking_name  like  CONCAT ('%',#{mainChannelDockingName},'%')
+            </if >
+            <if test="mainChannelDockingTel != null and mainChannelDockingTel != ''">
+                AND t.main_channel_docking_tel  like  CONCAT ('%',#{mainChannelDockingTel},'%')
+            </if >
+            <if test="mainChannelStatus != null ">
+                AND t.main_channel_status = #{mainChannelStatus}
+            </if >
+        </where>
+    </select>
+    <select id="getMainChannelById" resultMap="BaseResultMap" parameterType="Integer" >
+        select
+        <include refid="Base_List" />
+        from tb_iamberry_main_channel t
+        where t.main_channel_id= #{mainChannelId}
+    </select>
+    <insert id="save" parameterType="MainChannel" >
+        insert into
+        tb_iamberry_main_channel
+        (
+        main_channel_open_id,
+        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,
+        main_channel_bank_branch,
+        main_channel_status,
+        main_channel_desc
+        )
+        values
+        (
+        #{mainChannelOpenId},
+        #{mainChannelName},
+        #{mainChannelDockingName},
+        #{mainChannelDockingTel},
+        #{mainChannelBalance},
+        #{mainChannelBank},
+        #{mainChannelBankAccount},
+        #{mainChannelBankName},
+        #{mainChannelBankBranch},
+        #{mainChannelStatus},
+        #{mainChannelDesc}
+        )
+    </insert>
+    <update id="update" parameterType="MainChannel" >
+        update
+        tb_iamberry_main_channel
+        <set >
+            <if test="mainChannelOpenId != null and mainChannelOpenId != ''">
+                main_channel_open_id = #{mainChannelOpenId},
+            </if >
+            <if test="mainChannelName != null and mainChannelName != ''">
+                main_channel_name = #{mainChannelName},
+            </if >
+            <if test="mainChannelDockingName != null and mainChannelDockingName != ''">
+                main_channel_docking_name = #{mainChannelDockingName},
+            </if >
+            <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 >
+            <if test="mainChannelBankAccount != null and mainChannelBankAccount != ''">
+                main_channel_bank_account = #{mainChannelBankAccount},
+            </if >
+            <if test="mainChannelBankName != null and mainChannelBankName != ''">
+                main_channel_bank_name = #{mainChannelBankName},
+            </if >
+            <if test="mainChannelBankBranch != null and mainChannelBankBranch != ''">
+                main_channel_bank_branch = #{mainChannelBankBranch},
+            </if >
+            <if test="mainChannelStatus != null ">
+                main_channel_status = #{mainChannelStatus},
+            </if >
+            <if test="mainChannelDesc != null and mainChannelDesc != ''">
+                main_channel_desc = #{mainChannelDesc},
+            </if >
+        </set >
+        where main_channel_id= #{mainChannelId}
+    </update>
+</mapper>

+ 14 - 0
tooth-wechat-web/src/main/resources/iamberry-wechat-service-mybatis.xml

@@ -270,8 +270,15 @@
 		<typeAlias type="com.iamberry.wechat.core.entity.activity.Activity" alias="Activity"/>
 		<typeAlias type="com.iamberry.wechat.core.entity.activity.ActivityHelp" alias="ActivityHelp"/>
 
+		<!--上朵促销统计产品浏览人数-->
 		<typeAlias type="com.iamberry.wechat.core.entity.product.AccessFlow" alias="AccessFlow"/>
 
+		<!--上朵分销-->
+		<typeAlias type="com.iamberry.wechat.core.entity.channel.ChannelPrice" alias="ChannelPrice"/>
+		<typeAlias type="com.iamberry.wechat.core.entity.channel.ChannelRebate" alias="ChannelRebate"/>
+		<typeAlias type="com.iamberry.wechat.core.entity.channel.ChildChannel" alias="ChildChannel"/>
+		<typeAlias type="com.iamberry.wechat.core.entity.channel.MainChannel" alias="MainChannel"/>
+
 		<package name="com.iamberry.wechat.core.entity.rent"/>
 	</typeAliases>
 	<!-- PageHelper -->
@@ -394,7 +401,14 @@
 		<mapper resource="com/iamberry/wechat/service/mapper/activityHelpMapper.xml"/>
 		<mapper resource="com/iamberry/wechat/service/mapper/activityMapper.xml"/>
 
+		<!-- 上朵促销统计产品浏览人数 -->
 		<mapper resource="com/iamberry/wechat/service/mapper/accessFlowMapper.xml"/>
 
+		<!--上朵分销-->
+		<mapper resource="com/iamberry/wechat/service/mapper/mainChannelMapper.xml"/>
+		<mapper resource="com/iamberry/wechat/service/mapper/childChannelMapper.xml"/>
+		<mapper resource="com/iamberry/wechat/service/mapper/channelRebateMapper.xml"/>
+		<mapper resource="com/iamberry/wechat/service/mapper/channelPriceMapper.xml"/>
+
 	</mappers>
 </configuration>