|
|
|
@ -10,19 +10,24 @@ import au.com.royalpay.payment.tools.env.PlatformEnvironment;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
|
|
|
|
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 javax.annotation.Resource;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.time.DayOfWeek;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
|
|
|
|
|
@Resource
|
|
|
|
@ -87,6 +92,10 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void actApply(JSONObject device) {
|
|
|
|
|
LocalDateTime dt = LocalDateTime.now();
|
|
|
|
|
if(dt.getDayOfWeek()== DayOfWeek.MONDAY && dt.getHour()<18){
|
|
|
|
|
throw new BadRequestException("每周一0点至18点为收益计算时间,暂停申请操作");
|
|
|
|
|
}
|
|
|
|
|
JSONObject act = actAppMapper.getActDetail("1");
|
|
|
|
|
Assert.notNull(act, "The activity is not valid");
|
|
|
|
|
if (!act.getBoolean("is_valid")) {
|
|
|
|
@ -119,6 +128,10 @@ public class ActMonDelaySettleServiceImp implements ActMonDelaySettleService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void cancelAct(JSONObject device) {
|
|
|
|
|
LocalDateTime dt = LocalDateTime.now();
|
|
|
|
|
if(dt.getDayOfWeek()== DayOfWeek.MONDAY && dt.getHour()<18){
|
|
|
|
|
throw new BadRequestException("每周一0点至18点为收益计算时间,暂停退出活动操作");
|
|
|
|
|
}
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
deviceSupport.findRegister(clientType);
|
|
|
|
|
int client_id = device.getIntValue("client_id");
|
|
|
|
|