| | |
| | | import cc.mrbird.febs.mall.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.mall.service.ICommonService; |
| | | import cc.mrbird.febs.mall.service.IMallCountryDeliveryService; |
| | | import cc.mrbird.febs.mall.service.ISystemService; |
| | | import cc.mrbird.febs.pay.model.HeaderDto; |
| | | import cc.mrbird.febs.pay.service.WxFaPiaoService; |
| | |
| | | import org.apache.commons.httpclient.methods.StringRequestEntity; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | private final ICommonService commonService; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | private final WxFaPiaoService wxFaPiaoService; |
| | | private final IMallCountryDeliveryService countryDeliveryService; |
| | | |
| | | @PostMapping(value = "/bonusSystemSetting") |
| | | public FebsResponse bonusSystemSetting(@RequestBody Map<String, Object> map) { |
| | |
| | | } |
| | | commonService.addDataDic("TOKENVIEW_CONFIG", "WEBHOOK_SECRET", dto.getWebhookSecret(), "Tokenview Webhook签名密钥", false); |
| | | commonService.addDataDic("TOKENVIEW_CONFIG", "TRC20_USDT_ADDRESS", dto.getTrc20UsdtAddress(), "TRC20 USDT收款地址", false); |
| | | commonService.addDataDic("SALES_SERVICE", "TRC_ADDRESS", dto.getTrc20UsdtAddress(), "TRC20 USDT收款地址", false); |
| | | return new FebsResponse().success().message("保存成功"); |
| | | } |
| | | |
| | | @PostMapping(value = "/salesService") |
| | | @ControllerEndpoint(operation = "保存售后服务配置") |
| | | public FebsResponse salesService(SalesServiceDto dto) { |
| | | if (StrUtil.isBlank(dto.getWhatsApp())) { |
| | | return new FebsResponse().fail().message("WhatsApp不能为空"); |
| | | } |
| | | if (StrUtil.isBlank(dto.getPhone())) { |
| | | return new FebsResponse().fail().message("联系电话不能为空"); |
| | | } |
| | | if (StrUtil.isBlank(dto.getEmail())) { |
| | | return new FebsResponse().fail().message("联系邮箱不能为空"); |
| | | } |
| | | if (StrUtil.isBlank(dto.getAddress())) { |
| | | return new FebsResponse().fail().message("联系地址不能为空"); |
| | | } |
| | | if (StrUtil.isBlank(dto.getWorkingHours())) { |
| | | return new FebsResponse().fail().message("工作时间不能为空"); |
| | | } |
| | | commonService.addDataDic("SALES_SERVICE", "WHATSAPP", dto.getWhatsApp(), "WhatsApp号码", false); |
| | | commonService.addDataDic("SALES_SERVICE", "PHONE", dto.getPhone(), "联系电话", false); |
| | | commonService.addDataDic("SALES_SERVICE", "EMAIL", dto.getEmail(), "联系邮箱", false); |
| | | commonService.addDataDic("SALES_SERVICE", "ADDRESS", dto.getAddress(), "联系地址", false); |
| | | commonService.addDataDic("SALES_SERVICE", "WORKINGHOURS", dto.getWorkingHours(), "工作时间", false); |
| | | return new FebsResponse().success().message("保存成功"); |
| | | } |
| | | |
| | | @GetMapping(value = "/countryDeliveryList") |
| | | public FebsResponse countryDeliveryList() { |
| | | return countryDeliveryService.list(); |
| | | } |
| | | |
| | | @PostMapping(value = "/countryDeliverySave") |
| | | @ControllerEndpoint(operation = "保存国家运费配置") |
| | | public FebsResponse countryDeliverySave(@Validated CountryDeliveryDto dto) { |
| | | return countryDeliveryService.saveOrUpdate(dto); |
| | | } |
| | | |
| | | @GetMapping(value = "/countryDeliveryDelete/{id}") |
| | | @ControllerEndpoint(operation = "删除国家运费配置") |
| | | public FebsResponse countryDeliveryDelete(@PathVariable Long id) { |
| | | return countryDeliveryService.delete(id); |
| | | } |
| | | |
| | | @PostMapping(value = "/agentAmountSetSetting") |
| | | public FebsResponse agentAmountSetSetting(AdminAgentAmountDto adminAgentAmountDto) { |
| | | DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |