|
|
|
@ -20,6 +20,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.dao.DeadlockLoserDataAccessException; |
|
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
@ -64,9 +65,15 @@ public class HighCouponAgentController { |
|
|
|
|
log.error("HighCouponAgentController -> queryConvertCode() error!","兑换码已被使用"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "兑换码已被使用"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (convertCode.getCouponCodeId() != null) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "兑换码已被使用"); |
|
|
|
|
} |
|
|
|
|
return ResponseMsgUtil.success(highCouponAgentService.useConvertCode(body.getString("code"))); |
|
|
|
|
|
|
|
|
|
} catch (DeadlockLoserDataAccessException deadlockLoserDataAccessException) { |
|
|
|
|
log.error("HighActivityController -> userLottery() error!", "服务器繁忙"); |
|
|
|
|
return ResponseMsgUtil.builderResponse(ErrorCode.SERVER_BUSY_ERROR.getCode(),ErrorCode.SERVER_BUSY_ERROR.getMsg(),null); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighCouponAgentController --> useConvertCode() error!", e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|