Merge branch 'huacheng_push' into huacheng_test
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/WxCallbackApi.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
# springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java
| | |
| | | if (ObjectUtils.isEmpty(unionid)) { |
| | | unionid = "无"; |
| | | } |
| | | userService.addOrUpdate(openid, sessionKey, unionid); |
| | | userService.addOrUpdate(openid, sessionKey, unionid,this.getAppId()); |
| | | return tokenService.loginApplets(openid,this.getAppId()); |
| | | } |
| | | |
| | |
| | | if (ObjectUtils.isEmpty(unionid)) { |
| | | unionid = "无"; |
| | | } |
| | | userService.addOrUpdate(openid, sessionKey, unionid); |
| | | userService.addOrUpdate(openid, sessionKey, unionid,this.getAppId()); |
| | | return tokenService.loginApplets(openid,this.getAppId()); |
| | | } |
| | | |
| | |
| | | buffer.append("</xml>"); |
| | | return buffer.toString(); |
| | | } |
| | | |
| | | @GetMapping("/settle") |
| | | public R settle(String settleDate){ |
| | | return R.ok(umfPayUtil.settle(settleDate)); |
| | | } |
| | | } |
| | |
| | | return respMap; |
| | | } |
| | | |
| | | public boolean settle(String settleDate){ |
| | | Map reqMapPublic=prepareDownloadSettle(settleDate); |
| | | UmfService instance = new UmfServiceImpl("53461",file); |
| | | boolean bo=instance.reconciliationDownloadMap(reqMapPublic); |
| | | return bo; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | reqMap.put("org_amount",orgAmount); |
| | | return reqMap; |
| | | } |
| | | |
| | | public static Map prepareDownloadSettle(String settleDate){ |
| | | Map reqMap = new HashMap(); |
| | | reqMap.put("mer_id","53461"); |
| | | reqMap.put("settle_date",settleDate);//对账日期 |
| | | reqMap.put("settle_path","D:/");//Windows下为---D:/tecent,Linux下为---/opt/tecent |
| | | return reqMap; |
| | | } |
| | | } |
| | |
| | | @PostMapping("datakanbans") |
| | | public R dataKanBans(@RequestBody DataKanBansDto dataKanBansDto) { |
| | | dataKanBansDto.setAreaCode(this.getAreaCode()); |
| | | dataKanBansDto.setAppId(this.getAppId()); |
| | | return userService.dataKanBans(dataKanBansDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区通统计数据汇总", response = IndexUserStatisticsVo.class) |
| | | @GetMapping("statistics") |
| | | public R communityStatistics() { |
| | | return userService.communityStatistics(this.getAreaCode()); |
| | | return userService.communityStatistics(this.getAppId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "社区通统计数据导出") |
| | |
| | | if (StringUtils.isNotEmpty(areaCode)){ |
| | | aCode=Long.parseLong(areaCode); |
| | | } |
| | | return userService.newIndexData(type, sId,aCode); |
| | | return userService.newIndexData(type, sId,aCode,this.getAppId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "新数据看板:用户占比", response = UserRateVO.class) |
| | |
| | | if (StringUtils.isNotEmpty(range)){ |
| | | r=Integer.parseInt(range); |
| | | } |
| | | return userService.userRate(type, sId,aCode,r); |
| | | return userService.userRate(type, sId,aCode,r,this.getAppId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "新数据看板:实名用户", response = RealUserVO.class) |
| | |
| | | if (StringUtils.isNotEmpty(range)){ |
| | | r=Integer.parseInt(range); |
| | | } |
| | | return userService.realUser(type,sId,aCode,r); |
| | | return userService.realUser(type,sId,aCode,r,this.getAppId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "新数据看板:用户行为分析", response = UserActivityAnalysisVO.class) |
| | |
| | | public R unlock(@RequestParam("type")Integer type,@RequestParam("isReset")Integer isReset,@RequestParam("account")String account){ |
| | | stringRedisTemplate.delete("LOGIN_FAIL_"+account+"_"+type+"_"+this.getAppId()); |
| | | if(isReset==1){ |
| | | userService.resetPasswordAccount(type,account); |
| | | userService.resetPasswordAccount(type,account,this.getAppId()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | public R pageUserAppletsBackstage( |
| | | @RequestBody @Validated(PageGroup.class) PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO) { |
| | | pageUserAppletsBackstageDTO.setAreaCode(this.getAreaCode()); |
| | | pageUserAppletsBackstageDTO.setAppId(this.getAppId()); |
| | | return userService.pageUserAppletsBackstage(pageUserAppletsBackstageDTO); |
| | | } |
| | | |
| | |
| | | private Integer pageNum; |
| | | |
| | | private Integer pageSize; |
| | | |
| | | private String appId; |
| | | /** |
| | | * 社区用户量统计类型(1.累计用户 2.本月新增) |
| | | */ |
| | |
| | | |
| | | @ApiModelProperty(value = "用户手机号", hidden = true) |
| | | private String phone; |
| | | |
| | | private String accessToken; |
| | | } |
| | |
| | | private Long userId; |
| | | |
| | | private String areaCode; |
| | | |
| | | private String appId; |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/addOrUpdate") |
| | | R addOrUpdate(@RequestParam("openid") String openid, @RequestParam("sessionKey") String sessionKey, |
| | | @RequestParam("unionid") String unionid); |
| | | @RequestParam("unionid") String unionid,@RequestParam("appId")String appId); |
| | | |
| | | /** |
| | | * 维护小程序用户基本信息 头像 昵称 性别 |
| | |
| | | R resetPassword(@RequestParam("userId") Long userId); |
| | | |
| | | @GetMapping("/resetPasswordAccount") |
| | | R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account); |
| | | R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account,@RequestParam("appId")String appId); |
| | | |
| | | /** |
| | | * 批量重置密码用户登录密码默认admin123456 |
| | |
| | | @GetMapping("/indexData/totalData") |
| | | R newIndexData(@RequestParam(value = "type",required = false) Integer type, |
| | | @RequestParam(value = "type",required = false) Long streetId, |
| | | @RequestParam(value = "areaCode",required = false) Long areaCode); |
| | | @RequestParam(value = "areaCode",required = false) Long areaCode,@RequestParam("appId")String appId); |
| | | |
| | | @GetMapping("/indexData/userRate") |
| | | R userRate(@RequestParam(value = "type",required = false) Integer type, |
| | | @RequestParam(value = "streetId",required = false) Long streetId, |
| | | @RequestParam(value = "areaCode",required = false) Long areaCode, |
| | | @RequestParam(value = "range",required = false) Integer range); |
| | | @RequestParam(value = "range",required = false) Integer range,@RequestParam(value = "appId",required = false) String appId); |
| | | |
| | | |
| | | @GetMapping("/indexData/realUser") |
| | | R realUser(@RequestParam(value = "type",required = false) Integer type, |
| | | @RequestParam(value = "streetId",required = false) Long streetId, |
| | | @RequestParam(value = "areaCode",required = false) Long areaCode, |
| | | @RequestParam(value = "range",required = false) Integer range); |
| | | @RequestParam(value = "range",required = false) Integer range,@RequestParam(value = "appId",required = false) String appId); |
| | | |
| | | @GetMapping("/indexData/userActivity") |
| | | R userActivity(@RequestParam(value = "type", required = false) Integer type, |
New file |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import feign.RequestInterceptor; |
| | | import feign.RequestTemplate; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Enumeration; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Configuration |
| | | public class FeignConfig { |
| | | //配置feign拦截器,解决请求头问题 |
| | | @Bean("requestInterceptor") |
| | | public RequestInterceptor requestInterceptor() { |
| | | return new RequestInterceptor() { |
| | | //获取所有浏览器发送的请求属性,请求头赋值到feign |
| | | @Override |
| | | public void apply(RequestTemplate requestTemplate) { |
| | | //请求属性 |
| | | ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
| | | if (attributes != null) { |
| | | HttpServletRequest request = attributes.getRequest(); |
| | | //获取浏览器发起的请求头 |
| | | Enumeration<String> headerNames = request.getHeaderNames(); |
| | | if (headerNames != null) { |
| | | while (headerNames.hasMoreElements()) { |
| | | String name = headerNames.nextElement(); //请求头名称 Authorization |
| | | String value = request.getHeader(name);//请求头数据 "Bearer b1dbb4cf-7de6-41e5-99e2-0e8b7e8fe6ee" |
| | | // 跳过 content-length,解决too many bites written的问题 |
| | | if (name.equalsIgnoreCase("content-length")){ |
| | | continue; |
| | | } |
| | | requestTemplate.header(name, value); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import com.netflix.hystrix.HystrixThreadPoolKey; |
| | | import com.netflix.hystrix.HystrixThreadPoolProperties; |
| | | import com.netflix.hystrix.strategy.HystrixPlugins; |
| | | import com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy; |
| | | import com.netflix.hystrix.strategy.concurrency.HystrixRequestVariable; |
| | | import com.netflix.hystrix.strategy.concurrency.HystrixRequestVariableLifecycle; |
| | | import com.netflix.hystrix.strategy.eventnotifier.HystrixEventNotifier; |
| | | import com.netflix.hystrix.strategy.executionhook.HystrixCommandExecutionHook; |
| | | import com.netflix.hystrix.strategy.metrics.HystrixMetricsPublisher; |
| | | import com.netflix.hystrix.strategy.properties.HystrixPropertiesStrategy; |
| | | import com.netflix.hystrix.strategy.properties.HystrixProperty; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.context.request.RequestAttributes; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | |
| | | import java.util.concurrent.BlockingQueue; |
| | | import java.util.concurrent.Callable; |
| | | import java.util.concurrent.ThreadPoolExecutor; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Component |
| | | public class FeignHystrixConcurrencyStrategy extends HystrixConcurrencyStrategy { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(FeignHystrixConcurrencyStrategy.class); |
| | | |
| | | private HystrixConcurrencyStrategy delegate; |
| | | |
| | | public FeignHystrixConcurrencyStrategy() { |
| | | try { |
| | | this.delegate = HystrixPlugins.getInstance().getConcurrencyStrategy(); |
| | | if (this.delegate instanceof FeignHystrixConcurrencyStrategy) { |
| | | // Welcome to singleton hell... |
| | | return; |
| | | } |
| | | HystrixCommandExecutionHook commandExecutionHook = HystrixPlugins |
| | | .getInstance().getCommandExecutionHook(); |
| | | HystrixEventNotifier eventNotifier = HystrixPlugins.getInstance() |
| | | .getEventNotifier(); |
| | | HystrixMetricsPublisher metricsPublisher = HystrixPlugins.getInstance() |
| | | .getMetricsPublisher(); |
| | | HystrixPropertiesStrategy propertiesStrategy = HystrixPlugins.getInstance() |
| | | .getPropertiesStrategy(); |
| | | this.logCurrentStateOfHystrixPlugins(eventNotifier, metricsPublisher, |
| | | propertiesStrategy); |
| | | HystrixPlugins.reset(); |
| | | HystrixPlugins.getInstance().registerConcurrencyStrategy(this); |
| | | HystrixPlugins.getInstance() |
| | | .registerCommandExecutionHook(commandExecutionHook); |
| | | HystrixPlugins.getInstance().registerEventNotifier(eventNotifier); |
| | | HystrixPlugins.getInstance().registerMetricsPublisher(metricsPublisher); |
| | | HystrixPlugins.getInstance().registerPropertiesStrategy(propertiesStrategy); |
| | | } |
| | | catch (Exception e) { |
| | | log.error("Failed to register Sleuth Hystrix Concurrency Strategy", e); |
| | | } |
| | | } |
| | | |
| | | private void logCurrentStateOfHystrixPlugins(HystrixEventNotifier eventNotifier, |
| | | HystrixMetricsPublisher metricsPublisher, |
| | | HystrixPropertiesStrategy propertiesStrategy) { |
| | | if (log.isDebugEnabled()) { |
| | | log.debug("Current Hystrix plugins configuration is [" |
| | | + "concurrencyStrategy [" + this.delegate + "]," + "eventNotifier [" |
| | | + eventNotifier + "]," + "metricPublisher [" + metricsPublisher + "]," |
| | | + "propertiesStrategy [" + propertiesStrategy + "]," + "]"); |
| | | log.debug("Registering Sleuth Hystrix Concurrency Strategy."); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public <T> Callable<T> wrapCallable(Callable<T> callable) { |
| | | RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); |
| | | return new WrappedCallable<>(callable, requestAttributes); |
| | | } |
| | | |
| | | @Override |
| | | public ThreadPoolExecutor getThreadPool(HystrixThreadPoolKey threadPoolKey, |
| | | HystrixProperty<Integer> corePoolSize, |
| | | HystrixProperty<Integer> maximumPoolSize, |
| | | HystrixProperty<Integer> keepAliveTime, TimeUnit unit, |
| | | BlockingQueue<Runnable> workQueue) { |
| | | return this.delegate.getThreadPool(threadPoolKey, corePoolSize, maximumPoolSize, |
| | | keepAliveTime, unit, workQueue); |
| | | } |
| | | |
| | | @Override |
| | | public ThreadPoolExecutor getThreadPool(HystrixThreadPoolKey threadPoolKey, |
| | | HystrixThreadPoolProperties threadPoolProperties) { |
| | | return this.delegate.getThreadPool(threadPoolKey, threadPoolProperties); |
| | | } |
| | | |
| | | @Override |
| | | public BlockingQueue<Runnable> getBlockingQueue(int maxQueueSize) { |
| | | return this.delegate.getBlockingQueue(maxQueueSize); |
| | | } |
| | | |
| | | @Override |
| | | public <T> HystrixRequestVariable<T> getRequestVariable( |
| | | HystrixRequestVariableLifecycle<T> rv) { |
| | | return this.delegate.getRequestVariable(rv); |
| | | } |
| | | |
| | | static class WrappedCallable<T> implements Callable<T> { |
| | | |
| | | private final Callable<T> target; |
| | | private final RequestAttributes requestAttributes; |
| | | |
| | | public WrappedCallable(Callable<T> target, RequestAttributes requestAttributes) { |
| | | this.target = target; |
| | | this.requestAttributes = requestAttributes; |
| | | } |
| | | |
| | | @Override |
| | | public T call() throws Exception { |
| | | try { |
| | | RequestContextHolder.setRequestAttributes(requestAttributes); |
| | | return target.call(); |
| | | } |
| | | finally { |
| | | RequestContextHolder.resetRequestAttributes(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | log.error(e.getMessage()); |
| | | } |
| | | } |
| | | /** |
| | | * 长期订阅模板消息推送 |
| | | * @param openId |
| | | * @param accessToken |
| | | */ |
| | | public static void sendLongTimeTemplate(String openId, String accessToken, String word,String content,String page) { |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id("5f-xcy4lrWy_0kc5H4dj5bgBM-MwsvTwPApA-u3fqsQ"); |
| | | subscribeDTO.setPage(page); |
| | | List<TemplateParam> paras = new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing3", word)); |
| | | paras.add(new TemplateParam("thing6", content)); |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | sendSubscribe(accessToken, subscribeDTO); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | } |
| | | } |
| | | public static void main(String[] args) { |
| | | |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | public String getAccessToken() throws Exception { |
| | | String accessToken = ""; |
| | | accessToken=stringRedisTemplate.boundValueOps("access_token:access_token:"+this.getAppId()).get(); |
| | | accessToken=wxXCXTempSend.stringRedisTemplate.boundValueOps("access_token:access_token:"+this.getAppId()).get(); |
| | | return accessToken; |
| | | } |
| | | |
| | |
| | | @Update("update com_act_activity set `status`=5 where `status` in (3,4) and TIMESTAMPDIFF(MINUTE,SYSDATE(),end_at)<=0") |
| | | int updateStatusToBeginActiveOrEnd(); |
| | | |
| | | @Select("select id from com_act_activity where `status`=3 and TIMESTAMPDIFF(MINUTE,SYSDATE(),sign_up_end)<=0") |
| | | List<Long> selectBeginIds(); |
| | | |
| | | // @Select("<script> " + "select t.* from ( " + "SELECT " + "a.id, " + "a.activity_name, " + "u.`name` sponsorName, " |
| | | // + "a.activity_addr, " + "a.participant_max, " + "count(if(s.is_volunteer=1,null,s.id))participant_now, " |
| | | // + "a.volunteer_max, " + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " |
| | |
| | | * @return |
| | | */ |
| | | IPage<ComActActivityVO> pageProjectActivity(@Param("page") Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | | List<String> selectOpenIdByActivityId(Long id); |
| | | } |
| | |
| | | log.info("定时任务--报名结束修改社区活动进行状态活动数量【{}】", num3); |
| | | // 查询已经结束的活动,需要计算积分 |
| | | List<Long> activityEndIds = comActActivityDAO.getActivityEndIds(); |
| | | if(!CollectionUtils.isEmpty(activityEndIds)){ |
| | | activityEndIds.forEach(activityId->{ |
| | | List<String> openIds=comActActivityDAO.selectOpenIdByActivityId(activityId); |
| | | if(!CollectionUtils.isEmpty(openIds)){ |
| | | openIds.forEach(op->{ |
| | | WxXCXTempSend wxXCXTempSend=new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendLongTimeTemplate(op,wxXCXTempSend.getAccessToken(),"活动开始提醒","您参加的活动已开始","packageC/pages/activity/communityActivityDetails/communityActivityDetails?id="+activityId); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | // 修改进行状态 变为进行中或者已结束 |
| | | int num2 = comActActivityDAO.updateStatusToBeginActiveOrEnd(); |
| | | log.info("定时任务--修改社区活动进行状态活动数量【{}】", num2); |
| | | List<Long> ids = comActActivityDAO.getActivityEndIds(); |
| | | if(!CollectionUtils.isEmpty(ids)){ |
| | | int num2 = comActActivityDAO.updateStatusToBeginActiveOrEnd(); |
| | | log.info("定时任务--修改社区活动进行状态活动数量【{}】", num2); |
| | | ids.forEach(id ->{ |
| | | List<String> openIds=comActActivityDAO.selectOpenIdByActivityId(id); |
| | | if(!CollectionUtils.isEmpty(openIds)){ |
| | | openIds.forEach(op->{ |
| | | WxXCXTempSend wxXCXTempSend=new WxXCXTempSend(); |
| | | try { |
| | | WxUtil.sendLongTimeTemplate(op,wxXCXTempSend.getAccessToken(),"活动结束提醒","您参加的活动已结束","packageC/pages/activity/communityActivityDetails/communityActivityDetails?id="+id); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | return R.ok(activityEndIds); |
| | | } |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.*; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.entity.SysUser; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.panzhihua.common.model.vos.neighbor.UnitActivityAnalysisVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.entity.ComPbCheckUnit; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleBrowseDO; |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleCommentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleCommentReplyDO; |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO; |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleFabulousDO; |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleTopicDO; |
| | | import com.panzhihua.service_community.model.dos.ComPbMemberDO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import cn.hutool.core.util.PageUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | private ComActActivityDAO comActActivityDAO; |
| | | @Resource |
| | | private ComPbCheckUnitDao comPbCheckUnitDao; |
| | | @Resource |
| | | private SysUserDao sysUserDao; |
| | | /** |
| | | * 分页查询邻里圈列表 |
| | | * |
| | |
| | | } |
| | | |
| | | if (comActNeighborCircleCommentDAO.insert(circleCommentDO) > 0) { |
| | | SysUser sysUser=sysUserDao.selectById(neighborCircleDO.getSolveId()); |
| | | if(sysUser!=null) { |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | if (neighborCircleDO.getBelongType()==2){ |
| | | WxUtil.sendLongTimeTemplate(sysUser.getOpenid(),util.getAccessToken(),"你有一条新的评价信息",neighborCircleDO.getReleaseContent().substring(0,10)+"..","packageB/pages/partySecond/problemDetails/index?id="+neighborCircleDO.getId()+"&type=888"); |
| | | } |
| | | if (neighborCircleDO.getBelongType()==3){ |
| | | WxUtil.sendLongTimeTemplate(sysUser.getOpenid(),util.getAccessToken(),"你有一条新的评价信息",neighborCircleDO.getReleaseContent().substring(0,10)+"..","packageB/pages/partySecond/problemDetails/index?id="+neighborCircleDO.getId()+"&type=777"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } else { |
| | | return R.fail("评论失败"); |
| | |
| | | if(StringUtils.isNotEmpty(comActNeighborCircleDO.getComment())){ |
| | | comActNeighborCircleDO.setCommentTime(new Date()); |
| | | } |
| | | return R.ok(this.baseMapper.updateById(comActNeighborCircleDO)); |
| | | int result=this.baseMapper.updateById(comActNeighborCircleDO); |
| | | if(result>0){ |
| | | SysUser sysUser=sysUserDao.selectById(comActNeighborCircleDO.getReleaseId()); |
| | | if(comActNeighborCircleDO.getOrderStatus()!=null){ |
| | | if(sysUser!=null) { |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | if (comActNeighborCircleDO.getBelongType()==2){ |
| | | WxUtil.sendLongTimeTemplate(sysUser.getOpenid(),util.getAccessToken(),"你反馈的问题已被人认领",comActNeighborCircleDO.getReleaseContent().substring(0,10)+"..","packageB/pages/partySecond/problemDetails/index?id="+comActNeighborCircleDO.getId()+"&type=888"); |
| | | } |
| | | if (comActNeighborCircleDO.getBelongType()==3){ |
| | | WxUtil.sendLongTimeTemplate(sysUser.getOpenid(),util.getAccessToken(),"你反馈的需求已被人认领",comActNeighborCircleDO.getReleaseContent().substring(0,10)+"..","packageB/pages/partySecond/problemDetails/index?id="+comActNeighborCircleDO.getId()+"&type=777"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | if(comActNeighborCircleDO.getSolveStatus()!=null){ |
| | | if(sysUser!=null) { |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | if (comActNeighborCircleDO.getBelongType()==2){ |
| | | WxUtil.sendLongTimeTemplate(sysUser.getOpenid(),util.getAccessToken(),"你反馈的问题已被人处理",comActNeighborCircleDO.getReleaseContent().substring(0,10)+"..","packageB/pages/partySecond/problemDetails/index?id="+comActNeighborCircleDO.getId()+"&type=888"); |
| | | } |
| | | if (comActNeighborCircleDO.getBelongType()==3){ |
| | | WxUtil.sendLongTimeTemplate(sysUser.getOpenid(),util.getAccessToken(),"你反馈的需求已被人处理",comActNeighborCircleDO.getReleaseContent().substring(0,10)+"..","packageB/pages/partySecond/problemDetails/index?id="+comActNeighborCircleDO.getId()+"&type=777"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | page.setCurrent(pagePopularMerchantDTO.getPageNum()); |
| | | IPage<ConvenientMerchantVO> merchantVOList = this.baseMapper.getPopularMerchants(page, pagePopularMerchantDTO.getCommunityId(), currentMon,pagePopularMerchantDTO.getAreaCode()); |
| | | if(pagePopularMerchantDTO.getPageNum().equals(1L)){ |
| | | //金沙江默认第一个 |
| | | List<ConvenientMerchantVO> merchantVOS=new ArrayList<>(); |
| | | ConvenientMerchantVO merchantVO=new ConvenientMerchantVO(); |
| | | merchantVO.setName("金沙江智慧物流商贸城"); |
| | | merchantVO.setLogo("https://www.psciio.com//idcard/0694d975ed4d4c49bcfb728a678518f2.jpg"); |
| | | merchantVO.setIntroduction("农产直销、综合商贸、冷链储运、中央厨房、检验检疫、农博会展、总部商务、综合服务。"); |
| | | merchantVO.setServiceScope(""); |
| | | merchantVO.setConsultationVolume(0); |
| | | merchantVO.setMonthConsultationVolume(0); |
| | | merchantVOS.add(merchantVO); |
| | | //第一页默认把犇师傅维修中心加载到第一个 |
| | | List<ConvenientMerchantVO> merchantList = this.baseMapper.selectMerchantByName(pagePopularMerchantDTO.getCommunityId(), currentMon); |
| | | if(merchantList != null && merchantList.size() > 0){ |
| | | merchantList.addAll(merchantVOList.getRecords()); |
| | | merchantVOList.setRecords(merchantList); |
| | | merchantVOS.addAll(merchantList); |
| | | merchantVOS.addAll(merchantVOList.getRecords()); |
| | | merchantVOList.setRecords(merchantVOS); |
| | | } |
| | | |
| | | } |
| | |
| | | </select> |
| | | |
| | | <select id="selectSecond" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> |
| | | select distinct name,code from area_code_2022 where level=2 and pcode=#{name} and name !='攀枝花市' |
| | | select distinct name,code from area_code_2022 where level=2 and pcode=#{name} |
| | | </select> |
| | | |
| | | <select id="selectThird" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> |
| | |
| | | GROUP BY a.id |
| | | ORDER BY a.status = 99 DESC,a.publish_at DESC |
| | | </select> |
| | | |
| | | <select id="selectOpenIdByActivityId" resultType="String"> |
| | | select distinct openid from com_act_act_sign t LEFT JOIN sys_user t1 on t.user_id = t1.user_id where t.activity_id =#{id} and t.status = 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | /** |
| | | * 社区id |
| | |
| | | */ |
| | | @PostMapping("/addOrUpdate") |
| | | public R addOrUpdate(@RequestParam("openid") String openid, @RequestParam("sessionKey") String sessionKey, |
| | | @RequestParam("unionid") String unionid) { |
| | | return userService.updateInsertUser(openid, sessionKey, unionid); |
| | | @RequestParam("unionid") String unionid,@RequestParam("appId")String appId) { |
| | | return userService.updateInsertUser(openid, sessionKey, unionid,appId); |
| | | } |
| | | |
| | | /** |
| | |
| | | @GetMapping("/indexData/totalData") |
| | | public R indexData(@RequestParam(value = "type",required = false) Integer type, |
| | | @RequestParam(value = "streetId",required = false) Long streetId, |
| | | @RequestParam(value = "areaCode",required = false) Long areaCode){ |
| | | return userService.newIndexData(type,streetId,areaCode); |
| | | @RequestParam(value = "areaCode",required = false) Long areaCode,@RequestParam("appId")String appId){ |
| | | return userService.newIndexData(type,streetId,areaCode,appId); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R userRate(@RequestParam(value = "type",required = false) Integer type, |
| | | @RequestParam(value = "streetId",required = false) Long streetId, |
| | | @RequestParam(value = "areaCode",required = false) Long areaCode, |
| | | @RequestParam(value = "range",required = false) Integer range){ |
| | | return userService.userRate(type,streetId,areaCode,range); |
| | | @RequestParam(value = "range",required = false) Integer range,@RequestParam("appId")String appId){ |
| | | return userService.userRate(type,streetId,areaCode,range,appId); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R realUser(@RequestParam(value = "type",required = false) Integer type, |
| | | @RequestParam(value = "streetId",required = false) Long streetId, |
| | | @RequestParam(value = "areaCode",required = false) Long areaCode, |
| | | @RequestParam(value = "range",required = false) Integer range){ |
| | | return userService.realUser(type,streetId,areaCode,range); |
| | | @RequestParam(value = "range",required = false) Integer range,@RequestParam(value = "appId",required = false)String appId){ |
| | | return userService.realUser(type,streetId,areaCode,range,appId); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @GetMapping("/resetPasswordAccount") |
| | | public R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account){ |
| | | return userService.resetPassword(type,account); |
| | | public R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account,@RequestParam("appId")String appId){ |
| | | return userService.resetPassword(type,account,appId); |
| | | } |
| | | |
| | | @PostMapping("/tfLogin") |
| | |
| | | /** |
| | | * 看板用户统计:用户占比统计 |
| | | * */ |
| | | List<UserProportion> userAnalysis(@Param("type") Integer type,@Param("range") String range,@Param("streetId") Long streetId,@Param("areaCode")Long areaCode); |
| | | List<UserProportion> userAnalysis(@Param("type") Integer type,@Param("range") String range,@Param("streetId") Long streetId,@Param("areaCode")Long areaCode,@Param("appId")String appId); |
| | | |
| | | /** |
| | | * 统计区域实名用户数 |
| | | * */ |
| | | List<RealUser> realUserCount(@Param("type") Integer type,@Param("range") String range,@Param("streetId") Long streetId,@Param("areaCode")Long areaCode); |
| | | List<RealUser> realUserCount(@Param("type") Integer type,@Param("range") String range,@Param("streetId") Long streetId,@Param("areaCode")Long areaCode,@Param("appId")String appId); |
| | | |
| | | /** |
| | | * 统计该街道内的所有用户数 |
| | |
| | | /** |
| | | * 获取本月的 |
| | | * */ |
| | | Integer getMonthUsers(@Param("streetId") Long streetId,@Param("areaCode") Long areaCode,@Param("range") String range); |
| | | Integer getMonthUsers(@Param("streetId") Long streetId,@Param("areaCode") Long areaCode,@Param("range") String range,@Param("appId")String appId); |
| | | |
| | | /** |
| | | * 获取街道下属村/社区 |
| | |
| | | * 用户在开放平台的唯一标识符 |
| | | * @return token |
| | | */ |
| | | R updateInsertUser(String openid, String sessionKey, String unionid); |
| | | R updateInsertUser(String openid, String sessionKey, String unionid,String appId); |
| | | |
| | | /** |
| | | * 维护小程序用户基本信息 头像 昵称 性别 |
| | |
| | | * @param streetId 街道id |
| | | * @param areaCode 区县code |
| | | * */ |
| | | R newIndexData(Integer type, Long streetId,Long areaCode); |
| | | R newIndexData(Integer type, Long streetId,Long areaCode,String appid); |
| | | |
| | | /** |
| | | * 用户占比统计 |
| | |
| | | * @param streetId 街道id |
| | | * @param areaCode 区县code |
| | | * @param range */ |
| | | R userRate(Integer type, Long streetId, Long areaCode, Integer range); |
| | | R userRate(Integer type, Long streetId, Long areaCode, Integer range,String appId); |
| | | |
| | | /** |
| | | * 真实用户占比统计 |
| | |
| | | * @param streetId 街道id |
| | | * @param areaCode 区县code |
| | | * @param range */ |
| | | R realUser(Integer type, Long streetId, Long areaCode, Integer range); |
| | | R realUser(Integer type, Long streetId, Long areaCode, Integer range,String appId); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param account |
| | | * @return |
| | | */ |
| | | R resetPassword(Integer type,String account); |
| | | R resetPassword(Integer type,String account,String appId); |
| | | |
| | | /** |
| | | * 天府通办登录 |
| | |
| | | * @return token |
| | | */ |
| | | @Override |
| | | public R updateInsertUser(String openid, String sessionKey, String unionid) { |
| | | public R updateInsertUser(String openid, String sessionKey, String unionid,String appId) { |
| | | SysUserDO sysUserDO = |
| | | userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getOpenid, openid)); |
| | | boolean empty = ObjectUtils.isEmpty(sysUserDO); |
| | |
| | | sysUserDO1.setLastLoginTime(date); |
| | | sysUserDO1.setPassword(encode); |
| | | sysUserDO1.setType(1); |
| | | sysUserDO1.setAppId(appId); |
| | | num = userDao.insert(sysUserDO1); |
| | | } else { |
| | | String encode = new BCryptPasswordEncoder().encode(UserConstants.PASSWORD); |
| | |
| | | sysUserDO.setPassword(encode); |
| | | sysUserDO.setLastLoginTime(date); |
| | | sysUserDO.setType(1); |
| | | sysUserDO.setAppId(appId); |
| | | num = userDao.updateById(sysUserDO); |
| | | } |
| | | if (num > 0) { |
| | |
| | | String encode = new BCryptPasswordEncoder().encode(administratorsUserVO.getPassword()); |
| | | administratorsUserVO.setPassword(encode); |
| | | BeanUtils.copyProperties(administratorsUserVO, sysUserDO); |
| | | sysUserDO.setAppId(administratorsUserVO.getAppid()); |
| | | int insert = 0; |
| | | try { |
| | | insert = userDao.insert(sysUserDO); |
| | |
| | | */ |
| | | @Override |
| | | public R dataKanBans(DataKanBansDto dataKanBansDto){ |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(dataKanBansDto.getAreaCode()); |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(dataKanBansDto.getAppId()); |
| | | List<String> communityUserX = new ArrayList<>(); |
| | | List<Integer> communityUserY = new ArrayList<>(); |
| | | |
| | |
| | | page.setSize(20L); |
| | | } |
| | | if(dataKanBansDto.getType() != null && dataKanBansDto.getType().equals(DataKanBansDto.type.by)){ |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrderMonth(page, dataKanBansDto.getAreaCode()).getRecords(); |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrderMonth(page, dataKanBansDto.getAppId()).getRecords(); |
| | | }else{ |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrder(page, dataKanBansDto.getAreaCode()).getRecords(); |
| | | dataKanbanDTOS = userDao.selectCommunityUserOrder(page, dataKanBansDto.getAppId()).getRecords(); |
| | | } |
| | | if (!ObjectUtils.isEmpty(dataKanbanDTOS)) { |
| | | dataKanbanDTOS.forEach(dataKanbanDTO -> { |
| | |
| | | List<Date> serverndays = com.panzhihua.common.utlis.DateUtils.getOldDays(); |
| | | serverndays.forEach(date -> { |
| | | // 查询社区活动数量 |
| | | DataKanbanDTO dataKanbanDTO = userDao.selectCommunityAddUserOrder(dataKanBansDto.getAreaCode(),date); |
| | | DataKanbanDTO dataKanbanDTO = userDao.selectCommunityAddUserOrder(dataKanBansDto.getAppId(),date); |
| | | communityActiveUserX.add(DateFormatUtils.format(date, "MM-dd")); |
| | | communityActiveUserY.add(dataKanbanDTO.getNum()); |
| | | communityActiveUserZ.add(dataKanbanDTO.getDayNum()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R newIndexData(Integer type, Long streetId,Long areaCode) { |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(null); |
| | | public R newIndexData(Integer type, Long streetId,Long areaCode,String appId) { |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(appId); |
| | | IndexDataAnalysisVO vo=new IndexDataAnalysisVO(); |
| | | if (ObjectUtils.isEmpty(type)){ |
| | | //不传默认为所有区县 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R userRate(Integer type, Long streetId, Long areaCode, Integer range) { |
| | | public R userRate(Integer type, Long streetId, Long areaCode, Integer range,String appId) { |
| | | IndexDataAnalysisVO analysisVO=new IndexDataAnalysisVO(); |
| | | if (type.equals(BYSTREET) || type.equals(BYAREA)){ |
| | | //街道,区县筛选 |
| | |
| | | BeanUtils.copyProperties(indexDataVO,analysisVO ); |
| | | }else { |
| | | //总量数据 |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(null); |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(appId); |
| | | BeanUtils.copyProperties(indexDataKanbanVO,analysisVO ); |
| | | } |
| | | String date=""; |
| | |
| | | date = DateUtil.parse(dateTime.toString(), "yyyy-MM-dd HH:mm:ss").toString(); |
| | | } |
| | | } |
| | | List<UserProportion> userProportions = userDao.userAnalysis(type, date, streetId,areaCode); |
| | | List<UserProportion> userProportions = userDao.userAnalysis(type, date, streetId,areaCode,appId); |
| | | List<UserRateAnalysisVO> userRateAnalysisVOList=new ArrayList<>(); |
| | | Boolean monthRange=false; |
| | | if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(range)){ |
| | |
| | | } |
| | | //获取本月的用户总数作为计算占比的用户总数 |
| | | //IndexDataKanbanVO data = userDao.dataKanBanStreet(streetId, areaCode, date); |
| | | Integer monthUsers = userDao.getMonthUsers(streetId, areaCode, date); |
| | | Integer monthUsers = userDao.getMonthUsers(streetId, areaCode, date,appId); |
| | | vo.setRate(getRate(monthUsers,userProportion.getUser())); |
| | | }else{ |
| | | vo.setRate(getRate(analysisVO.getAllUser(),userProportion.getUser())); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R realUser(Integer type, Long streetId, Long areaCode, Integer range) { |
| | | public R realUser(Integer type, Long streetId, Long areaCode, Integer range,String appId) { |
| | | IndexDataAnalysisVO analysisVO=new IndexDataAnalysisVO(); |
| | | if (type.equals(BYSTREET) || type.equals(BYAREA)){ |
| | | //街道,区县筛选 |
| | |
| | | BeanUtils.copyProperties(indexDataVO,analysisVO ); |
| | | }else { |
| | | //总量数据 |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(null); |
| | | IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(appId); |
| | | BeanUtils.copyProperties(indexDataKanbanVO,analysisVO ); |
| | | } |
| | | String date=""; |
| | |
| | | } |
| | | } |
| | | RealUserVO realUserVO=new RealUserVO(); |
| | | List<RealUser> realUsers = userDao.realUserCount(type, date, streetId, areaCode); |
| | | List<RealUser> realUsers = userDao.realUserCount(type, date, streetId, areaCode,appId); |
| | | List<RealUserAnalysisVO> realUserList=new ArrayList<>(); |
| | | realUserVO.setRealUserCount(getStreetRealUser(realUsers)); |
| | | Integer rate = getRate(analysisVO.getAllUser(), realUserVO.getRealUserCount()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R resetPassword(Integer type, String account) { |
| | | SysUserDO sysUserDO=userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getAccount,account).eq(SysUserDO::getType,type)); |
| | | public R resetPassword(Integer type, String account,String appId) { |
| | | SysUserDO sysUserDO=userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getAccount,account).eq(SysUserDO::getType,type).eq(SysUserDO::getAppId,appId)); |
| | | if(sysUserDO!=null){ |
| | | sysUserDO.setPassword("$2a$10$F/2lE2NMhKNHJfi5.FLmfu7jIr7ImRWgCTTeO6m3IRNR2V4sv8YR."); |
| | | userDao.updateById(sysUserDO); |
| | |
| | | from sys_user u |
| | | left join com_act a on u.community_id=a.community_id |
| | | where |
| | | u.type=1 and u.community_id is not null |
| | | u.type=1 and u.community_id is not null and u.app_id =#{pageUserAppletsBackstageDTO.appId} |
| | | <if test='pageUserAppletsBackstageDTO.phone != null and pageUserAppletsBackstageDTO.phone.trim() != ""'> |
| | | and u.phone=#{pageUserAppletsBackstageDTO.phone} |
| | | </if> |
| | |
| | | COUNT(user_id)allUser, |
| | | COUNT(case WHEN DATE_FORMAT(t.create_at,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )addUser, |
| | | COUNT(case WHEN DATE_FORMAT(last_login_time,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )activeDayUser, |
| | | (SELECT count(user_id) FROM sys_user t left join com_act t1 on t.community_id = t1.community_id WHERE t.type = 1 AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | (SELECT count(user_id) FROM sys_user t left join com_act t1 on t.community_id = t1.community_id WHERE t.type = 1 and t.app_id = #{areaCode} AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | FROM |
| | | sys_user t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where t.type=1 and t.community_id is not null |
| | | where t.type=1 and t.community_id is not null and t.app_id = #{areaCode} |
| | | </select> |
| | | |
| | | <select id="selectCommunityUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | |
| | | t1.dayNum |
| | | FROM |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 and a.state=0 |
| | | left join (SELECT count( user_id ) dayNum,community_id FROM sys_user WHERE type = 1 |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00') GROUP BY community_id) t1 on a.community_id = t1.community_id GROUP BY a.community_id |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 and a.state=0 and u.app_id=#{areaCode} |
| | | left join (SELECT count( user_id ) dayNum,community_id FROM sys_user WHERE type = 1 and app_id=#{areaCode} |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00') GROUP BY community_id) t1 on a.community_id = t1.community_id where a.app_id =#{areaCode} GROUP BY a.community_id |
| | | </select> |
| | | |
| | | <select id="selectCommunityUserOrderMonth" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | |
| | | SELECT |
| | | a.`name`, |
| | | COUNT(u.user_id)num, |
| | | (SELECT count( user_id ) FROM sys_user WHERE type = 1 and community_id = a.community_id |
| | | (SELECT count( user_id ) FROM sys_user WHERE type = 1 and community_id = a.community_id and app_id=#{areaCode} |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00')) as dayNum |
| | | FROM |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id |
| | | and u.type=1 and a.state=0 and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | and u.type=1 and a.state=0 and u.app_id=#{areaCode} and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | | <select id="pageUserBackstage" resultType="com.panzhihua.common.model.vos.user.AdministratorsUserVO"> |
| | |
| | | |
| | | <select id="selectCommunityAddUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | | select count(user_id) as num, |
| | | (SELECT count( user_id ) FROM sys_user t LEFT JOIN com_act t1 on t.community_id=t1.community_id WHERE t.type = 1 |
| | | (SELECT count( user_id ) FROM sys_user t LEFT JOIN com_act t1 on t.community_id=t1.community_id WHERE t.type = 1 and t.app_id = #{areaCode} |
| | | AND last_login_time <![CDATA[ >= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 00:00:00') |
| | | AND last_login_time <![CDATA[ <= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 23:59:59')) as dayNum from sys_user as su LEFT JOIN com_act t1 on su.community_id = t1.community_id |
| | | where su.create_at <![CDATA[ >= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 00:00:00'),INTERVAL 0 DAY) |
| | | and su.create_at <![CDATA[ <= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 23:59:59'),INTERVAL 0 DAY) |
| | | and su.type = 1 |
| | | and su.type = 1 and su.app_id = #{areaCode} |
| | | </select> |
| | | |
| | | <update id="gridMemberEditStatus"> |
| | |
| | | sys_user AS su |
| | | LEFT JOIN com_act AS ca ON ca.community_id = su.community_id |
| | | WHERE |
| | | type = 1 and state = 0 |
| | | type = 1 and state = 0 and ca.app_id = #{areaCode} |
| | | AND ca.street_id = cs.street_id |
| | | ) AS userNum |
| | | FROM |
| | | `com_street` AS cs |
| | | `com_street` AS cs where cs.app_id = #{areaCode} |
| | | order by userNum desc |
| | | </select> |
| | | |
| | |
| | | <if test="range != null and range != ''"> |
| | | and su.create_at >= #{range} |
| | | </if> |
| | | <if test="appId!=null and appId!=''"> |
| | | and su.app_id = #{appId} |
| | | </if> |
| | | <if test="type == 5"> |
| | | <if test="areaCode != null"> |
| | | and ac.area_code=#{areaCode} |
| | |
| | | and su.id_card<>'' |
| | | <if test="range != null and range != ''"> |
| | | and su.create_at >= #{range} |
| | | </if> |
| | | <if test="appId!=null and appId!=''"> |
| | | and su.app_id = #{appId} |
| | | </if> |
| | | <if test="type == 5"> |
| | | <if test="areaCode != null"> |
| | |
| | | <if test="range != null and range != ''"> |
| | | and t.create_at >= #{range} |
| | | </if> |
| | | <if test="appId!=null and appId!=''"> |
| | | and t.app_id = #{appId} |
| | | </if> |
| | | </select> |
| | | <select id="selectCommunityByStreetId" resultType="com.panzhihua.common.model.vos.user.CommunityVO"> |
| | | select community_id as id,name from com_act where street_id =#{id} |
| | |
| | | noLoginUrl.add("/api/applets/wx/batteryActivityPayNotify"); |
| | | noLoginUrl.add("/api/communitybackstage/comBatteryCommodityOrder/syncCloseOrder"); |
| | | noLoginUrl.add("/api/applets/uu/getQRCode"); |
| | | noLoginUrl.add("/api/huacheng-applets/uu/getQRCode"); |
| | | if (noLoginUrl.contains(requestURI)) { |
| | | List<SimpleGrantedAuthority> authorities = new ArrayList<>(); |
| | | authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS)); |