添加机构

This commit is contained in:
Flow 2025-06-30 15:50:25 +08:00
parent 263f119309
commit b42d21ac84
6 changed files with 14 additions and 7 deletions

View File

@ -66,8 +66,10 @@ public class PersonController {
} }
@GetMapping("/get-member-register-count") @GetMapping("/get-member-register-count")
@Operation(summary = "时间范围获取会员数量") @Operation(summary = "时间范围获取会员数量")
public CommonResult< List<Map<String, Object>>> getVipCountByDay(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate) { public CommonResult< List<Map<String, Object>>> getVipCountByDay(@RequestParam("startDate") String startDate,
List<Map<String, Object>> list = personService.getVipCountByDay(startDate, endDate); @RequestParam("endDate") String endDate,
@RequestParam(value = "orgid", defaultValue = "0") Integer orgid) {
List<Map<String, Object>> list = personService.getVipCountByDay(startDate, endDate, orgid);
return success(list); return success(list);
} }
@GetMapping("/get") @GetMapping("/get")

View File

@ -61,7 +61,7 @@ public interface PersonMapper extends BaseMapperX<PersonDO> {
/** /**
* 按天统计开通会员的人数 * 按天统计开通会员的人数
*/ */
List<Map<String, Object>> countVipByDay(@Param("startDate") String startDate, @Param("endDate") String endDate); List<Map<String, Object>> countVipByDay(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("orgid") Integer orgid);
/* /*
* 首页统计 会员增长趋势 一周 * 首页统计 会员增长趋势 一周
* */ * */

View File

@ -40,7 +40,7 @@ public interface PersonService {
/* /*
* 根据日期范围查询会员数 * 根据日期范围查询会员数
* */ * */
List<Map<String, Object>> getVipCountByDay(String startDate, String endDate); List<Map<String, Object>> getVipCountByDay(String startDate, String endDate, Integer orgid);
/** /**
* 删除用户基本信息 * 删除用户基本信息

View File

@ -70,8 +70,8 @@ public class PersonServiceImpl implements PersonService {
return maxfamilyid; return maxfamilyid;
} }
@Override @Override
public List<Map<String, Object>> getVipCountByDay(String startDate, String endDate) { public List<Map<String, Object>> getVipCountByDay(String startDate, String endDate, Integer orgid) {
return personMapper.countVipByDay(startDate, endDate); return personMapper.countVipByDay(startDate, endDate, orgid);
} }
@Override @Override
public void deletePerson(Integer id) { public void deletePerson(Integer id) {

View File

@ -17,6 +17,9 @@
FROM tb_user FROM tb_user
WHERE isVip = 1 WHERE isVip = 1
AND vipStartTime BETWEEN #{startDate} AND #{endDate} AND vipStartTime BETWEEN #{startDate} AND #{endDate}
<if test="orgid != null and orgid != 0">
AND orgid = #{orgid}
</if>
GROUP BY DATE_FORMAT(vipStartTime, '%Y-%m-%d') GROUP BY DATE_FORMAT(vipStartTime, '%Y-%m-%d')
ORDER BY date ORDER BY date
</select> </select>

View File

@ -19,7 +19,9 @@
SUM(CASE WHEN visitstatus = 1 AND result = '不满意' THEN 1 ELSE 0 END) AS unsatisfiedCount SUM(CASE WHEN visitstatus = 1 AND result = '不满意' THEN 1 ELSE 0 END) AS unsatisfiedCount
FROM visit_record FROM visit_record
WHERE visittime BETWEEN #{startTime} AND #{endTime} WHERE visittime BETWEEN #{startTime} AND #{endTime}
AND orgid = #{orgid} <if test="orgid != null and orgid != 0">
AND orgid = #{orgid}
</if>
GROUP BY DATE(visittime) GROUP BY DATE(visittime)
ORDER BY date ORDER BY date
</select> </select>