后台管理系统项目

后台管理系统

项目介绍:
我们的程序可以通过各种不同的身份登陆,以操控不同等级的客户信息;面对着实时更新的动态信息,我们拥有动态图表,可以随时检测各地区不同类型客户的占比,也可以分类查看,快速修改和添加信息。

使用技术:
Spring+SpringMVC+css+js+springdata
这个项目建立在Spring框架上,其中使用了springdata自动创建sql语句,使用了IOC的@Autowired注释注入了每次登陆都需要查询的用户信息。

效果展示:

用户管理:
用户管理
商机管理:
在这里插入图片描述客户贡献分析:
在这里插入图片描述

核心代码:
管理用户信息:

@Controller
public class RoleController {
@Autowired
private IRoleService roleService;

/**
 * 分页查询所有的角色信息
 * @return
 */
@RequestMapping("toRole")
public String toRole(HttpSession session) {
	Page<Role> roles = roleService.findAllRoles();
	session.setAttribute("roles", roles);
	return "pages/role";
}

/**
 * 根据下标做分页查询操作
 * @return
 */
@RequestMapping("findRoleByPageIndex")
public String findRoleByPageIndex(HttpSession session,Integer pageIndex) {
	Page<Role> roles = roleService.findAllRoles(pageIndex);
	session.setAttribute("roles", roles);
	return "pages/role";
}

/**
 * 新增角色
 * 1.如果需要返回给前台数据 可以给前台返回字符串 添加成功 
 * 2.void
 */
@RequestMapping("saveRole")
@ResponseBody
public String saveRole(Role role) {
	if(role.getId()==null) {
		roleService.saveRole(role);
		return "添加成功";
	}else{
		roleService.saveRole(role);
		return "修改成功";
	}
} 

//根据id查找角色信息
@RequestMapping("findRoleById")
@ResponseBody
public Role findRoleById(Integer id) {
	Role role = roleService.findRoleById(id);
	return role;
}

//根据角色id删除信息
@RequestMapping("deleteRoleById")
@ResponseBody
public String deleteRoleById(Integer id) {
	System.out.println("id为:"+id);
	roleService.deleteRoleById(id);
	return "删除成功";
}

}

客户贡献分析:

@Controller
public class ContributionController {

@Autowired
private ICustomerContribtionService customerContribtionService;


/**
 * 查找所有的客户
 * @return
 */
@RequestMapping("findCustomerContribution")
@ResponseBody
public List<CustomerContri_Consti> findCustomerContribution(String region) {
	
	List<CustomerContri_Consti> list = customerContribtionService.findCustomerContribution(region);
	
	System.out.println(list);
	
	return list;
}
  • 4
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值