List getOrderByUid(Integer uid);
List getByOid(Integer oid);
select * from store.t_order where uid = #{uid}
2.serviece层
@Override
public List getOrderByUid(Integer uid) {
List order = listMapper.getOrderByUid(uid);
return order;
}
@Override
public List getByOid(Integer oid) {
List list = listMapper.getByOid(oid);
return list;
3.Controller层
@RequestMapping("/showOids")
public JsonResult> getByUid(HttpSession session){
List data = orderEntityService.getOrderByUid(getUidFromSession(session));
return new JsonResult<>(OK,data);
}
@RequestMapping("/{oid}/get_by_oid")
public JsonResult> getByOid(@PathVariable("oid") Integer oid){
List data = orderEntityService.getByOid(oid);
return new JsonResult<>(OK,data);
}