Quellcode durchsuchen

二手小程序

zhijiezhao vor 2 Wochen
Ursprung
Commit
275b1681fb

+ 2 - 3
src/main/java/com/caimei/modules/product/entity/Product.java

@@ -2,19 +2,18 @@ package com.caimei.modules.product.entity;
 
 import com.caimei.modules.brand.entity.CmBrand;
 import com.caimei.po.ProductLadderPrice;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 import lombok.Data;
 
-import java.beans.Transient;
 import java.math.BigDecimal;
-import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
 @Data
 public class Product extends DataEntity<Product> {
 
+    private Integer allocateStatus;
+    private Integer publishMethod;
     private Integer zoneId;
     private Integer supId;
     private String name;

+ 1 - 3
src/main/java/com/caimei/modules/product/web/ProductNewController.java

@@ -824,10 +824,8 @@ public class ProductNewController extends BaseController {
     @RequestMapping(value = "allocate")
     public String allocateSecond(Product product, Model model) {
         productNewService.allocateSecond(product);
-        product.setProductCategory("2");
         model.addAttribute("message", "操作成功!");
-        model.addAttribute("product", product);
-        return "redirect:" + Global.getAdminPath() + "/product/new/list/";
+        return "redirect:" + Global.getAdminPath() + "/product/new/list?searchProductCategory=2";
     }
 
 

+ 3 - 1
src/main/resources/mappings/modules/product/ProductNewMapper.xml

@@ -90,6 +90,8 @@
         if(csp.id is not null,1,0) as "svipFlag",
         cshd.companyName as "companyName",
         cshd.publishIdentity as "publishIdentity",
+        cshd.publishMethod as "publishMethod",
+        cshd.allocateStatus as "allocateStatus",
         a.qualificationNo,
         a.productName,
         a.qualificationTime,
@@ -160,7 +162,7 @@
                 AND a.groundMall like concat('%',#{groundMall},'%')
                 and copi.organizeId = #{groundMall}
             </if>
-            <if test="groundMall == null">
+            <if test="groundMall == null and productCategory != 2">
                 AND copi.organizeId = 0
             </if>
             <if test="productCategory != null and productCategory != ''">

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

@@ -183,12 +183,13 @@
 <%--                </c:if>--%>
 <%--            </td>--%>
             <td>
-                <c:if test="${product.publishIdentity eq 1}">
                     ${product.contactName}
-                </c:if>
-                <c:if test="${product.publishIdentity eq 2}">
-                    ${product.companyName}
-                </c:if>
+<%--                <c:if test="${product.publishIdentity eq 1}">--%>
+<%--                    ${product.contactName}--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${product.publishIdentity eq 2}">--%>
+<%--                    ${product.companyName}--%>
+<%--                </c:if>--%>
             </td>
 <%--            <td>${product.dockingPeopleName}</td>--%>
             <td>
@@ -285,7 +286,9 @@
                                 <a class="red" href="javascript:void(0);" onclick="line(${product.id}, 2)">上架</a>
                             </c:if>
                             <a class="red" href="javascript:void(0);" onclick="validChange(${product.id},0)" >删除</a>
+                            <c:if test="${product.publishMethod eq 2}">
                             <a class="red" href = "${ctx}/product/new/allocate/form?productID=${product.id}">分配区域经理</a>
+                            </c:if>
                         </td>
                     </c:if>
                 </c:if>