Browse Source
Merge branch 'milestone-20250723-wwl' of http://39.101.133.168:8807/qimaohong/ActivityProject into milestone-20250723-wwl
feature/0725lihuilin
Merge branch 'milestone-20250723-wwl' of http://39.101.133.168:8807/qimaohong/ActivityProject into milestone-20250723-wwl
feature/0725lihuilin
19 changed files with 815 additions and 106 deletions
-
2lottery-system/lottery-pojo/src/main/java/com/lottery/dto/FundingRecordDto.java
-
42lottery-system/lottery-pojo/src/main/java/com/lottery/entity/FundingExport.java
-
28lottery-system/lottery-pojo/src/main/java/com/lottery/entity/Market.java
-
21lottery-system/lottery-pojo/src/main/java/com/lottery/vo/ApiFundingTimeVo.java
-
26lottery-system/lottery-pojo/src/main/java/com/lottery/vo/ApiFundingVO.java
-
14lottery-system/lottery-service/src/main/java/com/lottery/admin/controller/ExportController.java
-
61lottery-system/lottery-service/src/main/java/com/lottery/admin/controller/FundingController.java
-
11lottery-system/lottery-service/src/main/java/com/lottery/admin/mapper/IFundingMapper.java
-
11lottery-system/lottery-service/src/main/java/com/lottery/admin/service/IFundingService.java
-
121lottery-system/lottery-service/src/main/java/com/lottery/admin/service/Impl/FundingServiceImpl.java
-
50lottery-system/lottery-service/src/main/java/com/lottery/api/controller/ApiFundingController.java
-
37lottery-system/lottery-service/src/main/java/com/lottery/api/mapper/ApiIFundingMapper.java
-
24lottery-system/lottery-service/src/main/java/com/lottery/api/service/ApiIFundingService.java
-
224lottery-system/lottery-service/src/main/java/com/lottery/api/service/Impl/ApiFundingServiceImpl.java
-
9lottery-system/lottery-service/src/main/resources/application.yml
-
36lottery-system/lottery-service/src/main/resources/logback-spring.xml
-
8lottery-system/lottery-service/src/main/resources/mapper/admin/AdminGradeMapper.xml
-
94lottery-system/lottery-service/src/main/resources/mapper/admin/fundingMapper.xml
-
80lottery-system/lottery-service/src/main/resources/mapper/api/ApiIFundingService.xml
@ -0,0 +1,42 @@ |
|||
package com.lottery.entity; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* @program: lottery-system |
|||
* @ClassName FundingExport |
|||
* @description: |
|||
* @author:jihaipeng |
|||
* @create: 2025−07-17 10:49 |
|||
* @Version 1.0 |
|||
**/ |
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
public class FundingExport { |
|||
|
|||
@ExcelProperty("用户名") |
|||
private String username; // 用户名 |
|||
@ExcelProperty("精网号") // 定义 Excel 表头为“用户唯一码” |
|||
private String jwcode; // 用户唯一码 |
|||
@ExcelProperty("市场") // 定义 Excel 表头为“市场标识” |
|||
private String marketSign; // 市场标识(usa/hk) |
|||
|
|||
@ExcelProperty("参与时间") // 定义 Excel 表头为“参与时间” |
|||
private LocalDateTime joinTime; // 参与时间 |
|||
// 方法1:通过 @JsonFormat 直接格式化(适用于JSON序列化) |
|||
|
|||
@JsonFormat(pattern = "yyyy年M月d日 HH:mm") |
|||
public LocalDateTime getJoinTime() { |
|||
return joinTime; |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.lottery.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
/** |
|||
* @program: lottery-system |
|||
* @ClassName market |
|||
* @description: |
|||
* @author:jihaipeng |
|||
* @create: 2025−07-16 12:01 |
|||
* @Version 1.0 |
|||
**/ |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
@TableName("market") |
|||
public class Market { |
|||
private Integer id; |
|||
private String market; |
|||
private String text; |
|||
private String icon; |
|||
private Integer des; |
|||
private Integer flag; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.lottery.vo; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.time.LocalDate; |
|||
|
|||
/** |
|||
* @program: lottery-system |
|||
* @ClassName ApiFundingTimeVo |
|||
* @description: |
|||
* @author:jihaipeng |
|||
* @create: 2025−07-16 13:49 |
|||
* @Version 1.0 |
|||
**/ |
|||
@Data |
|||
public class ApiFundingTimeVo { |
|||
private String marketOne; |
|||
private String marketTwo; |
|||
private LocalDate startTime; |
|||
private LocalDate endTime; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.lottery.vo; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.time.LocalDate; |
|||
|
|||
/** |
|||
* @program: lottery-system |
|||
* @ClassName ApiFundingVO |
|||
* @description: |
|||
* @author:jihaipeng |
|||
* @create: 2025−07-16 11:30 |
|||
* @Version 1.0 |
|||
**/ |
|||
@Data |
|||
public class ApiFundingVO { |
|||
private String marketOne; |
|||
private String marketTwo; |
|||
private LocalDate startTime; |
|||
private LocalDate endTime; |
|||
private Integer Totalcount; |
|||
private Integer marketOneCount; |
|||
private Integer marketTwoCount; |
|||
private String marketAddOne; |
|||
private String marketAddTwo; |
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.lottery.admin.controller; |
|||
|
|||
/** |
|||
* @program: lottery-system |
|||
* @ClassName ExportController |
|||
* @description: |
|||
* @author:jihaipeng |
|||
* @create: 2025−07-17 14:36 |
|||
* @Version 1.0 |
|||
**/ |
|||
|
|||
public class ExportController { |
|||
|
|||
} |
@ -0,0 +1,50 @@ |
|||
package com.lottery.api.controller; |
|||
|
|||
import com.lottery.admin.controller.FundingController; |
|||
import com.lottery.api.service.ApiIFundingService; |
|||
import com.lottery.dto.FundingRecordDto; |
|||
import com.lottery.result.Result; |
|||
import com.lottery.vo.ApiFundingVO; |
|||
import lombok.Data; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @program: lottery-system |
|||
* @ClassName FundingController |
|||
* @description: |
|||
* @author:jihaipeng |
|||
* @create: 2025−07-16 11:00 |
|||
* @Version 1.0 |
|||
**/ |
|||
@RestController |
|||
@RequestMapping("/api/funding") |
|||
public class ApiFundingController { |
|||
|
|||
@Autowired |
|||
private ApiIFundingService fundingService; |
|||
private final static Logger LOGGER = LoggerFactory.getLogger(ApiFundingController.class); |
|||
|
|||
//前台获取活动列表 |
|||
@GetMapping("/getActivity") |
|||
public Result<ApiFundingVO> getFundingActivity(@RequestParam Integer activityId){ |
|||
LOGGER.info("前台获取众筹活动所有数据"); |
|||
return Result.success(fundingService.getActivityDetail(activityId)); |
|||
} |
|||
|
|||
//前台获取活动详情 |
|||
@PostMapping("/getActivity1") |
|||
public Result<ApiFundingVO> getFundingActivity1(@RequestHeader String token){ |
|||
LOGGER.info("前台获取众筹活动所有数据"); |
|||
return fundingService.getActivityDetailOne(token); |
|||
} |
|||
|
|||
//添加用户参与记录 |
|||
@PostMapping("/addRecord") |
|||
public Result<String> addRecord(@RequestHeader String token,@RequestBody FundingRecordDto fundingRecordDto) throws Exception { |
|||
LOGGER.info("添加用户参与记录,参数为{}", fundingRecordDto); |
|||
return fundingService.addRecord(token,fundingRecordDto); |
|||
} |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.lottery.api.mapper; |
|||
|
|||
import com.lottery.vo.ApiFundingTimeVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.time.LocalDateTime; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @program: lottery-system |
|||
* @ClassName IFundingMapper |
|||
* @description: |
|||
* @author:jihaipeng |
|||
* @create: 2025−07-16 11:06 |
|||
* @Version 1.0 |
|||
**/ |
|||
@Mapper |
|||
public interface ApiIFundingMapper { |
|||
|
|||
|
|||
Integer getTime(Integer activityId, String markerSign); |
|||
|
|||
Integer searchVirtual(Integer activityId, String marketSign); |
|||
|
|||
Integer searchMarketTotal(Integer activityId, String marketSign); |
|||
|
|||
ApiFundingTimeVo getMarket(Integer activityId); |
|||
|
|||
Integer selectStatus(); |
|||
|
|||
void addRecord(Integer activityId, String username, String jwcode, String marketSign, LocalDateTime joinTime); |
|||
|
|||
LocalDate selectCount(String jwcode, String marketSign,Integer activityId); |
|||
|
|||
Integer selectStatusCount(); |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.lottery.api.service; |
|||
|
|||
import com.lottery.dto.FundingRecordDto; |
|||
import com.lottery.result.Result; |
|||
import com.lottery.vo.ApiFundingVO; |
|||
|
|||
import javax.print.DocFlavor; |
|||
|
|||
/** |
|||
* @program: lottery-system |
|||
* @ClassName IFundingService |
|||
* @description: |
|||
* @author:jihaipeng |
|||
* @create: 2025−07-16 11:06 |
|||
* @Version 1.0 |
|||
**/ |
|||
|
|||
public interface ApiIFundingService { |
|||
ApiFundingVO getActivityDetail(Integer activityId); |
|||
|
|||
Result getActivityDetailOne(String token); |
|||
|
|||
Result<String> addRecord(String token,FundingRecordDto fundingRecordDto); |
|||
} |
@ -0,0 +1,224 @@ |
|||
package com.lottery.api.service.Impl; |
|||
|
|||
import com.fasterxml.jackson.databind.JsonNode; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.lottery.api.mapper.ApiIFundingMapper; |
|||
import com.lottery.api.service.ApiIFundingService; |
|||
import com.lottery.dto.FundingRecordDto; |
|||
import com.lottery.result.Result; |
|||
import com.lottery.utils.HttpUtils; |
|||
import com.lottery.vo.ApiFundingTimeVo; |
|||
import com.lottery.vo.ApiFundingVO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.time.LocalDateTime; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @program: lottery-system |
|||
* @ClassName FundingServiceIMpl |
|||
* @description: |
|||
* @author:jihaipeng |
|||
* @create: 2025−07-16 11:07 |
|||
* @Version 1.0 |
|||
**/ |
|||
@Slf4j |
|||
@Service |
|||
public class ApiFundingServiceImpl implements ApiIFundingService { |
|||
|
|||
@Autowired |
|||
private ApiIFundingMapper fundingMapper; |
|||
|
|||
@Autowired |
|||
ObjectMapper objectMapper = new ObjectMapper(); |
|||
|
|||
//返回前台所有数据 |
|||
@Override |
|||
public ApiFundingVO getActivityDetail(Integer activityId) { |
|||
|
|||
//根据活动id查询活动时间,市场一,市场二,设置的初始时间,俩个市场总助力次数 |
|||
|
|||
//根据活动id查询俩个市场,俩个市场是一条数据 |
|||
ApiFundingTimeVo data= fundingMapper.getMarket(activityId); |
|||
|
|||
|
|||
String marketOne = (String) data.getMarketOne(); |
|||
String marketTwo = (String) data.getMarketTwo(); |
|||
LocalDate startTime = (LocalDate) data.getStartTime(); |
|||
LocalDate endTime = (LocalDate) data.getEndTime(); |
|||
|
|||
|
|||
//市场一的总的助力次数 |
|||
Integer markerOneTotal = fundingMapper.searchMarketTotal(activityId, marketOne); |
|||
if (markerOneTotal == null) { |
|||
markerOneTotal = 0; // 默认值 |
|||
} |
|||
//市场一的虚拟次数 |
|||
Integer markerOneVirtual = fundingMapper.searchVirtual(activityId, marketOne); |
|||
if (markerOneVirtual == null) { |
|||
markerOneVirtual = 0; // 默认值 |
|||
} |
|||
|
|||
//市场二的总的助力次数 |
|||
Integer markerTwoTotal = fundingMapper.searchMarketTotal(activityId, marketTwo); |
|||
if (markerTwoTotal == null) { |
|||
markerTwoTotal = 0; // 默认值 |
|||
} |
|||
//市场二的虚拟次数 |
|||
Integer markerTwoVirtual = fundingMapper.searchVirtual(activityId, marketTwo); |
|||
if (markerTwoVirtual == null) { |
|||
markerTwoVirtual = 0; // 默认值 |
|||
} |
|||
//获取的设置时间 |
|||
Integer time = fundingMapper.getTime(activityId,marketOne); |
|||
|
|||
Integer oneShow = markerOneTotal + markerOneVirtual; |
|||
Integer twoShow = markerTwoTotal + markerTwoVirtual; |
|||
|
|||
ApiFundingVO apiFundingVO = new ApiFundingVO(); |
|||
|
|||
apiFundingVO.setMarketOne(marketOne); |
|||
apiFundingVO.setMarketTwo(marketTwo); |
|||
apiFundingVO.setMarketOneCount(oneShow); |
|||
apiFundingVO.setMarketTwoCount(twoShow); |
|||
apiFundingVO.setTotalcount(time); |
|||
apiFundingVO.setStartTime(startTime); |
|||
apiFundingVO.setEndTime(endTime); |
|||
|
|||
return apiFundingVO; |
|||
} |
|||
|
|||
@Override |
|||
public Result getActivityDetailOne(String token) { |
|||
//根据活动id查询活动时间,市场一,市场二,设置的初始时间,俩个市场总助力次数 |
|||
//先查询一下有几个活动开启 |
|||
|
|||
Integer count = fundingMapper.selectStatusCount(); |
|||
if (count == null || count < 0 || count > 1) { |
|||
// 根据业务逻辑,这里可以分别处理count为null、小于0和大于1的情况 |
|||
// 但为了简化示例,我们统一返回一个失败结果 |
|||
return Result.failure("活动数量不符合要求,请检查并关闭多余的活动"); |
|||
} |
|||
|
|||
Integer activityId = fundingMapper.selectStatus(); |
|||
|
|||
|
|||
|
|||
//根据活动id查询俩个市场,俩个市场是一条数据 |
|||
ApiFundingTimeVo data= fundingMapper.getMarket(activityId); |
|||
|
|||
|
|||
String marketOne = (String) data.getMarketOne(); |
|||
String marketTwo = (String) data.getMarketTwo(); |
|||
LocalDate startTime = (LocalDate) data.getStartTime(); |
|||
LocalDate endTime = (LocalDate) data.getEndTime(); |
|||
|
|||
String username = ""; |
|||
String jwcode = ""; |
|||
|
|||
try { |
|||
// 1. 定义请求 URL |
|||
String url = "https://api.homilychart.com/hljw/api/v2/member/info"; |
|||
|
|||
// 准备请求参数 |
|||
Map<String, String> params = new HashMap<>(); |
|||
params.put("token", token); // 如果接口需要 token 作为参数 |
|||
// 调用接口 |
|||
String response = HttpUtils.postUrlencoded(url, params); |
|||
JsonNode rootNode = objectMapper.readTree(response); |
|||
// 提取 username |
|||
username = rootNode.path("data").path("username").asText(); |
|||
jwcode = rootNode.path("data").path("jwcode").asText(); |
|||
LocalDateTime joinTime = LocalDateTime.now(); |
|||
|
|||
} catch (Exception e) { |
|||
System.err.println("请求失败: " + e.getMessage()); |
|||
} |
|||
LocalDate now = LocalDate.now(); |
|||
String markeroneadd = "点击助力"; |
|||
String marketTwoadd = "点击助力"; |
|||
//通过精网号+市场名查询该用户是否助力过 |
|||
LocalDate count1 = fundingMapper.selectCount(jwcode,marketOne,activityId); |
|||
|
|||
if(count1!=null && count1.equals(now)) |
|||
markeroneadd = "已助力"; |
|||
|
|||
LocalDate count2 = fundingMapper.selectCount(jwcode,marketTwo,activityId); |
|||
if(count2!=null && count2.equals(now)) |
|||
marketTwoadd = "已助力"; |
|||
|
|||
//市场一的总的助力次数 |
|||
Integer markerOneTotal = fundingMapper.searchMarketTotal(activityId, marketOne); |
|||
if (markerOneTotal == null) { |
|||
markerOneTotal = 0; // 默认值 |
|||
} |
|||
//市场一的虚拟次数 |
|||
Integer markerOneVirtual = fundingMapper.searchVirtual(activityId, marketOne); |
|||
if (markerOneVirtual == null) { |
|||
markerOneVirtual = 0; // 默认值 |
|||
} |
|||
|
|||
//市场二的总的助力次数 |
|||
Integer markerTwoTotal = fundingMapper.searchMarketTotal(activityId, marketTwo); |
|||
if (markerTwoTotal == null) { |
|||
markerTwoTotal = 0; // 默认值 |
|||
} |
|||
//市场二的虚拟次数 |
|||
Integer markerTwoVirtual = fundingMapper.searchVirtual(activityId, marketTwo); |
|||
if (markerTwoVirtual == null) { |
|||
markerTwoVirtual = 0; // 默认值 |
|||
} |
|||
//获取的设置时间 |
|||
Integer time = fundingMapper.getTime(activityId,marketOne); |
|||
|
|||
Integer oneShow = markerOneTotal + markerOneVirtual; |
|||
Integer twoShow = markerTwoTotal + markerTwoVirtual; |
|||
|
|||
ApiFundingVO apiFundingVO = new ApiFundingVO(); |
|||
|
|||
apiFundingVO.setMarketOne(marketOne); |
|||
apiFundingVO.setMarketTwo(marketTwo); |
|||
apiFundingVO.setMarketOneCount(oneShow); |
|||
apiFundingVO.setMarketTwoCount(twoShow); |
|||
apiFundingVO.setTotalcount(time); |
|||
apiFundingVO.setStartTime(startTime); |
|||
apiFundingVO.setEndTime(endTime); |
|||
apiFundingVO.setMarketAddOne(markeroneadd); |
|||
apiFundingVO.setMarketTwo(marketTwoadd); |
|||
return Result.success(apiFundingVO); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public Result<String> addRecord(String token,FundingRecordDto fundingRecordDto) { |
|||
|
|||
try { |
|||
// 1. 定义请求 URL |
|||
String url = "https://api.homilychart.com/hljw/api/v2/member/info"; |
|||
|
|||
// 准备请求参数 |
|||
Map<String, String> params = new HashMap<>(); |
|||
params.put("token", token); // 如果接口需要 token 作为参数 |
|||
// 调用接口 |
|||
String response = HttpUtils.postUrlencoded(url, params); |
|||
JsonNode rootNode = objectMapper.readTree(response); |
|||
// 提取 username |
|||
String username = rootNode.path("data").path("username").asText(); |
|||
String jwcode = rootNode.path("data").path("jwcode").asText(); |
|||
LocalDateTime joinTime = LocalDateTime.now(); |
|||
String marketSign = fundingRecordDto.getMarketSign(); |
|||
Integer activityId = fundingRecordDto.getActivityId(); |
|||
//添加到数据库 |
|||
fundingMapper.addRecord(activityId, username, jwcode, marketSign, joinTime); |
|||
} catch (Exception e) { |
|||
System.err.println("请求失败: " + e.getMessage()); |
|||
} |
|||
|
|||
return Result.success("助力成功"); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<configuration> |
|||
|
|||
<!-- 定义日志输出模式 --> |
|||
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/> |
|||
|
|||
<!-- 控制台输出 --> |
|||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<encoder> |
|||
<pattern>${LOG_PATTERN}</pattern> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
<!-- 通用日志文件 --> |
|||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<file>logs/spring-boot-application.log</file> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 设置日志文件的命名模式 --> |
|||
<fileNamePattern>logs/spring-boot-application.%d{yyyy-MM-dd}.log</fileNamePattern> |
|||
<maxHistory>14</maxHistory> <!-- 保留14天的日志文件 --> |
|||
</rollingPolicy> |
|||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
|||
<maxFileSize>10MB</maxFileSize> |
|||
</triggeringPolicy> |
|||
<encoder> |
|||
<pattern>${LOG_PATTERN}</pattern> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
<!-- 根日志配置 --> |
|||
<root level="INFO"> |
|||
<appender-ref ref="CONSOLE" /> |
|||
<appender-ref ref="FILE" /> |
|||
</root> |
|||
|
|||
</configuration> |
@ -1,8 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.lottery.admin.mapper.AdminGradeMapper"> |
|||
|
|||
<select id="selectByName" resultType="com.lottery.entity.Grade"> |
|||
select * from grade where grade_name = #{gradeName} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,80 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.lottery.api.mapper.ApiIFundingMapper"> |
|||
<insert id="addRecord"> |
|||
INSERT INTO z_user (activity_id, |
|||
username, |
|||
jwcode, |
|||
market_sign, |
|||
join_time) |
|||
VALUES (#{activityId}, |
|||
#{username}, |
|||
#{jwcode}, |
|||
#{marketSign}, |
|||
#{joinTime}) |
|||
</insert> |
|||
|
|||
<select id="getTime" resultType="java.lang.Integer"> |
|||
SELECT |
|||
time |
|||
FROM |
|||
data |
|||
WHERE |
|||
activity_id = #{activityId} |
|||
and stock = #{markerSign} |
|||
</select> |
|||
|
|||
<select id="searchMarketTotal" resultType="java.lang.Integer"> |
|||
SELECT COUNT(*) |
|||
FROM z_user |
|||
WHERE market_sign = #{marketSign} |
|||
AND activity_id = #{activityId} |
|||
</select> |
|||
<select id="searchVirtual" resultType="java.lang.Integer"> |
|||
SELECT |
|||
add_total |
|||
FROM |
|||
data |
|||
WHERE |
|||
activity_id = #{activityId} |
|||
and stock = #{marketSign} |
|||
</select> |
|||
<select id="getMarket" resultType="com.lottery.vo.ApiFundingTimeVo" parameterType="java.lang.Integer"> |
|||
SELECT |
|||
market_one, |
|||
market_two, |
|||
start_time, |
|||
end_time |
|||
FROM |
|||
activity |
|||
WHERE |
|||
id = #{activityId} |
|||
</select> |
|||
<select id="selectStatus" resultType="java.lang.Integer"> |
|||
SELECT |
|||
id |
|||
FROM |
|||
activity |
|||
WHERE |
|||
status = 1 |
|||
</select> |
|||
<select id="selectCount" resultType="java.time.LocalDate"> |
|||
SELECT join_time |
|||
FROM z_user |
|||
WHERE activity_id = #{activityId} |
|||
and market_sign = #{marketSign} |
|||
and jwcode = #{jwcode} |
|||
order by join_time desc |
|||
LIMIT 1 |
|||
</select> |
|||
<select id="selectStatusCount" resultType="java.lang.Integer"> |
|||
SELECT |
|||
count(*) |
|||
FROM |
|||
activity |
|||
WHERE |
|||
status = 1 |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue