wangxiaoming hace 7 años
padre
commit
5c3c8f957b

+ 8 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/PostageServiceImpl.java

@@ -3,11 +3,18 @@ package com.iamberry.rst.service.cm;
 import com.iamberry.rst.core.cm.Postage;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.cm.PostageService;
+import com.iamberry.rst.service.cm.mapper.PostageMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 
+@Service
 public class PostageServiceImpl implements PostageService {
+    @Autowired
+    private PostageMapper postageMapper;
+
     @Override
     public Integer savePostage(Postage postage) {
-        return null;
+        return postageMapper.savePostage(postage);
     }
 
     @Override

+ 8 - 136
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/postageMapper.xml

@@ -20,23 +20,22 @@
     <result column="postage_create_time" property="postageCreateTime" jdbcType="TIMESTAMP" />
     <result column="postage_update_time" property="postageUpdateTime" jdbcType="TIMESTAMP" />
   </resultMap>
+
   <sql id="Base_Column_List" >
     postage_id, admin_id, postage_customer_status, postage_manager_status, postage_finance_status,
     postage_order_source, "postage_treatment method", sales_orderId, postage_client_name,
     postage_client_tel, postage_logistics_company, postage_logistics_no, postage_amount,
     postage_alipay, postage_alipay_name, postage_create_time, postage_update_time
   </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+
+  <select id="listPostage" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select
     <include refid="Base_Column_List" />
     from tb_rst_postage
     where postage_id = #{postageId,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-    delete from tb_rst_postage
-    where postage_id = #{postageId,jdbcType=INTEGER}
-  </delete>
-  <insert id="insert" parameterType="rml.model.Postage" >
+
+  <insert id="savePostage" parameterType="Postage" >
     insert into tb_rst_postage (postage_id, admin_id, postage_customer_status,
     postage_manager_status, postage_finance_status,
     postage_order_source, "postage_treatment method",
@@ -54,116 +53,8 @@
     #{postageCreateTime,jdbcType=TIMESTAMP}, #{postageUpdateTime,jdbcType=TIMESTAMP}
     )
   </insert>
-  <insert id="insertSelective" parameterType="rml.model.Postage" >
-    insert into tb_rst_postage
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="postageId != null" >
-        postage_id,
-      </if>
-      <if test="adminId != null" >
-        admin_id,
-      </if>
-      <if test="postageCustomerStatus != null" >
-        postage_customer_status,
-      </if>
-      <if test="postageManagerStatus != null" >
-        postage_manager_status,
-      </if>
-      <if test="postageFinanceStatus != null" >
-        postage_finance_status,
-      </if>
-      <if test="postageOrderSource != null" >
-        postage_order_source,
-      </if>
-      <if test="postageTreatmentMethod != null" >
-        "postage_treatment method",
-      </if>
-      <if test="salesOrderid != null" >
-        sales_orderId,
-      </if>
-      <if test="postageClientName != null" >
-        postage_client_name,
-      </if>
-      <if test="postageClientTel != null" >
-        postage_client_tel,
-      </if>
-      <if test="postageLogisticsCompany != null" >
-        postage_logistics_company,
-      </if>
-      <if test="postageLogisticsNo != null" >
-        postage_logistics_no,
-      </if>
-      <if test="postageAmount != null" >
-        postage_amount,
-      </if>
-      <if test="postageAlipay != null" >
-        postage_alipay,
-      </if>
-      <if test="postageAlipayName != null" >
-        postage_alipay_name,
-      </if>
-      <if test="postageCreateTime != null" >
-        postage_create_time,
-      </if>
-      <if test="postageUpdateTime != null" >
-        postage_update_time,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="postageId != null" >
-        #{postageId,jdbcType=INTEGER},
-      </if>
-      <if test="adminId != null" >
-        #{adminId,jdbcType=INTEGER},
-      </if>
-      <if test="postageCustomerStatus != null" >
-        #{postageCustomerStatus,jdbcType=INTEGER},
-      </if>
-      <if test="postageManagerStatus != null" >
-        #{postageManagerStatus,jdbcType=INTEGER},
-      </if>
-      <if test="postageFinanceStatus != null" >
-        #{postageFinanceStatus,jdbcType=INTEGER},
-      </if>
-      <if test="postageOrderSource != null" >
-        #{postageOrderSource,jdbcType=INTEGER},
-      </if>
-      <if test="postageTreatmentMethod != null" >
-        #{postageTreatmentMethod,jdbcType=INTEGER},
-      </if>
-      <if test="salesOrderid != null" >
-        #{salesOrderid,jdbcType=VARCHAR},
-      </if>
-      <if test="postageClientName != null" >
-        #{postageClientName,jdbcType=VARCHAR},
-      </if>
-      <if test="postageClientTel != null" >
-        #{postageClientTel,jdbcType=VARCHAR},
-      </if>
-      <if test="postageLogisticsCompany != null" >
-        #{postageLogisticsCompany,jdbcType=VARCHAR},
-      </if>
-      <if test="postageLogisticsNo != null" >
-        #{postageLogisticsNo,jdbcType=VARCHAR},
-      </if>
-      <if test="postageAmount != null" >
-        #{postageAmount,jdbcType=INTEGER},
-      </if>
-      <if test="postageAlipay != null" >
-        #{postageAlipay,jdbcType=VARCHAR},
-      </if>
-      <if test="postageAlipayName != null" >
-        #{postageAlipayName,jdbcType=VARCHAR},
-      </if>
-      <if test="postageCreateTime != null" >
-        #{postageCreateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="postageUpdateTime != null" >
-        #{postageUpdateTime,jdbcType=TIMESTAMP},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="rml.model.Postage" >
+
+  <update id="updatePostage" parameterType="Postage" >
     update tb_rst_postage
     <set >
       <if test="adminId != null" >
@@ -217,24 +108,5 @@
     </set>
     where postage_id = #{postageId,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="rml.model.Postage" >
-    update tb_rst_postage
-    set admin_id = #{adminId,jdbcType=INTEGER},
-      postage_customer_status = #{postageCustomerStatus,jdbcType=INTEGER},
-      postage_manager_status = #{postageManagerStatus,jdbcType=INTEGER},
-      postage_finance_status = #{postageFinanceStatus,jdbcType=INTEGER},
-      postage_order_source = #{postageOrderSource,jdbcType=INTEGER},
-      "postage_treatment method" = #{postageTreatmentMethod,jdbcType=INTEGER},
-      sales_orderId = #{salesOrderid,jdbcType=VARCHAR},
-      postage_client_name = #{postageClientName,jdbcType=VARCHAR},
-      postage_client_tel = #{postageClientTel,jdbcType=VARCHAR},
-      postage_logistics_company = #{postageLogisticsCompany,jdbcType=VARCHAR},
-      postage_logistics_no = #{postageLogisticsNo,jdbcType=VARCHAR},
-      postage_amount = #{postageAmount,jdbcType=INTEGER},
-      postage_alipay = #{postageAlipay,jdbcType=VARCHAR},
-      postage_alipay_name = #{postageAlipayName,jdbcType=VARCHAR},
-      postage_create_time = #{postageCreateTime,jdbcType=TIMESTAMP},
-      postage_update_time = #{postageUpdateTime,jdbcType=TIMESTAMP}
-    where postage_id = #{postageId,jdbcType=INTEGER}
-  </update>
+
 </mapper>

+ 25 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminPostageController.java

@@ -2,8 +2,10 @@ package com.iamberry.rst.controllers.cm;
 
 import com.iamberry.rst.core.cm.CustomerInfo;
 import com.iamberry.rst.core.cm.Postage;
+import com.iamberry.rst.core.cm.QuestionDescribe;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.cm.PostageService;
+import com.iamberry.wechat.tools.ResponseJson;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -11,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
@@ -48,7 +51,28 @@ public class AdminPostageController {
         return mv;
     }
 
-//    postage:update:customer
+
+    /**
+     * 客服确认状态
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("postage:update:customer")
+    @RequestMapping(value = "/update_customer")
+    public ResponseJson selectQuestionDescribe(HttpServletRequest request, Integer postageId) throws Exception {
+        if(postageId == null || postageId == 0){
+            return new ResponseJson(500, "未获取到问题描述", 500);
+        }
+        Postage postage = new Postage();
+        postage.setPostageCustomerStatus(2);
+        postageService.updatePostage(postage);
+
+        ResponseJson rj = new ResponseJson(200, "查询成功", 200);
+        return rj;
+    }
+
+
+//
 
 //    postage:update:manager
 

+ 1 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/cm/postage/postage_list.ftl

@@ -37,8 +37,7 @@
 <div class="page-container">
     <div class="text-c">
         <form action="${path}/admin/customer/select_customer_list" method="post">
-            <button type="button" style="cursor:pointer; float: left;height: 35px;margin-right: 30px;" class="my-btn-search" onclick="toAddCustomer();">新建客诉</button>
-            <input type="text" class="my-input"  style="width:90px;margin-right: 0px; margin-left: -65px;" value="${customerInfo.customerId!}" placeholder="客诉编号" id="customerId" name="customerId">
+            <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.customerId!}" placeholder="客诉编号" id="customerId" name="customerId">
             <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.sendLogisticsNo!}" placeholder="物流编号" id="sendLogisticsNo" name="sendLogisticsNo">
             <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.customerName!}" placeholder="请输入姓名" id="customerName" name="customerName">
             <input type="text" class="my-input"  style="width:90px;margin-right: 0px;" value="${customerInfo.customerTel!}" placeholder="请输入电话号码" id="customerTel" name="customerTel">