zhaozhengjie
2022-09-08 bb37b8ff2eac4cb2ab9997a50bf68f5bde16d661
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
2个文件已添加
25个文件已修改
492 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/WxCallbackApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/umf/UmfPayUtil.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/IndexApi.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/UserApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/UserManagementApi.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/DataKanBansDto.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCommentAppDTO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/PageUserAppletsBackstageDTO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/FeignConfig.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/FeignHystrixConcurrencyStrategy.java 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/BcRegionMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/entity/ComPbCheckUnit.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java
@@ -89,7 +89,7 @@
        if (ObjectUtils.isEmpty(unionid)) {
            unionid = "无";
        }
        userService.addOrUpdate(openid, sessionKey, unionid);
        userService.addOrUpdate(openid, sessionKey, unionid,this.getAppId());
        return tokenService.loginApplets(openid,this.getAppId());
    }
@@ -165,7 +165,7 @@
        if (ObjectUtils.isEmpty(unionid)) {
            unionid = "无";
        }
        userService.addOrUpdate(openid, sessionKey, unionid);
        userService.addOrUpdate(openid, sessionKey, unionid,this.getAppId());
        return tokenService.loginApplets(openid,this.getAppId());
    }
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/WxCallbackApi.java
@@ -328,4 +328,9 @@
        buffer.append("</xml>");
        return buffer.toString();
    }
    @GetMapping("/settle")
    public R settle(String settleDate){
        return R.ok(umfPayUtil.settle(settleDate));
    }
}
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/umf/UmfPayUtil.java
@@ -32,6 +32,13 @@
        return respMap;
    }
    public boolean settle(String settleDate){
        Map reqMapPublic=prepareDownloadSettle(settleDate);
        UmfService instance = new UmfServiceImpl("53461",file);
        boolean bo=instance.reconciliationDownloadMap(reqMapPublic);
        return bo;
    }
@@ -60,4 +67,12 @@
        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;
    }
}
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/IndexApi.java
@@ -63,13 +63,14 @@
    @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 = "社区通统计数据导出")
@@ -143,7 +144,7 @@
        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)
@@ -170,7 +171,7 @@
        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)
@@ -197,7 +198,7 @@
        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)
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/UserApi.java
@@ -81,7 +81,7 @@
    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();
    }
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/UserManagementApi.java
@@ -39,6 +39,7 @@
    public R pageUserAppletsBackstage(
        @RequestBody @Validated(PageGroup.class) PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO) {
        pageUserAppletsBackstageDTO.setAreaCode(this.getAreaCode());
        pageUserAppletsBackstageDTO.setAppId(this.getAppId());
        return userService.pageUserAppletsBackstage(pageUserAppletsBackstageDTO);
    }
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/DataKanBansDto.java
@@ -20,6 +20,8 @@
    private Integer pageNum;
    private Integer pageSize;
    private String appId;
    /**
     * 社区用户量统计类型(1.累计用户  2.本月新增)
     */
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCommentAppDTO.java
@@ -24,4 +24,6 @@
    @ApiModelProperty(value = "用户手机号", hidden = true)
    private String phone;
    private String accessToken;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/PageUserAppletsBackstageDTO.java
@@ -66,4 +66,6 @@
    private Long userId;
    private String areaCode;
    private String appId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -45,7 +45,7 @@
     */
    @PostMapping("/addOrUpdate")
    R addOrUpdate(@RequestParam("openid") String openid, @RequestParam("sessionKey") String sessionKey,
        @RequestParam("unionid") String unionid);
        @RequestParam("unionid") String unionid,@RequestParam("appId")String appId);
    /**
     * 维护小程序用户基本信息 头像 昵称 性别
@@ -145,7 +145,7 @@
    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
@@ -1234,20 +1234,20 @@
    @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,
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/FeignConfig.java
New file
@@ -0,0 +1,47 @@
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);
                        }
                    }
                }
            }
        };
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/FeignHystrixConcurrencyStrategy.java
New file
@@ -0,0 +1,128 @@
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();
            }
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxUtil.java
@@ -558,6 +558,26 @@
            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();
@@ -577,4 +597,5 @@
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java
@@ -95,7 +95,7 @@
     */
    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;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -121,6 +121,9 @@
    @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`, "
@@ -357,4 +360,6 @@
     * @return
     */
    IPage<ComActActivityVO> pageProjectActivity(@Param("page") Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO);
    List<String> selectOpenIdByActivityId(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -823,9 +823,42 @@
        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);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -8,6 +8,9 @@
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;
@@ -55,6 +58,17 @@
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;
@@ -85,6 +99,8 @@
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
@@ -130,6 +146,8 @@
    private ComActActivityDAO comActActivityDAO;
    @Resource
    private ComPbCheckUnitDao comPbCheckUnitDao;
    @Resource
    private SysUserDao sysUserDao;
    /**
     * 分页查询邻里圈列表
     *
@@ -637,6 +655,20 @@
        }
        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("评论失败");
@@ -1069,7 +1101,42 @@
        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
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java
@@ -300,11 +300,22 @@
        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);
            }
        }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/BcRegionMapper.xml
@@ -40,7 +40,7 @@
    </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">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -399,4 +399,8 @@
        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>
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/entity/ComPbCheckUnit.java
@@ -5,6 +5,8 @@
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;
@@ -21,6 +23,7 @@
     * 主键id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 社区id
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -57,8 +57,8 @@
     */
    @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);
    }
    /**
@@ -1371,8 +1371,8 @@
    @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);
    }
    /**
@@ -1383,8 +1383,8 @@
    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);
    }
    /**
@@ -1395,8 +1395,8 @@
    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);
    }
@@ -1442,8 +1442,8 @@
    }
    @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")
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -319,12 +319,12 @@
    /**
     * 看板用户统计:用户占比统计
     * */
    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);
    /**
     * 统计该街道内的所有用户数
@@ -355,7 +355,7 @@
    /**
     * 获取本月的
     * */
    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);
    /**
     * 获取街道下属村/社区
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -38,7 +38,7 @@
     *            用户在开放平台的唯一标识符
     * @return token
     */
    R updateInsertUser(String openid, String sessionKey, String unionid);
    R updateInsertUser(String openid, String sessionKey, String unionid,String appId);
    /**
     * 维护小程序用户基本信息 头像 昵称 性别
@@ -860,7 +860,7 @@
     * @param streetId 街道id
     * @param areaCode 区县code
     * */
    R newIndexData(Integer type, Long streetId,Long areaCode);
    R newIndexData(Integer type, Long streetId,Long areaCode,String appid);
    /**
     * 用户占比统计
@@ -868,7 +868,7 @@
     * @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);
    /**
     * 真实用户占比统计
@@ -876,7 +876,7 @@
     * @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);
    /**
@@ -912,7 +912,7 @@
     * @param account
     * @return
     */
    R resetPassword(Integer type,String account);
    R resetPassword(Integer type,String account,String appId);
    /**
     * 天府通办登录
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -200,7 +200,7 @@
     * @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);
@@ -216,6 +216,7 @@
            sysUserDO1.setLastLoginTime(date);
            sysUserDO1.setPassword(encode);
            sysUserDO1.setType(1);
            sysUserDO1.setAppId(appId);
            num = userDao.insert(sysUserDO1);
        } else {
            String encode = new BCryptPasswordEncoder().encode(UserConstants.PASSWORD);
@@ -224,6 +225,7 @@
            sysUserDO.setPassword(encode);
            sysUserDO.setLastLoginTime(date);
            sysUserDO.setType(1);
            sysUserDO.setAppId(appId);
            num = userDao.updateById(sysUserDO);
        }
        if (num > 0) {
@@ -1209,6 +1211,7 @@
        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);
@@ -2909,7 +2912,7 @@
     */
    @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<>();
@@ -2927,9 +2930,9 @@
            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 -> {
@@ -2942,7 +2945,7 @@
        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());
@@ -3298,8 +3301,8 @@
    }
    @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)){
            //不传默认为所有区县
@@ -3380,7 +3383,7 @@
    }
    @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)){
            //街道,区县筛选
@@ -3388,7 +3391,7 @@
            BeanUtils.copyProperties(indexDataVO,analysisVO );
        }else {
            //总量数据
            IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(null);
            IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(appId);
            BeanUtils.copyProperties(indexDataKanbanVO,analysisVO );
        }
        String date="";
@@ -3398,7 +3401,7 @@
                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)){
@@ -3416,7 +3419,7 @@
                        }
                        //获取本月的用户总数作为计算占比的用户总数
                        //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()));
@@ -3445,7 +3448,7 @@
    }
    @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)){
            //街道,区县筛选
@@ -3453,7 +3456,7 @@
            BeanUtils.copyProperties(indexDataVO,analysisVO );
        }else {
            //总量数据
            IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(null);
            IndexDataKanbanVO indexDataKanbanVO = userDao.selectIndexDataKanban(appId);
            BeanUtils.copyProperties(indexDataKanbanVO,analysisVO );
        }
        String date="";
@@ -3464,7 +3467,7 @@
            }
        }
        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());
@@ -3640,8 +3643,8 @@
    }
    @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);
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
@@ -97,7 +97,7 @@
        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() != &quot;&quot;'>
            and u.phone=#{pageUserAppletsBackstageDTO.phone}
        </if>
@@ -122,10 +122,10 @@
        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">
@@ -135,9 +135,9 @@
            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">
@@ -145,13 +145,13 @@
        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">
@@ -203,12 +203,12 @@
    <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">
@@ -469,11 +469,11 @@
                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>
@@ -593,6 +593,9 @@
        <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}
@@ -629,6 +632,9 @@
        and su.id_card&lt;>''
        <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">
@@ -734,6 +740,9 @@
        <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}
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java
@@ -322,6 +322,7 @@
                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));