同步锁

master
ck 5 years ago
parent fa0bfaabae
commit faafffaaed

@ -19,6 +19,7 @@ import com.jingcheng.template.util.AjaxResult;
import com.jingcheng.template.util.LogUtils; import com.jingcheng.template.util.LogUtils;
import com.jingcheng.template.vo.AwardRecordVo; import com.jingcheng.template.vo.AwardRecordVo;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.Synchronized;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -78,6 +79,7 @@ public class AwardRecordServiceImpl extends BaseServiceImpl<AwardRecordMapper, A
} }
@SneakyThrows @SneakyThrows
@Synchronized
@Override @Override
public AjaxResult isAward(String userId,String source) { public AjaxResult isAward(String userId,String source) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

Loading…
Cancel
Save