|
|
|
@ -17,11 +17,9 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
@ -65,7 +63,7 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
|
|
|
|
|
List<JSONObject> clientLogs = actMonDelaySettleMapper.clientLog(client_id);
|
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
|
Boolean apply = false;
|
|
|
|
|
if (!clientLogs.isEmpty() && clientLogs.size() > 0) {
|
|
|
|
|
if (!clientLogs.isEmpty()) {
|
|
|
|
|
apply = true;
|
|
|
|
|
}
|
|
|
|
|
if (new Date().compareTo(act.getDate("active_date")) < 0) {
|
|
|
|
@ -90,7 +88,7 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
|
|
|
|
|
@Override
|
|
|
|
|
public void actApply(JSONObject device) {
|
|
|
|
|
JSONObject act = actAppMapper.getActDetail("1");
|
|
|
|
|
Assert.notNull(act,"The activity is not valid");
|
|
|
|
|
Assert.notNull(act, "The activity is not valid");
|
|
|
|
|
if (!act.getBoolean("is_valid")) {
|
|
|
|
|
throw new BadRequestException("The activity is not valid");
|
|
|
|
|
}
|
|
|
|
@ -104,7 +102,7 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
|
|
|
|
|
deviceSupport.findRegister(clientType);
|
|
|
|
|
int client_id = device.getIntValue("client_id");
|
|
|
|
|
List<JSONObject> clientLogs = actMonDelaySettleMapper.clientLog(client_id);
|
|
|
|
|
if (!clientLogs.isEmpty() && clientLogs.size() > 0) {
|
|
|
|
|
if (!clientLogs.isEmpty()) {
|
|
|
|
|
throw new BadRequestException("您已经参与过活动,无需重复报名");
|
|
|
|
|
}
|
|
|
|
|
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
|
|
|
|
@ -125,7 +123,7 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
|
|
|
|
|
deviceSupport.findRegister(clientType);
|
|
|
|
|
int client_id = device.getIntValue("client_id");
|
|
|
|
|
List<JSONObject> clientLogs = actMonDelaySettleMapper.clientLog(client_id);
|
|
|
|
|
if (clientLogs.isEmpty() || clientLogs.size() == 0) {
|
|
|
|
|
if (clientLogs.isEmpty()) {
|
|
|
|
|
throw new BadRequestException("您未参加活动,不可取消");
|
|
|
|
|
}
|
|
|
|
|
JSONObject clientLog = clientLogs.get(0);
|
|
|
|
|