@ -286,8 +286,6 @@ public class RetailAppController {
}
}
@RequestMapping ( value = "/ads/{article_id}" , method = RequestMethod . GET )
@RequestMapping ( value = "/ads/{article_id}" , method = RequestMethod . GET )
public JSONObject getAdDetail ( @PathVariable String article_id , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
public JSONObject getAdDetail ( @PathVariable String article_id , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
device = new JSONObject ( ) ;
device . put ( "client_id" , 9 ) ;
return retailAppService . getAdDetail ( device , article_id ) ;
return retailAppService . getAdDetail ( device , article_id ) ;
}
}
@ -295,32 +293,22 @@ public class RetailAppController {
@RequestMapping ( value = "/bills/{bill_id}" , method = RequestMethod . GET )
@RequestMapping ( value = "/bills/{bill_id}" , method = RequestMethod . GET )
public JSONObject getBill ( @PathVariable ( "bill_id" ) String bill_id , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
public JSONObject getBill ( @PathVariable ( "bill_id" ) String bill_id , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
device = new JSONObject ( ) ;
device . put ( "client_id" , 9 ) ;
return billService . getBillDetail ( bill_id , device . getIntValue ( "client_id" ) ) ;
return billService . getBillDetail ( bill_id , device . getIntValue ( "client_id" ) ) ;
}
}
@RequestMapping ( value = "/bills/list" , method = RequestMethod . GET )
@RequestMapping ( value = "/bills/list" , method = RequestMethod . GET )
public JSONObject getBills ( QueryBillBean queryBillBean , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
public JSONObject getBills ( QueryBillBean queryBillBean , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
device = new JSONObject ( ) ;
device . put ( "client_id" , 9 ) ;
return billService . queryBills ( device . getIntValue ( "client_id" ) , queryBillBean ) ;
return billService . queryBills ( device . getIntValue ( "client_id" ) , queryBillBean ) ;
}
}
@RequestMapping ( value = "/bills" , method = RequestMethod . PUT )
@RequestMapping ( value = "/bills" , method = RequestMethod . PUT )
public void addBill ( @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device , @RequestBody NewBillBean newBillBean ) {
public void addBill ( @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device , @RequestBody NewBillBean newBillBean ) {
device = new JSONObject ( ) ;
device . put ( "client_id" , 9 ) ;
billService . save ( device . getIntValue ( "client_id" ) , newBillBean ) ;
billService . save ( device . getIntValue ( "client_id" ) , newBillBean ) ;
}
}
@RequestMapping ( value = "/bills/{bill_id}/close" , method = RequestMethod . POST )
@RequestMapping ( value = "/bills/{bill_id}/close" , method = RequestMethod . POST )
public void closeBill ( @PathVariable ( "bill_id" ) String bill_id , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
public void closeBill ( @PathVariable ( "bill_id" ) String bill_id , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
device = new JSONObject ( ) ;
device . put ( "client_id" , 9 ) ;
billService . updateBillStatus ( bill_id , "2" , device . getIntValue ( "client_id" ) ) ;
billService . updateBillStatus ( bill_id , "2" , device . getIntValue ( "client_id" ) ) ;
}
}
@RequestMapping ( value = "/bills/orders/{bill_id}" , method = RequestMethod . GET )
@RequestMapping ( value = "/bills/orders/{bill_id}" , method = RequestMethod . GET )
public List < JSONObject > getBillOrders ( @PathVariable ( "bill_id" ) String bill_id , QueryBillOrderBean queryBillOrderBean , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
public List < JSONObject > getBillOrders ( @PathVariable ( "bill_id" ) String bill_id , QueryBillOrderBean queryBillOrderBean , @ModelAttribute ( CommonConsts . RETAIL_DEVICE ) JSONObject device ) {
device = new JSONObject ( ) ;
device . put ( "client_id" , 9 ) ;
return billOrderService . query ( bill_id , device . getIntValue ( "client_id" ) , queryBillOrderBean ) ;
return billOrderService . query ( bill_id , device . getIntValue ( "client_id" ) , queryBillOrderBean ) ;
}
}
}
}