...
|
...
|
@@ -8,6 +8,7 @@ import com.yoho.error.exception.ServiceException; |
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
...
|
...
|
@@ -26,6 +27,9 @@ public class UserdaySigninServiceImpl implements IUserdaySigninService { |
|
|
|
|
|
@Resource(name = "yhValueOperations")
|
|
|
YHValueOperations<String, String> yhValueOperations;
|
|
|
|
|
|
@Value("${userday.open.day}")
|
|
|
String userdayOpenDay;
|
|
|
|
|
|
@Override
|
|
|
public void signin(int uid) throws Exception {
|
...
|
...
|
@@ -38,7 +42,7 @@ public class UserdaySigninServiceImpl implements IUserdaySigninService { |
|
|
|
|
|
// (2)校验当天是否是会员日
|
|
|
String dateStr = DateUtil.getcurrentDate();
|
|
|
if (!"28".equals(dateStr.substring(8, 10))) {
|
|
|
if (!userdayOpenDay.equals(dateStr.substring(8, 10))) {
|
|
|
throw new ServiceException(403, "非会员日,不允许签到");
|
|
|
}
|
|
|
|
...
|
...
|
|