|
@@ -2,9 +2,11 @@ package com.caimei365.user.controller;
|
|
|
|
|
|
import com.caimei365.user.model.ResponseJson;
|
|
import com.caimei365.user.model.ResponseJson;
|
|
import com.caimei365.user.model.dto.ClubUpdateDto;
|
|
import com.caimei365.user.model.dto.ClubUpdateDto;
|
|
|
|
+import com.caimei365.user.model.vo.BeansHistoryVo;
|
|
import com.caimei365.user.service.ClubService;
|
|
import com.caimei365.user.service.ClubService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -18,7 +20,7 @@ import java.util.Map;
|
|
* @author : Charles
|
|
* @author : Charles
|
|
* @date : 2021/3/4
|
|
* @date : 2021/3/4
|
|
*/
|
|
*/
|
|
-@Api(tags="机构用户API")
|
|
|
|
|
|
+@Api(tags = "机构用户API")
|
|
@RestController
|
|
@RestController
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
@RequestMapping("/user/club")
|
|
@RequestMapping("/user/club")
|
|
@@ -28,12 +30,11 @@ public class ClubApi {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据用户Id查询机构资料
|
|
* 根据用户Id查询机构资料
|
|
- *
|
|
|
|
|
|
+ * <p>
|
|
* spi旧接口:/user/club/applicationData
|
|
* spi旧接口:/user/club/applicationData
|
|
*
|
|
*
|
|
* @param userId 用户Id
|
|
* @param userId 用户Id
|
|
- *
|
|
|
|
- * @return Map(userPo,clubPo)
|
|
|
|
|
|
+ * @return Map(userPo, clubPo)
|
|
*/
|
|
*/
|
|
@ApiOperation("查询机构资料")
|
|
@ApiOperation("查询机构资料")
|
|
@ApiImplicitParam(required = true, name = "userId", value = "用户Id")
|
|
@ApiImplicitParam(required = true, name = "userId", value = "用户Id")
|
|
@@ -44,48 +45,47 @@ public class ClubApi {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 修改机构资料
|
|
* 修改机构资料
|
|
- *
|
|
|
|
|
|
+ * <p>
|
|
* spi旧接口:/operation/modifiedData
|
|
* spi旧接口:/operation/modifiedData
|
|
- *
|
|
|
|
- * @param club ClubUpdateDto:{
|
|
|
|
- * clubId 机构ID
|
|
|
|
- * userId 用户ID
|
|
|
|
- * name 机构名称
|
|
|
|
- * shortName 机构简称(shortName)
|
|
|
|
- * contractEmail 邮箱(contractEmail1)
|
|
|
|
- * contractPhone 固定电话
|
|
|
|
- * linkMan 联系人(linkMan1)
|
|
|
|
- * provinceId 省Id
|
|
|
|
- * cityId 市Id
|
|
|
|
- * townId 县区Id
|
|
|
|
- * address 地址
|
|
|
|
- * shopPhoto 门头照(headpic)
|
|
|
|
- * businessLicense 营业执照(businessLicenseImage)
|
|
|
|
- * socialCreditCode 统一社会信用代码(socialCreditCode)
|
|
|
|
- * firstClubType 一级分类:医美=1和生美=2
|
|
|
|
- * secondClubType 医美的二级分类:诊所=1、门诊=2、医院=3。 生美没有二级分类
|
|
|
|
- * department 医美分类下的门诊和医院则需要填写科室
|
|
|
|
- * medicalPracticeLicense 医美分类必须上传医疗执业许可证(medicalPracticeLicenseImg)
|
|
|
|
- * mainProduct 主打项目(mainpro)
|
|
|
|
- * fax 传真
|
|
|
|
- * profile 公司简介
|
|
|
|
- * }
|
|
|
|
- * @return ClubUpdateDto
|
|
|
|
|
|
+ *
|
|
|
|
+ * @param club ClubUpdateDto:{
|
|
|
|
+ * clubId 机构ID
|
|
|
|
+ * userId 用户ID
|
|
|
|
+ * name 机构名称
|
|
|
|
+ * shortName 机构简称(shortName)
|
|
|
|
+ * contractEmail 邮箱(contractEmail1)
|
|
|
|
+ * contractPhone 固定电话
|
|
|
|
+ * linkMan 联系人(linkMan1)
|
|
|
|
+ * provinceId 省Id
|
|
|
|
+ * cityId 市Id
|
|
|
|
+ * townId 县区Id
|
|
|
|
+ * address 地址
|
|
|
|
+ * shopPhoto 门头照(headpic)
|
|
|
|
+ * businessLicense 营业执照(businessLicenseImage)
|
|
|
|
+ * socialCreditCode 统一社会信用代码(socialCreditCode)
|
|
|
|
+ * firstClubType 一级分类:医美=1和生美=2
|
|
|
|
+ * secondClubType 医美的二级分类:诊所=1、门诊=2、医院=3。 生美没有二级分类
|
|
|
|
+ * department 医美分类下的门诊和医院则需要填写科室
|
|
|
|
+ * medicalPracticeLicense 医美分类必须上传医疗执业许可证(medicalPracticeLicenseImg)
|
|
|
|
+ * mainProduct 主打项目(mainpro)
|
|
|
|
+ * fax 传真
|
|
|
|
+ * profile 公司简介
|
|
|
|
+ * }
|
|
|
|
+ * @return ClubUpdateDto
|
|
*/
|
|
*/
|
|
- @ApiOperation("更新机构资料")
|
|
|
|
|
|
+ @ApiOperation("更新机构资料")
|
|
@PostMapping("/info/update")
|
|
@PostMapping("/info/update")
|
|
public ResponseJson<ClubUpdateDto> updateClubUserInfo(ClubUpdateDto club) {
|
|
public ResponseJson<ClubUpdateDto> updateClubUserInfo(ClubUpdateDto club) {
|
|
- return clubService.updateClubUserInfo(club);
|
|
|
|
|
|
+ return clubService.updateClubUserInfo(club);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 机构个人中心
|
|
* 机构个人中心
|
|
- *
|
|
|
|
|
|
+ * <p>
|
|
* spi旧接口:/personalCenter/myCentre
|
|
* spi旧接口:/personalCenter/myCentre
|
|
*
|
|
*
|
|
* @param userId 用户Id
|
|
* @param userId 用户Id
|
|
- *
|
|
|
|
- * @return Map(userPo,clubPo)
|
|
|
|
|
|
+ * @return Map(userPo, clubPo)
|
|
*/
|
|
*/
|
|
@ApiOperation("机构个人中心(小程序-未调试)")
|
|
@ApiOperation("机构个人中心(小程序-未调试)")
|
|
@ApiImplicitParam(required = true, name = "userId", value = "用户Id")
|
|
@ApiImplicitParam(required = true, name = "userId", value = "用户Id")
|
|
@@ -94,5 +94,40 @@ public class ClubApi {
|
|
return clubService.getClubHomeData(userId);
|
|
return clubService.getClubHomeData(userId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 赠送采美豆弹窗
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("赠送采美豆弹窗")
|
|
|
|
+ @ApiImplicitParam(required = true, name = "userId", value = "用户Id")
|
|
|
|
+ @GetMapping("/obtain/beans")
|
|
|
|
+ public ResponseJson<BeansHistoryVo> beansPopUps(Integer userId) {
|
|
|
|
+ if (userId == null) {
|
|
|
|
+ return ResponseJson.error("参数异常", null);
|
|
|
|
+ }
|
|
|
|
+ return clubService.beansPopUps(userId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 采美豆收支明细
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("采美豆收支明细")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(required = true, name = "userId", value = "用户Id"),
|
|
|
|
+ @ApiImplicitParam(required = true, name = "year", value = "年份"),
|
|
|
|
+ @ApiImplicitParam(required = true, name = "month", value = "月份"),
|
|
|
|
+ @ApiImplicitParam(required = true, name = "type", value = "收支类型:1收入,2支出"),
|
|
|
|
+ @ApiImplicitParam(required = false, name = "pageNum", value = "第几页"),
|
|
|
|
+ @ApiImplicitParam(required = false, name = "pageSize", value = "一页多少条")
|
|
|
|
+ })
|
|
|
|
+ @GetMapping("/beans/history")
|
|
|
|
+ public ResponseJson<Map<String, Object>> beansHistory(Integer userId, Integer year, Integer month, Integer type,
|
|
|
|
+ @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
|
|
|
|
+ if (userId == null || year == null || month == null) {
|
|
|
|
+ return ResponseJson.error("参数异常",null);
|
|
|
|
+ }
|
|
|
|
+ return clubService.beansHistory(userId, year, month, type, pageNum, pageSize);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|