|
@@ -19,24 +19,31 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.ctc.wstx.util.DataUtil;
|
|
|
import com.diagbot.annotation.SysLogger;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.dto.ResultModelDTO;
|
|
|
+import com.diagbot.dto.UserAndProdutDTO;
|
|
|
import com.diagbot.dto.UserInfoDTO;
|
|
|
+import com.diagbot.entity.OpenedProducts;
|
|
|
import com.diagbot.entity.Organization;
|
|
|
import com.diagbot.entity.User;
|
|
|
import com.diagbot.entity.UserAuthentication;
|
|
|
import com.diagbot.entity.UserOrganization;
|
|
|
+import com.diagbot.facade.OpenedProductsFacade;
|
|
|
import com.diagbot.facade.OrganizationFacade;
|
|
|
import com.diagbot.facade.UserAuthenticationFacade;
|
|
|
import com.diagbot.facade.UserFacade;
|
|
|
import com.diagbot.facade.UserOrganizationFacade;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.GsonUtil;
|
|
|
+import com.diagbot.vo.ModifyOpeningTimeVO;
|
|
|
import com.diagbot.vo.OrganizationVO;
|
|
|
+import com.diagbot.vo.StartAndendByUserIdVO;
|
|
|
import com.diagbot.vo.UserAndOrganizationVO;
|
|
|
import com.diagbot.vo.UserInfoAuditVO;
|
|
|
import com.diagbot.vo.UserInfoOrganizationsVO;
|
|
|
+import com.mysql.fabric.xmlrpc.base.Data;
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -59,6 +66,8 @@ public class UserInfoController {
|
|
|
UserOrganizationFacade userOrganizationFacade;
|
|
|
@Autowired
|
|
|
UserAuthenticationFacade userAuthenticationFacade;
|
|
|
+ @Autowired
|
|
|
+ OpenedProductsFacade openedProductsFacade;
|
|
|
|
|
|
private final String MSG_SUCCESS = "操作成功!";
|
|
|
private final String MSG_ERROR = "操作失败!";
|
|
@@ -75,7 +84,7 @@ public class UserInfoController {
|
|
|
return RespDTO.onSuc(user);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "修改用户信息和机构信息以", notes = "用户信息和机构信息")
|
|
|
+ @ApiOperation(value = "修改用户信息和机构信息", notes = "用户信息和机构信息")
|
|
|
@PostMapping("/updateUserInfoAll")
|
|
|
@SysLogger("updateUserInfoAll")
|
|
|
public RespDTO<UserInfoOrganizationsVO> updateUserInfoAll(@Valid @RequestBody UserInfoOrganizationsVO userInfo){
|
|
@@ -217,32 +226,59 @@ public class UserInfoController {
|
|
|
return RespDTO.onSuc("绑定成功");
|
|
|
}
|
|
|
|
|
|
- //TODO
|
|
|
-/* @ApiOperation(value = "根据用户id查询已开通的功能", notes = "已开通信息")
|
|
|
+
|
|
|
+ @ApiOperation(value = "根据用户id查询已开通的功能", notes = "已开通信息")
|
|
|
@PostMapping("/getInformationAvailableByUserId")
|
|
|
- @SysLogger("getInformationAvailableByUserId")*/
|
|
|
-
|
|
|
- //TODO
|
|
|
- /*
|
|
|
+ @SysLogger("getInformationAvailableByUserId")
|
|
|
+ public RespDTO getInformationAvailableByUserId(Long userId){
|
|
|
+ List<UserAndProdutDTO> UserAndProdutData = openedProductsFacade.getInformationAvailableByUserId(userId);
|
|
|
+ return RespDTO.onSuc(UserAndProdutData);
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "根据用户id和产品id,启用和停用功能", notes = "开通信息")
|
|
|
@PostMapping("/startAndendByuserId")
|
|
|
- @SysLogger("startAndendByuserId")*/
|
|
|
+ @SysLogger("startAndendByuserId")
|
|
|
+ public RespDTO<StartAndendByUserIdVO> startAndendByuserId(StartAndendByUserIdVO startAndendByUserIdVO){
|
|
|
+ OpenedProducts openedProducts = new OpenedProducts();
|
|
|
+ openedProducts.setUserId(startAndendByUserIdVO.getUserId());
|
|
|
+ openedProducts.setProductId(startAndendByUserIdVO.getProductId());
|
|
|
+ openedProducts.setCreator("");
|
|
|
+ openedProducts.setGmtCreate(DateUtil.now());
|
|
|
+ openedProducts.setServiceStatus(startAndendByUserIdVO.getServiceStatus());
|
|
|
+ openedProductsFacade.startAndendByuserId(openedProducts);
|
|
|
+ return RespDTO.onSuc("");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//TODO
|
|
|
- /* @ApiOperation(value = "根据用户id和产品id,删除开通信息", notes = "删除开通信息")
|
|
|
+ @ApiOperation(value = "根据用户id和产品id,删除开通信息", notes = "删除开通信息")
|
|
|
@PostMapping("/delInformationAvailable")
|
|
|
- @SysLogger("delInformationAvailable")*/
|
|
|
+ @SysLogger("delInformationAvailable")
|
|
|
+ public RespDTO delInformationAvailable(Long userId , Long productId){
|
|
|
+ OpenedProducts openedProducts = new OpenedProducts();
|
|
|
+ openedProducts.setUserId(userId);
|
|
|
+ openedProducts.setProductId(productId);
|
|
|
+ openedProducts.setCreator("");
|
|
|
+ openedProducts.setGmtCreate(DateUtil.now());
|
|
|
+ openedProductsFacade.delInformationAvailable(openedProducts);
|
|
|
+ return RespDTO.onSuc("");
|
|
|
+ }
|
|
|
//TODO
|
|
|
- /* @ApiOperation(value = "根据用户id和产品id,修改开通时间", notes = "修改开通时间")
|
|
|
- @PostMapping("/delInformationAvailable")
|
|
|
- @SysLogger("delInformationAvailable")*/
|
|
|
+ @ApiOperation(value = "根据用户id和产品id,修改开通时间", notes = "修改开通时间")
|
|
|
+ @PostMapping("/modifyOpeningTime")
|
|
|
+ @SysLogger("modifyOpeningTime")
|
|
|
+ public RespDTO<ModifyOpeningTimeVO> modifyOpeningTime(ModifyOpeningTimeVO modifyOpeningTimeVO){
|
|
|
+ OpenedProducts openedProducts = new OpenedProducts();
|
|
|
+ openedProducts.setUserId(modifyOpeningTimeVO.getUserId());
|
|
|
+ openedProducts.setProductId(modifyOpeningTimeVO.getProductId());
|
|
|
+ openedProducts.setStartTime(modifyOpeningTimeVO.getStartTime());
|
|
|
+ openedProducts.setEndTime(modifyOpeningTimeVO.getEndTime());
|
|
|
+ openedProducts.setCreator("");
|
|
|
+ openedProducts.setGmtCreate(DateUtil.now());
|
|
|
+ openedProductsFacade.modifyOpeningTime(openedProducts);
|
|
|
+ return RespDTO.onSuc("");
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
}
|
|
|
|