Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/developerF' into developerF

# Conflicts:
#	src/main/java/com/caimei/modules/order/dao/NewOrderDao.java
Aslee 3 gadi atpakaļ
vecāks
revīzija
aa3f6e575d
48 mainītis faili ar 1864 papildinājumiem un 1227 dzēšanām
  1. 5 0
      pom.xml
  2. 6 13
      src/main/java/com/caimei/modules/bulkpurchase/web/CommissionsController.java
  3. 3 6
      src/main/java/com/caimei/modules/newhome/web/AnnouncementController.java
  4. 5 1
      src/main/java/com/caimei/modules/order/dao/NewOrderDao.java
  5. 197 0
      src/main/java/com/caimei/modules/order/entity/AccountPayOrder.java
  6. 28 0
      src/main/java/com/caimei/modules/order/entity/AccountPayOrderType.java
  7. 52 0
      src/main/java/com/caimei/modules/order/entity/Constant.java
  8. 1 1
      src/main/java/com/caimei/modules/order/entity/NewOrder.java
  9. 1 1
      src/main/java/com/caimei/modules/order/entity/OrderReceiptRelationPo.java
  10. 12 0
      src/main/java/com/caimei/modules/order/entity/PayParamBo.java
  11. 21 0
      src/main/java/com/caimei/modules/order/entity/ProductType.java
  12. 12 0
      src/main/java/com/caimei/modules/order/entity/ShopOrderVo.java
  13. 12 0
      src/main/java/com/caimei/modules/order/entity/SplitAccountPo.java
  14. 333 279
      src/main/java/com/caimei/modules/order/service/SplitAccountService.java
  15. 67 386
      src/main/java/com/caimei/modules/user/aop/OperationLogAspect.java
  16. 134 316
      src/main/java/com/caimei/modules/user/aop/OperationLogCmShop.java
  17. 2 1
      src/main/java/com/caimei/modules/user/dao/CmClubinfoDao.java
  18. 2 0
      src/main/java/com/caimei/modules/user/dao/CmOperationsDao.java
  19. 23 2
      src/main/java/com/caimei/modules/user/dao/OperationsDao.java
  20. 1 2
      src/main/java/com/caimei/modules/user/entity/CmClubinfo.java
  21. 18 1
      src/main/java/com/caimei/modules/user/entity/CmOperationalLogs.java
  22. 0 2
      src/main/java/com/caimei/modules/user/entity/NewCmClub.java
  23. 0 1
      src/main/java/com/caimei/modules/user/entity/NewCmShop.java
  24. 16 0
      src/main/java/com/caimei/modules/user/entity/OperationalLogs.java
  25. 10 5
      src/main/java/com/caimei/modules/user/service/CmClubinfoService.java
  26. 5 0
      src/main/java/com/caimei/modules/user/service/CmOperationalLogService.java
  27. 55 0
      src/main/java/com/caimei/modules/user/service/SysLogService.java
  28. 119 2
      src/main/java/com/caimei/modules/user/web/ClubTemporaryController.java
  29. 1 0
      src/main/java/com/caimei/modules/user/web/CmSpController.java
  30. 3 2
      src/main/java/com/caimei/modules/user/web/OperationalLogsController.java
  31. 407 60
      src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java
  32. 29 5
      src/main/java/com/caimei/modules/user/web/newUser/SpController.java
  33. 2 2
      src/main/resources/mappings/modules/newhome/AnnouncementMapper.xml
  34. 64 4
      src/main/resources/mappings/modules/order/OrderMapper.xml
  35. 8 3
      src/main/resources/mappings/modules/user/CmClubinfoMapper.xml
  36. 16 6
      src/main/resources/mappings/modules/user/CmOperationalLogsMapper.xml
  37. 65 5
      src/main/resources/mappings/modules/user/OperationalLogsMapper.xml
  38. 23 21
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/addCommissionsForm.jsp
  39. 2 2
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/cmCommissionsForm.jsp
  40. 59 54
      src/main/webapp/WEB-INF/views/modules/newhome/announcementForm.jsp
  41. 3 3
      src/main/webapp/WEB-INF/views/modules/newhome/announcementList.jsp
  42. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/cmNewProductForm.jsp
  43. 1 1
      src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp
  44. 1 1
      src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp
  45. 10 9
      src/main/webapp/WEB-INF/views/modules/user/cmOperationalLogs.jsp
  46. 7 7
      src/main/webapp/WEB-INF/views/modules/user/cmOperationalLogsShop.jsp
  47. 1 1
      src/main/webapp/WEB-INF/views/modules/user/newCmShopForm.jsp
  48. 21 21
      src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyForm.jsp

+ 5 - 0
pom.xml

@@ -110,6 +110,11 @@
 			<artifactId>commons-httpclient</artifactId>
 			<version>3.1</version>
 		</dependency>
+		<dependency>
+			<groupId>com.squareup.okhttp3</groupId>
+			<artifactId>okhttp</artifactId>
+			<version>3.8.1</version>
+		</dependency>
 		<!-- SPRING begin -->
 		<dependency>
 			<groupId>org.springframework</groupId>

+ 6 - 13
src/main/java/com/caimei/modules/bulkpurchase/web/CommissionsController.java

@@ -31,28 +31,20 @@ public class CommissionsController extends BaseController {
     @Autowired
     CommissionsService commissionsService;
 
-    public static String orderId;
+
 
     @RequestMapping(value = {""})
     public String list(Commissions commissions, HttpServletRequest request, HttpServletResponse response, Model model) {
         List<Commissions> list=commissionsService.findList(commissions);
-        orderId=commissions.getOrderId();
         model.addAttribute("list",list);
         model.addAttribute("orderId",commissions.getOrderId());
         return "/modules/bulkpurchase/cmCommissionsForm";
     }
 
-
-    @RequestMapping(value = {"list"})
-    public String lists(Commissions commissions, HttpServletRequest request, HttpServletResponse response, Model model) {
-
-        return "redirect:" + Global.getAdminPath() + "/bulkpurchase/commissions?orderId="+orderId;
-    }
-
-
     @RequestMapping(value = "form")
-    public String form(Commissions commissions, Model model) {
-
+    public String form(Commissions commissions, Model model,HttpServletRequest request, HttpServletResponse response) {
+        String orderId=request.getParameter("orderId");
+        model.addAttribute("OrderId",orderId);
 
         return "modules/bulkpurchase/addCommissionsForm";
     }
@@ -60,12 +52,13 @@ public class CommissionsController extends BaseController {
 
 
     @RequestMapping(value = "save")
-    public String save(Commissions commissions, Model model) {
+    public String save(Commissions commissions, Model model,HttpServletRequest request) {
 
         Date date = new Date();
         SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
         commissions.setAddTime(date);
         commissions.setName( principal.getName());
+        String orderId=request.getParameter("orderId");
         commissions.setOrderId(orderId);
             int i = commissionsService.insert(commissions);
 

+ 3 - 6
src/main/java/com/caimei/modules/newhome/web/AnnouncementController.java

@@ -28,8 +28,6 @@ public class AnnouncementController extends BaseController {
     @Autowired
     AnnouncementService announcementService;
 
-    public static String id;
-
     @RequiresPermissions("newhome:announcementList:view")
     @RequestMapping(value = {""})
     public String list(Announcementmanagement announcementmanagement, HttpServletRequest request, HttpServletResponse response, Model model) {
@@ -43,7 +41,7 @@ public class AnnouncementController extends BaseController {
     public String form(Announcementmanagement announcementmanagement, Model model) {
         if (!announcementmanagement.getId().equals(null) || !announcementmanagement.getId().equals("")) {
             announcementmanagement = announcementService.announlist(announcementmanagement);
-            id = announcementmanagement.getId();
+            announcementmanagement.getId();
             model.addAttribute("Announcementmanagement", announcementmanagement);
         }
         return "modules/newhome/announcementForm";
@@ -60,9 +58,8 @@ public class AnnouncementController extends BaseController {
     @RequiresPermissions("newhome:announcementForm:view")
     @RequestMapping(value = "save")
     public String save(Announcementmanagement announcementmanagement, Model model) {
-        logger.info("*************用户id"+id);
-        if (id != null) {
-            announcementmanagement.setId(id);
+        System.out.println("*************用户id"+announcementmanagement.getId());
+        if (!"".equals(announcementmanagement.getId()) ) {
             announcementService.update(announcementmanagement);
         } else {
             Date date = new Date();

+ 5 - 1
src/main/java/com/caimei/modules/order/dao/NewOrderDao.java

@@ -205,7 +205,7 @@ public interface NewOrderDao extends CrudDao<NewOrder> {
 
     Double getOrderProductPaidAmount(Integer orderProductId);
 
-    List<ShopOrderVo> getShopOrderListByOrderId(Integer orderId);
+    ShopOrderVo getShopOrderListByOrderId(Integer shopOrderId);
 
     Double getPaidShipping(Integer orderId, Integer shopId);
 
@@ -218,4 +218,8 @@ public interface NewOrderDao extends CrudDao<NewOrder> {
     Date findSplitTime();
 
     void updateOnlinePayFlag(@Param("onlinePayFlag") Integer onlinePayFlag,@Param("orderId") Integer orderId);
+
+    Integer findSupport(Integer shopOrderId);
+
+    List<OrderProductVo> getOrderProductByShopOrderId(Integer shopOrderId);
 }

+ 197 - 0
src/main/java/com/caimei/modules/order/entity/AccountPayOrder.java

@@ -0,0 +1,197 @@
+package com.caimei.modules.order.entity;
+
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Set;
+
+public class AccountPayOrder {
+
+    private String P1_bizType;
+    private String P2_signType;
+    private String P3_timestamp;
+    private String P4_orderId;
+    private String P5_customerNumber;
+    private String P6_ext;
+
+    public String getP1_bizType() {
+        return P1_bizType;
+    }
+
+    public void setP1_bizType(String p1_bizType) {
+        P1_bizType = p1_bizType;
+    }
+
+    public String getP2_signType() {
+        return P2_signType;
+    }
+
+    public void setP2_signType(String p2_signType) {
+        P2_signType = p2_signType;
+    }
+
+    public String getP3_timestamp() {
+        return P3_timestamp;
+    }
+
+    public void setP3_timestamp(String p3_timestamp) {
+        P3_timestamp = p3_timestamp;
+    }
+
+    public String getP4_orderId() {
+        return P4_orderId;
+    }
+
+    public void setP4_orderId(String p4_orderId) {
+        P4_orderId = p4_orderId;
+    }
+
+    public String getP5_customerNumber() {
+        return P5_customerNumber;
+    }
+
+    public void setP5_customerNumber(String p5_customerNumber) {
+        P5_customerNumber = p5_customerNumber;
+    }
+
+
+    public String getP6_ext() {
+        return P6_ext;
+    }
+
+    public void setP6_ext(String p6_ext) {
+        P6_ext = p6_ext;
+    }
+
+    public static class AccountPayOrderExt {
+        // 订单类型
+        private AccountPayOrderType orderType;
+        // 收款商编
+        private String inMerchantNo;
+        // 金额
+        private BigDecimal amount;
+        // 回调地址
+        private String serverCallbackUrl;
+        // 商品名称
+        private String goodsName;
+        // 商品描述(可选)
+        private String orderDesc;
+        /**
+         * 以下两项在补贴场景下必填
+         **/
+        private ProductType productType;
+        // 原收单订单号
+        private String associatedOrderNo;
+        // 分账规则串 - 仅支持资金划拨类订单
+        private List<SplitBillRule> splitBillRules;
+        // 是否为担保交易
+        private boolean inEscrow = false;
+
+
+        public AccountPayOrderType getOrderType() {
+            return orderType;
+        }
+
+        public void setOrderType(AccountPayOrderType orderType) {
+            this.orderType = orderType;
+        }
+
+        public BigDecimal getAmount() {
+            return amount;
+        }
+
+        public void setAmount(BigDecimal amount) {
+            this.amount = amount;
+        }
+
+        public String getServerCallbackUrl() {
+            return serverCallbackUrl;
+        }
+
+        public void setServerCallbackUrl(String serverCallbackUrl) {
+            this.serverCallbackUrl = StringUtils.isEmpty(serverCallbackUrl) ? null : serverCallbackUrl;
+        }
+
+        public String getGoodsName() {
+            return goodsName;
+        }
+
+        public void setGoodsName(String goodsName) {
+            this.goodsName = goodsName;
+        }
+
+        public String getOrderDesc() {
+            return orderDesc;
+        }
+
+        public void setOrderDesc(String orderDesc) {
+            this.orderDesc = orderDesc;
+        }
+
+        public ProductType getProductType() {
+            return productType;
+        }
+
+        public void setProductType(ProductType productType) {
+            this.productType = productType;
+        }
+
+        public String getAssociatedOrderNo() {
+            return associatedOrderNo;
+        }
+
+        public void setAssociatedOrderNo(String associatedOrderNo) {
+            this.associatedOrderNo = associatedOrderNo;
+        }
+
+        public String getInMerchantNo() {
+            return inMerchantNo;
+        }
+
+        public void setInMerchantNo(String inMerchantNo) {
+            this.inMerchantNo = inMerchantNo;
+        }
+
+        public List<SplitBillRule> getSplitBillRules() {
+            return splitBillRules;
+        }
+
+        public void setSplitBillRules(List<SplitBillRule> splitBillRules) {
+            this.splitBillRules = splitBillRules;
+        }
+
+        public boolean isInEscrow() {
+            return inEscrow;
+        }
+
+        public void setInEscrow(boolean inEscrow) {
+            this.inEscrow = inEscrow;
+        }
+
+        public static class SplitBillRule {
+            private String splitBillMerchantNo; // 收账商编
+            private BigDecimal splitBillAmount; // 分账金额
+
+            public String getSplitBillMerchantNo() {
+                return splitBillMerchantNo;
+            }
+
+            public void setSplitBillMerchantNo(String splitBillMerchantNo) {
+                this.splitBillMerchantNo = splitBillMerchantNo;
+            }
+
+            public BigDecimal getSplitBillAmount() {
+                return splitBillAmount;
+            }
+
+            public void setSplitBillAmount(BigDecimal splitBillAmount) {
+                this.splitBillAmount = splitBillAmount;
+            }
+        }
+
+
+    }
+
+}

+ 28 - 0
src/main/java/com/caimei/modules/order/entity/AccountPayOrderType.java

@@ -0,0 +1,28 @@
+package com.caimei.modules.order.entity;
+
+public enum AccountPayOrderType {
+
+    ALLOWANCE("活动补贴", 1),
+
+    TRANSFER("资金划拨", 2),
+
+
+    ;
+
+    private final String desc;
+    private final Integer index;
+
+
+    AccountPayOrderType(String desc, Integer index) {
+        this.desc = desc;
+        this.index = index;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public Integer getIndex() {
+        return index;
+    }
+}

+ 52 - 0
src/main/java/com/caimei/modules/order/entity/Constant.java

@@ -0,0 +1,52 @@
+package com.caimei.modules.order.entity;
+
+
+/**
+ * 常量类
+ *
+ * @author Administrator
+ */
+public class Constant {
+
+    public static final String prodSplit = "https://core.caimei365.com/order/pay/delay/split/callback";
+
+    public static final String betaSplit = "https://core-b.caimei365.com/order/pay/delay/split/callback";
+
+    //专票 信息 测试佣金暂入信息  308785626@qq.com vip/二手暂入信息
+    public static final String CUSTOMERNUM = "E1807059160";
+    //信息的邮箱
+    public static final String XX_MAIL = "308785626@qq.com";
+
+    //收款商编 网络   xun.zhang@caimei365.com
+    public static final String CUSTOMERNUM2 = "E1807062884";
+    //网络的邮箱
+    public static final String WL_MAIL = "xun.zhang@caimei365.com";
+
+    //普票 奥泰 测试私账暂进奥泰   caimei365@yeah.net
+    public static final String CUSTOMERNUM3 = "E1807085606";
+
+    public static final String AT_MAIL = "caimei365@yeah.net";
+
+    public static final String SPLIT = "&";
+
+    public static final String DOMAIN_NAME = "http://pay.trx.helipay.com/";
+    //网银地址http://pay.trx.helipay.com/trx/online/interface.action
+    public static final String YL = "http://pay.trx.helipay.com/trx/online/interface.action";
+    //分账地址
+    public static final String FZ = "http://pay.trx.helipay.com/trx/accountPay/interface.action";
+
+    //微信/支付宝扫码/小程序公众号支付
+    public static final String SAOMA = "1iHnZaalUNAVcfcbKdh6n86Z0yUHtM6f";
+    //网银
+    public static final String WANGYIN = "CZiCbGrgFYQMldVkQnzbFQeQkn6mp25w";
+    //虚拟账户支付
+    public static final String XUNI = "8VmdRSXMIOfUo7aEq1iYs2XEWgGZpBQc";
+    //分账
+    public static final String FENZHANG = "2hATS0A4IoxdudGxNkGRNOt6aFSdOd8Q";
+
+    /**
+     * 扫码接口地址
+     */
+    public static final String REQUEST_URL = DOMAIN_NAME + "trx/app/interface.action";
+
+}

+ 1 - 1
src/main/java/com/caimei/modules/order/entity/NewOrder.java

@@ -54,7 +54,7 @@ public class NewOrder extends DataEntity<NewOrder> {
     private String clauseName;          // varchar(50) comment '条款名称',
     private String freePostFlag;        // char(1) comment 免邮标志 运费:-1到付,0包邮,1需要运费
     private Double freight;             // decimal(20,0) comment '运费' v5.0版本已废弃,运费已使用商品形式存储,
-    //    private Integer freePostageTicketID; // bigint(11) comment '包邮券ID',
+    //    private Integer freePostageTicketID; // bigint(11) comment '包邮券ID',newShopOrders
     private Integer buyUserID;//            下单人
     private String orderType;//    订单类型 0协销订单、 1普通订单、 2呵呵订单
     private List<NewShopOrder> newShopOrders;

+ 1 - 1
src/main/java/com/caimei/modules/order/entity/OrderReceiptRelationPo.java

@@ -70,7 +70,7 @@ public class OrderReceiptRelationPo implements Serializable {
     /**
      * 付款类型:1建设银行7297、2广发银行0115、3中信银行7172、4中信银行0897、5中信银行0897-财付通、6中信银行0897-支付宝、
      * 7线上-支付宝、8线上-微信支付、9线上-快钱支付、10口头返佣、11广发银行5461、12PC-B2B网银、13PC-微信支付、14PC-支付宝、
-     * 15小程序-微信支付、16余额抵扣、20银联转账
+     * 15小程序-微信支付、16余额抵扣、20建设银行3346
      */
     private Integer payType;
     /**

+ 12 - 0
src/main/java/com/caimei/modules/order/entity/PayParamBo.java

@@ -41,6 +41,10 @@ public class PayParamBo implements Serializable {
      * 支付金额,单位分,必须大于2
      */
     private Integer payAmount;
+    /**
+     * double支付金额,单位元
+     */
+    private Double AllPay;
     /**
      * 支付方式,
      * 银联:UNIONPAY,
@@ -98,6 +102,14 @@ public class PayParamBo implements Serializable {
         return serialVersionUID;
     }
 
+    public Double getAllPay() {
+        return AllPay;
+    }
+
+    public void setAllPay(Double allPay) {
+        AllPay = allPay;
+    }
+
     public Integer getUserId() {
         return userId;
     }

+ 21 - 0
src/main/java/com/caimei/modules/order/entity/ProductType.java

@@ -0,0 +1,21 @@
+package com.caimei.modules.order.entity;
+
+public enum ProductType {
+
+    APPPAY("扫码"),
+    ONLINE("网银"),
+    QUICKPAY("快捷"),
+
+
+
+    ;
+    private final String desc;
+
+    ProductType(String desc) {
+        this.desc = desc;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+}

+ 12 - 0
src/main/java/com/caimei/modules/order/entity/ShopOrderVo.java

@@ -189,6 +189,18 @@ public class ShopOrderVo implements Serializable {
      * 返佣订单关联页面展示用
      */
     private OrderVo mainOrder;
+    /**
+     * 子订单绑定的付款商户号
+     */
+    private String splitCode;
+
+    public String getSplitCode() {
+        return splitCode;
+    }
+
+    public void setSplitCode(String splitCode) {
+        this.splitCode = splitCode;
+    }
 
     public static long getSerialVersionUID() {
         return serialVersionUID;

+ 12 - 0
src/main/java/com/caimei/modules/order/entity/SplitAccountPo.java

@@ -18,6 +18,10 @@ public class SplitAccountPo implements Serializable {
      * 主订单id
      */
     private Integer orderId;
+    /**
+     * 子订单Id
+     */
+    private Integer shopOrderId;
     /**
      * 商品id,仅对二手发布商品
      */
@@ -79,6 +83,14 @@ public class SplitAccountPo implements Serializable {
         return serialVersionUID;
     }
 
+    public Integer getShopOrderId() {
+        return shopOrderId;
+    }
+
+    public void setShopOrderId(Integer shopOrderId) {
+        this.shopOrderId = shopOrderId;
+    }
+
     public Integer getId() {
         return id;
     }

+ 333 - 279
src/main/java/com/caimei/modules/order/service/SplitAccountService.java

@@ -9,6 +9,7 @@ import com.caimei.modules.order.utils.PayUtil;
 import com.caimei.redis.RedisService;
 import com.caimei.utils.MathUtil;
 import com.thinkgem.jeesite.common.persistence.Page;
+import okhttp3.*;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -16,289 +17,343 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.io.IOException;
+import java.lang.reflect.Field;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
 
-//@Service
-//@Transactional(readOnly = true)
-//public class SplitAccountService {
-//
-//    /**
-//     * 日志对象
-//     */
-//    protected Logger logger = LoggerFactory.getLogger(getClass());
-//
-//    @Resource
-//    private NewOrderDao newOrderDao;
-//    @Resource
-//    private RedisService redisService;
-//
-//    @Transactional(readOnly = false)
-//    public void SplitAccount() {
-//        logger.info("【手动分账开始】>>>>>>>>>>手动分账");
-//        Calendar calendar = Calendar.getInstance();
-//        calendar.setTime(new Date());
-//        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-//        String currentTime = format.format(calendar.getTime());
-//        // 查询未分账已支付收款
-//        List<OrderReceiptRelationPo> orderRelations = newOrderDao.getUndividedPaidReceipt(currentTime);
-//        if (null != orderRelations && orderRelations.size() > 0) {
-//            for (OrderReceiptRelationPo orderRelation : orderRelations) {
-//                logger.info("【分账】>>>>>>>>>>子订单id:" + orderRelation.getShopOrderId() + "进入分账");
-//                // 收款对应的订单信息
-//                OrderVo order = orderCommonMapper.getOrderByOrderId(orderRelation.getOrderId());
-//                PayParamBo payParam = new PayParamBo();
-//                //支付金额
-//                payParam.setPayAmount(MathUtil.mul(orderRelation.getAssociateAmount(), 100).intValue());
-//                if (12 == orderRelation.getPayType()) {
-//                    // 网银支付
-//                    payParam.setPayWay("UNIONPAY");
-//                }
-//                if (17 == orderRelation.getPayType()) {
-//                    //b2c网银
-//                    payParam.setPayWay("B2C");
-//                }
-//                //微信0.65%手续费
-//                if (8 == orderRelation.getPayType() || 13 == orderRelation.getPayType() || 15 == orderRelation.getPayType()) {
-//                    payParam.setPayWay("WX");
-//                }
-//                List<SplitAccountPo> splitBillDetail = setSplitAccountDetail(order, payParam);
-//                List<Map<String, String>> maps = new ArrayList<>();
-//                List<ShopOrderVo> shopOrderList = orderCommonMapper.getShopOrderListByOrderId(order.getOrderId());
-//                for (ShopOrderVo shopOrder : shopOrderList) {
-//                    double shopTotalAmount = 0.00;
-//                    String subUserNo = "";
-//                    for (SplitAccountPo account : splitBillDetail) {
-//                        //供应商有支付平台账户type=4
-//                        if (null != account.getType() && 4 == account.getType() && shopOrder.getShopId().equals(account.getShopId())) {
-//                            shopTotalAmount = MathUtil.add(shopTotalAmount, account.getSplitAccount()).doubleValue();
-//                            subUserNo = account.getSubUserNo();
-//                        }
-//                    }
-////                    addMaps(maps, shopTotalAmount, subUserNo);
-//                }
-//                if (null == splitBillDetail || splitBillDetail.size() == 0) {
-//                    log.info("无满足条件分账单号");
-//                    return;
-//                }
-//                //公账-专票总金额,私账-无票总金额,公账-普票总金额
-//                //Type2,3奥泰,1,5信息
-//                //todo 正式改
-//                String sp1 = "";
-//                BigDecimal totalAmount1 = BigDecimal.ZERO;
-//                String sp2 = "";
-//                BigDecimal totalAmount2 = BigDecimal.ZERO;
-//                for (SplitAccountPo account : splitBillDetail) {
-//                    if (1 == account.getType() || 5 == account.getType()) {
-//                        totalAmount1 = MathUtil.add(totalAmount1, account.getSplitAccount());
-//                        sp1 = account.getSubUserNo();
-//                    }
-//                    if (2 == account.getType() || 3 == account.getType()) {
-//                        totalAmount2 = MathUtil.add(totalAmount2, account.getSplitAccount());
-//                        sp2 = account.getSubUserNo();
-//                    }
-//                }
-//                ArrayList<AccountPayOrder.AccountPayOrderExt.SplitBillRule> splitBillRules = new ArrayList<>();
-//                if (MathUtil.compare(totalAmount1, 0.01) > 0) {
-//                    AccountPayOrder.AccountPayOrderExt.SplitBillRule splitBillRule = new AccountPayOrder.AccountPayOrderExt.SplitBillRule();
-//                    splitBillRule.setSplitBillAmount(totalAmount1);
-//                    splitBillRule.setSplitBillMerchantNo(sp1);
-//                    splitBillRules.add(splitBillRule);
-//                }
-//                if (MathUtil.compare(totalAmount2, 0.01) > 0) {
-//                    AccountPayOrder.AccountPayOrderExt.SplitBillRule splitBillRule = new AccountPayOrder.AccountPayOrderExt.SplitBillRule();
-//                    splitBillRule.setSplitBillAmount(totalAmount2);
-//                    splitBillRule.setSplitBillMerchantNo(sp2);
-//                    splitBillRules.add(splitBillRule);
-//                }
-//                //第三方分账接口
-//                try {
-//                    AccountPayOrder accountPayOrder = new AccountPayOrder();
-//                    accountPayOrder.setP1_bizType("AccountPaySub");
-//                    accountPayOrder.setP2_signType("MD5");
-//                    String format1 = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss.SSS").format(new Date());
-//                    accountPayOrder.setP3_timestamp(format1);
-//                    String substring = format1.substring(20);
-//                    // fz+当前微秒时间+原唯一订单号
-//                    accountPayOrder.setP4_orderId("FZ" + substring + orderRelation.getOrderRequestNo());
-//                    //todo 付款账户商编暂用网络
-//                    accountPayOrder.setP5_customerNumber(Constant.CUSTOMERNUM2);
-//                    AccountPayOrder.AccountPayOrderExt accountPayOrderExt = new AccountPayOrder.AccountPayOrderExt();
-//                    //收款账户商编  填写splitBillRules时候不填写MerchantNo,Amount并且即使填写这两个参数不生效!!
-////                    accountPayOrderExt.setInMerchantNo(splitMoneyVo.getName());
-//                    accountPayOrderExt.setOrderType(AccountPayOrderType.TRANSFER);
-////                    accountPayOrderExt.setAmount(splitMoneyVo.getSplitMoney());
-//                    accountPayOrderExt.setServerCallbackUrl(callUrl);
-//                    accountPayOrderExt.setGoodsName("分账");
-//
-//                    if (null != splitBillRules && splitBillRules.size() > 0) {
-//                        accountPayOrderExt.setSplitBillRules(splitBillRules);
-//                    }
-//                    String ext = JSON.toJSONString(accountPayOrderExt);
-//                    log.info("分账规则串json串:" + ext);
-//                    accountPayOrder.setP6_ext(ext);
-//                    // 生成签名
-//                    StringBuilder builder = new StringBuilder();
-//                    builder.append(SPLIT)
-//                            .append(accountPayOrder.getP1_bizType()).append(SPLIT)
-//                            .append(accountPayOrder.getP2_signType()).append(SPLIT)
-//                            .append(accountPayOrder.getP3_timestamp()).append(SPLIT)
-//                            .append(accountPayOrder.getP4_orderId()).append(SPLIT)
-//                            .append(accountPayOrder.getP5_customerNumber()).append(SPLIT)
-//                            .append(accountPayOrder.getP6_ext()).append(SPLIT)
-//                            .append(XUNI);
-//                    String sign = Disguiser.disguiseMD5(builder.toString().trim());
-//                    Map<String, String> bean = convertBean(accountPayOrder);
-//                    log.info("--------------------> 发送分账参数:  " + bean);
-//                    Map<String, String> map = postForm(bean, Constant.FZ, sign, Map.class);
-//                    log.info("----------------分账返回数据: " + map.toString());
-//                    if (map != null) {
-//                        String code = map.get("rt5_retCode");
-//                        if (!"0000".equals(code)) {
-//                            String msg = map.get("rt6_retMsg");
-//                            log.info("【延时分账】>>>>>>>>>>第三方延迟分账失败>>>>>>>msg:" + msg);
-//                        } else {
-//                            for (SplitAccountPo splitAccount : splitBillDetail) {
-//                                splitAccount.setMbOrderId(orderRelation.getMbOrderId());
-//                                splitAccount.setOrderRequestNo(substring + orderRelation.getOrderRequestNo());
-//                                splitAccount.setPayStatus(1);
-//                                // 保存分账详情
-//                                payOrderMapper.insertSplitAccount(splitAccount);
-//                            }
-//                            log.info("【延时分账】>>>>>>>>>>此订单分账结束");
-//                        }
-//                    }
-//                } catch (Exception e) {
-//                    log.error("【延时分账】>>>>>>>>>>错误信息", e);
-//                }
-//
-//            }
-//        }
-//    }
-//
-//    private List<SplitAccountPo> setSplitAccountDetail(OrderVo order, PayParamBo payParam) {
-//        List<SplitAccountPo> list = new ArrayList<>();
-//        // 本次支付金额,单位/元
-//        double payAmount = MathUtil.div(payParam.getPayAmount(), 100).doubleValue();
-//        // 待分账总金额
-//        double splitAmount = payAmount;
-//        // 总手续费
-//        double procedureFee;
-//        if ("UNIONPAY".equals(payParam.getPayWay())) {
-//            procedureFee = 10.00;
-//        } else if ("B2C".equals(payParam.getPayWay())) {
-//            //b2c 0.2%
-//            procedureFee = MathUtil.mul(payAmount, 0.002, 2).doubleValue();
-//            //b2c最低手续费0.1
-//            if (procedureFee < 0.1) {
-//                procedureFee = 0.1;
-//            }
-//        } else if ("WX".equals(payParam.getPayWay())) {
-//            //微信0.65%
-//            procedureFee = MathUtil.mul(payAmount, 0.0065, 2).doubleValue();
-//        } else {
-//            //手续费 其他0.25%
-//            procedureFee = MathUtil.mul(payAmount, 0.0025, 2).doubleValue();
-//        }
-//        if (MathUtil.compare(procedureFee, 0.01) <= 0) {
-//            procedureFee = 0.01;
-//        }
-//        //减去收款手续费
-//        splitAmount = MathUtil.sub(splitAmount, procedureFee).doubleValue();
-//        //分账手续费0.1%
-//        Double amount = Math.max(MathUtil.mul(splitAmount, 0.001, 2).doubleValue(), 0.01);
-//        splitAmount = MathUtil.sub(splitAmount, amount).doubleValue();
-//        if (splitAmount <= 0) {
-//            return null;
-//        }
-//        // 商品数据
-//        List<OrderProductVo> orderProductList = orderCommonMapper.getOrderProductByOrderId(order.getOrderId());
-//        for (OrderProductVo orderProduct : orderProductList) {
-//            //成本价*数量
-//            double costPrice = MathUtil.mul(orderProduct.getCostPrice(), orderProduct.getNum()).doubleValue();
-//            // 不含税能开发票
-//            if (Integer.valueOf(0).equals(orderProduct.getIncludedTax()) && !Integer.valueOf(3).equals(orderProduct.getInvoiceType())) {
-//                //应付总税费
-//                Double payableTax = MathUtil.mul(orderProduct.getSingleShouldPayTotalTax(), orderProduct.getNum()).doubleValue();
-//                //成本+税费
-//                costPrice = MathUtil.add(costPrice, payableTax).doubleValue();
-//            }
-//            // 判断是否支付过
-//            Double paidAmount = payOrderMapper.getOrderProductPaidAmount(orderProduct.getOrderProductId());
-//            // 支付过金额大于0
-//            if (paidAmount != null && MathUtil.compare(paidAmount, 0) > 0) {
-//                //成本-支付过的金额
-//                costPrice = MathUtil.sub(costPrice, paidAmount).doubleValue();
-//            }
-//            // 没支付过或者支付过的金额-成本<0(成本还没分够)
-//            if (paidAmount == null || MathUtil.compare(paidAmount, costPrice) < 0) {
-//                // 待分账金额>=本次待分账金额(还要分账的成本)
-//                if (MathUtil.compare(splitAmount, costPrice) > 0) {
-//                    // 待分账金额=待分账金额-成本
-//                    splitAmount = MathUtil.sub(splitAmount, costPrice).doubleValue();
-//                } else {
-//                    // 待分账金额小于成本
-//                    costPrice = splitAmount;
-//                    splitAmount = 0.00;
-//                }
-//            }
-//
-//        }
-//
-//        // 还有钱就付供应商运费
-//        // 付供应商运费,是以供应商为单位的
-//        if (MathUtil.compare(splitAmount, 0) > 0) {
-//            List<ShopOrderVo> shopOrderList = orderCommonMapper.getShopOrderListByOrderId(order.getOrderId());
-//            for (ShopOrderVo shopOrder : shopOrderList) {
-//                // 运费
-//                Double shopPostFee = shopOrder.getShopPostFee();
-//                if (MathUtil.compare(shopPostFee, 0) > 0) {
-//                    // 查询已支付运费
-//                    Double shipping = payOrderMapper.getPaidShipping(order.getOrderId(), shopOrder.getShopId());
-//                    shopPostFee = MathUtil.sub(shopPostFee, shipping).doubleValue();
-//                    if (MathUtil.compare(splitAmount, shopPostFee) > -1) {
-//                        //减去运费
-//                        splitAmount = MathUtil.sub(splitAmount, shopPostFee).doubleValue();
-//                    } else {
-//                        //钱不够运费就分剩余
-//                        shopPostFee = splitAmount;
-//                        splitAmount = 0.00;
-//                    }
-//                    //todo 暂不考虑供应商有商户号,有分给供应商,没有进私账
-//                    SplitAccountPo splitAccount = new SplitAccountPo();
-//                    splitAccount.setOrderId(order.getOrderId());
-//                    splitAccount.setShopId(shopOrder.getShopId());
-//                    splitAccount.setSplitAccount(shopPostFee);
-//                    splitAccount.setProductType(2);
-//                    splitAccount.setType(2);
-//                    //todo 私账-无票,子商户商编 测试暂入奥泰
-//                    splitAccount.setSubUserNo(CUSTOMERNUM3);
-//                    if (splitAccount.getSplitAccount() > 0) {
-//                        log.info("============设置付供应商运费分账详情对象: " + splitAccount.toString());
-//                        list.add(splitAccount);
-//                    }
-//                }
-//            }
-//        }
-//        // 如果还有钱则为佣金,分到采美网络
-//        if (MathUtil.compare(splitAmount, 0) > 0) {
-//            SplitAccountPo splitAccount = new SplitAccountPo();
-//            splitAccount.setOrderId(order.getOrderId());
-//            splitAccount.setSplitAccount(splitAmount);
-//            splitAccount.setProductType(3);
-//            splitAccount.setType(5);
-//            //todo 佣金应入采美网络,测试暂入信息
-//            splitAccount.setSubUserNo(Constant.CUSTOMERNUM);
-//            if (splitAccount.getSplitAccount() > 0) {
-//                log.info("============设置佣金分账详情对象: " + splitAccount.toString());
-//                list.add(splitAccount);
-//            }
-//        }
-//        return list;
-//    }
-//
+@Service
+@Transactional(readOnly = true)
+public class SplitAccountService {
+
+    public static OkHttpClient client = new OkHttpClient.Builder()
+            .connectTimeout(3, TimeUnit.SECONDS)
+            .readTimeout(20, TimeUnit.SECONDS)
+            .build();
+    /**
+     * 日志对象
+     */
+    private static Logger logger = LoggerFactory.getLogger(Logger.class);
+
+    @Resource
+    private NewOrderDao newOrderDao;
+    @Resource
+    private RedisService redisService;
+
+    @Transactional(readOnly = false)
+    public void SplitAccount() {
+        logger.info("【手动分账开始】>>>>>>>>>>手动分账");
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(new Date());
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String currentTime = format.format(calendar.getTime());
+        // 查询未分账已支付收款
+        List<OrderReceiptRelationPo> orderRelations = newOrderDao.getUndividedPaidReceipt(currentTime);
+        if (null != orderRelations && orderRelations.size() > 0) {
+            for (OrderReceiptRelationPo orderRelation : orderRelations) {
+                logger.info("【分账】>>>>>>>>>>子订单id:" + orderRelation.getShopOrderId() + "进入分账");
+                // 收款对应的订单信息
+                ShopOrderVo shopOrder = newOrderDao.getShopOrderListByOrderId(orderRelation.getShopOrderId());
+                PayParamBo payParam = new PayParamBo();
+                //支付金额
+                payParam.setAllPay(orderRelation.getAssociateAmount());
+                if (12 == orderRelation.getPayType()) {
+                    // 网银支付
+                    payParam.setPayWay("UNIONPAY");
+                }
+                if (17 == orderRelation.getPayType()) {
+                    //b2c网银
+                    payParam.setPayWay("B2C");
+                }
+                //微信0.65%手续费
+                if (8 == orderRelation.getPayType() || 13 == orderRelation.getPayType() || 15 == orderRelation.getPayType()) {
+                    payParam.setPayWay("WX");
+                }
+                List<SplitAccountPo> splitBillDetail = setSplitAccountDetail(shopOrder, payParam);
+                HashMap<String, BigDecimal> sbm = new HashMap<>();
+                for (SplitAccountPo splitAccountPo : splitBillDetail) {
+                    String subUserNo = splitAccountPo.getSubUserNo();
+                    if(sbm.containsKey(subUserNo)){
+                        BigDecimal v = MathUtil.add(sbm.get(subUserNo), splitAccountPo.getSplitAccount());
+                        sbm.put(subUserNo,v);
+                    }else{
+                        sbm.put(subUserNo,BigDecimal.valueOf(splitAccountPo.getSplitAccount()));
+                    }
+                }
+                ArrayList<AccountPayOrder.AccountPayOrderExt.SplitBillRule> splitBillRules = new ArrayList<>();
+                sbm.forEach((key, value) -> {
+                    AccountPayOrder.AccountPayOrderExt.SplitBillRule splitBillRule = new AccountPayOrder.AccountPayOrderExt.SplitBillRule();
+                    splitBillRule.setSplitBillAmount(value);
+                    splitBillRule.setSplitBillMerchantNo(key);
+                    splitBillRules.add(splitBillRule);
+                });
+                // 自己的不分
+                splitBillRules.removeIf(s->s.getSplitBillMerchantNo().equals(shopOrder.getSplitCode()));
+                //第三方分账接口
+                try {
+                    AccountPayOrder accountPayOrder = new AccountPayOrder();
+                    accountPayOrder.setP1_bizType("AccountPaySub");
+                    accountPayOrder.setP2_signType("MD5");
+                    String format1 = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss.SSS").format(new Date());
+                    accountPayOrder.setP3_timestamp(format1);
+                    String substring = format1.substring(20);
+                    // fz+当前微秒时间+原唯一订单号
+                    accountPayOrder.setP4_orderId("FZ" + substring + orderRelation.getOrderRequestNo());
+                    //付款账户子订单绑定商户号
+                    accountPayOrder.setP5_customerNumber(shopOrder.getSplitCode());
+                    AccountPayOrder.AccountPayOrderExt accountPayOrderExt = new AccountPayOrder.AccountPayOrderExt();
+                    //收款账户商编  填写splitBillRules时候不填写MerchantNo,Amount并且即使填写这两个参数不生效!!
+//                    accountPayOrderExt.setInMerchantNo(splitMoneyVo.getName());
+                    accountPayOrderExt.setOrderType(AccountPayOrderType.TRANSFER);
+//                    accountPayOrderExt.setAmount(splitMoneyVo.getSplitMoney());
+                    accountPayOrderExt.setServerCallbackUrl(Constant.betaSplit);
+                    accountPayOrderExt.setGoodsName("分账");
+                    if (null != splitBillRules && splitBillRules.size() > 0) {
+                        accountPayOrderExt.setSplitBillRules(splitBillRules);
+                    }
+                    String ext = JSON.toJSONString(accountPayOrderExt);
+                    logger.info("分账规则串json串:" + ext);
+                    accountPayOrder.setP6_ext(ext);
+                    // 生成签名
+                    StringBuilder builder = new StringBuilder();
+                    builder.append(Constant.SPLIT)
+                            .append(accountPayOrder.getP1_bizType()).append(Constant.SPLIT)
+                            .append(accountPayOrder.getP2_signType()).append(Constant.SPLIT)
+                            .append(accountPayOrder.getP3_timestamp()).append(Constant.SPLIT)
+                            .append(accountPayOrder.getP4_orderId()).append(Constant.SPLIT)
+                            .append(accountPayOrder.getP5_customerNumber()).append(Constant.SPLIT)
+                            .append(accountPayOrder.getP6_ext()).append(Constant.SPLIT)
+                            .append(Constant.XUNI);
+                    String sign = Disguiser.disguiseMD5(builder.toString().trim());
+                    Map<String, String> bean = convertBean(accountPayOrder);
+                    logger.info("--------------------> 发送分账参数:  " + bean);
+                    Map<String, String> map = postForm(bean, Constant.FZ, sign, Map.class);
+                    logger.info("----------------分账返回数据: " + map.toString());
+                    if (map != null) {
+                        String code = map.get("rt5_retCode");
+                        if (!"0000".equals(code)) {
+                            String msg = map.get("rt6_retMsg");
+                            logger.info("【手动分账】>>>>>>>>>>手动分账失败>>>>>>>msg:" + msg);
+                        } else {
+                            for (SplitAccountPo splitAccount : splitBillDetail) {
+                                splitAccount.setMbOrderId(orderRelation.getMbOrderId());
+                                splitAccount.setOrderRequestNo(substring + orderRelation.getOrderRequestNo());
+                                splitAccount.setPayStatus(1);
+                                // 保存分账详情
+                                newOrderDao.insertSplitAccount(splitAccount);
+                            }
+                            redisService.remove("XSFZMDS");
+                            logger.info("【手动分账】>>>>>>>>>>此订单分账结束");
+                        }
+                    }
+                } catch (Exception e) {
+                    logger.error("【手动分账】>>>>>>>>>>错误信息", e);
+                }
+                }
+            }
+        }
+
+
+    private List<SplitAccountPo> setSplitAccountDetail(ShopOrderVo shopOrder, PayParamBo payParam) {
+        List<SplitAccountPo> list = new ArrayList<>();
+        // 本次支付金额,单位/元
+        double payAmount = payParam.getAllPay();
+        // 待分账总金额
+        double splitAmount = payAmount;
+        // 总手续费
+        double procedureFee;
+        if ("UNIONPAY".equals(payParam.getPayWay())) {
+            procedureFee = 10.00;
+        } else if ("B2C".equals(payParam.getPayWay())) {
+            //b2c 0.2%
+            procedureFee = MathUtil.mul(payAmount, 0.002, 2).doubleValue();
+            //b2c最低手续费0.1
+            if (procedureFee < 0.1) {
+                procedureFee = 0.1;
+            }
+        } else if ("WX".equals(payParam.getPayWay())) {
+            //微信0.65%
+            procedureFee = MathUtil.mul(payAmount, 0.0065, 2).doubleValue();
+        } else {
+            //手续费 其他0.25%
+            procedureFee = MathUtil.mul(payAmount, 0.0025, 2).doubleValue();
+        }
+        if (MathUtil.compare(procedureFee, 0.01) <= 0) {
+            procedureFee = 0.01;
+        }
+        //手续费承担方 线上支付手续费:默认1采美承担,2供应商承担
+        Integer supportFlag = newOrderDao.findSupport(shopOrder.getShopOrderId());
+        //减去收款手续费
+        splitAmount = MathUtil.sub(splitAmount, procedureFee).doubleValue();
+
+        // 商品数据
+        List<OrderProductVo> orderProductList = newOrderDao.getOrderProductByShopOrderId(shopOrder.getShopOrderId());
+
+        for (OrderProductVo orderProduct : orderProductList) {
+            //成本价*数量
+            double costPrice = MathUtil.mul(orderProduct.getCostPrice(), orderProduct.getNum()).doubleValue();
+            if (2 == supportFlag) {
+                //供应商自己承担手续费
+                costPrice = MathUtil.sub(costPrice, procedureFee).doubleValue();
+            }
+            // 不含税能开发票
+            if (Integer.valueOf(0).equals(orderProduct.getIncludedTax()) && !Integer.valueOf(3).equals(orderProduct.getInvoiceType())) {
+                //应付总税费
+                Double payableTax = MathUtil.mul(orderProduct.getSingleShouldPayTotalTax(), orderProduct.getNum()).doubleValue();
+                //成本+税费
+                costPrice = MathUtil.add(costPrice, payableTax).doubleValue();
+            }
+            // 判断是否支付过
+            Double paidAmount = newOrderDao.getOrderProductPaidAmount(orderProduct.getOrderProductId());
+            // 支付过金额大于0
+            //有已付
+            if (null != paidAmount && MathUtil.compare(paidAmount, 0) > 0) {
+                //已付>0,成本-已付
+                costPrice = MathUtil.sub(costPrice, paidAmount).doubleValue();
+            }
+            // 待分账金额>成本
+            if (MathUtil.compare(splitAmount, costPrice) > 0) {
+                // 待分账金额-成本
+                splitAmount = MathUtil.sub(splitAmount, costPrice).doubleValue();
+            } else {
+                costPrice = splitAmount;
+                splitAmount = 0.00;
+            }
+            if (costPrice > 0) {
+                SplitAccountPo splitAccount = new SplitAccountPo();
+                splitAccount.setShopOrderId(shopOrder.getShopOrderId());
+                splitAccount.setOrderId(shopOrder.getOrderId());
+                splitAccount.setOrderProductId(orderProduct.getOrderProductId());
+                splitAccount.setShopId(orderProduct.getShopId());
+                splitAccount.setSplitAccount(costPrice);
+                splitAccount.setProductType(1);
+                if (StringUtils.isNotBlank(orderProduct.getSplitCode())) {
+                    // 该商品设置了商户号
+                    splitAccount.setType(4);
+                    splitAccount.setSubUserNo(orderProduct.getSplitCode());
+                }
+                logger.info("成本分账参数------------->" + splitAccount.toString());
+                list.add(splitAccount);
+            }
+            if (MathUtil.compare(splitAmount, 0) == 0) {
+                break;
+            }
+        }
+        // 还有钱就付供应商运费
+        // 付供应商运费,是以供应商为单位的
+        if (MathUtil.compare(splitAmount, 0) > 0) {
+            // 运费
+            Double shopPostFee = shopOrder.getShopPostFee();
+            if (MathUtil.compare(shopPostFee, 0) > 0) {
+                // 查询已支付运费
+                Double shipping = newOrderDao.getPaidShipping(shopOrder.getOrderId(), shopOrder.getShopId());
+                shopPostFee = MathUtil.sub(shopPostFee, shipping).doubleValue();
+                if (MathUtil.compare(splitAmount, shopPostFee) > -1) {
+                    splitAmount = MathUtil.sub(splitAmount, shopPostFee).doubleValue();
+                } else {
+                    shopPostFee = splitAmount;
+                    splitAmount = 0.00;
+                }
+                SplitAccountPo splitAccount = new SplitAccountPo();
+                splitAccount.setOrderId(shopOrder.getOrderId());
+                splitAccount.setShopId(shopOrder.getShopId());
+                splitAccount.setSplitAccount(shopPostFee);
+                splitAccount.setProductType(2);
+                if (StringUtils.isNotBlank(shopOrder.getSplitCode())) {
+                    //供应商拥有子商户号
+                    splitAccount.setType(4);
+                    splitAccount.setSubUserNo(shopOrder.getSplitCode());
+                }
+                logger.info("付供应商运费分账参数------------->" + splitAccount);
+                list.add(splitAccount);
+            }
+        }
+        // 如果还有钱则为佣金,分到采美网络
+        if (MathUtil.compare(splitAmount, 0) > 0) {
+            //分账手续费0.1%采美承担,佣金扣除0.1%
+            Double amount = Math.max(MathUtil.mul(splitAmount, 0.001, 2).doubleValue(), 0.01);
+            splitAmount = MathUtil.sub(splitAmount, amount).doubleValue();
+            SplitAccountPo splitAccount = new SplitAccountPo();
+            splitAccount.setOrderId(shopOrder.getOrderId());
+            splitAccount.setShopOrderId(shopOrder.getShopOrderId());
+            splitAccount.setSplitAccount(splitAmount);
+            splitAccount.setProductType(3);
+            splitAccount.setType(5);
+            splitAccount.setSubUserNo(Constant.CUSTOMERNUM);
+            logger.info("佣金分账参数------------->" + splitAccount);
+            list.add(splitAccount);
+        }
+        return list;
+    }
+
+    public static <T> T postForm(Map<String, String> params, String url, String sign, Class<T> clazz) {
+        FormBody.Builder builder = new FormBody.Builder();
+        for (Map.Entry<String, String> entry : params.entrySet()) {
+            builder.add(entry.getKey(), entry.getValue());
+        }
+        builder.add("sign", sign);
+
+        Request request = new Request.Builder() // okHttp post
+                .url(url)
+                .post(builder.build())
+                .build();
+
+        Response response = null;
+        try {
+            response = client.newCall(request).execute();
+        } catch (IOException e) {
+            throw new IllegalStateException("请求出错", e);
+        }
+        if (!response.isSuccessful()) {
+            try {
+                logger.info(response.body().string());
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+            throw new RuntimeException("请求失败了: http response code: " + response.code());
+        }
+
+        ResponseBody body = response.body();
+        String content = null;
+        try {
+            content = body.string();
+        } catch (IOException e) {
+            throw new IllegalStateException("IO异常", e);
+        }
+        JSONObject res = JSON.parseObject(content);
+        if (!res.getBooleanValue("rt4_success")) {
+            logger.error("error: " + res.getString("rt6_retMsg"));
+        }
+        /** rt4_success 为 true,需验签  **/
+        return res.toJavaObject(clazz);
+    }
 
+    public static Map<String, String> convertBean(Object bean) {
+        Class clazz = bean.getClass();
+        Field[] fields = clazz.getDeclaredFields();
+        for (Field f : fields) {
+            f.setAccessible(true);
+        }
+        try {
+            Map<String, String> retMap = new LinkedHashMap<>();
+            for (Field f : fields) {
+                String key = f.toString().substring(f.toString().lastIndexOf(".") + 1);
+                Object value = f.get(bean);
+                if (value == null) {
+                    value = "";
+                }
+                retMap.put(key, (String) value);
+            }
+            return retMap;
+        } catch (Exception e) {
+            logger.info("分账", e);
+            throw new IllegalStateException("分账异常", e);
+        }
+    }
+}
 
 //    //正式
 ////    public static final String callUrl = "https://core.caimei365.com/order/pay/delay/split/callback";
@@ -532,4 +587,3 @@ import java.util.*;
 //        return list;
 //    }
 
-//}

+ 67 - 386
src/main/java/com/caimei/modules/user/aop/OperationLogAspect.java

@@ -1,5 +1,8 @@
 package com.caimei.modules.user.aop;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
 import com.caimei.modules.user.entity.*;
 import com.caimei.modules.user.service.*;
 import com.caimei.modules.user.utils.HttpContextUtils;
@@ -8,23 +11,32 @@ import com.caimei.modules.user.web.newUser.AgencyController;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
+import com.yeepay.g3.sdk.yop.utils.JsonUtils;
+import net.sf.json.util.JSONUtils;
+import net.sf.jsqlparser.statement.select.Join;
 import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.Signature;
 import org.aspectj.lang.annotation.AfterReturning;
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Pointcut;
 import org.aspectj.lang.reflect.MethodSignature;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.map.ObjectMapper;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.DefaultParameterNameDiscoverer;
+import org.springframework.core.ParameterNameDiscoverer;
 import org.springframework.stereotype.Component;
 import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.ui.Model;
+
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 import java.lang.reflect.Method;
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 @Aspect
 @Component
@@ -43,7 +55,27 @@ public class OperationLogAspect {
 
     }
 
+    private HashMap paramToMap(JoinPoint joinPoint) {
+
+        HashMap map = new HashMap<>();
+
+        //获取参数对象
+        Object[] args = joinPoint.getArgs();
+
+        //参数列表
+        Signature signature = joinPoint.getSignature();
+        MethodSignature methodSignature = (MethodSignature) signature;
+        String[] parameterNames = methodSignature.getParameterNames();
+        int index = 0;
+        for(String str : parameterNames) {
+            map.put(str,args[index++]);
+        }
+        return map;
+    }
+
+
     @AfterReturning("logPointCut()")
+    @JsonIgnore
     public void saveSysLog(JoinPoint joinPoint) throws IOException {
         HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
         //保存日志
@@ -54,14 +86,25 @@ public class OperationLogAspect {
         //获取切入点所在的方法
         Method method = signature.getMethod();
         sysLog.setActioncontent(null);
+        Object[] args = joinPoint.getArgs();
+        HashMap map = new HashMap<>();
+        for (Object arg : args) {
+            System.out.println("aop获取的参数>>>>>>>"+arg.toString());
+        }
+        map = paramToMap(joinPoint);
+        Set<String> keySet=map.keySet();
+
+
+
+
         //获取操作类型
         OperationLogAnnotation myLog = method.getAnnotation(OperationLogAnnotation.class);
+
         if (myLog != null) {
             String value = myLog.operType();
             sysLog.setOperationtype(value);//保存获取的操作类型
-            System.out.println("Operationtype操作类型=" + value);
-        }
 
+        }
         //获取请求的类名
         String className = joinPoint.getTarget().getClass().getName();
 
@@ -108,415 +151,53 @@ public class OperationLogAspect {
         String methodName = myLog.operModul();
         ArrayList<String> list = new ArrayList();
 
-        //*
-        // 未确认机构编辑
-        // */
-        if("1".equals(myLog.oper())&& "编辑".equals(myLog.operType())){
-
-                if (B.clubT.getLinkMan() != "") {
-                    sysLog.setContact(B.clubT.getLinkMan());
-            }
-
-            if (B.clubT.getLinkMan() == null) {
-                if (linkMan != null) {
-                    list.add("新增了联系人");
-                }
-            }
-            if (!B.clubT.getLinkMan().equals(linkMan)) {
-                list.add("修改了联系人");
-            }
-            if (B.clubT.getShortName() == null) {
-                if (shortName != null) {
-                    list.add("新增了机构简称");
-                }
-            }
-            if (!B.clubT.getShortName().equals(shortName)) {
-                list.add("修改了机构简称");
-            }
-
-            if (B.clubT.getName() == null) {
-                if (jgname != null) {
-                    list.add("新增了机构名称");
-                }
-            }
-            if (!B.clubT.getName().equals(jgname)) {
-                list.add("修改了机构名称");
-            }
-
-            if (B.clubT.getBindMobile() == null) {
-                if (bindm != null) {
-                    list.add("新增了手机号");
-                }
-            }
-            if (!B.clubT.getBindMobile().equals(bindm)) {
-                list.add("修改了手机号");
-            }
-
-            if (B.clubT.getContractEmail() == null) {
-                if (email != null) {
-                    list.add("新增邮箱");
-                }
-            }
-            if (!B.clubT.getContractEmail().equals(email)) {
-                list.add("修改了邮箱");
-            }
-            if (!B.clubT.getAddress().equals(address)) {
-                list.add("修改了详细地址");
-            }
-            if (B.clubT.getBusinessLicense() == null) {
-                if (businessLicenseImage != null) {
-                    list.add("新增了营业执照");
-                }
-            } else {
-                if (!B.clubT.getBusinessLicense().equals(businessLicenseImage)) {
-                    list.add("修改了营业执照");
-                }
-            }
-
-            if (B.clubT.getShopPhoto() == null) {
-                if (headpic != null) {
-                    list.add("新增了门头照");
-                }
-                if (!B.clubT.getShopPhoto().equals(headpic)) {
-                    list.add("修改了门头照");
-                }
-            }
-
-
-            if (B.clubT.getSocialCreditCode() == null) {
-                if (socialCreditCode != null) {
-                    list.add("新增了营业执照编号");
-                }
-                if (!B.clubT.getSocialCreditCode().equals(socialCreditCode)) {
-                    list.add("修改了营业执照编号");
-                }
-            }
-            if (B.clubT.getFirstClubType() == null) {
-                if (ClubType != null) {
-                    list.add("新增了机构类型");
-                }
-            } else if (!B.clubT.getFirstClubType().equals(ClubType)) {
-                list.add("修改了机构类型");
-            }
-
-        }
-
-
-
-        if ("编辑".equals(myLog.operType())&& "2".equals(myLog.oper()) ) {
-            logger.info(A.cmClu.getHighestAchievement()+"*****"+A.cmClu.getReachPepole()+"*****"+A.cmClu.getClinchPepole());
-            if ("".equals(A.cmClu.getHighestAchievement()) || A.cmClu.getReachPepole() == null || A.cmClu.getClinchPepole() == null) {
-                if (!"".equals(highestAchievement) || !"".equals(reachPepole) || !"".equals(clinchPepole)) {
-                    list.add("新增了活动业绩信息");
-                }
-
-            } else {
-                if (!highestAchievement.equals(A.cmClu.getHighestAchievement())) {
-                    list.add("修改了活动业绩的最高业绩信息");
-                }
-
-                if (Integer.parseInt(reachPepole) != A.cmClu.getReachPepole()) {
-                    list.add("修改了活动业绩的到店人数信息");
-                }
-                if (Integer.parseInt(clinchPepole) != A.cmClu.getClinchPepole()) {
-                    list.add("修改了活动业绩的成交人数信息");
-                }
-            }
-
-
-            if (A.cmClu.getConsumeA() == null || A.cmClu.getConsumeB() == null || A.cmClu.getConsumeC() == null) {
-                if (A.cmClu.getConsumeA() != null || A.cmClu.getConsumeB() != null || A.cmClu.getConsumeC() != null) {
-                    list.add("新增了会员消费金额信息");
-                }
-            } else {
-                BigDecimal cateAs = new BigDecimal(consumeA);
-                BigDecimal cateBs = new BigDecimal(consumeB);
-                BigDecimal cateCs = new BigDecimal(consumeC);
-                if (A.cmClu.getConsumeA() != cateAs) {
-                    list.add("修改了A类会员消费金额");
-                }
-                if (A.cmClu.getConsumeB() != cateBs) {
-                    list.add("修改了B类会员消费金额");
-                }
-                if (A.cmClu.getConsumeC() != cateCs) {
-                    list.add("修改了C类会员消费金额");
-                }
-            }
-
-
-            if (A.cmClu.getCateA() == null || A.cmClu.getCateB() == null || A.cmClu.getCateC() == null) {
-                if (!"".equals(cateA) || !"".equals(cateB) || !"".equals(cateC)) {
-                    list.add("新增了会员信息");
-                }
-            } else {
-                if (A.cmClu.getCateA() != Integer.parseInt(cateA)) {
-                    list.add("修改了A会员信息");
-                }
-                if (A.cmClu.getCateB() != Integer.parseInt(cateB)) {
-                    list.add("修改了B会员信息");
-                }
-                if (A.cmClu.getCateC() != Integer.parseInt(cateC)) {
-                    list.add("修改了C会员信息");
-                }
-            }
-
-
-            if ("".equals(A.cmClu.getMonthAchievement()) || "".equals(A.cmClu.getPromotionAchievement()) || "".equals(A.cmClu.getYearAchievement())) {
-                if (!"".equals(monthAchievement) || !"".equals(promotionAchievement) || !"".equals(yearAchievement)) {
-                    list.add("新增了业绩信息");
-                }
-
-            } else {
-                if (!monthAchievement.equals(A.cmClu.getMonthAchievement())) {
-                    list.add("修改了月业绩信息");
-                }
-
-                if (promotionAchievement != A.cmClu.getPromotionAchievement()) {
-                    list.add("修改了促销业绩信息");
-                }
-                if (yearAchievement != A.cmClu.getYearAchievement()) {
-                    list.add("修改了年业绩信息");
-                }
-            }
-
-
-            if (A.cmClu.getArea() == null || A.cmClu.getBedNums() == null || A.cmClu.getBeauticians() == null) {
-                if (!"".equals(area) || !"".equals(bedNums) || !"".equals(beauticians)) {
-                    list.add("更新了基本信息");
-                }
-            } else {
-                if (A.cmClu.getArea() != Integer.parseInt(area)) {
-                    list.add("修改了机构面积");
-                }
-                if (A.cmClu.getBedNums() != Integer.parseInt(bedNums)) {
-                    list.add("修改了美容床数");
-                }
-                if (A.cmClu.getBeauticians() != Integer.parseInt(beauticians)) {
-                    list.add("修改了美容师数");
-                }
-            }
-
-
-            if (A.newCm.getInfo() == null) {
-                if (!"".equals(info)) {
-                    list.add("新增了公司简介");
-                }
-            } else if (!A.newCm.getInfo().equals(info)) {
-                list.add("修改了公司简介");
-            }
-
-            if (empnum.equals(A.cmClu.getEmpnum())) {
-                list.add("更新了公司人数");
-            }
-
-            if (A.newCm.getFax() == null) {
-                if (!"".equals(fax)) {
-                    list.add("新增了传真");
-                }
-            } else if (!A.newCm.getFax().equals(fax)) {
-                list.add("修改了传真");
-            }
-
-
-            if (A.newCm.getContractPhone() == null) {
-                if (!"".equals(contractPhone)) {
-                    list.add("新增了固定电话");
-                }
-            } else if (!A.newCm.getContractPhone().equals(contractPhone)) {
-                list.add("修改了固定电话");
-            }
-
-
-            if (!A.newCm.getAddress().equals(address)) {
-                list.add("修改了详细地址");
-            }
-            if (Identity != null) {
-                if (A.newCm.getLinkManIdentity() != Integer.parseInt(Identity)) {
-                    list.add("修改了联系人身份");
-                }
-            }
-            if (A.newCm.getUserName() == null) {
-                if (uname != null) {
-                    list.add("新增了联系人");
-                }
-            }
-            if (!A.newCm.getUserName().equals(uname)) {
-                list.add("修改了联系人");
-            }
-
-
-            if (A.newCm.getFirstClubType() == null) {
-                if (ClubType != null) {
-                    list.add("新增了机构类型");
-                }
-            } else if (!A.newCm.getFirstClubType().equals(ClubType)) {
-                list.add("修改了机构类型");
-            }
-
-
-            if (A.newCm.getBusinessLicenseImage() == null) {
-                if (businessLicenseImage != null) {
-                    list.add("新增了营业执照");
-                }
-            } else {
-                if (!A.newCm.getBusinessLicenseImage().equals(businessLicenseImage)) {
-                    list.add("修改了营业执照");
-                }
-            }
-
-
-            if (A.newCm.getHeadpic() == null) {
-                if (headpic != null) {
-                    list.add("新增了门头照");
-                }
-                if (!A.newCm.getHeadpic().equals(headpic)) {
-                    list.add("修改了门头照");
-                }
-            }
-
-
-            if (A.newCm.getSocialCreditCode() == null) {
-                if (socialCreditCode != null) {
-                    list.add("新增了营业执照编号");
-                }
-                if (!A.newCm.getSocialCreditCode().equals(socialCreditCode)) {
-                    list.add("修改了营业执照编号");
-                }
-            }
-
-
-            if (A.newCm.getAddress() == null) {
-                if (address != null) {
-                    list.add("新增了详细地址");
-                }
-            }
-
-
-            if (A.newCm.getSname() == null) {
-                if (sname != null) {
-                    list.add("新增了机构简称");
-                }
-            }
-            if (!A.newCm.getSname().equals(sname)) {
-                list.add("修改了机构简称");
-            }
-
-            if (A.newCm.getName() == null) {
-                if (jgname != null) {
-                    list.add("新增了机构名称");
-                }
-            }
-            if (!A.newCm.getName().equals(jgname)) {
-                list.add("修改了机构名称");
-            }
-
-            if (A.newCm.getBindMobile() == null) {
-                if (bindm != null) {
-                    list.add("新增了手机号");
-                }
-            }
-            if (!A.newCm.getBindMobile().equals(bindm)) {
-                list.add("修改了手机号");
-            }
-
-            if (A.newCm.getContractEmail() == null) {
-                if (email != null) {
-                    list.add("新增了注册邮箱");
-                }
-            }
-            if (!A.newCm.getContractEmail().equals(email)) {
-                list.add("修改了邮箱");
-            }
-            sysLog.setActioncontent(StringUtils.strip(list.toString(), "[]"));
-        }
-        if (sysLog.getActioncontent() == null) {
-            sysLog.setActioncontent(methodName);
-        }
-        //获取操作时间
-        sysLog.setOperationtime(new Date());
-
-        //获取操作员
-        Principal principal = UserUtils.getPrincipal();
-        System.out.println("操作员" + principal.getName());
-        String username = principal.getName();
-        sysLog.setOperator(username);
 
         //获取机构名称和联系人
         String id = request.getParameter("id");
-        if ("编辑".equals(myLog.operType())) {
-            sysLog.setInstitutionName(jgname);
-            sysLog.setContact(uname);
-        }
-
-
-
-        if ("更换协销".equals(myLog.operType())) {
-            System.out.println("更换协销" + A.newCms.getLinkMan());
-            System.out.println("更换协销" + A.newCm.getLinkMan());
-            if (!"".equals(A.newCms.getLinkMan())) {
-                sysLog.setActioncontent(A.newCm.getLinkMan() + "更换为" + A.newCms.getLinkMan());
-            }
-            sysLog.setContact(A.newCm.getUserName());
-            sysLog.setInstitutionName(A.newCm.getLinkMan());
-        }
-
-
-        if ("设置机构类别".equals(myLog.operType())) {
-            System.out.println("机构类别" + A.types);
-            if ("1".equals(A.types)) {
-                sysLog.setActioncontent("设置为资质机构");
-            } else {
-                sysLog.setActioncontent("设置为个人机构");
-            }
-            sysLog.setContact(A.cmUs.getUserName());
-            sysLog.setInstitutionName(A.cmUs.getName());
-        }
+        sysLog.setOperationtime(new Date());
+        sysLog.setActioncontent(myLog.operModul());
+        sysLog.setOperationtype(myLog.operType());
 
+        
 
-        if ("审核".equals(myLog.operType())) {
-            System.out.println("审核" + A.cmUs.getAuditStatus());
-            if (StringUtils.equals("1", A.cmUs.getAuditStatus())) {
-                sysLog.setActioncontent("审核通过");
-            } else {
-                sysLog.setActioncontent("审核不通过");
-            }
-            sysLog.setContact(A.cmUs.getUserName());
-            sysLog.setInstitutionName(A.cmUs.getName());
-        }
 
 
-        if ("更改状态".equals(myLog.operType())) {
-            sysLog.setContact(A.cmUs.getUserName());
-            sysLog.setInstitutionName(A.cmUs.getName());
-        }
 
 
         if ("修改密码".equals(myLog.operType())) {
-            String Inst = A.cmUs.getName();
-            String Contact = A.cmUs.getUserName();
+            System.out.println(Integer.parseInt(map.get("id").toString())+">>>>>>>>"+Integer.parseInt(map.get("id").toString()));
+            String Inst = sysLogService.passName(Integer.parseInt(map.get("id").toString()));
+            String Contact = sysLogService.PasslinkMan(Integer.parseInt(map.get("id").toString()));
+            sysLog.setOperationtype(myLog.operModul());
+            sysLog.setOperationtype(myLog.operType());
             sysLog.setContact(Contact);
             sysLog.setInstitutionName(Inst);
         }
 
         if ("确认注册".equals(myLog.operType())) {
-            sysLog.setActioncontent(methodName);
+            sysLog.setActioncontent(myLog.operModul());
             ClubTemporary club = clubTemporaryService.get(id);
             if (club != null) {
-                String Inst = club.getLinkMan();
-                String Contact = club.getName();
+                String  Contact= club.getLinkMan();
+                String Inst = club.getName();
                 sysLog.setContact(Contact);
                 sysLog.setInstitutionName(Inst);
                 System.out.println("contact=" + sysLog.getContact());
             }
         }
 
+        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+        System.out.println("操作员" + principal.getName());
+        String username = principal.getName();
+        sysLog.setOperator(username);
+        sysLog.setOperationtype(myLog.operType());
         //调用service保存SysLog实体类到数据库
         if (!"".equals(sysLog.getActioncontent())) {
-//            if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+            if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
                 int i = sysLogService.insert(sysLog);
                 list.removeAll(list);
             }
         }
 //    }
-
+    }
 }

+ 134 - 316
src/main/java/com/caimei/modules/user/aop/OperationLogCmShop.java

@@ -1,316 +1,134 @@
-package com.caimei.modules.user.aop;
-
-import com.caimei.modules.user.entity.CmOperationalLogs;
-import com.caimei.modules.user.entity.CmUser;
-import com.caimei.modules.user.service.CmOperationUserService;
-import com.caimei.modules.user.service.CmOperationalLogService;
-import com.caimei.modules.user.service.CmUserService;
-import com.caimei.modules.user.service.SysLogService;
-import com.caimei.modules.user.utils.HttpContextUtils;
-import com.caimei.modules.user.web.NewCmShopController;
-import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm;
-import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.annotation.AfterReturning;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Pointcut;
-import org.aspectj.lang.reflect.MethodSignature;
-import org.slf4j.ILoggerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Date;
-
-@Aspect
-@Component
-public class OperationLogCmShop {
-
-    protected Logger logger = LoggerFactory.getLogger(getClass());
-    @Autowired
-    private CmOperationalLogService sysLogService;
-
-    @Autowired
-    private CmUserService cmUserService;
-
-    @Pointcut("@annotation(com.caimei.modules.user.aop.OperationLogShop)")
-    public void logPointCut() {
-
-    }
-
-    @AfterReturning("logPointCut()")
-    public void saveSysLog(JoinPoint joinPoint) throws IOException {
-        HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
-
-        CmOperationalLogs sysLog = new CmOperationalLogs();
-
-        //从切面织入点处通过反射机制获取织入点处的方法
-        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
-        //获取切入点所在的方法
-        Method method = signature.getMethod();
-        //获取操作类型
-        OperationLogShop oper = method.getAnnotation(OperationLogShop.class);
-
-        NewCmShopController A = new NewCmShopController();
-
-        ArrayList<String> list = new ArrayList();
-
-        String maintenanceFee = request.getParameter("maintenanceFee");//线上分账商户号
-        String name = request.getParameter("name");//公司名称
-        String sname = request.getParameter("sname");//公司简称
-        String address = request.getParameter("address");//公司地址
-        String linkMan = request.getParameter("linkMan");//修改后的联系人
-        String contractMobile = request.getParameter("contractMobile");//手机号
-        String email = request.getParameter("email");//邮箱
-        String contractPhone = request.getParameter("contractPhone");//固定电话
-        String fax = request.getParameter("fax");//传真
-        String legalPerson = request.getParameter("legalPerson");//法人代表:
-        String registeredCapital = request.getParameter("registeredCapital");//注册资本
-        String nature = request.getParameter("nature");//公司性质
-        String turnover = request.getParameter("turnover");//年营业额
-        String firstShopType = request.getParameter("firstShopType");//公司类型
-        String secondShopType = request.getParameter("secondShopType");//医疗类型
-        String mainpro = request.getParameter("mainpro");//主营内容
-        String businessScope = request.getParameter("businessScope");//经营范围
-        String website = request.getParameter("website");//官网地址
-        String wxOfficialAccount = request.getParameter("wxOfficialAccount");//微信公众号
-        String wxApplets = request.getParameter("wxApplets");//微信小程序
-        String socialCreditCode = request.getParameter("socialCreditCode");//营业执照编号
-        String businessLicenseImage = request.getParameter("businessLicenseImage");//营业执照图片
-        String logo = request.getParameter("logo");//公司logo
-
-        if (oper.operType().equals("编辑")) {
-
-            if (A.newcm.getMaintenanceFee() == "0") {
-                if (!maintenanceFee.equals("0")) {
-                    list.add("新增了线上分账商户号");
-                }
-            } else if (!A.newcm.getMaintenanceFee().equals(maintenanceFee)) {
-                list.add("修改了线上分账商户号");
-            }
-
-            if (A.newcm.getName() == null) {
-                if (!name.equals("")) {
-                    list.add("新增了公司名称");
-                }
-            } else if (!A.newcm.getName().equals(name)) {
-                list.add("修改了公司名称");
-            }
-
-            if (A.newcm.getSname() == null) {
-                if (!sname.equals("")) {
-                    list.add("新增了公司简称");
-                }
-            } else if (!A.newcm.getSname().equals(sname)) {
-                list.add("修改了公司简称");
-            }
-
-            if (A.newcm.getAddress() == null) {
-                if (!address.equals("")) {
-                    list.add("新增了公司地址");
-                }
-            } else if (!A.newcm.getAddress().equals(address)) {
-                list.add("修改了公司地址");
-            }
-
-            if (A.newcm.getLinkMan() == null) {
-                if (!linkMan.equals("")) {
-                    list.add("新增了联系人");
-                }
-            } else if (!A.newcm.getLinkMan().equals(linkMan)) {
-                list.add("修改了联系人");
-            }
-
-            if (A.newcm.getContractMobile() == null) {
-                if (!contractMobile.equals("")) {
-                    list.add("新增了手机号");
-                }
-            } else if (!A.newcm.getContractMobile().equals(contractMobile)) {
-                list.add("修改了手机号");
-            }
-
-            if (A.newcm.getEmail() == null) {
-                if (!email.equals("")) {
-                    list.add("新增了邮箱");
-                }
-            } else if (!A.newcm.getEmail().equals(email)) {
-                list.add("修改了邮箱");
-            }
-
-            if (A.newcm.getContractPhone() == null) {
-                if (!contractPhone.equals("")) {
-                    list.add("新增了固定电话");
-                }
-            } else if (!A.newcm.getContractPhone().equals(contractPhone)) {
-                list.add("修改了固定电话");
-            }
-
-            if (A.newcm.getFax() == null) {
-                if (!fax.equals("")) {
-                    list.add("新增了传真");
-                }
-            } else if (!A.newcm.getFax().equals(fax)) {
-                list.add("修改了传真");
-            }
-
-            if (A.newcm.getLegalPerson() == null) {
-                if (!legalPerson.equals("")) {
-                    list.add("新增了法人代表");
-                }
-            } else if (!A.newcm.getLegalPerson().equals(legalPerson)) {
-                list.add("修改了法人代表");
-            }
-
-            if (A.newcm.getRegisteredCapital() == null) {
-                if (!registeredCapital.equals("")) {
-                    list.add("新增了注册资本");
-                }
-            }
-            if (registeredCapital != "") {
-                    logger.info("***********"+A.newcm.getRegisteredCapital()+"+++++++++++++"+ Double.parseDouble(registeredCapital));
-                if (A.newcm.getRegisteredCapital() != Double.parseDouble(registeredCapital)) {
-                    list.add("修改了注册资本");
-                }
-            }
-            if (A.newcm.getNature() == null) {
-                if (!nature.equals("")) {
-                    list.add("新增了公司性质");
-                }
-            } else if (!A.newcm.getNature().equals(nature)) {
-                list.add("修改了公司性质");
-            }
-
-            if (A.newcm.getTurnover() == null) {
-                if (!turnover.equals("")) {
-                    list.add("新增了年营业额");
-                }
-            } else if (!A.newcm.getTurnover().equals(turnover)) {
-                list.add("修改了年营业额");
-            }
-
-            if (A.newcm.getFirstShopType() == null) {
-                if (!firstShopType.equals("")) {
-                    list.add("新增了公司类型");
-                }
-            } else if (!A.newcm.getFirstShopType().equals(firstShopType)) {
-                list.add("修改了公司类型");
-            }
-
-            if (A.newcm.getSecondShopType() == null) {
-                if (!secondShopType.equals("")) {
-                    list.add("新增了医疗类型");
-                }
-            } else if (!A.newcm.getSecondShopType().equals(secondShopType)) {
-                list.add("修改了医疗类型");
-            }
-
-            if (A.newcm.getMainpro() == null) {
-                if (!mainpro.equals("")) {
-                    list.add("新增了主营内容");
-                }
-            } else if (!A.newcm.getMainpro().equals(mainpro)) {
-                list.add("修改了主营内容");
-            }
-
-            if (A.newcm.getBusinessScope() == null) {
-                if (!businessScope.equals("")) {
-                    list.add("新增了医疗类型");
-                }
-            } else if (!A.newcm.getBusinessScope().equals(businessScope)) {
-                list.add("修改了医疗类型");
-            }
-
-            if (A.newcm.getWebsite() == null) {
-                if (!website.equals("")) {
-                    list.add("新增了官网地址");
-                }
-            } else if (!A.newcm.getWebsite().equals(website)) {
-                list.add("修改了官网地址");
-            }
-
-            if (A.newcm.getWxOfficialAccount() == null) {
-                if (!wxOfficialAccount.equals("")) {
-                    list.add("新增了微信公众号");
-                }
-            } else if (!A.newcm.getWxOfficialAccount().equals(wxOfficialAccount)) {
-                list.add("修改了微信公众号");
-            }
-
-            if (A.newcm.getWxApplets() == null) {
-                if (!wxApplets.equals("")) {
-                    list.add("新增了微信小程序");
-                }
-            } else if (!A.newcm.getWxApplets().equals(wxApplets)) {
-                list.add("修改了微信小程序");
-            }
-
-            if (A.newcm.getSocialCreditCode() == null) {
-                if (!socialCreditCode.equals("")) {
-                    list.add("新增了营业执照编号");
-                }
-            } else if (!A.newcm.getSocialCreditCode().equals(socialCreditCode)) {
-                list.add("修改了营业执照编号");
-            }
-
-            if (A.newcm.getBusinessLicenseImage() == null) {
-                if (!businessLicenseImage.equals("")) {
-                    list.add("新增了营业执照图片");
-                }
-            } else if (!A.newcm.getBusinessLicenseImage().equals(businessLicenseImage)) {
-                list.add("修改了营业执照图片");
-            }
-
-            if (A.newcm.getLogo() == null) {
-                if (!logo.equals("")) {
-                    list.add("新增了营业执照图片");
-                }
-            } else if (!A.newcm.getLogo().equals(logo)) {
-                list.add("修改了营业执照图片");
-            }
-            sysLog.setActioncontent(StringUtils.strip(list.toString(), "[]"));
-        }
-        sysLog.setInstitutionName(name);
-        sysLog.setContact(linkMan);
-
-
-        sysLog.setOperationtime(new Date());
-        sysLog.setOperationtype(oper.operType());
-
-        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
-        System.out.println("操作员" + principal.getName());
-        String username = principal.getName();
-        sysLog.setOperator(username);
-
-        if (oper.operType().equals("更改状态")) {
-            CmUser cmUser = cmUserService.get(String.valueOf(A.id));
-            sysLog.setInstitutionName(cmUser.getName());
-            sysLog.setActioncontent(oper.operModul());
-            sysLog.setContact(cmUser.getUserName());
-        }
-
-        if (oper.operType().equals("修改密码")) {
-            sysLog.setInstitutionName(A.cmus.getName());
-            sysLog.setActioncontent(oper.operModul());
-            sysLog.setContact(A.cmus.getUserName());
-        }
-        if (oper.operType().equals("审核")) {
-            sysLog.setInstitutionName(A.cmus.getName());
-            if(StringUtils.equals("1", A.auditNo)){sysLog.setActioncontent("审核通过");}
-            if (StringUtils.equals("2", A.auditNo)){ sysLog.setActioncontent("审核不通过");}
-            sysLog.setContact(A.cmus.getUserName());
-        }
-
-
-        System.out.println(sysLog.getInstitutionName());
-        if (!"".equals(sysLog.getActioncontent())) {
-                int i = sysLogService.insert(sysLog);
-                list.removeAll(list);
-        }
-    }
-}
+//package com.caimei.modules.user.aop;
+//
+//import com.caimei.modules.user.entity.CmOperationalLogs;
+//import com.caimei.modules.user.entity.CmUser;
+//import com.caimei.modules.user.service.CmOperationUserService;
+//import com.caimei.modules.user.service.CmOperationalLogService;
+//import com.caimei.modules.user.service.CmUserService;
+//import com.caimei.modules.user.service.SysLogService;
+//import com.caimei.modules.user.utils.HttpContextUtils;
+//import com.caimei.modules.user.web.NewCmShopController;
+//import com.thinkgem.jeesite.common.utils.StringUtils;
+//import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm;
+//import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
+//import org.aspectj.lang.JoinPoint;
+//import org.aspectj.lang.annotation.AfterReturning;
+//import org.aspectj.lang.annotation.Aspect;
+//import org.aspectj.lang.annotation.Pointcut;
+//import org.aspectj.lang.reflect.MethodSignature;
+//import org.slf4j.ILoggerFactory;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Component;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import java.io.IOException;
+//import java.lang.reflect.Method;
+//import java.util.ArrayList;
+//import java.util.Date;
+//
+//@Aspect
+//@Component
+//public class OperationLogCmShop {
+//
+//    protected Logger logger = LoggerFactory.getLogger(getClass());
+//    @Autowired
+//    private CmOperationalLogService sysLogService;
+//
+//    @Autowired
+//    private CmUserService cmUserService;
+//
+//    @Pointcut("@annotation(com.caimei.modules.user.aop.OperationLogShop)")
+//    public void logPointCut() {
+//
+//    }
+//
+//    @AfterReturning("logPointCut()")
+//    public void saveSysLog(JoinPoint joinPoint) throws IOException {
+//        HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
+//
+//        CmOperationalLogs sysLog = new CmOperationalLogs();
+//
+//        //从切面织入点处通过反射机制获取织入点处的方法
+//        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+//        //获取切入点所在的方法
+//        Method method = signature.getMethod();
+//        //获取操作类型
+//        OperationLogShop oper = method.getAnnotation(OperationLogShop.class);
+//
+//        NewCmShopController A = new NewCmShopController();
+//
+//        ArrayList<String> list = new ArrayList();
+//
+//        String maintenanceFee = request.getParameter("maintenanceFee");//线上分账商户号
+//        String name = request.getParameter("name");//公司名称
+//        String sname = request.getParameter("sname");//公司简称
+//        String address = request.getParameter("address");//公司地址
+//        String linkMan = request.getParameter("linkMan");//修改后的联系人
+//        String contractMobile = request.getParameter("contractMobile");//手机号
+//        String email = request.getParameter("email");//邮箱
+//        String contractPhone = request.getParameter("contractPhone");//固定电话
+//        String fax = request.getParameter("fax");//传真
+//        String legalPerson = request.getParameter("legalPerson");//法人代表:
+//        String registeredCapital = request.getParameter("registeredCapital");//注册资本
+//        String nature = request.getParameter("nature");//公司性质
+//        String turnover = request.getParameter("turnover");//年营业额
+//        String firstShopType = request.getParameter("firstShopType");//公司类型
+//        String secondShopType = request.getParameter("secondShopType");//医疗类型
+//        String mainpro = request.getParameter("mainpro");//主营内容
+//        String businessScope = request.getParameter("businessScope");//经营范围
+//        String website = request.getParameter("website");//官网地址
+//        String wxOfficialAccount = request.getParameter("wxOfficialAccount");//微信公众号
+//        String wxApplets = request.getParameter("wxApplets");//微信小程序
+//        String socialCreditCode = request.getParameter("socialCreditCode");//营业执照编号
+//        String businessLicenseImage = request.getParameter("businessLicenseImage");//营业执照图片
+//        String logo = request.getParameter("logo");//公司logo
+//
+//
+//
+//
+//        sysLog.setInstitutionName(name);
+//        sysLog.setContact(linkMan);
+//
+//
+//        sysLog.setOperationtime(new Date());
+//        sysLog.setOperationtype(oper.operType());
+//
+//        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+//        System.out.println("操作员" + principal.getName());
+//        String username = principal.getName();
+//        sysLog.setOperator(username);
+//
+////        if (oper.operType().equals("更改状态")) {
+////            sysLog.setOperationtime(new Date());
+////            sysLog.setOperationtype(oper.operType());
+////            CmUser cmUser = cmUserService.get(String.valueOf(A.id));
+////            sysLog.setInstitutionName(cmUser.getName());
+////            sysLog.setActioncontent(oper.operModul());
+////            sysLog.setContact(cmUser.getUserName());
+////        }
+//
+////        if (oper.operType().equals("修改密码")) {
+////            sysLog.setOperationtime(new Date());
+////            sysLog.setOperationtype(oper.operType());
+////            sysLog.setInstitutionName(A.cmus.getName());
+////            sysLog.setActioncontent(oper.operModul());
+////            sysLog.setContact(A.cmus.getUserName());
+////            if (!"".equals(sysLog.getActioncontent())) {
+////                int i = sysLogService.insert(sysLog);
+////                list.removeAll(list);
+////            }
+////        }
+//        if (oper.operType().equals("审核")) {
+//
+//        }
+//
+//
+//        System.out.println(sysLog.getInstitutionName());
+//        if (!"".equals(sysLog.getActioncontent())) {
+//                int i = sysLogService.insert(sysLog);
+//                list.removeAll(list);
+//        }
+//    }
+//}

+ 2 - 1
src/main/java/com/caimei/modules/user/dao/CmClubinfoDao.java

@@ -15,4 +15,5 @@ public interface CmClubinfoDao extends CrudDao<CmClubinfo> {
 
     CmClubinfo getClubInfoByClubID(@Param("clubID") Integer clubID);
 
-}
+     int insert(CmClubinfo cmClubinfo);
+}

+ 2 - 0
src/main/java/com/caimei/modules/user/dao/CmOperationsDao.java

@@ -2,10 +2,12 @@ package com.caimei.modules.user.dao;
 
 import com.caimei.modules.user.entity.CmOperationalLogs;
 
+import com.caimei.modules.user.entity.NewCmShop;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 
 @MyBatisDao
 public interface CmOperationsDao extends CrudDao<CmOperationalLogs> {
+    NewCmShop shoplist(Integer shopID);
 
 }

+ 23 - 2
src/main/java/com/caimei/modules/user/dao/OperationsDao.java

@@ -1,11 +1,32 @@
 package com.caimei.modules.user.dao;
 
-import com.caimei.modules.user.entity.NewCmShop;
-import com.caimei.modules.user.entity.OperationalLogs;
+import com.caimei.modules.user.entity.*;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 
 @MyBatisDao
 public interface OperationsDao extends CrudDao<OperationalLogs> {
 
+   String ClubName(Integer clubChangeSpRecordID);
+
+   String ClubsName(Integer clubChangeSpRecordID);
+
+   String JgName(Integer clubChangeSpRecordID);
+
+   String linkMan(Integer clubChangeSpRecordID);
+
+   String passName(Integer userID);
+
+   String PasslinkMan(Integer userID);
+
+   String auditName(Integer clubID);
+
+   String auditlinkMan(Integer clubID);
+
+   NewCmClub newCmClub(Integer clubId);
+
+   CmClubinfo cmclubinfo(Integer clubId);
+
+   ClubTemporary temPorary(String Id);
 }
+

+ 1 - 2
src/main/java/com/caimei/modules/user/entity/CmClubinfo.java

@@ -44,7 +44,7 @@ public class CmClubinfo extends DataEntity<CmClubinfo> {
     private Integer clinchPepole;        // 成交人数
     private Date createTime;        // 创建时间
     private Date updateTime;        // 修改时间
-
+    private Integer empnum; // 员工数
     /**
      * 非持久化字段
      */
@@ -57,7 +57,6 @@ public class CmClubinfo extends DataEntity<CmClubinfo> {
     private String address;        // 详细地址
     private String contractPhone;        // 联系电话
     private String fax;        // 传真
-    private Integer empnum;        // 员工数
     private String info;        // 公司简介
     private String firstClubType;  //一级分类为医美=1和生美=2
     private String secondClubType;  //医美的二级分类为诊所=1、门诊=2、医院=3。 生美没有二级分类

+ 18 - 1
src/main/java/com/caimei/modules/user/entity/CmOperationalLogs.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.user.entity;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 
 import java.util.Date;
@@ -11,8 +12,24 @@ public class CmOperationalLogs extends DataEntity<CmOperationalLogs> {
     private String Actioncontent;
     private String Operator;
     private Date Operationtime;
+    private String startTime;     //添加时间开始 查询条件
+    private String endTime;        //添加时间结束  查询条件
 
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
 
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
 
     public String getInstitutionName() {
         return institutionName;
@@ -56,7 +73,7 @@ public class CmOperationalLogs extends DataEntity<CmOperationalLogs> {
     public void setOperator(String operator) {
         Operator = operator;
     }
-
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     public Date getOperationtime() {
         return Operationtime;
     }

+ 0 - 2
src/main/java/com/caimei/modules/user/entity/NewCmClub.java

@@ -89,11 +89,9 @@ public class NewCmClub extends DataEntity<NewCmClub> {
     private String endTime;        //注册时间结束  查询条件
     private String userIdentity;  //用户身份
     private Integer svipUserFlag;   //超级会员用户标识,1是,2不是
-
     public String getCheckMan() {
         return checkMan;
     }
-
     public void setCheckMan(String checkMan) {
         this.checkMan = checkMan;
     }

+ 0 - 1
src/main/java/com/caimei/modules/user/entity/NewCmShop.java

@@ -95,7 +95,6 @@ public class NewCmShop extends DataEntity<NewCmShop> {
     private String editStatus;//1编辑,2审核
     private String source; //注册来源: 0网站 1小程序
 
-
     public NewCmShop() {
         super();
     }

+ 16 - 0
src/main/java/com/caimei/modules/user/entity/OperationalLogs.java

@@ -13,8 +13,24 @@ public class OperationalLogs extends DataEntity<OperationalLogs> {
   private String Actioncontent;
   private String Operator;
   private Date Operationtime;
+  private String startTime;     //添加时间开始 查询条件
+  private String endTime;        //添加时间结束  查询条件
 
+  public String getStartTime() {
+    return startTime;
+  }
+
+  public void setStartTime(String startTime) {
+    this.startTime = startTime;
+  }
 
+  public String getEndTime() {
+    return endTime;
+  }
+
+  public void setEndTime(String endTime) {
+    this.endTime = endTime;
+  }
 
   public String getInstitutionName() {
     return institutionName;

+ 10 - 5
src/main/java/com/caimei/modules/user/service/CmClubinfoService.java

@@ -23,23 +23,28 @@ public class CmClubinfoService extends CrudService<CmClubinfoDao, CmClubinfo> {
 	@Autowired
 	CmClubinfoDao cmClubinfoDao;
 
+	@Transactional(readOnly = false)
+    public int insert(CmClubinfo cmClubinfo){
+		return cmClubinfoDao.insert(cmClubinfo);
+	}
+
 	public CmClubinfo get(String id) {
 		return super.get(id);
 	}
-	
+
 	public List<CmClubinfo> findList(CmClubinfo cmClubinfo) {
 		return super.findList(cmClubinfo);
 	}
-	
+
 	public Page<CmClubinfo> findPage(Page<CmClubinfo> page, CmClubinfo cmClubinfo) {
 		return super.findPage(page, cmClubinfo);
 	}
-	
+
 	@Transactional(readOnly = false)
 	public void save(CmClubinfo cmClubinfo) {
 		super.save(cmClubinfo);
 	}
-	
+
 	@Transactional(readOnly = false)
 	public void delete(CmClubinfo cmClubinfo) {
 		super.delete(cmClubinfo);
@@ -49,4 +54,4 @@ public class CmClubinfoService extends CrudService<CmClubinfoDao, CmClubinfo> {
 		return cmClubinfoDao.getClubInfoByClubID(clubID);
 	}
 
-}
+}

+ 5 - 0
src/main/java/com/caimei/modules/user/service/CmOperationalLogService.java

@@ -3,6 +3,7 @@ package com.caimei.modules.user.service;
 import com.caimei.modules.user.dao.CmOperationsDao;
 import com.caimei.modules.user.dao.OperationsDao;
 import com.caimei.modules.user.entity.CmOperationalLogs;
+import com.caimei.modules.user.entity.NewCmShop;
 import com.caimei.modules.user.entity.OperationalLogs;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
@@ -18,6 +19,10 @@ public class CmOperationalLogService extends CrudService<CmOperationsDao, CmOper
     @Autowired
     CmOperationsDao cmoperationDao;
 
+    @Transactional(readOnly = false)
+    public NewCmShop shoplist(Integer shop) {
+        return cmoperationDao.shoplist(shop);
+    }
 
     @Transactional(readOnly = false)
     public List<CmOperationalLogs> findList(CmOperationalLogs cmoperationalLogs) {

+ 55 - 0
src/main/java/com/caimei/modules/user/service/SysLogService.java

@@ -1,6 +1,9 @@
 package com.caimei.modules.user.service;
 
 import com.caimei.modules.user.dao.OperationsDao;
+import com.caimei.modules.user.entity.ClubTemporary;
+import com.caimei.modules.user.entity.CmClubinfo;
+import com.caimei.modules.user.entity.NewCmClub;
 import com.caimei.modules.user.entity.OperationalLogs;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
@@ -18,6 +21,58 @@ public class SysLogService extends CrudService<OperationsDao, OperationalLogs> {
     @Autowired
     OperationsDao operationDao;
 
+    @Transactional(readOnly = false)
+    public NewCmClub newCmClub(Integer clubID) {
+        return operationDao.newCmClub(clubID);
+    }
+
+    @Transactional(readOnly = false)
+    public ClubTemporary temPorary(String id) {
+        return operationDao.temPorary(id);
+    }
+
+    @Transactional(readOnly = false)
+    public CmClubinfo cmclubinfo(Integer clubID) {
+        return operationDao.cmclubinfo(clubID);
+    }
+
+    @Transactional(readOnly = false)
+    public String auditlinkMan(Integer userID) {
+        return operationDao.auditlinkMan(userID);
+    }
+
+    @Transactional(readOnly = false)
+    public String auditName(Integer userID) {
+        return operationDao.auditName(userID);
+    }
+
+    @Transactional(readOnly = false)
+    public String PasslinkMan(Integer userID) {
+        return operationDao.PasslinkMan(userID);
+    }
+
+    @Transactional(readOnly = false)
+    public String passName(Integer userID) {
+        return operationDao.passName(userID);
+    }
+
+    @Transactional(readOnly = false)
+    public String ClubName(Integer clubChangeSpRecordID) {
+        return operationDao.ClubName(clubChangeSpRecordID);
+    }
+    @Transactional(readOnly = false)
+    public String JgName(Integer clubChangeSpRecordID) {
+        return operationDao.JgName(clubChangeSpRecordID);
+    }
+    @Transactional(readOnly = false)
+    public String linkMan(Integer clubChangeSpRecordID) {
+        return operationDao.linkMan(clubChangeSpRecordID);
+    }
+
+    @Transactional(readOnly = false)
+    public String ClubsName(Integer clubChangeSpRecordID) {
+        return operationDao.ClubsName(clubChangeSpRecordID);
+    }
 
     @Transactional(readOnly = false)
     public List<OperationalLogs> findList( OperationalLogs operationalLogs) {

+ 119 - 2
src/main/java/com/caimei/modules/user/web/ClubTemporaryController.java

@@ -3,11 +3,15 @@ package com.caimei.modules.user.web;
 import com.caimei.modules.user.aop.OperationLogAnnotation;
 import com.caimei.modules.user.entity.ClubConfirmRecord;
 import com.caimei.modules.user.entity.ClubTemporary;
+import com.caimei.modules.user.entity.OperationalLogs;
 import com.caimei.modules.user.service.ClubTemporaryService;
+import com.caimei.modules.user.service.SysLogService;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
+import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm;
+import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -19,6 +23,8 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -33,6 +39,8 @@ public class ClubTemporaryController extends BaseController {
 
     @Autowired
     private ClubTemporaryService clubTemporaryService;
+    @Autowired
+    private SysLogService sysLogService;
 
     public static ClubTemporary clubT;
 
@@ -66,13 +74,122 @@ public class ClubTemporaryController extends BaseController {
 
 
     @RequestMapping(value = "save")
-    @OperationLogAnnotation(operType = "编辑",operModul = "进行了未确认机构编辑",oper = "1")
     public String save(ClubTemporary clubTemporary, Model model, RedirectAttributes redirectAttributes) {
+        ClubTemporary clubTemporarys=sysLogService.temPorary(clubTemporary.getId());
+        ArrayList<String> list = new ArrayList();
+        OperationalLogs sysLog = new OperationalLogs();
+        System.out.println("<<<<<<<<<<<<<<<<<,"+clubTemporarys);
+        System.out.println(">>>>>>>>>>>>>>>>>>"+clubTemporary);
+        if ("".equals(clubTemporarys.getLinkMan())) {
+            sysLog.setContact(clubTemporarys.getLinkMan());
+        }
+
+        if (clubTemporarys.getLinkMan() == null) {
+            if (clubTemporary.getLinkMan() != null) {
+                list.add("新增了联系人");
+            }
+        }
+        if (!clubTemporary.getLinkMan().equals(clubTemporarys.getLinkMan())) {
+            list.add("修改了联系人");
+        }
+        if (clubTemporarys.getShortName() == null) {
+            if (clubTemporary.getShortName() != null) {
+                list.add("新增了机构简称");
+            }
+        }
+        if (!clubTemporary.getShortName().equals(clubTemporarys.getShortName())) {
+            list.add("修改了机构简称");
+        }
+
+        if (clubTemporarys.getName() == null) {
+            if (clubTemporary.getName() != null) {
+                list.add("新增了机构名称");
+            }
+        }
+        if (!clubTemporary.getName().equals(clubTemporarys.getName())) {
+            list.add("修改了机构名称");
+        }
+
+        if (clubTemporarys.getBindMobile() == null) {
+            if (clubTemporary.getBindMobile() != null) {
+                list.add("新增了手机号");
+            }
+        }
+        if (!clubTemporary.getBindMobile().equals(clubTemporarys.getBindMobile())) {
+            list.add("修改了手机号");
+        }
+
+        if (clubTemporarys.getContractEmail() == null) {
+            if (clubTemporarys.getContractEmail() != null) {
+                list.add("新增邮箱");
+            }
+        }
+        if (!clubTemporary.getContractEmail().equals(clubTemporarys.getContractEmail())) {
+            list.add("修改了邮箱");
+        }
+        if (!clubTemporary.getAddress().equals(clubTemporarys.getAddress())) {
+            list.add("修改了详细地址");
+        }
+        if (clubTemporarys.getBusinessLicense() == null) {
+            if (clubTemporary.getBusinessLicense() != null) {
+                list.add("新增了营业执照");
+            }
+        } else {
+            if (!clubTemporary.getBusinessLicense().equals(clubTemporarys.getBusinessLicense())){
+                list.add("修改了营业执照");
+            }
+        }
+
+        if (clubTemporarys.getShopPhoto() == null) {
+            if (clubTemporary.getShopPhoto()!=null) {
+                list.add("新增了门头照");
+            }
+            if (!clubTemporary.getShopPhoto().equals(clubTemporarys.getShopPhoto())) {
+                list.add("修改了门头照");
+            }
+        }
+
+
+        if (clubTemporarys.getSocialCreditCode() == null) {
+            if (clubTemporary.getSocialCreditCode() != null) {
+                list.add("新增了营业执照编号");
+            }
+            if (!clubTemporary.getSocialCreditCode().equals(clubTemporarys.getSocialCreditCode())) {
+                list.add("修改了营业执照编号");
+            }
+        }
+        if (clubTemporarys.getFirstClubType() == null) {
+            if (clubTemporary.getFirstClubType() != null) {
+                list.add("新增了机构类型");
+            }
+        } else if (!clubTemporary.getFirstClubType().equals(clubTemporarys.getFirstClubType())) {
+            list.add("修改了机构类型");
+        }
+        sysLog.setInstitutionName(clubTemporary.getName());
+        sysLog.setContact(clubTemporary.getLinkMan());
+        sysLog.setActioncontent(StringUtils.strip(list.toString(), "[]"));
+        //获取操作时间
+        sysLog.setOperationtime(new Date());
+        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+        sysLog.setOperationtype("编辑");
+        System.out.println("操作员" + principal.getName());
+        String username = principal.getName();
+        sysLog.setOperator(username);
+
+        //调用service保存SysLog实体类到数据库
+        if (!"".equals(sysLog.getActioncontent())) {
+            if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+                int i = sysLogService.insert(sysLog);
+                list.removeAll(list);
+            }
+        }
+
+
+
         if (!beanValidator(model, clubTemporary)) {
             return form(clubTemporary, model);
         }
         clubTemporaryService.save(clubTemporary);
-        clubT=clubTemporary;
         addMessage(redirectAttributes, "保存未确认机构成功");
         return "redirect:" + Global.getAdminPath() + "/user/clubTemporary/?repage";
     }

+ 1 - 0
src/main/java/com/caimei/modules/user/web/CmSpController.java

@@ -4,6 +4,7 @@ import com.caimei.constants.ServiceProviderStatus;
 import com.caimei.constants.UserIdentity;
 import com.caimei.constants.UserType;
 import com.caimei.modules.sys.utils.ValidateUtils;
+import com.caimei.modules.user.aop.OperationLogAnnotation;
 import com.caimei.modules.user.dao.CmSpDao;
 import com.caimei.modules.user.entity.CmMessage;
 import com.caimei.modules.user.entity.CmUser;

+ 3 - 2
src/main/java/com/caimei/modules/user/web/OperationalLogsController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 @Controller
 @RequestMapping(value = "${adminPath}/user/cmOperational")
@@ -27,8 +28,8 @@ public class OperationalLogsController extends BaseController {
 //        List<OperationalLogs> operational = sysLogService.findList(new OperationalLogs());
         Page<OperationalLogs> page= sysLogService.findPage(new Page<OperationalLogs>(request, response), operationalLogs);
         model.addAttribute("page", page);
-        model.addAttribute("operationalLogs", operationalLogs);
-//        System.out.println("输出"+operational);
+        model.addAttribute("pagelist", page);
+        System.out.println("输出>>>>>>>>>>>>>>>>>>>>>>>>>"+operationalLogs);
 
         return "/modules/user/cmOperationalLogs";
 //        return "modules/user/cmOperationalLogs";

+ 407 - 60
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -22,6 +22,7 @@ import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.utils.Encodes;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
+import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -37,6 +38,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -74,11 +76,13 @@ public class AgencyController extends BaseController {
     CmSpService cmSpService;
     @Autowired
     private CmOperationUserService cmOperationUserService;
+    @Autowired
+    private SysLogService sysLogService;
 
     public static NewCmClub newCm;
     public static CmClubinfo cmClu;
     public static CmUser cmUs;
-    public static  String types;
+    public static String types;
     public static NewCmSp newCms;
 
     @ModelAttribute
@@ -197,38 +201,55 @@ public class AgencyController extends BaseController {
      * @return
      */
     @RequestMapping(value = "online")
-    @OperationLogAnnotation(operType = "更改状态",operModul = "设置为已上线")
+//    @OperationLogAnnotation(operType = "更改状态", operModul = "设置为已上线")
     @RequiresPermissions("user:newCmClub:edit")
     public String onLine(NewCmClub newCmClub, Model model, RedirectAttributes redirectAttributes) {
-        Integer companyUserID = newCmClub.getUserID();
-        CmUser cmUser = cmUserService.get(companyUserID + "");
-        if (null != cmUser) {
-            cmUser.setClubStatus(ClubStatus.ONLINE.getCode() + "");
-            cmUser.setValidFlag(AppKeys.FLAG_YES);//解除冻结
-            cmUser.setUserPermission(2);
-            cmUs=cmUser;
-            //更新所有企业员工状态
-            cmUserService.updateEmployeeStatus(null, ClubStatus.ONLINE.getCode() + "", null, "1", companyUserID);
-            //更新所有审核过的企业员工权限
-            cmUserService.updateEmployeePermission(2, companyUserID);
-            cmUserService.update(cmUser);
-        } else {
-            addMessage(redirectAttributes, "上线失败,用户信息异常");
-            return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
+        OperationalLogs sysLog = new OperationalLogs();
+        sysLog.setOperationtime(new Date());
+        sysLog.setContact(newCmClub.getLinkMan());
+        sysLog.setInstitutionName(newCmClub.getName());
+        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+        System.out.println("操作员" + principal.getName());
+        String username = principal.getName();
+        sysLog.setOperator(username);
+        sysLog.setOperationtype("更改状态");
+        sysLog.setActioncontent("设置为已上线");
+        //调用service保存SysLog实体类到数据库
+        if (!"".equals(sysLog.getActioncontent())) {
+            if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+                int i = sysLogService.insert(sysLog);
+            }
         }
-        newCmClub.setStatus(ClubStatus.ONLINE.getCode());
-        newCmClubService.update(newCmClub);
-        addMessage(redirectAttributes, "机构上线成功");
-        redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
-        redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
-        redirectAttributes.addAttribute("searchBindMobile", newCmClub.getSearchBindMobile());
-        redirectAttributes.addAttribute("searchEmail", newCmClub.getSearchEmail());
-        redirectAttributes.addAttribute("searchUserOrganizeID", newCmClub.getSearchUserOrganizeID());
-        redirectAttributes.addAttribute("searchStatus", newCmClub.getSearchStatus());
-        redirectAttributes.addAttribute("searchUserIdentity", newCmClub.getSearchUserIdentity());
-        redirectAttributes.addAttribute("searchStartTime", newCmClub.getSearchStartTime());
-        redirectAttributes.addAttribute("searchEndTime", newCmClub.getSearchEndTime());
-        return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
+
+            Integer companyUserID = newCmClub.getUserID();
+            CmUser cmUser = cmUserService.get(companyUserID + "");
+            if (null != cmUser) {
+                cmUser.setClubStatus(ClubStatus.ONLINE.getCode() + "");
+                cmUser.setValidFlag(AppKeys.FLAG_YES);//解除冻结
+                cmUser.setUserPermission(2);
+                //更新所有企业员工状态
+                cmUserService.updateEmployeeStatus(null, ClubStatus.ONLINE.getCode() + "", null, "1", companyUserID);
+                //更新所有审核过的企业员工权限
+                cmUserService.updateEmployeePermission(2, companyUserID);
+                cmUserService.update(cmUser);
+            } else {
+                addMessage(redirectAttributes, "上线失败,用户信息异常");
+                return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
+            }
+            newCmClub.setStatus(ClubStatus.ONLINE.getCode());
+            newCmClubService.update(newCmClub);
+            addMessage(redirectAttributes, "机构上线成功");
+            redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
+            redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
+            redirectAttributes.addAttribute("searchBindMobile", newCmClub.getSearchBindMobile());
+            redirectAttributes.addAttribute("searchEmail", newCmClub.getSearchEmail());
+            redirectAttributes.addAttribute("searchUserOrganizeID", newCmClub.getSearchUserOrganizeID());
+            redirectAttributes.addAttribute("searchStatus", newCmClub.getSearchStatus());
+            redirectAttributes.addAttribute("searchUserIdentity", newCmClub.getSearchUserIdentity());
+            redirectAttributes.addAttribute("searchStartTime", newCmClub.getSearchStartTime());
+            redirectAttributes.addAttribute("searchEndTime", newCmClub.getSearchEndTime());
+            return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
+
     }
 
     /**
@@ -240,7 +261,6 @@ public class AgencyController extends BaseController {
      * @return
      */
     @RequestMapping(value = "offline")
-    @OperationLogAnnotation(operType = "更改状态",operModul = "设置为已下线")
     @RequiresPermissions("user:newCmClub:edit")
     public String offLine(NewCmClub newCmClub, Model model, RedirectAttributes redirectAttributes) {
         Integer companyUserID = newCmClub.getUserID();
@@ -249,28 +269,46 @@ public class AgencyController extends BaseController {
             cmUser.setClubStatus(ClubStatus.FREEZE.getCode() + "");
             cmUser.setValidFlag(AppKeys.FLAG_NO);//冻结
             cmUser.setUserPermission(0);
-            cmUs=cmUser;
-            //更新所有企业员工状态 设置未提示
-            cmUserService.updateEmployeeStatus(1, ClubStatus.ONLINE.getCode() + "", null, "0", companyUserID);
-            cmUserService.update(cmUser);
-        } else {
-            addMessage(redirectAttributes, "下线失败,用户信息异常");
+
+            OperationalLogs sysLog = new OperationalLogs();
+            sysLog.setOperationtime(new Date());
+            sysLog.setContact(newCmClub.getLinkMan());
+            sysLog.setInstitutionName(newCmClub.getName());
+            SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+            System.out.println("操作员" + principal.getName());
+            String username = principal.getName();
+            sysLog.setOperator(username);
+            sysLog.setOperationtype("更改状态");
+            sysLog.setActioncontent("设置为已下线");
+            //调用service保存SysLog实体类到数据库
+            if (!"".equals(sysLog.getActioncontent())) {
+                if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+                    int i = sysLogService.insert(sysLog);
+                }
+            }
+
+                //更新所有企业员工状态 设置未提示
+                cmUserService.updateEmployeeStatus(1, ClubStatus.ONLINE.getCode() + "", null, "0", companyUserID);
+                cmUserService.update(cmUser);
+            } else {
+                addMessage(redirectAttributes, "下线失败,用户信息异常");
+                return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
+            }
+            newCmClub.setStatus(ClubStatus.FREEZE.getCode());
+            newCmClubService.update(newCmClub);
+            addMessage(redirectAttributes, "机构下线成功");
+            redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
+            redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
+            redirectAttributes.addAttribute("searchBindMobile", newCmClub.getSearchBindMobile());
+            redirectAttributes.addAttribute("searchEmail", newCmClub.getSearchEmail());
+            redirectAttributes.addAttribute("searchUserOrganizeID", newCmClub.getSearchUserOrganizeID());
+            redirectAttributes.addAttribute("searchStatus", newCmClub.getSearchStatus());
+            redirectAttributes.addAttribute("searchUserIdentity", newCmClub.getSearchUserIdentity());
+            redirectAttributes.addAttribute("searchStartTime", newCmClub.getSearchStartTime());
+            redirectAttributes.addAttribute("searchEndTime", newCmClub.getSearchEndTime());
             return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
         }
-        newCmClub.setStatus(ClubStatus.FREEZE.getCode());
-        newCmClubService.update(newCmClub);
-        addMessage(redirectAttributes, "机构下线成功");
-        redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
-        redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
-        redirectAttributes.addAttribute("searchBindMobile", newCmClub.getSearchBindMobile());
-        redirectAttributes.addAttribute("searchEmail", newCmClub.getSearchEmail());
-        redirectAttributes.addAttribute("searchUserOrganizeID", newCmClub.getSearchUserOrganizeID());
-        redirectAttributes.addAttribute("searchStatus", newCmClub.getSearchStatus());
-        redirectAttributes.addAttribute("searchUserIdentity", newCmClub.getSearchUserIdentity());
-        redirectAttributes.addAttribute("searchStartTime", newCmClub.getSearchStartTime());
-        redirectAttributes.addAttribute("searchEndTime", newCmClub.getSearchEndTime());
-        return "redirect:" + Global.getAdminPath() + "/new/user/agency/?repage";
-    }
+
 
     /**
      * 查看机构
@@ -312,11 +350,9 @@ public class AgencyController extends BaseController {
         cmClubinfo.setMedicalPracticeLicenseImg(newCmClub.getMedicalPracticeLicenseImg());
         cmClubinfo.setContractEmail(newCmClub.getContractEmail());
         cmClubinfo.setLinkManIdentity(newCmClub.getLinkManIdentity());
-        newCm = newCmClub;
-        cmClu = cmClubinfo;
-
         model.addAttribute("cmClubinfo", cmClubinfo);
         model.addAttribute("newCmClub", newCmClub);
+
         String wwwServer = Global.getConfig("wwwServer");
         //营业执照
         newCmClub.setBusinessLicenseImage(AppUtils.getImageURL("clubBusinessLicenseImage", newCmClub.getBusinessLicenseImage(), 0, wwwServer));
@@ -335,9 +371,269 @@ public class AgencyController extends BaseController {
      * @return
      */
     @RequestMapping(value = "save")
-    @OperationLogAnnotation(operType = "编辑" ,oper = "2")
     @RequiresPermissions("user:newCmClub:edit")
     public String save(NewCmClub newCmClub, CmClubinfo cmClubinfo, Model model, RedirectAttributes redirectAttributes) {
+        ArrayList<String> list = new ArrayList();
+         OperationalLogs sysLog = new OperationalLogs();
+        NewCmClub newCmClubs = sysLogService.newCmClub(newCmClub.getClubID());
+        System.out.println("id>>>>>>>>>>"+ newCmClub.getClubID()+"<<<<<"+cmClubinfo.getUserID());
+        CmClubinfo cmClubinfos = sysLogService.cmclubinfo(cmClubinfo.getClubInfoID());
+
+        logger.info("newCmClub页面数据"+newCmClub);
+        logger.info("newCmClub数据库数据"+newCmClubs);
+        logger.info("cmClubinfo页面数据"+cmClubinfo);
+        logger.info("cmClubinfo数据库数据"+cmClubinfos);
+       //编辑时添加操作日志
+        if(cmClubinfos!=null) {
+            if (null == (cmClubinfos.getHighestAchievement()) || null == cmClubinfos.getReachPepole() || null == cmClubinfos.getClinchPepole()) {
+                if (!"".equals(cmClubinfo.getHighestAchievement())  || cmClubinfo.getReachPepole() != null || cmClubinfo.getClinchPepole() != null) {
+                    list.add("新增了活动业绩信息");
+                }
+
+            } else {
+                if (!cmClubinfo.getHighestAchievement().equals(cmClubinfos.getHighestAchievement())) {
+                    list.add("修改了活动业绩的最高业绩信息");
+                }
+
+                if (!cmClubinfo.getReachPepole().equals(cmClubinfos.getReachPepole())) {
+                    list.add("修改了活动业绩的到店人数信息");
+                }
+                if (!cmClubinfo.getClinchPepole().equals(cmClubinfos.getClinchPepole())) {
+                    list.add("修改了活动业绩的成交人数信息");
+                }
+            }
+
+
+            if (cmClubinfos.getConsumeA() == null || cmClubinfos.getConsumeB() == null || cmClubinfos.getConsumeC() == null) {
+                if (cmClubinfo.getConsumeA() != null || cmClubinfo.getConsumeB() != null || cmClubinfo.getConsumeC() != null) {
+                    list.add("新增了会员消费金额信息");
+                }
+            } else {
+                if (!cmClubinfo.getConsumeA().equals(cmClubinfos.getConsumeA())) {
+                    list.add("修改了A类会员消费金额");
+                }
+                if (!cmClubinfo.getConsumeB().equals(cmClubinfos.getConsumeB())) {
+                    list.add("修改了B类会员消费金额");
+                }
+                if (!cmClubinfo.getConsumeC().equals(cmClubinfos.getConsumeC())) {
+                    list.add("修改了C类会员消费金额");
+                }
+            }
+
+
+            if (cmClubinfos.getCateA() == null || cmClubinfos.getCateB() == null || cmClubinfos.getCateC() == null) {
+                if (null != cmClubinfo.getCateA() || null != cmClubinfo.getCateB() || null != cmClubinfo.getCateC()) {
+                    list.add("新增了会员信息");
+                }
+            } else {
+                if (!cmClubinfo.getCateA().equals(cmClubinfos.getCateA())) {
+                    list.add("修改了A会员信息");
+                }
+                if (!cmClubinfo.getCateB().equals(cmClubinfos.getCateB())) {
+                    list.add("修改了B会员信息");
+                }
+                if (!cmClubinfo.getCateC().equals(cmClubinfos.getCateC())) {
+                    list.add("修改了C会员信息");
+                }
+            }
+
+
+            if ("".equals(cmClubinfos.getMonthAchievement()) || "".equals(cmClubinfos.getPromotionAchievement()) || "".equals(cmClubinfos.getYearAchievement())) {
+                if (!"".equals(cmClubinfos.getMonthAchievement()) || !"".equals(cmClubinfos.getPromotionAchievement()) || !"".equals(cmClubinfos.getYearAchievement())) {
+                    list.add("新增了业绩信息");
+                }
+
+            } else {
+                if (!cmClubinfo.getMonthAchievement().equals(cmClubinfos.getMonthAchievement())) {
+                    list.add("修改了月业绩信息");
+                }
+
+                if (!cmClubinfo.getPromotionAchievement().equals(cmClubinfos.getPromotionAchievement())) {
+                    list.add("修改了促销业绩信息");
+                }
+                if (!cmClubinfo.getYearAchievement().equals(cmClubinfos.getYearAchievement())) {
+                    list.add("修改了年业绩信息");
+                }
+            }
+
+
+            if (cmClubinfos.getArea() == null || cmClubinfos.getBedNums() == null || cmClubinfos.getBeauticians() == null) {
+                if (null != cmClubinfo.getArea() || null != cmClubinfo.getBedNums() || null != cmClubinfo.getBeauticians()) {
+                    list.add("更新了基本信息");
+                }
+            } else {
+                if (!cmClubinfo.getArea().equals(cmClubinfos.getArea())) {
+                    list.add("修改了机构面积");
+                }
+                if (!cmClubinfo.getBedNums().equals(cmClubinfos.getBedNums())) {
+                    list.add("修改了美容床数");
+                }
+                if (!cmClubinfo.getBeauticians().equals(cmClubinfos.getBeauticians())) {
+                    list.add("修改了美容师数");
+                }
+            }
+
+
+            if (null == (newCmClubs.getInfo())) {
+                if (!"".equals(newCmClub.getInfo())) {
+                    list.add("新增了公司简介");
+                }
+            } else if (!newCmClub.getInfo().equals(newCmClubs.getInfo())) {
+                list.add("修改了公司简介");
+            }
+
+            if (cmClubinfo.getEmpnum() != null) {
+                if (!cmClubinfo.getEmpnum().equals(cmClubinfos.getEmpnum())) {
+                    list.add("更新了公司人数");
+                }
+            }
+            if (null == (newCmClubs.getFax())) {
+                if (!"".equals(newCmClub.getFax())) {
+                    list.add("新增了传真");
+                }
+            } else if (!newCmClub.getFax().equals(newCmClubs.getFax())) {
+                list.add("修改了传真");
+            }
+
+
+            if (null == (newCmClubs.getContractPhone())) {
+                if (!"".equals(newCmClub.getContractPhone())) {
+                    list.add("新增了固定电话");
+                }
+            } else if (!newCmClub.getContractPhone().equals(newCmClubs.getContractPhone())) {
+                list.add("修改了固定电话");
+            }
+
+            if (!newCmClub.getAddress().equals(newCmClubs.getAddress())) {
+                list.add("修改了详细地址");
+            }
+            if (newCmClub.getLinkManIdentity() != null) {
+                if (!newCmClub.getLinkManIdentity().equals(newCmClubs.getLinkManIdentity())) {
+                    list.add("修改了联系人身份");
+                }
+            }
+            if (newCmClubs.getLinkMan() == null) {
+                if (newCmClub.getUserName() != null) {
+                    list.add("新增了联系人");
+                }
+            }
+            if (!newCmClub.getUserName().equals(newCmClubs.getLinkMan())) {
+                list.add("修改了联系人");
+            }
+
+            if (newCmClubs.getMainpro() != null) {
+                if (!newCmClub.getMainpro().equals(newCmClubs.getMainpro())) {
+                    list.add("修改了主营内容");
+                }
+            }
+
+            if (newCmClubs.getFirstClubType() == null) {
+                if (newCmClub.getFirstClubType() != null) {
+                    list.add("新增了机构类型");
+                }
+            } else if (!newCmClub.getFirstClubType().equals(newCmClubs.getFirstClubType())) {
+                list.add("修改了机构类型");
+            }
+
+
+            if (newCmClubs.getBusinessLicenseImage() == null) {
+                if (newCmClub.getBusinessLicenseImage() != null) {
+                    list.add("新增了营业执照");
+                }
+            } else {
+                if (!newCmClub.getBusinessLicenseImage().equals(newCmClubs.getBusinessLicenseImage())) {
+                    list.add("修改了营业执照");
+                }
+            }
+
+
+            if (newCmClubs.getHeadpic() == null) {
+                if (newCmClub.getHeadpic() != null) {
+                    list.add("新增了门头照");
+                }
+                if (!newCmClub.getHeadpic().equals(newCmClubs.getHeadpic())) {
+                    list.add("修改了门头照");
+                }
+            }
+
+
+            if (newCmClubs.getSocialCreditCode() == null) {
+                if (newCmClub.getSocialCreditCode() != null) {
+                    list.add("新增了营业执照编号");
+                }
+            }
+            if (!newCmClub.getSocialCreditCode().equals(newCmClubs.getSocialCreditCode())) {
+                list.add("修改了营业执照编号");
+            }
+
+
+            if (newCmClubs.getAddress() == null) {
+                if (newCmClub.getAddress() != null) {
+                    list.add("新增了详细地址");
+                }
+            }
+
+
+            if (newCmClubs.getSname() == null) {
+                if (newCmClub.getSname() != null) {
+                    list.add("新增了机构简称");
+                }
+            }
+            if (!newCmClub.getSname().equals(newCmClubs.getSname())) {
+                list.add("修改了机构简称");
+            }
+
+            if (newCmClubs.getName() == null) {
+                if (newCmClub.getName() != null) {
+                    list.add("新增了机构名称");
+                }
+            }
+            if (!newCmClub.getName().equals(newCmClubs.getName())) {
+                list.add("修改了机构名称");
+            }
+
+            if ("".equals(newCmClubs.getContractMobile())) {
+                if (!newCmClub.getBindMobile().equals(null)) {
+                    list.add("新增了手机号");
+                }
+            }
+            if (!newCmClub.getBindMobile().equals(newCmClubs.getContractMobile())) {
+                list.add("修改了手机号");
+            }
+            if ("".equals(newCmClubs.getContractEmail())) {
+                if (!newCmClub.getContractEmail().equals(null)) {
+                    list.add("新增了注册邮箱");
+                }
+            }
+            if (!"".equals(newCmClub.getContractEmail())) {
+                if (!newCmClub.getContractEmail().equals(newCmClubs.getContractEmail())) {
+                    list.add("修改了邮箱");
+                }
+            }
+        }else {
+            list.add("新机构添加了信息");
+        }
+        sysLog.setActioncontent(StringUtils.strip(list.toString(), "[]"));
+
+        //获取操作时间
+        sysLog.setOperationtime(new Date());
+
+        //获取操作员
+        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+        System.out.println("操作员" + principal.getName());
+        String username = principal.getName();
+        sysLog.setOperator(username);
+        sysLog.setContact(newCmClub.getLinkMan());
+        sysLog.setInstitutionName(newCmClub.getName());
+        sysLog.setOperationtype("编辑");
+        if (!"".equals(sysLog.getActioncontent())) {
+            if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+                int i = sysLogService.insert(sysLog);
+                list.removeAll(list);
+            }
+        }
+
+
         String name = cmClubinfo.getName();
         String userName = cmClubinfo.getUserName();
         String bindMobile = cmClubinfo.getBindMobile();
@@ -419,8 +715,8 @@ public class AgencyController extends BaseController {
         user.setBindMobile(bindMobile);
         cmUserService.update(user);
         newCmClubService.update(newCmClub);//更新机构表数据
+        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+cmClubinfo);
         cmClubinfoService.save(cmClubinfo);
-
         addMessage(redirectAttributes, "保存机构资料成功");
         redirectAttributes.addAttribute("searchName", newCmClub.getSearchName());
         redirectAttributes.addAttribute("searchUserName", newCmClub.getSearchUserName());
@@ -441,8 +737,8 @@ public class AgencyController extends BaseController {
      */
     @RequiresPermissions("user:newCmClub:edit")
     @ResponseBody
-    @OperationLogAnnotation(operType = "更换协销")
     @RequestMapping(value = "changeSp")
+    @OperationLogAnnotation()
     public Map<String, Object> changeSp(String spID, String clubID, HttpServletRequest request, HttpServletResponse response) {
         Map<String, Object> map = Maps.newLinkedHashMap();
         try {
@@ -493,7 +789,6 @@ public class AgencyController extends BaseController {
         Map<String, Object> map = Maps.newLinkedHashMap();
         try {
             CmUser cmUser = cmUserService.get(id);
-            cmUs = cmUser;
             cmUser.setPassword(MD5Util.MD5(password));
             cmUserService.update(cmUser);
             map.put("success", true);
@@ -518,7 +813,7 @@ public class AgencyController extends BaseController {
      */
     @RequiresPermissions("user:newCmClub:edit")
     @ResponseBody
-    @OperationLogAnnotation(operType = "审核")
+//    @OperationLogAnnotation(operType = "审核")
     @RequestMapping(value = "auditClub")
     public Map<String, Object> auditClub(String auditStatus, String auditNote, String id, HttpServletRequest request, HttpServletResponse response) {
         Map<String, Object> map = Maps.newLinkedHashMap();
@@ -526,6 +821,9 @@ public class AgencyController extends BaseController {
         String smsMessage = "";
         String currTime = DateUtils.getDateTime();
         Integer userPermission;
+
+
+
         try {
             NewCmClub newCmClub = newCmClubService.get(id);
             Integer companyUserID = newCmClub.getUserID();
@@ -537,6 +835,32 @@ public class AgencyController extends BaseController {
             /**审核处理*/
             //审核通过
             if (StringUtils.equals("1", auditStatus)) {
+
+                OperationalLogs sysLog = new OperationalLogs();
+                if ("1".equals(auditStatus)){
+                    sysLog.setActioncontent("审核通过");
+                } else {
+                    sysLog.setActioncontent("审核不通过");
+                }
+                String Contact = sysLogService.auditlinkMan(Integer.parseInt(id));
+                String ionName = sysLogService.auditName(Integer.parseInt(id));
+                sysLog.setContact(Contact);
+                sysLog.setInstitutionName(ionName);
+                SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+                System.out.println("操作员" + principal.getName());
+                String username = principal.getName();
+                sysLog.setOperator(username);
+                sysLog.setOperationtype("审核");
+                sysLog.setOperationtime(new Date());
+                //调用service保存SysLog实体类到数据库
+                if (!"".equals(sysLog.getActioncontent())) {
+                    if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+                        int i = sysLogService.insert(sysLog);
+                    }
+                }
+
+
+
                 userPermission = 2;
                 status = "90";
                 auditStatus = "1";
@@ -662,9 +986,32 @@ public class AgencyController extends BaseController {
      * @return
      */
     @ResponseBody
-    @OperationLogAnnotation(operType = "设置机构类别")
+//    @OperationLogAnnotation(operType = "设置机构类别")
     @RequestMapping("/upgradeClub")
     public Map<String, Object> upgradeClub(NewCmClub cmClub, String type, RedirectAttributes redirectAttributes) {
+        OperationalLogs sysLog = new OperationalLogs();
+        sysLog.setOperationtime(new Date());
+        if ("1".equals(type)){
+            sysLog.setActioncontent("设置为资质机构");
+        }else {
+            sysLog.setActioncontent("设置为个人机构");
+        }
+        sysLog.setContact(cmClub.getLinkMan());
+        sysLog.setInstitutionName(cmClub.getName());
+        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+        System.out.println("操作员" + principal.getName());
+        String username = principal.getName();
+        sysLog.setOperator(username);
+        sysLog.setOperationtype("设置机构类别");
+        //调用service保存SysLog实体类到数据库
+        if (!"".equals(sysLog.getActioncontent())) {
+            if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+                int i = sysLogService.insert(sysLog);
+            }
+        }
+
+
+
         Map<String, Object> map = new HashMap<>();
         if (cmClub != null) {
             CmUser cmUser = cmUserService.get(cmClub.getUserID().toString());

+ 29 - 5
src/main/java/com/caimei/modules/user/web/newUser/SpController.java

@@ -10,11 +10,9 @@ import com.caimei.modules.project.dao.ServiceProviderDao;
 import com.caimei.modules.project.model.ClubModel;
 import com.caimei.modules.project.model.ServiceProviderModel;
 import com.caimei.modules.sys.utils.ValidateUtils;
+import com.caimei.modules.user.aop.OperationLogAnnotation;
 import com.caimei.modules.user.entity.*;
-import com.caimei.modules.user.service.ClubChangeSpReviewService;
-import com.caimei.modules.user.service.CmBindService;
-import com.caimei.modules.user.service.CmSpService;
-import com.caimei.modules.user.service.CmUserService;
+import com.caimei.modules.user.service.*;
 import com.caimei.utils.AppKeys;
 import com.caimei.utils.DateUtils;
 import com.caimei.utils.MD5Utils;
@@ -23,6 +21,8 @@ import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.common.web.BaseController;
+import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm;
+import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -66,7 +66,8 @@ public class SpController extends BaseController {
     private ClubDao clubDao;
     @Autowired
     private CmBindService cmBindService;
-
+    @Autowired
+    private SysLogService sysLogService;
 
     @ModelAttribute
     public NewCmSp get(@RequestParam(required = false) String id) {
@@ -102,6 +103,8 @@ public class SpController extends BaseController {
     @ResponseBody
     @RequestMapping(value = "saveReview")
     public Map<String, Object> saveReview(String reviewStatus, Integer clubChangeSpRecordID, Integer newSpID) {
+        OperationalLogs sysLog = new OperationalLogs();
+
         Map<String, Object> map = Maps.newLinkedHashMap();
         try {
             Date currentTime = new Date();
@@ -113,6 +116,7 @@ public class SpController extends BaseController {
             if (StringUtils.equals("pass", reviewStatus)) {
                 ClubChangeSp cssp = clubChangeSpReviewService.getClubChangeSpById(clubChangeSpRecordID);
                 if (null != cssp) {
+                    String clubIDs = sysLogService.ClubsName(clubChangeSpRecordID);
                     // 查询serviceprovider协销表
                     List<ServiceProviderModel> serviceprovider = serviceProviderDao.getServiceproviderById(cssp.getNewSpID());
                     // 查询cm_bind表
@@ -141,6 +145,26 @@ public class SpController extends BaseController {
                         clubChangeSpReviewService.updateCheckStatusById(clubChangeSp);
                         map.put("success", true);
                         map.put("msg", "操作成功");
+                        String clubID = sysLogService.ClubsName(clubChangeSpRecordID);
+                        String jgName = sysLogService.JgName(clubChangeSpRecordID);
+                        String linkMans = sysLogService.ClubName(clubChangeSpRecordID);
+                        sysLog.setOperationtime(new Date());
+                        if (!"".equals(linkMans)) {
+                            sysLog.setActioncontent(clubIDs + "更换为" + clubID);
+                        }
+                        sysLog.setOperationtype("更换协销");
+                        sysLog.setContact(linkMans);
+                        sysLog.setInstitutionName(jgName);
+                        SystemAuthorizingRealm.Principal principal = UserUtils.getPrincipal();
+                        System.out.println("操作员" + principal.getName());
+                        String username = principal.getName();
+                        sysLog.setOperator(username);
+                        //调用service保存SysLog实体类到数据库
+                        if (!"".equals(sysLog.getActioncontent())) {
+                            if (sysLog.getInstitutionName() != null && sysLog.getContact() != null) {
+                                int i = sysLogService.insert(sysLog);
+                            }
+                        }
 
                     } else {
                         map.put("success", false);

+ 2 - 2
src/main/resources/mappings/modules/newhome/AnnouncementMapper.xml

@@ -9,7 +9,7 @@
 
         <where>
             <if test="title != null and title != ''">
-                AND title = #{title}
+                AND title = #{title}+'%'
             </if>
             <if test="state != null and state != 0">
                 AND `state` = #{state}
@@ -77,4 +77,4 @@
     DELETE FROM announcement_management WHERE id=#{id}
 </delete>
 
-</mapper>
+</mapper>

+ 64 - 4
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -978,10 +978,11 @@
                cror.mbOrderId,
                cror.orderRequestNo,
                cror.splitStatus,
+               cror.shopOrderId,
                cdr.payType
         FROM cm_receipt_order_relation cror
-                 LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id
-                 LEFT JOIN cm_order co ON cror.orderID = co.orderID
+        LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id
+        LEFT JOIN cm_order co ON cror.orderID = co.orderID
         WHERE cror.relationType = 2
           AND cror.delFlag = 0
           AND cror.mbOrderId IS NOT NULL
@@ -1109,10 +1110,11 @@
                orderSubmitType,
                payStatus,
                sendOutStatus,
-               splitFlag
+               splitFlag,
+               splitCode
         FROM cm_shop_order
         WHERE delFlag = 0
-          AND orderID = #{orderId}
+          AND shopOrderID = #{shopOrderId}
     </select>
 
     <select id="getPaidShipping" resultType="java.lang.Double">
@@ -1188,6 +1190,64 @@
           AND splitTime > DATE_ADD(NOW(), INTERVAL -2 MINUTE)
         LIMIT 1
     </select>
+    <select id="findSupport" resultType="java.lang.Integer">
+        SELECT s.chargeSupport FROM shop s
+        LEFT JOIN cm_shop_order cso ON cso.shopId= s.shopId
+        WHERE cso.shopOrderId=25059
+    </select>
+    <select id="getOrderProductByShopOrderId" resultType="com.caimei.modules.order.entity.OrderProductVo">
+        SELECT cop.orderProductID                                                 AS orderProductId,
+               cop.orderID                                                        AS orderId,
+               cop.orderNo,
+               cop.shopOrderID                                                    AS shopOrderId,
+               cop.shopOrderNo,
+               cop.orderPromotionsId,
+               cop.productId,
+               cop.shopId,
+               cop.name,
+               cop.productImage                                                   AS image,
+               cop.price,
+               cop.shopName,
+               IF(cop.shopid = 998 AND co.freight > 0, co.freight, cop.costPrice) AS costPrice,
+               cop.normalPrice,
+               cop.ladderPriceFlag,
+               cop.discountPrice,
+               cop.discount,
+               cop.totalAmount,
+               cop.totalFee,
+               cop.shouldPayFee,
+               cop.productUnit,
+               cop.num,
+               cop.presentNum,
+               cop.discountFee,
+               cop.includedTax,
+               cop.invoiceType,
+               cop.taxRate,
+               cop.addedValueTax,
+               cop.totalAddedValueTax,
+               cop.singleShouldPayTotalTax,
+               cop.shouldPayTotalTax,
+               cop.shopProductAmount,
+               cop.singleShopFee,
+               cop.shopFee,
+               cop.singleOtherFee,
+               cop.otherFee,
+               cop.singleCmFee,
+               cop.cmFee,
+               cop.payStatus,
+               cop.buyAgainFlag,
+               cop.notOutStore,
+               cop.isActProduct                                                   AS actProduct,
+               cop.productType,
+               p.productCategory                                                  as productCategory,
+               p.splitCode
+        FROM cm_order_product cop
+        LEFT JOIN product p ON cop.productID = p.productID
+        left join cm_order co on co.orderID = cop.orderID
+        WHERE cop.shopOrderID = #{shopOrderId}
+          AND IF(co.userBeans = 0, 1 = 1, cop.shopid != 998)
+        ORDER BY cop.discountPrice DESC
+    </select>
 
     <insert id="insertSplitAccount">
         INSERT INTO cm_split_account (orderId, productId, orderProductId, shopId, couponRecordId, vipRecordId,

+ 8 - 3
src/main/resources/mappings/modules/user/CmClubinfoMapper.xml

@@ -112,7 +112,8 @@
 			reachPepole,
 			clinchPepole,
 			createTime,
-			updateTime
+			updateTime,
+			empnum
 		) VALUES (
 		    #{clubID},
 			#{userID},
@@ -134,7 +135,8 @@
 			#{reachPepole},
 			#{clinchPepole},
 			#{createTime},
-			#{updateTime}
+			#{updateTime},
+		    #{empnum}
 		)
 	</insert>
 
@@ -198,8 +200,11 @@
 			<if test="updateTime != null and updateTime != ''">
 				updateTime = #{updateTime},
 			</if>
+		<if test="empnum != null and empnum != ''">
+			empnum = #{empnum},
+		</if>
 			userID = #{userID}
-			WHERE clubInfoID = #{id}
+			WHERE clubID = #{id}
 	</update>
 
 	<delete id="delete">

+ 16 - 6
src/main/resources/mappings/modules/user/CmOperationalLogsMapper.xml

@@ -9,16 +9,22 @@
 
         <where>
             <if test="institutionName != null and institutionName != ''">
-                AND institutionName = #{institutionName}
+                AND institutionName = '%'+#{institutionName}+'%'
             </if>
             <if test="Contact != null and Contact != ''">
-                AND Contact = #{Contact}
+                AND Contact = '%'+#{Contact}+'%'
             </if>
             <if test="operationtype != null and operationtype != ''">
-                AND operationtype = #{operationtype}
+                AND operationtype = '%'+#{operationtype}+'%'
             </if>
             <if test="Operationtime != null and Operationtime != ''">
-                AND Operationtime = #{Operationtime}
+                AND Operationtime = '%'+#{Operationtime}+'%'
+            </if>
+            <if test="startTime != null and startTime != ''">
+                AND Operationtime <![CDATA[ > ]]> #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND Operationtime <![CDATA[ < ]]> #{endTime}
             </if>
         </where>
         order by Operationtime desc
@@ -46,5 +52,9 @@
                 #{Operator},
                 #{Operationtime})
     </insert>
-
-</mapper>
+    <select id="shoplist" resultType="NewCmShop">
+        SELECT *  FROM `shop` s
+         LEFT JOIN `user` u ON u.userID = s.userID
+        WHERE s.shopID = #{shopID}
+    </select>
+</mapper>

+ 65 - 5
src/main/resources/mappings/modules/user/OperationalLogsMapper.xml

@@ -9,16 +9,22 @@
 
         <where>
             <if test="institutionName != null and institutionName != ''">
-                AND institutionName = #{institutionName}
+                AND institutionName = '%'+#{institutionName}+'%'
             </if>
             <if test="Contact != null and Contact != ''">
-                AND Contact = #{Contact}
+                AND Contact = '%'+#{Contact}+'%'
             </if>
             <if test="operationtype != null and operationtype != ''">
-                AND operationtype = #{operationtype}
+                AND operationtype = '%'+#{operationtype}+'%'
             </if>
             <if test="Operationtime != null and Operationtime != ''">
-                AND Operationtime = #{Operationtime}
+                AND Operationtime = '%'+#{Operationtime}+'%'
+            </if>
+            <if test="startTime != null and startTime != ''">
+                AND Operationtime <![CDATA[ > ]]> #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND Operationtime <![CDATA[ < ]]> #{endTime}
             </if>
         </where>
         order by Operationtime desc
@@ -47,4 +53,58 @@
                 #{Operationtime})
     </insert>
 
-</mapper>
+    <select id="ClubName" resultType="java.lang.String">
+        SELECT a.linkMan FROM `club` a
+        LEFT JOIN clubchangesprecord b ON a.clubid = b.clubid
+        WHERE b.clubChangeSpRecordID = #{clubChangeSpRecordID}
+    </select>
+    <select id="ClubsName" resultType="java.lang.String">
+        SELECT a.inviterName FROM `club` a
+        LEFT JOIN clubchangesprecord b ON a.clubid = b.clubid
+        WHERE b.clubChangeSpRecordID =#{clubChangeSpRecordID}
+    </select>
+
+    <select id="JgName" resultType="java.lang.String">
+        SELECT `name` FROM `club` a
+        LEFT JOIN clubchangesprecord b ON a.clubid = b.clubid
+        WHERE b.clubChangeSpRecordID = #{clubChangeSpRecordID}
+    </select>
+    <select id="linkMan" resultType="java.lang.String">
+        SELECT `linkMan` FROM `club` a
+        LEFT JOIN clubchangesprecord b ON a.clubid = b.clubid
+        WHERE b.clubChangeSpRecordID = #{clubChangeSpRecordID}
+    </select>
+
+    <select id="passName" resultType="java.lang.String">
+        SELECT `name`  FROM club a
+        WHERE a.userID =#{userID}
+    </select>
+
+    <select id="PasslinkMan" resultType="java.lang.String">
+        SELECT `linkMan`  FROM club a
+        WHERE a.userID =#{userID}
+    </select>
+
+    <select id="auditName" resultType="java.lang.String">
+        SELECT name  FROM club a
+        WHERE a.clubID =#{clubID}
+    </select>
+
+    <select id="auditlinkMan" resultType="java.lang.String">
+        SELECT linkMan  FROM club a
+        WHERE a.clubID =#{clubID}
+    </select>
+
+    <select id="newCmClub" resultType="NewCmClub">
+        SELECT * FROM club WHERE clubID= #{clubID}
+    </select>
+    <select id="cmclubinfo" resultType="CmClubinfo">
+        SELECT * FROM clubinfo
+        WHERE clubInfoID = #{id}
+    </select>
+
+    <select id="temPorary" resultType="ClubTemporary">
+        SELECT * FROM club_temporary
+        WHERE id = #{id}
+    </select>
+</mapper>

+ 23 - 21
src/main/webapp/WEB-INF/views/modules/bulkpurchase/addCommissionsForm.jsp

@@ -8,7 +8,7 @@
         .res{
             color: red;
             /*margin-right: 30px;*/
-            margin-left: 196px;
+            margin-left: 197px;
         }
         .form-horizontal .controls {
             margin-left: 0;
@@ -99,47 +99,49 @@
         .control-label{
             margin-left: 130px;
         }
-
     </style>
 
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/detail?id=${orderId}">订单详细</a></li>
-    <li><a href="${ctx}/bulkpurchase/commissions/list">销售提成记录</a></li>
-    <li class="active"><a href="${ctx}/bulkpurchase/commissions/form">添加销售提成记录</a></li>
+    <li><a href="${ctx}/order/detail?id=${OrderId}">订单详情</a></li>
+    <li><a href="${ctx}/bulkpurchase/commissions?orderId=${OrderId}">销售提成记录</a></li>
+    <li class="active"><a href="${ctx}/bulkpurchase/commissions/form?orderId=${OrderId}">添加销售提成记录</a></li>
 </ul>
 <br/>
-<form:form id="inputForm" modelAttribute="commissions" onsubmit="return cm()" action="${ctx}/bulkpurchase/commissions/save" method="post" class="form-horizontal">
-    <sys:message content="${message}"/>
 
-    <div style="height: 272px;">
-        <div style="width: 700px;margin-right: 500px">
-        <tr>
+
+
+
+<form:form id="inputForm" modelAttribute="commissions" onsubmit="return cm()" action="${ctx}/bulkpurchase/commissions/save?orderId=${OrderId}" method="post" class="form-horizontal">
+    <sys:message content="${message}"/>
+<table  align = "center" border="0" cellspacing="0" cellpadding="10" width="100%">
+        <tr colspan="0">
             <td>
                 <span class="res">*</span><strong>销售提成情况:</strong>
-                <input type="radio" id="sales"  name="sales" value="已计算提成情况">已计算销售提成&nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp;
-                <input type="radio" style="height: 30px" id="sales" value="已退销售提成" name="sales">已退销售提成 &nbsp; <span id="bx">*必填</span>
+                <input type="radio" id="sales"  name="sales" value="已计算销售提成">已计算销售提成&nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp;
+                <input type="radio" id="sales" value="已退销售提成" name="sales">已退销售提成 &nbsp; <span id="bx">*必填</span>
             </td>
         </tr>
-    </div>
         <br/>
-        <tr>
+        <tr colspan="1">
             <td>
-                <div class="control-group" style="height: 30px ">
-                    <label height="30px" class="control-label"><strong>备注内容:</strong></label>
+                <div class="control-group">
+                    <label class="control-label"><strong>备注内容:</strong></label>
                     <textarea id='script' name='script'   rows='5' placeholder="不超过200字。" cols='12' style="width: 700px" maxlength="200"></textarea>
                 </div>
             </td>
         </tr>
-    </div>
-    <td colspan="5" style="text-align:center;">
-
+    <br/>
+    <tr  colspan="2">
+        <td>
+            <label class="control-label"></label>
         <input id="btnSave" class="btn btn-primary" type="submit"  value="保 存"/>
         <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
 
-    </td>
-
+        </td>
+    </tr>
+    </table>
 </form:form>
 
 <script>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/bulkpurchase/cmCommissionsForm.jsp

@@ -8,8 +8,8 @@
 <body>
 <ul class="nav nav-tabs">
 	<li><a href="${ctx}/order/detail?id=${orderId}">订单详情</a></li>
-	<li class="active"><a href="${ctx}/bulkpurchase/commissions/list">销售提成记录</a></li>
-	<li><a href="${ctx}/bulkpurchase/commissions/form">添加销售提成记录</a></li>
+	<li class="active"><a href="${ctx}/bulkpurchase/commissions?orderId=${orderId}">销售提成记录</a></li>
+	<li><a href="${ctx}/bulkpurchase/commissions/form?orderId=${orderId}">添加销售提成记录</a></li>
 </ul>
 <br/>
 <form:form id="inputForm" modelAttribute="commissions" action="${ctx}/bulkpurchase/commissions/save" method="post" class="form-horizontal">

+ 59 - 54
src/main/webapp/WEB-INF/views/modules/newhome/announcementForm.jsp

@@ -145,6 +145,14 @@
             outline: none;
             border: none;
         }
+        label
+        {
+            display: inline-block;
+            width: 60px;
+            text-align: justify;
+            text-align-last: justify;
+            margin-right: 270px;
+        }
     </style>
 </head>
 <body>
@@ -152,55 +160,54 @@
     <li><a href="${ctx}/newhome/Announcement/">公告管理</a></li>
     <li class="active"><a href="${ctx}/newhome/Announcement/forms">添加</a></li>
 </ul>
-<form id="inputForm" modelAttribute="announcementmanagement" onsubmit="return um()" action="${ctx}/newhome/Announcement/save" method="post" class="form-horizontal">
+<form:form id="inputForm" modelAttribute="announcementmanagement" onsubmit="return um()" action="${ctx}/newhome/Announcement/save?id=${Announcementmanagement.id}" method="post" class="form-horizontal">
     <sys:message content="${message}"/>
-    <table border="0" cellspacing="0" cellpadding="0" width="100%">
+    <table  align = "center" border="0" cellspacing="0" cellpadding="20" width="100%">
         <tr>
-            <th style="margin-right: 350px" height="10px"><span style="color: red">*</span>  标题:</th>
+            <th><span style="color: red">*</span>  标题:</th>
             <td colspan="3">
-                <input name="title" id="title" maxlength="30" value="${Announcementmanagement.title}"
+                <form:input path="title" name="title" id="title" maxlength="30" value="${Announcementmanagement.title}"
                        onchange="checkmaxlength(this.value)"
                        style="width: 360px;" placeholder="请输入公告标题,30字以内。" class="short input-small required"/><span id="bx3"  class="red">*必填</span>
             </td>
 
-
         </tr>
 
         <tr>
             <th style="margin-right: 250px"><span style="color: red">*</span>内容: </th>
             <td colspan="4">
-                <div class="detailInfoEditor" style="width: 620px;">
-                    <textarea name="capacity" id="capacity">${Announcementmanagement.capacity}</textarea>
+                <div class="detailInfoEditor" style="width: 610px;">
+                    <textarea name="capacity" id="capacity">${Announcementmanagement.capacity}</textarea><span id="bx4"  class="red">*必填</span>
                 </div>
-
             </td>
-
         </tr>
+<tr>
+            <th></th>
+            <td colspan="3" >
+                <c:if test="${not empty Announcementmanagement.id}">
 
+                    <c:if test="${Announcementmanagement.state==1}">
+                        <strong>状态: </strong>已上线<br>
+                        <strong>上线时间: </strong><fmt:formatDate value="${Announcementmanagement.livetime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>
+                    </c:if>
+                    <c:if test="${Announcementmanagement.state==2}">
+                        <STRONG>状态:</STRONG>已下线<br>
+                        <STRONG>上线时间:</STRONG><fmt:formatDate value="${Announcementmanagement.offlinetime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>
+                    </c:if>
+                </c:if>
+            </td>
+</tr>
         <tr>
             <td colspan="5" style="text-align:center;">
                 <shiro:hasPermission name="product:product:edit">
-                    <input id="btnSave" class="btn btn-primary" type="submit" value="保 存"/>
+                    <input id="btnSave" class="btn btn-primary" onsubmit="return um()" type="submit" value="保 存"/>
                 </shiro:hasPermission>
                 <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
             </td>
         </tr>
-        <c:if test="${not empty Announcementmanagement.id}">
-            <tr id="zt">
-                <td colspan="4" style="vertical-align: top;">
-                    <c:if test="${Announcementmanagement.state==1}">
-                        状态:已上线<br>
-                        上线时间:<fmt:formatDate value="${Announcementmanagement.livetime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>
-                    </c:if>
-                    <c:if test="${Announcementmanagement.state==2}">
-                        状态:已下线<br>
-                        下线时间:<fmt:formatDate value="${Announcementmanagement.offlinetime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>
-                    </c:if>
-                </td>
-            </tr>
-        </c:if>
+
     </table>
-</form>
+</form:form>
 
 <!-- 富文本编辑器 -->
 <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
@@ -208,37 +215,17 @@
 <script type="text/javascript">
 
 
-//判断非空
-    function um(){
-        // debugger
-        var capacity=document.getElementById("capacity").value;
-        var title=document.getElementById("title").value.length;
-        var bx3=document.getElementById("bx3");
-        var bx5=document.getElementById("bx5");
-        console.log('2222222222222',title);
-        if(title==0){
-            console.log('111111111',title);
-            bx3.style.display="inline-block";
-            bx5.style.display="inline";
-        return false;
-       }
 
-    if(capacity.equals("")){
-            bx3.style.display="inline-block";
-            bx5.style.display="inline-block";
-            return false;
-        }
-    }
-
-    function changeTR(selectedValue) {
-        var tr1 = document.getElementById("zt");
 
-        if (selectedValue == 0) {
-            tr1.style.display = 'block';
-        } else {
-            tr1.style.display = 'none';
-        }
-    }
+    // function changeTR(selectedValue) {
+    //     var tr1 = document.getElementById("zt");
+    //
+    //     if (selectedValue == 0) {
+    //         tr1.style.display = 'block';
+    //     } else {
+    //         tr1.style.display = 'none';
+    //     }
+    // }
 
     //富文本框
     ClassicEditor.create(document.querySelector('#capacity'), {
@@ -250,6 +237,24 @@
     }).catch(function (error) {
         console.log(error);
     });
+
+
+    //判断非空
+    function um(){  console.log('111111111',capacity);
+        // debugger
+        var capacity=document.getElementById("capacity").value.length;
+        var title=document.getElementById("title").value.length;
+        var bx3=document.getElementById("bx3");
+        var bx4=document.getElementById("bx4");
+        console.log('2222222222222',title);
+        if(title<=0 || capacity<=0){
+            bx4.style.display="inline-block";
+            bx3.style.display="inline-block";
+            return false;
+        }
+
+
+    }
 </script>
 
 </body>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/newhome/announcementList.jsp

@@ -33,13 +33,13 @@
     <li class="active"><a href="${ctx}/newhome/Announcement/">公告管理</a></li>
     <li><a href="${ctx}/newhome/Announcement/forms">添加</a></li>
 </ul>
-<form id="searchForm" modelAttribute="announcementmanagement" action="${ctx}/newhome/Announcement" method="post"
+<form:form id="searchForm" modelAttribute="announcementmanagement" action="${ctx}/newhome/Announcement" method="post"
            class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="ul-form">
         <label>标题:</label>
-        <input name="title" maxlength="50" class="input-medium"/>
+        <form:input path="title" name="title" maxlength="50" class="input-medium"/>
         <label>状态:</label>
         <select name="state" class="input-medium">
             <option selected value="0">全部</option>
@@ -49,7 +49,7 @@
         <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
     </div>
     &nbsp;
-</form>
+</form:form>
 <sys:message content="${message}"/>
 <table id="contentTable" class="table table-striped table-bordered table-condensed">
     <thead>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/cmNewProductForm.jsp

@@ -544,7 +544,7 @@
         <tr>
             <th>线上分账账号:</th>
             <td colspan="3">
-                <form:input path="splitCode" type="text" id="splitCode" maxlength="10"/>
+                <form:input path="splitCode" type="text" id="splitCode" maxlength="15"/>
             </td>
         </tr>
         <tr id="taxPointDiv">

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -499,7 +499,7 @@
         <tr>
             <th>线上分账账号:</th>
             <td colspan="3">
-                <form:input path="splitCode" type="text" id="splitCode" maxlength="10"/>
+                <form:input path="splitCode" type="text" id="splitCode" maxlength="15"/>
             </td>
         </tr>
         <tr id="taxPointDiv">

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp

@@ -409,7 +409,7 @@
     <div class="control-group">
         <label class="control-label">线上分账账号:</label>
         <div class="controls">
-            <form:input path="splitCode" value="${cmSecondHandDetail.splitCode}" type="text" maxlength="10"/>
+            <form:input path="splitCode" value="${cmSecondHandDetail.splitCode}" type="text" maxlength="15"/>
         </div>
     </div>
     <div class="control-group">

+ 10 - 9
src/main/webapp/WEB-INF/views/modules/user/cmOperationalLogs.jsp

@@ -53,14 +53,15 @@
                 <option value="更改状态">更改状态</option>
             </select>
 
-    <label>操作时间:</label>
-    <form:input path="startTime" type="text" maxlength="20" class="input-mini Wdate" value="${clubTemporary.startTime}"
-                onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
-    -
-    <form:input path="endTime" type="text" maxlength="20" class="input-mini Wdate" value="${clubTemporary.startTime}"
-                onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
-   <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
-    <div class="clearfix"></div>
+        <label>添加时间:</label>
+        <label>注册时间:</label>
+        <form:input path="startTime" type="text" readonly="true" maxlength="20" class="input-mini Wdate" value="${startTime}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        -
+        <form:input path="endTime" type="text" readonly="true" maxlength="20" class="input-mini Wdate" value="${endTime}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+        <div class="clearfix"></div>
     </div>
 </form:form>
 <sys:message content="${message}"/>
@@ -92,7 +93,7 @@
             </td>
             <td>${empty cmop.operator ? "------" : cmop.operator}</td>
             <td>
-                <fmt:formatDate value="${cmop.operationtime}" pattern="yyyy-MM-dd"/>
+                <fmt:formatDate value="${cmop.operationtime}" pattern="yyyy-MM-dd HH:mm:ss"/>
             </td>
         </tr>
     </c:forEach>

+ 7 - 7
src/main/webapp/WEB-INF/views/modules/user/cmOperationalLogsShop.jsp

@@ -50,15 +50,15 @@
                 <option value="更改状态">更改状态</option>
             </select>
         <label>添加时间:</label>
-        <input name="startTime" type="text" readonly="readonly" maxlength="15" class="input-mini Wdate"
-               value="${clubTemporary.startTime}"
-               onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/> -
-        <input name="endTime" type="text" readonly="readonly" maxlength="15" class="input-mini Wdate"
-               value="${clubTemporary.startTime}"
-               onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        <form:input path="startTime" type="text" readonly="true" maxlength="20" class="input-mini Wdate" value="${startTime}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+        -
+        <form:input path="endTime" type="text" readonly="true" maxlength="20" class="input-mini Wdate" value="${endTime}"
+                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
         &nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
         <div class="clearfix"></div>
     </div>
+    </div>
 </form:form>
 <sys:message content="${message}"/>
 <table id="contentTable" class="table table-striped table-bordered table-condensed">
@@ -89,7 +89,7 @@
             </td>
             <td>${empty cmop.operator ? "------" : cmop.operator}</td>
             <td>
-                <fmt:formatDate value="${cmop.operationtime}" pattern="yyyy-MM-dd"/>
+                <fmt:formatDate value="${cmop.operationtime}" pattern="yyyy-MM-dd HH:mm:ss"/>
             </td>
         </tr>
     </c:forEach>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/user/newCmShopForm.jsp

@@ -719,7 +719,7 @@ function loadTown(curTown) {
 					</td>
 					<td>
 					<span>公司简称:</span>
-						<form:input path="sname" htmlEscape="false" placeholder="请输入公司简称" maxlength="10" class="input-xlarge "/>
+						<form:input path="sname" htmlEscape="false" placeholder="请输入公司简称" maxlength="10" class="input-xlarge"/>
 					</td>
 				</tr>
 				<tr>

+ 21 - 21
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyForm.jsp

@@ -560,7 +560,7 @@
                         <form:select path="townID" class="input-xlarge" id="town" style="width:100px;">
                             <form:option value="" label="区"/>
                         </form:select>
-                        <form:input path="address" class="input-xlarge userAddress" width="20px" maxlength="60"
+                        <form:input path="address" id="address" name="address" class="input-xlarge userAddress" width="20px" maxlength="60"
                                     placeholder="请填写会所详细的地址"/>
                     </div>
                 </div>
@@ -571,7 +571,7 @@
                 <div class="control-group">
                     <label class="control-label"><b>营业执照编号:</b></label>
                     <div class="controls">
-                        <form:input path="socialCreditCode" htmlEscape="false" maxlength="18"
+                        <form:input path="socialCreditCode" name="socialCreditCode" htmlEscape="false" maxlength="18"
                                     class="input-xlarge" onchange="onlyNumOrLetter(this)"
                                     placeholder="请填写统一社会信用代码"/>
                     </div>
@@ -583,7 +583,7 @@
                 <div class="control-group">
                     <label class="control-label"><b>营业执照:</b></label>
                     <div class="controls">
-                        <form:hidden id="businessLicenseImage" path="businessLicenseImage" htmlEscape="false"
+                        <form:hidden id="businessLicenseImage" name="businessLicenseImage" path="businessLicenseImage" htmlEscape="false"
                                      maxlength="255" class="input-xlarge required"/>
                         <sys:ckfinder input="businessLicenseImage" type="images" uploadPath="/photo"
                                       selectMultiple="false" maxWidth="100" maxHeight="100"/>
@@ -595,7 +595,7 @@
                 <div class="control-group">
                     <label class="control-label"><b>门头照:</b></label>
                     <div class="controls">
-                        <form:hidden id="headpic" path="headpic" htmlEscape="false" maxlength="255"
+                        <form:hidden id="headpic" name="headpic" path="headpic" htmlEscape="false" maxlength="255"
                                      class="input-xlarge"/>
                         <sys:ckfinder input="headpic" type="images" uploadPath="/photo" maxWidth="100" maxHeight="100"/>
                         <font color="red">注意:请上传jpg/png格式的图片,最大不超过5M</font>
@@ -691,7 +691,7 @@
                 <div class="control-group">
                     <label class="control-label"><b>固定电话:</b></label>
                     <div class="controls">
-                        <form:input path="contractPhone" htmlEscape="false" maxlength="11" class="input-xlarge"
+                        <form:input path="contractPhone" name="contractPhone" htmlEscape="false" maxlength="11" class="input-xlarge"
                                     onchange="int(this)"/>
                     </div>
                 </div>
@@ -699,7 +699,7 @@
                 <div class="control-group">
                     <label class="control-label"><b>传真:</b></label>
                     <div class="controls">
-                        <form:input path="fax" htmlEscape="false" maxlength="18" class="input-xlarge"
+                        <form:input path="fax" name="fax" htmlEscape="false" maxlength="18" class="input-xlarge"
                                     onchange="int(this)"/>
                     </div>
                 </div>
@@ -710,7 +710,7 @@
                 <div class="control-group">
                     <label class="control-label"><b>员工人数:</b></label>
                     <div class="controls">
-                        <form:input path="empnum" htmlEscape="false" maxlength="18" class="input-xlarge"
+                        <form:input path="empnum" name="empnum" htmlEscape="false" maxlength="18" class="input-xlarge"
                                     onchange="onlyNumOrLetter(this)"/>
                     </div>
                 </div>
@@ -734,19 +734,19 @@
             <table border="0" cellspacing="0" cellpadding="0" width="100%">
                 <tr height="28">
                     <th>机构面积:</th>
-                    <td><form:input path="area" htmlEscape="false" class="input-medium" onkeyup="num(this)"/>
+                    <td><form:input path="area" name="area" htmlEscape="false" class="input-medium" onkeyup="num(this)"/>
                     </td>
                 </tr>
                 <tr height="28">
                     <th>美容床数:</th>
-                    <td><form:input path="bedNums" htmlEscape="false" maxlength="11" class="input-medium"
+                    <td><form:input path="bedNums" name="bedNums" htmlEscape="false" maxlength="11" class="input-medium"
                                     onkeyup="int(this)"/>
                             <%--<input type="text" name="bedNums" value="${clubInfo.bedNums}">--%>
                     </td>
                 </tr>
                 <tr height="28">
                     <th>美容师数:</th>
-                    <td><form:input path="beauticians" htmlEscape="false" maxlength="11" class="input-medium"
+                    <td><form:input path="beauticians" name="beauticians" htmlEscape="false" maxlength="11" class="input-medium"
                                     onkeyup="int(this)"/>
                     </td>
                 </tr>
@@ -757,19 +757,19 @@
             <table border="0" cellspacing="0" cellpadding="0" width="100%">
                 <tr height="28">
                     <th>月业绩:</th>
-                    <td><form:input path="monthAchievement" htmlEscape="false" maxlength="63" class="input-medium"
+                    <td><form:input path="monthAchievement" name="monthAchievement" htmlEscape="false" maxlength="63" class="input-medium"
                                     onkeyup="num(this)"/>
                     </td>
                 </tr>
                 <tr height="28">
                     <th>促销业绩:</th>
-                    <td><form:input path="promotionAchievement" htmlEscape="false" maxlength="63" class="input-medium"
+                    <td><form:input path="promotionAchievement" name="promotionAchievement" htmlEscape="false" maxlength="63" class="input-medium"
                                     onkeyup="num(this)"/>
                     </td>
                 </tr>
                 <tr height="28">
                     <th>年业绩:</th>
-                    <td><form:input path="yearAchievement" htmlEscape="false" maxlength="63" class="input-medium"
+                    <td><form:input path="yearAchievement" name="yearAchievement" htmlEscape="false" maxlength="63" class="input-medium"
                                     onkeyup="num(this)"/>
                     </td>
                 </tr>
@@ -781,25 +781,25 @@
                 <tr height="28">
                     <th>A类会员:</th>
                     <td colspan="3" style="padding-top: 6px;">
-                        <form:input path="cateA" htmlEscape="false" maxlength="11" class="cut-input-medium"
+                        <form:input path="cateA" name="cateA" htmlEscape="false" maxlength="11" class="cut-input-medium"
                                     onkeyup="int(this)"/>人&nbsp;
-                        <form:input path="consumeA" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>元
+                        <form:input path="consumeA" name="consumeA" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>元
                     </td>
                 </tr>
                 <tr height="28">
                     <th>B类会员:</th>
                     <td colspan="3" style="padding-top: 6px;">
-                        <form:input path="cateB" htmlEscape="false" maxlength="11" class="cut-input-medium"
+                        <form:input path="cateB" name="cateB"  htmlEscape="false" maxlength="11" class="cut-input-medium"
                                     onkeyup="int(this)"/>人&nbsp;
-                        <form:input path="consumeB" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>元
+                        <form:input path="consumeB" name="consumeB" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>元
                     </td>
                 </tr>
                 <tr height="28">
                     <th>C类会员:</th>
                     <td colspan="3" style="padding-top: 6px;">
-                        <form:input path="cateC" htmlEscape="false" maxlength="11" class="cut-input-medium"
+                        <form:input path="cateC" name="cateC" htmlEscape="false" maxlength="11" class="cut-input-medium"
                                     onkeyup="int(this)"/>人&nbsp;
-                        <form:input path="consumeC" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>元
+                        <form:input path="consumeC" name="consumeC" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>元
                     </td>
                 </tr>
             </table>
@@ -810,14 +810,14 @@
                 <tr height="28">
                     <th>最高业绩:</th>
                     <td>
-                        <form:input path="highestAchievement" htmlEscape="false" maxlength="63" class="input-medium"
+                        <form:input path="highestAchievement" name="highestAchievement" htmlEscape="false" maxlength="63" class="input-medium"
                                     onkeyup="num(this)"/>
                     </td>
                 </tr>
                 <tr height="28">
                     <th>到店人数:</th>
                     <td>
-                        <form:input path="reachPepole" htmlEscape="false" maxlength="11" class="input-medium"
+                        <form:input path="reachPepole" name="reachPepole" htmlEscape="false" maxlength="11" class="input-medium"
                                     onkeyup="int(this)"/>
                     </td>
                 </tr>