@POST
  @Path("{id}")
  public ExtJSResponse add(@PathParam("id") Long id, BillAnnex billAnnex) {

    billAnnexMapper.insertSelective(billAnnex);
    return ExtJSResponse.successRes();
  }
  @PUT
  @Path("{id}")
  public ExtJSResponse edit(@PathParam("id") Integer id, BillAnnex billAnnex) {

    billAnnexMapper.updateByPrimaryKeySelective(billAnnex);
    return ExtJSResponse.successRes();
  }
  @GET
  public ExtJSResponse find(
      final @QueryParam("billId") Integer billId,
      final @QueryParam("name") String name,
      final @QueryParam("page") String page,
      final @QueryParam("start") String start,
      final @QueryParam("limit") String limit) {
    // 设置查询条件
    BillAnnexExample billAnnexExample = new BillAnnexExample();
    billAnnexExample.createCriteria().andBillIdEqualTo(billId);

    // 查询总数,分页用
    int total = billAnnexMapper.countByExample(billAnnexExample);
    billAnnexExample.setOrderByClause("id desc");
    List<BillAnnex> billAnnexList = billAnnexMapper.selectByExample(billAnnexExample);
    return ExtJSResponse.successRes4Find(billAnnexList, total);
  }
 @DELETE
 @Path("{id}")
 public ExtJSResponse remove(@PathParam("id") Integer id) {
   billAnnexMapper.deleteByPrimaryKey(id);
   return ExtJSResponse.successRes();
 }