| | |
| | | if (StringUtils.isNotEmpty(range)){ |
| | | r=Integer.parseInt(range); |
| | | } |
| | | return userService.userActivity(type,sId,aCode,r); |
| | | return userService.userActivity(type,sId,aCode,r, this.getAppId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取区县街道选项",response = AreaVO.class) |
| | |
| | | @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, |
| | | @RequestParam(value = "streetId",required = false) Long streetId, |
| | | @RequestParam(value = "areaCode",required = false) Long areaCode, |
| | | @RequestParam(value = "range",required = false) Integer range); |
| | | R userActivity(@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 = "appId",required = false) String appId); |
| | | |
| | | @GetMapping("/indexData/getAreaAndStreet") |
| | | R getAreaAndStreet(); |
| | |
| | | public R userActivity(@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.userActivity(type,streetId,areaCode,range); |
| | | @RequestParam(value = "range",required = false) Integer range, |
| | | @RequestParam(value = "appId",required = false) String appId){ |
| | | return userService.userActivity(type,streetId,areaCode,range, appId); |
| | | } |
| | | |
| | | |
| | |
| | | /** |
| | | * 获取当天的新增和日活 |
| | | * */ |
| | | Map<String,Long> getDailyAddAndActive(@Param("date") Date date,@Param("id") Long streetId,@Param("areaCode") Long areaCode); |
| | | Map<String,Long> getDailyAddAndActive(@Param("date") Date date, @Param("id") Long streetId, @Param("areaCode") Long areaCode, @Param("appId") String appId); |
| | | |
| | | |
| | | List<StreetVOS> selectStreetByAreaCode(Integer code); |
| | |
| | | * @param type 查看类型 |
| | | * @param streetId 街道id |
| | | * @param areaCode 区县code |
| | | * @param range */ |
| | | R userActivity(Integer type, Long streetId, Long areaCode, Integer range); |
| | | * @param range |
| | | * @param appId */ |
| | | R userActivity(Integer type, Long streetId, Long areaCode, Integer range, String appId); |
| | | |
| | | /** |
| | | * 获取区县即下属街道名 |
| | |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.capitalize; |
| | | import static org.apache.commons.lang3.StringUtils.isNotBlank; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.panzhihua.common.model.dtos.community.microCommercialStreet.BindUserPhoneDTO; |
| | | import com.panzhihua.common.model.vos.community.ComAreaTownCommunityVO; |
| | |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | import com.panzhihua.service_user.model.dos.SysUserAgreementDO; |
| | | import com.panzhihua.service_user.model.dos.SysUserDO; |
| | | import com.panzhihua.service_user.model.dos.SysUserFeedbackDO; |
| | | import com.panzhihua.service_user.model.dos.SysUserInputDO; |
| | | import com.panzhihua.service_user.model.dos.SysUserNoticeDO; |
| | | import com.panzhihua.service_user.model.dos.SysUserRoleDO; |
| | | import com.panzhihua.service_user.model.dtos.DataKanbanDTO; |
| | |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | // import com.panzhihua.common.service.grid.GridService; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R userActivity(Integer type, Long streetId, Long areaCode, Integer range) { |
| | | public R userActivity(Integer type, Long streetId, Long areaCode, Integer range, String appId) { |
| | | UserActivityAnalysisVO vo=new UserActivityAnalysisVO(); |
| | | List<Date> activeX=getTwentyDays(); |
| | | List<String> activeY=new ArrayList<>(); |
| | |
| | | } |
| | | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| | | for (Date date : activeX) { |
| | | Map<String, Long> map = userDao.getDailyAddAndActive(DateUtil.parse(sdf.format(date)), streetId,areaCode); |
| | | Map<String, Long> map = userDao.getDailyAddAndActive(DateUtil.parse(sdf.format(date)), streetId,areaCode, appId); |
| | | adY.add(map.get("addUser").toString()); |
| | | activeY.add(map.get("activeUser").toString()); |
| | | } |
| | |
| | | left join com_street as cs on ac.street_id=cs.street_id |
| | | where su.community_id<>'' |
| | | and cs.area_code<>'' |
| | | <if test="appId != null and appId != """> |
| | | and su.app_id = #{appId} |
| | | </if> |
| | | <if test="id != null"> |
| | | and cs.street_id=#{id} |
| | | </if> |