629 changed files with 2448 additions and 39716 deletions
@ -1,52 +0,0 @@ |
|||
--------标记一下这个已经随工作端上线 |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed MODIFY COLUMN `STATE` VARCHAR(1) NULL COMMENT '状态 0-认证失败'; |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed MODIFY COLUMN `CADRE_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 0 NULL COMMENT '干部下沉标识 0-否,1-是'; |
|||
ALTER TABLE esua_epdc_user.epdc_user_authenticate_history ADD AUTHENTICATED_TYPE varchar(2) NOT NULL COMMENT '认证类别(0-居民认证,1-党员认证,2-志愿者认证)'; |
|||
------------------------------------------------ |
|||
|
|||
CREATE TABLE `epdc_handle_category` ( |
|||
`ID` varchar(32) NOT NULL COMMENT '主键', |
|||
`CATEGORY_VAL` int(11) NOT NULL COMMENT '处理类别值', |
|||
`CATEGORY_LABEL` varchar(20) NOT NULL COMMENT '处理类别显示信息', |
|||
`AVAILABLE` varchar(1) NOT NULL DEFAULT '1' COMMENT '可用状态(0-不可用,1-可用)', |
|||
`SORT` int(11) NOT NULL DEFAULT '0' COMMENT '排序', |
|||
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识 0:未删除,1:已删除', |
|||
`CATEGORY_CODE` varchar(32) NOT NULL COMMENT '处理类型编码', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='处理类别表' |
|||
|
|||
|
|||
CREATE TABLE `epdc_role_category` ( |
|||
`ID` varchar(32) NOT NULL COMMENT '主键', |
|||
`ROLE_ID` varchar(32) NOT NULL COMMENT '角色ID', |
|||
`CATEGORY_ID` varchar(32) NOT NULL COMMENT '处理类别ID', |
|||
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识 0:未删除,1:已删除', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色和处理类别关系表' |
|||
|
|||
|
|||
ALTER TABLE EPDC_HANDLE_ROLE_CATEGORY COMMENT '角色和处理类别关系表';; |
|||
CREATE TABLE EPDC_HANDLE_ROLE_DEPT( |
|||
ID VARCHAR(32) NOT NULL COMMENT '主键' , |
|||
ROLE_ID VARCHAR(32) NOT NULL COMMENT '角色ID' , |
|||
DEPT_ID VARCHAR(32) NOT NULL COMMENT '部门ID' , |
|||
DEPT_TYPE VARCHAR(50) NOT NULL COMMENT '部门机构类型' , |
|||
REVISION INT COMMENT '乐观锁' , |
|||
CREATED_BY VARCHAR(32) COMMENT '创建人' , |
|||
CREATED_TIME DATETIME COMMENT '创建时间' , |
|||
UPDATED_BY VARCHAR(32) COMMENT '更新人' , |
|||
UPDATED_TIME DATETIME COMMENT '更新时间' , |
|||
PRIMARY KEY (ID) |
|||
) COMMENT = '处理部门角色权限表 处理部门角色权限表';; |
|||
|
|||
ALTER TABLE EPDC_HANDLE_ROLE_DEPT COMMENT '处理部门角色权限表';; |
|||
@ -1,14 +0,0 @@ |
|||
version: '3.7' |
|||
services: |
|||
web: |
|||
image: nginx |
|||
ports: |
|||
- 443:443 |
|||
volumes: |
|||
- /mnt/nginx/html:/usr/share/nginx/html |
|||
- /mnt/nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro |
|||
- /mnt/nginx/conf.d:/etc/nginx/conf.d:ro |
|||
- /mnt/nginx/logs:/var/log/nginx |
|||
restart: always |
|||
container_name: nginx_master |
|||
|
|||
@ -1,15 +0,0 @@ |
|||
version: '3.7' |
|||
services: |
|||
web: |
|||
image: nginx |
|||
ports: |
|||
- 443:443 |
|||
volumes: |
|||
- /opt/docker/nginx/html:/usr/share/nginx/html |
|||
- /opt/docker/nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro |
|||
- /opt/docker/nginx/conf.d:/etc/nginx/conf.d:ro |
|||
- /opt/docker/nginx/logs:/var/log/nginx |
|||
- /opt/docker/nginx/cert:/etc/nginx/cert:ro |
|||
restart: always |
|||
container_name: nginx_master |
|||
|
|||
@ -1,15 +0,0 @@ |
|||
package com.elink.esua.epdc.constant; |
|||
|
|||
/** |
|||
* TypeKey 常量 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2019/12/18 10:10 |
|||
*/ |
|||
public interface RoleTypeKeyConstant { |
|||
|
|||
/** |
|||
* 角色:网格长 |
|||
*/ |
|||
String ROLE_GRID_LEADER = "gridLeader"; |
|||
} |
|||
@ -1,50 +0,0 @@ |
|||
package com.elink.esua.epdc.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 机构层级关系与机构负责人 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2019/12/18 10:55 |
|||
*/ |
|||
@Data |
|||
public class DeptLevelAndLeaderDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 8264059305193996215L; |
|||
|
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private Long deptId; |
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
/** |
|||
* 父所有部门ID |
|||
*/ |
|||
private String parentDeptIds; |
|||
/** |
|||
* 父所有部门 |
|||
*/ |
|||
private String parentDeptNames; |
|||
/** |
|||
* 所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
/** |
|||
* 部门负责人名称 |
|||
*/ |
|||
private String leaderName; |
|||
/** |
|||
* 部门负责人名称 |
|||
*/ |
|||
private String typeKey; |
|||
} |
|||
@ -1,63 +0,0 @@ |
|||
package com.elink.esua.epdc.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.handleroledept.form.HandleRoleDeptFormDTO; |
|||
import com.elink.esua.epdc.dto.rulecategory.form.HandleRoleCategoryFormDTO; |
|||
import com.elink.esua.epdc.feign.fallback.EventFeignClientFallback; |
|||
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; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2019/12/24 09:28 |
|||
* @Description: 事件接口 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_EVENTS_SERVER, fallback = EventFeignClientFallback.class) |
|||
public interface EventFeignClient { |
|||
|
|||
/** |
|||
* @param orgTypeFormDTO |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 保存项目处理类型权限 |
|||
* @Date 2019/12/24 17:17 |
|||
**/ |
|||
@PostMapping(value = "events/handlerolecategory/saveOrUpdate", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result saveOrUpdateHandleCategory(HandleRoleCategoryFormDTO orgTypeFormDTO); |
|||
|
|||
/** |
|||
* @param roleId |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < java.lang.String>> |
|||
* @Author yinzuomei |
|||
* @Description 查询角色对应的项目处理类型权限 |
|||
* @Date 2019/12/24 17:17 |
|||
**/ |
|||
@GetMapping(value = "events/handlerolecategory/queryCategoryIdList/{roleId}") |
|||
Result<List<String>> queryCategoryIdList(@PathVariable("roleId") Long roleId); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 保存角色对应可吹哨部门权限 |
|||
* @Date 2019/12/26 14:09 |
|||
**/ |
|||
@PostMapping(value = "events/handleroledept/saveOrUpdate", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result saveOrUpdateHandleRoleDept(HandleRoleDeptFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param roleId |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < java.lang.Long>> |
|||
* @Author yinzuomei |
|||
* @Description 查询角色对应可吹哨部门权限 |
|||
* @Date 2019/12/26 14:09 |
|||
**/ |
|||
@GetMapping(value = "events/handleroledept/queryWhistleDeptIdList/{roleId}") |
|||
Result<List<Long>> queryWhistleDeptIdList(@PathVariable("roleId")Long roleId); |
|||
} |
|||
@ -1,41 +0,0 @@ |
|||
package com.elink.esua.epdc.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.handleroledept.form.HandleRoleDeptFormDTO; |
|||
import com.elink.esua.epdc.dto.rulecategory.form.HandleRoleCategoryFormDTO; |
|||
import com.elink.esua.epdc.feign.EventFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yinzuomei |
|||
* @Date 2019/12/24 9:45 |
|||
*/ |
|||
@Component |
|||
public class EventFeignClientFallback implements EventFeignClient { |
|||
|
|||
@Override |
|||
public Result saveOrUpdateHandleCategory(HandleRoleCategoryFormDTO orgTypeFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "saveOrUpdate", orgTypeFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<String>> queryCategoryIdList(Long roleId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "queryCategoryIdList", roleId); |
|||
} |
|||
|
|||
@Override |
|||
public Result saveOrUpdateHandleRoleDept(HandleRoleDeptFormDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "saveOrUpdate", formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<Long>> queryWhistleDeptIdList(Long roleId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "queryWhistleDeptIdList", roleId); |
|||
} |
|||
|
|||
} |
|||
@ -1,178 +0,0 @@ |
|||
package com.elink.esua.epdc.common.token.util; |
|||
|
|||
import org.apache.commons.lang3.StringUtils; |
|||
|
|||
import java.text.ParseException; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Calendar; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 用户工具类 |
|||
* |
|||
* @author wanggongfeng |
|||
* @Date 19-12-16 |
|||
*/ |
|||
public class IdentityNoAnalysisUtil { |
|||
/** |
|||
* 15位身份证号 |
|||
*/ |
|||
private static final Integer FIFTEEN_ID_CARD=15; |
|||
/** |
|||
* 18位身份证号 |
|||
*/ |
|||
private static final Integer EIGHTEEN_ID_CARD=18; |
|||
private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|||
|
|||
/** |
|||
* 从身份证号码中获取生日 |
|||
* @param idno |
|||
* @return null表示idno错误,未获取到生日 |
|||
*/ |
|||
public static Date getBirthDay(String idno){ |
|||
if(!isValid(idno)){ |
|||
return null; |
|||
} |
|||
return toBirthDay(idno.substring(6, 14)); |
|||
} |
|||
|
|||
/** |
|||
* 根据身份证号获取性别 |
|||
* @param IDCard |
|||
* @return |
|||
*/ |
|||
public static String getSex(String IDCard){ |
|||
String sex =""; |
|||
if (StringUtils.isNotBlank(IDCard)){ |
|||
//15位身份证号
|
|||
if (IDCard.length() == FIFTEEN_ID_CARD){ |
|||
if (Integer.parseInt(IDCard.substring(14, 15)) % 2 == 0) { |
|||
sex = "女"; |
|||
} else { |
|||
sex = "男"; |
|||
} |
|||
//18位身份证号
|
|||
}else if(IDCard.length() == EIGHTEEN_ID_CARD){ |
|||
// 判断性别
|
|||
if (Integer.parseInt(IDCard.substring(16).substring(0, 1)) % 2 == 0) { |
|||
sex = "女"; |
|||
} else { |
|||
sex = "男"; |
|||
} |
|||
} |
|||
} |
|||
return sex; |
|||
} |
|||
|
|||
/** |
|||
* 根据身份证号获取年龄 |
|||
* @param IDCard |
|||
* @return |
|||
*/ |
|||
public static Integer getAge(String IDCard){ |
|||
Integer age = 0; |
|||
Date date = new Date(); |
|||
if (StringUtils.isNotBlank(IDCard)&& isValid(IDCard)){ |
|||
//15位身份证号
|
|||
if (IDCard.length() == FIFTEEN_ID_CARD){ |
|||
// 身份证上的年份(15位身份证为1980年前的)
|
|||
String uyear = "19" + IDCard.substring(6, 8); |
|||
// 身份证上的月份
|
|||
String uyue = IDCard.substring(8, 10); |
|||
// 当前年份
|
|||
String fyear = format.format(date).substring(0, 4); |
|||
// 当前月份
|
|||
String fyue = format.format(date).substring(5, 7); |
|||
if (Integer.parseInt(uyue) <= Integer.parseInt(fyue)) { |
|||
age = Integer.parseInt(fyear) - Integer.parseInt(uyear) + 1; |
|||
// 当前用户还没过生
|
|||
} else { |
|||
age = Integer.parseInt(fyear) - Integer.parseInt(uyear); |
|||
} |
|||
//18位身份证号
|
|||
}else if(IDCard.length() == EIGHTEEN_ID_CARD){ |
|||
// 身份证上的年份
|
|||
String year = IDCard.substring(6).substring(0, 4); |
|||
// 身份证上的月份
|
|||
String yue = IDCard.substring(10).substring(0, 2); |
|||
// 当前年份
|
|||
String fyear = format.format(date).substring(0, 4); |
|||
// 当前月份
|
|||
String fyue = format.format(date).substring(5, 7); |
|||
// 当前月份大于用户出身的月份表示已过生日
|
|||
if (Integer.parseInt(yue) <= Integer.parseInt(fyue)) { |
|||
age = Integer.parseInt(fyear) - Integer.parseInt(year) + 1; |
|||
// 当前用户还没过生日
|
|||
} else { |
|||
age = Integer.parseInt(fyear) - Integer.parseInt(year); |
|||
} |
|||
} |
|||
} |
|||
return age; |
|||
} |
|||
|
|||
/** |
|||
* 身份证验证 |
|||
* @param id 号码内容 |
|||
* @return 是否有效 |
|||
*/ |
|||
public static boolean isValid(String id){ |
|||
Boolean validResult = true; |
|||
//校验长度只能为15或18
|
|||
int len = id.length(); |
|||
if (len != FIFTEEN_ID_CARD && len != EIGHTEEN_ID_CARD){ |
|||
validResult = false; |
|||
} |
|||
//校验生日
|
|||
if (!validDate(id)){ |
|||
validResult = false; |
|||
} |
|||
return validResult; |
|||
} |
|||
|
|||
/** |
|||
* 校验生日 |
|||
* @param id |
|||
* @return |
|||
*/ |
|||
private static boolean validDate(String id) |
|||
{ |
|||
try |
|||
{ |
|||
String birth = id.length() == 15 ? "19" + id.substring(6, 12) : id.substring(6, 14); |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); |
|||
Date birthDate = sdf.parse(birth); |
|||
if (!birth.equals(sdf.format(birthDate))){ |
|||
return false; |
|||
} |
|||
} |
|||
catch (ParseException e) |
|||
{ |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
/** |
|||
* 转换成日期 |
|||
* @param birthday |
|||
* @return |
|||
*/ |
|||
private static Date toBirthDay(String birthday){ |
|||
try{ |
|||
Calendar calendar = Calendar.getInstance(); |
|||
calendar.set(Calendar.YEAR, Integer.parseInt(birthday.substring(0, 4))); |
|||
calendar.set(Calendar.MONTH, Integer.parseInt(birthday.substring(4, 6)) - 1);//月份从0开始,所以减1
|
|||
calendar.set(Calendar.DAY_OF_MONTH, Integer.parseInt(birthday.substring(6, 8))); |
|||
//以下设置意义不大
|
|||
calendar.set(Calendar.HOUR_OF_DAY, 0); |
|||
calendar.set(Calendar.MINUTE, 0); |
|||
calendar.set(Calendar.SECOND, 0); |
|||
calendar.set(Calendar.MILLISECOND, 0); |
|||
|
|||
return calendar.getTime(); |
|||
}catch (Exception e){ |
|||
return null; |
|||
} |
|||
} |
|||
} |
|||
@ -1,36 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.mybatis.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 部门冗余字段基类 |
|||
* |
|||
* @author rongchao |
|||
* @Date 19-12-18 |
|||
*/ |
|||
@Data |
|||
public abstract class DeptScope extends BaseEpdcEntity implements Serializable { |
|||
|
|||
/*** |
|||
*所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/*** |
|||
*所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/*** |
|||
*父所有部门 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/*** |
|||
*父所有部门 |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
} |
|||
@ -1,74 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.mybatis.utils; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 部门信息实体工具类 |
|||
* |
|||
* @author rongchao |
|||
* @Date 19-12-18 |
|||
*/ |
|||
public class DeptEntityUtils { |
|||
|
|||
@Data |
|||
public static class DeptDto { |
|||
/** |
|||
* 父所有部门ID |
|||
*/ |
|||
private String parentDeptIds; |
|||
/** |
|||
* 父所有部门 |
|||
*/ |
|||
private String parentDeptNames; |
|||
/** |
|||
* 所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
/** |
|||
* 所有部门 |
|||
*/ |
|||
private String allDeptNames; |
|||
} |
|||
|
|||
/** |
|||
* 装载部门信息 |
|||
* |
|||
* @param dto |
|||
* @param entityClass |
|||
* @return T |
|||
* @author rongchao |
|||
* @since 2019-12-18 |
|||
*/ |
|||
public static <T extends DeptScope> T loadDeptInfo(DeptDto dto, Class<T> entityClass) { |
|||
try { |
|||
T t = entityClass.newInstance(); |
|||
t.setAllDeptIds(dto.getAllDeptIds()); |
|||
t.setAllDeptNames(dto.getAllDeptNames()); |
|||
t.setParentDeptIds(dto.getParentDeptIds()); |
|||
t.setParentDeptNames(dto.getParentDeptNames()); |
|||
return t; |
|||
} catch (InstantiationException e) { |
|||
e.printStackTrace(); |
|||
} catch (IllegalAccessException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* 装载部门信息 |
|||
* |
|||
* @param dto |
|||
* @param entity |
|||
* @return void |
|||
* @author rongchao |
|||
* @since 2019-12-18 |
|||
*/ |
|||
public static <T extends DeptScope> void loadDeptInfo(DeptDto dto, T entity) { |
|||
entity.setAllDeptIds(dto.getAllDeptIds()); |
|||
entity.setAllDeptNames(dto.getAllDeptNames()); |
|||
entity.setParentDeptIds(dto.getParentDeptIds()); |
|||
entity.setParentDeptNames(dto.getParentDeptNames()); |
|||
} |
|||
} |
|||
@ -1,12 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.constant; |
|||
|
|||
/** |
|||
* Nacos配置中心相关常量 |
|||
* |
|||
* @author rongchao |
|||
* @Date 20-1-15 |
|||
*/ |
|||
public interface NacosConfigConstant { |
|||
|
|||
String CONFIG_GROUP = "EPDC_CONFIG_GROUP"; |
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.constant; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2019/12/16 19:38 |
|||
* @Description: 积分用 |
|||
*/ |
|||
public interface PointsConstant { |
|||
/** |
|||
* 手动调整积分编码 |
|||
*/ |
|||
String ruleCode ="hand_regulation"; |
|||
} |
|||
@ -1,41 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.constant; |
|||
|
|||
import org.apache.commons.codec.CharEncoding; |
|||
import org.springframework.http.MediaType; |
|||
|
|||
|
|||
/** |
|||
* 字符串常量 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2019/12/13 11:19 |
|||
*/ |
|||
public interface StrConstant { |
|||
|
|||
String UTF_8 = CharEncoding.UTF_8; |
|||
|
|||
String ISO_8859_1 = CharEncoding.ISO_8859_1; |
|||
|
|||
String JAVASCRIPT = "javascript"; |
|||
|
|||
String APPLICATION_JSON_UTF8_VALUE = MediaType.APPLICATION_JSON_UTF8_VALUE; |
|||
|
|||
String EXCEL_SUFFIX_2003 = ".xls"; |
|||
|
|||
String EXCEL_SUFFIX_2007 = ".xlsx"; |
|||
|
|||
/** |
|||
* 连字符号、短杠 |
|||
*/ |
|||
String HYPHEN = "-"; |
|||
|
|||
/** |
|||
* 英文逗号 |
|||
*/ |
|||
String COMMA = ","; |
|||
|
|||
/** |
|||
* 冒号 |
|||
*/ |
|||
String COLON = ":"; |
|||
} |
|||
@ -1,35 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.enums; |
|||
|
|||
/** |
|||
* 用户认证类别枚举类 |
|||
* |
|||
* @author rongchao |
|||
* @Date 19-12-19 |
|||
*/ |
|||
public enum UserAuthTypeEnum { |
|||
|
|||
/** |
|||
* 居民认证 |
|||
*/ |
|||
RESIDENT_AUTH("0"), |
|||
|
|||
/** |
|||
* 党员认证 |
|||
*/ |
|||
PARTY_AUTH("1"), |
|||
|
|||
/** |
|||
* 志愿者认证 |
|||
*/ |
|||
VOLUNTEER_AUTH("2"); |
|||
|
|||
private String value; |
|||
|
|||
UserAuthTypeEnum(String value) { |
|||
this.value = value; |
|||
} |
|||
|
|||
public String value() { |
|||
return this.value; |
|||
} |
|||
} |
|||
@ -1,28 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.enums; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2019/12/17 19:11 |
|||
* @Description: 用户身份枚举类 |
|||
*/ |
|||
public enum UserTagEnum { |
|||
/** |
|||
* 党员 |
|||
*/ |
|||
PARTY_MEMBER("partymember"), |
|||
|
|||
/** |
|||
* 志愿者 |
|||
*/ |
|||
VOLUNTEER("volunteer"); |
|||
|
|||
private String value; |
|||
|
|||
UserTagEnum(String value) { |
|||
this.value = value; |
|||
} |
|||
|
|||
public String value() { |
|||
return this.value; |
|||
} |
|||
} |
|||
@ -1,40 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.enums.pointsenum; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2020/2/6 14:01 |
|||
* @Description: 积分行为编码 |
|||
*/ |
|||
public enum PointsBehaviorCodeEnum { |
|||
LIKE("like", "赞"), |
|||
DISLIKE("dislike", "踩"), |
|||
SHARE("share", "分享"), |
|||
CLOCK("clock", "打卡"), |
|||
COMMENT("comment", "评论"), |
|||
BREAK_PROMISE("break_promise", "爽约"), |
|||
JOIN_ACT("join_act", "活动积分"); |
|||
|
|||
private String behaviorCode; |
|||
private String name; |
|||
|
|||
PointsBehaviorCodeEnum(String behaviorCode, String name) { |
|||
this.behaviorCode = behaviorCode; |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getBehaviorCode() { |
|||
return behaviorCode; |
|||
} |
|||
|
|||
public void setBehaviorCode(String behaviorCode) { |
|||
this.behaviorCode = behaviorCode; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
} |
|||
@ -1,27 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.enums.pointsenum; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2019/12/13 09:43 |
|||
* @Description: 积分规则限制时限枚举类 |
|||
*/ |
|||
public enum PointsLimitTimeEnum { |
|||
/** |
|||
* 限制时限(0-分钟,1-小时,2-日,3-月,4-年) |
|||
*/ |
|||
LIMIT_TIME_MINUTE("0"), |
|||
LIMIT_TIME_HOUR("1"), |
|||
LIMIT_TIME_DAY("2"), |
|||
LIMIT_TIME_MONTH("3"), |
|||
LIMIT_TIME_YEAR("4"); |
|||
|
|||
private String value; |
|||
|
|||
PointsLimitTimeEnum(String value) { |
|||
this.value = value; |
|||
} |
|||
|
|||
public String value() { |
|||
return value; |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.enums.pointsenum; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2019/12/13 09:31 |
|||
* @Description: 积分操作类型枚举类 |
|||
*/ |
|||
public enum PointsOperationEnum { |
|||
/** |
|||
* 规则操作类型(0-减积分,1-加积分) |
|||
*/ |
|||
OPERATION_TYPE_ADD("1"), |
|||
OPERATION_TYPE_SUBSTRACT("0"); |
|||
|
|||
private String operationType; |
|||
|
|||
PointsOperationEnum(String operationType) { |
|||
this.operationType = operationType; |
|||
} |
|||
|
|||
public String getOperationType() { |
|||
return operationType; |
|||
} |
|||
} |
|||
@ -1,34 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.enums.pointsenum; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2019/12/13 09:33 |
|||
* @Description: 积分操作方式枚举类 |
|||
*/ |
|||
public enum PointsOperationModeEnum { |
|||
|
|||
/** |
|||
* user-用户操作 |
|||
*/ |
|||
OPERATION_MODE_USER("user"), |
|||
|
|||
/** |
|||
* admin-管理员操作 |
|||
*/ |
|||
OPERATION_MODE_ADMIN("admin"), |
|||
|
|||
/** |
|||
* sys-系统操作 |
|||
*/ |
|||
OPERATION_MODE_SYS("sys"); |
|||
|
|||
private String operationMode; |
|||
|
|||
PointsOperationModeEnum(String operationMode) { |
|||
this.operationMode = operationMode; |
|||
} |
|||
|
|||
public String getOperationMode() { |
|||
return operationMode; |
|||
} |
|||
} |
|||
@ -1,26 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.enums.pointsenum; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2019/12/12 15:04 |
|||
* @Description: 积分规则可用标志枚举类 |
|||
*/ |
|||
public enum PointsRuleAvailableEnum { |
|||
|
|||
|
|||
/** |
|||
* 可用标记(0-不可用,1-可用) |
|||
*/ |
|||
AVAILABLE_TRUE("1"), |
|||
AVAILABLE_FALSE("0"); |
|||
|
|||
private String value; |
|||
|
|||
PointsRuleAvailableEnum(String value) { |
|||
this.value = value; |
|||
} |
|||
|
|||
public String value() { |
|||
return value; |
|||
} |
|||
} |
|||
@ -1,36 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.enums.pointsenum; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2020/2/6 14:00 |
|||
* @Description: 积分规则编码 |
|||
*/ |
|||
public enum PointsRuleCodeEnum { |
|||
CANCEL_ACT("cancel_act", "取消报名系统扣减积分"), |
|||
CONFIRM_JOIN_ACT("confirm_join_act", "参与活动确认积分"); |
|||
|
|||
private String ruleCode; |
|||
private String name; |
|||
|
|||
PointsRuleCodeEnum(String ruleCode, String name) { |
|||
this.ruleCode = ruleCode; |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getRuleCode() { |
|||
return ruleCode; |
|||
} |
|||
|
|||
public void setRuleCode(String ruleCode) { |
|||
this.ruleCode = ruleCode; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
} |
|||
|
|||
@ -1,28 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.enums.pointsenum; |
|||
|
|||
/** |
|||
* @Auther: yinzuomei |
|||
* @Date: 2019/12/13 09:48 |
|||
* @Description: 积分是否有上限限制 枚举类 |
|||
*/ |
|||
public enum PointsUpperLimitEnum { |
|||
/** |
|||
* 是 |
|||
*/ |
|||
YES("1"), |
|||
|
|||
/** |
|||
* 否 |
|||
*/ |
|||
NO("0"); |
|||
|
|||
private String value; |
|||
|
|||
PointsUpperLimitEnum(String value) { |
|||
this.value = value; |
|||
} |
|||
|
|||
public String value() { |
|||
return value; |
|||
} |
|||
} |
|||
@ -1,155 +1,146 @@ |
|||
package com.elink.esua.epdc.commons.tools.utils; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Description TODO |
|||
* @Author yinzuomei |
|||
* @Date 2019/12/27 10:00 |
|||
*/ |
|||
public class GPSUtils { |
|||
public static double pi = 3.1415926535897932384626; |
|||
public static double x_pi = 3.14159265358979324 * 3000.0 / 180.0; |
|||
public static double a = 6378245.0; |
|||
public static double ee = 0.00669342162296594323; |
|||
public static double pi = 3.1415926535897932384626; |
|||
public static double x_pi = 3.14159265358979324 * 3000.0 / 180.0; |
|||
public static double a = 6378245.0; |
|||
public static double ee = 0.00669342162296594323; |
|||
|
|||
public static double transformLat(double x, double y) { |
|||
double ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y |
|||
+ 0.2 * Math.sqrt(Math.abs(x)); |
|||
ret += (20.0 * Math.sin(6.0 * x * pi) + 20.0 * Math.sin(2.0 * x * pi)) * 2.0 / 3.0; |
|||
ret += (20.0 * Math.sin(y * pi) + 40.0 * Math.sin(y / 3.0 * pi)) * 2.0 / 3.0; |
|||
ret += (160.0 * Math.sin(y / 12.0 * pi) + 320 * Math.sin(y * pi / 30.0)) * 2.0 / 3.0; |
|||
return ret; |
|||
} |
|||
public static double transformLat(double x, double y) { |
|||
double ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y |
|||
+ 0.2 * Math.sqrt(Math.abs(x)); |
|||
ret += (20.0 * Math.sin(6.0 * x * pi) + 20.0 * Math.sin(2.0 * x * pi)) * 2.0 / 3.0; |
|||
ret += (20.0 * Math.sin(y * pi) + 40.0 * Math.sin(y / 3.0 * pi)) * 2.0 / 3.0; |
|||
ret += (160.0 * Math.sin(y / 12.0 * pi) + 320 * Math.sin(y * pi / 30.0)) * 2.0 / 3.0; |
|||
return ret; |
|||
} |
|||
|
|||
public static double transformLon(double x, double y) { |
|||
double ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 |
|||
* Math.sqrt(Math.abs(x)); |
|||
ret += (20.0 * Math.sin(6.0 * x * pi) + 20.0 * Math.sin(2.0 * x * pi)) * 2.0 / 3.0; |
|||
ret += (20.0 * Math.sin(x * pi) + 40.0 * Math.sin(x / 3.0 * pi)) * 2.0 / 3.0; |
|||
ret += (150.0 * Math.sin(x / 12.0 * pi) + 300.0 * Math.sin(x / 30.0 |
|||
* pi)) * 2.0 / 3.0; |
|||
return ret; |
|||
} |
|||
public static double transformLon(double x, double y) { |
|||
double ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 |
|||
* Math.sqrt(Math.abs(x)); |
|||
ret += (20.0 * Math.sin(6.0 * x * pi) + 20.0 * Math.sin(2.0 * x * pi)) * 2.0 / 3.0; |
|||
ret += (20.0 * Math.sin(x * pi) + 40.0 * Math.sin(x / 3.0 * pi)) * 2.0 / 3.0; |
|||
ret += (150.0 * Math.sin(x / 12.0 * pi) + 300.0 * Math.sin(x / 30.0 |
|||
* pi)) * 2.0 / 3.0; |
|||
return ret; |
|||
} |
|||
public static double[] transform(double lat, double lon) { |
|||
if (outOfChina(lat, lon)) { |
|||
return new double[]{lat,lon}; |
|||
} |
|||
double dLat = transformLat(lon - 105.0, lat - 35.0); |
|||
double dLon = transformLon(lon - 105.0, lat - 35.0); |
|||
double radLat = lat / 180.0 * pi; |
|||
double magic = Math.sin(radLat); |
|||
magic = 1 - ee * magic * magic; |
|||
double sqrtMagic = Math.sqrt(magic); |
|||
dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * pi); |
|||
dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * pi); |
|||
double mgLat = lat + dLat; |
|||
double mgLon = lon + dLon; |
|||
return new double[]{mgLat,mgLon}; |
|||
} |
|||
public static boolean outOfChina(double lat, double lon) { |
|||
if (lon < 72.004 || lon > 137.8347) |
|||
return true; |
|||
if (lat < 0.8293 || lat > 55.8271) |
|||
return true; |
|||
return false; |
|||
} |
|||
/** |
|||
* 84 to 火星坐标系 (GCJ-02) World Geodetic System ==> Mars Geodetic System |
|||
* |
|||
* @param lat |
|||
* @param lon |
|||
* @return |
|||
*/ |
|||
public static double[] gps84_To_Gcj02(double lat, double lon) { |
|||
if (outOfChina(lat, lon)) { |
|||
return new double[]{lat,lon}; |
|||
} |
|||
double dLat = transformLat(lon - 105.0, lat - 35.0); |
|||
double dLon = transformLon(lon - 105.0, lat - 35.0); |
|||
double radLat = lat / 180.0 * pi; |
|||
double magic = Math.sin(radLat); |
|||
magic = 1 - ee * magic * magic; |
|||
double sqrtMagic = Math.sqrt(magic); |
|||
dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * pi); |
|||
dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * pi); |
|||
double mgLat = lat + dLat; |
|||
double mgLon = lon + dLon; |
|||
return new double[]{mgLat, mgLon}; |
|||
} |
|||
|
|||
public static double[] transform(double lat, double lon) { |
|||
if (outOfChina(lat, lon)) { |
|||
return new double[]{lat, lon}; |
|||
} |
|||
double dLat = transformLat(lon - 105.0, lat - 35.0); |
|||
double dLon = transformLon(lon - 105.0, lat - 35.0); |
|||
double radLat = lat / 180.0 * pi; |
|||
double magic = Math.sin(radLat); |
|||
magic = 1 - ee * magic * magic; |
|||
double sqrtMagic = Math.sqrt(magic); |
|||
dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * pi); |
|||
dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * pi); |
|||
double mgLat = lat + dLat; |
|||
double mgLon = lon + dLon; |
|||
return new double[]{mgLat, mgLon}; |
|||
} |
|||
/** |
|||
* * 火星坐标系 (GCJ-02) to 84 * * @param lon * @param lat * @return |
|||
* */ |
|||
public static double[] gcj02_To_Gps84(double lat, double lon) { |
|||
double[] gps = transform(lat, lon); |
|||
double lontitude = lon * 2 - gps[1]; |
|||
double latitude = lat * 2 - gps[0]; |
|||
return new double[]{latitude, lontitude}; |
|||
} |
|||
/** |
|||
* 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换算法 将 GCJ-02 坐标转换成 BD-09 坐标 |
|||
* |
|||
* @param lat |
|||
* @param lon |
|||
*/ |
|||
public static double[] gcj02_To_Bd09(double lat, double lon) { |
|||
double x = lon, y = lat; |
|||
double z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi); |
|||
double theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi); |
|||
double tempLon = z * Math.cos(theta) + 0.0065; |
|||
double tempLat = z * Math.sin(theta) + 0.006; |
|||
double[] gps = {tempLat,tempLon}; |
|||
return gps; |
|||
} |
|||
|
|||
public static boolean outOfChina(double lat, double lon) { |
|||
if (lon < 72.004 || lon > 137.8347) |
|||
return true; |
|||
if (lat < 0.8293 || lat > 55.8271) |
|||
return true; |
|||
return false; |
|||
} |
|||
/** |
|||
* * 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换算法 * * 将 BD-09 坐标转换成GCJ-02 坐标 * * @param |
|||
* bd_lat * @param bd_lon * @return |
|||
*/ |
|||
public static double[] bd09_To_Gcj02(double lat, double lon) { |
|||
double x = lon - 0.0065, y = lat - 0.006; |
|||
double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi); |
|||
double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi); |
|||
double tempLon = z * Math.cos(theta); |
|||
double tempLat = z * Math.sin(theta); |
|||
double[] gps = {tempLat,tempLon}; |
|||
return gps; |
|||
} |
|||
|
|||
/** |
|||
* 84 to 火星坐标系 (GCJ-02) World Geodetic System ==> Mars Geodetic System |
|||
* |
|||
* @param lat |
|||
* @param lon |
|||
* @return |
|||
*/ |
|||
public static double[] gps84_To_Gcj02(double lat, double lon) { |
|||
if (outOfChina(lat, lon)) { |
|||
return new double[]{lat, lon}; |
|||
} |
|||
double dLat = transformLat(lon - 105.0, lat - 35.0); |
|||
double dLon = transformLon(lon - 105.0, lat - 35.0); |
|||
double radLat = lat / 180.0 * pi; |
|||
double magic = Math.sin(radLat); |
|||
magic = 1 - ee * magic * magic; |
|||
double sqrtMagic = Math.sqrt(magic); |
|||
dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * pi); |
|||
dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * pi); |
|||
double mgLat = lat + dLat; |
|||
double mgLon = lon + dLon; |
|||
return new double[]{mgLat, mgLon}; |
|||
} |
|||
/**将gps84转为bd09 |
|||
* @param lat |
|||
* @param lon |
|||
* @return |
|||
*/ |
|||
public static double[] gps84_To_bd09(double lat,double lon){ |
|||
double[] gcj02 = gps84_To_Gcj02(lat,lon); |
|||
double[] bd09 = gcj02_To_Bd09(gcj02[0],gcj02[1]); |
|||
return bd09; |
|||
} |
|||
public static double[] bd09_To_gps84(double lat,double lon){ |
|||
double[] gcj02 = bd09_To_Gcj02(lat, lon); |
|||
double[] gps84 = gcj02_To_Gps84(gcj02[0], gcj02[1]); |
|||
//保留小数点后六位
|
|||
gps84[0] = retain6(gps84[0]); |
|||
gps84[1] = retain6(gps84[1]); |
|||
return gps84; |
|||
} |
|||
|
|||
/** |
|||
* * 火星坐标系 (GCJ-02) to 84 * * @param lon * @param lat * @return |
|||
*/ |
|||
public static double[] gcj02_To_Gps84(double lat, double lon) { |
|||
double[] gps = transform(lat, lon); |
|||
double lontitude = lon * 2 - gps[1]; |
|||
double latitude = lat * 2 - gps[0]; |
|||
return new double[]{latitude, lontitude}; |
|||
} |
|||
|
|||
/** |
|||
* 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换算法 将 GCJ-02 坐标转换成 BD-09 坐标 |
|||
* |
|||
* @param lat |
|||
* @param lon |
|||
*/ |
|||
public static double[] gcj02_To_Bd09(double lat, double lon) { |
|||
double x = lon, y = lat; |
|||
double z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi); |
|||
double theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi); |
|||
double tempLon = z * Math.cos(theta) + 0.0065; |
|||
double tempLat = z * Math.sin(theta) + 0.006; |
|||
double[] gps = {tempLat, tempLon}; |
|||
return gps; |
|||
} |
|||
|
|||
/** |
|||
* * 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换算法 * * 将 BD-09 坐标转换成GCJ-02 坐标 * * @param |
|||
* bd_lat * @param bd_lon * @return |
|||
*/ |
|||
public static double[] bd09_To_Gcj02(double lat, double lon) { |
|||
double x = lon - 0.0065, y = lat - 0.006; |
|||
double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi); |
|||
double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi); |
|||
double tempLon = z * Math.cos(theta); |
|||
double tempLat = z * Math.sin(theta); |
|||
double[] gps = {tempLat, tempLon}; |
|||
return gps; |
|||
} |
|||
|
|||
/** |
|||
* 将gps84转为bd09 |
|||
* |
|||
* @param lat |
|||
* @param lon |
|||
* @return |
|||
*/ |
|||
public static double[] gps84_To_bd09(double lat, double lon) { |
|||
double[] gcj02 = gps84_To_Gcj02(lat, lon); |
|||
double[] bd09 = gcj02_To_Bd09(gcj02[0], gcj02[1]); |
|||
return bd09; |
|||
} |
|||
|
|||
public static double[] bd09_To_gps84(double lat, double lon) { |
|||
double[] gcj02 = bd09_To_Gcj02(lat, lon); |
|||
double[] gps84 = gcj02_To_Gps84(gcj02[0], gcj02[1]); |
|||
//保留小数点后六位
|
|||
gps84[0] = retain6(gps84[0]); |
|||
gps84[1] = retain6(gps84[1]); |
|||
return gps84; |
|||
} |
|||
|
|||
/** |
|||
* 保留小数点后六位 |
|||
* |
|||
* @param num |
|||
* @return |
|||
*/ |
|||
private static double retain6(double num) { |
|||
String result = String.format("%.6f", num); |
|||
return Double.valueOf(result); |
|||
} |
|||
/**保留小数点后六位 |
|||
* @param num |
|||
* @return |
|||
*/ |
|||
private static double retain6(double num){ |
|||
String result = String .format("%.6f", num); |
|||
return Double.valueOf(result); |
|||
} |
|||
} |
|||
|
|||
|
|||
@ -1,51 +0,0 @@ |
|||
package com.elink.esua.epdc.commons.tools.utils; |
|||
|
|||
|
|||
import java.time.*; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author work@yujt.net.cn |
|||
* @date 2019/12/13 15:05 |
|||
*/ |
|||
public class LocalDateUtils { |
|||
|
|||
|
|||
public static LocalDateTime dateToLocalDateTime(Date date) { |
|||
Instant instant = date.toInstant(); |
|||
ZoneId zone = ZoneId.systemDefault(); |
|||
return LocalDateTime.ofInstant(instant, zone); |
|||
} |
|||
|
|||
public static LocalDate dateToLocalDate(Date date) { |
|||
Instant instant = date.toInstant(); |
|||
ZoneId zone = ZoneId.systemDefault(); |
|||
LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zone); |
|||
return localDateTime.toLocalDate(); |
|||
} |
|||
|
|||
public static YearMonth dateToYearMonth(Date date) { |
|||
LocalDate localDate = dateToLocalDate(date); |
|||
return YearMonth.of(localDate.getYear(), localDate.getMonthValue()); |
|||
} |
|||
|
|||
public static LocalTime dateToLocalTime(Date date) { |
|||
Instant instant = date.toInstant(); |
|||
ZoneId zone = ZoneId.systemDefault(); |
|||
LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zone); |
|||
return localDateTime.toLocalTime(); |
|||
} |
|||
|
|||
public static Date localDateTimeToDate(LocalDateTime localDateTime) { |
|||
ZoneId zone = ZoneId.systemDefault(); |
|||
Instant instant = localDateTime.atZone(zone).toInstant(); |
|||
return Date.from(instant); |
|||
} |
|||
|
|||
public static Date localDateToDate(LocalDate localDate) { |
|||
ZoneId zone = ZoneId.systemDefault(); |
|||
Instant instant = localDate.atStartOfDay().atZone(zone).toInstant(); |
|||
return Date.from(instant); |
|||
} |
|||
|
|||
} |
|||
@ -1,51 +0,0 @@ |
|||
/** |
|||
* 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.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 取消报名参数 |
|||
* |
|||
* @author wanggongfeng |
|||
* @since v1.0.0 2019-12-17 |
|||
*/ |
|||
@Data |
|||
public class EpdcAppActUserCancelsignupDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
/** |
|||
* 活动ID |
|||
*/ |
|||
@NotBlank(message = "活动ID不能为空") |
|||
private String actId; |
|||
|
|||
/** |
|||
* 取消报名原因 |
|||
*/ |
|||
@NotBlank(message = "取消报名原因不能为空") |
|||
private String failureReason; |
|||
} |
|||
@ -1,80 +0,0 @@ |
|||
/** |
|||
* 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.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.ArrayList; |
|||
|
|||
/** |
|||
* 用户打卡参数 |
|||
* |
|||
* @author wanggongfeng |
|||
* @since v1.0.0 2019-12-17 |
|||
*/ |
|||
@Data |
|||
public class EpdcAppActUserClockLogDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
/** |
|||
* 活动ID |
|||
*/ |
|||
@NotBlank(message = "活动ID不能为空") |
|||
private String actId; |
|||
/** |
|||
* 打卡描述 |
|||
*/ |
|||
@NotBlank(message = "打卡描述不能为空") |
|||
private String clockDesc; |
|||
/** |
|||
* 打卡位置经度 |
|||
*/ |
|||
private BigDecimal clockLongitude; |
|||
/** |
|||
* 打卡位置纬度 |
|||
*/ |
|||
private BigDecimal clockLatitude; |
|||
/** |
|||
* 打卡地址 |
|||
*/ |
|||
@NotBlank(message = "打卡地址不能为空") |
|||
private String clockAddress; |
|||
/** |
|||
* 打卡图片 |
|||
*/ |
|||
private ArrayList<String> images; |
|||
/** |
|||
* 打卡类型(0-打卡,1-更新打卡) |
|||
*/ |
|||
@NotBlank(message = "打卡类型不能为空") |
|||
private String clockType; |
|||
/** |
|||
* 打卡是否有效(0-否,1-是) |
|||
*/ |
|||
@NotBlank(message = "打卡是否有效不能为空") |
|||
private String effectiveFlag; |
|||
|
|||
} |
|||
@ -1,48 +0,0 @@ |
|||
/** |
|||
* 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.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 打卡列表 |
|||
* |
|||
* @author wanggongfeng |
|||
* @since v1.0.0 2019-12-18 |
|||
*/ |
|||
@Data |
|||
public class EpdcAppClockListDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 活动打卡人次 |
|||
*/ |
|||
private int clockNum; |
|||
|
|||
/** |
|||
* 打卡列表 |
|||
*/ |
|||
private List<Object> clocks; |
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,68 +0,0 @@ |
|||
/** |
|||
* 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.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 志愿者排名 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2019-12-18 |
|||
*/ |
|||
@Data |
|||
public class EpdcAppVolunteerRankDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 排名 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String faceImg; |
|||
|
|||
/** |
|||
* 用户名 |
|||
*/ |
|||
private String nickname; |
|||
|
|||
/** |
|||
* 是否党员(0-否,1-是) |
|||
*/ |
|||
private String partyFlag; |
|||
|
|||
/** |
|||
* 爱心时长(单位:小时) |
|||
*/ |
|||
private BigDecimal kindnessTime; |
|||
|
|||
/** |
|||
* 参加次数 |
|||
*/ |
|||
private Integer participationNum; |
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,47 +0,0 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.service.ActPhraseService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* APP常用语相关接口 |
|||
* |
|||
* @author wanggongfeng |
|||
* @date 2019/12/17 10:30 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("heart/phrase") |
|||
public class ApiActPhraseController { |
|||
|
|||
@Autowired |
|||
private ActPhraseService actPhraseService; |
|||
|
|||
/** |
|||
* 使用次数加一 |
|||
* @param id |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author wanggongfeng |
|||
* @date 2019/12/13 14:41 |
|||
*/ |
|||
@PostMapping("sagenumAddOne") |
|||
public Result sagenumAddOneById(String id) { |
|||
return actPhraseService.sagenumAddOneById(id); |
|||
} |
|||
|
|||
/** |
|||
* 获取常用语列表 |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author wanggongfeng |
|||
* @date 2019/12/13 14:41 |
|||
*/ |
|||
@GetMapping("getPhraseList") |
|||
public Result getPhraseList() { |
|||
return actPhraseService.getPhraseList(); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,164 +0,0 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.activity.ActUserRelationDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserClockLogDTO; |
|||
import com.elink.esua.epdc.activity.AppClockListDTO; |
|||
import com.elink.esua.epdc.activity.result.AppActInfoDTO; |
|||
import com.elink.esua.epdc.common.token.dto.TokenDto; |
|||
import com.elink.esua.epdc.common.token.util.IdentityNoAnalysisUtil; |
|||
import com.elink.esua.epdc.commons.tools.annotation.LoginUser; |
|||
import com.elink.esua.epdc.commons.tools.enums.UserTagEnum; |
|||
import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcAppActUserCancelsignupDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcAppActUserClockLogDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcAppClockListDTO; |
|||
import com.elink.esua.epdc.service.ActUserRelationService; |
|||
import com.elink.esua.epdc.service.AppUserService; |
|||
import com.elink.esua.epdc.utils.UserTagUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* APP活动相关接口 |
|||
* |
|||
* @author wanggongfeng |
|||
* @date 2019/12/17 10:30 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("heart/act") |
|||
public class ApiActUserRelationController { |
|||
|
|||
@Autowired |
|||
private ActUserRelationService actUserRelationService; |
|||
|
|||
@Autowired |
|||
private AppUserService appUserService; |
|||
|
|||
/** |
|||
* 活动报名 |
|||
* |
|||
* @param tokenDto |
|||
* @param actId |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author wanggongfeng |
|||
* @date 2019/12/13 14:41 |
|||
*/ |
|||
@PostMapping("signup") |
|||
public Result activitySignUp(@LoginUser TokenDto tokenDto,String actId) { |
|||
if (StringUtils.isBlank(actId)) { |
|||
return new Result().error("活动id不能为空"); |
|||
} |
|||
//验证是否为志愿者
|
|||
Result isVolunteer = appUserService.getVolunteerCountById(tokenDto); |
|||
int code = isVolunteer.getCode(); |
|||
if (code != 0) { |
|||
//不是志愿者
|
|||
return isVolunteer; |
|||
} |
|||
Result<EpdcUserInfoResultDTO> userInfo = appUserService.getInfoById(tokenDto); |
|||
EpdcUserInfoResultDTO epdcUserInfoResultDTO = userInfo.getData(); |
|||
String identityNo = epdcUserInfoResultDTO.getIdentityNo(); |
|||
ActUserRelationDTO actUserRelationDTO = new ActUserRelationDTO(); |
|||
actUserRelationDTO.setActId(actId); |
|||
actUserRelationDTO.setUserId(tokenDto.getUserId()); |
|||
actUserRelationDTO.setNickname(tokenDto.getNickname()); |
|||
actUserRelationDTO.setFaceImg(tokenDto.getFaceImg()); |
|||
if (UserTagUtils.containIdentity(tokenDto.getUserTagInfos(), UserTagEnum.PARTY_MEMBER)) { |
|||
actUserRelationDTO.setPartyFlag(YesOrNoEnum.YES.value()); |
|||
} else { |
|||
actUserRelationDTO.setPartyFlag(YesOrNoEnum.NO.value()); |
|||
} |
|||
actUserRelationDTO.setRealName(tokenDto.getRealName()); |
|||
String sex = IdentityNoAnalysisUtil.getSex(identityNo); // 身份证解析性别
|
|||
if ("女".equals(sex)){ |
|||
sex = "0"; |
|||
}else { |
|||
sex = "1"; |
|||
} |
|||
actUserRelationDTO.setSex(sex); |
|||
actUserRelationDTO.setAge(IdentityNoAnalysisUtil.getAge(identityNo)); |
|||
actUserRelationDTO.setMobile(tokenDto.getMobile()); |
|||
actUserRelationDTO.setIdentityNo(identityNo); |
|||
actUserRelationDTO.setStatus("0"); |
|||
actUserRelationDTO.setSignupTime(new Date()); |
|||
return actUserRelationService.activitySignUp(actUserRelationDTO); |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 取消活动报名 |
|||
* |
|||
* @param tokenDto |
|||
* @param epdcAppActUserCancelsignupDTO |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author wanggongfeng |
|||
* @date 2019/12/13 14:41 |
|||
*/ |
|||
@PostMapping("cancelsignup") |
|||
public Result activityCancelSignUp(@LoginUser TokenDto tokenDto,@RequestBody EpdcAppActUserCancelsignupDTO epdcAppActUserCancelsignupDTO) { |
|||
ValidatorUtils.validateEntity(epdcAppActUserCancelsignupDTO); |
|||
epdcAppActUserCancelsignupDTO.setUserId(tokenDto.getUserId()); |
|||
AppActUserCancelsignupDTO actUserCancelsignupDTO = ConvertUtils.sourceToTarget(epdcAppActUserCancelsignupDTO, AppActUserCancelsignupDTO.class); |
|||
return actUserRelationService.activityCancelSignUp(actUserCancelsignupDTO); |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 活动打卡 |
|||
* |
|||
* @param tokenDto |
|||
* @param epdcAppActUserClockLogDTO |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author wanggongfeng |
|||
* @date 2019/12/13 14:41 |
|||
*/ |
|||
@PostMapping("clock") |
|||
public Result activityClock(@LoginUser TokenDto tokenDto, @RequestBody EpdcAppActUserClockLogDTO epdcAppActUserClockLogDTO) { |
|||
ValidatorUtils.validateEntity(epdcAppActUserClockLogDTO); |
|||
AppActUserClockLogDTO appActUserClockLogDTO = ConvertUtils.sourceToTarget(epdcAppActUserClockLogDTO, AppActUserClockLogDTO.class); |
|||
appActUserClockLogDTO.setUserId(tokenDto.getUserId()); |
|||
return actUserRelationService.activityClock(appActUserClockLogDTO); |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 获取打卡列表 |
|||
* |
|||
* @param tokenDto |
|||
* @param actId |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author wanggongfeng |
|||
* @date 2019/12/13 14:41 |
|||
*/ |
|||
@GetMapping("clockList") |
|||
public Result<EpdcAppClockListDTO> getClockList(@LoginUser TokenDto tokenDto, String actId) { |
|||
Result<AppClockListDTO> result = actUserRelationService.getClockList(actId); |
|||
EpdcAppClockListDTO epdcAppClockListDTO = ConvertUtils.sourceToTarget(result.getData(), EpdcAppClockListDTO.class); |
|||
Result<EpdcAppClockListDTO> result1 = new Result<EpdcAppClockListDTO>(); |
|||
result1.setData(epdcAppClockListDTO); |
|||
return result1; |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 获取活动打卡地点详情 |
|||
* |
|||
* @param actId |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author wanggongfeng |
|||
* @date 2019/12/13 14:41 |
|||
*/ |
|||
@GetMapping("clockAddressDetail") |
|||
public Result<AppActInfoDTO> clockAddressDetail(String actId) { |
|||
return actUserRelationService.clockAddressDetail(actId); |
|||
|
|||
} |
|||
} |
|||
@ -1,106 +0,0 @@ |
|||
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.common.token.dto.TokenDto; |
|||
import com.elink.esua.epdc.commons.tools.annotation.LoginUser; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.service.ActInfoService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
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, @LoginUser TokenDto tokenDto) { |
|||
formDto.setUserId(tokenDto.getUserId()); |
|||
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, @LoginUser TokenDto tokenDto) { |
|||
formDto.setUserId(tokenDto.getUserId()); |
|||
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, @LoginUser TokenDto tokenDto) { |
|||
if (StringUtils.isBlank(id)) { |
|||
return new Result<ActInfoDetailAppResultDTO>().error("id不能为空"); |
|||
} |
|||
ActInfoAppFormDTO formDto = new ActInfoAppFormDTO(); |
|||
formDto.setId(id); |
|||
formDto.setUserId(tokenDto.getUserId()); |
|||
return actInfoService.getDetail(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("rejectDetail/{id}") |
|||
public Result<ActInfoDetailAppResultDTO> rejectDetail(@PathVariable String id, @LoginUser TokenDto tokenDto) { |
|||
ActInfoAppFormDTO formDto = new ActInfoAppFormDTO(); |
|||
formDto.setId(id); |
|||
formDto.setUserId(tokenDto.getUserId()); |
|||
return actInfoService.getRejectDetail(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("cancelDetail/{id}") |
|||
public Result<ActInfoDetailAppResultDTO> cancelDetail(@PathVariable String id) { |
|||
return actInfoService.getCancelDetail(id); |
|||
} |
|||
@GetMapping("banner/list") |
|||
public Result<List<ActBannerDTO>> bannerList() { |
|||
return actInfoService.getBannerList(); |
|||
} |
|||
} |
|||
@ -1,81 +0,0 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.common.token.dto.TokenDto; |
|||
import com.elink.esua.epdc.commons.tools.annotation.LoginUser; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateOfficerAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; |
|||
import com.elink.esua.epdc.service.ActInfoService; |
|||
import com.elink.esua.epdc.service.EvaluateService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
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("custom/evaluate") |
|||
public class ApiEvaluateController { |
|||
|
|||
@Autowired |
|||
private EvaluateService evaluateService; |
|||
|
|||
|
|||
/** |
|||
* 街道干部列表 |
|||
* @Params: [ formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.EvaluateOfficerAppResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("getDeptOfficer") |
|||
public Result<List<EvaluateOfficerAppResultDTO>> getDeptOfficer(@LoginUser TokenDto tokenDto) { |
|||
EvaluateOfficerAppFormDTO formDto = new EvaluateOfficerAppFormDTO(); |
|||
formDto.setGridId(tokenDto.getGridId()); |
|||
return evaluateService.getDeptOfficer(formDto); |
|||
} |
|||
/** |
|||
* 评价列表 |
|||
* @Params: [ formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.EvaluateOfficerAppResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("getOptionList") |
|||
public Result<List<EvaluateOptionAppResultDTO>> getOptionList(EvaluateOptionAppFormDTO formDto) { |
|||
return evaluateService.getOptionList(formDto); |
|||
} |
|||
/** |
|||
* 评价状态 |
|||
* @Params: [ formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@GetMapping("getAvailable") |
|||
public Result<RoleResultDTO> getAvailable() { |
|||
return evaluateService.getAvailable(); |
|||
} |
|||
/** |
|||
* 评价提交 |
|||
* @Params: [ formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.EvaluateOfficerAppResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:34 |
|||
*/ |
|||
@PostMapping("evaluateSubmit") |
|||
public Result evaluateSubmit(EvaluateSubmitFormDTO formDto, @LoginUser TokenDto tokenDto) { |
|||
formDto.setFullName(tokenDto.getRealName()); |
|||
formDto.setMobile(tokenDto.getMobile()); |
|||
return evaluateService.evaluateSubmit(formDto); |
|||
} |
|||
} |
|||
@ -1,42 +0,0 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.result.EpdcAppVolunteerRankDTO; |
|||
import com.elink.esua.epdc.service.AppVolunteerRankService; |
|||
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* APP爱心排名 |
|||
* |
|||
* @author wanggongfeng |
|||
* @date 2019/12/17 10:30 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("heart/volunteer") |
|||
public class ApiVolunteerRankController { |
|||
|
|||
@Autowired |
|||
private AppVolunteerRankService appVolunteerRankService; |
|||
|
|||
/** |
|||
* 获取排行榜 |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author wanggongfeng |
|||
* @date 2019/12/13 14:41 |
|||
*/ |
|||
@GetMapping("leaderboard") |
|||
public Result<List<EpdcAppVolunteerRankDTO>> leaderboard() { |
|||
Result<List<EpdcVolunteerRankDTO>> data = appVolunteerRankService.leaderboard(); |
|||
List<EpdcAppVolunteerRankDTO> list2 = ConvertUtils.sourceToTarget(data.getData(), EpdcAppVolunteerRankDTO.class); |
|||
return new Result().ok(list2); |
|||
|
|||
} |
|||
|
|||
} |
|||
@ -1,37 +0,0 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.service.DemoService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 移动端接口-评论模块 |
|||
* |
|||
* @Author WJP |
|||
* @Date 2019/9/9 09:45 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("demo") |
|||
public class DemoController { |
|||
|
|||
@Autowired |
|||
private DemoService demoService; |
|||
|
|||
/** |
|||
* 事务 |
|||
* |
|||
* @return |
|||
*/ |
|||
@PostMapping("seata") |
|||
public Result demo(@RequestBody Map<String, Object> map) { |
|||
return demoService.demo(map); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -1,68 +0,0 @@ |
|||
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.feign.fallback.ActInfoFeignClientFallback; |
|||
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 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", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<ActInfoDetailAppResultDTO> getDetail(ActInfoAppFormDTO formDto); |
|||
|
|||
@GetMapping(value = "heart/appactinfo/rejectdetail", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<ActInfoDetailAppResultDTO> getRejectDetail(ActInfoAppFormDTO formDto); |
|||
|
|||
@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(); |
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,35 +0,0 @@ |
|||
package com.elink.esua.epdc.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.feign.fallback.AppActPhraseFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
|
|||
/** |
|||
* |
|||
* 活动报名管理 |
|||
* |
|||
* @Author:wanggongfeng |
|||
* @Date:2019/12/16 17:36 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_HEART_SERVER, fallback = AppActPhraseFeignClientFallback.class) |
|||
public interface AppActPhraseFeignClient { |
|||
|
|||
/** |
|||
* 常用语加一 |
|||
* |
|||
* @param id |
|||
* @return |
|||
*/ |
|||
@GetMapping("heart/appactphrase/sagenumAddOneById/{id}") |
|||
Result sagenumAddOneById(@PathVariable("id")String id); |
|||
|
|||
/** |
|||
* redis获取常用语列表 |
|||
* @return |
|||
*/ |
|||
@GetMapping("heart/appactphrase/getPhraseList") |
|||
Result getPhraseList(); |
|||
} |
|||
@ -1,66 +0,0 @@ |
|||
package com.elink.esua.epdc.feign; |
|||
|
|||
import com.elink.esua.epdc.activity.ActUserRelationDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserClockLogDTO; |
|||
import com.elink.esua.epdc.activity.AppClockListDTO; |
|||
import com.elink.esua.epdc.activity.result.AppActInfoDTO; |
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.feign.fallback.AppActUserRelationFeignClientFallback; |
|||
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; |
|||
|
|||
/** |
|||
* |
|||
* 活动报名管理 |
|||
* |
|||
* @Author:wanggongfeng |
|||
* @Date:2019/12/16 17:36 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_HEART_SERVER, fallback = AppActUserRelationFeignClientFallback.class) |
|||
public interface AppActUserRelationFeignClient { |
|||
|
|||
/** |
|||
* 活动报名 |
|||
* @param actUserRelationDTO |
|||
* @return |
|||
*/ |
|||
@GetMapping(value = "heart/appactuserrelation/activitySignUp",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result activitySignUp(ActUserRelationDTO actUserRelationDTO); |
|||
|
|||
/** |
|||
* 取消活动报名 |
|||
* @param epdcAppActUserCancelsignupDTO |
|||
* @return |
|||
*/ |
|||
@GetMapping("heart/appactuserrelation/activityCancelSignUp") |
|||
Result activityCancelSignUp(AppActUserCancelsignupDTO epdcAppActUserCancelsignupDTO); |
|||
|
|||
/** |
|||
* 活动打卡 |
|||
* @param appActUserClockLogDTO |
|||
* @return |
|||
*/ |
|||
@GetMapping(value = "heart/appactuserclocklog/activityClock",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result activityClock(AppActUserClockLogDTO appActUserClockLogDTO); |
|||
|
|||
/** |
|||
* 通过活动ID查询打卡列表 |
|||
* @param actId |
|||
* @return |
|||
*/ |
|||
@GetMapping(value = "heart/appactuserrelation/selectListActUserRelation/{actId}") |
|||
Result<AppClockListDTO> selectListActUserRelation(@PathVariable("actId") String actId); |
|||
|
|||
/** |
|||
* 获取活动打卡地点详情 |
|||
* @param actId |
|||
* @return |
|||
*/ |
|||
@GetMapping("heart/appactinfo/clockAddressDetail/{actId}") |
|||
Result<AppActInfoDTO> clockAddressDetail(@PathVariable("actId") String actId); |
|||
|
|||
} |
|||
@ -1,28 +0,0 @@ |
|||
package com.elink.esua.epdc.feign; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.feign.fallback.AppVolunteerRankFeignClientFallback; |
|||
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* |
|||
* 活动报名管理 |
|||
* |
|||
* @Author:wanggongfeng |
|||
* @Date:2019/12/16 17:36 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPDC_HEART_SERVER, fallback = AppVolunteerRankFeignClientFallback.class) |
|||
public interface AppVolunteerRankFeignClient { |
|||
|
|||
/** |
|||
* 获取排行榜 |
|||
* @return |
|||
*/ |
|||
@GetMapping("heart/volunteer/leaderboard") |
|||
Result<List<EpdcVolunteerRankDTO>> leaderboard(); |
|||
} |
|||
@ -1,79 +0,0 @@ |
|||
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.evaluate.form.EvaluateOfficerAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; |
|||
import com.elink.esua.epdc.feign.fallback.ActInfoFeignClientFallback; |
|||
import com.elink.esua.epdc.feign.fallback.EvaluateFeignClientFallback; |
|||
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_CUSTOM_SERVER, fallback = EvaluateFeignClientFallback.class, configuration = FeignRequestInterceptor.class) |
|||
public interface EvaluateFeignClient { |
|||
|
|||
|
|||
|
|||
/** |
|||
* 街道干部列表 |
|||
* @Params: [formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.EvaluateOfficerAppResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:42 |
|||
*/ |
|||
@GetMapping(value = "custom/evaluateofficer/getDeptOfficer", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<EvaluateOfficerAppResultDTO>> getDeptOfficer(EvaluateOfficerAppFormDTO formDto); |
|||
|
|||
/** |
|||
* 评价列表 |
|||
* @Params: [formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.item.result.EvaluateOptionAppResultDTO>> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:42 |
|||
*/ |
|||
@GetMapping(value = "custom/evaluateoption/getOptionList", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<List<EvaluateOptionAppResultDTO>> getOptionList(EvaluateOptionAppFormDTO formDto); |
|||
/** |
|||
* 评价提交 |
|||
* @Params: [formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:42 |
|||
*/ |
|||
@PostMapping(value = "custom/evaluateinfo/evaluateSubmit", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result evaluateSubmit(EvaluateSubmitFormDTO formDto); |
|||
|
|||
/** |
|||
* 评价状态 |
|||
* @Params: [formDto] |
|||
* @Return: com.elink.esua.epdc.commons.tools.utils.Result<> |
|||
* @Author: lipengfei |
|||
* @Date: 2019/11/19 16:42 |
|||
*/ |
|||
@PostMapping(value = "custom/evaluaterole/getAppAvailable", consumes = MediaType.APPLICATION_JSON_VALUE) |
|||
Result<RoleResultDTO> getAvailable(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,54 +0,0 @@ |
|||
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(ActInfoAppFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getDetail", formDto); |
|||
} |
|||
@Override |
|||
public Result<ActInfoDetailAppResultDTO> getRejectDetail(ActInfoAppFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getRejectDetail", formDto); |
|||
} |
|||
@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"); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -1,25 +0,0 @@ |
|||
package com.elink.esua.epdc.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.feign.AppActPhraseFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author:wanggongfeng |
|||
* @Date:2019/12/16 15:11 |
|||
*/ |
|||
@Component |
|||
public class AppActPhraseFeignClientFallback implements AppActPhraseFeignClient { |
|||
|
|||
@Override |
|||
public Result sagenumAddOneById(String id) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "sagenumAddOneById", id); |
|||
} |
|||
@Override |
|||
public Result getPhraseList() { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getPhraseList"); |
|||
} |
|||
|
|||
} |
|||
@ -1,44 +0,0 @@ |
|||
package com.elink.esua.epdc.feign.fallback; |
|||
|
|||
import com.elink.esua.epdc.activity.ActUserRelationDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserClockLogDTO; |
|||
import com.elink.esua.epdc.activity.result.AppActInfoDTO; |
|||
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.feign.AppActUserRelationFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author:wanggongfeng |
|||
* @Date:2019/12/16 15:11 |
|||
*/ |
|||
@Component |
|||
public class AppActUserRelationFeignClientFallback implements AppActUserRelationFeignClient { |
|||
|
|||
@Override |
|||
public Result activitySignUp(ActUserRelationDTO actUserRelationDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "activitySignUp", actUserRelationDTO); |
|||
} |
|||
@Override |
|||
public Result activityCancelSignUp(AppActUserCancelsignupDTO epdcAppActUserCancelsignupDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "activityCancelSignUp", epdcAppActUserCancelsignupDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result activityClock(AppActUserClockLogDTO appActUserClockLogDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "activityClock", appActUserClockLogDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result selectListActUserRelation(String actId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "selectListActUserRelation", actId); |
|||
} |
|||
|
|||
@Override |
|||
public Result<AppActInfoDTO> clockAddressDetail(String actId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "clockAddressDetail", actId); |
|||
} |
|||
|
|||
} |
|||
@ -1,25 +0,0 @@ |
|||
package com.elink.esua.epdc.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.feign.AppVolunteerRankFeignClient; |
|||
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author:wanggongfeng |
|||
* @Date:2019/12/16 15:11 |
|||
*/ |
|||
@Component |
|||
public class AppVolunteerRankFeignClientFallback implements AppVolunteerRankFeignClient { |
|||
|
|||
@Override |
|||
public Result<List<EpdcVolunteerRankDTO>> leaderboard() { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "leaderboard"); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -1,49 +0,0 @@ |
|||
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.evaluate.form.EvaluateOfficerAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; |
|||
import com.elink.esua.epdc.feign.ActInfoFeignClient; |
|||
import com.elink.esua.epdc.feign.EvaluateFeignClient; |
|||
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 EvaluateFeignClientFallback implements EvaluateFeignClient { |
|||
|
|||
|
|||
@Override |
|||
public Result<List<EvaluateOfficerAppResultDTO>> getDeptOfficer(EvaluateOfficerAppFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getDeptOfficer", formDto); |
|||
} |
|||
@Override |
|||
public Result<List<EvaluateOptionAppResultDTO>> getOptionList(EvaluateOptionAppFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getOptionList", formDto); |
|||
} |
|||
@Override |
|||
public Result evaluateSubmit(EvaluateSubmitFormDTO formDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "evaluateSubmit", formDto); |
|||
} |
|||
@Override |
|||
public Result<RoleResultDTO> getAvailable() { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPDC_CUSTOM_SERVER, "getAvailable"); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -1,53 +0,0 @@ |
|||
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.common.token.dto.TokenDto; |
|||
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(ActInfoAppFormDTO formDto); |
|||
|
|||
Result<ActInfoDetailAppResultDTO> getRejectDetail(ActInfoAppFormDTO formDto); |
|||
|
|||
Result<ActInfoDetailAppResultDTO> getCancelDetail(String itemId); |
|||
|
|||
Result<List<ActBannerDTO>> getBannerList(); |
|||
|
|||
|
|||
} |
|||
@ -1,30 +0,0 @@ |
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
|
|||
/** |
|||
* @author wanggongfeng |
|||
* @date 2019/12/17 9:50 |
|||
*/ |
|||
public interface ActPhraseService { |
|||
|
|||
/** |
|||
* 常用语使用次数加一 |
|||
* @param id |
|||
* @Author wanggongfeng |
|||
* @return |
|||
*/ |
|||
Result sagenumAddOneById(String id); |
|||
|
|||
/** |
|||
* redis获取常用语 |
|||
* @Author wanggongfeng |
|||
* @return |
|||
*/ |
|||
Result getPhraseList(); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,56 +0,0 @@ |
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.activity.ActUserRelationDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserClockLogDTO; |
|||
import com.elink.esua.epdc.activity.AppClockListDTO; |
|||
import com.elink.esua.epdc.activity.result.AppActInfoDTO; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
|
|||
/** |
|||
* @author wanggongfeng |
|||
* @date 2019/12/17 9:50 |
|||
*/ |
|||
public interface ActUserRelationService { |
|||
|
|||
/** |
|||
* 活动报名 |
|||
* @param actUserRelationDTO |
|||
* @Author wanggongfeng |
|||
* @return |
|||
*/ |
|||
Result activitySignUp(ActUserRelationDTO actUserRelationDTO); |
|||
|
|||
/** |
|||
* 取消活动报名 |
|||
* @param epdcAppActUserCancelsignupDTO |
|||
* @Author wanggongfeng |
|||
* @return |
|||
*/ |
|||
Result activityCancelSignUp(AppActUserCancelsignupDTO epdcAppActUserCancelsignupDTO); |
|||
|
|||
/** |
|||
* 活动打卡 |
|||
* @param appActUserClockLogDTO |
|||
* @Author wanggongfeng |
|||
* @return |
|||
*/ |
|||
Result activityClock(AppActUserClockLogDTO appActUserClockLogDTO); |
|||
|
|||
/** |
|||
* 获取打卡列表 |
|||
* @param actId |
|||
* @Author wanggongfeng |
|||
* @return |
|||
*/ |
|||
Result<AppClockListDTO> getClockList(String actId); |
|||
|
|||
/** |
|||
* 获取活动打卡地点详情 |
|||
* @param actId |
|||
* @Author wanggongfeng |
|||
* @return |
|||
*/ |
|||
Result<AppActInfoDTO> clockAddressDetail(String actId); |
|||
|
|||
} |
|||
@ -1,22 +0,0 @@ |
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wanggongfeng |
|||
* @date 2019/12/17 9:50 |
|||
*/ |
|||
public interface AppVolunteerRankService { |
|||
|
|||
/** |
|||
* 获取排行榜 |
|||
* @Author wanggongfeng |
|||
* @return |
|||
*/ |
|||
Result<List<EpdcVolunteerRankDTO>> leaderboard(); |
|||
|
|||
|
|||
} |
|||
@ -1,26 +0,0 @@ |
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Demo |
|||
* |
|||
* @author yujintao |
|||
* @email yujintao@elink-cn.com |
|||
* @date 2019/6/5 14:10 |
|||
*/ |
|||
public interface DemoService { |
|||
|
|||
/** |
|||
* 测试分布式事务 |
|||
* |
|||
* @param map |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
* @author rongchao |
|||
* @since 2020-01-09 |
|||
*/ |
|||
Result demo(Map<String, Object> map); |
|||
|
|||
} |
|||
@ -1,55 +0,0 @@ |
|||
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.evaluate.form.EvaluateOfficerAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 项目模块-移动App端 |
|||
* @Author LPF |
|||
* @Date 2019/11/18 13:34 |
|||
*/ |
|||
public interface EvaluateService { |
|||
|
|||
|
|||
/** |
|||
* 街道干部列表 |
|||
* @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<EvaluateOfficerAppResultDTO>> getDeptOfficer(EvaluateOfficerAppFormDTO 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<EvaluateOptionAppResultDTO>> getOptionList(EvaluateOptionAppFormDTO formDto); |
|||
|
|||
Result<RoleResultDTO> getAvailable(); |
|||
/** |
|||
* 评价提交 |
|||
* @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 evaluateSubmit(EvaluateSubmitFormDTO formDto); |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,59 +0,0 @@ |
|||
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.common.token.dto.TokenDto; |
|||
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(ActInfoAppFormDTO formDto) { |
|||
return actInfoFeignClient.getDetail(formDto); |
|||
} |
|||
@Override |
|||
public Result<ActInfoDetailAppResultDTO> getRejectDetail(ActInfoAppFormDTO formDto) { |
|||
return actInfoFeignClient.getRejectDetail(formDto); |
|||
} |
|||
@Override |
|||
public Result<ActInfoDetailAppResultDTO> getCancelDetail(String itemId) { |
|||
return actInfoFeignClient.getCancelDetail(itemId); |
|||
} |
|||
@Override |
|||
public Result<List<ActBannerDTO>> getBannerList() { |
|||
return actInfoFeignClient.getBannerList(); |
|||
} |
|||
} |
|||
@ -1,36 +0,0 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.feign.AppActPhraseFeignClient; |
|||
import com.elink.esua.epdc.service.ActPhraseService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
|
|||
/** |
|||
* @author wanggongfeng |
|||
* @date 2019/12/16 17:50 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class ActPhraseServiceImpl implements ActPhraseService { |
|||
|
|||
@Autowired |
|||
private AppActPhraseFeignClient appActPhraseFeignClient; |
|||
|
|||
@Override |
|||
public Result sagenumAddOneById(String id) { |
|||
Result<Integer> dataResult = appActPhraseFeignClient.sagenumAddOneById(id); |
|||
return dataResult; |
|||
} |
|||
|
|||
@Override |
|||
public Result getPhraseList() { |
|||
Result<Integer> dataResult = appActPhraseFeignClient.getPhraseList(); |
|||
return dataResult; |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,57 +0,0 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.activity.ActUserRelationDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; |
|||
import com.elink.esua.epdc.activity.AppActUserClockLogDTO; |
|||
import com.elink.esua.epdc.activity.AppClockListDTO; |
|||
import com.elink.esua.epdc.activity.result.AppActInfoDTO; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.feign.AppActUserRelationFeignClient; |
|||
import com.elink.esua.epdc.service.ActUserRelationService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
|
|||
/** |
|||
* @author wanggongfeng |
|||
* @date 2019/12/16 17:50 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class ActUserRelationServiceImpl implements ActUserRelationService { |
|||
|
|||
@Autowired |
|||
private AppActUserRelationFeignClient actInfoFeignClient; |
|||
|
|||
@Override |
|||
public Result activitySignUp(ActUserRelationDTO actUserRelationDTO) { |
|||
Result<Integer> dataResult = actInfoFeignClient.activitySignUp(actUserRelationDTO); |
|||
return dataResult; |
|||
} |
|||
|
|||
@Override |
|||
public Result activityCancelSignUp(AppActUserCancelsignupDTO epdcAppActUserCancelsignupDTO) { |
|||
Result<Integer> dataResult = actInfoFeignClient.activityCancelSignUp(epdcAppActUserCancelsignupDTO); |
|||
return dataResult; |
|||
} |
|||
|
|||
@Override |
|||
public Result activityClock(AppActUserClockLogDTO appActUserClockLogDTO) { |
|||
Result<Integer> dataResult = actInfoFeignClient.activityClock(appActUserClockLogDTO); |
|||
return dataResult; |
|||
} |
|||
|
|||
@Override |
|||
public Result<AppClockListDTO> getClockList(String actId) { |
|||
Result<AppClockListDTO> result = actInfoFeignClient.selectListActUserRelation(actId); |
|||
return result; |
|||
} |
|||
|
|||
@Override |
|||
public Result<AppActInfoDTO> clockAddressDetail(String actId) { |
|||
Result<AppActInfoDTO> dataResult = actInfoFeignClient.clockAddressDetail(actId); |
|||
return dataResult; |
|||
} |
|||
|
|||
} |
|||
@ -1,36 +0,0 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.feign.AppVolunteerRankFeignClient; |
|||
import com.elink.esua.epdc.service.AppVolunteerRankService; |
|||
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* @author wanggongfeng |
|||
* @date 2019/12/16 17:50 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class AppVolunteerRankServiceImpl implements AppVolunteerRankService { |
|||
|
|||
@Autowired |
|||
private AppVolunteerRankFeignClient appVolunteerRankFeignClient; |
|||
|
|||
/** |
|||
* 获取排行榜 |
|||
* @Author wanggongfeng |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Result<List<EpdcVolunteerRankDTO>> leaderboard() { |
|||
Result<List<EpdcVolunteerRankDTO>> dataResult = appVolunteerRankFeignClient.leaderboard(); |
|||
return dataResult; |
|||
} |
|||
|
|||
} |
|||
@ -1,42 +0,0 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.exception.RenException; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.ScanSwitchDTO; |
|||
import com.elink.esua.epdc.feign.DemoFeignClient; |
|||
import com.elink.esua.epdc.service.DemoService; |
|||
import com.elink.esua.epdc.service.ScanSwitchService; |
|||
import io.seata.spring.annotation.GlobalTransactional; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author yujintao |
|||
* @email yujintao@elink-cn.com |
|||
* @date 2019/9/11 9:40 |
|||
*/ |
|||
@Service |
|||
public class DemoServiceImpl implements DemoService { |
|||
|
|||
@Autowired |
|||
private ScanSwitchService scanSwitchService; |
|||
|
|||
@Autowired |
|||
private DemoFeignClient demoFeignClient; |
|||
|
|||
@GlobalTransactional(rollbackFor = Exception.class) |
|||
@Override |
|||
public Result demo(Map<String, Object> map) { |
|||
ScanSwitchDTO dto = new ScanSwitchDTO(); |
|||
dto.setId("54185412da2bea73804fc1de69827e18"); |
|||
dto.setMaintainInfo(map.get("username").toString()); |
|||
scanSwitchService.update(dto); |
|||
Result<String> r = demoFeignClient.seata(map.get("username").toString(), Integer.parseInt(map.get("age").toString())); |
|||
if (!r.success()) { |
|||
throw new RenException("添加失败"); |
|||
} |
|||
return new Result(); |
|||
} |
|||
} |
|||
@ -1,49 +0,0 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateOfficerAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateOptionAppFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.form.EvaluateSubmitFormDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOfficerAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.EvaluateOptionAppResultDTO; |
|||
import com.elink.esua.epdc.dto.evaluate.result.RoleResultDTO; |
|||
import com.elink.esua.epdc.feign.EvaluateFeignClient; |
|||
import com.elink.esua.epdc.service.EvaluateService; |
|||
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 EvaluateServiceImpl implements EvaluateService { |
|||
|
|||
@Autowired |
|||
private EvaluateFeignClient evaluateFeignClient; |
|||
|
|||
|
|||
|
|||
@Override |
|||
public Result<List<EvaluateOfficerAppResultDTO>> getDeptOfficer(EvaluateOfficerAppFormDTO formDto) { |
|||
return evaluateFeignClient.getDeptOfficer(formDto); |
|||
} |
|||
@Override |
|||
public Result<List<EvaluateOptionAppResultDTO>> getOptionList(EvaluateOptionAppFormDTO formDto) { |
|||
return evaluateFeignClient.getOptionList(formDto); |
|||
} |
|||
@Override |
|||
public Result<RoleResultDTO> getAvailable() { |
|||
return evaluateFeignClient.getAvailable(); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public Result evaluateSubmit(EvaluateSubmitFormDTO formDto){ |
|||
return evaluateFeignClient.evaluateSubmit(formDto); |
|||
} |
|||
} |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue