master
wangning 7 years ago
parent 7171a225d8
commit 7ea1050366

@ -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");

@ -15,6 +15,7 @@ import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
import au.com.royalpay.payment.manage.system.core.ClientContractService;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.device.advise.AppClientController;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.http.HttpUtils;
@ -28,7 +29,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import java.math.BigDecimal;
@ -41,7 +41,7 @@ import javax.validation.Valid;
/**
* Created by yishuqian on 28/03/2017.
*/
@RestController
@AppClientController
@RequestMapping("/api/v1.0/retail/app")
public class RetailAppController {
@Resource

Loading…
Cancel
Save