package com.farriver.bwf.web.controller.admin.vip; import com.farriver.bwf.common.model.ApiData; import com.farriver.bwf.common.model.ApiPageData; import com.farriver.bwf.common.statics.LangConstants; import com.farriver.bwf.data.transferobject.queryobject.vip.VIPMasterWalletQueryObject; import com.farriver.bwf.data.transferobject.viewmodel.vip.VIPMasterWalletViewModel; import com.farriver.bwf.service.vip.VIPMasterWalletService; import com.farriver.bwf.web.controller.admin.AdminControllerBase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.*; import jakarta.annotation.Resource; @RestController @RequestMapping("/api/admin/vip/master/wallet") public class VIPMasterWalletController extends AdminControllerBase { private static final Logger logger = LoggerFactory.getLogger(VIPMasterWalletController.class); @Resource VIPMasterWalletService service; @PostMapping("/create") public ApiData Create(@RequestBody VIPMasterWalletViewModel model) { if (model == null) { return ApiData.error(LangConstants.MSG_ERROR_PARAMETERS); } return service.Create(model); } @PostMapping("/list") public ApiPageData GetList(@RequestBody VIPMasterWalletQueryObject queryObject) { if (queryObject == null) { return ApiPageData.error(LangConstants.MSG_ERROR_PARAMETERS); } return service.GetViewPageList(queryObject); } @GetMapping("/detail") public VIPMasterWalletViewModel GetDetail(@RequestParam(defaultValue = "") String masterid) { if (masterid == null || masterid.isEmpty()) return null; return service.GetViewDetail(masterid); } @GetMapping("/delete") public ApiData Delete(@RequestParam(defaultValue = "") String id) { if (id == null || id.isEmpty()) return ApiData.error(LangConstants.MSG_ERROR_PARAMETERS); return service.Delete(id); } @PostMapping("/update") public ApiData Update(@RequestBody VIPMasterWalletViewModel model) { if (model == null) { return ApiData.error(LangConstants.MSG_ERROR_PARAMETERS); } return service.Update(model); } }