Parcourir la source

byh24/10/31-规则增删改查完成

byh il y a 2 semaines
Parent
commit
8371491f70

+ 9 - 0
src/lsjb/bo/guizeVO/GuiZeVO.java

@@ -5,6 +5,7 @@ public class GuiZeVO {
     private Integer luncishu;
     private Integer luncitime;
     private Integer jiangetime;
+    private String newgzname;//update时用来存新的规则名称
 
     public String getGzname() {
         return gzname;
@@ -37,4 +38,12 @@ public class GuiZeVO {
     public void setJiangetime(Integer jiangetime) {
         this.jiangetime = jiangetime;
     }
+
+    public String getNewgzname() {
+        return newgzname;
+    }
+
+    public void setNewgzname(String newgzname) {
+        this.newgzname = newgzname;
+    }
 }

+ 4 - 0
src/lsjb/controller/guizeController/GuiZeController.java

@@ -32,7 +32,11 @@ public class GuiZeController {
 
     @RequestMapping("updateGuiZe")
     public int updateStudent(GuiZeVO vo){
+//        System.out.println("new---------------------"+vo.getNewgzname());
+//        System.out.println("old---------------------"+vo.getGzname());
+
         guiZeService.updateGuiZe(vo);
+
         return 1;
 
     }

+ 3 - 4
src/lsjb/mapper/guizeMapper/guize.xml

@@ -16,14 +16,13 @@
         delete from g2_table_guize where gzname = #{gzname}
     </delete>
 
-<!--    修改改不了规则名-->
     <update id="updateGuiZe" parameterMap="gzvo">
         update g2_table_guize
         <set>
             <trim suffixOverrides=",">
-<!--                <if test="gzname != null and gzname != '' ">-->
-<!--                    gzname = #{newgzname},-->
-<!--                </if>-->
+                <if test="newgzname != null and newgzname != '' ">
+                    gzname = #{newgzname},
+                </if>
                 <if test="luncishu != null">
                     luncishu = #{luncishu},
                 </if>