|
@ -32,6 +32,7 @@ import com.example.demo.service.coin.AiEmotionService; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
|
import org.apache.xmlbeans.impl.xb.xsdschema.Attribute; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.security.authentication.AuthenticationManager; |
|
|
import org.springframework.security.authentication.AuthenticationManager; |
|
@ -87,6 +88,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception handleExcelExportData(String message) throws Exception { |
|
|
public Exception handleExcelExportData(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "goldDetail", page -> { |
|
|
return exportExcelGeneric(message, "goldDetail", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode GoldDetailNode = requestDataNode.path("goldDetail"); |
|
|
|
|
|
GoldDetail goldDetail = objectMapper.treeToValue(GoldDetailNode, GoldDetail.class); |
|
|
|
|
|
page.setGoldDetail(goldDetail); |
|
|
return goldDetailController.ExcelGoldDetail(page); |
|
|
return goldDetailController.ExcelGoldDetail(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -99,6 +105,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception handleExcel(String message) throws Exception { |
|
|
public Exception handleExcel(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "user", page -> { |
|
|
return exportExcelGeneric(message, "user", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode UserNode = requestDataNode.path("user"); |
|
|
|
|
|
User user = objectMapper.treeToValue(UserNode, User.class); |
|
|
|
|
|
page.setUser(user); |
|
|
return goldDetailController.ExcelGold(page); |
|
|
return goldDetailController.ExcelGold(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -111,6 +122,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception rechargeExcel(String message) throws Exception { |
|
|
public Exception rechargeExcel(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "rechargeUser", page -> { |
|
|
return exportExcelGeneric(message, "rechargeUser", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode rechargeUserNode = requestDataNode.path("rechargeUser"); |
|
|
|
|
|
RechargeUser rechargeUser = objectMapper.treeToValue(rechargeUserNode, RechargeUser.class); |
|
|
|
|
|
page.setRechargeUser(rechargeUser); |
|
|
return rechargeController.selcet(page); |
|
|
return rechargeController.selcet(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -122,6 +138,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception consumeExcel(String message) throws Exception { |
|
|
public Exception consumeExcel(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "consumeUser", page -> { |
|
|
return exportExcelGeneric(message, "consumeUser", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode consumeUserNode = requestDataNode.path("consumeUser"); |
|
|
|
|
|
ConsumeUser consumeUser = objectMapper.treeToValue(consumeUserNode, ConsumeUser.class); |
|
|
|
|
|
page.setConsumeUser(consumeUser); |
|
|
return consumeController.select(page); |
|
|
return consumeController.select(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -134,6 +155,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception refundExcel(String message) throws Exception { |
|
|
public Exception refundExcel(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "refundUser", page -> { |
|
|
return exportExcelGeneric(message, "refundUser", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode refundUserNode = requestDataNode.path("refundUser"); |
|
|
|
|
|
RefundUser refundUser = objectMapper.treeToValue(refundUserNode, RefundUser.class); |
|
|
|
|
|
page.setRefundUser(refundUser); |
|
|
return refundController.selcet(page); |
|
|
return refundController.selcet(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -145,6 +171,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception LiveExcel(String message) throws Exception { |
|
|
public Exception LiveExcel(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "liveUser", page -> { |
|
|
return exportExcelGeneric(message, "liveUser", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode beanConsumeLiveNode = requestDataNode.path("beanConsumeLive"); |
|
|
|
|
|
BeanConsumeLive beanConsumeLive = objectMapper.treeToValue(beanConsumeLiveNode, BeanConsumeLive.class); |
|
|
|
|
|
page.setBeanConsumeLive(beanConsumeLive); |
|
|
return beanConsumeController.selectLiveBy(page); |
|
|
return beanConsumeController.selectLiveBy(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -156,6 +187,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception FanExcel(String message) throws Exception { |
|
|
public Exception FanExcel(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "fanUser", page -> { |
|
|
return exportExcelGeneric(message, "fanUser", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode beanConsumeFanNode = requestDataNode.path("beanConsumeFan"); |
|
|
|
|
|
BeanConsumeFan beanConsumeFan = objectMapper.treeToValue(beanConsumeFanNode, BeanConsumeFan.class); |
|
|
|
|
|
page.setBeanConsumeFan(beanConsumeFan); |
|
|
return beanConsumeController.selectFanBy(page); |
|
|
return beanConsumeController.selectFanBy(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -167,6 +203,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception ArticleExcel(String message) throws Exception { |
|
|
public Exception ArticleExcel(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "articleUser", page -> { |
|
|
return exportExcelGeneric(message, "articleUser", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode beanConsumeArticleNode = requestDataNode.path("beanConsumeArticle"); |
|
|
|
|
|
BeanConsumeArticle beanConsumeArticle = objectMapper.treeToValue(beanConsumeArticleNode, BeanConsumeArticle.class); |
|
|
|
|
|
page.setBeanConsumeArticle(beanConsumeArticle); |
|
|
return beanConsumeController.selectArticleBy(page); |
|
|
return beanConsumeController.selectArticleBy(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -177,6 +218,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception BeanExcel(String message) throws Exception { |
|
|
public Exception BeanExcel(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "beanUser", page -> { |
|
|
return exportExcelGeneric(message, "beanUser", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode beanRechargeNode = requestDataNode.path("beanSystemRechargeInfo"); |
|
|
|
|
|
BeanSystemRechargeInfo beanSystemRechargeInfo = objectMapper.treeToValue(beanRechargeNode, BeanSystemRechargeInfo.class); |
|
|
|
|
|
page.setBeanSystemRechargeInfo(beanSystemRechargeInfo); |
|
|
return beanRechargeController.selectBySystem(page); |
|
|
return beanRechargeController.selectBySystem(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -187,6 +233,11 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
public Exception OnlineExcel(String message) throws Exception { |
|
|
public Exception OnlineExcel(String message) throws Exception { |
|
|
return exportExcelGeneric(message, "onlineUser", page -> { |
|
|
return exportExcelGeneric(message, "onlineUser", page -> { |
|
|
try { |
|
|
try { |
|
|
|
|
|
JsonNode rootNode = objectMapper.readTree(message); |
|
|
|
|
|
JsonNode requestDataNode = rootNode.path("requestData"); |
|
|
|
|
|
JsonNode beanRechargeNode = requestDataNode.path("beanOnlineRechargeInfo"); |
|
|
|
|
|
BeanOnlineRechargeInfo beanOnlineRechargeInfo = objectMapper.treeToValue(beanRechargeNode, BeanOnlineRechargeInfo.class); |
|
|
|
|
|
page.setBeanOnlineRechargeInfo(beanOnlineRechargeInfo); |
|
|
return beanRechargeController.selectByOnline(page); |
|
|
return beanRechargeController.selectByOnline(page); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
throw new RuntimeException(e); |
|
|
throw new RuntimeException(e); |
|
@ -261,6 +312,9 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
Page page = new Page(); |
|
|
Page page = new Page(); |
|
|
page.setPageNum(1); |
|
|
page.setPageNum(1); |
|
|
page.setPageSize(PAGE_SIZE); |
|
|
page.setPageSize(PAGE_SIZE); |
|
|
|
|
|
if (exportType.equals("goldDetail")){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
Integer totalCount = 0; |
|
|
Integer totalCount = 0; |
|
|
boolean hasMore = true; |
|
|
boolean hasMore = true; |
|
|
|
|
|
|
|
|