Commit d5149a5e authored by Administrator's avatar Administrator

重复签到判断,积分只累计报名积分

parent bbb22a80
......@@ -20,6 +20,7 @@
raceenroll.pointrecord
WHERE
userId = #{userId}
AND type = 3
AND isNegative = #{isNegative}
ORDER BY createTime DESC
LIMIT #{offset}, #{pageCount}
......
......@@ -182,6 +182,10 @@ public class JoyfulRoadController {
@PostMapping(value = "/insJoyfulCheckinRecords")
@ApiOperation(value = "活动签到打卡", notes = "活动签到打卡", tags = "活动签到打卡")
public Result insJoyfulCheckinRecords(@RequestBody JoyfulCheckinRecords joyfulCheckinRecords){
List<JoyfulCheckinRecords> records = joyfulCheckinRecordsService.getJoyfulCheckinRecordsList(joyfulCheckinRecords.getUserId(),1,10);
if(records != null && !records.isEmpty()){
return Result.fail().setMsg("已签到成功!");
}
int result = joyfulCheckinRecordsService.insJoyfulCheckinRecords(joyfulCheckinRecords);
if (result != 1) {
return Result.fail().setMsg("新增失败!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment