【正文】
} Override public ListTShowluck getShowluckList() { // TODO Autogenerated method stub return ()。 //獲取倒計時揭曉總數(shù)量 public Integer getCountdownCount()。gt。 //獲取用戶購買的商品 public ListTOrderdetails getOrderdetailListBy(String sphone)。 (page, page)。 return help/help。 (userPhone, userPhone)。 (userPhone, userPhone)。 if(()0){ (ods, ods)。 (url, )。 (url, )。 String uimg = ().getUimg()。//類型業(yè)務(wù)類 Resource private TPeriodsService tPeriodsService。 } (model)。 if(null==()||==()){ ()。 ().settUser(winner)。 } //用戶獲獎記錄userRaffle頁面 RequestMapping(/{sphone}/userRaffle) public String userRaffle(PathVariable String sphone,Model model,HttpServletRequest request){ TUser winner = (sphone)。 } (model)。 } (model)。 List list = ()。 if(user==null){ return redirect:/view/noLoginReferAuth。 //根據(jù)獲獎用戶ID獲取獲獎用戶 public TUser findUserBy(Integer uid)。 //獲取用戶名獲取用戶購買數(shù)量 public Integer getUserBuyCount(String sphone)。 } public TPeriodsMapper gettPeriodsMapper() { return tPeriodsMapper。 } Override public ListTOrderdetails getNewOrderList() { // TODO Autogenerated method stub return ()。 PageSupport page = new PageSupport()。 //根據(jù)獲獎用戶ID獲取獲獎用戶 public TUser findUserBy(Integer uid)。 }==========================================================================================?xml version= encoding=UTF8?!DOCTYPE mapper PUBLIC // mapper namespace= resultMap type=TShowluck id=showluckMap result property=showid column=showid/ result property=pid column=pid/ result property=title column=title/ result property=content column=content/ result property=status column=status/ result property=lackTime column=lackTime/ association property=tPeriod javaType=TPeriods result property=pid column=pid/ result property=gid column=gid/ result property=luckgNo column=luckgNo/ result property=announceTime column=announceTime/ association property=tGood javaType=TGood result property=gid column=gid/ result property=gname column=gname/ result property=gprice column=gprice/ collection property=pics ofType=TPics result property=picUrl column=picUrl/ result property=isDefault column=isDefault/ /collection /association association property=tOrderdetails javaType=TOrderdetails result property=DelId column=DelId/ result property=buyCount column=buyCount/ result property=buyNumS column=buyNumS/ /association /association association property=tUser javaType=TUser result property=uid column=uid/ result property=trueName column=trueName/ result property=uimg column=uimg/ result property=sphone column=sphone/ /association collection property=pics ofType=TShowpic result property=showPicid column=showPicid/ result property=showid column=showid/ result property=picUrl column=showpicUrl/ result property=picName column=picName/ result property=isDefault column=isDefault/ /collection /resultMap ! 根據(jù)狀態(tài)(status)獲取商品用于顯示曬單 select id=findShowluckList parameterType=TShowluck resultMap=showluckMap select ,content,title,lackTime, showpicUrl,sphone, , from t_showluck s inner join t_periods p on = inner join t_showpic sp on = inner join t_user u on = where =3 and =1 order by lackTime desc limit {currentPageNo},{pageSize} /select ! 根據(jù)狀態(tài)(status)獲取商品用于顯示曬單 select id=getShowluckList parameterType=TShowluck resultMap=showluckMap select ,content,title,lackTime, showpicUrl,sphone, , from t_showluck s inner join t_periods p on = inner join t_showpic sp on = inner join t_user u on = where =3 and =1 order by lackTime desc limit 0,7 /select ! 根據(jù)狀態(tài)(status)獲取用戶曬單數(shù)量 select id=getShowCount parameterType=TShowluck resultType=Integer select count(*) from t_showluck s where =3 /select ! 根據(jù)ID獲取商品曬單詳情 select id=findShowluckBy parameterType=Integer resultMap=showluckMap select ,content,title,lackTime, showpicUrl,sphone, , , , from t_showluck s INNER JOIN t_periods p ON = INNER JOIN t_showpic sp ON = INNER JOIN t_user u ON = INNER JOIN t_good g ON = INNER JOIN t_pics pic ON = INNER JOIN t_orderdetails od ON = where =3 and ={showid} /select resultMap type=TOrderdetails id=ordercountMap result property=DelId column=DelId/ result property=buyCount column=buyCount/ result property=buyNumS column=buyNumS/ result property=paymentTime column=paymentTime/ association property=tOrder javaType=TOrder result property=oid column=oid/ result property=orderStatus column=orderStatus/ association property=tUser javaType=TUser result property=uid column=uid/ result property=trueName column=trueName/ result property=uimg column=uimg/ result property=sphone column=sphone/ /association /association /resultMap ! 根據(jù)電話(sphone)獲取用戶用購買數(shù)量 select id=getUserBuyCount parameterType=String resultMap=ordercountMap select count(*) FROM t_orderdetails od INNER JOIN t_order o ON = INNER JOIN t_user u ON = WHERE sphone={sphone} AND =1 /select resultMap type=TOrderdetails id=orderdetailMap result property=DelId column=DelId/ result property=buyCount column=buyCount/ result property=buyNumS column=buyNumS/ result property=paymentTime column=paymentTime/ association property=tOrder javaType=TOrder result property=oid c