Ver código fonte

Merge branch 'feature/0721-tenant'

yuanliang 1 ano atrás
pai
commit
40021dae70

+ 5 - 0
cooleshow-common/src/main/java/com/yonge/cooleshow/common/constant/SysConfigConstant.java

@@ -365,6 +365,11 @@ public interface SysConfigConstant {
     String CUSTOMER_SERVICE_PHONE = "customer_service_phone";
 
     /**
+     * 客服邮箱
+     */
+    String CUSTOMER_SERVICE_EMAIL = "customer_service_email";
+
+    /**
      * 机构人员解绑申请超时时间,天
      */
     String TENANT_USER_UNBIND_EXPIRE_TIME = "tenant_user_unbind_expire_time";

+ 16 - 0
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/open/OpenSysConfigController.java

@@ -7,11 +7,16 @@ import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
 /**
  * 系统配置控制层
  */
@@ -30,4 +35,15 @@ public class OpenSysConfigController extends BaseController {
         return succeed(sysConfig.getParamValue());
     }
 
+    @ApiOperation(value = "查询客服联系方式,电话和邮箱")
+    @GetMapping(value = "/queryCustomerService")
+    public HttpResponseResult<Map<String, String>> queryCustomerService() {
+        SysConfig email = sysConfigService.findByParamName(SysConfigConstant.CUSTOMER_SERVICE_EMAIL);
+        SysConfig phone = sysConfigService.findByParamName(SysConfigConstant.CUSTOMER_SERVICE_PHONE);
+        Map<String, String> result = new HashMap<>();
+        result.put("email", email == null ? "" : email.getParamValue());
+        result.put("phone", phone == null ? "" : phone.getParamValue());
+        return succeed(result);
+    }
+
 }