xiangpei
2024-03-05 c6bf3a8d886896e6bf29ed13cd93a1d9f9239dff
组织完善
4个文件已修改
1个文件已添加
26 ■■■■ 已修改文件
ycl-pojo/src/main/java/com/ycl/platform/base/AbsQuery.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/system/page/PageUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/YwUnitServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/YwPeopleMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/base/AbsQuery.java
@@ -13,7 +13,7 @@
public class AbsQuery {
    @ApiModelProperty(value = "当前页", required = true)
    private Long currentPage = 1L;
    private Long pageNum = 1L;
    @ApiModelProperty(value = "每页条数", required = true)
    private Long pageSize = 10L;
ycl-pojo/src/main/java/com/ycl/system/page/PageUtil.java
@@ -21,7 +21,7 @@
     */
    public static  <T extends AbsEntity, Q extends AbsQuery> IPage<T> getPage(Q q, Class<T> c) {
        Page<T> page = new Page<T>()
                .setCurrent(q.getCurrentPage())
                .setCurrent(q.getPageNum())
                .setSize(q.getPageSize());
        return page;
    }
ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java
@@ -6,6 +6,7 @@
import com.ycl.system.domain.group.Add;
import com.ycl.platform.domain.query.YwUnitQuery;
import com.ycl.platform.service.YwUnitService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import lombok.RequiredArgsConstructor;
import java.util.List;
@@ -54,7 +55,7 @@
        return ywUnitService.remove(ids);
    }
//    @PreAuthorize("@ss.hasPermi('unit:list')")
    @PreAuthorize("@ss.hasPermi('unit:list')")
    @GetMapping("/page")
    @ApiOperation(value = "分页", notes = "分页")
    public Result page(YwUnitQuery query) {
ycl-server/src/main/java/com/ycl/platform/service/impl/YwUnitServiceImpl.java
@@ -38,6 +38,7 @@
     */
    @Override
    public Result add(YwUnitForm form) {
        // todo 增加对应账号
        YwUnit entity = YwUnitForm.getEntityByForm(form, null);
        if(baseMapper.insert(entity) > 0) {
            return Result.ok("添加成功");
@@ -52,7 +53,7 @@
     */
    @Override
    public Result update(YwUnitForm form) {
        // todo 修改对应账号
        YwUnit entity = baseMapper.selectById(form.getId());
        // 为空抛IllegalArgumentException,做全局异常处理
ycl-server/src/main/resources/mapper/zgyw/YwPeopleMapper.xml
New file
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ycl.platform.mapper.YwPeopleMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="YwPeopleVO">
        <result column="id" property="id" />
        <result column="yw_person_code" property="ywPersonCode" />
        <result column="yw_person_name" property="ywPersonName" />
        <result column="yw_person_account" property="ywPersonAccount" />
        <result column="belong_unit" property="belongUnit" />
        <result column="add_way" property="addWay" />
        <result column="phone" property="phone" />
    </resultMap>
</mapper>