package com.farriver.bwf.web.controller.wechat; 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.VIPDepositActivityQueryObject; import com.farriver.bwf.data.transferobject.viewmodel.vip.*; import com.farriver.bwf.service.vip.*; 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/wechat/vip") public class WeChatVipController extends AdminControllerBase { private static final Logger logger = LoggerFactory.getLogger(WeChatVipController.class); @Resource VIPMasterOrganizationService vipMasterOrganizationService; @Resource VIPMasterService vipMasterService; @Resource VIPDepositActivityService vipDepositActivityService; @Resource VIPMasterWalletService vipMasterWalletService; @Resource VIPMasterPaperRelationService vipMasterPaperRelationService; @PostMapping("/organization/set") public ApiData SetVIPOrganization(@RequestBody VIPMasterOrganizationViewModel model) { if (model == null) { return ApiData.error(LangConstants.MSG_ERROR_PARAMETERS); } return vipMasterOrganizationService.SetVIPOrganization(model); } @GetMapping("/organization/detail") public VIPMasterOrganizationViewModel GetVIPMasterOrganizationDetail(@RequestParam(defaultValue = "") String masterid) { if (masterid == null || masterid.isEmpty()) return null; return vipMasterOrganizationService.GetViewDetailByMasterId(masterid); } @PostMapping("/master/update") public ApiData UpdateVIPMaster(@RequestBody VIPMasterViewModel model) { if (model == null) { return ApiData.error(LangConstants.MSG_ERROR_PARAMETERS); } return vipMasterService.Update(model); } @PostMapping("/deposit/activity/list") public ApiPageData GetVIPDepositActivityList(@RequestBody VIPDepositActivityQueryObject queryObject) { if (queryObject == null) { return ApiPageData.error(LangConstants.MSG_ERROR_PARAMETERS); } return vipDepositActivityService.GetViewPageList(queryObject); } @GetMapping("/master/wallet/detail") public VIPMasterWalletViewModel GetVIPMasterWalletDetail(@RequestParam(defaultValue = "") String masterid) { if (masterid == null || masterid.isEmpty()) return null; return vipMasterWalletService.GetViewDetail(masterid); } @PostMapping("/master/wallet/charge") public ApiData ChargeVIPMasterWalletDetail(@RequestBody VIPMasterWalletChargeViewModel model) { if (model == null) { return ApiData.error(LangConstants.MSG_ERROR_PARAMETERS); } return vipMasterWalletService.Charge(model); } @PostMapping("/master/wallet/recharge") public ApiData RechargeVIPMasterWalletDetail(@RequestBody VIPMasterWalletRechargeViewModel model) { if (model == null) { return ApiData.error(LangConstants.MSG_ERROR_PARAMETERS); } return vipMasterWalletService.Recharge(model); } @GetMapping("/paper/relation/list") public ApiPageData GetVIPPaperRelationList(@RequestParam(defaultValue = "") String masterid) { if (masterid == null || masterid.isEmpty()) return null; return vipMasterPaperRelationService.GetViewPageListByPrimaryKey(masterid); } }