Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kaoshi-java
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
单欣鑫
kaoshi-java
Commits
2262adf3
Commit
2262adf3
authored
Jun 12, 2025
by
法拉51246
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3645f391
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
104 additions
and
5 deletions
+104
-5
AlipayService.java
...c/main/java/com/ruoyi/hezhi/api/entity/AlipayService.java
+1
-1
TbExamBatchMapper.java
...c/main/java/com/ruoyi/hezhi/mapper/TbExamBatchMapper.java
+6
-0
TbExamRegistrationServiceImpl.java
...oyi/hezhi/service/impl/TbExamRegistrationServiceImpl.java
+26
-4
TbExamServiceImpl.java
.../java/com/ruoyi/hezhi/service/impl/TbExamServiceImpl.java
+49
-0
TbConferenceNoticeMapper.xml
.../main/resources/mapper/hezhi/TbConferenceNoticeMapper.xml
+1
-0
TbCooperatePartnerMapper.xml
.../main/resources/mapper/hezhi/TbCooperatePartnerMapper.xml
+1
-0
TbEvaluateAgencyMapper.xml
...rc/main/resources/mapper/hezhi/TbEvaluateAgencyMapper.xml
+1
-0
TbExamBatchMapper.xml
...tem/src/main/resources/mapper/hezhi/TbExamBatchMapper.xml
+17
-0
TbLiveBroadcastMapper.xml
...src/main/resources/mapper/hezhi/TbLiveBroadcastMapper.xml
+1
-0
TbMajorClassMapper.xml
...em/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml
+1
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/hezhi/api/entity/AlipayService.java
View file @
2262adf3
...
...
@@ -75,7 +75,7 @@ public class AlipayService {
request
.
setBizModel
(
model
);
request
.
setNotifyUrl
(
aliPayConfig
.
getNotifyUrl
()+
"/api/pay/aliPayBoilerNotify"
);
request
.
setReturnUrl
(
"https://www.chsie.com.cn/
payTheFees?examId="
+
examId
+
"&memberUserId="
+
memberUserId
);
request
.
setReturnUrl
(
"https://www.chsie.com.cn/
examDetail?examId="
+
examId
);
//支付成功后跳转回哪个页面
AlipayTradePagePayResponse
response
=
alipayClient
.
pageExecute
(
request
,
"POST"
);
// 如果需要返回GET请求,请使用
...
...
ruoyi-system/src/main/java/com/ruoyi/hezhi/mapper/TbExamBatchMapper.java
View file @
2262adf3
...
...
@@ -104,6 +104,12 @@ public interface TbExamBatchMapper
* @return 结果
*/
public
int
insertTbExamBatchBatch
(
@Param
(
"tbExamBatchList"
)
List
<
TbExamBatch
>
tbExamBatchList
);
/**
* 批量修改考试批次
* @param tbExamBatchList 列表
* @return 结果
*/
public
int
updateTbExamBatchBatch
(
@Param
(
"tbExamBatchList"
)
List
<
TbExamBatch
>
tbExamBatchList
);
/**
* 查询考试批次
...
...
ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbExamRegistrationServiceImpl.java
View file @
2262adf3
...
...
@@ -46,6 +46,10 @@ import java.io.FileInputStream;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeParseException
;
import
java.util.*
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -1264,11 +1268,29 @@ public class TbExamRegistrationServiceImpl implements ITbExamRegistrationService
int
successRow
=
0
;
for
(
TbExamRegistrationVO
item
:
collect
)
{
//首先校验数据
//生日必须有两个-链接
if
(
item
.
getBirthday
().
split
(
"-"
).
length
!=
3
){
erreList
.
put
(
item
.
getContactInformation
(),
"生日格式有误,正确格式:1999-09-09"
);
continue
;
String
birthday
=
item
.
getBirthday
();
String
normalized
=
birthday
.
replace
(
"/"
,
"-"
);
String
formatted
=
null
;
LocalDate
date
;
try
{
// 先用宽松格式解析(允许不补0)
date
=
LocalDate
.
parse
(
normalized
,
DateTimeFormatter
.
ofPattern
(
"yyyy-M-d"
));
// 再用严格格式格式化(自动补0)
formatted
=
date
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
}
catch
(
Exception
e1
)
{
try
{
// 尝试解析 Java Date.toString() 格式
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"EEE MMM dd HH:mm:ss z yyyy"
,
Locale
.
ENGLISH
);
Date
parsedDate
=
sdf
.
parse
(
normalized
);
SimpleDateFormat
targetFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
formatted
=
targetFormat
.
format
(
parsedDate
);
}
catch
(
Exception
e2
)
{
erreList
.
put
(
item
.
getContactInformation
(),
"生日格式有误,应为:1999-09-09 或 Fri Jul 07 00:00:00 CST 2000"
);
continue
;
}
}
item
.
setBirthday
(
formatted
);
// 回写为标准格式
//校验手机号必须11位纯数字
if
(
item
.
getContactInformation
().
length
()
!=
11
||!
item
.
getContactInformation
().
matches
(
"^[0-9]*$"
)){
erreList
.
put
(
item
.
getContactInformation
(),
"手机号格式有误,应为11位纯数字"
);
...
...
ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbExamServiceImpl.java
View file @
2262adf3
...
...
@@ -25,6 +25,8 @@ import javax.annotation.Resource;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.concurrent.CountDownLatch
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
* 考试Service业务层处理
...
...
@@ -195,6 +197,53 @@ public class TbExamServiceImpl implements ITbExamService
tbExamCourseMapper
.
insertTbExamCourse
(
tbExamCourse
);
}
}
//todo 删除逻辑
//
// List<TbExamBatch> existingBatches = tbExamBatchMapper.getByExamId(tbExam.getExamId());
// //存在的批次
// Map<Long, TbExamBatch> existingBatchMap = existingBatches.stream()
// .collect(Collectors.toMap(TbExamBatch::getBatchIndex, Function.identity()));
//
// // 2. 获取当前提交的批次(必须包含原来的 batchIndex)
// List<TbExamBatch> newBatches = tbExam.getExamBatchList();
// Set<Long> newBatchIndexes = newBatches.stream()
// .map(TbExamBatch::getBatchIndex)
// .collect(Collectors.toSet());
//
// // 3. 获取被移除的批次的主键 ID,转换为 Long[]
// Long[] toDeleteIds = existingBatches.stream()
// .filter(old -> !newBatchIndexes.contains(old.getBatchIndex()))
// .map(TbExamBatch::getExamBatchId)
// .toArray(Long[]::new);
//
// // 4. 删除操作
// if (toDeleteIds.length > 0) {
// tbExamBatchMapper.deleteTbExamBatchByExamBatchIds(toDeleteIds);
// }
//
// List<TbExamBatch> toInsert = new ArrayList<>();
// List<TbExamBatch> toUpdate = new ArrayList<>();
//
// for (TbExamBatch newBatch : newBatches) {
// newBatch.setExamId(tbExam.getExamId()); // 保证 examId 正确
// if (existingBatchMap.containsKey(newBatch.getBatchIndex())) {
// // 是更新:保留已有的主键 ID
// TbExamBatch existing = existingBatchMap.get(newBatch.getBatchIndex());
// newBatch.setExamBatchId(existing.getExamBatchId());
// toUpdate.add(newBatch);
// } else {
// // 是新增
// toInsert.add(newBatch);
// }
// }
// if (!toInsert.isEmpty()) {
// tbExamBatchMapper.insertTbExamBatchBatch(toInsert);
// }
//
// if (!toUpdate.isEmpty()) {
// tbExamBatchMapper.updateTbExamBatchBatch(toUpdate); // 你需要写批量 update 逻辑
// }
// 考试批次
List
<
TbExamBatch
>
tbExamBatchList
=
tbExam
.
getExamBatchList
();
if
(!
tbExamBatchList
.
isEmpty
()){
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbConferenceNoticeMapper.xml
View file @
2262adf3
...
...
@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"publisher != null and publisher != ''"
>
and publisher = #{publisher}
</if>
<if
test=
"createTime != null "
>
and create_time = #{createTime}
</if>
</where>
order by sort asc,create_time desc
</select>
<select
id=
"selectTbConferenceNoticeByConferenceNoticeId"
parameterType=
"Long"
resultMap=
"TbConferenceNoticeResult"
>
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbCooperatePartnerMapper.xml
View file @
2262adf3
...
...
@@ -57,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"deleteBy != null and deleteBy != ''"
>
and delete_by = #{deleteBy}
</if>
<if
test=
"delFlag != null "
>
and del_flag = #{delFlag}
</if>
</where>
ororder by create_time desc
</select>
<select
id=
"selectTbCooperatePartnerByCooperatePartnerId"
parameterType=
"Long"
resultMap=
"TbCooperatePartnerResult"
>
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbEvaluateAgencyMapper.xml
View file @
2262adf3
...
...
@@ -99,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"deleteTime != null "
>
and delete_time = #{deleteTime}
</if>
<if
test=
"deleteBy != null and deleteBy != ''"
>
and delete_by = #{deleteBy}
</if>
</where>
order by sort asc,create_time desc
</select>
<select
id=
"selectTbEvaluateAgencyByEvaluateAgencyId"
parameterType=
"Long"
resultMap=
"TbEvaluateAgencyResult"
>
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbExamBatchMapper.xml
View file @
2262adf3
...
...
@@ -140,6 +140,23 @@
</foreach>
</insert>
<update
id=
"updateTbExamBatchBatch"
parameterType=
"java.util.List"
>
<foreach
collection=
"tbExamBatchList"
item=
"item"
separator=
";"
>
UPDATE tb_exam_batch
SET
exam_id = #{item.examId},
batch_index = #{item.batchIndex},
exam_batch = #{item.examBatch},
exam_start_time = #{item.examStartTime},
exam_end_time = #{item.examEndTime},
sign_start_time = #{item.signStartTime},
sign_end_time = #{item.signEndTime}
WHERE exam_batch_id = #{item.examBatchId}
</foreach>
</update>
<select
id=
"getByExamIdBatchIndex"
resultMap=
"TbExamBatchResult"
>
<include
refid=
"selectTbExamBatchVo"
/>
where
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbLiveBroadcastMapper.xml
View file @
2262adf3
...
...
@@ -66,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"deleteTime != null "
>
and delete_time = #{deleteTime}
</if>
<if
test=
"deleteBy != null and deleteBy != ''"
>
and delete_by = #{deleteBy}
</if>
</where>
order by create_time desc
</select>
<select
id=
"selectTbLiveBroadcastByLiveBroadcastId"
parameterType=
"Long"
resultMap=
"TbLiveBroadcastResult"
>
...
...
ruoyi-system/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml
View file @
2262adf3
...
...
@@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"status != null "
>
and status = #{status}
</if>
and del_flag = '0'
</where>
order by sort asc,create_time desc
</select>
<select
id=
"getAllMajorClassList"
parameterType=
"TbMajorClass"
resultMap=
"TbMajorClassResult"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment