|
|
@@ -3,10 +3,13 @@ package com.zhongzheng.controller.common;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.zhongzheng.common.annotation.Log;
|
|
|
import com.zhongzheng.common.core.controller.BaseController;
|
|
|
import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
import com.zhongzheng.common.core.redis.RedisCache;
|
|
|
+import com.zhongzheng.common.enums.BusinessType;
|
|
|
+import com.zhongzheng.common.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.common.utils.ToolsUtils;
|
|
|
@@ -32,6 +35,8 @@ import com.zhongzheng.modules.goods.vo.GoodsSpecTemplateVo;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsUserVo;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
import com.zhongzheng.modules.order.domain.Printer;
|
|
|
+import com.zhongzheng.modules.sdk.bo.TopNuoMplatformLogAddBo;
|
|
|
+import com.zhongzheng.modules.sdk.service.ITopNuoMplatformLogService;
|
|
|
import com.zhongzheng.modules.sdk.service.NuonuoService;
|
|
|
import com.zhongzheng.modules.system.bo.SysTenantQueryBo;
|
|
|
import com.zhongzheng.modules.system.service.ISysConfigService;
|
|
|
@@ -44,6 +49,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.text.ParseException;
|
|
|
@@ -63,12 +69,21 @@ import java.util.Map;
|
|
|
@RequestMapping("/sys/common/")
|
|
|
public class CommonController extends BaseController {
|
|
|
|
|
|
- private final NuonuoService nuonuoService;
|
|
|
|
|
|
+ private final ITopNuoMplatformLogService iTopNuoMplatformLogService;
|
|
|
|
|
|
- @ApiOperation("获取nuonuo信息")
|
|
|
- @GetMapping("/nuonuo/token")
|
|
|
- public AjaxResult<Void> getNuo() {
|
|
|
- return AjaxResult.success(nuonuoService.getAccessToken());
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增诺税通开单记录
|
|
|
+ */
|
|
|
+ @ApiOperation("新增诺税通开单记录")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:log:add')")
|
|
|
+ @Log(title = "诺税通开单记录", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping("/openMplatform/log")
|
|
|
+ public AjaxResult<Map<String, String>> add(@RequestBody TopNuoMplatformLogAddBo bo) {
|
|
|
+ if(!ToolsUtils.checkSignFromOldSys(bo.getStamp().toString(),bo.getSign())){
|
|
|
+ throw new CustomException("签名错误");
|
|
|
+ }
|
|
|
+ return AjaxResult.success(iTopNuoMplatformLogService.insertByAddBo(bo));
|
|
|
}
|
|
|
}
|