|
@@ -99,8 +99,10 @@ public class ProductOrderController {
|
|
@ApiOperation(value = "根据用户id查询已开通的功能[by:wangfeng]", notes = "已开通信息")
|
|
@ApiOperation(value = "根据用户id查询已开通的功能[by:wangfeng]", notes = "已开通信息")
|
|
@PostMapping("/getInformationAvailableByUserId")
|
|
@PostMapping("/getInformationAvailableByUserId")
|
|
@SysLogger("getInformationAvailableByUserId")
|
|
@SysLogger("getInformationAvailableByUserId")
|
|
- public RespDTO getInformationAvailableByUserId(@RequestParam Long userId){
|
|
|
|
- List<UserAndProdutDTO> UserAndProdutData = openedProductsFacade.getInformationAvailableByUserId(userId);
|
|
|
|
|
|
+ public RespDTO getInformationAvailableByUserId(Long userId){
|
|
|
|
+ OpenedProducts openedProducts =new OpenedProducts();
|
|
|
|
+ openedProducts.setUserId(userId);
|
|
|
|
+ List<UserAndProdutDTO> UserAndProdutData = openedProductsFacade.getInformationAvailableByUserId(openedProducts);
|
|
return RespDTO.onSuc(UserAndProdutData);
|
|
return RespDTO.onSuc(UserAndProdutData);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -109,17 +111,9 @@ public class ProductOrderController {
|
|
@SysLogger("startAndendByuserId")
|
|
@SysLogger("startAndendByuserId")
|
|
@Transactional
|
|
@Transactional
|
|
public RespDTO<StartAndendByUserIdVO> startAndendByuserId(@RequestBody @Valid StartAndendByUserIdVO startAndendByUserIdVO) {
|
|
public RespDTO<StartAndendByUserIdVO> startAndendByuserId(@RequestBody @Valid StartAndendByUserIdVO startAndendByUserIdVO) {
|
|
- OpenedProducts openedProducts = new OpenedProducts();
|
|
|
|
- openedProducts.setUserId(startAndendByUserIdVO.getUserId());
|
|
|
|
- openedProducts.setProductId(startAndendByUserIdVO.getProductId());
|
|
|
|
- openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
|
|
|
|
- openedProducts.setGmtCreate(DateUtil.now());
|
|
|
|
- openedProducts.setServiceStatus(startAndendByUserIdVO.getServiceStatus());
|
|
|
|
- boolean res =openedProductsFacade.startAndendByuserId(openedProducts);
|
|
|
|
- if (!res){
|
|
|
|
- throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
|
|
|
|
- }
|
|
|
|
- return RespDTO.onSuc(res);
|
|
|
|
|
|
+
|
|
|
|
+ return openedProductsFacade.startAndendByuserIds(startAndendByUserIdVO);
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "根据用户id和产品id,删除开通信息[by:wangfeng]", notes = "删除开通信息")
|
|
@ApiOperation(value = "根据用户id和产品id,删除开通信息[by:wangfeng]", notes = "删除开通信息")
|
|
@@ -127,16 +121,8 @@ public class ProductOrderController {
|
|
@SysLogger("delInformationAvailable")
|
|
@SysLogger("delInformationAvailable")
|
|
@Transactional
|
|
@Transactional
|
|
public RespDTO delInformationAvailable(@RequestParam Long userId, Long productId) {
|
|
public RespDTO delInformationAvailable(@RequestParam Long userId, Long productId) {
|
|
- OpenedProducts openedProducts = new OpenedProducts();
|
|
|
|
- openedProducts.setUserId(userId);
|
|
|
|
- openedProducts.setProductId(productId);
|
|
|
|
- openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
|
|
|
|
- openedProducts.setGmtCreate(DateUtil.now());
|
|
|
|
- boolean res =openedProductsFacade.delInformationAvailable(openedProducts);
|
|
|
|
- if (!res){
|
|
|
|
- throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
|
|
|
|
- }
|
|
|
|
- return RespDTO.onSuc(res);
|
|
|
|
|
|
+
|
|
|
|
+ return openedProductsFacade.delInformationAvailables(userId,productId);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "根据用户id和产品id,修改开通时间[by:wangfeng]", notes = "修改开通时间")
|
|
@ApiOperation(value = "根据用户id和产品id,修改开通时间[by:wangfeng]", notes = "修改开通时间")
|
|
@@ -144,18 +130,8 @@ public class ProductOrderController {
|
|
@SysLogger("modifyOpeningTime")
|
|
@SysLogger("modifyOpeningTime")
|
|
@Transactional
|
|
@Transactional
|
|
public RespDTO<ModifyOpeningTimeVO> modifyOpeningTime(@RequestBody @Valid ModifyOpeningTimeVO modifyOpeningTimeVO) {
|
|
public RespDTO<ModifyOpeningTimeVO> modifyOpeningTime(@RequestBody @Valid ModifyOpeningTimeVO modifyOpeningTimeVO) {
|
|
- OpenedProducts openedProducts = new OpenedProducts();
|
|
|
|
- openedProducts.setUserId(modifyOpeningTimeVO.getUserId());
|
|
|
|
- openedProducts.setProductId(modifyOpeningTimeVO.getProductId());
|
|
|
|
- openedProducts.setStartTime(DateUtil.parseDate(modifyOpeningTimeVO.getStartTime()));
|
|
|
|
- openedProducts.setEndTime(DateUtil.parseDate(modifyOpeningTimeVO.getEndTime()));
|
|
|
|
- //TODO wangfeng openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
|
|
|
|
- openedProducts.setGmtCreate(DateUtil.now());
|
|
|
|
- boolean res = openedProductsFacade.modifyOpeningTime(openedProducts);
|
|
|
|
- if (!res){
|
|
|
|
- throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
|
|
|
|
- }
|
|
|
|
- return RespDTO.onSuc(res);
|
|
|
|
|
|
+
|
|
|
|
+ return openedProductsFacade.modifyOpeningTimes(modifyOpeningTimeVO);
|
|
}
|
|
}
|
|
@ApiOperation(value = "产品申请——显示所有订单[by:wangyu]",
|
|
@ApiOperation(value = "产品申请——显示所有订单[by:wangyu]",
|
|
notes =
|
|
notes =
|