|
|
@@ -0,0 +1,53 @@
|
|
|
+package org.jeecg.modules.api.controller;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
+import org.jeecg.modules.auth.entity.OauthApplication;
|
|
|
+import org.jeecg.modules.auth.service.AuthService;
|
|
|
+import org.jeecg.modules.feign.client.HlwCompanyServiceClient;
|
|
|
+import org.jeecg.modules.feign.client.HlwSubcontractorInvoiceCategoryServiceClient;
|
|
|
+import org.jeecg.modules.util.CryptTool;
|
|
|
+import org.jeecg.modules.util.SecurityUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Author: zwq
|
|
|
+ * @Date: Create in 2020/6/9 9:35
|
|
|
+ * @Description:
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@RequestMapping("/oauth/hlwSubcontractorInvoiceCategory")
|
|
|
+@Api(tags = {"服务商服务内容接口"})
|
|
|
+public class HlwSubcontractorInvoiceCategoryController {
|
|
|
+ @Autowired
|
|
|
+ private HlwSubcontractorInvoiceCategoryServiceClient hlwSubcontractorInvoiceCategoryServiceClient;
|
|
|
+ @Autowired
|
|
|
+ private AuthService authService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 服务商服务内容列表
|
|
|
+ *
|
|
|
+ * @param json
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "服务商服务内容列表")
|
|
|
+ @ApiOperation(value = "服务商服务内容列表", notes = "服务商服务内容列表")
|
|
|
+ @PostMapping(value = "/list")
|
|
|
+ public Result<?> list(@RequestBody String json) {
|
|
|
+ log.info("json========{}", json);
|
|
|
+ //数据解密
|
|
|
+ json = CryptTool.decode(json);
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(json);
|
|
|
+ //获取应用信息
|
|
|
+ OauthApplication oauthApplication = authService.getApplication(SecurityUtils.getClient());
|
|
|
+ jsonObject.put("applicationId", oauthApplication.getApplicationId());
|
|
|
+ Result<?> result = hlwSubcontractorInvoiceCategoryServiceClient.list(jsonObject);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+}
|