|
|
|
@ -43,6 +43,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
|
import com.notnoop.apns.APNS;
|
|
|
|
|
import com.notnoop.apns.ApnsService;
|
|
|
|
|
import org.apache.commons.lang3.RandomUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
@ -1168,6 +1169,16 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
couponVerificationService.useCoupon(coupon_log_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getAd(JSONObject device) {
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
deviceSupport.findRegister(clientType);
|
|
|
|
|
JSONObject res = royalPayCMSSupport.listArticles("app_ad", false, true, 1, 10);
|
|
|
|
|
JSONArray acts = res.getJSONArray("data");
|
|
|
|
|
int selectNo = RandomUtils.nextInt(0,acts.size());
|
|
|
|
|
return acts.getJSONObject(selectNo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static boolean mathchLetterorNum(String str) {
|
|
|
|
|
String regex = "[A-Za-z0-9]{8}";
|
|
|
|
|
return str.matches(regex);
|
|
|
|
|