springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityQuestnaireApi.java
@@ -42,18 +42,16 @@ pageQuestnaireDTO.setForParty(1 == isPartymember.intValue()); pageQuestnaireDTO.setForVolunteer(1 == isVolunteer.intValue()); pageQuestnaireDTO.setUserId(loginUserInfo.getUserId()); // pageQuestnaireDTO.setState(0); return communityService.pageQuestnaire(pageQuestnaireDTO, loginUserInfo.getCommunityId()); } @ApiOperation(value = "分页查询社区调查问卷", response = QuestnaireListVo.class) @PostMapping("/pageVolunteer") public R pageVolunteer(@RequestBody PageQuestnaireDTO pageQuestnaireDTO) { LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); pageQuestnaireDTO.setForMasses(null); pageQuestnaireDTO.setForVolunteer(true); pageQuestnaireDTO.setForParty(true); return communityService.pageQuestnaire(pageQuestnaireDTO, loginUserInfo.getCommunityId()); return communityService.pageQuestnaire(pageQuestnaireDTO, getLoginUserInfo().getCommunityId()); } @ApiOperation(value = "创建调查问卷") springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopApi.java
@@ -1,5 +1,6 @@ package com.panzhihua.applets.api; import com.alibaba.fastjson.JSONObject; import com.panzhihua.applets.config.WxMaProperties; import com.panzhihua.common.controller.BaseController; import com.panzhihua.common.model.dtos.shop.*; @@ -39,6 +40,14 @@ @ApiOperation(value = "分页查询店铺" , response = PageShopStoreVO.class) @PostMapping("pageshopstore") public R pageShopStore(@RequestBody PageComShopStoreDTO comShopStoreDTO) { PageComShopSysConfDTO pageComShopSysConfDTO = new PageComShopSysConfDTO(); R conf = communityService.pageShopSysConf(pageComShopSysConfDTO); if(R.isOk(conf)&& conf.getData()!=null){ ComShopSysConfVO comShopSysConfVO = JSONObject.parseObject(JSONObject.toJSONString(conf.getData()), ComShopSysConfVO.class); if("1".equals(comShopSysConfVO.getVal()) && "1".equals(comShopSysConfVO.getEnabled())){ return R.ok(); } } return communityService.pageShopStore(comShopStoreDTO); } @@ -81,6 +90,14 @@ if(userId == null){ return R.fail("请重新登陆"); } PageComShopSysConfDTO pageComShopSysConfDTO = new PageComShopSysConfDTO(); R conf = communityService.pageShopSysConf(pageComShopSysConfDTO); if(R.isOk(conf)&& conf.getData()!=null){ ComShopSysConfVO comShopSysConfVO = JSONObject.parseObject(JSONObject.toJSONString(conf.getData()), ComShopSysConfVO.class); if("1".equals(comShopSysConfVO.getVal()) && "1".equals(comShopSysConfVO.getEnabled())){ return R.ok(0); } } return communityService.shopCartUserTotal(userId); } springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java
@@ -6,6 +6,8 @@ import com.panzhihua.applets.model.dtos.ComPbMemberCertificationDTO; import com.panzhihua.common.constants.UserConstants; import com.panzhihua.common.model.dtos.shop.ExcelShopOrderDTO; import com.panzhihua.common.constants.SecurityConstants; import com.panzhihua.common.constants.UserConstants; import com.panzhihua.common.model.dtos.user.SysUserEditTipsDTO; import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO; import com.panzhihua.common.model.vos.community.*; @@ -52,6 +54,8 @@ private PartyBuildingService partyBuildingService; @Resource private CheckService checkService; @Resource private StringRedisTemplate stringRedisTemplate; @ApiOperation(value = "当前登录用户信息", response = LoginUserInfoVO.class) @GetMapping("info") @@ -119,6 +123,11 @@ if (R.isOk(r1)) { log.info("新增实名认证未通过通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); } //清空缓存 String userRoleKey = UserConstants.LOGIN_USER_INFO + this.getLoginUserInfo().getUserId(); String userAppletRoleKey = SecurityConstants.ROLE_APPLETS_USER + this.getLoginUserInfo().getUserId(); stringRedisTemplate.delete(userRoleKey); stringRedisTemplate.delete(userAppletRoleKey); } else { //未通过发通知 /** springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/ShopApi.java
@@ -350,11 +350,27 @@ } @ApiOperation(value = "配送完成") @PutMapping("/order/finishDeliver") public R finishDeliver(@RequestBody ComShopOrderDeliverDTO deliverDTO){ deliverDTO.setOperUserAccount(getLoginUserInfo().getPhone()); deliverDTO.setIsAdmin(true); return communityService.finishDeliverOrder(deliverDTO); @ApiOperation(value = "商家配置修改") @PutMapping("/shop/conf") public R editConf(@RequestBody ComShopSysConfDTO comShopSysConfDTO){ return communityService.editShopSysConf(comShopSysConfDTO); } @ApiOperation(value = "商家配置查询", response = ComShopHiddenConfVO.class) @GetMapping("/shop/conf") public R getConf(){ PageComShopSysConfDTO pageComShopSysConfDTO = new PageComShopSysConfDTO(); R r = communityService.pageShopSysConf(pageComShopSysConfDTO); if(R.isOk(r) && r.getData()!=null){ ComShopSysConfVO comShopSysConfVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ComShopSysConfVO.class); if(comShopSysConfVO!=null){ ComShopHiddenConfVO comShopHiddenConfVO = new ComShopHiddenConfVO(); comShopHiddenConfVO.setId(comShopSysConfVO.getId()); comShopHiddenConfVO.setHidden(comShopSysConfVO.getVal()); return R.ok(comShopHiddenConfVO); } } return r; } } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/SecurityConstants.java
@@ -16,5 +16,6 @@ public static final String APPLETS_ACCESS_MEDIA_ID ="APPLETS_ACCESS_MEDIA_ID";//小程序获取的access_token public static final String APPLETS_ACCESS_MEDIA_ID_TIME ="APPLETS_ACCESS_MEDIA_ID_TIME";//小程序获取的access_token public static final String ROLE_APPLETS_REAL_NAMED="applets:realnamed";//小程序用户实名角色 public static final String ROLE_APPLETS_USER="applets:realnamed:user:";//小程序用户角色 } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/ComShopSysConfDTO.java
New file @@ -0,0 +1,21 @@ package com.panzhihua.common.model.dtos.shop; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @ClasssName ComShopSysConfDTO * @Description 商家配置信息 * @Author cedoo * @Date 2021/05/11 * @Version 1.0 **/ @Data @ApiModel("商家系统配置") public class ComShopSysConfDTO { @ApiModelProperty(value = "id", required = true) private Long id; @ApiModelProperty(value = "是否隐藏所有商家 0 否 1是", required = true) private Integer hidden; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/PageComShopSysConfDTO.java
New file @@ -0,0 +1,19 @@ package com.panzhihua.common.model.dtos.shop; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @auther llming * @describe 分页查询商品 */ @ApiModel("分页查询商品") @Data public class PageComShopSysConfDTO { @ApiModelProperty(value = "分页-当前页数", example = "1", required = false) private Long pageNum = 1l; @ApiModelProperty(value = "分页-每页记录数", example = "10", required = false) private Long pageSize = 10l; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopHiddenConfVO.java
New file @@ -0,0 +1,16 @@ package com.panzhihua.common.model.vos.shop; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("订单创建返回参数") public class ComShopHiddenConfVO { @ApiModelProperty(value = "id") private Long id; @ApiModelProperty(value = "是否隐藏所有商家 0 否 1是") private String hidden; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/ComShopSysConfVO.java
New file @@ -0,0 +1,25 @@ package com.panzhihua.common.model.vos.shop; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; import java.util.Date; @Data @ApiModel("订单创建返回参数") public class ComShopSysConfVO { @ApiModelProperty(value = "id") private Long id; @ApiModelProperty(value = "配置名称") private String name; @ApiModelProperty(value = "配置备注") private String note; @ApiModelProperty(value = "配置值") private String val; @ApiModelProperty(value = "是否生效(0 否 1 是)") private String enabled; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -2439,6 +2439,22 @@ R editvillage(@PathVariable("villageId") Long villageId,@RequestBody ComMngVillageVO comMngVillageVO); /** * 商城系统配置 * @param comShopSysConfDTO * @return */ @PostMapping("/shop/conf/edit") R editShopSysConf(@RequestBody ComShopSysConfDTO comShopSysConfDTO); /** * 商城系统配置查询 * @param pageComShopSysConfDTO * @return */ @PostMapping("/shop/conf/get") R pageShopSysConf(@RequestBody PageComShopSysConfDTO pageComShopSysConfDTO); /** * 编辑实有人口_电子档案 * @param userElectronicFileVO * @return springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopApi.java
@@ -1,5 +1,7 @@ package com.panzhihua.service_community.api; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.panzhihua.common.model.dtos.shop.PageComShopGoodsDTO; import com.panzhihua.common.model.dtos.shop.*; import com.panzhihua.common.controller.BaseController; @@ -7,15 +9,15 @@ import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO; import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.shop.AddShopGoodsVO; import com.panzhihua.common.model.vos.shop.*; import com.panzhihua.service_community.model.dos.ComShopSysConfDO; import com.panzhihua.service_community.service.*; import com.panzhihua.common.model.vos.shop.ShopOperLogVO; import com.panzhihua.common.model.vos.shop.ShopStoreVO; import com.panzhihua.service_community.service.ComShopGoodsService; import com.panzhihua.service_community.service.ComShopOperLogService; import com.panzhihua.service_community.service.ComShopOrderService; import com.panzhihua.service_community.service.ComShopStoreService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; @@ -41,6 +43,8 @@ private ComShopCartService comShopCartService; @Resource private ComShopUserAddressService comShopUserAddressService; @Resource private ComShopSysConfService comShopSysConfService; /** * 店铺列表-分页查询 @@ -515,4 +519,51 @@ public R wxPay(@RequestBody OrderPayDTO orderPayDTO){ return comShopOrderService.wxPay(orderPayDTO); } /** * 商城系统配置 * @param comShopSysConfDTO * @return */ @PostMapping("/conf/edit") R editShopSysConf(@RequestBody ComShopSysConfDTO comShopSysConfDTO){ ComShopSysConfDO comShopSysConfDO = comShopSysConfService.getBaseMapper().selectById(comShopSysConfDTO.getId()); switch (comShopSysConfDTO.getHidden()){ case 0: comShopSysConfDO.setVal("0"); comShopSysConfDO.setEnabled("1"); break; case 1: comShopSysConfDO.setVal("1"); comShopSysConfDO.setEnabled("1"); break; default: break; } int updated = comShopSysConfService.getBaseMapper().updateById(comShopSysConfDO); if(updated==1){ return R.ok(); } return R.fail(); } /** * 商城系统配置查询 * @param pageComShopSysConfDTO * @return */ @PostMapping("/conf/get") R pageShopSysConf(@RequestBody PageComShopSysConfDTO pageComShopSysConfDTO){ List<ComShopSysConfDO> confList = comShopSysConfService.getBaseMapper().selectList(new LambdaQueryWrapper<ComShopSysConfDO>() .eq(ComShopSysConfDO::getName, "SHOP_HIDDEN") .orderByDesc(ComShopSysConfDO::getCreate_at)); ComShopSysConfVO comShopSysConfVO = new ComShopSysConfVO(); if(confList!=null && confList.size()>0){ ComShopSysConfDO firstConf = confList.get(0); BeanUtils.copyProperties(firstConf, comShopSysConfVO); return R.ok(comShopSysConfVO); } return R.ok(); } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopSysConfDAO.java
New file @@ -0,0 +1,16 @@ package com.panzhihua.service_community.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.panzhihua.service_community.model.dos.ComShopCartDO; import com.panzhihua.service_community.model.dos.ComShopSysConfDO; import org.apache.ibatis.annotations.Mapper; /** * @auther lyq * @create 2021-04-14 15:02:14 * @describe 购物车表mapper类 */ @Mapper public interface ComShopSysConfDAO extends BaseMapper<ComShopSysConfDO> { } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopOrderDO.java
@@ -67,7 +67,7 @@ private Long receiverId; /** * 删除状态(1.未删除 2.已删除) * 是否已删除(1.是 2.否) */ private Integer deleteStatus; springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComShopSysConfDO.java
New file @@ -0,0 +1,60 @@ package com.panzhihua.service_community.model.dos; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** * @auther lyq * @create 2021-04-14 15:03:01 * @describe 订单表实体类 */ @Data @TableName("com_shop_sys_conf") public class ComShopSysConfDO implements Serializable { private static final long serialVersionUID = 1L; /** * 订单id */ @TableId(type = IdType.AUTO) private Long id; /** * 配置名称 */ private String name; /** * 配置备注 */ private String note; /** * 配置值 */ private String val; /** * 是否生效(0 否 1 是) */ private String enabled; /** * 创建人 */ private String create_by; /** * 创建时间 */ private Date create_at; /** * 修改时间 */ private Date update_at; /** * 修改人 */ private String update_by; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopSysConfService.java
New file @@ -0,0 +1,14 @@ package com.panzhihua.service_community.service; import com.baomidou.mybatisplus.extension.service.IService; import com.panzhihua.service_community.model.dos.ComShopOrderPayDO; import com.panzhihua.service_community.model.dos.ComShopSysConfDO; /** * @author cedoo * @create 2021-5-11 10:47:50 * @describe */ public interface ComShopSysConfService extends IService<ComShopSysConfDO> { } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java
@@ -156,19 +156,33 @@ } //查询默认收货地址 //查询上次购买记录的收货地址 List<ComShopOrderDO> shopOrders = this.baseMapper.selectList(new QueryWrapper<ComShopOrderDO>() .eq("user_id",orderPreviewDTO.getUserId()).orderByDesc("create_at")); if(shopOrders.isEmpty()){//未查询到用户上一笔订单 //查询用户收货地址中的默认地址 ComShopUserAddressDO userAddressDO = comShopUserAddressDAO.selectOne(new QueryWrapper<ComShopUserAddressDO>() ComShopUserAddressDO userDefaultAddressDO = comShopUserAddressDAO.selectOne(new QueryWrapper<ComShopUserAddressDO>() .eq("delete_status", 2) .eq("user_id",orderPreviewDTO.getUserId()).eq("is_default",ComShopUserAddressDO.isDefault.yes)); //查询用户收货地址中的默认地址 if(userDefaultAddressDO != null){ ComShopUserAddressVO userAddressVO = new ComShopUserAddressVO(); BeanUtils.copyProperties(userDefaultAddressDO,userAddressVO); orderPreviewVO.setUserAddressVO(userAddressVO); }else{ //查询上次购买记录的收货地址 //查询到用户上一笔订单 List<ComShopOrderDO> shopOrders = this.baseMapper.selectList(new QueryWrapper<ComShopOrderDO>() .eq("delete_status", 2) .eq("user_id",orderPreviewDTO.getUserId()).eq("is_default",ComShopUserAddressDO.isDefault.yes)); if(userAddressDO != null){ ComShopUserAddressVO userAddressVO = new ComShopUserAddressVO(); BeanUtils.copyProperties(userAddressDO,userAddressVO); orderPreviewVO.setUserAddressVO(userAddressVO); }else{ .eq("user_id",orderPreviewDTO.getUserId()) .orderByDesc("create_at")); if(shopOrders!=null && shopOrders.size()>0) { ComShopUserAddressDO userAddressDO = comShopUserAddressDAO.selectById(shopOrders.get(0).getReceiverId()); if (userAddressDO != null) { ComShopUserAddressVO userAddressVO = new ComShopUserAddressVO(); BeanUtils.copyProperties(userAddressDO, userAddressVO); orderPreviewVO.setUserAddressVO(userAddressVO); } } //无默认地址, 无上一单记录 地址 /* if(orderPreviewVO.getUserAddressVO()==null){ List<ComShopUserAddressDO> userAddressDOList = comShopUserAddressDAO.selectList(new QueryWrapper<ComShopUserAddressDO>() .eq("user_id",orderPreviewDTO.getUserId()).orderByDesc("create_at")); if(!userAddressDOList.isEmpty()){ @@ -177,16 +191,10 @@ orderPreviewVO.setUserAddressVO(userAddressVO); } } }else{//查询到用户上一笔订单 ComShopUserAddressDO userAddressDO = comShopUserAddressDAO.selectById(shopOrders.get(0).getReceiverId()); if(userAddressDO != null){ if(userAddressDO.getDeleteStatus() == 2) { ComShopUserAddressVO userAddressVO = new ComShopUserAddressVO(); BeanUtils.copyProperties(userAddressDO, userAddressVO); orderPreviewVO.setUserAddressVO(userAddressVO); } } */ } return R.ok(orderPreviewVO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopStoreServiceImpl.java
@@ -94,7 +94,8 @@ public R shopStoreDetail(PageComShopStoreDTO comShopStoreDTO) { //查询店铺 ComShopStoreDO storeDO = this.baseMapper.selectById(comShopStoreDTO.getStoreId()); if (storeDO == null) { boolean storeDeleted = storeDO!=null && 2==storeDO.getDeleteStatus(); if (storeDO == null || storeDeleted) { return R.fail(401, "店铺不存在"); } if (storeDO.getStatus().equals(ComShopStoreDO.status.no)) { springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopSysConfServiceImpl.java
New file @@ -0,0 +1,19 @@ package com.panzhihua.service_community.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.service_community.dao.*; import com.panzhihua.service_community.model.dos.*; import com.panzhihua.service_community.service.ComShopSysConfService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; /** * @auther cedoo * @create 2021-5-11 12:20:37 * @describe 商品系统配置 */ @Slf4j @Service public class ComShopSysConfServiceImpl extends ServiceImpl<ComShopSysConfDAO, ComShopSysConfDO> implements ComShopSysConfService { } springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.common.constants.UserConstants; import com.panzhihua.common.exceptions.PartyBuildingMemberException; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComActActivityVO; @@ -469,6 +470,9 @@ if (delete>0) { // 维护用户表党员状态 comPbMemberDAO.updateUserIsPartymember(comPbMemberDO.getIdCard()); //删除缓存 String userKey = UserConstants.LOGIN_USER_INFO + comPbMemberDO.getUserId(); stringRedisTemplate.delete(userKey); return R.ok(); } return R.fail(); springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -253,6 +253,7 @@ loginUserInfoVO.setIsmemberrole(1); } } loginUserInfoVO.setIsRealNamed(sysUserDO.getIdCard()!=null); return R.ok(loginUserInfoVO); } springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/AppletWebSecurityConfigurationAdapter.java
New file @@ -0,0 +1,29 @@ package com.panzhihua.zuul.config; import com.panzhihua.common.constants.SecurityConstants; import com.panzhihua.zuul.filters.AppletAuthenticationFilter; import org.springframework.boot.autoconfigure.security.SecurityProperties; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.web.authentication.AnonymousAuthenticationFilter; /** * @ClasssName AppletWebSecurityConfigurationAdapter * @Description 小程序 * @Author cedoo * @Date 2021/4/30 * @Version 1.0 **/ @Configuration @Order(SecurityProperties.BASIC_AUTH_ORDER-2) public class AppletWebSecurityConfigurationAdapter extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.antMatcher("/api/applets/**").authorizeRequests() .anyRequest().authenticated() .and() .addFilterAfter(new AppletAuthenticationFilter(), AnonymousAuthenticationFilter.class); } } springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/RealNamedConfig.java
New file @@ -0,0 +1,17 @@ package com.panzhihua.zuul.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; import java.util.List; @Component @ConfigurationProperties(prefix = "applet.realname") @Data public class RealNamedConfig { private List<String> verify; } springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/config/SpringSecurityConfig.java
@@ -1,10 +1,14 @@ package com.panzhihua.zuul.config; import com.panzhihua.zuul.filters.AppletAuthenticationFilter; import com.panzhihua.zuul.filters.JWTAuthenticationTokenFilter; import com.panzhihua.zuul.filters.SercuritFilter; import com.panzhihua.zuul.handles.UserAuthAccessDeniedHandler; import com.panzhihua.zuul.manager.RoleAccessDecisionManager; import org.springframework.boot.autoconfigure.security.SecurityProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.security.config.annotation.ObjectPostProcessor; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; @@ -12,6 +16,7 @@ import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.access.intercept.FilterSecurityInterceptor; import org.springframework.security.web.authentication.AnonymousAuthenticationFilter; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import javax.annotation.Resource; @@ -34,6 +39,7 @@ */ @Resource private UserAuthAccessDeniedHandler userAuthAccessDeniedHandler; @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() @@ -49,16 +55,13 @@ .and() // 配置没有权限自定义处理类 .exceptionHandling().accessDeniedHandler(userAuthAccessDeniedHandler) .and() .csrf().disable(); // 基于Token不需要session http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); // 禁用缓存 http.headers().cacheControl(); http.addFilterBefore(new JWTAuthenticationTokenFilter(), AnonymousAuthenticationFilter.class); .and() .csrf().disable(); // 基于Token不需要session http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); // 禁用缓存 http.headers().cacheControl(); http.addFilterBefore(new JWTAuthenticationTokenFilter(), AnonymousAuthenticationFilter.class); } } springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/AppletAuthenticationFilter.java
New file @@ -0,0 +1,133 @@ package com.panzhihua.zuul.filters; import com.alibaba.fastjson.JSONArray; import com.panzhihua.common.constants.*; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.utlis.JWTTokenUtil; import com.panzhihua.common.utlis.ResultUtil; import com.panzhihua.zuul.config.RealNamedConfig; import io.jsonwebtoken.Claims; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.ValueOperations; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.stereotype.Component; import org.springframework.web.context.support.WebApplicationContextUtils; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: 小程序权限验证 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2020-11-25 16:35 **/ @Component public class AppletAuthenticationFilter implements Filter { private StringRedisTemplate stringRedisTemplate; @Autowired private RealNamedConfig realNamedConfig; @Override public void init(FilterConfig filterConfig) throws ServletException { } /** * 用户是否登录校验 * * @param servletRequest 请求 * @param servletResponse 返回 * @param filterChain 过滤器链条 * @throws IOException io * @throws ServletException servlet */ @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; SafeboxRequestWrapper safeboxRequestWrapper = new SafeboxRequestWrapper(request); HttpServletResponse response = (HttpServletResponse) servletResponse; // 获取请求头中JWT的Token String tokenHeader = request.getHeader(TokenConstant.TOKEN_HEADER); if (null != tokenHeader && tokenHeader.startsWith(TokenConstant.TOKEN_PRE) &&realNamedConfig!=null && realNamedConfig.getVerify()!=null &&realNamedConfig.getVerify().size()>0) { String token = tokenHeader.replace(TokenConstant.TOKEN_PRE, ""); // token解析 Claims claims = JWTTokenUtil.getClaimsFromToken(token); String username = claims.getSubject(); int type = (Integer) claims.get("type"); if (1 == type) {//小程序用户统一角色 String requestURI = request.getRequestURI(); String requestMethod = request.getMethod().toLowerCase(); ServletContext context = request.getServletContext(); ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context); stringRedisTemplate = ctx.getBean(StringRedisTemplate.class); ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); String appletUserRoleKey = SecurityConstants.ROLE_APPLETS_USER + username; Boolean userHasRole = stringRedisTemplate.hasKey(appletUserRoleKey); boolean needCheck = false; List<String> checkedUrl = realNamedConfig.getVerify(); checkedUrl = checkedUrl!=null?checkedUrl:new ArrayList<>(); for (int i = 0; i < checkedUrl.size(); i++) { String url = checkedUrl.get(i); if (url.toLowerCase().startsWith(requestMethod) && url.endsWith(requestURI)) { needCheck = true; } else { continue; } } if (needCheck) { if (userHasRole) { boolean userHashRight = false; try { String roles = valueOperations.get(appletUserRoleKey); List<SimpleGrantedAuthority> authorities = JSONArray.parseArray(roles, SimpleGrantedAuthority.class); if (authorities != null && authorities.size() > 0) { AtomicBoolean userHasRightRole = new AtomicBoolean(false); authorities.forEach(authority -> { if (authority.getAuthority().equals(SecurityConstants.ROLE_APPLETS_REAL_NAMED)) { userHasRightRole.set(true); } }); if (userHasRightRole.get()) { //用户包含“已实名”角色,则放行 什么也不做 userHashRight = true; } } } catch (Exception e) { userHashRight = false; } if (!userHashRight) { ResultUtil.responseJson(response, R.fail(HttpStatus.FORBIDDEN, "用户未实名")); return; } }else{ ResultUtil.responseJson(response, R.fail(HttpStatus.FORBIDDEN, "用户未实名")); return; } } } } filterChain.doFilter(servletRequest, servletResponse); } @Override public void destroy() { } } springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java
@@ -1,181 +1,198 @@ package com.panzhihua.zuul.filters; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.panzhihua.common.constants.*; import com.panzhihua.common.model.vos.LoginUserInfoVO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.AES; import com.panzhihua.common.utlis.JWTTokenUtil; import com.panzhihua.common.utlis.ResultUtil; import io.jsonwebtoken.Claims; import org.springframework.context.ApplicationContext; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.ValueOperations; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; import org.springframework.util.ObjectUtils; import org.springframework.web.context.support.WebApplicationContextUtils; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: token校验 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2020-11-25 16:35 **/ @Component public class JWTAuthenticationTokenFilter implements Filter { private StringRedisTemplate stringRedisTemplate; private UserService userService; @Override public void init(FilterConfig filterConfig) throws ServletException { } /** * 用户是否登录校验 * * @param servletRequest 请求 * @param servletResponse 返回 * @param filterChain 过滤器链条 * @throws IOException io * @throws ServletException servlet */ @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; HttpServletResponse response = (HttpServletResponse) servletResponse; ServletContext context = request.getServletContext(); ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context); stringRedisTemplate=ctx.getBean(StringRedisTemplate.class); ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); userService=ctx.getBean(UserService.class); String requestURI = request.getRequestURI(); boolean login = requestURI.contains("login"); boolean doc = requestURI.contains("doc.html"); boolean css = requestURI.contains(".css"); boolean js = requestURI.contains(".js"); boolean ui = requestURI.contains("/ui"); boolean swagger = requestURI.contains("swagger"); boolean ico = requestURI.contains(".ico"); boolean docs = requestURI.contains("-docs"); boolean error = requestURI.contains("error"); boolean useragreement = requestURI.contains("useragreement"); boolean refreshToken = requestURI.contains("refreshToken"); boolean logout = requestURI.contains("logout"); boolean wxPay = requestURI.contains("wxNotify"); boolean wxCgi = requestURI.contains("cgi"); boolean isShop = requestURI.contains("isShop"); boolean listadvertisement = requestURI.contains("listadvertisement"); // boolean pageworkguide = !requestURI.contains("workguide/pageworkguide"); // boolean detailworkguide = !requestURI.contains("workguide/detailworkguide"); // boolean pagedynamic = !requestURI.contains("partybuilding/pagedynamic"); // boolean infodynamic = !requestURI.contains("partybuilding/infodynamic"); SafeboxRequestWrapper safeboxRequestWrapper = new SafeboxRequestWrapper(request); if (login||doc||css||js||ui||swagger||ico||docs||error||refreshToken||useragreement||wxPay ||wxCgi||isShop||listadvertisement) { //什么也不做 } else { // 获取请求头中JWT的Token String tokenHeader = request.getHeader(TokenConstant.TOKEN_HEADER); if (null != tokenHeader && tokenHeader.startsWith(TokenConstant.TOKEN_PRE)) { // token过期 String token = tokenHeader.replace(TokenConstant.TOKEN_PRE, ""); Boolean hasKey = stringRedisTemplate.hasKey(UserConstants.LOGOUT_TOKEN + token); if (hasKey) { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "用户已经登出")); return; } Boolean expired = JWTTokenUtil.isTokenExpired(token); if (expired) { if (logout) { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "登出成功")); } else { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token过期")); } return; } // token解析 Claims claims = JWTTokenUtil.getClaimsFromToken(token); if (ObjectUtils.isEmpty(claims)) { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token校验失败")); return; } String username = claims.getSubject(); int type = (Integer) claims.get("type"); if (ObjectUtils.isEmpty(username)) { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token校验失败")); return; } List<SimpleGrantedAuthority> authorities = new ArrayList<>(); List<SimpleGrantedAuthority> authorities1 = new ArrayList<>(); String key = SecurityConstants.ROLE_USER + username; Boolean aBoolean = stringRedisTemplate.hasKey(key); if (1 == type) {//小程序用户统一角色 authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS)); } else { if (aBoolean) { String roles = valueOperations.get(key); authorities = JSONArray.parseArray(roles, SimpleGrantedAuthority.class); } else { R<List<String>> r = userService.getUserRoles(username); List<String> data =(List<String>)r.getData(); if (!ObjectUtils.isEmpty(data)) { data.forEach(s -> { authorities1.add(new SimpleGrantedAuthority(s)); }); authorities = authorities1; valueOperations.set(key, JSONArray.toJSONString(authorities), 24, TimeUnit.HOURS); } } } UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(username, username, authorities);//主要使用权限 账户 密码 不重要 SecurityContextHolder.getContext().setAuthentication(authentication); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_LOGOUT,tokenHeader); //登录用户的所有信息 String userKey = UserConstants.LOGIN_USER_INFO + username; Boolean hasKeyLoginUserInfo = stringRedisTemplate.hasKey(userKey); if(hasKeyLoginUserInfo){ String userInfo = valueOperations.get(userKey); byte[] encrypt = AES.encrypt(userInfo, Constants.AES_KEY); String hexStr = AES.parseByte2HexStr(encrypt); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO, hexStr); }else{ R<LoginUserInfoVO> r = userService.getUserInfoByUserId(username); if (!R.isOk(r)) { ResultUtil.responseJson(response, R.fail(HttpStatus.ERROR, "登录用户信息查询失败")); return; } LoginUserInfoVO data = r.getData(); String userInfo = JSONObject.toJSONString(data); valueOperations.set(userKey,userInfo,24,TimeUnit.HOURS); byte[] encrypt = AES.encrypt(userInfo, Constants.AES_KEY); String hexStr = AES.parseByte2HexStr(encrypt); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO,hexStr ); } } else { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token校验失败")); return; } } filterChain.doFilter(safeboxRequestWrapper,response); } @Override public void destroy() { } } package com.panzhihua.zuul.filters; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.panzhihua.common.constants.*; import com.panzhihua.common.model.vos.LoginUserInfoVO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.AES; import com.panzhihua.common.utlis.JWTTokenUtil; import com.panzhihua.common.utlis.ResultUtil; import io.jsonwebtoken.Claims; import org.springframework.context.ApplicationContext; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.ValueOperations; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; import org.springframework.util.ObjectUtils; import org.springframework.web.context.support.WebApplicationContextUtils; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; /** * @program: springcloud_k8s_panzhihuazhihuishequ * @description: token校验 * @author: huang.hongfa weixin hhf9596 qq 959656820 * @create: 2020-11-25 16:35 **/ @Component public class JWTAuthenticationTokenFilter implements Filter { private StringRedisTemplate stringRedisTemplate; private UserService userService; @Override public void init(FilterConfig filterConfig) throws ServletException { } /** * 用户是否登录校验 * * @param servletRequest 请求 * @param servletResponse 返回 * @param filterChain 过滤器链条 * @throws IOException io * @throws ServletException servlet */ @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; HttpServletResponse response = (HttpServletResponse) servletResponse; ServletContext context = request.getServletContext(); ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context); stringRedisTemplate=ctx.getBean(StringRedisTemplate.class); ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); userService=ctx.getBean(UserService.class); String requestURI = request.getRequestURI(); boolean login = requestURI.contains("login"); boolean doc = requestURI.contains("doc.html"); boolean css = requestURI.contains(".css"); boolean js = requestURI.contains(".js"); boolean ui = requestURI.contains("/ui"); boolean swagger = requestURI.contains("swagger"); boolean ico = requestURI.contains(".ico"); boolean docs = requestURI.contains("-docs"); boolean error = requestURI.contains("error"); boolean useragreement = requestURI.contains("useragreement"); boolean refreshToken = requestURI.contains("refreshToken"); boolean logout = requestURI.contains("logout"); boolean wxPay = requestURI.contains("wxNotify"); boolean wxCgi = requestURI.contains("cgi"); boolean isShop = requestURI.contains("isShop"); boolean listadvertisement = requestURI.contains("listadvertisement"); // boolean pageworkguide = !requestURI.contains("workguide/pageworkguide"); // boolean detailworkguide = !requestURI.contains("workguide/detailworkguide"); // boolean pagedynamic = !requestURI.contains("partybuilding/pagedynamic"); // boolean infodynamic = !requestURI.contains("partybuilding/infodynamic"); SafeboxRequestWrapper safeboxRequestWrapper = new SafeboxRequestWrapper(request); if (login||doc||css||js||ui||swagger||ico||docs||error||refreshToken||useragreement||wxPay ||wxCgi||isShop||listadvertisement) { //什么也不做 } else { // 获取请求头中JWT的Token String tokenHeader = request.getHeader(TokenConstant.TOKEN_HEADER); if (null != tokenHeader && tokenHeader.startsWith(TokenConstant.TOKEN_PRE)) { // token过期 String token = tokenHeader.replace(TokenConstant.TOKEN_PRE, ""); Boolean hasKey = stringRedisTemplate.hasKey(UserConstants.LOGOUT_TOKEN + token); if (hasKey) { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "用户已经登出")); return; } Boolean expired = JWTTokenUtil.isTokenExpired(token); if (expired) { if (logout) { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "登出成功")); } else { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token过期")); } return; } // token解析 Claims claims = JWTTokenUtil.getClaimsFromToken(token); if (ObjectUtils.isEmpty(claims)) { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token校验失败")); return; } String username = claims.getSubject(); int type = (Integer) claims.get("type"); if (ObjectUtils.isEmpty(username)) { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token校验失败")); return; } List<SimpleGrantedAuthority> authorities = new ArrayList<>(); List<SimpleGrantedAuthority> authorities1 = new ArrayList<>(); if (1 == type) {//小程序用户统一角色 String roleAppletKey = SecurityConstants.ROLE_APPLETS_USER +username; if(stringRedisTemplate.hasKey(roleAppletKey)){ String roles = valueOperations.get(roleAppletKey); authorities = JSONArray.parseArray(roles, SimpleGrantedAuthority.class); }else { authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS)); String userKey = UserConstants.LOGIN_USER_INFO + username; Boolean hasKeyLoginUserInfo = stringRedisTemplate.hasKey(userKey); if (hasKeyLoginUserInfo) { String userInfo = valueOperations.get(userKey); LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); //判断用户是否已实名制 if (loginUserInfoVO.getIsRealNamed() != null && loginUserInfoVO.getIsRealNamed()) { authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS_REAL_NAMED)); } } valueOperations.set(roleAppletKey, JSONArray.toJSONString(authorities), 24, TimeUnit.HOURS); } } else { String key = SecurityConstants.ROLE_USER + username; Boolean aBoolean = stringRedisTemplate.hasKey(key); if (aBoolean) { String roles = valueOperations.get(key); authorities = JSONArray.parseArray(roles, SimpleGrantedAuthority.class); } else { R<List<String>> r = userService.getUserRoles(username); List<String> data =(List<String>)r.getData(); if (!ObjectUtils.isEmpty(data)) { data.forEach(s -> { authorities1.add(new SimpleGrantedAuthority(s)); }); authorities = authorities1; valueOperations.set(key, JSONArray.toJSONString(authorities), 24, TimeUnit.HOURS); } } } UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(username, username, authorities);//主要使用权限 账户 密码 不重要 SecurityContextHolder.getContext().setAuthentication(authentication); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_LOGOUT,tokenHeader); //登录用户的所有信息 String userKey = UserConstants.LOGIN_USER_INFO + username; Boolean hasKeyLoginUserInfo = stringRedisTemplate.hasKey(userKey); if(hasKeyLoginUserInfo){ String userInfo = valueOperations.get(userKey); byte[] encrypt = AES.encrypt(userInfo, Constants.AES_KEY); String hexStr = AES.parseByte2HexStr(encrypt); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO, hexStr); }else{ R<LoginUserInfoVO> r = userService.getUserInfoByUserId(username); if (!R.isOk(r)) { ResultUtil.responseJson(response, R.fail(HttpStatus.ERROR, "登录用户信息查询失败")); return; } LoginUserInfoVO data = r.getData(); String userInfo = JSONObject.toJSONString(data); valueOperations.set(userKey,userInfo,24,TimeUnit.HOURS); byte[] encrypt = AES.encrypt(userInfo, Constants.AES_KEY); String hexStr = AES.parseByte2HexStr(encrypt); safeboxRequestWrapper.addHeader(TokenConstant.TOKEN_USERINFO,hexStr ); } } else { ResultUtil.responseJson(response, R.fail(HttpStatus.UNAUTHORIZED, "token校验失败")); return; } } filterChain.doFilter(safeboxRequestWrapper,response); } @Override public void destroy() { } } springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/resources/bootstrap.yml
@@ -28,5 +28,60 @@ service-url: defaultZone: http://${EUREKA_URL:localhost}:8192/eureka # applet 需实名认证的接口地址 applet: realname: verify: - POST:/api/applets/house - POST:/api/applets/putHouse - POST:/api/applets/undercarriageHouse - GET:/api/applets/delHouse - POST:/api/applets/questnaire/add - GET:/api/applets/questnaire/delete - POST:/api/applets/questnaire/edit - GET:/api/applets/questnaire/stat/details - POST:/api/applets/questnaire/toggle - POST:/api/applets/questnaire/stat/answer - POST:/api/applets/index/comacteasyphotocomment - POST:/api/applets/index/commentsign - POST:/api/applets/index/addmessageback - POST:/api/applets/index/addmessage - POST:/api/applets/index/easyphoto - PUT:/api/applets/index/easyphoto - POST:/api/applets/index/microwish - PUT:/api/applets/index/microwish - POST:/api/applets/discuss - POST:/api/applets/discusscommentback - POST:/api/applets/discusscomment - PUT:/api/applets/discusscommentuser - POST:/api/applets/discussuser - PUT:/api/applets/discussuser - POST:/api/applets/neighbor/addNeighborByApp - POST:/api/applets/neighbor/cancel/fabulous - POST:/api/applets/neighbor/comment - POST:/api/applets/neighbor/fabulous - POST:/api/applets/neighbor/reply - PUT:/api/applets/community/signactivity - POST:/api/applets/community/volunteer - POST:/api/applets/user/houses - POST:/api/appletsbackstage/common/data/car/save - DELETE:/api/appletsbackstage/common/data/car/delete - POST:/api/applets/community/car/register - PUT:/api/applets/partybuilding/activitysignup - GET:/api/applets/questnaire/stat - GET:/api/applets/questnaire/view - POST:/api/applets/user/addfamily - PUT:/api/applets/user/putfamily - POST:/api/applets/user/getUserArchives - POST:/api/applets/user/updateUserArchives - POST:/api/applets/user/partybuildingembercertification - GET:/api/applets/user/partybuildingembercertification - GET:/api/applets/index/pagemymessage - POST:/api/applets/index/pagemymessage - POST:/api/applets/user/listactivity - POST:/api/applets/partybuilding/activityinfo - PUT:/api/applets/user/microwishconfirm - POST:/api/applets/user/pagemicrowish - POST:/api/applets/user/pageeasyphoto - POST:/api/applets/neighbor/user/page - GET:/api/applets/user/listfamily