Commit 4b84ea4a by caosy

过期会员购买限制

parent baa6e495
......@@ -24,7 +24,6 @@ import com.ctrip.fun.common.vo.ResponseError;
import com.ctrip.fun.common.vo.ResponseStatusEnum;
import com.ctrip.fun.common.vo.SortDirectionEnum;
import com.ctrip.fun.common.vo.basic.VoucherGetLogBean;
import com.ctrip.fun.common.vo.basic.VoucherGiftQuery;
import com.ctrip.fun.common.vo.basic.VoucherItemDTO;
import com.ctrip.fun.common.vo.basic.VoucherQueryDto;
import com.ctrip.fun.common.vo.basic.VoucherQueryRequestDTO;
......@@ -309,68 +308,8 @@ public class VoucherMController {
return response;
}
/**
* 换卷列表
*/
@ResponseBody
@Security
@RequestMapping(value = "/voucher/getVoucherGiftList", method = RequestMethod.GET, params = { "token","uid", "pagerOffset", "pagerPerPage","status" })
public Object getVoucherGiftList(@RequestParam String token, VoucherGiftQuery voucherGiftQuery) {
voucherGiftQuery.setToken(token);
System.out.println("getVoucherGiftList1===>" );
return voucherService.getVoucherGiftList(voucherGiftQuery);
}
/**
* 客户确认换卷
*/
@ResponseBody
@Transactional
@Security
@RequestMapping(value = "/voucher/voucherGiftAffirm", method = RequestMethod.GET, params = { "token", "id" })
public Object voucherGiftAffirm(@RequestParam String token,VoucherGiftQuery voucherGiftQuery) {
Response<?> response = new Response();
Request<VoucherGiftQuery> request = new Request<VoucherGiftQuery>();
voucherGiftQuery.setUid(UserContext.getUserId());
request.setUserId(UserContext.getUserId());
request.setBody(voucherGiftQuery);
response = voucherService.voucherGiftAffirm(request);
if (response.getStatus() == ResponseStatusEnum.SUCCESS.getValue()) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("success", true);
return map;
} else {
return handFailResponse(response);
}
}
/**
* 客户取消换卷
*/
@ResponseBody
@Security
@RequestMapping(value = "/voucher/voucherGiftCancel", method = RequestMethod.GET, params = { "token", "id" })
public Object voucherGiftCancel(@RequestParam String token,VoucherGiftQuery voucherGiftQuery) {
Response<?> response = new Response();
Request<VoucherGiftQuery> request = new Request<VoucherGiftQuery>();
voucherGiftQuery.setUid(UserContext.getUserId());
request.setUserId(UserContext.getUserId());
request.setBody(voucherGiftQuery);
response = voucherService.voucherGiftCancel(request);
if (response.getStatus() == ResponseStatusEnum.SUCCESS.getValue()) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("success", true);
return map;
} else {
return handFailResponse(response);
}
}
/**
* @param response
......
......@@ -804,6 +804,7 @@ public class UserMController {
mp.put("golfLevel",userBean.getGolfLevel());
mp.put("userWorkerId", userBean.getUserWorkerId());
mp.put("isSales", userBean.getIsSales());
mp.put("sVipEndTime", userBean.getSvipEndTime());
return mp;
}
......
......@@ -13,8 +13,6 @@ import com.ctrip.fun.common.vo.PagedResponseBean;
import com.ctrip.fun.common.vo.Request;
import com.ctrip.fun.common.vo.Response;
import com.ctrip.fun.common.vo.basic.VoucherGetLogBean;
import com.ctrip.fun.common.vo.basic.VoucherGiftQuery;
import com.ctrip.fun.common.vo.basic.VoucherGiftVo;
import com.ctrip.fun.common.vo.basic.VoucherItemDTO;
import com.ctrip.fun.common.vo.basic.VoucherQueryDto;
import com.ctrip.fun.common.vo.basic.VoucherQueryRequestDTO;
......@@ -202,25 +200,7 @@ public class VoucherMService extends BaseService {
return response.getBody();
}
public Object getVoucherGiftList(VoucherGiftQuery query){
PagedResponseBean<VoucherGiftVo> pagedResponseBean = new PagedResponseBean<VoucherGiftVo>(0, new ArrayList<VoucherGiftVo>());
String uri = super.getServiceUri("uri.voucher.getVoucherGiftList");
System.out.println("getVoucherGiftList1===>" + uri );
HttpEntity<Request<VoucherGiftQuery>> entity = new HttpEntity<Request<VoucherGiftQuery>>(new Request<VoucherGiftQuery>(null, query));
Response<PagedResponseBean<VoucherGiftVo>> response = null;
try {
// response = super.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<Response<PagedResponseBean<VoucherGiftVo>>>() {
// }).getBody();
} catch (Exception e) {
logger.error(e.getMessage());
return pagedResponseBean;
}
if (response == null || response.getStatus() != 0 || response.getBody() == null) {
return pagedResponseBean;
}
return response.getBody();
}
......@@ -342,24 +322,5 @@ public class VoucherMService extends BaseService {
return response;
}
public Response<?> voucherGiftAffirm(Request<VoucherGiftQuery> request) {
String uri = super.getServiceUri("uri.voucher.voucherGiftAffirm");
HttpEntity<Request<VoucherGiftQuery>> entity = new HttpEntity<Request<VoucherGiftQuery>>(request);
Response<?> response = super.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<Response<?>>() {
}).getBody();
return response;
}
public Response<?> voucherGiftCancel(Request<VoucherGiftQuery> request) {
String uri = super.getServiceUri("uri.voucher.voucherGiftCancel");
HttpEntity<Request<VoucherGiftQuery>> entity = new HttpEntity<Request<VoucherGiftQuery>>(request);
Response<?> response = super.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<Response<?>>() {
}).getBody();
return response;
}
}
......@@ -141,9 +141,7 @@ uri.voucher.findUserVoucherById=/fun-golf-service/Voucher/findUserVoucherById
uri.voucherRule.addVoucherRoleUsers=/fun-golf-service/voucherRule/addVoucherRoleUsers/{id}
uri.voucherRule.findUserVoucherById=/fun-golf-service/voucherRule/getVoucherRuleById
uri.voucherRule.getVoucherRuleRemark=/fun-golf-service/voucherRule/getVoucherRuleRemark
uri.voucher.getVoucherGiftList=/fun-golf-service/Voucher/getVoucherGiftList
uri.voucher.voucherGiftAffirm=/fun-golf-service/Voucher/voucherGiftAffirm
uri.voucher.voucherGiftCancel=/fun-golf-service/Voucher/voucherGiftCancel
uri.tour.search=/fun-golf-service/tour/search
uri.tour.cities=/fun-golf-service/tour/cities
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment