首页 新闻 会员 周边 捐助

这里一起查询的只展示了一半

0
悬赏园豆:10 [已解决问题] 解决于 2016-05-26 10:31

这个是页面效果,很明显的后面两列就没展示,

这是他的jsp,我并没有设置不让他展示.莫名其妙的就少了一半,下面我贴代码

 1 package com.charmyin.cmstudio.njfu.transit.controller;
 2 
 3 import java.util.List;
 4 
 5 import javax.annotation.Resource;
 6 
 7 import org.springframework.stereotype.Controller;
 8 import org.springframework.web.bind.annotation.RequestMapping;
 9 import org.springframework.web.bind.annotation.RequestMethod;
10 import org.springframework.web.bind.annotation.ResponseBody;
11 
12 import com.charmyin.cmstudio.basic.pagination.page.Pagination;
13 import com.charmyin.cmstudio.basic.pagination.page.PaginationResultVO;
14 import com.charmyin.cmstudio.njfu.transit.persistence.TransitMapper;
15 import com.charmyin.cmstudio.njfu.transit.vo.Transit;
16 import com.charmyin.cmstudio.web.utils.ResponseUtil;
17 
18 @Controller
19 @RequestMapping("/transit")
20 public class TransitController {
21     
22 
23     @Resource
24     TransitMapper transitMapper;
25 
26     @RequestMapping(value = "/index")
27     public String index() {
28         return "/njfu/transit/index";
29     }
30     
31     @RequestMapping(method = RequestMethod.POST, value = "/findAll")
32     @ResponseBody
33     public PaginationResultVO findAll(Pagination page) {
34         Transit transit = new Transit();
35         transit.setPageVO(page);
36         List<Transit> list = transitMapper.findAll(transit);
37         PaginationResultVO prv = new PaginationResultVO();
38         prv.setTotal(String.valueOf(transit.getPageVO().getTotalRows()));
39         prv.setRows(list);
40         return prv;
41     }
42     
43     @RequestMapping(method=RequestMethod.POST, value="/delete", produces = "text/plain;charset=UTF-8")
44     @ResponseBody
45     public String deleteByPrimaryKey(String id) {
46         try{
47             if(id!=null){
48                 String ids [] =id.split(",");
49             for (String Id : ids) {
50                 transitMapper.deleteByPrimaryKey(Id);
51             }    
52             }
53             return ResponseUtil.getSuccessResultString();
54         }catch(Exception e){
55             e.printStackTrace();
56             return ResponseUtil.getFailResultString("删除过程中出错!");
57         }
58     }
59 }
controller
 1 package com.charmyin.cmstudio.njfu.transit.vo;
 2 
 3 import com.charmyin.cmstudio.basic.pagination.annotation.Paging;
 4 import com.charmyin.cmstudio.basic.pagination.page.Pagination;
 5 
 6 @Paging(field="pageVO")
 7 public class Transit {
 8     
 9     private Pagination pageVO;
10     
11     public Pagination getPageVO() {
12         return pageVO;
13     }
14 
15     public void setPageVO(Pagination pageVO) {
16         this.pageVO = pageVO;
17     }
18 
19     private String id;
20 
21     private String automobile;
22 
23     private String region;
24 
25     private String route;
26 
27     private Double ticket;
28 
29     public String getId() {
30         return id;
31     }
32 
33     public void setId(String id) {
34         this.id = id == null ? null : id.trim();
35     }
36 
37     public String getAutomobile() {
38         return automobile;
39     }
40 
41     public void setAutomobile(String automobile) {
42         this.automobile = automobile == null ? null : automobile.trim();
43     }
44 
45     public String getRegion() {
46         return region;
47     }
48 
49     public void setRegion(String region) {
50         this.region = region == null ? null : region.trim();
51     }
52 
53     public String getRoute() {
54         return route;
55     }
56 
57     public void setRoute(String route) {
58         this.route = route == null ? null : route.trim();
59     }
60 
61     public Double getTicket() {
62         return ticket;
63     }
64 
65     public void setTicket(Double ticket) {
66         this.ticket = ticket;
67     }
68 }
实体
  1 package com.charmyin.cmstudio.njfu.transit.vo;
  2 
  3 import java.util.ArrayList;
  4 import java.util.List;
  5 
  6 public class TransitExample {
  7     protected String orderByClause;
  8 
  9     protected boolean distinct;
 10 
 11     protected List<Criteria> oredCriteria;
 12 
 13     public TransitExample() {
 14         oredCriteria = new ArrayList<Criteria>();
 15     }
 16 
 17     public void setOrderByClause(String orderByClause) {
 18         this.orderByClause = orderByClause;
 19     }
 20 
 21     public String getOrderByClause() {
 22         return orderByClause;
 23     }
 24 
 25     public void setDistinct(boolean distinct) {
 26         this.distinct = distinct;
 27     }
 28 
 29     public boolean isDistinct() {
 30         return distinct;
 31     }
 32 
 33     public List<Criteria> getOredCriteria() {
 34         return oredCriteria;
 35     }
 36 
 37     public void or(Criteria criteria) {
 38         oredCriteria.add(criteria);
 39     }
 40 
 41     public Criteria or() {
 42         Criteria criteria = createCriteriaInternal();
 43         oredCriteria.add(criteria);
 44         return criteria;
 45     }
 46 
 47     public Criteria createCriteria() {
 48         Criteria criteria = createCriteriaInternal();
 49         if (oredCriteria.size() == 0) {
 50             oredCriteria.add(criteria);
 51         }
 52         return criteria;
 53     }
 54 
 55     protected Criteria createCriteriaInternal() {
 56         Criteria criteria = new Criteria();
 57         return criteria;
 58     }
 59 
 60     public void clear() {
 61         oredCriteria.clear();
 62         orderByClause = null;
 63         distinct = false;
 64     }
 65 
 66     protected abstract static class GeneratedCriteria {
 67         protected List<Criterion> criteria;
 68 
 69         protected GeneratedCriteria() {
 70             super();
 71             criteria = new ArrayList<Criterion>();
 72         }
 73 
 74         public boolean isValid() {
 75             return criteria.size() > 0;
 76         }
 77 
 78         public List<Criterion> getAllCriteria() {
 79             return criteria;
 80         }
 81 
 82         public List<Criterion> getCriteria() {
 83             return criteria;
 84         }
 85 
 86         protected void addCriterion(String condition) {
 87             if (condition == null) {
 88                 throw new RuntimeException("Value for condition cannot be null");
 89             }
 90             criteria.add(new Criterion(condition));
 91         }
 92 
 93         protected void addCriterion(String condition, Object value, String property) {
 94             if (value == null) {
 95                 throw new RuntimeException("Value for " + property + " cannot be null");
 96             }
 97             criteria.add(new Criterion(condition, value));
 98         }
 99 
100         protected void addCriterion(String condition, Object value1, Object value2, String property) {
101             if (value1 == null || value2 == null) {
102                 throw new RuntimeException("Between values for " + property + " cannot be null");
103             }
104             criteria.add(new Criterion(condition, value1, value2));
105         }
106 
107         public Criteria andIdIsNull() {
108             addCriterion("id is null");
109             return (Criteria) this;
110         }
111 
112         public Criteria andIdIsNotNull() {
113             addCriterion("id is not null");
114             return (Criteria) this;
115         }
116 
117         public Criteria andIdEqualTo(String value) {
118             addCriterion("id =", value, "id");
119             return (Criteria) this;
120         }
121 
122         public Criteria andIdNotEqualTo(String value) {
123             addCriterion("id <>", value, "id");
124             return (Criteria) this;
125         }
126 
127         public Criteria andIdGreaterThan(String value) {
128             addCriterion("id >", value, "id");
129             return (Criteria) this;
130         }
131 
132         public Criteria andIdGreaterThanOrEqualTo(String value) {
133             addCriterion("id >=", value, "id");
134             return (Criteria) this;
135         }
136 
137         public Criteria andIdLessThan(String value) {
138             addCriterion("id <", value, "id");
139             return (Criteria) this;
140         }
141 
142         public Criteria andIdLessThanOrEqualTo(String value) {
143             addCriterion("id <=", value, "id");
144             return (Criteria) this;
145         }
146 
147         public Criteria andIdLike(String value) {
148             addCriterion("id like", value, "id");
149             return (Criteria) this;
150         }
151 
152         public Criteria andIdNotLike(String value) {
153             addCriterion("id not like", value, "id");
154             return (Criteria) this;
155         }
156 
157         public Criteria andIdIn(List<String> values) {
158             addCriterion("id in", values, "id");
159             return (Criteria) this;
160         }
161 
162         public Criteria andIdNotIn(List<String> values) {
163             addCriterion("id not in", values, "id");
164             return (Criteria) this;
165         }
166 
167         public Criteria andIdBetween(String value1, String value2) {
168             addCriterion("id between", value1, value2, "id");
169             return (Criteria) this;
170         }
171 
172         public Criteria andIdNotBetween(String value1, String value2) {
173             addCriterion("id not between", value1, value2, "id");
174             return (Criteria) this;
175         }
176 
177         public Criteria andAutomobileIsNull() {
178             addCriterion("automobile is null");
179             return (Criteria) this;
180         }
181 
182         public Criteria andAutomobileIsNotNull() {
183             addCriterion("automobile is not null");
184             return (Criteria) this;
185         }
186 
187         public Criteria andAutomobileEqualTo(String value) {
188             addCriterion("automobile =", value, "automobile");
189             return (Criteria) this;
190         }
191 
192         public Criteria andAutomobileNotEqualTo(String value) {
193             addCriterion("automobile <>", value, "automobile");
194             return (Criteria) this;
195         }
196 
197         public Criteria andAutomobileGreaterThan(String value) {
198             addCriterion("automobile >", value, "automobile");
199             return (Criteria) this;
200         }
201 
202         public Criteria andAutomobileGreaterThanOrEqualTo(String value) {
203             addCriterion("automobile >=", value, "automobile");
204             return (Criteria) this;
205         }
206 
207         public Criteria andAutomobileLessThan(String value) {
208             addCriterion("automobile <", value, "automobile");
209             return (Criteria) this;
210         }
211 
212         public Criteria andAutomobileLessThanOrEqualTo(String value) {
213             addCriterion("automobile <=", value, "automobile");
214             return (Criteria) this;
215         }
216 
217         public Criteria andAutomobileLike(String value) {
218             addCriterion("automobile like", value, "automobile");
219             return (Criteria) this;
220         }
221 
222         public Criteria andAutomobileNotLike(String value) {
223             addCriterion("automobile not like", value, "automobile");
224             return (Criteria) this;
225         }
226 
227         public Criteria andAutomobileIn(List<String> values) {
228             addCriterion("automobile in", values, "automobile");
229             return (Criteria) this;
230         }
231 
232         public Criteria andAutomobileNotIn(List<String> values) {
233             addCriterion("automobile not in", values, "automobile");
234             return (Criteria) this;
235         }
236 
237         public Criteria andAutomobileBetween(String value1, String value2) {
238             addCriterion("automobile between", value1, value2, "automobile");
239             return (Criteria) this;
240         }
241 
242         public Criteria andAutomobileNotBetween(String value1, String value2) {
243             addCriterion("automobile not between", value1, value2, "automobile");
244             return (Criteria) this;
245         }
246 
247         public Criteria andRegionIsNull() {
248             addCriterion("region is null");
249             return (Criteria) this;
250         }
251 
252         public Criteria andRegionIsNotNull() {
253             addCriterion("region is not null");
254             return (Criteria) this;
255         }
256 
257         public Criteria andRegionEqualTo(String value) {
258             addCriterion("region =", value, "region");
259             return (Criteria) this;
260         }
261 
262         public Criteria andRegionNotEqualTo(String value) {
263             addCriterion("region <>", value, "region");
264             return (Criteria) this;
265         }
266 
267         public Criteria andRegionGreaterThan(String value) {
268             addCriterion("region >", value, "region");
269             return (Criteria) this;
270         }
271 
272         public Criteria andRegionGreaterThanOrEqualTo(String value) {
273             addCriterion("region >=", value, "region");
274             return (Criteria) this;
275         }
276 
277         public Criteria andRegionLessThan(String value) {
278             addCriterion("region <", value, "region");
279             return (Criteria) this;
280         }
281 
282         public Criteria andRegionLessThanOrEqualTo(String value) {
283             addCriterion("region <=", value, "region");
284             return (Criteria) this;
285         }
286 
287         public Criteria andRegionLike(String value) {
288             addCriterion("region like", value, "region");
289             return (Criteria) this;
290         }
291 
292         public Criteria andRegionNotLike(String value) {
293             addCriterion("region not like", value, "region");
294             return (Criteria) this;
295         }
296 
297         public Criteria andRegionIn(List<String> values) {
298             addCriterion("region in", values, "region");
299             return (Criteria) this;
300         }
301 
302         public Criteria andRegionNotIn(List<String> values) {
303             addCriterion("region not in", values, "region");
304             return (Criteria) this;
305         }
306 
307         public Criteria andRegionBetween(String value1, String value2) {
308             addCriterion("region between", value1, value2, "region");
309             return (Criteria) this;
310         }
311 
312         public Criteria andRegionNotBetween(String value1, String value2) {
313             addCriterion("region not between", value1, value2, "region");
314             return (Criteria) this;
315         }
316 
317         public Criteria andRouteIsNull() {
318             addCriterion("Route is null");
319             return (Criteria) this;
320         }
321 
322         public Criteria andRouteIsNotNull() {
323             addCriterion("Route is not null");
324             return (Criteria) this;
325         }
326 
327         public Criteria andRouteEqualTo(String value) {
328             addCriterion("Route =", value, "route");
329             return (Criteria) this;
330         }
331 
332         public Criteria andRouteNotEqualTo(String value) {
333             addCriterion("Route <>", value, "route");
334             return (Criteria) this;
335         }
336 
337         public Criteria andRouteGreaterThan(String value) {
338             addCriterion("Route >", value, "route");
339             return (Criteria) this;
340         }
341 
342         public Criteria andRouteGreaterThanOrEqualTo(String value) {
343             addCriterion("Route >=", value, "route");
344             return (Criteria) this;
345         }
346 
347         public Criteria andRouteLessThan(String value) {
348             addCriterion("Route <", value, "route");
349             return (Criteria) this;
350         }
351 
352         public Criteria andRouteLessThanOrEqualTo(String value) {
353             addCriterion("Route <=", value, "route");
354             return (Criteria) this;
355         }
356 
357         public Criteria andRouteLike(String value) {
358             addCriterion("Route like", value, "route");
359             return (Criteria) this;
360         }
361 
362         public Criteria andRouteNotLike(String value) {
363             addCriterion("Route not like", value, "route");
364             return (Criteria) this;
365         }
366 
367         public Criteria andRouteIn(List<String> values) {
368             addCriterion("Route in", values, "route");
369             return (Criteria) this;
370         }
371 
372         public Criteria andRouteNotIn(List<String> values) {
373             addCriterion("Route not in", values, "route");
374             return (Criteria) this;
375         }
376 
377         public Criteria andRouteBetween(String value1, String value2) {
378             addCriterion("Route between", value1, value2, "route");
379             return (Criteria) this;
380         }
381 
382         public Criteria andRouteNotBetween(String value1, String value2) {
383             addCriterion("Route not between", value1, value2, "route");
384             return (Criteria) this;
385         }
386 
387         public Criteria andTicketIsNull() {
388             addCriterion("Ticket is null");
389             return (Criteria) this;
390         }
391 
392         public Criteria andTicketIsNotNull() {
393             addCriterion("Ticket is not null");
394             return (Criteria) this;
395         }
396 
397         public Criteria andTicketEqualTo(Double value) {
398             addCriterion("Ticket =", value, "ticket");
399             return (Criteria) this;
400         }
401 
402         public Criteria andTicketNotEqualTo(Double value) {
403             addCriterion("Ticket <>", value, "ticket");
404             return (Criteria) this;
405         }
406 
407         public Criteria andTicketGreaterThan(Double value) {
408             addCriterion("Ticket >", value, "ticket");
409             return (Criteria) this;
410         }
411 
412         public Criteria andTicketGreaterThanOrEqualTo(Double value) {
413             addCriterion("Ticket >=", value, "ticket");
414             return (Criteria) this;
415         }
416 
417         public Criteria andTicketLessThan(Double value) {
418             addCriterion("Ticket <", value, "ticket");
419             return (Criteria) this;
420         }
421 
422         public Criteria andTicketLessThanOrEqualTo(Double value) {
423             addCriterion("Ticket <=", value, "ticket");
424             return (Criteria) this;
425         }
426 
427         public Criteria andTicketIn(List<Double> values) {
428             addCriterion("Ticket in", values, "ticket");
429             return (Criteria) this;
430         }
431 
432         public Criteria andTicketNotIn(List<Double> values) {
433             addCriterion("Ticket not in", values, "ticket");
434             return (Criteria) this;
435         }
436 
437         public Criteria andTicketBetween(Double value1, Double value2) {
438             addCriterion("Ticket between", value1, value2, "ticket");
439             return (Criteria) this;
440         }
441 
442         public Criteria andTicketNotBetween(Double value1, Double value2) {
443             addCriterion("Ticket not between", value1, value2, "ticket");
444             return (Criteria) this;
445         }
446     }
447 
448     public static class Criteria extends GeneratedCriteria {
449 
450         protected Criteria() {
451             super();
452         }
453     }
454 
455     public static class Criterion {
456         private String condition;
457 
458         private Object value;
459 
460         private Object secondValue;
461 
462         private boolean noValue;
463 
464         private boolean singleValue;
465 
466         private boolean betweenValue;
467 
468         private boolean listValue;
469 
470         private String typeHandler;
471 
472         public String getCondition() {
473             return condition;
474         }
475 
476         public Object getValue() {
477             return value;
478         }
479 
480         public Object getSecondValue() {
481             return secondValue;
482         }
483 
484         public boolean isNoValue() {
485             return noValue;
486         }
487 
488         public boolean isSingleValue() {
489             return singleValue;
490         }
491 
492         public boolean isBetweenValue() {
493             return betweenValue;
494         }
495 
496         public boolean isListValue() {
497             return listValue;
498         }
499 
500         public String getTypeHandler() {
501             return typeHandler;
502         }
503 
504         protected Criterion(String condition) {
505             super();
506             this.condition = condition;
507             this.typeHandler = null;
508             this.noValue = true;
509         }
510 
511         protected Criterion(String condition, Object value, String typeHandler) {
512             super();
513             this.condition = condition;
514             this.value = value;
515             this.typeHandler = typeHandler;
516             if (value instanceof List<?>) {
517                 this.listValue = true;
518             } else {
519                 this.singleValue = true;
520             }
521         }
522 
523         protected Criterion(String condition, Object value) {
524             this(condition, value, null);
525         }
526 
527         protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
528             super();
529             this.condition = condition;
530             this.value = value;
531             this.secondValue = secondValue;
532             this.typeHandler = typeHandler;
533             this.betweenValue = true;
534         }
535 
536         protected Criterion(String condition, Object value, Object secondValue) {
537             this(condition, value, secondValue, null);
538         }
539     }
540 }
实体映射
 1 package com.charmyin.cmstudio.njfu.transit.persistence;
 2 
 3 import com.charmyin.cmstudio.basic.initial.SQLMapper;
 4 import com.charmyin.cmstudio.njfu.transit.vo.Transit;
 5 import com.charmyin.cmstudio.njfu.transit.vo.TransitExample;
 6 import java.util.List;
 7 @SQLMapper
 8 public interface TransitMapper {
 9     int deleteByPrimaryKey(String id);
10 
11     int insert(Transit record);
12 
13     int insertSelective(Transit record);
14 
15     List<Transit> selectByExample(TransitExample example);
16 
17     Transit selectByPrimaryKey(String id);
18 
19     int updateByPrimaryKeySelective(Transit record);
20 
21     int updateByPrimaryKey(Transit record);
22     
23     List<Transit> findAll(Transit transit);
24 }
.
  1 <?xml version="1.0" encoding="UTF-8" ?>
  2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 <mapper namespace="com.charmyin.cmstudio.njfu.transit.persistence.TransitMapper" >
  4   <resultMap id="BaseResultMap" type="com.charmyin.cmstudio.njfu.transit.vo.Transit" >
  5     <id column="id" property="id" jdbcType="VARCHAR" />
  6     <result column="automobile" property="automobile" jdbcType="VARCHAR" />
  7     <result column="region" property="region" jdbcType="VARCHAR" />
  8     <result column="Route" property="route" jdbcType="VARCHAR" />
  9     <result column="Ticket" property="ticket" jdbcType="DOUBLE" />
 10   </resultMap>
 11   <sql id="Example_Where_Clause" >
 12     <where >
 13       <foreach collection="oredCriteria" item="criteria" separator="or" >
 14         <if test="criteria.valid" >
 15           <trim prefix="(" suffix=")" prefixOverrides="and" >
 16             <foreach collection="criteria.criteria" item="criterion" >
 17               <choose >
 18                 <when test="criterion.noValue" >
 19                   and ${criterion.condition}
 20                 </when>
 21                 <when test="criterion.singleValue" >
 22                   and ${criterion.condition} #{criterion.value}
 23                 </when>
 24                 <when test="criterion.betweenValue" >
 25                   and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
 26                 </when>
 27                 <when test="criterion.listValue" >
 28                   and ${criterion.condition}
 29                   <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
 30                     #{listItem}
 31                   </foreach>
 32                 </when>
 33               </choose>
 34             </foreach>
 35           </trim>
 36         </if>
 37       </foreach>
 38     </where>
 39   </sql>
 40   <sql id="Base_Column_List" >
 41     id, automobile, region, Route, Ticket
 42   </sql>
 43   
 44   <select id="findAll" resultMap="BaseResultMap" parameterType="com.charmyin.cmstudio.njfu.transit.vo.Transit" >
 45     select
 46     <include refid="Base_Column_List" />
 47     from transit
 48   </select>
 49   
 50   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.charmyin.cmstudio.njfu.transit.vo.TransitExample" >
 51     select
 52     <if test="distinct" >
 53       distinct
 54     </if>
 55     'false' as QUERYID,
 56     <include refid="Base_Column_List" />
 57     from transit
 58     <if test="_parameter != null" >
 59       <include refid="Example_Where_Clause" />
 60     </if>
 61     <if test="orderByClause != null" >
 62       order by ${orderByClause}
 63     </if>
 64   </select>
 65   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
 66     select 
 67     <include refid="Base_Column_List" />
 68     from transit
 69     where id = #{id,jdbcType=VARCHAR}
 70   </select>
 71   <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
 72     delete from transit
 73     where id = #{id,jdbcType=VARCHAR}
 74   </delete>
 75   <insert id="insert" parameterType="com.charmyin.cmstudio.njfu.transit.vo.Transit" >
 76     insert into transit (id, automobile, region, 
 77       Route, Ticket)
 78     values (#{id,jdbcType=VARCHAR}, #{automobile,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}, 
 79       #{route,jdbcType=VARCHAR}, #{ticket,jdbcType=DOUBLE})
 80   </insert>
 81   <insert id="insertSelective" parameterType="com.charmyin.cmstudio.njfu.transit.vo.Transit" >
 82     insert into transit
 83     <trim prefix="(" suffix=")" suffixOverrides="," >
 84       <if test="id != null" >
 85         id,
 86       </if>
 87       <if test="automobile != null" >
 88         automobile,
 89       </if>
 90       <if test="region != null" >
 91         region,
 92       </if>
 93       <if test="route != null" >
 94         Route,
 95       </if>
 96       <if test="ticket != null" >
 97         Ticket,
 98       </if>
 99     </trim>
100     <trim prefix="values (" suffix=")" suffixOverrides="," >
101       <if test="id != null" >
102         #{id,jdbcType=VARCHAR},
103       </if>
104       <if test="automobile != null" >
105         #{automobile,jdbcType=VARCHAR},
106       </if>
107       <if test="region != null" >
108         #{region,jdbcType=VARCHAR},
109       </if>
110       <if test="route != null" >
111         #{route,jdbcType=VARCHAR},
112       </if>
113       <if test="ticket != null" >
114         #{ticket,jdbcType=DOUBLE},
115       </if>
116     </trim>
117   </insert>
118   <update id="updateByPrimaryKeySelective" parameterType="com.charmyin.cmstudio.njfu.transit.vo.Transit" >
119     update transit
120     <set >
121       <if test="automobile != null" >
122         automobile = #{automobile,jdbcType=VARCHAR},
123       </if>
124       <if test="region != null" >
125         region = #{region,jdbcType=VARCHAR},
126       </if>
127       <if test="route != null" >
128         Route = #{route,jdbcType=VARCHAR},
129       </if>
130       <if test="ticket != null" >
131         Ticket = #{ticket,jdbcType=DOUBLE},
132       </if>
133     </set>
134     where id = #{id,jdbcType=VARCHAR}
135   </update>
136   <update id="updateByPrimaryKey" parameterType="com.charmyin.cmstudio.njfu.transit.vo.Transit" >
137     update transit
138     set automobile = #{automobile,jdbcType=VARCHAR},
139       region = #{region,jdbcType=VARCHAR},
140       Route = #{route,jdbcType=VARCHAR},
141       Ticket = #{ticket,jdbcType=DOUBLE}
142     where id = #{id,jdbcType=VARCHAR}
143   </update>
144 </mapper>
View Code
 1 <%@ page language="java" contentType="text/html; charset=utf-8"
 2     pageEncoding="utf-8"%>
 3 <%@ taglib uri="/WEB-INF/tlds/cmstudio.tld" prefix="cmstudio"%>
 4 
 5 <!DOCTYPE html>
 6 <html>
 7 <head>
 8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 9 <title>${application_name_cn}</title>
10 
11 
12 <cmstudio:htmlBase />
13 
14 <!--Start importing the jquery files -->
15 <cmstudio:importJsCss name="jquery" version="${jquery_version}" />
16 <!--End import the jquery files -->
17 <!--Start importing the jeasyui files -->
18 <cmstudio:importJsCss name="jeasyui" version="${jeasyui_version}" />
19 </head>
20 <body>
21     <table id="dg" title="Faq" class="easyui-datagrid"
22         url="transit/findAll" pagination="true" rownumbers="true"
23         singleSelect="false" toolbar="#tb">
24         <thead>
25             <tr>
26                 <th data-options="field:'ck',checkbox:true">
27                 <th data-options="field:'id', hidden:true">id</th>
28                 <th data-options="field:'automobile'">automobile</th>
29                 <th data-options="field:'region'">region</th>
30                 <th data-options="field:'Route'">Route</th>
31                 <th data-options="field:'Ticket'">Ticket</th>
32             </tr>
33         </thead>
34     </table>
35     <div id="tb">
36         <a href="javascript:void(0)" class="easyui-linkbutton"
37             iconCls="icon-remove" plain="true" onclick="destroyFrom()">删除</a> 
38     </div>
39 </body>
40 
41 
42 <script type="text/javascript">
43         function destroyFrom() {
44             var rows = $('#dg').datagrid('getSelections');
45             var ids = "";
46             if (rows) {
47                 for (var i = 0; i < rows.length; i++) {
48                     if (i == 0) {
49                         ids += rows[i].id;
50                         continue;
51                     }
52                     ids += "," + rows[i].id
53                 }
54                 $.messager.confirm('提示', '你确定删除吗?', function(r) {
55                     if (r) {
56                         $.post('transit/delete', {
57                             id : ids
58                         }, function(result) {
59                             if (result = "true") {
60                                  $.messager.show({
61                                         title: '提示',
62                                         msg: "删除成功"
63                                     });
64                                 $('#dlg').dialog('close'); // close the 
65                                 $('#dg').datagrid('uncheckAll');
66                                 $('#dg').datagrid('reload');
67                             }
68                         });
69                     }
70                 });
71             }
72         }
73             
74     </script>
75 <style type="text/css">
76 #fm {
77     margin: 0;
78     padding: 10px 30px;
79 }
80 
81 
82 .fitem {
83     margin-bottom: 5px;
84 }
85 
86 .fitem label {
87     display: inline-block;
88     width: 120px;
89 }
90 </style>
91 </body>
92 </html>
jsp
cocoyoona的主页 cocoyoona | 初学一级 | 园豆:20
提问于:2016-05-26 09:59
< >
分享
最佳答案
2

1、别的不说,第一,你能不能看看HTML源代码里面那几列有没有内容?如果没有,你再看看JSP哪里错了。

2、如果有,那就是CSS之类的在搞鬼,不过看起来不像。

收获园豆:10
爱编程的大叔 | 高人七级 |园豆:30844 | 2016-05-26 10:03

   不是css,大叔,是我在mysql中设置的名字是大写了,然后上图我框框里圈起来的地方倒数两个也是大写,这里的问题,谢谢你啦

cocoyoona | 园豆:20 (初学一级) | 2016-05-26 10:30

@眉间剪水泛千愁: 辛苦费都没有,下次不进来了

laugher_ccc | 园豆:593 (小虾三级) | 2016-05-26 10:32

@laugher_ccc: 关门,放大黑

cocoyoona | 园豆:20 (初学一级) | 2016-05-26 19:37
其他回答(2)
0

wo shi lai 观摩的。

二十二号同学 | 园豆:790 (小虾三级) | 2016-05-26 10:01
0

大小写的问题?

laugher_ccc | 园豆:593 (小虾三级) | 2016-05-26 10:30
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册