|
|
@@ -14,6 +14,9 @@ import com.fs.common.exception.file.OssException;
|
|
|
import com.fs.company.service.ICompanyMoneyLogsService;
|
|
|
import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.company.service.ICompanyUserService;
|
|
|
+import com.fs.course.config.CourseConfig;
|
|
|
+import com.fs.course.domain.FsCoursePlaySourceConfig;
|
|
|
+import com.fs.course.service.IFsCoursePlaySourceConfigService;
|
|
|
import com.fs.erp.service.IErpGoodsService;
|
|
|
import com.fs.erp.service.IErpOrderService;
|
|
|
import com.fs.erp.service.IErpShopService;
|
|
|
@@ -141,6 +144,9 @@ public class CommonScrmController extends AppBaseController {
|
|
|
@Autowired
|
|
|
IFsStorePaymentScrmService paymentService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
|
|
|
+
|
|
|
@ApiOperation("支付手动通知")
|
|
|
@GetMapping("payNotify")
|
|
|
public R payNotify(String payCode) throws Exception {
|
|
|
@@ -413,8 +419,34 @@ public class CommonScrmController extends AppBaseController {
|
|
|
|
|
|
@GetMapping(value = "/getConfigByKey")
|
|
|
@ApiOperation("获取配置")
|
|
|
- public R getConfigByKey(@RequestParam(value = "key", required = false) String key) {
|
|
|
+ public R getConfigByKey(
|
|
|
+ @RequestParam(value = "key", required = false) String key,
|
|
|
+ @ApiParam(value = "小程序appId,用于获取自定义授权配置") @RequestParam(value = "appId", required = false) String appId) {
|
|
|
+
|
|
|
String config = configService.selectConfigByKey(key);
|
|
|
+
|
|
|
+ if ("course.config".equals(key) && appId != null && !appId.trim().isEmpty()) {
|
|
|
+ FsCoursePlaySourceConfig playSourceConfig = fsCoursePlaySourceConfigService.selectCoursePlaySourceConfigByAppId(appId);
|
|
|
+
|
|
|
+ if (playSourceConfig != null
|
|
|
+ && playSourceConfig.getCustomAuthEnabled() != null
|
|
|
+ && playSourceConfig.getCustomAuthEnabled() == 1) {
|
|
|
+ JSONObject result;
|
|
|
+ if (config != null && !config.trim().isEmpty()) {
|
|
|
+ try {
|
|
|
+ result = JSONObject.parseObject(config);
|
|
|
+ } catch (Exception e) {
|
|
|
+ result = new JSONObject();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ result = new JSONObject();
|
|
|
+ }
|
|
|
+ result.put("miniAppAuthType", playSourceConfig.getMiniAppAuthType());
|
|
|
+ result.put("userCourseAuthDomain", playSourceConfig.getUserCourseAuthDomain());
|
|
|
+ return R.ok().put("data", result.toJSONString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return R.ok().put("data", config);
|
|
|
|
|
|
}
|