25 changed files with 1398 additions and 44 deletions
@ -0,0 +1,90 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.activity.ActBannerDTO; |
|||
import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.item.result.*; |
|||
import com.elink.esua.epdc.service.ActInfoService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 移动端接口-项目模块 |
|||
* @Author LPF |
|||
* @Date 2019/11/18 13:32 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("heart/act") |
|||
public class ApiAppActInfoController { |
|||
|
|||
@Autowired |
|||
private ActInfoService actInfoService; |
|||
|
|||
|
|||
/** |
|||
* 活动列表 |
|||
* @Params: [ formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.ItemResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("list") |
|||
public Result<List<ActInfoAppResultDTO>> listItems(ActInfoAppFormDTO formDto) { |
|||
return actInfoService.listItems(formDto); |
|||
} |
|||
/** |
|||
* 活动列表 |
|||
* @Params: [ formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.ItemResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("signupList") |
|||
public Result<List<ActInfoAppResultDTO>> signupListItems(ActInfoAppFormDTO formDto) { |
|||
return actInfoService.signupListItems(formDto); |
|||
} |
|||
|
|||
/** |
|||
* 项目详情 |
|||
* @Params: [id] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.item.result.ItemDetailResultDTO> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("detail/{id}") |
|||
public Result<ActInfoDetailAppResultDTO> detail(@PathVariable String id) { |
|||
return actInfoService.getDetail(id); |
|||
} |
|||
|
|||
/** |
|||
* 项目详情 |
|||
* @Params: [id] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.item.result.ItemDetailResultDTO> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("rejectDetail/{id}") |
|||
public Result<ActInfoDetailAppResultDTO> rejectDetail(@PathVariable String id) { |
|||
return actInfoService.getRejectDetail(id); |
|||
} |
|||
|
|||
/** |
|||
* 项目详情 |
|||
* @Params: [id] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.item.result.ItemDetailResultDTO> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("cancelDetail/{id}") |
|||
public Result<ActInfoDetailAppResultDTO> cancelDetail(@PathVariable String id) { |
|||
return actInfoService.getCancelDetail(id); |
|||
} |
|||
@GetMapping("banner/list") |
|||
public Result<List<ActBannerDTO>> bannerList() { |
|||
return actInfoService.getBannerList(); |
|||
} |
|||
} |
@ -0,0 +1,73 @@ |
|||
package com.elink.esua.epdc.feign; |
|||
|
|||
import com.elink.esua.epdc.activity.ActBannerDTO; |
|||
import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO; |
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.config.FeignRequestInterceptor; |
|||
import com.elink.esua.epdc.dto.item.ItemEvaluateDeptDTO; |
|||
import com.elink.esua.epdc.dto.item.form.*; |
|||
import com.elink.esua.epdc.dto.item.result.*; |
|||
import com.elink.esua.epdc.feign.fallback.ActInfoFeignClientFallback; |
|||
import com.elink.esua.epdc.feign.fallback.WorkItemFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 项目模块调用-移动app端 |
|||
* @Author LPF |
|||
* @Date 2019/11/18 16:39 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_HEART_SERVER, fallback = ActInfoFeignClientFallback.class, configuration = FeignRequestInterceptor.class) |
|||
public interface ActInfoFeignClient { |
|||
|
|||
|
|||
|
|||
/** |
|||
* 活动列表 |
|||
* @Params: [formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.ActInfoAppFormDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:42 |
|||
*/ |
|||
@GetMapping(value = "heart/appactinfo/list", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<ActInfoAppResultDTO>> listItems(ActInfoAppFormDTO formDto); |
|||
|
|||
/** |
|||
* 活动列表(已报名) |
|||
* @Params: [formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.ActInfoAppFormDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:42 |
|||
*/ |
|||
@GetMapping(value = "heart/appactinfo/signupList", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<ActInfoAppResultDTO>> signupListItems(ActInfoAppFormDTO formDto); |
|||
/** |
|||
* 项目详情 |
|||
* @Params: [formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.ItemResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:42 |
|||
*/ |
|||
@GetMapping(value = "heart/appactinfo/detail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<ActInfoDetailAppResultDTO> getDetail(@PathVariable String id); |
|||
|
|||
@GetMapping(value = "heart/appactinfo/rejectdetail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<ActInfoDetailAppResultDTO> getRejectDetail(@PathVariable String id); |
|||
|
|||
@GetMapping(value = "heart/appactinfo/canceldetail/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<ActInfoDetailAppResultDTO> getCancelDetail(@PathVariable String id); |
|||
|
|||
@GetMapping(value = "heart/actbanner/bannerlist", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<ActBannerDTO>> getBannerList(); |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.elink.esua.epdc.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.activity.ActBannerDTO; |
|||
import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO; |
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.item.ItemEvaluateDeptDTO; |
|||
import com.elink.esua.epdc.dto.item.form.*; |
|||
import com.elink.esua.epdc.dto.item.result.*; |
|||
import com.elink.esua.epdc.feign.ActInfoFeignClient; |
|||
import com.elink.esua.epdc.feign.WorkItemFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author LPF |
|||
* @Date 2019/11/18 16:39 |
|||
*/ |
|||
@Component |
|||
public class ActInfoFeignClientFallback implements ActInfoFeignClient { |
|||
|
|||
|
|||
@Override |
|||
public Result<List<ActInfoAppResultDTO>> listItems(ActInfoAppFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "listItems", formDto); |
|||
} |
|||
@Override |
|||
public Result<List<ActInfoAppResultDTO>> signupListItems(ActInfoAppFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "signupListItems", formDto); |
|||
} |
|||
@Override |
|||
public Result<ActInfoDetailAppResultDTO> getDetail(@PathVariable String id) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getDetail", id); |
|||
} |
|||
@Override |
|||
public Result<ActInfoDetailAppResultDTO> getRejectDetail(@PathVariable String id) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getRejectDetail", id); |
|||
} |
|||
@Override |
|||
public Result<ActInfoDetailAppResultDTO> getCancelDetail(@PathVariable String id) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getCancelDetail", id); |
|||
} |
|||
@Override |
|||
public Result<List<ActBannerDTO>> getBannerList() { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getBannerList"); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,52 @@ |
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.activity.ActBannerDTO; |
|||
import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.item.result.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 项目模块-移动App端 |
|||
* @Author LPF |
|||
* @Date 2019/11/18 13:34 |
|||
*/ |
|||
public interface ActInfoService { |
|||
|
|||
|
|||
/** |
|||
* 活动列表 |
|||
* @Params: [userDetail, formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.ItemResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:37 |
|||
*/ |
|||
Result<List<ActInfoAppResultDTO>> listItems(ActInfoAppFormDTO formDto); |
|||
/** |
|||
* 活动列表(已报名) |
|||
* @Params: [userDetail, formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.ItemResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:37 |
|||
*/ |
|||
Result<List<ActInfoAppResultDTO>> signupListItems(ActInfoAppFormDTO formDto); |
|||
/** |
|||
* 项目详情 |
|||
* @Params: [userDetail, itemId] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.item.result.ItemDetailResultDTO> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
Result<ActInfoDetailAppResultDTO> getDetail(String itemId); |
|||
|
|||
Result<ActInfoDetailAppResultDTO> getRejectDetail(String itemId); |
|||
|
|||
Result<ActInfoDetailAppResultDTO> getCancelDetail(String itemId); |
|||
|
|||
Result<List<ActBannerDTO>> getBannerList(); |
|||
|
|||
|
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.activity.ActBannerDTO; |
|||
import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO; |
|||
import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.item.ItemEvaluateDeptDTO; |
|||
import com.elink.esua.epdc.dto.item.form.*; |
|||
import com.elink.esua.epdc.dto.item.result.*; |
|||
import com.elink.esua.epdc.feign.ActInfoFeignClient; |
|||
import com.elink.esua.epdc.feign.WorkItemFeignClient; |
|||
import com.elink.esua.epdc.service.ActInfoService; |
|||
import com.elink.esua.epdc.service.WorkItemService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 项目模块-移动app端 |
|||
* @Author LPF |
|||
* @Date 2019/11/18 16:34 |
|||
*/ |
|||
@Service |
|||
public class ActInfoServiceImpl implements ActInfoService { |
|||
|
|||
@Autowired |
|||
private ActInfoFeignClient actInfoFeignClient; |
|||
|
|||
|
|||
|
|||
@Override |
|||
public Result<List<ActInfoAppResultDTO>> listItems(ActInfoAppFormDTO formDto) { |
|||
return actInfoFeignClient.listItems(formDto); |
|||
} |
|||
@Override |
|||
public Result<List<ActInfoAppResultDTO>> signupListItems(ActInfoAppFormDTO formDto) { |
|||
return actInfoFeignClient.signupListItems(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result<ActInfoDetailAppResultDTO> getDetail(String itemId) { |
|||
return actInfoFeignClient.getDetail(itemId); |
|||
} |
|||
@Override |
|||
public Result<ActInfoDetailAppResultDTO> getRejectDetail(String itemId) { |
|||
return actInfoFeignClient.getRejectDetail(itemId); |
|||
} |
|||
@Override |
|||
public Result<ActInfoDetailAppResultDTO> getCancelDetail(String itemId) { |
|||
return actInfoFeignClient.getCancelDetail(itemId); |
|||
} |
|||
@Override |
|||
public Result<List<ActBannerDTO>> getBannerList() { |
|||
return actInfoFeignClient.getBannerList(); |
|||
} |
|||
} |
@ -0,0 +1,66 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.activity.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 活动信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-11 |
|||
*/ |
|||
@Data |
|||
public class ActInfoAppFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 页码,从1开始 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private int pageIndex; |
|||
|
|||
private Long userId; |
|||
|
|||
private String id; |
|||
/** |
|||
* 页容量,默认20页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于必须大于0") |
|||
private int pageSize = 20; |
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 活动列表类型 |
|||
*/ |
|||
@NotBlank(message = "类型不能为空") |
|||
private String actType; |
|||
|
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.activity.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 活动信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-11 |
|||
*/ |
|||
@Data |
|||
public class ActInfoAppResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 活动开始时间 |
|||
*/ |
|||
private Date actStartTime; |
|||
|
|||
/** |
|||
* 活动结束时间 |
|||
*/ |
|||
private Date actEndTime; |
|||
|
|||
/** |
|||
* 活动地点 |
|||
*/ |
|||
private String actAddress; |
|||
|
|||
|
|||
/** |
|||
* 活动名额 |
|||
*/ |
|||
private Integer actQuota; |
|||
|
|||
/** |
|||
* 已报名人数 |
|||
*/ |
|||
private Integer signupNum; |
|||
|
|||
/** |
|||
* 活动打卡人数 |
|||
*/ |
|||
private Integer clockNum; |
|||
|
|||
/** |
|||
* 活动当前状态(0-报名中,1-已报满,2-未开始,3-进行中,4-已结束) |
|||
*/ |
|||
private String actCurrentState; |
|||
|
|||
/** |
|||
* 用户报名状态(0-未报名,1已报名) |
|||
*/ |
|||
private String signupFlag; |
|||
|
|||
/** |
|||
* 用户打卡状态(0-未打卡,1-已打卡) |
|||
*/ |
|||
private String clockFlag; |
|||
/** |
|||
* 活动用户关联表ID |
|||
*/ |
|||
private String actUserId; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,219 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.activity.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 活动信息表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-11 |
|||
*/ |
|||
@Data |
|||
public class ActInfoDetailAppResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 活动头图 |
|||
*/ |
|||
private String headPic; |
|||
|
|||
/** |
|||
* 报名开始时间 |
|||
*/ |
|||
private Date signupStartTime; |
|||
/** |
|||
*活动报名默认状态 |
|||
*/ |
|||
private String actUserDefaultState; |
|||
|
|||
/** |
|||
* 报名截止时间 |
|||
*/ |
|||
private Date signupEndTime; |
|||
|
|||
/** |
|||
* 活动开始时间 |
|||
*/ |
|||
private Date actStartTime; |
|||
|
|||
/** |
|||
* 活动结束时间 |
|||
*/ |
|||
private Date actEndTime; |
|||
|
|||
/** |
|||
* 打卡开始时间 |
|||
*/ |
|||
private Date signinStartTime; |
|||
|
|||
/** |
|||
* 打卡截止时间 |
|||
*/ |
|||
private Date signinEndTime; |
|||
|
|||
|
|||
/** |
|||
* 活动地点 |
|||
*/ |
|||
private String actAddress; |
|||
|
|||
/** |
|||
* 活动位置经度 |
|||
*/ |
|||
private BigDecimal actLongitude; |
|||
|
|||
/** |
|||
* 活动位置纬度 |
|||
*/ |
|||
private BigDecimal actLatitude; |
|||
|
|||
/** |
|||
* 活动签到打卡地点 |
|||
*/ |
|||
private String signinAddress; |
|||
|
|||
/** |
|||
* 活动签到打卡位置经度 |
|||
*/ |
|||
private BigDecimal signinLongitude; |
|||
|
|||
/** |
|||
* 活动签到打卡位置纬度 |
|||
*/ |
|||
private BigDecimal signinLatitude; |
|||
|
|||
/** |
|||
* 活动签到打卡半径(单位:米) |
|||
*/ |
|||
private Integer clockRadius; |
|||
|
|||
/** |
|||
* 活动名额 |
|||
*/ |
|||
private Integer actQuota; |
|||
|
|||
/** |
|||
* 已报名人数 |
|||
*/ |
|||
private Integer signupNum; |
|||
|
|||
/** |
|||
* 活动打卡人数 |
|||
*/ |
|||
private Integer clockNum; |
|||
|
|||
/** |
|||
* 活动分享数 |
|||
*/ |
|||
private Integer actShareNum; |
|||
|
|||
/** |
|||
* 活动浏览数 |
|||
*/ |
|||
private Integer actBrowseNum; |
|||
|
|||
/** |
|||
* 联系人 |
|||
*/ |
|||
private String contacts; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String tel; |
|||
|
|||
/** |
|||
* 招募要求 |
|||
*/ |
|||
private String requirement; |
|||
|
|||
/** |
|||
* 活动内容 |
|||
*/ |
|||
private String actContent; |
|||
|
|||
/** |
|||
* 活动发布状态(0-下架,1上架) |
|||
*/ |
|||
private String actStatus; |
|||
|
|||
/** |
|||
* 活动发布时间 |
|||
*/ |
|||
private Date publishTime; |
|||
|
|||
/** |
|||
* 活动主办方 |
|||
*/ |
|||
private String sponsor; |
|||
|
|||
/** |
|||
* 创建部门ID |
|||
*/ |
|||
private Long deptId; |
|||
|
|||
/** |
|||
* 活动惩罚积分 |
|||
*/ |
|||
private Integer punishmentPoints; |
|||
|
|||
/** |
|||
* 活动奖励积分 |
|||
*/ |
|||
private Integer reward; |
|||
|
|||
/** |
|||
* 活动名额类型 |
|||
*/ |
|||
private Integer actQuotaCategory; |
|||
|
|||
/** |
|||
* 活动下架原因 |
|||
*/ |
|||
private String cancelReason; |
|||
|
|||
private String failureReason; |
|||
|
|||
/** |
|||
* 用户当前状态(0-我要报名,1-取消报名,2-已报满,3-未开始,4-我要打卡,5-更新打卡,6-已结束,7-已取消) |
|||
*/ |
|||
private String currentUserStatus; |
|||
/** |
|||
* 用户认证志愿者标识(0-未认证,1-已认证) |
|||
*/ |
|||
private String userVolunteerFlag; |
|||
|
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.elink.esua.epdc.modules.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.logs.PointsLogsDTO; |
|||
import com.elink.esua.epdc.modules.feign.fallback.PointsFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
/** |
|||
* |
|||
* 调用用户模块 |
|||
* |
|||
* @Author:wanggongfeng |
|||
* @Date:2019/12/16 17:36 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_POINTS_SERVER, fallback = PointsFeignClientFallback.class) |
|||
public interface PointsFeignClient { |
|||
|
|||
@PostMapping("/points/pointslogs/addPointsLog") |
|||
Result addPointsLog(@RequestBody PointsLogsDTO dto); |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.elink.esua.epdc.modules.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.logs.PointsLogsDTO; |
|||
import com.elink.esua.epdc.modules.feign.PointsFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
|
|||
/** |
|||
* @Author:wanggongfeng |
|||
* @Date:2019/12/16 15:11 |
|||
*/ |
|||
@Component |
|||
public class PointsFeignClientFallback implements PointsFeignClient { |
|||
|
|||
|
|||
@Override |
|||
public Result addPointsLog(PointsLogsDTO dto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_POINTS_SERVER, "addPointsLog", dto); |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.elink.esua.epdc.modules.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.UserDTO; |
|||
import com.elink.esua.epdc.modules.feign.UserInfoFeignClient; |
|||
|
|||
/** |
|||
* @author 86185 |
|||
*/ |
|||
public class UserInfoFeignClientFallback implements UserInfoFeignClient { |
|||
@Override |
|||
public Result<UserDTO> getUserInfoById(String userId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getUserInfoById", userId); |
|||
} |
|||
@Override |
|||
public Result updateUserInfo(UserDTO userDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "updateUserInfo", userDTO); |
|||
} |
|||
} |
Loading…
Reference in new issue