|
|
@@ -1,6 +1,7 @@
|
|
|
package com.cyksj.web.controller.manage.statistics;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
@@ -18,6 +19,7 @@ import com.cyksj.mapper.*;
|
|
|
import com.cyksj.mapper.corp.CorpUserAuthMapper;
|
|
|
import com.cyksj.mapper.manage.CustomerServiceEveryMonthDetailMapper;
|
|
|
import com.cyksj.mapper.manage.RealGoodsOrderHandleMapper;
|
|
|
+import com.cyksj.mapper.manage.cms.CmsUserMapper;
|
|
|
import com.cyksj.mapper.manage.statistics.IncrExpiryTimeRecordMapper;
|
|
|
import com.cyksj.mapper.manage.statistics.StatisticsUserDataMapper;
|
|
|
import com.cyksj.mapper.stock.GoodsDonStockRecordMapper;
|
|
|
@@ -88,6 +90,10 @@ public class StatisticsDataController {
|
|
|
|
|
|
private final ChatgptUserMapper chatgptUserMapper;
|
|
|
|
|
|
+ private final CmsUserMapper cmsUserMapper;
|
|
|
+
|
|
|
+ private final HttpServletRequest request;
|
|
|
+
|
|
|
/**
|
|
|
* 查询头部统计数据
|
|
|
*/
|
|
|
@@ -192,6 +198,7 @@ public class StatisticsDataController {
|
|
|
@SaCheckPermission("validAccount:addTime")
|
|
|
@Log(module = "有效子账号管理/增加时长", businessType = BusinessType.PUT, isSaveRequestData = true)
|
|
|
public Result<String> addRenewTime(@RequestBody @Validated RenewTimeUpReq renewTimeUpReq) {
|
|
|
+ long adminId = StpUtil.getLoginIdAsLong();
|
|
|
GroupsRelation relation = groupsRelationMapper.selectById(renewTimeUpReq.getRelationId());
|
|
|
if (relation == null) {
|
|
|
throw BusinessRuntimeException.getInstance("该车票已不存在");
|
|
|
@@ -229,10 +236,20 @@ public class StatisticsDataController {
|
|
|
//记录操作日志
|
|
|
incrExpiryTimeRecord.setUserId(relation.getUserId());
|
|
|
incrExpiryTimeRecord.setRelationId(relation.getId());
|
|
|
+ Optional.ofNullable(cmsUserMapper.selectById(adminId)).ifPresent(admin -> incrExpiryTimeRecord.setOperator(admin.getNickname()));
|
|
|
incrExpiryTimeRecordMapper.insert(incrExpiryTimeRecord);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult("增加车票有效期成功");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 增加时长操作记录
|
|
|
+ */
|
|
|
+ @GetMapping("/get/realtion/time/record")
|
|
|
+ public Result<SearchResult<IncrExpiryTimeRecord>> getRelationTimeRecord() {
|
|
|
+ SearchResult<IncrExpiryTimeRecord> search = beanSearcher.search(IncrExpiryTimeRecord.class, MapUtils.flatBuilder(request.getParameterMap()).build());
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 增加续费操作记录
|
|
|
*/
|