zhijiezhao 3 yıl önce
ebeveyn
işleme
967b0a4577

+ 0 - 2
src/main/java/com/caimei/modules/product/service/RepeatPurchasePriceService.java

@@ -39,14 +39,12 @@ public class RepeatPurchasePriceService extends CrudService<RepeatPurchasePriceD
 	
 	public Page<RepeatPurchasePrice> findPage(Page<RepeatPurchasePrice> page, RepeatPurchasePrice repeatPurchasePrice) {
 		try{
-            page.setOrderBy("createTime");
 			repeatPurchasePrice.setPage(page);
 			List<RepeatPurchasePrice> list = repeatPurchasePriceDao.findList(repeatPurchasePrice);
 			if(null != list && list.size() > 0){
 				for(RepeatPurchasePrice bean:list){
 					//设置用户类型
 					String type = UserType.UserType(Integer.parseInt(bean.getType()));
-
 					if(UserType.isClub(Integer.parseInt(bean.getType()))){
 					    if(null != bean.getBindMobile()) bean.setMobile(bean.getBindMobile());
                     }

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

@@ -78,6 +78,7 @@ public class NewCmShop extends DataEntity<NewCmShop> {
     private String sanitationPermit;//卫生许可
     private String taxPermit;//税务许可
     private List<SplitCode> splitCodes; //分账方,子商户商编
+    private String splitCode;  //列表页回显
     private String socialCreditCode; //统一社会信用代码
 
     /**
@@ -110,6 +111,14 @@ public class NewCmShop extends DataEntity<NewCmShop> {
         this.checkMan = checkMan;
     }
 
+    public String getSplitCode() {
+        return splitCode;
+    }
+
+    public void setSplitCode(String splitCode) {
+        this.splitCode = splitCode;
+    }
+
     @Length(min = 0, max = 50, message = "联系人1邮箱长度必须介于 0 和 50 之间")
     public String getContractEmail() {
         return contractEmail;

+ 9 - 2
src/main/java/com/caimei/modules/user/service/NewCmShopService.java

@@ -48,7 +48,14 @@ public class NewCmShopService extends CrudService<NewCmShopDao, NewCmShop> {
     }
 
     public Page<NewCmShop> findPage(Page<NewCmShop> page, NewCmShop newCmShop) {
-        return super.findPage(page, newCmShop);
+        Page<NewCmShop> shopPage = super.findPage(page, newCmShop);
+        shopPage.getList().forEach(shop -> {
+            List<SplitCode> splitCode = newCmShopDao.findSplitCode(shop.getShopID());
+            if (null != splitCode && splitCode.size() > 0) {
+                shop.setSplitCode(splitCode.get(0).getSplitCode());
+            }
+        });
+        return shopPage;
     }
 
     @Transactional(readOnly = false)
@@ -242,7 +249,7 @@ public class NewCmShopService extends CrudService<NewCmShopDao, NewCmShop> {
             //删除旧分帐号
             newCmShopDao.deleteSplitCode(newCmShop.getShopID());
             for (SplitCode splitCode : newCmShop.getSplitCodes()) {
-                if(StringUtils.isNotBlank(splitCode.getSplitCode())){
+                if (StringUtils.isNotBlank(splitCode.getSplitCode())) {
                     splitCode.setShopId(newCmShop.getShopID());
                     //增加新分帐号
                     newCmShopDao.insertSplitCode(splitCode);

+ 2 - 2
src/main/resources/mappings/modules/product/RepeatPurchasePriceMapper.xml

@@ -55,11 +55,11 @@
 			c.name AS "userName",
 			c.mobile As "mobile",
 			c.bindMobile AS "bindMobile",
-			c.registerUserTypeID As "type",
+			ifnull(c.registerUserTypeID,3) As "type",
 			b.name AS "productName",
             CASE   b.costCheckFlag
             WHEN  1 THEN b.`costPrice`
-            WHEN  2 THEN b.`costProportional` * b.`price1` / 100
+            WHEN  2 THEN b.`costProportional` * b.`price` / 100
             END   AS "costPrice"
 		FROM repeat_purchase_price a
 		<include refid="repeatPurchasePriceJoins"/>

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

@@ -19,7 +19,7 @@
 <body>
 <ul class="nav nav-tabs">
     <li class="active"><a href="${ctx}/product/new/list?searchProductCategory=2">二手商品列表</a></li>
-    <li><a href="${ctx}/product/cmSecondHandDetail/form?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}">添加二手商品</a></li>
+    <li><a href="${ctx}/product/cmSecondHandDetail/form?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">添加二手商品</a></li>
 </ul>
 <form:form id="searchForm" modelAttribute="product" action="${ctx}/product/new/list" method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>

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

@@ -756,22 +756,25 @@
 
     //图片初始化
     $(function () {
-        var ids=${cmSecondHandDetail.fileTypes};
-        for (let i = 0; i < ids.length; i++) {
-            if(1==ids[i]){
-                $("#yqht").attr("checked",true);
-            }
-            if(2==ids[i]){
-                $("#yqzc").attr("checked",true);
-            }
-            if(3==ids[i]){
-                $("#yqfp").attr("checked",true);
-            }
-            if(4==ids[i]){
-                $("#yqbg").attr("checked",true);
-            }
-            if(5==ids[i]){
-                $("#wrh").attr("checked",true);
+        var ids = [];
+        if (999 !=${cmSecondHandDetail.fileTypes}) {
+            ids =${cmSecondHandDetail.fileTypes};
+            for (let i = 0; i < ids.length; i++) {
+                if (1 == ids[i]) {
+                    $("#yqht").attr("checked", true);
+                }
+                if (2 == ids[i]) {
+                    $("#yqzc").attr("checked", true);
+                }
+                if (3 == ids[i]) {
+                    $("#yqfp").attr("checked", true);
+                }
+                if (4 == ids[i]) {
+                    $("#yqbg").attr("checked", true);
+                }
+                if (5 == ids[i]) {
+                    $("#wrh").attr("checked", true);
+                }
             }
         }
 
@@ -956,18 +959,6 @@
             });
         })
     });
-
-    function Idcheck(val) {
-        var c = val;
-        if (1 === c) {
-            $("#yyzz").hide();
-            $("#sfz").show();
-        } else {
-            $("#sfz").hide();
-            $("#yyzz").show();
-        }
-    }
-
     $(function () {
         // 加载地址
         loadProvince();
@@ -1181,6 +1172,20 @@
         obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
     }
 
+    function Idcheck(val) {
+        var c = val;
+        console.log(c);
+        if (1 === c) {
+            $("#yyzz").hide();
+            $("#sfz").show();
+            $("#gsmc").hide();
+        } else {
+            $("#gsmc").show();
+            $("#sfz").hide();
+            $("#yyzz").show();
+        }
+    }
+
 </script>
 </body>
 <head>

+ 4 - 0
src/main/webapp/WEB-INF/views/modules/user/newCmShopList.jsp

@@ -226,6 +226,7 @@
 				<th>联系人</th>
 				<th>手机号</th>
 				<th>邮箱</th>
+				<th>线上分帐号</th>
 				<th>注册来源</th>
 				<th>供应商状态</th>
 				<th>审核人</th>
@@ -252,6 +253,9 @@
 				<td>
 					${newCmShop.email}
 				</td>
+				<td>
+					${newCmShop.splitCode}
+				</td>
 				<td>
 					<c:if test="${newCmShop.source eq 0}">
 						网站