Java项目:CRM客户关系管理系统(Spring+SpringMVC+MyBatis + maven)(二)

简介: Java项目:CRM客户关系管理系统(Spring+SpringMVC+MyBatis + maven)(二)

3. 客户管理


3.1 查询所有客户


3.1.1 查询所有


需求:查询所有客户


步骤:


步骤1:入口


步骤2:编写Controller


步骤3:编写Service 接口、实现类


步骤4:修改 list.jsp展示数据


步骤1:入口


步骤2:编写Controller


package com.czxy.crm.controller;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Controller
@RequestMapping("/customer")
public class CustomerController {
    @Resource
    private CustomerService customerService;
    @RequestMapping("/findAll")
    public String findAll( Model model){
        List<Customer> allCustomer = customerService.findAll();
        model.addAttribute("allCustomer", allCustomer);
        return "customer/list";
    }
}

步骤3:编写Service 接口、实现类

  • 接口
package com.czxy.crm.service;
​
import com.czxy.crm.domain.Customer;
​
import java.util.List;
​
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
public interface CustomerService {
    /**
     * 查询所有
     * @return
     */
    List<Customer> findAll();
}

实现类

package com.czxy.crm.service.impl;
​
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.mapper.BaseDictMapper;
import com.czxy.crm.mapper.CustomerMapper;
import com.czxy.crm.service.CustomerService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
​
import javax.annotation.Resource;
import java.util.List;
​
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Service
@Transactional
public class CustomerServiceImpl implements CustomerService {
​
    @Resource
    private CustomerMapper customerMapper;
    @Resource
    private BaseDictMapper baseDictMapper;
​
    @Override
    public List<Customer> findAll() {
​
        // 查询所有
        List<Customer> list = customerMapper.selectAll();
​
        // 关联查询
        list.forEach(customer -> {
            // 客户来源
            BaseDict custSourceBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustSource());
            customer.setCustSourceBaseDict(custSourceBaseDict);
​
            //客户行业
            BaseDict custIndustryBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustIndustry());
            customer.setCustIndustryBaseDict(custIndustryBaseDict);
​
            //客户级别
            BaseDict custLevelBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustLevel());
            customer.setCustLevelBaseDict(custLevelBaseDict);
        });
​
        return list;
    }
}

步骤4:修改 list.jsp展示数据

<c:forEach items="${allCustomer}" var="customer">
    <TR style="FONT-WEIGHT: normal; FONT-STYLE: normal; BACKGROUND-COLOR: white; TEXT-DECORATION: none">
        <TD>${customer.custName }</TD>
        <TD>${customer.custLevelBaseDict.dictItemName }</TD>
        <TD>${customer.custSourceBaseDict.dictItemName }</TD>
        <TD>${customer.custIndustryBaseDict.dictItemName }</TD>
        <TD>${customer.custAddress }</TD>
        <TD>${customer.custPhone }</TD>
        <TD>
        <a href="${pageContext.request.contextPath }/customer/editUI.action?custId=${customer.custId}">修改</a>
        &nbsp;&nbsp;
        <a href="${pageContext.request.contextPath }/customer/delete.action?custId=${customer.custId}" οnclick="return confirm('您确定要删除【${customer.custName }】吗?')">删除</a>
        </TD>
    </TR>   
</c:forEach>


3.1.2 条件查询


需求:


步骤


步骤1:入口,确定查询表单


步骤2:创建CustomerVo,用于封装查询条件


步骤3:修改controller,获得查询条件


步骤4:修改service,使用查询条件


步骤1:入口,确定查询表单


步骤2:创建CustomerVo,用于封装查询条件


///

package com.czxy.crm.vo;
​
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
public class CustomerVo {
    private String custName;
​
    public String getCustName() {
        return custName;
    }
​
    public void setCustName(String custName) {
        this.custName = custName;
    }
}

步骤3:修改controller,获得查询条件

package com.czxy.crm.controller;
​
import com.czxy.crm.domain.Customer;
import com.czxy.crm.service.CustomerService;
import com.czxy.crm.vo.CustomerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
​
import javax.annotation.Resource;
import java.util.List;
​
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Controller
@RequestMapping("/customer")
public class CustomerController {
​
    @Resource
    private CustomerService customerService;
​
    @RequestMapping("/findAll")
    public String findAll(CustomerVo customerVo, Model model){
​
        List<Customer> allCustomer = customerService.findAll(customerVo);
        model.addAttribute("allCustomer", allCustomer);
​
        return "customer/list";
    }
​
}

步骤4:修改service,使用查询条件

  • 接口
  • 实现类
package com.czxy.crm.service.impl;
​
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.mapper.BaseDictMapper;
import com.czxy.crm.mapper.CustomerMapper;
import com.czxy.crm.service.CustomerService;
import com.czxy.crm.vo.CustomerVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
​
import javax.annotation.Resource;
import java.util.List;
​
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Service
@Transactional
public class CustomerServiceImpl implements CustomerService {
​
    @Resource
    private CustomerMapper customerMapper;
    @Resource
    private BaseDictMapper baseDictMapper;
​
    @Override
    public List<Customer> findAll(CustomerVo customerVo) {
​
        // 1 条件查询
        Example example = new Example(Customer.class);
        Example.Criteria criteria = example.createCriteria();
        if(StringUtils.isNotBlank(customerVo.getCustName())) {
            criteria.andLike("custName", "%"+customerVo.getCustName()+"%");
        }
​
        // 2 分页查询
​
        // 3 查询所有
        List<Customer> list = customerMapper.selectByExample(example);
​
        // 4 关联查询
        list.forEach(customer -> {
            // 客户来源
            BaseDict custSourceBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustSource());
            customer.setCustSourceBaseDict(custSourceBaseDict);
​
            //客户行业
            BaseDict custIndustryBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustIndustry());
            customer.setCustIndustryBaseDict(custIndustryBaseDict);
​
            //客户级别
            BaseDict custLevelBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustLevel());
            customer.setCustLevelBaseDict(custLevelBaseDict);
        });
​
        // 5 封装分页
​
        return list;
    }
}


3.1.3 分页查询


需求


步骤:



步骤1:修改CustomerVo,获得分页参数


步骤2:修改controller,返回pageInfo


步骤3:修改service,封装PageInfo


步骤4:修改jsp,展示列表数据


步骤5:修改jsp,展示分页条


步骤1:修改CustomerVo,获得分页参数

package com.czxy.crm.vo;
​
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
public class CustomerVo {
    private String custName;
    private Integer pageNum = 1;
    private Integer pageSize = 2;
​
    // getter和setter
}
​

步骤2:修改controller,返回pageInfo


步骤3:修改service,封装PageInfo


接口


实现类



/

package com.czxy.crm.service.impl;
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.mapper.BaseDictMapper;
import com.czxy.crm.mapper.CustomerMapper;
import com.czxy.crm.service.CustomerService;
import com.czxy.crm.vo.CustomerVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Service
@Transactional
public class CustomerServiceImpl implements CustomerService {
    @Resource
    private CustomerMapper customerMapper;
    @Resource
    private BaseDictMapper baseDictMapper;
    @Override
    public PageInfo<Customer> findAll(CustomerVo customerVo) {
        // 1 条件查询
        Example example = new Example(Customer.class);
        Example.Criteria criteria = example.createCriteria();
        if(StringUtils.isNotBlank(customerVo.getCustName())) {
            criteria.andLike("custName", "%"+customerVo.getCustName()+"%");
        }
        // 2 分页查询
        PageHelper.startPage(customerVo.getPageNum(),customerVo.getPageSize());
        // 3 查询所有
        List<Customer> list = customerMapper.selectByExample(example);
        // 4 关联查询
        list.forEach(customer -> {
            // 客户来源
            BaseDict custSourceBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustSource());
            customer.setCustSourceBaseDict(custSourceBaseDict);
            //客户行业
            BaseDict custIndustryBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustIndustry());
            customer.setCustIndustryBaseDict(custIndustryBaseDict);
            //客户级别
            BaseDict custLevelBaseDict = baseDictMapper.selectByPrimaryKey(customer.getCustLevel());
            customer.setCustLevelBaseDict(custLevelBaseDict);
        });
        // 5 封装分页
        return new PageInfo<>(list);
    }
}

步骤4:修改jsp,展示列表数据


步骤5:修改jsp,展示分页条


查询表单


分页条


当前第[<B>${pageInfo.pageNum}</B>]页,共[<B>${pageInfo.total}</B>]条

,每页显示


//

<select οnchange="change(this)">
    <option value="1" ${pageInfo.pageSize == 1 ? 'selected' : ''}>1</option>
    <option value="2" ${pageInfo.pageSize == 2 ? 'selected' : ''}>2</option>
    <option value="3" ${pageInfo.pageSize == 3 ? 'selected' : ''}>3</option>
    <option value="5" ${pageInfo.pageSize == 5 ? 'selected' : ''}>5</option>
    <option value="10" ${pageInfo.pageSize == 10 ? 'selected' : ''}>10</option>
</select>
条
<c:if test="${pageInfo.pageNum > 1}">
    [<a href="javascript:void(0)" οnclick="page(1)">首页</a>]
    [<a href="javascript:void(0)" οnclick="page(${pageInfo.pageNum - 1})">上一页</a>]
</c:if>
<c:forEach begin="1" end="${pageInfo.pages}" var="num">
    <b><a href="javascript:void(0)" οnclick="page(${num})">${num}</a></b>
</c:forEach>
<c:if test="${pageInfo.pageNum < pageInfo.pages}">
    [<a href="javascript:void(0)" οnclick="page(${pageInfo.pageNum + 1})">下一页</a>]
    [<a href="javascript:void(0)" οnclick="page(${pageInfo.pages})">尾页</a>]
</c:if>
到
<input type="number" style="width: 35px;" value="${customerVo.pageNum}" id="goId"/>
页
<input type="button" value="Go" οnclick="page(goId.value)"/>

js函数


function change(obj) {
    // 重置,如果修改了pageSize,从1开始
    pageNumId.value = 1
    // 修改隐藏字段 pageSize
    pageSizeId.value = obj.value
    // 提交表单
    customerFormId.submit()
}
function page(pageNum) {
    // 修改pageNum的值
    pageNumId.value = pageNum
    // 提交表单
    customerFormId.submit()
}


3.2 添加客户


3.2.1 需求


3.2.2 显示表单


步骤:


  • 步骤1:入口


  • 步骤2:修改CustomerController,用于显示 customer/add.jsp 页面


  • 查询数据字典:客户来源(typeCode=002)


  • 查询数据字典:客户行业(typeCode=001)


  • 查询数据字典:客户级别(typeCode=006)


  • 步骤3:编写BaseDictService,通过typeCode查询所有数据字典信息。


  • 步骤4:修改add.jsp,显示字典相关信息


  • 步骤1:入口


  • 步骤2:修改CustomerController,用于显示 customer/add.jsp 页面


  • 查询数据字典:客户来源(typeCode=002)


  • 查询数据字典:客户行业(typeCode=001)


  • 查询数据字典:客户级别(typeCode=006)


package com.czxy.crm.controller;
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.domain.Customer;
import com.czxy.crm.service.BaseDictService;
import com.czxy.crm.service.CustomerService;
import com.czxy.crm.vo.CustomerVo;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Controller
@RequestMapping("/customer")
public class CustomerController {
    @Resource
    private CustomerService customerService;
    @Resource
    private BaseDictService baseDictService;
    /**
     * 添加页面
     * @return
     */
    @RequestMapping("/addUI")
    public String addUI(Model model) {
        // 客户行业 (typeCode=001)
        List<BaseDict> custIndustryBaseDictList = baseDictService.selectAllByTypeCode("001");
        model.addAttribute("custIndustryBaseDictList",custIndustryBaseDictList);
        // 客户来源(typeCode=002)
        List<BaseDict> custSourceBaseDictList = baseDictService.selectAllByTypeCode("002");
        model.addAttribute("custSourceBaseDictList",custSourceBaseDictList);
        // 客户级别(typeCode=006)
        List<BaseDict> custLevelBaseDictList = baseDictService.selectAllByTypeCode("006");
        model.addAttribute("custLevelBaseDictList",custLevelBaseDictList);
        return "customer/add";
    }
}

步骤3:编写BaseDictService,通过typeCode查询所有数据字典信息。


接口


package com.czxy.crm.service;
import com.czxy.crm.domain.BaseDict;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
public interface BaseDictService {
    /**
     * 通过类别代码查询数据字典信息
     * @param dictTypeCode
     * @return
     */
    List<BaseDict> selectAllByTypeCode(String dictTypeCode);
}

实现类


///

package com.czxy.crm.service.impl;
import com.czxy.crm.domain.BaseDict;
import com.czxy.crm.mapper.BaseDictMapper;
import com.czxy.crm.service.BaseDictService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author 桐叔
 * @email liangtong@itcast.cn
 */
@Service
@Transactional
public class BaseDictServiceImpl implements BaseDictService {
    @Resource
    private BaseDictMapper baseDictMapper;
    @Override
    public List<BaseDict> selectAllByTypeCode(String dictTypeCode) {
        // 条件
        Example example = Example.builder(BaseDict.class).build();
        example.createCriteria().andEqualTo("dictTypeCode",dictTypeCode);
        // 查询
        return baseDictMapper.selectByExample(example);
    }
}

步骤4:修改add.jsp,显示字典相关信息

<td>所属行业 :</td>
<td>
    <select name="custIndustry" class=textbox style="WIDTH: 180px">
        <option value="">---请选择---</option>
        <c:forEach items="${custIndustryBaseDictList}" var="industry">
            <option value="${industry.dictId}">${industry.dictItemName}</option>
        </c:forEach>
    </select>
</td>
<td>信息来源 :</td>
<td>
    <select name="custSource" class=textbox style="WIDTH: 180px">
        <option value="non">---请选择---</option>
        <c:forEach items="${custSourceBaseDictList}" var="source">
            <option value="${source.dictId}">${source.dictItemName}</option>
        </c:forEach>
    </select>
</td>
<td>客户级别:</td>
<td>
    <select name="custLevel" class=textbox style="WIDTH: 180px">
        <option value="non">---请选择---</option>
        <c:forEach items="${custLevelBaseDictList}" var="level">
            <option value="${level.dictId}">${level.dictItemName}</option>
        </c:forEach>
    </select>                               
</td>


3.2.3 添加


步骤:


步骤1:修改add.jsp页面,确定表单提交路径 /customer/add.action


步骤2:修改CustomerController,添加add方法,并处理成功和失败。


步骤3:修改CustomerService,添加add方法


步骤4:修改add.jsp,显示错误信息


步骤1:修改add.jsp页面,确定表单提交路径 /customer/add.action


步骤2:修改CustomerController,添加add方法,并处理成功和失败。



/

/**
     * 添加
     * @param customer
     * @return
     */
    @RequestMapping("/add")
    public String add(Customer customer, Model model) {
        try {
            // 添加
            boolean result = customerService.add(customer);
            if(result) {
                // 成功
                return "redirect:/customer/findAll.action";
            } else {
                // 失败
                model.addAttribute("error","添加客户失败");
                return "customer/add";
            }
        } catch (Exception e) {
            e.printStackTrace();
            model.addAttribute("error",e.getMessage());
            return "customer/add";
        }
    }

步骤3:修改CustomerService,添加add方法


接口


 

/**
     * 添加客户
     * @param customer
     * @return
     */
    boolean add(Customer customer);

实现类


 

@Override
    public boolean add(Customer customer) {
        int insert = customerMapper.insertSelective(customer);
        return insert == 1;
    }

步骤4:修改add.jsp,显示错误信息

<%-- 显示错误信息--%>
<span style="color:red">${error}</span>

3.3 修改客户


3.3.1 需求


3.3.2 显示表单,回显数据


步骤:


步骤1:入口 /customer/editUI.action?custId=1


步骤2:修改CustomerController,用于显示 customer/edit.jsp 页面


查询数据字典:客户来源(typeCode=002)


查询数据字典:客户行业(typeCode=001)


查询数据字典:客户级别(typeCode=006)


通过custId查询客户详情


步骤3:编写CustomerService,查询客户详情。


步骤4:修改edit.jsp,显示字典相关信息,回显客户信息。


步骤1:入口 /customer/editUI.action?custId=1


步骤2:修改CustomerController,用于显示 customer/edit.jsp 页面


查询数据字典:客户来源(typeCode=002)


查询数据字典:客户行业(typeCode=001)


查询数据字典:客户级别(typeCode=006)


通过custId查询客户详情

 /**
     * 修改页面
     * @return
     */
    @RequestMapping("/editUI")
    public String editUI(Long custId, Model model) {
​
        // 客户行业 (typeCode=001)
        List<BaseDict> custIndustryBaseDictList = baseDictService.selectAllByTypeCode("001");
        model.addAttribute("custIndustryBaseDictList",custIndustryBaseDictList);
​
        // 客户来源(typeCode=002)
        List<BaseDict> custSourceBaseDictList = baseDictService.selectAllByTypeCode("002");
        model.addAttribute("custSourceBaseDictList",custSourceBaseDictList);
​
​
        // 客户级别(typeCode=006)
        List<BaseDict> custLevelBaseDictList = baseDictService.selectAllByTypeCode("006");
        model.addAttribute("custLevelBaseDictList",custLevelBaseDictList);
​
        // 查询客户项
        Customer customer = customerService.selectById(custId);
        model.addAttribute("customer",customer);
​
        return "customer/edit";
    }

步骤3:编写CustomerService,查询客户详情。

  • 接口
 /**
     * 通过id查询详情
     * @param custId
     * @return
     */
    Customer selectById(Long custId);

实现类

  @Override
    public Customer selectById(Long custId) {
        return customerMapper.selectByPrimaryKey(custId);
    }

步骤4:修改edit.jsp,显示字典相关信息,回显客户信息。

<select name="custIndustry" class=textbox style="WIDTH: 180px">
    <option value="">---请选择---</option>
    <c:forEach items="${custIndustryBaseDictList}" var="industry">
        <option value="${industry.dictId}" ${customer.custIndustry== industry.dictId?"selected":""}>${industry.dictItemName}</option>
    </c:forEach>
</select>
<td>信息来源 :</td>
<td>
    <select name="custSource" class=textbox style="WIDTH: 180px">
        <option value="non">---请选择---</option>
        <c:forEach items="${custSourceBaseDictList}" var="source">
            <option value="${source.dictId}" ${customer.custSource== source.dictId?"selected":""}>${source.dictItemName}</option>
        </c:forEach>
    </select>
</td>
<td>客户级别:</td>
<td>
    <select name="custLevel" class=textbox style="WIDTH: 180px">
        <option value="non">---请选择---</option>
        <c:forEach items="${custLevelBaseDictList}" var="level">
            <option value="${level.dictId}"  ${customer.custLevel==level.dictId?"selected":""}>${level.dictItemName}</option>
        </c:forEach>
    </select>                               
</td>

3.3.3 修改

步骤:


步骤1:修改edit.jsp页面,确定表单提交路径 /customer/edit.action


步骤2:修改CustomerController,添加edit方法,并处理成功和失败。


步骤3:修改CustomerService,添加edit方法


步骤4:修改edit.jsp,显示错误信息


步骤1:修改edit.jsp页面,确定表单提交路径 /customer/edit.action


步骤2:修改CustomerController,添加edit方法,并处理成功和失败。


/

/**
     * 修改
     * @param customer
     * @return
     */
    @RequestMapping("/edit")
    public String edit(Customer customer, Model model) {
        try {
            // 修改
            boolean result = customerService.update(customer);
            if(result) {
                // 成功
                return "redirect:/customer/findAll.action";
            } else {
                // 失败
                model.addAttribute("error","修改客户失败");
                return "customer/edit";
            }
        } catch (Exception e) {
            e.printStackTrace();
            model.addAttribute("error",e.getMessage());
            return "customer/edit";
        }

步骤3:修改CustomerService,添加edit方法

  • 接口
/**
     * 修改
     * @param customer
     * @return
     */
    boolean update(Customer customer);

实现类

   @Override
    public boolean update(Customer customer) {
        int update = customerMapper.updateByPrimaryKeySelective(customer);
        return update == 1;
    }

步骤4:修改edit.jsp,显示错误信息


3.4 删除客户


步骤:


步骤1:入口 customer/delete.action?custId=1


步骤2:修改CustomerController,添加delete方法,删除成功重定向到列表页。


步骤3:修改CustomerService,添加delete方法


步骤1:入口 customer/delete.action?custId=1

<a href="${pageContext.request.contextPath }/customer/delete.action?custId=${customer.custId}" οnclick="return confirm('您确定要删除【${customer.custName }】吗?')">删除</a>

步骤2:修改CustomerController,添加delete方法,删除成功重定向到列表页。

 /**
     * 通过id删除客户
     * @param custId
     * @return
     */
    @RequestMapping("/delete")
    public String delete(Long custId) {
        // 删除
        customerService.deleteById(custId);
        // 重定向列表页
        return "redirect:/customer/findAll.action";
       }

步骤3:修改CustomerService,添加delete方法

  • 接口

    /**
     * 通过id删除
     * @param custId
     */
    void deleteById(Long custId);

实现类

@Override
    public void deleteById(Long custId) {
        customerMapper.deleteByPrimaryKey(custId);
    }


相关文章
|
设计模式 消息中间件 传感器
Java 设计模式之观察者模式:构建松耦合的事件响应系统
观察者模式是Java中常用的行为型设计模式,用于构建松耦合的事件响应系统。当一个对象状态改变时,所有依赖它的观察者将自动收到通知并更新。该模式通过抽象耦合实现发布-订阅机制,广泛应用于GUI事件处理、消息通知、数据监控等场景,具有良好的可扩展性和维护性。
1034 8
|
移动开发 监控 小程序
java家政平台源码,家政上门清洁系统源码,数据多端互通,可直接搭建使用
一款基于Java+SpringBoot+Vue+UniApp开发的家政上门系统,支持小程序、APP、H5、公众号多端互通。涵盖用户端、技工端与管理后台,支持多城市、服务分类、在线预约、微信支付、抢单派单、技能认证、钱包提现等功能,源码开源,可直接部署使用。
1031 24
|
安全 前端开发 Java
使用Java编写UDP协议的简易群聊系统
通过这个基础框架,你可以进一步增加更多的功能,例如用户认证、消息格式化、更复杂的客户端界面等,来丰富你的群聊系统。
466 11
|
机器学习/深度学习 人工智能 自然语言处理
Java与生成式AI:构建内容生成与创意辅助系统
生成式AI正在重塑内容创作、软件开发和创意设计的方式。本文深入探讨如何在Java生态中构建支持文本、图像、代码等多种生成任务的创意辅助系统。我们将完整展示集成大型生成模型(如GPT、Stable Diffusion)、处理生成任务队列、优化生成结果以及构建企业级生成式AI应用的全流程,为Java开发者提供构建下一代创意辅助系统的完整技术方案。
619 10
|
人工智能 监控 Java
Java与AI智能体:构建自主决策与工具调用的智能系统
随着AI智能体技术的快速发展,构建能够自主理解任务、制定计划并执行复杂操作的智能系统已成为新的技术前沿。本文深入探讨如何在Java生态中构建具备工具调用、记忆管理和自主决策能力的AI智能体系统。我们将完整展示从智能体架构设计、工具生态系统、记忆机制到多智能体协作的全流程,为Java开发者提供构建下一代自主智能系统的完整技术方案。
1375 4
|
机器学习/深度学习 分布式计算 Java
Java与图神经网络:构建企业级知识图谱与智能推理系统
图神经网络(GNN)作为处理非欧几里得数据的前沿技术,正成为企业知识管理和智能推理的核心引擎。本文深入探讨如何在Java生态中构建基于GNN的知识图谱系统,涵盖从图数据建模、GNN模型集成、分布式图计算到实时推理的全流程。通过具体的代码实现和架构设计,展示如何将先进的图神经网络技术融入传统Java企业应用,为构建下一代智能决策系统提供完整解决方案。
1005 0
基于JavaWeb的销售管理系统设计系统
本系统基于Java、MySQL、Spring Boot与Vue.js技术,构建高效、可扩展的销售管理平台,实现客户、订单、数据可视化等全流程自动化管理,提升企业运营效率与决策能力。
java中获取当前系统日期
java中获取当前系统日期
JAVA 获取系统日期时间
JAVA 获取系统日期时间
517 0
|
Java 应用服务中间件
JAVA 取系统当前日期 少8个小时
        Date now = new Date();          DateFormat data = newjava.text.
1049 0