package com.ld.igds.view;
|
|
import com.bstek.dorado.annotation.DataProvider;
|
import com.bstek.dorado.annotation.DataResolver;
|
import com.bstek.dorado.annotation.Expose;
|
import com.bstek.dorado.data.provider.Page;
|
import com.ld.igds.models.FoodBrand;
|
import com.ld.igds.models.FoodInfo;
|
import com.ld.igds.view.service.HFoodService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
import java.util.Map;
|
|
@Component
|
public class FoodPR {
|
|
@Autowired
|
private HFoodService foodService;
|
|
/**
|
* foodPR#pageFoodBrand
|
*
|
* @param page
|
* @param param
|
* @throws Exception
|
*/
|
@DataProvider
|
public void pageFoodBrand(Page<FoodBrand> page, Map<String, Object> param)
|
throws Exception {
|
foodService.pageFoodBrand(page, param);
|
}
|
|
/**
|
* foodPR#delFoodBrand
|
*
|
* @param data
|
* @throws Exception
|
*/
|
@Expose
|
public String delFoodBrand(FoodBrand data) throws Exception {
|
return foodService.delFoodBrand(data);
|
}
|
|
/**
|
* foodPR#saveFoodBrand 新增或者修改
|
*
|
* @param data
|
* @throws Exception
|
*/
|
@DataResolver
|
public String saveFoodBrand(FoodBrand data) throws Exception {
|
foodService.saveFoodBrand(data);
|
return "";
|
}
|
|
/**
|
* foodPR#pageFoodInfo
|
*
|
* @param page
|
* @param param
|
* @throws Exception
|
*/
|
@DataProvider
|
public void pageFoodInfo(Page<FoodInfo> page, Map<String, Object> param)
|
throws Exception {
|
foodService.pageFoodInfo(page, param);
|
}
|
|
/**
|
* foodPR#delFoodInfo
|
*
|
* @param data
|
* @throws Exception
|
*/
|
@Expose
|
public String delFoodInfo(FoodInfo data) throws Exception {
|
return foodService.delFoodInfo(data);
|
}
|
|
/**
|
* foodPR#saveFoodInfo 新增或者修改
|
*
|
* @param data
|
* @throws Exception
|
*/
|
@DataResolver
|
public String saveFoodInfo(FoodInfo data) throws Exception {
|
foodService.saveFoodInfo(data);
|
return "";
|
}
|
}
|