Merge branch 'master' of https://gitee.com/xiaochen991015/xizang
# Conflicts:
# ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java
| | |
| | | * @author xiaochen |
| | | * @since 2025-01-17 |
| | | */ |
| | | @Api(tags = "合同管理") |
| | | @RestController |
| | | @RequestMapping("/t-contract") |
| | | public class TContractController { |
| | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.dto.TTenantDTO; |
| | | import com.ruoyi.system.model.TTenant; |
| | | import com.ruoyi.system.query.TTenantQuery; |
| | |
| | | /** |
| | | * 获取租户管理列表 |
| | | */ |
| | | // @ApiOperation(value = "获取租户分页列表") |
| | | // @PostMapping(value = "/pageList") |
| | | // public AjaxResult<PageInfo<TTenant>> pageList(@RequestBody TTenantQuery query) { |
| | | // return AjaxResult.success(tenantService.pageList(query)); |
| | | // } |
| | | @ApiOperation(value = "获取租户分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TTenant>> pageList(@RequestBody TTenantQuery query) { |
| | | return AjaxResult.success(tenantService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 添加租户管理 |
| | |
| | | @ApiOperation(value = "添加租户") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@Validated @RequestBody TTenantDTO dto) { |
| | | // 密码加密 |
| | | dto.setPassword(SecurityUtils.encryptPassword(dto.getPassword())); |
| | | return AjaxResult.success(tenantService.save(dto)); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "修改租户") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@Validated @RequestBody TTenantDTO dto) { |
| | | // 密码加密 |
| | | if(StringUtils.isNotBlank(dto.getPassword())){ |
| | | dto.setPassword(SecurityUtils.encryptPassword(dto.getPassword())); |
| | | } |
| | | return AjaxResult.success(tenantService.updateById(dto)); |
| | | } |
| | | |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Api(tags = "数据字典信息") |
| | | @RestController |
| | | @RequestMapping("/system/dict/data") |
| | | public class SysDictDataController extends BaseController |
| | |
| | | /** |
| | | * 根据字典类型查询字典数据信息 |
| | | */ |
| | | @ApiOperation(value = "根据字典类型查询字典数据信息") |
| | | @GetMapping(value = "/type/{dictType}") |
| | | public AjaxResult dictType(@PathVariable String dictType) |
| | | { |
| | |
| | | */ |
| | | CLEAN, |
| | | /** |
| | | * 现场作业修改时间 |
| | | * 查询 |
| | | */ |
| | | UPDATETIME, |
| | | /** |
| | | * 现场作业修改经理 |
| | | */ |
| | | UPDATEMANAGER, |
| | | /** |
| | | * 现场作业修改负责人 |
| | | */ |
| | | UPDATEHEADER, |
| | | /** |
| | | * 现场作业修改人员 |
| | | */ |
| | | UPDATEUSERADD, |
| | | /** |
| | | * 现场作业修改人员 |
| | | */ |
| | | UPDATEUSERREMOVE, |
| | | SELECT, |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TTenant; |
| | | import com.ruoyi.system.query.TTenantQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TTenantMapper extends BaseMapper<TTenant> { |
| | | |
| | | /** |
| | | * 获取租户分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TTenant> pageList(@Param("query") TTenantQuery query, @Param("pageInfo")PageInfo<TTenant> pageInfo); |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("mail_address") |
| | | private String mailAddress; |
| | | |
| | | @ApiModelProperty(value = "登录账号") |
| | | @NotBlank(message = "登录账号不能为空") |
| | | @TableField("account") |
| | | private String account; |
| | | |
| | | @ApiModelProperty(value = "登录密码") |
| | | @TableField("password") |
| | | private String password; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TTenant; |
| | | import com.ruoyi.system.query.TTenantQuery; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TTenantService extends IService<TTenant> { |
| | | |
| | | /** |
| | | * 获取租户分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TTenant> pageList(TTenantQuery query); |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TTenantMapper; |
| | | import com.ruoyi.system.model.TTenant; |
| | | import com.ruoyi.system.query.TTenantQuery; |
| | | import com.ruoyi.system.service.TTenantService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.vo.SysUserVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TTenantServiceImpl extends ServiceImpl<TTenantMapper, TTenant> implements TTenantService { |
| | | |
| | | @Override |
| | | public PageInfo<TTenant> pageList(TTenantQuery query) { |
| | | PageInfo<TTenant> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TTenant> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="disabled" property="disabled" /> |
| | | <result column="account" property="account" /> |
| | | <result column="password" property="password" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, resident_name, checkIn_time, tenant_attributes, tenant_type, tenant_building, room_number, building_area, phone, id_card, email, bank_number, mail_address, create_time, update_time, create_by, update_by, disabled |
| | | id, resident_name, checkIn_time, tenant_attributes, tenant_type, tenant_building, room_number, building_area, phone, id_card, email, |
| | | bank_number, mail_address, create_time, update_time, create_by, update_by, disabled,account,password |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.TTenant"> |
| | | SELECT <include refid="Base_Column_List"/> |
| | | FROM t_tenant |
| | | <where> |
| | | <if test="residentName != null and residentName != ''"> |
| | | AND resident_name LIKE concat('%',#{residentName},'%') |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | AND phone LIKE concat('%',#{phone},'%') |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |