fix(重新搭建表,重构代码)
commit
4e52d88b5d
|
@ -31,7 +31,7 @@ public class FenceController extends BaseController
|
|||
/**
|
||||
* 查询电子围栏列表
|
||||
*/
|
||||
@RequiresPermissions("fence:fence:list")
|
||||
@RequiresPermissions("businessPlatform:fence:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<Fence>> list(Fence fence)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ public class FenceController extends BaseController
|
|||
/**
|
||||
* 导出电子围栏列表
|
||||
*/
|
||||
@RequiresPermissions("fence:fence:export")
|
||||
@RequiresPermissions("businessPlatform:fence:export")
|
||||
@Log(title = "电子围栏", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Fence fence)
|
||||
|
@ -56,7 +56,7 @@ public class FenceController extends BaseController
|
|||
/**
|
||||
* 获取电子围栏详细信息
|
||||
*/
|
||||
@RequiresPermissions("fence:fence:query")
|
||||
@RequiresPermissions("businessPlatform:fence:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ public class FenceController extends BaseController
|
|||
/**
|
||||
* 新增电子围栏
|
||||
*/
|
||||
@RequiresPermissions("fence:fence:add")
|
||||
@RequiresPermissions("businessPlatform:fence:add")
|
||||
@Log(title = "电子围栏", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody Fence fence)
|
||||
|
@ -77,7 +77,7 @@ public class FenceController extends BaseController
|
|||
/**
|
||||
* 修改电子围栏
|
||||
*/
|
||||
@RequiresPermissions("fence:fence:edit")
|
||||
@RequiresPermissions("businessPlatform:fence:edit")
|
||||
@Log(title = "电子围栏", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody Fence fence)
|
||||
|
@ -88,7 +88,7 @@ public class FenceController extends BaseController
|
|||
/**
|
||||
* 删除电子围栏
|
||||
*/
|
||||
@RequiresPermissions("fence:fence:remove")
|
||||
@RequiresPermissions("businessPlatform:fence:remove")
|
||||
@Log(title = "电子围栏", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
|
|
|
@ -31,7 +31,7 @@ public class VehicleController extends BaseController
|
|||
/**
|
||||
* 查询车辆列表
|
||||
*/
|
||||
@RequiresPermissions("vehicle:vehicle:list")
|
||||
@RequiresPermissions("businessPlatform:vehicle:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<Vehicle>> list(Vehicle vehicle)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ public class VehicleController extends BaseController
|
|||
/**
|
||||
* 导出车辆列表
|
||||
*/
|
||||
@RequiresPermissions("vehicle:vehicle:export")
|
||||
@RequiresPermissions("businessPlatform:vehicle:export")
|
||||
@Log(title = "车辆", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Vehicle vehicle)
|
||||
|
@ -56,7 +56,7 @@ public class VehicleController extends BaseController
|
|||
/**
|
||||
* 获取车辆详细信息
|
||||
*/
|
||||
@RequiresPermissions("vehicle:vehicle:query")
|
||||
@RequiresPermissions("businessPlatform:vehicle:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ public class VehicleController extends BaseController
|
|||
/**
|
||||
* 新增车辆
|
||||
*/
|
||||
@RequiresPermissions("vehicle:vehicle:add")
|
||||
@RequiresPermissions("businessPlatform:vehicle:add")
|
||||
@Log(title = "车辆", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody Vehicle vehicle)
|
||||
|
@ -77,7 +77,7 @@ public class VehicleController extends BaseController
|
|||
/**
|
||||
* 修改车辆
|
||||
*/
|
||||
@RequiresPermissions("vehicle:vehicle:edit")
|
||||
@RequiresPermissions("businessPlatform:vehicle:edit")
|
||||
@Log(title = "车辆", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody Vehicle vehicle)
|
||||
|
@ -88,7 +88,7 @@ public class VehicleController extends BaseController
|
|||
/**
|
||||
* 删除车辆
|
||||
*/
|
||||
@RequiresPermissions("vehicle:vehicle:remove")
|
||||
@RequiresPermissions("businessPlatform:vehicle:remove")
|
||||
@Log(title = "车辆", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
package com.muyu.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
|
@ -13,11 +21,17 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
|||
* @author wan
|
||||
* @date 2024-05-31
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("enterprise")
|
||||
public class Enterprise extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 企业名称 */
|
||||
|
@ -55,7 +69,7 @@ public class Enterprise extends BaseEntity
|
|||
|
||||
/** 企业当前状态 */
|
||||
@Excel(name = "企业当前状态")
|
||||
private String status;
|
||||
private Integer status;
|
||||
|
||||
/** 企业入驻平台时期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
|
@ -73,7 +87,7 @@ public class Enterprise extends BaseEntity
|
|||
|
||||
/** 服务级别 */
|
||||
@Excel(name = "服务级别")
|
||||
private Long serviceLevel;
|
||||
private Integer serviceLevel;
|
||||
|
||||
/** 开通服务id */
|
||||
@Excel(name = "开通服务id")
|
||||
|
@ -83,175 +97,4 @@ public class Enterprise extends BaseEntity
|
|||
@Excel(name = "增值服务id")
|
||||
private Long addServerId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setEnterpriseName(String enterpriseName)
|
||||
{
|
||||
this.enterpriseName = enterpriseName;
|
||||
}
|
||||
|
||||
public String getEnterpriseName()
|
||||
{
|
||||
return enterpriseName;
|
||||
}
|
||||
public void setLegalPerson(String legalPerson)
|
||||
{
|
||||
this.legalPerson = legalPerson;
|
||||
}
|
||||
|
||||
public String getLegalPerson()
|
||||
{
|
||||
return legalPerson;
|
||||
}
|
||||
public void setBusinessLicenseNumber(String businessLicenseNumber)
|
||||
{
|
||||
this.businessLicenseNumber = businessLicenseNumber;
|
||||
}
|
||||
|
||||
public String getBusinessLicenseNumber()
|
||||
{
|
||||
return businessLicenseNumber;
|
||||
}
|
||||
public void setEstablishmentDate(Date establishmentDate)
|
||||
{
|
||||
this.establishmentDate = establishmentDate;
|
||||
}
|
||||
|
||||
public Date getEstablishmentDate()
|
||||
{
|
||||
return establishmentDate;
|
||||
}
|
||||
public void setBusinessScope(String businessScope)
|
||||
{
|
||||
this.businessScope = businessScope;
|
||||
}
|
||||
|
||||
public String getBusinessScope()
|
||||
{
|
||||
return businessScope;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setContactPhone(String contactPhone)
|
||||
{
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getContactPhone()
|
||||
{
|
||||
return contactPhone;
|
||||
}
|
||||
public void setEmail(String email)
|
||||
{
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getEmail()
|
||||
{
|
||||
return email;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setRegistrationDate(Date registrationDate)
|
||||
{
|
||||
this.registrationDate = registrationDate;
|
||||
}
|
||||
|
||||
public Date getRegistrationDate()
|
||||
{
|
||||
return registrationDate;
|
||||
}
|
||||
public void setCertificationId(Long certificationId)
|
||||
{
|
||||
this.certificationId = certificationId;
|
||||
}
|
||||
|
||||
public Long getCertificationId()
|
||||
{
|
||||
return certificationId;
|
||||
}
|
||||
public void setAuthenticationDate(Date authenticationDate)
|
||||
{
|
||||
this.authenticationDate = authenticationDate;
|
||||
}
|
||||
|
||||
public Date getAuthenticationDate()
|
||||
{
|
||||
return authenticationDate;
|
||||
}
|
||||
public void setServiceLevel(Long serviceLevel)
|
||||
{
|
||||
this.serviceLevel = serviceLevel;
|
||||
}
|
||||
|
||||
public Long getServiceLevel()
|
||||
{
|
||||
return serviceLevel;
|
||||
}
|
||||
public void setOpenServerId(Long openServerId)
|
||||
{
|
||||
this.openServerId = openServerId;
|
||||
}
|
||||
|
||||
public Long getOpenServerId()
|
||||
{
|
||||
return openServerId;
|
||||
}
|
||||
public void setAddServerId(Long addServerId)
|
||||
{
|
||||
this.addServerId = addServerId;
|
||||
}
|
||||
|
||||
public Long getAddServerId()
|
||||
{
|
||||
return addServerId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("enterpriseName", getEnterpriseName())
|
||||
.append("legalPerson", getLegalPerson())
|
||||
.append("businessLicenseNumber", getBusinessLicenseNumber())
|
||||
.append("establishmentDate", getEstablishmentDate())
|
||||
.append("businessScope", getBusinessScope())
|
||||
.append("address", getAddress())
|
||||
.append("contactPhone", getContactPhone())
|
||||
.append("email", getEmail())
|
||||
.append("status", getStatus())
|
||||
.append("registrationDate", getRegistrationDate())
|
||||
.append("certificationId", getCertificationId())
|
||||
.append("authenticationDate", getAuthenticationDate())
|
||||
.append("serviceLevel", getServiceLevel())
|
||||
.append("openServerId", getOpenServerId())
|
||||
.append("addServerId", getAddServerId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.muyu.authentication.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.Enterprise;
|
||||
|
||||
/**
|
||||
|
@ -9,16 +11,8 @@ import com.muyu.domain.Enterprise;
|
|||
* @author wan
|
||||
* @date 2024-05-31
|
||||
*/
|
||||
public interface EnterpriseMapper
|
||||
public interface EnterpriseMapper extends BaseMapper<Enterprise>
|
||||
{
|
||||
/**
|
||||
* 查询企业
|
||||
*
|
||||
* @param id 企业主键
|
||||
* @return 企业
|
||||
*/
|
||||
public Enterprise selectEnterpriseById(Long id);
|
||||
|
||||
/**
|
||||
* 查询企业列表
|
||||
*
|
||||
|
@ -27,29 +21,6 @@ public interface EnterpriseMapper
|
|||
*/
|
||||
public List<Enterprise> selectEnterpriseList(Enterprise enterprise);
|
||||
|
||||
/**
|
||||
* 新增企业
|
||||
*
|
||||
* @param enterprise 企业
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEnterprise(Enterprise enterprise);
|
||||
|
||||
/**
|
||||
* 修改企业
|
||||
*
|
||||
* @param enterprise 企业
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEnterprise(Enterprise enterprise);
|
||||
|
||||
/**
|
||||
* 删除企业
|
||||
*
|
||||
* @param id 企业主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEnterpriseById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除企业
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.muyu.authentication.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.Enterprise;
|
||||
|
||||
/**
|
||||
|
@ -9,7 +11,7 @@ import com.muyu.domain.Enterprise;
|
|||
* @author wan
|
||||
* @date 2024-05-31
|
||||
*/
|
||||
public interface IEnterpriseService
|
||||
public interface IEnterpriseService extends IService<Enterprise>
|
||||
{
|
||||
/**
|
||||
* 查询企业
|
||||
|
|
|
@ -2,6 +2,8 @@ package com.muyu.authentication.service.impl;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.authentication.mapper.EnterpriseMapper;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -16,7 +18,7 @@ import com.muyu.authentication.service.IEnterpriseService;
|
|||
* @date 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class EnterpriseServiceImpl implements IEnterpriseService
|
||||
public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper,Enterprise> implements IEnterpriseService
|
||||
{
|
||||
@Autowired
|
||||
private EnterpriseMapper enterpriseMapper;
|
||||
|
@ -30,7 +32,11 @@ public class EnterpriseServiceImpl implements IEnterpriseService
|
|||
@Override
|
||||
public Enterprise selectEnterpriseById(Long id)
|
||||
{
|
||||
return enterpriseMapper.selectEnterpriseById(id);
|
||||
return enterpriseMapper.selectOne(
|
||||
new LambdaQueryWrapper<>(){{
|
||||
eq(Enterprise::getId,id);
|
||||
}}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,7 +61,7 @@ public class EnterpriseServiceImpl implements IEnterpriseService
|
|||
public int insertEnterprise(Enterprise enterprise)
|
||||
{
|
||||
enterprise.setCreateTime(DateUtils.getNowDate());
|
||||
return enterpriseMapper.insertEnterprise(enterprise);
|
||||
return enterpriseMapper.insert(enterprise);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,7 +74,7 @@ public class EnterpriseServiceImpl implements IEnterpriseService
|
|||
public int updateEnterprise(Enterprise enterprise)
|
||||
{
|
||||
enterprise.setUpdateTime(DateUtils.getNowDate());
|
||||
return enterpriseMapper.updateEnterprise(enterprise);
|
||||
return enterpriseMapper.updateById(enterprise);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,6 +98,6 @@ public class EnterpriseServiceImpl implements IEnterpriseService
|
|||
@Override
|
||||
public int deleteEnterpriseById(Long id)
|
||||
{
|
||||
return enterpriseMapper.deleteEnterpriseById(id);
|
||||
return enterpriseMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,90 +53,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEnterpriseById" parameterType="Long" resultMap="EnterpriseResult">
|
||||
<include refid="selectEnterpriseVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEnterprise" parameterType="com.muyu.domain.Enterprise" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into enterprise
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="enterpriseName != null">enterprise_name,</if>
|
||||
<if test="legalPerson != null">legal_person,</if>
|
||||
<if test="businessLicenseNumber != null">business_license_number,</if>
|
||||
<if test="establishmentDate != null">establishment_date,</if>
|
||||
<if test="businessScope != null">business_scope,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="contactPhone != null">contact_phone,</if>
|
||||
<if test="email != null">email,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="registrationDate != null">registration_date,</if>
|
||||
<if test="certificationId != null">certification_id,</if>
|
||||
<if test="authenticationDate != null">authentication_date,</if>
|
||||
<if test="serviceLevel != null">service_level,</if>
|
||||
<if test="openServerId != null">open_server_id,</if>
|
||||
<if test="addServerId != null">add_server_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="enterpriseName != null">#{enterpriseName},</if>
|
||||
<if test="legalPerson != null">#{legalPerson},</if>
|
||||
<if test="businessLicenseNumber != null">#{businessLicenseNumber},</if>
|
||||
<if test="establishmentDate != null">#{establishmentDate},</if>
|
||||
<if test="businessScope != null">#{businessScope},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="contactPhone != null">#{contactPhone},</if>
|
||||
<if test="email != null">#{email},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="registrationDate != null">#{registrationDate},</if>
|
||||
<if test="certificationId != null">#{certificationId},</if>
|
||||
<if test="authenticationDate != null">#{authenticationDate},</if>
|
||||
<if test="serviceLevel != null">#{serviceLevel},</if>
|
||||
<if test="openServerId != null">#{openServerId},</if>
|
||||
<if test="addServerId != null">#{addServerId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEnterprise" parameterType="com.muyu.domain.Enterprise">
|
||||
update enterprise
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
|
||||
<if test="legalPerson != null">legal_person = #{legalPerson},</if>
|
||||
<if test="businessLicenseNumber != null">business_license_number = #{businessLicenseNumber},</if>
|
||||
<if test="establishmentDate != null">establishment_date = #{establishmentDate},</if>
|
||||
<if test="businessScope != null">business_scope = #{businessScope},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="registrationDate != null">registration_date = #{registrationDate},</if>
|
||||
<if test="certificationId != null">certification_id = #{certificationId},</if>
|
||||
<if test="authenticationDate != null">authentication_date = #{authenticationDate},</if>
|
||||
<if test="serviceLevel != null">service_level = #{serviceLevel},</if>
|
||||
<if test="openServerId != null">open_server_id = #{openServerId},</if>
|
||||
<if test="addServerId != null">add_server_id = #{addServerId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEnterpriseById" parameterType="Long">
|
||||
delete from enterprise where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEnterpriseByIds" parameterType="String">
|
||||
delete from enterprise where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
|
|
Loading…
Reference in New Issue