BUGFIX:便利查询
This commit is contained in:
@@ -7,12 +7,15 @@ import com.ai.da.mapper.primary.DesignMapper;
|
||||
import com.ai.da.mapper.primary.TrialOrderMapper;
|
||||
import com.ai.da.mapper.primary.entity.TrialOrder;
|
||||
import com.ai.da.model.dto.UserDesignStatisticDTO;
|
||||
import io.netty.util.internal.StringUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "便利查询")
|
||||
@@ -31,7 +34,7 @@ public class ConvenientInquiryController {
|
||||
@GetMapping("/getTrial")
|
||||
public Response<List<TrialOrder>> getTrial(){
|
||||
Long accountId = UserContext.getUserHolder().getId();
|
||||
if (accountId.equals(31L) || accountId.equals(87L) || accountId.equals(83L)){
|
||||
if (accountId.equals(31L) || accountId.equals(87L) || accountId.equals(83L) || accountId.equals(6L)){
|
||||
List<TrialOrder> trialOrders = trialOrderMapper.selectList(null);
|
||||
return Response.success(trialOrders);
|
||||
}else {
|
||||
@@ -43,7 +46,13 @@ public class ConvenientInquiryController {
|
||||
@GetMapping("/getDesignStatistic")
|
||||
public Response<List<UserDesignStatisticDTO>> getDesignStatistic(@RequestParam String startTime,@RequestParam String endTime){
|
||||
Long accountId = UserContext.getUserHolder().getId();
|
||||
if (accountId.equals(31L) || accountId.equals(87L) || accountId.equals(83L)){
|
||||
if (accountId.equals(31L) || accountId.equals(87L) || accountId.equals(83L) || accountId.equals(6L)){
|
||||
if (StringUtil.isNullOrEmpty(startTime)) startTime = "2024-02-01 00:00:00";
|
||||
if (StringUtil.isNullOrEmpty(endTime)){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||
Date date = new Date();
|
||||
endTime = simpleDateFormat.format(date);
|
||||
}
|
||||
List<UserDesignStatisticDTO> designStatistic = designMapper.getDesignStatistic(startTime, endTime);
|
||||
return Response.success(designStatistic);
|
||||
}else {
|
||||
|
||||
@@ -7,11 +7,25 @@ public class UserDesignStatisticDTO {
|
||||
|
||||
private Long accountId;
|
||||
|
||||
private Long useDesignTimes;
|
||||
private Long designTimes;
|
||||
|
||||
private String userEmail;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String isTrial;
|
||||
|
||||
private String trialOrderId;
|
||||
|
||||
private String title;
|
||||
|
||||
private String surname;
|
||||
|
||||
private String givenName;
|
||||
|
||||
private String country;
|
||||
|
||||
private String occupation;
|
||||
|
||||
private String createTime;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user