傅行帆 5 years ago
parent
commit
e19bdf43bc

+ 2
- 26
src/main/java/com/huiju/estateagents/controller/TaOfficeContactController.java View File

16
 import org.springframework.beans.factory.annotation.Autowired;
16
 import org.springframework.beans.factory.annotation.Autowired;
17
 import org.springframework.web.bind.annotation.*;
17
 import org.springframework.web.bind.annotation.*;
18
 
18
 
19
-import javax.servlet.http.HttpServletRequest;
20
-import javax.servlet.http.HttpServletResponse;
21
 import java.time.LocalDateTime;
19
 import java.time.LocalDateTime;
22
-import java.util.Map;
23
 
20
 
24
 /**
21
 /**
25
  * <p>
22
  * <p>
107
         }
104
         }
108
         return responseBean;
105
         return responseBean;
109
     }
106
     }
110
-//
111
-//    /**
112
-//     * 保存对象
113
-//     *
114
-//     * @return
115
-//     */
116
-//    @RequestMapping(value="/official/taOfficeContact",method= RequestMethod.OPTIONS)
117
-//    public ResponseBean taOfficeContactOptions(HttpServletRequest request, HttpServletResponse response){
118
-//        //跨域请求,*代表允许全部类型
119
-//        response.setHeader("Access-Control-Allow-Origin", "*");
120
-//        //允许请求方式
121
-//        response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
122
-//        //用来指定本次预检请求的有效期,单位为秒,在此期间不用发出另一条预检请求
123
-//        response.setHeader("Access-Control-Max-Age", "3600");
124
-//        //请求包含的字段内容,如有多个可用哪个逗号分隔如下
125
-//        response.setHeader("Access-Control-Allow-Headers", "content-type,x-requested-with,Authorization, x-ui-request,lang");
126
-//        //访问控制允许凭据,true为允许
127
-//        response.setHeader("Access-Control-Allow-Credentials", "true");
128
-//        response.setCharacterEncoding("utf-8");
129
-//
130
-//        return ResponseBean.success("success");
131
-//    }
132
 
107
 
133
     /**
108
     /**
134
      * 根据id删除对象
109
      * 根据id删除对象
158
      * @param taOfficeContact 实体对象
133
      * @param taOfficeContact 实体对象
159
      * @return
134
      * @return
160
      */
135
      */
161
-    @RequestMapping(value="/taOfficeContact/{id}",method= RequestMethod.PUT)
136
+    @RequestMapping(value="/channel/taOfficeContact/{id}",method= RequestMethod.PUT)
162
     public ResponseBean taOfficeContactUpdate(@PathVariable String id,
137
     public ResponseBean taOfficeContactUpdate(@PathVariable String id,
163
                                         @RequestBody TaOfficeContact taOfficeContact){
138
                                         @RequestBody TaOfficeContact taOfficeContact){
164
         ResponseBean responseBean = new ResponseBean();
139
         ResponseBean responseBean = new ResponseBean();
165
         try {
140
         try {
141
+            taOfficeContact.setSerialNo(id);
166
             if (iTaOfficeContactService.updateById(taOfficeContact)){
142
             if (iTaOfficeContactService.updateById(taOfficeContact)){
167
                 responseBean.addSuccess(taOfficeContact);
143
                 responseBean.addSuccess(taOfficeContact);
168
             }else {
144
             }else {