Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王飞
vehicle-quality-review
Commits
50ae4696
Commit
50ae4696
authored
Jan 05, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gaixiankang' into 'dev'
车企信息 - 代码初始化 See merge request
!21
parents
e200ebf3
e7a3550b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
523 additions
and
2 deletions
+523
-2
AutomobileEnterprise.java
.../src/main/java/com/ruoyi/domain/AutomobileEnterprise.java
+59
-0
AutomobileEnterpriseMapper.java
...ain/java/com/ruoyi/mapper/AutomobileEnterpriseMapper.java
+51
-0
AutomobileEnterpriseService.java
...n/java/com/ruoyi/service/AutomobileEnterpriseService.java
+47
-0
AutomobileEnterpriseServiceImpl.java
...m/ruoyi/service/impl/AutomobileEnterpriseServiceImpl.java
+81
-0
AutomobileEnterpriseController.java
...in/java/com/ruoyi/web/AutomobileEnterpriseController.java
+109
-0
AutomobileEnterpriseEditRequest.java
...om/ruoyi/web/request/AutomobileEnterpriseEditRequest.java
+18
-0
AutomobileEnterpriseGetInfoRequest.java
...ruoyi/web/request/AutomobileEnterpriseGetInfoRequest.java
+19
-0
AutomobileEnterpriseListRequest.java
...om/ruoyi/web/request/AutomobileEnterpriseListRequest.java
+36
-0
AutomobileEnterpriseMapper.xml
.../src/main/resources/mapper/AutomobileEnterpriseMapper.xml
+101
-0
BaseEntity.java
...rc/main/java/com/ruoyi/common/core/domain/BaseEntity.java
+2
-2
No files found.
quality-review/src/main/java/com/ruoyi/domain/AutomobileEnterprise.java
0 → 100644
View file @
50ae4696
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
/**
* 车企信息对象 t_automobile_enterprise
*
* @author gxk
* @date 2024-01-05
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
value
=
"车企信息对象"
)
@TableName
(
value
=
"t_automobile_enterprise"
)
public
class
AutomobileEnterprise
extends
BaseEntity
{
/** 主键 */
@ApiModelProperty
(
"ID"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
Long
id
;
/** 企业名称 */
@Excel
(
name
=
"企业名称"
)
@ApiModelProperty
(
"企业名称"
)
private
String
enterpriseName
;
/** 地址 */
@Excel
(
name
=
"地址"
)
@ApiModelProperty
(
"地址"
)
private
String
address
;
/** 邮编 */
@Excel
(
name
=
"邮编"
)
@ApiModelProperty
(
"邮编"
)
private
String
postcode
;
/** 企业联系人 */
@Excel
(
name
=
"企业联系人"
)
@ApiModelProperty
(
"企业联系人"
)
private
String
enterpriseContact
;
/** 联系电话 */
@Excel
(
name
=
"联系电话"
)
@ApiModelProperty
(
"联系电话"
)
private
String
contactNumber
;
}
quality-review/src/main/java/com/ruoyi/mapper/AutomobileEnterpriseMapper.java
0 → 100644
View file @
50ae4696
package
com
.
ruoyi
.
mapper
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.AutomobileEnterprise
;
import
com.ruoyi.web.request.AutomobileEnterpriseListRequest
;
import
org.springframework.stereotype.Repository
;
/**
* 车企信息Mapper接口
*
* @author gxk
* @date 2024-01-05
*/
@Repository
public
interface
AutomobileEnterpriseMapper
extends
BaseMapper
<
AutomobileEnterprise
>
{
/**
* 查询车企信息
*
* @param id 车企信息主键
* @return 车企信息
*/
public
AutomobileEnterprise
selectAutomobileEnterpriseById
(
Long
id
);
/**
* 查询车企信息列表
*
* @param automobileEnterprise 车企信息
* @return 车企信息集合
*/
public
List
<
AutomobileEnterprise
>
selectAutomobileEnterpriseList
(
AutomobileEnterpriseListRequest
request
);
/**
* 新增车企信息
*
* @param automobileEnterprise 车企信息
* @return 结果
*/
public
int
insertAutomobileEnterprise
(
AutomobileEnterprise
automobileEnterprise
);
/**
* 修改车企信息
*
* @param automobileEnterprise 车企信息
* @return 结果
*/
public
int
updateAutomobileEnterprise
(
AutomobileEnterprise
automobileEnterprise
);
}
quality-review/src/main/java/com/ruoyi/service/AutomobileEnterpriseService.java
0 → 100644
View file @
50ae4696
package
com
.
ruoyi
.
service
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.AutomobileEnterprise
;
import
com.ruoyi.web.request.AutomobileEnterpriseListRequest
;
/**
* @author gxk
*/
public
interface
AutomobileEnterpriseService
extends
IService
<
AutomobileEnterprise
>
{
/**
* 查询车企信息
*
* @param id 车企信息主键
* @return 车企信息
*/
public
AutomobileEnterprise
selectAutomobileEnterpriseById
(
Long
id
);
/**
* 查询车企信息列表
*
* @param request 车企信息
* @return 车企信息集合
*/
public
List
<
AutomobileEnterprise
>
selectAutomobileEnterpriseList
(
AutomobileEnterpriseListRequest
request
);
/**
* 新增车企信息
*
* @param automobileEnterprise 车企信息
* @return 结果
*/
public
int
insertAutomobileEnterprise
(
AutomobileEnterprise
automobileEnterprise
);
/**
* 修改车企信息
*
* @param automobileEnterprise 车企信息
* @return 结果
*/
public
int
updateAutomobileEnterprise
(
AutomobileEnterprise
automobileEnterprise
);
}
quality-review/src/main/java/com/ruoyi/service/impl/AutomobileEnterpriseServiceImpl.java
0 → 100644
View file @
50ae4696
package
com
.
ruoyi
.
service
.
impl
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.web.request.AutomobileEnterpriseListRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.mapper.AutomobileEnterpriseMapper
;
import
com.ruoyi.domain.AutomobileEnterprise
;
import
com.ruoyi.service.AutomobileEnterpriseService
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* 车企信息Service业务层处理
*
* @author gxk
* @date 2024-01-05
*/
@Service
@Transactional
public
class
AutomobileEnterpriseServiceImpl
extends
ServiceImpl
<
AutomobileEnterpriseMapper
,
AutomobileEnterprise
>
implements
AutomobileEnterpriseService
{
@Autowired
private
AutomobileEnterpriseMapper
automobileEnterpriseMapper
;
/**
* 查询车企信息
*
* @param id 车企信息主键
* @return 车企信息
*/
@Override
public
AutomobileEnterprise
selectAutomobileEnterpriseById
(
Long
id
)
{
return
automobileEnterpriseMapper
.
selectAutomobileEnterpriseById
(
id
);
}
/**
* 查询车企信息列表
*
* @param request 车企信息
* @return 车企信息
*/
@Override
public
List
<
AutomobileEnterprise
>
selectAutomobileEnterpriseList
(
AutomobileEnterpriseListRequest
request
)
{
return
automobileEnterpriseMapper
.
selectAutomobileEnterpriseList
(
request
);
}
/**
* 新增车企信息
*
* @param automobileEnterprise 车企信息
* @return 结果
*/
@Override
public
int
insertAutomobileEnterprise
(
AutomobileEnterprise
automobileEnterprise
)
{
automobileEnterprise
.
setCreateTime
(
DateUtils
.
getNowDate
());
automobileEnterprise
.
setCreateBy
(
String
.
valueOf
(
SecurityUtils
.
getUserId
()));
return
automobileEnterpriseMapper
.
insert
(
automobileEnterprise
);
}
/**
* 修改车企信息
*
* @param automobileEnterprise 车企信息
* @return 结果
*/
@Override
public
int
updateAutomobileEnterprise
(
AutomobileEnterprise
automobileEnterprise
)
{
automobileEnterprise
.
setUpdateTime
(
DateUtils
.
getNowDate
());
automobileEnterprise
.
setUpdateBy
(
String
.
valueOf
(
SecurityUtils
.
getUserId
()));
return
automobileEnterpriseMapper
.
updateAutomobileEnterprise
(
automobileEnterprise
);
}
}
quality-review/src/main/java/com/ruoyi/web/AutomobileEnterpriseController.java
0 → 100644
View file @
50ae4696
package
com
.
ruoyi
.
web
;
import
java.util.Arrays
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.web.request.AutomobileEnterpriseEditRequest
;
import
com.ruoyi.web.request.AutomobileEnterpriseGetInfoRequest
;
import
com.ruoyi.web.request.AutomobileEnterpriseListRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.domain.AutomobileEnterprise
;
import
com.ruoyi.service.AutomobileEnterpriseService
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.common.core.page.TableDataInfo
;
/**
* 车企信息Controller
*
* @author gxk
* @date 2024-01-05
*/
@Api
(
tags
=
{
"车企信息"
})
@RestController
@RequestMapping
(
"/system/enterprise"
)
public
class
AutomobileEnterpriseController
extends
BaseController
{
@Autowired
private
AutomobileEnterpriseService
automobileEnterpriseService
;
/**
* 查询车企信息列表
*/
@ApiOperation
(
"分页查询车企信息列表"
)
@PostMapping
(
"/list"
)
public
TableDataInfo
<
AutomobileEnterprise
>
list
(
@Validated
@RequestBody
AutomobileEnterpriseListRequest
request
)
{
startPage
();
List
<
AutomobileEnterprise
>
list
=
automobileEnterpriseService
.
selectAutomobileEnterpriseList
(
request
);
return
getDataTable
(
list
);
}
/**
* 导出车企信息列表
*/
@Log
(
title
=
"车企信息"
,
businessType
=
BusinessType
.
EXPORT
)
@ApiOperation
(
"导出车企信息列表"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
AutomobileEnterpriseListRequest
request
)
{
List
<
AutomobileEnterprise
>
list
=
automobileEnterpriseService
.
selectAutomobileEnterpriseList
(
request
);
ExcelUtil
<
AutomobileEnterprise
>
util
=
new
ExcelUtil
<
AutomobileEnterprise
>(
AutomobileEnterprise
.
class
);
util
.
exportExcel
(
response
,
list
,
"车企信息数据"
);
}
/**
* 获取车企信息详细信息
*/
@ApiOperation
(
"获取车企信息详细信息"
)
@PostMapping
(
"/getById"
)
public
R
<
AutomobileEnterprise
>
getInfo
(
@Validated
@RequestBody
AutomobileEnterpriseGetInfoRequest
request
)
{
return
R
.
ok
(
automobileEnterpriseService
.
selectAutomobileEnterpriseById
(
request
.
getId
()));
}
/**
* 新增车企信息
*/
@ApiOperation
(
"新增车企信息"
)
@Log
(
title
=
"车企信息"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/add"
)
public
R
<
Integer
>
add
(
@Validated
@RequestBody
AutomobileEnterprise
automobileEnterprise
)
{
return
R
.
ok
(
automobileEnterpriseService
.
insertAutomobileEnterprise
(
automobileEnterprise
));
}
/**
* 修改车企信息
*/
@ApiOperation
(
"修改车企信息"
)
@Log
(
title
=
"车企信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PostMapping
(
"/edit"
)
public
R
<
Integer
>
edit
(
@Validated
@RequestBody
AutomobileEnterprise
automobileEnterprise
)
{
return
R
.
ok
(
automobileEnterpriseService
.
updateAutomobileEnterprise
(
automobileEnterprise
));
}
/**
* 删除车企信息
*/
@ApiOperation
(
"删除车企信息"
)
@Log
(
title
=
"车企信息"
,
businessType
=
BusinessType
.
DELETE
)
@PostMapping
(
"/remove"
)
public
R
<
Boolean
>
remove
(
@Validated
@RequestBody
AutomobileEnterpriseEditRequest
request
)
{
return
R
.
ok
(
automobileEnterpriseService
.
removeBatchByIds
(
Arrays
.
asList
(
request
.
getIds
())));
}
}
quality-review/src/main/java/com/ruoyi/web/request/AutomobileEnterpriseEditRequest.java
0 → 100644
View file @
50ae4696
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 车企信息DTO
* @author gxk
*/
@Data
@ApiModel
public
class
AutomobileEnterpriseEditRequest
{
@ApiModelProperty
(
"车企ID集合"
)
private
Long
[]
ids
;
}
quality-review/src/main/java/com/ruoyi/web/request/AutomobileEnterpriseGetInfoRequest.java
0 → 100644
View file @
50ae4696
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 获取车企信息详细信息DTO
* @author gxk
*/
@Data
@ApiModel
public
class
AutomobileEnterpriseGetInfoRequest
{
@ApiModelProperty
(
"ID"
)
private
Long
id
;
}
quality-review/src/main/java/com/ruoyi/web/request/AutomobileEnterpriseListRequest.java
0 → 100644
View file @
50ae4696
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 车企信息分页查询DTO
* @author gxk
*/
@Data
@ApiModel
public
class
AutomobileEnterpriseListRequest
extends
PageDomain
{
/** 企业名称 */
@ApiModelProperty
(
"企业名称"
)
private
String
enterpriseName
;
/** 地址 */
@ApiModelProperty
(
"地址"
)
private
String
address
;
/** 邮编 */
@ApiModelProperty
(
"邮编"
)
private
String
postcode
;
/** 企业联系人 */
@ApiModelProperty
(
"企业联系人"
)
private
String
enterpriseContact
;
/** 联系电话 */
@ApiModelProperty
(
"联系电话"
)
private
String
contactNumber
;
}
quality-review/src/main/resources/mapper/AutomobileEnterpriseMapper.xml
0 → 100644
View file @
50ae4696
<?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.ruoyi.mapper.AutomobileEnterpriseMapper"
>
<resultMap
type=
"com.ruoyi.domain.AutomobileEnterprise"
id=
"AutomobileEnterpriseResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"enterpriseName"
column=
"enterprise_name"
/>
<result
property=
"address"
column=
"address"
/>
<result
property=
"postcode"
column=
"postcode"
/>
<result
property=
"enterpriseContact"
column=
"enterprise_contact"
/>
<result
property=
"contactNumber"
column=
"contact_number"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"deleted"
column=
"deleted"
/>
</resultMap>
<sql
id=
"selectAutomobileEnterpriseVo"
>
select id,
enterprise_name,
address,
postcode,
enterprise_contact,
contact_number,
create_by,
create_time,
update_by,
update_time,
deleted
from t_automobile_enterprise
</sql>
<select
id=
"selectAutomobileEnterpriseList"
parameterType=
"com.ruoyi.domain.AutomobileEnterprise"
resultMap=
"AutomobileEnterpriseResult"
>
<include
refid=
"selectAutomobileEnterpriseVo"
/>
<where>
deleted = 0
<if
test=
"enterpriseName != null and enterpriseName != ''"
>
and enterprise_name like concat('%',
#{enterpriseName}, '%')
</if>
<if
test=
"address != null and address != ''"
>
and address like concat('%', #{address}, '%')
</if>
<if
test=
"postcode != null and postcode != ''"
>
and postcode like concat('%', #{postcode}, '%')
</if>
<if
test=
"enterpriseContact != null and enterpriseContact != ''"
>
and enterprise_contact like concat('%', #{enterpriseContact}, '%')
</if>
<if
test=
"contactNumber != null and contactNumber != ''"
>
and contact_number like('%', #{contactNumber}, '%')
</if>
</where>
</select>
<select
id=
"selectAutomobileEnterpriseById"
parameterType=
"Long"
resultMap=
"AutomobileEnterpriseResult"
>
<include
refid=
"selectAutomobileEnterpriseVo"
/>
where id = #{id}
</select>
<insert
id=
"insertAutomobileEnterprise"
parameterType=
"com.ruoyi.domain.AutomobileEnterprise"
>
insert into t_automobile_enterprise
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"enterpriseName != null"
>
enterprise_name,
</if>
<if
test=
"address != null"
>
address,
</if>
<if
test=
"postcode != null"
>
postcode,
</if>
<if
test=
"enterpriseContact != null"
>
enterprise_contact,
</if>
<if
test=
"contactNumber != null"
>
contact_number,
</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>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id},
</if>
<if
test=
"enterpriseName != null"
>
#{enterpriseName},
</if>
<if
test=
"address != null"
>
#{address},
</if>
<if
test=
"postcode != null"
>
#{postcode},
</if>
<if
test=
"enterpriseContact != null"
>
#{enterpriseContact},
</if>
<if
test=
"contactNumber != null"
>
#{contactNumber},
</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>
</trim>
</insert>
<update
id=
"updateAutomobileEnterprise"
parameterType=
"com.ruoyi.domain.AutomobileEnterprise"
>
update t_automobile_enterprise
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"enterpriseName != null"
>
enterprise_name = #{enterpriseName},
</if>
<if
test=
"address != null"
>
address = #{address},
</if>
<if
test=
"postcode != null"
>
postcode = #{postcode},
</if>
<if
test=
"enterpriseContact != null"
>
enterprise_contact = #{enterpriseContact},
</if>
<if
test=
"contactNumber != null"
>
contact_number = #{contactNumber},
</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>
</trim>
where id = #{id}
</update>
</mapper>
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
View file @
50ae4696
...
...
@@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
/**
* Entity基类
*
*
* @author ruoyi
*/
public
class
BaseEntity
implements
Serializable
...
...
@@ -38,7 +38,7 @@ public class BaseEntity implements Serializable
/** 更新时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@TableField
(
fill
=
FieldFill
.
UPDATE
)
private
Date
updateTime
;
/** 备注 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment