Merge remote-tracking branch 'origin/test' into test
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
| | |
| | | comActMessageVO.setUserId(userId); |
| | | comActMessageVO.setUserName(loginUserInfo.getName()); |
| | | comActMessageVO.setUserAccount(loginUserInfo.getAccount()); |
| | | comActMessageVO.setUserPhone(loginUserInfo.getPhone()); |
| | | comActMessageVO.setIspublic(1); |
| | | comActMessageVO.setStatus(1); |
| | | return communityService.addMessage(comActMessageVO); |
| | |
| | | @ApiOperation(value = "社区所有启用的党组织列表", response = PartyOrganizationVO.class) |
| | | @PostMapping("listpartyorganization") |
| | | public R listPartyOrganization(@RequestBody ComListPartyDTO comListPartyDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | log.info("社区所有党组织社区id【{}】", communityId); |
| | | if(communityId != null){ |
| | | comListPartyDTO.setCommunityId(communityId); |
| | | } |
| | | // Long communityId = this.getCommunityId(); |
| | | // log.info("社区所有党组织社区id【{}】", communityId); |
| | | // if(communityId != null){ |
| | | // comListPartyDTO.setCommunityId(communityId); |
| | | // } |
| | | return partyBuildingService.listPartyOrganizationByApp(comListPartyDTO); |
| | | } |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | 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.model.dtos.user.SysUserEditTipsDTO; |
| | | import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | vo.setUnitNo(Integer.valueOf(oneData.get(9))); |
| | | } |
| | | if(oneData.get(10) != null){ |
| | | vo.setHouseNo(Integer.valueOf(oneData.get(10))); |
| | | vo.setHouseNo(Integer.valueOf(oneData.get(10).trim())); |
| | | } |
| | | if(oneData.get(11) != null){ |
| | | vo.setPhone(oneData.get(11)); |
| | |
| | | vo.setUnitNo(Integer.valueOf(oneData.get(9))); |
| | | } |
| | | if(oneData.get(10) != null){ |
| | | vo.setHouseNo(Integer.valueOf(oneData.get(10))); |
| | | vo.setHouseNo(Integer.valueOf(oneData.get(10).trim())); |
| | | } |
| | | if(oneData.get(11) != null){ |
| | | vo.setPhone(oneData.get(11)); |
| | |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | private String busScope; |
| | | |
| | | @ApiModelProperty("服务范围标记:1-全攀枝花市,2-部分地区") |
| | | @NotBlank(groups = {AddGroup.class},message = "服务范围标记不能为空") |
| | | @NotNull(groups = {AddGroup.class},message = "服务范围标记不能为空") |
| | | private Integer areaFlag; |
| | | |
| | | @ApiModelProperty("商家logo") |
| | |
| | | private Date payTimeEnd; |
| | | @ApiModelProperty(value = "订单ID-如果指定了订单ID,只导出指定订单,其它搜索条件将被忽略", notes = "如果指定了订单ID,其它搜索条件将被忽略,只导出指定订单") |
| | | private Long[] orderIds; |
| | | @JsonIgnore |
| | | @ApiModelProperty(hidden = true) |
| | | private Long userId; |
| | | } |
| | |
| | | @ApiModelProperty("是否已经点赞 1 是 2 否") |
| | | private Integer haveSign; |
| | | |
| | | /** |
| | | * 发布类型(1.小程序发布 2.后台发布) |
| | | */ |
| | | @ApiModelProperty("发布类型(1.小程序发布 2.后台发布)") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 发布状态(1.待审核 2.显示 3.隐藏 4.驳回) |
| | | */ |
| | | @ApiModelProperty("发布状态(1.待审核 2.显示 3.隐藏 4.驳回)") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | } |
| | |
| | | @ApiModelProperty("是否已经点赞 1 是 2 否") |
| | | private Integer haveSign; |
| | | |
| | | /** |
| | | * 发布类型(1.小程序发布 2.后台发布) |
| | | */ |
| | | @ApiModelProperty("发布类型(1.小程序发布 2.后台发布)") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("驳回原因") |
| | | private String refuseReason; |
| | | |
| | | /** |
| | | * 发布状态(1.待审核 2.显示 3.隐藏 4.驳回) |
| | | */ |
| | | public interface status{ |
| | | int dsh = 1; |
| | | int xs = 2; |
| | | int yc = 3; |
| | | int bh = 4; |
| | | } |
| | | } |
| | |
| | | private String name; |
| | | @ApiModelProperty(value = "身份证") |
| | | private String idCard; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @ApiModelProperty(value = "入党时间") |
| | | private Date joinTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | |
| | | private Long userId; |
| | | @ApiModelProperty(value = "党员审查结果: 0 待审核 1 已审核 2 自动认证 3 已驳回") |
| | | private Integer auditResult; |
| | | @ApiModelProperty(value = "驳回原因") |
| | | private String refuseReason; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商品规格") |
| | | private String goodsAttr; |
| | | |
| | | /** |
| | | * 商品状态(1.出售中 2.已下架 3.已删除) |
| | | */ |
| | | @ApiModelProperty(value = "商品状态(1.出售中 2.已下架 3.已删除)") |
| | | private Integer goodsStatus = 1; |
| | | |
| | | /** |
| | | * 商品状态(1.出售中 2.已下架 3.已删除) |
| | | */ |
| | | public interface goodsStatus{ |
| | | int csz = 1; |
| | | int yxj = 2; |
| | | int ysc = 3; |
| | | } |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date deliveryTime; |
| | | |
| | | @ApiModelProperty(value = "收货时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date receivingTime; |
| | | |
| | | @ApiModelProperty(value = "订单下商品信息") |
| | | private List<ComShopOrderGoodsVO> orderGoodsVOList; |
| | | |
| | |
| | | @ApiModelProperty("该商家是否订单完成") |
| | | private Boolean orderDone; |
| | | |
| | | @ApiModelProperty("删除状态(1.未删除 2.已删除)") |
| | | private Integer deleteStatus; |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | @ApiModelProperty("店铺登陆账号") |
| | | @Pattern(groups = {AddGroup.class}, message="【密码】格式为6-16个字符,英文,数字,且必须包含英文和数字",regexp="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$") |
| | | //@Pattern(groups = {AddGroup.class}, message="【密码】格式为6-16个字符,英文,数字,且必须包含英文和数字",regexp="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$") |
| | | @NotBlank(message = "店铺登陆账号不能为空") |
| | | private String storeAccount; |
| | | |
| | |
| | | @ApiModelProperty("消息标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("具体业务类型 1 社区活动 2党建活动 3微心愿通知 4随手拍服务通知 5支援者申请 6实名制审核 7人脸识别审核 8积分获取和消耗 9积分点击直接跳转积分列表 10 房屋审核通知 11 党员认证审核通知") |
| | | @ApiModelProperty("具体业务类型 1 社区活动 2党建活动 3微心愿通知 4随手拍服务通知 5支援者申请 6实名制审核 7人脸识别审核 8积分获取和消耗 9积分点击直接跳转积分列表 10 房屋审核通知 11 党员认证审核通知 12邻里圈审核通知") |
| | | private Integer businessType; |
| | | |
| | | @ApiModelProperty("业务标题") |
| | |
| | | |
| | | @ApiModelProperty("户口本照片 逗号隔开") |
| | | private String familyBook; |
| | | |
| | | @ApiModelProperty("职业") |
| | | private String job; |
| | | } |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | @PostMapping("timedtaskactmicrowishall") |
| | | @PostMapping("timedtaskactmicrowish") |
| | | R timedTaskActMicroWishAll(); |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "分页查询单位管理列表", response = ComMngRealCompanyVO.class) |
| | | @PostMapping("/company/page") |
| | | public R pageQueryComMngRealCompany(@RequestBody PageComMngRealCompanyDTO pageComMngRealCompanyDTO) { |
| | | pageComMngRealCompanyDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.pageQueryComMngRealCompany(pageComMngRealCompanyDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页查询实有资产列表", response = ComMngRealAssetsVO.class) |
| | | @PostMapping("/assets/page") |
| | | public R pageQueryComMngRealAssets(@RequestBody PageComMngRealAssetsDTO pageComMngRealAssetsDTO) { |
| | | pageComMngRealAssetsDTO.setCommunityId(this.getCommunityId()); |
| | | return communityService.pageQueryComMngRealAssets(pageComMngRealAssetsDTO); |
| | | } |
| | | |
| | |
| | | long l = System.currentTimeMillis(); |
| | | if (l >= time) { |
| | | comActDynVO.setStatus(1); |
| | | }else{ |
| | | comActDynVO.setStatus(0); |
| | | } |
| | | } |
| | | comActDynVO.setCommunityId(communityId); |
| | |
| | | return communityService.deleteDynamic(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询社区动态") |
| | | @ApiOperation(value = "分页查询社区动态", response = ComActDynVO.class) |
| | | @PostMapping("pagedynamic") |
| | | public R pageDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | Long communityId = this.getCommunityId(); |
| | |
| | | return communityService.pageDynamicByAdmin(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区动态详情") |
| | | @ApiOperation(value = "社区动态详情", response = ComActDynVO.class) |
| | | @GetMapping("detaildynamic") |
| | | @ApiImplicitParam(name = "id", value = "社区动态主键", required = true) |
| | | public R detailDynamic(@RequestParam("id") Long id) { |
| | |
| | | if (!ObjectUtils.isEmpty(publishAt)) { |
| | | long time = publishAt.getTime(); |
| | | long l = System.currentTimeMillis(); |
| | | if (l >= time) { |
| | | if (l > time) { |
| | | partyCommitteeVO.setStatus(1); |
| | | }else{ |
| | | partyCommitteeVO.setStatus(2); |
| | | } |
| | | } |
| | | return partyBuildingService.updateYnamic(partyCommitteeVO); |
| | |
| | | break; |
| | | case 0: |
| | | partyBuildingMemberVO.setAuditResult(3); |
| | | partyBuildingMemberVO.setRefuseReason(partyBuildingMemberDTO.getRefuseReason()); |
| | | break; |
| | | default: |
| | | return R.fail("参数错误"); |
| | |
| | | } |
| | | } |
| | | return r; |
| | | } else if (0 == partyBuildingMemberVO.getAuditResult() && R.isOk(updated)) { |
| | | } else if (3 == partyBuildingMemberVO.getAuditResult() && R.isOk(updated)) { |
| | | R r = userService.updateUserNotPartymember(userIdcard); |
| | | if (R.isOk(r)) { |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(userId); |
| | | sysUserNoticeVO.setType(3); |
| | | sysUserNoticeVO.setTitle("党员认证申请被驳回"); |
| | | sysUserNoticeVO.setTitle("党员认证申请未通过"); |
| | | sysUserNoticeVO.setBusinessType(11); |
| | | sysUserNoticeVO.setBusinessTitle(" "); |
| | | sysUserNoticeVO.setBusinessContent("你提交的党员认证申请已被驳回"); |
| | | sysUserNoticeVO.setBusinessContent("驳回原因:" + partyBuildingMemberVO.getRefuseReason()); |
| | | sysUserNoticeVO.setBusinessId(memId); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setBusinessStatus(1); |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.DetailNeighborAllCommentByAdminDTO; |
| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public class NeighborApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @ApiOperation(value = "邻里圈_分页",response = ComActNeighborCircleAdminVO.class) |
| | | @PostMapping("pageNeighborByAdmin") |
| | |
| | | @ApiOperation(value = "邻里圈_修改") |
| | | @PostMapping("changeStatusByAdmin") |
| | | R changeStatusByAdmin(@RequestBody EditNeighborCircleAdminVO editNeighborCircleAdminVO){ |
| | | return communityService.changeStatusByAdmin(editNeighborCircleAdminVO); |
| | | R r = communityService.changeStatusByAdmin(editNeighborCircleAdminVO); |
| | | if (R.isOk(r)){//邻里圈审核 |
| | | if(editNeighborCircleAdminVO.getStatus().equals(EditNeighborCircleAdminVO.status.xs)){ |
| | | //审核通过添加提示信息 |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(Long.parseLong(r.getData().toString())); |
| | | sysUserNoticeVO.setType(3); |
| | | sysUserNoticeVO.setTitle("邻里圈审核通过"); |
| | | sysUserNoticeVO.setBusinessType(12); |
| | | sysUserNoticeVO.setBusinessTitle(""); |
| | | sysUserNoticeVO.setBusinessContent("您发布的邻里圈已通过审核,可在邻里圈模块查看"); |
| | | sysUserNoticeVO.setBusinessId(editNeighborCircleAdminVO.getId()); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setBusinessStatus(2); |
| | | R r2 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r2)) { |
| | | log.info("邻里圈审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | }else if(editNeighborCircleAdminVO.getStatus().equals(EditNeighborCircleAdminVO.status.bh)){ |
| | | //审核驳回添加提示信息 |
| | | SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); |
| | | sysUserNoticeVO.setUserId(Long.parseLong(r.getData().toString())); |
| | | sysUserNoticeVO.setType(3); |
| | | sysUserNoticeVO.setTitle("邻里圈审核未通过"); |
| | | sysUserNoticeVO.setBusinessType(12); |
| | | sysUserNoticeVO.setBusinessContent("驳回原因:" + editNeighborCircleAdminVO.getRefuseReason()); |
| | | sysUserNoticeVO.setBusinessTitle(""); |
| | | sysUserNoticeVO.setBusinessId(editNeighborCircleAdminVO.getId()); |
| | | sysUserNoticeVO.setStatus(0); |
| | | sysUserNoticeVO.setBusinessStatus(1); |
| | | R r2 = userService.addNotice(sysUserNoticeVO); |
| | | if (R.isOk(r2)) { |
| | | log.info("邻里圈审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); |
| | | } |
| | | } |
| | | } |
| | | return r; |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "身份证号", required = true) |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "驳回原因") |
| | | private String refuseReason; |
| | | |
| | | } |
| | |
| | | @Select("select * from com_act_message_back where msg_id=#{id} order by create_at desc") |
| | | List<ComActMessageBackVO> selectMsgBackList(@Param("id")Long id); |
| | | |
| | | @Select("select * from com_act_message where (sendto_user_id in (select id from com_pb_member_role t1 where t1.phone=#{comActMessageVO.phone})) or (sendto_user_id in (select id from com_pb_service_team t2 where t2.phone=#{comActMessageVO.phone})) order by create_at desc") |
| | | @Select("<script>" + |
| | | "select * from com_act_message " + |
| | | " where " + |
| | | " ((sendto_user_id in (select id from com_pb_member_role t1 where t1.phone=#{comActMessageVO.phone})) " + |
| | | " or (sendto_user_id in (select id from com_pb_service_team t2 where t2.phone=#{comActMessageVO.phone})))" + |
| | | "<if test='comActMessageVO.status != null'>" + |
| | | " and status=#{comActMessageVO.status} \n" + |
| | | " </if> " + |
| | | " order by create_at desc"+ |
| | | "</script>") |
| | | IPage<PageComActMessageVO> pageSendMeMessageApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO); |
| | | |
| | | @Select("select * from com_act_message where user_id=#{comActMessageVO.userId} order by create_at desc") |
| | | IPage<PageComActMessageVO> pageMyMessageApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO); |
| | | @Select("select * from com_act_message where sendto_user_id=#{comActMessageVO.sendtoUserId} and ispublic=1") |
| | | @Select("select * from com_act_message where sendto_user_id=#{comActMessageVO.sendtoUserId} and ispublic=1 order by create_at desc ") |
| | | IPage<PageComActMessageVO> pageMessageByUserApplets(Page page, @Param("comActMessageVO")ComActMessageVO comActMessageVO); |
| | | |
| | | @Update("update com_act_message set ispublic=#{ispublic} where id=#{id}") |
| | |
| | | IPage<ComActNeighborCircleCommentAppVO> pageNeighborCommentByApp(Page page, @Param("neighborCircleAppDTO") ComActNeighborCircleDetailAppDTO neighborCircleAppDTO); |
| | | |
| | | @Select("<script> " + |
| | | "select nc.*,u.name as userName from com_act_neighbor_circle_comment nc left join sys_user u on nc.user_id=u.user_id " + |
| | | "select nc.*,u.nick_name as userName,u.phone as userPhone from com_act_neighbor_circle_comment nc left join sys_user u on nc.user_id=u.user_id " + |
| | | "<where>"+ |
| | | "<if test='dto.id != null and dto.id!= 0l'>" + |
| | | "nc.circle_id = #{dto.id}"+ |
| | |
| | | "canc.last_comment_num," + |
| | | "canc.last_fabulous_num," + |
| | | "canc.last_views_num," + |
| | | "canc.type," + |
| | | "su.nick_name as name," + |
| | | "su.community_id," + |
| | | "su.image_url as headUrl " + |
| | | " FROM " + |
| | | " com_act_neighbor_circle AS canc" + |
| | |
| | | " order by (canc.last_views_num + canc.last_comment_num + canc.last_fabulous_num) desc " + |
| | | " </if> " + |
| | | "<if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 2'>" + |
| | | " order by canc.reply_at desc,canc.create_at desc " + |
| | | " order by canc.create_at desc " + |
| | | " </if> " + |
| | | "<if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 3'>" + |
| | | " order by (canc.views_num + canc.comment_num + canc.fabulous_num) desc " + |
| | |
| | | @Select("<script> " + |
| | | "select canc.id,su.nick_name as name,su.image_url as headUrl,canc.release_content " + |
| | | ",canc.release_images,canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num " + |
| | | ",canc.is_boutique,canc.create_at,canc.reply_at from com_act_neighbor_circle as canc " + |
| | | ",canc.is_boutique,canc.create_at,canc.reply_at,su.community_id,canc.type from com_act_neighbor_circle as canc " + |
| | | " left join sys_user as su on su.user_id = canc.release_id where id = #{circleId}"+ |
| | | " </script>") |
| | | ComActNeighborCircleDetailAppVO neighborDetailByApp(@Param("circleId") Long circleId); |
| | | @Select("<script> \n"+ |
| | | "SELECT\n" + |
| | | "nc.*,\n" + |
| | | "u.`name` AS releaseName,u.`type` as userType\n" + |
| | | ",ca.name as communityName\n" + |
| | | "u.`nick_name` AS releaseName,u.`type` as userType\n" + |
| | | ",u.name as communityName\n" + |
| | | "FROM\n" + |
| | | "com_act_neighbor_circle nc\n" + |
| | | "LEFT JOIN sys_user u ON nc.release_id = u.user_id\n" + |
| | | "left join com_act ca on u.community_id=ca.community_id \n" + |
| | | "<where>"+ |
| | | "nc.community_id = #{neighborCircleAdminDTO.communityId} \n"+ |
| | | "<if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != ""'>" + |
| | |
| | | AdministratorsUserVO selectUserByUserId(@Param("userId") Long userId); |
| | | |
| | | @Select("<script> " + |
| | | "select id,release_content,release_images,status,create_at,comment_num,fabulous_num,forward_num,views_num,refuse_reason " + |
| | | "select canc.id,canc.release_content,canc.release_images,canc.status,canc.create_at" + |
| | | ",canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num,canc.refuse_reason,su.nick_name as name,su.image_url as headUrl " + |
| | | " from com_act_neighbor_circle as canc " + |
| | | " where canc.release_id = #{userId} order by create_at desc" + |
| | | " left join sys_user as su on su.user_id = canc.release_id " + |
| | | " where canc.release_id = #{userId} and canc.status != 3 order by create_at desc" + |
| | | " </script>") |
| | | IPage<ComActNeighborCircleAppVO> neighborExamineByApp(Page page,@Param("userId") Long userId); |
| | | |
| | |
| | | " from com_act_neighbor_circle_comment_reply as reply" + |
| | | " left join sys_user as su on su.user_id = reply.user_id" + |
| | | " left join sys_user as su1 on su1.user_id = reply.parent_user_id" + |
| | | " where reply.comment_id = #{commentId}") |
| | | " where reply.comment_id = #{commentId} and reply.status = 1") |
| | | IPage<ComActNeighborCommentReplyAppVO> neighborCommentReplyByApp(Page page, @Param("commentId") Long commentId); |
| | | |
| | | } |
| | |
| | | " and t.name LIKE concat( #{pageComMngRealAssetsDTO.name}, '%' ) " + |
| | | " </if> " + |
| | | "<if test='pageComMngRealAssetsDTO.communityId != null and pageComMngRealAssetsDTO.communityId != 0'>" + |
| | | " and t.community_id = #{pageComMngRealCompanyDTO.communityId} " + |
| | | " and t.community_id = #{pageComMngRealAssetsDTO.communityId} " + |
| | | " </if> " + |
| | | " order by t.create_at desc"+ |
| | | "</script>") |
| | |
| | | private Integer lastViewsNum; |
| | | |
| | | /** |
| | | * 发布类型(1.小程序发布 2.后台发布) |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 发布状态(1.待审核 2.显示 3.隐藏 4.驳回) |
| | | */ |
| | | public interface status{ |
| | |
| | | int bh = 4; |
| | | } |
| | | |
| | | /** |
| | | * 发布类型(1.小程序发布 2.后台发布) |
| | | */ |
| | | public interface type{ |
| | | int mini = 1; |
| | | int admin = 2; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActNeighborCircleDO{" + |
| | |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 收货时间 |
| | | */ |
| | | private Date receivingTime; |
| | | |
| | | /** |
| | | * 订单状态(1.待付款 2.代发货 3.待收货 4.待评价 5.已完成 6.已取消) |
| | | */ |
| | | public interface status{ |
| | |
| | | |
| | | /** |
| | | * 查询便民服务商家详情 |
| | | * @param id 商家主键 |
| | | * @return |
| | | */ |
| | | R getComCvtBusiness(Long id); |
| | |
| | | private ComActNeighborCircleFabulousDAO comActNeighborCircleFabulousDAO; |
| | | @Resource |
| | | private ComActNeighborCircleBrowseDAO comActNeighborCircleBrowseDAO; |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | |
| | | /** |
| | | * 分页查询邻里圈列表 |
| | |
| | | }else{ |
| | | circleAppVO.setHaveSign(2); |
| | | } |
| | | |
| | | if(circleAppVO.getType() != null && circleAppVO.getType().equals(ComActNeighborCircleDO.type.admin)){ |
| | | ComActDO actDO = comActDAO.selectById(circleAppVO.getCommunityId()); |
| | | if(actDO != null){ |
| | | circleAppVO.setName(actDO.getName()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | return R.ok(doPager); |
| | |
| | | ComActNeighborCircleDetailAppVO circleDetailAppVO = this.baseMapper.neighborDetailByApp(neighborCircleAppDTO.getCircleId()); |
| | | if(circleDetailAppVO == null){ |
| | | return R.fail("未找到邻里圈信息"); |
| | | } |
| | | |
| | | if(circleDetailAppVO.getType() != null && circleDetailAppVO.getType().equals(ComActNeighborCircleDO.type.admin)){ |
| | | ComActDO actDO = comActDAO.selectById(circleDetailAppVO.getCommunityId()); |
| | | if(actDO != null){ |
| | | circleDetailAppVO.setName(actDO.getName()); |
| | | } |
| | | } |
| | | |
| | | //查询邻里圈点赞信息 |
| | |
| | | comActNeighborCircleDO.setCommunityId(adminUser.getCommunityId()); |
| | | comActNeighborCircleDO.setReleaseContent(addVO.getReleaseContent()); |
| | | comActNeighborCircleDO.setReleaseImages(addVO.getReleaseImages()); |
| | | comActNeighborCircleDO.setStatus(1); |
| | | comActNeighborCircleDO.setType(2); |
| | | comActNeighborCircleDO.setStatus(2); |
| | | comActNeighborCircleDO.setCommentNum(0); |
| | | comActNeighborCircleDO.setFabulousNum(0); |
| | | comActNeighborCircleDO.setForwardNum(0); |
| | |
| | | neighborCircleDO.setRefuseReason(editVO.getRefuseReason()); |
| | | } |
| | | this.baseMapper.updateById(neighborCircleDO); |
| | | return R.ok(); |
| | | return R.ok(neighborCircleDO.getReleaseId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R neighborExamineByApp(ComActNeighborCircleAppDTO neighborCircleAppDTO){ |
| | | IPage<ComActNeighborCircleAppVO> neighborCircleIPage = this.baseMapper.neighborExamineByApp( |
| | | new Page<>(neighborCircleAppDTO.getPageNum(),neighborCircleAppDTO.getPageSize()),neighborCircleAppDTO.getUserId()); |
| | | if(!neighborCircleIPage.getRecords().isEmpty()) { |
| | | for (ComActNeighborCircleAppVO circleAppVO : neighborCircleIPage.getRecords()) { |
| | | //查询点赞信息 |
| | | ComActNeighborCircleFabulousDO circleFabulousDO = comActNeighborCircleFabulousDAO.selectOne( |
| | | new QueryWrapper<ComActNeighborCircleFabulousDO>().lambda().eq(ComActNeighborCircleFabulousDO::getParentId, circleAppVO.getId()) |
| | | .eq(ComActNeighborCircleFabulousDO::getUserId, neighborCircleAppDTO.getUserId()) |
| | | .eq(ComActNeighborCircleFabulousDO::getType, ComActNeighborCircleFabulousDO.type.llq) |
| | | .eq(ComActNeighborCircleFabulousDO::getIsEffective, ComActNeighborCircleFabulousDO.isEffective.yes)); |
| | | if (circleFabulousDO != null) { |
| | | circleAppVO.setHaveSign(1); |
| | | } else { |
| | | circleAppVO.setHaveSign(2); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(neighborCircleIPage); |
| | | } |
| | | |
| | |
| | | } |
| | | commentDO.setStatus(dto.getStatus()); |
| | | neighborCircleCommentDAO.updateById(commentDO); |
| | | |
| | | //查询邻里圈更新邻里圈评论数量 |
| | | ComActNeighborCircleDO neighborCircleDO = this.baseMapper.selectById(commentDO.getCircleId()); |
| | | if(neighborCircleDO != null){ |
| | | if(dto.getStatus().equals(2)){ |
| | | neighborCircleDO.setCommentNum(neighborCircleDO.getCommentNum() - 1); |
| | | }else{ |
| | | neighborCircleDO.setCommentNum(neighborCircleDO.getCommentNum() + 1); |
| | | } |
| | | this.baseMapper.updateById(neighborCircleDO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public R listCommunityAll() { |
| | | List<ComActDO> comActDOS = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState, 0).orderByDesc(ComActDO::getCreateAt)); |
| | | List<ComActDO> comActDOS = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState, 0) |
| | | .eq(ComActDO::getCityCode, "510400") |
| | | .orderByDesc(ComActDO::getCreateAt)); |
| | | List<ComActVO> comActVOS = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(comActDOS)) { |
| | | comActDOS.forEach(comActDO -> { |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.panzhihua.service_community.service.ComCvtBusinessService; |
| | | import com.panzhihua.service_community.service.ComCvtServeService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.boot.util.LambdaSafe; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | |
| | | List<ComActDO> comActDOS = new ArrayList<>(); |
| | | |
| | | if(comCvtBusinessDO.getAreaFlag()==1){ |
| | | comActDOS = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState,0)); |
| | | LambdaQueryWrapper<ComActDO> lambdaQueryWrapper = new LambdaQueryWrapper<ComActDO>().eq(ComActDO::getState,0); |
| | | comActDOS = comActDAO.selectList(lambdaQueryWrapper); |
| | | }else{ |
| | | List<Long> areaIds = comCvtBusinessAreaService.getBusinessServiceAreaIds(comCvtBusinessDO.getId()); |
| | | if(!ObjectUtils.isEmpty(areaIds)){ |
| | | comActDOS = comActDAO.selectBatchIds(areaIds); |
| | | List<ComActDO> busiDO = comActDAO.selectBatchIds(areaIds); |
| | | } |
| | | } |
| | | |
| | |
| | | if(populationDO==null){ |
| | | return R.fail(); |
| | | } |
| | | String cardNo = populationDO.getCardNo(); |
| | | BeanUtils.copyProperties(vo,populationDO); |
| | | try { |
| | | //TODO 修改拦截器时候需要维护加密操作 |
| | | populationDO.setCardNo(AESUtil.encrypt128(populationDO.getCardNo(), aesKey)); |
| | | populationDO.setPhone(AESUtil.encrypt128(populationDO.getPhone(), aesKey)); |
| | | |
| | | } catch (NoSuchPaddingException e) { |
| | | if(!cardNo.equals(vo.getCardNo())){//判断是否修改身份证号码 |
| | | //判断要修改的身份证号码是否已存在 |
| | | ComMngPopulationDO cardNoDO = populationDAO.selectOne(new QueryWrapper<ComMngPopulationDO>() |
| | | .lambda().eq(ComMngPopulationDO::getCardNo,vo.getCardNo())); |
| | | if(cardNoDO != null){ |
| | | return R.fail("您输入的身份证已存在,请重新输入"); |
| | | } |
| | | populationDO.setCardNo(AESUtil.encrypt128(vo.getCardNo(), aesKey)); |
| | | }else{ |
| | | populationDO.setCardNo(AESUtil.encrypt128(cardNo, aesKey)); |
| | | } |
| | | populationDO.setPhone(AESUtil.encrypt128(vo.getPhone(), aesKey)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } catch (NoSuchAlgorithmException e) { |
| | | e.printStackTrace(); |
| | | } catch (InvalidKeyException e) { |
| | | e.printStackTrace(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (BadPaddingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IllegalBlockSizeException e) { |
| | | e.printStackTrace(); |
| | | return R.fail(); |
| | | } |
| | | |
| | | ComMngVillageDO comMngVillageDO = comActVillageDAO.selectOne(new QueryWrapper<ComMngVillageDO>().eq("alley",vo.getRoad()).eq("house_num",vo.getDoorNo()).eq("community_id",communityId)); |
| | | if (comMngVillageDO == null) { |
| | | throw new ServiceException("街道巷:" + vo.getRoad() + "不存在!"); |
| | | return R.fail("街道巷:" + vo.getRoad() + vo.getDoorNo() + "不存在!"); |
| | | // throw new ServiceException("街道巷:" + vo.getRoad() + "不存在!"); |
| | | } |
| | | populationDO.setVillageId(comMngVillageDO.getVillageId()); |
| | | populationDO.setActId(comActDO.getCommunityId()); |
| | | populationDO.setStreetId(comActDO.getStreetId()); |
| | | if(!StringUtils.isEmpty(comMngVillageDO.getGroupAt())){ |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | this.updateById(populationDO); |
| | | } |
| | | // this.updateById(populationDO); |
| | | if(populationDAO.updateById(populationDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail("修改失败"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | orderGoodsVO.setNum(orderGoods.getAmount()); |
| | | orderGoodsVO.setGoodsPic(orderGoods.getGoodsAttrPic()); |
| | | orderGoodsVO.setPrice(orderGoods.getGoodsAttrPrice()); |
| | | //查询商品信息判断商品状态 |
| | | ComShopGoodsDO goodsDO = comShopGoodsDAO.selectById(orderGoods.getGoodsId()); |
| | | if(goodsDO == null || goodsDO.getDeleteStatus().equals(ComShopGoodsDO.deleteStatus.yes) || goodsDO.getDeleteStatus().equals(ComShopGoodsDO.status.recovery)){ |
| | | orderGoodsVO.setGoodsStatus(ComShopOrderGoodsVO.goodsStatus.ysc); |
| | | }else if(goodsDO.getStatus().equals(ComShopGoodsDO.status.lower)){ |
| | | orderGoodsVO.setGoodsStatus(ComShopOrderGoodsVO.goodsStatus.yxj); |
| | | }else if(goodsDO.getStatus().equals(ComShopGoodsDO.status.sell)){ |
| | | orderGoodsVO.setGoodsStatus(ComShopOrderGoodsVO.goodsStatus.csz); |
| | | } |
| | | |
| | | //根据商品规格id查询商品规格 |
| | | ComShopGoodsAttrDO goodsAttrDO = comShopGoodsAttrDAO.selectById(orderGoods.getGoodsAttrId()); |
| | | if(goodsAttrDO != null){ |
| | |
| | | } |
| | | //订单确认收货 |
| | | shopOrderDO.setStatus(ComShopOrderDO.status.ywc); |
| | | shopOrderDO.setReceivingTime(new Date()); |
| | | if(this.baseMapper.updateById(shopOrderDO) > 0){ |
| | | //添加订单操作记录 |
| | | ComShopOrderOperateDO orderOperateDO = new ComShopOrderOperateDO(); |
| | |
| | | import com.panzhihua.common.model.dtos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.partybuilding.*; |
| | | import com.panzhihua.service_dangjian.dao.ComPbOrgDAO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbMemberDO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbOrgDO; |
| | | import com.panzhihua.service_dangjian.service.ComBpActivityService; |
| | | import com.panzhihua.service_dangjian.service.ComPbMemberService; |
| | | import com.panzhihua.service_dangjian.service.ComPbServiceTeamService; |
| | | import com.panzhihua.service_dangjian.service.PartyOrganizationService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private ComBpActivityService comBpActivityService; |
| | | @Resource |
| | | private ComPbServiceTeamService comPbServiceTeamService; |
| | | @Resource |
| | | private ComPbOrgDAO comPbOrgDAO; |
| | | |
| | | /** |
| | | * 社区所有启用的党组织列表 |
| | |
| | | @GetMapping("usercertification") |
| | | R userCertification(@RequestParam("id")Long id){ |
| | | List<ComPbMemberDO> comPbMemberDOList = comPbMemberService.list(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getUserId, id)); |
| | | return R.ok(comPbMemberDOList); |
| | | List<PartyBuildingMemberVO> partyBuildingMemberVOList = new ArrayList<>(); |
| | | comPbMemberDOList.forEach(comPbMemberDO -> { |
| | | PartyBuildingMemberVO partyBuildingMemberVO = new PartyBuildingMemberVO(); |
| | | BeanUtils.copyProperties(comPbMemberDO, partyBuildingMemberVO); |
| | | ComPbOrgDO comPbOrgDO = comPbOrgDAO.selectById(partyBuildingMemberVO.getOrgId()); |
| | | partyBuildingMemberVO.setOrgName(comPbOrgDO.getName()); |
| | | partyBuildingMemberVOList.add(partyBuildingMemberVO); |
| | | }); |
| | | return R.ok(partyBuildingMemberVOList); |
| | | } |
| | | |
| | | |
| | |
| | | "<if test='pagePartyOrganizationVO.name != null and pagePartyOrganizationVO.name != ""'>" + |
| | | "and m.name like concat (#{pagePartyOrganizationVO.name},'%')"+ |
| | | " </if> " + |
| | | |
| | | "order by m.join_time desc "+ |
| | | "order by m.create_at desc "+ |
| | | "</script>") |
| | | IPage<PartyBuildingMemberVO> pagePartyOrganization(Page page, @Param("pagePartyOrganizationVO") PagePartyOrganizationVO pagePartyOrganizationVO); |
| | | |
| | |
| | | "CASE\n" + |
| | | "WHEN u.id_card IS NULL THEN\n" + |
| | | "'未注册' ELSE '已注册' \n" + |
| | | "END STATUS \n" + |
| | | "END STATUS," + |
| | | " m.create_at \n" + |
| | | "FROM\n" + |
| | | "com_pb_member m\n" + |
| | | "LEFT JOIN sys_user u ON m.id_card = u.id_card\n" + |
| | |
| | | " left join com_act as ca on ca.community_id = cpm.community_id " + |
| | | " left join com_pb_org as cpo on cpo.id = cpm.org_id " + |
| | | " LEFT JOIN sys_user u ON cpm.id_card = u.id_card " + |
| | | " where cpm.community_id = #{organizationVO.communityId} " + |
| | | " where cpm.community_id = #{organizationVO.communityId} and cpm.audit_result = 1 " + |
| | | "<if test='organizationVO.orgName != null'>" + |
| | | " and cpo.name LIKE CONCAT('%',#{organizationVO.orgName},'%') "+ |
| | | " </if> " + |
| | |
| | | */ |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 驳回原因 |
| | | */ |
| | | private String refuseReason; |
| | | |
| | | } |
| | |
| | | @Override |
| | | public R updateYnamic(PartyBuildingComPbDynVO partyCommitteeVO) { |
| | | ComPbDynDO comPbDynDO=new ComPbDynDO(); |
| | | if(partyCommitteeVO.getPublishAt()!=null && partyCommitteeVO.getPublishAt().getTime() >System.currentTimeMillis()){ |
| | | partyCommitteeVO.setStatus(1); |
| | | }else if(partyCommitteeVO.getPublishAt()!=null && partyCommitteeVO.getPublishAt().getTime() < System.currentTimeMillis()){ |
| | | partyCommitteeVO.setStatus(2); |
| | | } |
| | | BeanUtils.copyProperties(partyCommitteeVO,comPbDynDO); |
| | | int insert = comPbDynDAO.updateById(comPbDynDO); |
| | | if (insert>0) { |
| | |
| | | if(comPbMemberDO == null){ |
| | | return R.fail("未找到党员认证信息"); |
| | | } |
| | | String idCard=comPbMemberDO.getIdCard(); |
| | | comPbMemberDO.setAuditResult(partyBuildingMemberVO.getAuditResult()); |
| | | if(partyBuildingMemberVO.getAuditResult()!=null && partyBuildingMemberVO.getAuditResult().equals(3)){ |
| | | comPbMemberDO.setRefuseReason(partyBuildingMemberVO.getRefuseReason()); |
| | | } |
| | | if(partyBuildingMemberVO.getAuditResult()!=null && partyBuildingMemberVO.getAuditResult().equals(1)){ |
| | | comPbMemberDO.setUpdateAt(new Date()); |
| | | } |
| | | BeanUtils.copyProperties(partyBuildingMemberVO, comPbMemberDO); |
| | | if(partyBuildingMemberVO.getIdCard().contains("********")){ |
| | | comPbMemberDO.setIdCard(idCard); |
| | | |
| | | //编辑 |
| | | if(partyBuildingMemberVO.getJoinTime()!=null) { |
| | | comPbMemberDO.setJoinTime(partyBuildingMemberVO.getJoinTime()); |
| | | } |
| | | if(partyBuildingMemberVO.getEmploymentTime()!=null) { |
| | | comPbMemberDO.setEmploymentTime(partyBuildingMemberVO.getEmploymentTime()); |
| | | } |
| | | if(partyBuildingMemberVO.getIdCard()!=null &&!partyBuildingMemberVO.getIdCard().contains("*")){ |
| | | comPbMemberDO.setIdCard(partyBuildingMemberVO.getIdCard()); |
| | | } |
| | | if(partyBuildingMemberVO.getName()!=null ){ |
| | | comPbMemberDO.setName(partyBuildingMemberVO.getName()); |
| | | } |
| | | if(partyBuildingMemberVO.getOrgId()!=null ){ |
| | | comPbMemberDO.setOrgId(partyBuildingMemberVO.getOrgId()); |
| | | } |
| | | if(partyBuildingMemberVO.getPhotoPath()!=null ){ |
| | | comPbMemberDO.setPhotoPath(partyBuildingMemberVO.getPhotoPath()); |
| | | } |
| | | |
| | | if (comPbMemberDAO.updateById(comPbMemberDO) > 0) { |
| | | PartyBuildingMemberVO rtVO = new PartyBuildingMemberVO(); |
| | | BeanUtils.copyProperties(comPbMemberDO, rtVO); |
| | |
| | | public List<PartyOrganizationVO> listPartyOrganizationByApp(ComListPartyDTO comListPartyDTO){ |
| | | List<PartyOrganizationVO> partyOrganizationVOS = new ArrayList<>(); |
| | | QueryWrapper<ComPbOrgDO> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.lambda().eq(ComPbOrgDO::getCommunityId, comListPartyDTO.getCommunityId()).eq(ComPbOrgDO::getStatus, 1); |
| | | queryWrapper.lambda().eq(ComPbOrgDO::getStatus, 1); |
| | | if(comListPartyDTO.getCommunityId() != null){ |
| | | queryWrapper.lambda().eq(ComPbOrgDO::getCommunityId, comListPartyDTO.getCommunityId()); |
| | | } |
| | | if(!StringUtils.isEmpty(comListPartyDTO.getName())){ |
| | | queryWrapper.lambda().like(ComPbOrgDO::getName,comListPartyDTO.getName()); |
| | | } |
| | |
| | | " card_photo_front = #{userArchivesVO.cardPhotoFront} \n" + |
| | | ", card_photo_back = #{userArchivesVO.cardPhotoBack} \n" + |
| | | ",family_book = #{userArchivesVO.familyBook} \n" + |
| | | ",job = #{userArchivesVO.job} \n" + |
| | | " where user_id = #{userArchivesVO.userId}") |
| | | void updateUserArchives(@Param("userArchivesVO") UpdateUserArchivesVO userArchivesVO); |
| | | |
| | |
| | | } |
| | | int update = userDao.updateById(sysUserDO); |
| | | if (update > 0) { |
| | | //清空缓存 |
| | | String userKey = UserConstants.LOGIN_USER_INFO + loginUserInfoVO.getUserId(); |
| | | stringRedisTemplate.delete(userKey); |
| | | //实名认证成功查询是否有已审核的党员信息,有则更新党员信息绑定党员的userId |
| | | Long memberId = userDao.getPartyBuildingByIdCard(idCard); |
| | | if(memberId != null){ |
New file |
| | |
| | | package com.panzhihua.shop_backstage.filter; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.constants.TokenConstant; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.AES; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.*; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @ClasssName StoreValidFilter |
| | | * @Description 商铺有效性过滤 |
| | | * @Author cedoo |
| | | * @Date 2021/5/7 |
| | | * @Version 1.0 |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | public class StoreValidFilter implements Filter { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @Override |
| | | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { |
| | | HttpServletRequest request = (HttpServletRequest) servletRequest; |
| | | HttpServletResponse response = (HttpServletResponse) servletResponse; |
| | | |
| | | String uri = request.getRequestURI(); |
| | | |
| | | if(!"/login".equals(uri)) { |
| | | String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO); |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | log.error("获取登录用户信息失败【{}】", request); |
| | | return; |
| | | } |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | |
| | | R r = communityService.getUserStoreInfo(loginUserInfoVO.getUserId()); |
| | | boolean shopStoreValid = false; |
| | | if (R.isOk(r) && r.getData() != null) { |
| | | ShopStoreVO shopStoreVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ShopStoreVO.class); |
| | | shopStoreValid = shopStoreVO.getStatus() == 1; |
| | | } |
| | | if (!shopStoreValid) { |
| | | //返回请求被拒绝响应 |
| | | response.setContentType("application/json"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.getWriter().write(JSONObject.toJSONString(R.fail(403))); |
| | | response.flushBuffer(); |
| | | return; |
| | | } |
| | | } |
| | | filterChain.doFilter(servletRequest, servletResponse); |
| | | } |
| | | } |
| | |
| | | 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) {
|
| | | if (login||doc||css||js||ui||swagger||ico||docs||error||refreshToken||useragreement||wxPay
|
| | | ||wxCgi||isShop||listadvertisement) {
|
| | | //什么也不做
|
| | | } else {
|
| | | // 获取请求头中JWT的Token
|
| | |
| | | boolean refreshToken = !requestUrl.contains("refreshToken");
|
| | | boolean useragreement = !requestUrl.contains("useragreement");
|
| | | boolean listadvertisement = !requestUrl.contains("listadvertisement");
|
| | | if (contains&&docs&&login&&refreshToken&&useragreement&&wxNotify&&wxCgi&&isShop&&listadvertisement) {
|
| | | // boolean pageworkguide = !requestUrl.contains("applets/workguide/pageworkguide");
|
| | | // boolean detailworkguide = !requestUrl.contains("applets/workguide/detailworkguide");
|
| | | // boolean pagedynamic = !requestUrl.contains("applets/partybuilding/pagedynamic");
|
| | | // boolean infodynamic = !requestUrl.contains("applets/partybuilding/infodynamic");
|
| | | if (contains&&docs&&login&&refreshToken&&useragreement&&wxNotify&&wxCgi&&isShop&&listadvertisement
|
| | | ) {
|
| | | configAttributes.add(new SecurityConfig(SecurityConstants.ROLE_APPLETS));
|
| | | }
|
| | | return configAttributes;
|