liujiankang 7 anni fa
parent
commit
26c9f92f4c

+ 17 - 11
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedInfoMapper.java

@@ -1,17 +1,23 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.ComplaintSignclosedInfo;
-
+/**
+ * 客诉-签收表mapper
+ */
 public interface ComplaintSignclosedInfoMapper {
-    int deleteByPrimaryKey(Integer signclosedId);
-
+    /**
+     * 添加单个签收记录
+     * @return
+     */
     int insert(ComplaintSignclosedInfo record);
-
-    int insertSelective(ComplaintSignclosedInfo record);
-
-    ComplaintSignclosedInfo selectByPrimaryKey(Integer signclosedId);
-
-    int updateByPrimaryKeySelective(ComplaintSignclosedInfo record);
-
-    int updateByPrimaryKey(ComplaintSignclosedInfo record);
+    /**
+     * 查询单个签收记录
+     * @return
+     */
+    ComplaintSignclosedInfo getSignclosedById(Integer signclosedId);
+    /**
+     * 修改单个签收记录
+     * @return
+     */
+    int updateSignclosedById(ComplaintSignclosedInfo record);
 }

+ 17 - 11
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedProductInfoMapper.java

@@ -1,17 +1,23 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.SignclosedProductInfo;
-
+/**
+ * 客诉-签收产品表mapper
+ */
 public interface ComplaintSignclosedProductInfoMapper {
-    int deleteByPrimaryKey(Integer productId);
-
+    /**
+     * 添加单个签收产品记录
+     * @return
+     */
     int insert(SignclosedProductInfo record);
-
-    int insertSelective(SignclosedProductInfo record);
-
-    SignclosedProductInfo selectByPrimaryKey(Integer productId);
-
-    int updateByPrimaryKeySelective(SignclosedProductInfo record);
-
-    int updateByPrimaryKey(SignclosedProductInfo record);
+    /**
+     * 查询单个签收产品记录
+     * @return
+     */
+    SignclosedProductInfo getSignclosedById(Integer productId);
+    /**
+     * 修改单个签收产品记录
+     * @return
+     */
+    int updateSignclosedById(SignclosedProductInfo record);
 }

+ 17 - 11
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSmallClassInfoMapper.java

@@ -1,17 +1,23 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.ComplaintSmallClassInfo;
-
+/**
+ * 客诉-客诉小类mapper
+ */
 public interface ComplaintSmallClassInfoMapper {
-    int deleteByPrimaryKey(Integer smallClassId);
-
+    /**
+     * 添加单个客诉小类
+     * @return
+     */
     int insert(ComplaintSmallClassInfo record);
-
-    int insertSelective(ComplaintSmallClassInfo record);
-
-    ComplaintSmallClassInfo selectByPrimaryKey(Integer smallClassId);
-
-    int updateByPrimaryKeySelective(ComplaintSmallClassInfo record);
-
-    int updateByPrimaryKey(ComplaintSmallClassInfo record);
+    /**
+     * 查询单个客诉小类
+     * @return
+     */
+    ComplaintSmallClassInfo getSmallClassById(Integer smallClassId);
+    /**
+     * 修改单个客诉小类
+     * @return
+     */
+    int updateSmallClassById(ComplaintSmallClassInfo record);
 }

+ 17 - 11
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintTypeInfoMapper.java

@@ -1,17 +1,23 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.ComplaintTypeInfo;
-
+/**
+ * 客诉-客诉类型表mapper
+ */
 public interface ComplaintTypeInfoMapper {
-    int deleteByPrimaryKey(Integer complaintId);
-
+    /**
+     * 添加单个客诉类型
+     * @return
+     */
     int insert(ComplaintTypeInfo record);
-
-    int insertSelective(ComplaintTypeInfo record);
-
-    ComplaintTypeInfo selectByPrimaryKey(Integer complaintId);
-
-    int updateByPrimaryKeySelective(ComplaintTypeInfo record);
-
-    int updateByPrimaryKey(ComplaintTypeInfo record);
+    /**
+     * 查询单个客诉类型
+     * @return
+     */
+    ComplaintTypeInfo getTypeById(Integer complaintId);
+    /**
+     * 修改单个客诉类型
+     * @return
+     */
+    int updateTypeById(ComplaintTypeInfo record);
 }

+ 3 - 58
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSignclosedProductInfoMapper.xml

@@ -12,16 +12,12 @@
   <sql id="Base_Column_List" >
     product_id, signclosed_id, product_name, product_num, signclosed_create_time, signclosed_update_time
   </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="getSignclosedById" resultMap="SignclosedProductInfo" parameterType="java.lang.Integer" >
     select 
     <include refid="Base_Column_List" />
     from tb_rst_complaint_signclosed_product
     where product_id = #{productId,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-    delete from tb_rst_complaint_signclosed_product
-    where product_id = #{productId,jdbcType=INTEGER}
-  </delete>
   <insert id="insert" parameterType="SignclosedProductInfo" >
     insert into tb_rst_complaint_signclosed_product (product_id, signclosed_id, product_name, 
       product_num, signclosed_create_time, signclosed_update_time
@@ -30,50 +26,8 @@
       #{productNum,jdbcType=INTEGER}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
       )
   </insert>
-  <insert id="insertSelective" parameterType="SignclosedProductInfo" >
-    insert into tb_rst_complaint_signclosed_product
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="productId != null" >
-        product_id,
-      </if>
-      <if test="signclosedId != null" >
-        signclosed_id,
-      </if>
-      <if test="productName != null" >
-        product_name,
-      </if>
-      <if test="productNum != null" >
-        product_num,
-      </if>
-      <if test="signclosedCreateTime != null" >
-        signclosed_create_time,
-      </if>
-      <if test="signclosedUpdateTime != null" >
-        signclosed_update_time,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="productId != null" >
-        #{productId,jdbcType=INTEGER},
-      </if>
-      <if test="signclosedId != null" >
-        #{signclosedId,jdbcType=INTEGER},
-      </if>
-      <if test="productName != null" >
-        #{productName,jdbcType=VARCHAR},
-      </if>
-      <if test="productNum != null" >
-        #{productNum,jdbcType=INTEGER},
-      </if>
-      <if test="signclosedCreateTime != null" >
-        #{signclosedCreateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="signclosedUpdateTime != null" >
-        #{signclosedUpdateTime,jdbcType=TIMESTAMP},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="SignclosedProductInfo" >
+
+  <update id="updateSignclosedById" parameterType="SignclosedProductInfo" >
     update tb_rst_complaint_signclosed_product
     <set >
       <if test="signclosedId != null" >
@@ -94,13 +48,4 @@
     </set>
     where product_id = #{productId,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="SignclosedProductInfo" >
-    update tb_rst_complaint_signclosed_product
-    set signclosed_id = #{signclosedId,jdbcType=INTEGER},
-      product_name = #{productName,jdbcType=VARCHAR},
-      product_num = #{productNum,jdbcType=INTEGER},
-      signclosed_create_time = #{signclosedCreateTime,jdbcType=TIMESTAMP},
-      signclosed_update_time = #{signclosedUpdateTime,jdbcType=TIMESTAMP}
-    where product_id = #{productId,jdbcType=INTEGER}
-  </update>
 </mapper>

+ 3 - 72
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSmallClassInfoMapper.xml

@@ -15,16 +15,12 @@
     small_class_id, complaint_id, small_class_name, small_class_profile, small_class_state, 
     small_question_num, small_class_create_time, small_class_update_time
   </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="getSmallClassById" resultMap="ComplaintSmallClassInfo" parameterType="java.lang.Integer" >
     select 
     <include refid="Base_Column_List" />
     from tb_rst_complaint_small_class
     where small_class_id = #{smallClassId,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-    delete from tb_rst_complaint_small_class
-    where small_class_id = #{smallClassId,jdbcType=INTEGER}
-  </delete>
   <insert id="insert" parameterType="ComplaintSmallClassInfo" >
     insert into tb_rst_complaint_small_class (small_class_id, complaint_id, small_class_name, 
       small_class_profile, small_class_state, small_question_num, 
@@ -35,62 +31,8 @@
       #{smallClassCreateTime,jdbcType=TIMESTAMP}, #{smallClassUpdateTime,jdbcType=TIMESTAMP}
       )
   </insert>
-  <insert id="insertSelective" parameterType="ComplaintSmallClassInfo" >
-    insert into tb_rst_complaint_small_class
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="smallClassId != null" >
-        small_class_id,
-      </if>
-      <if test="complaintId != null" >
-        complaint_id,
-      </if>
-      <if test="smallClassName != null" >
-        small_class_name,
-      </if>
-      <if test="smallClassProfile != null" >
-        small_class_profile,
-      </if>
-      <if test="smallClassState != null" >
-        small_class_state,
-      </if>
-      <if test="smallQuestionNum != null" >
-        small_question_num,
-      </if>
-      <if test="smallClassCreateTime != null" >
-        small_class_create_time,
-      </if>
-      <if test="smallClassUpdateTime != null" >
-        small_class_update_time,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="smallClassId != null" >
-        #{smallClassId,jdbcType=INTEGER},
-      </if>
-      <if test="complaintId != null" >
-        #{complaintId,jdbcType=INTEGER},
-      </if>
-      <if test="smallClassName != null" >
-        #{smallClassName,jdbcType=VARCHAR},
-      </if>
-      <if test="smallClassProfile != null" >
-        #{smallClassProfile,jdbcType=VARCHAR},
-      </if>
-      <if test="smallClassState != null" >
-        #{smallClassState,jdbcType=BIT},
-      </if>
-      <if test="smallQuestionNum != null" >
-        #{smallQuestionNum,jdbcType=SMALLINT},
-      </if>
-      <if test="smallClassCreateTime != null" >
-        #{smallClassCreateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="smallClassUpdateTime != null" >
-        #{smallClassUpdateTime,jdbcType=TIMESTAMP},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="ComplaintSmallClassInfo" >
+
+  <update id="updateSmallClassById" parameterType="ComplaintSmallClassInfo" >
     update tb_rst_complaint_small_class
     <set >
       <if test="complaintId != null" >
@@ -117,15 +59,4 @@
     </set>
     where small_class_id = #{smallClassId,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="ComplaintSmallClassInfo" >
-    update tb_rst_complaint_small_class
-    set complaint_id = #{complaintId,jdbcType=INTEGER},
-      small_class_name = #{smallClassName,jdbcType=VARCHAR},
-      small_class_profile = #{smallClassProfile,jdbcType=VARCHAR},
-      small_class_state = #{smallClassState,jdbcType=BIT},
-      small_question_num = #{smallQuestionNum,jdbcType=SMALLINT},
-      small_class_create_time = #{smallClassCreateTime,jdbcType=TIMESTAMP},
-      small_class_update_time = #{smallClassUpdateTime,jdbcType=TIMESTAMP}
-    where small_class_id = #{smallClassId,jdbcType=INTEGER}
-  </update>
 </mapper>

+ 2 - 65
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintTypeInfoMapper.xml

@@ -14,16 +14,12 @@
     complaint_id, complaint_consulting_type, complaint_class_name, complaint_class_profile, 
     complaint_class_state, complaint_create_time, complaint_update_time
   </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="getTypeById" resultMap="ComplaintTypeInfo" parameterType="java.lang.Integer" >
     select 
     <include refid="Base_Column_List" />
     from tb_rst_complaint_type
     where complaint_id = #{complaintId,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-    delete from tb_rst_complaint_type
-    where complaint_id = #{complaintId,jdbcType=INTEGER}
-  </delete>
   <insert id="insert" parameterType="ComplaintTypeInfo" >
     insert into tb_rst_complaint_type (complaint_id, complaint_consulting_type, 
       complaint_class_name, complaint_class_profile, 
@@ -34,56 +30,7 @@
       #{complaintClassState,jdbcType=BIT}, #{complaintCreateTime,jdbcType=TIMESTAMP}, 
       #{complaintUpdateTime,jdbcType=TIMESTAMP})
   </insert>
-  <insert id="insertSelective" parameterType="ComplaintTypeInfo" >
-    insert into tb_rst_complaint_type
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="complaintId != null" >
-        complaint_id,
-      </if>
-      <if test="complaintConsultingType != null" >
-        complaint_consulting_type,
-      </if>
-      <if test="complaintClassName != null" >
-        complaint_class_name,
-      </if>
-      <if test="complaintClassProfile != null" >
-        complaint_class_profile,
-      </if>
-      <if test="complaintClassState != null" >
-        complaint_class_state,
-      </if>
-      <if test="complaintCreateTime != null" >
-        complaint_create_time,
-      </if>
-      <if test="complaintUpdateTime != null" >
-        complaint_update_time,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="complaintId != null" >
-        #{complaintId,jdbcType=INTEGER},
-      </if>
-      <if test="complaintConsultingType != null" >
-        #{complaintConsultingType,jdbcType=TINYINT},
-      </if>
-      <if test="complaintClassName != null" >
-        #{complaintClassName,jdbcType=VARCHAR},
-      </if>
-      <if test="complaintClassProfile != null" >
-        #{complaintClassProfile,jdbcType=VARCHAR},
-      </if>
-      <if test="complaintClassState != null" >
-        #{complaintClassState,jdbcType=BIT},
-      </if>
-      <if test="complaintCreateTime != null" >
-        #{complaintCreateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="complaintUpdateTime != null" >
-        #{complaintUpdateTime,jdbcType=TIMESTAMP},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="ComplaintTypeInfo" >
+  <update id="updateTypeById" parameterType="ComplaintTypeInfo" >
     update tb_rst_complaint_type
     <set >
       <if test="complaintConsultingType != null" >
@@ -107,14 +54,4 @@
     </set>
     where complaint_id = #{complaintId,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="ComplaintTypeInfo" >
-    update tb_rst_complaint_type
-    set complaint_consulting_type = #{complaintConsultingType,jdbcType=TINYINT},
-      complaint_class_name = #{complaintClassName,jdbcType=VARCHAR},
-      complaint_class_profile = #{complaintClassProfile,jdbcType=VARCHAR},
-      complaint_class_state = #{complaintClassState,jdbcType=BIT},
-      complaint_create_time = #{complaintCreateTime,jdbcType=TIMESTAMP},
-      complaint_update_time = #{complaintUpdateTime,jdbcType=TIMESTAMP}
-    where complaint_id = #{complaintId,jdbcType=INTEGER}
-  </update>
 </mapper>

+ 36 - 5
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/PtsCodeController.java

@@ -18,6 +18,8 @@ import java.text.MessageFormat;
 import java.util.List;
 
 import static com.iamberry.rst.util.SmsConfig.SEND_NOTICE;
+import static com.iamberry.rst.util.SmsConfig.SEND_NOTICE_INFORM;
+import static com.iamberry.rst.util.SmsConfig.SEND_NOTICE_INFORM2;
 
 /**
  * Created by Administrator on 2017/10/24.
@@ -34,16 +36,16 @@ public class PtsCodeController {
      * @param response
      * @return
      */
-    /*@RequestMapping("/failureInform")*/
+    @RequestMapping("/failureInform")
     @ResponseBody
-    public String informShipping(HttpServletResponse response, @RequestParam("file") String file)throws IOException  {
+    public String informShipping(HttpServletResponse response, @RequestParam("file") String file,Integer phoneSubscript,Integer kuyaidiSubscript,Integer danhaoSubscript)throws IOException  {
         String msg = "";
         Integer successNumber = 0;
         Integer errorNumber = 0;
         List<String> listString  = ExcelUtil.readExcelHead(file);
-        List<String> phones =   ExcelUtil.readCell2(file,listString.get(1));//手机号
-        List<String> kuyaidi =   ExcelUtil.readCell2(file,listString.get(6));//快递公司
-        List<String> danhao =   ExcelUtil.readCell2(file,listString.get(7));//快递单号
+        List<String> phones =   ExcelUtil.readCell2(file,listString.get(phoneSubscript));//手机号
+        List<String> kuyaidi =   ExcelUtil.readCell2(file,listString.get(kuyaidiSubscript));//快递公司
+        List<String> danhao =   ExcelUtil.readCell2(file,listString.get(danhaoSubscript));//快递单号
             if(phones.size() != kuyaidi.size() || phones.size() != danhao.size()){
                 return "数据不合格,请检查文档内的数据是否正常!";
             }
@@ -67,4 +69,33 @@ public class PtsCodeController {
             msg = "共发送"+(successNumber+errorNumber)+"条,成功:"+successNumber+"条,失败:"+errorNumber+"条。";
         return msg;
     }
+
+    /**
+     * 手动向特定手机发送滤芯短信
+     * @param response
+     * @return
+     */
+    @RequestMapping("/failureInform2")
+    @ResponseBody
+    public String informShipping2(HttpServletResponse response, @RequestParam("file") String file,Integer phoneSubscript,String autograph)throws IOException  {
+        String msg = "";
+        Integer successNumber = 0;
+        Integer errorNumber = 0;
+        List<String> listString  = ExcelUtil.readExcelHead(file);
+        List<String> phones =   ExcelUtil.readCell2(file,listString.get(phoneSubscript));//手机号
+        for(int i = 0;i< phones.size();i++){
+            if(phones.get(i).length() != 11){
+                return "快递公司出错,请检查文档内的数据是否正常!";
+            }
+            String text = MessageFormat.format(SEND_NOTICE_INFORM, autograph);
+            msg = smsService.sendOtherCMS(phones.get(i),text);
+            if(msg.equals("SUCCESS")){
+                successNumber++;
+            }else{
+                errorNumber++;
+            }
+        }
+        msg = "共发送"+(successNumber+errorNumber)+"条,成功:"+successNumber+"条,失败:"+errorNumber+"条。";
+        return msg;
+    }
 }

File diff suppressed because it is too large
+ 6 - 1
watero-rst-web/src/main/resources/platform.properties