Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SiEn
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
SiEn
Commits
1d011660
Commit
1d011660
authored
Oct 22, 2020
by
giaogiao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://119.28.51.83/hewei/Jumeirah
into future/sys/userLogin
parents
29717422
90fa6e14
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
371 additions
and
37 deletions
+371
-37
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/plain/McBusinessPlainController.java
+107
-0
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/McBusinessPlainAddParam.java
+50
-0
common/src/main/java/com/jumeirah/common/campusstore/ArrayJsonHandler.java
+56
-0
common/src/main/java/com/jumeirah/common/campusstore/ObjectJsonHandler.java
+57
-0
common/src/main/java/com/jumeirah/common/entity/BusinessPlain.java
+12
-10
common/src/main/java/com/jumeirah/common/entity/base/ImgJson.java
+27
-0
common/src/main/java/com/jumeirah/common/vo/BusinessPlainQueryForAppVo.java
+11
-9
common/src/main/java/com/jumeirah/common/vo/BusinessPlainQueryVo.java
+15
-9
common/src/main/resources/mapper/BusinessPlainMapper.xml
+36
-9
No files found.
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/plain/McBusinessPlainController.java
0 → 100644
View file @
1d011660
package
com
.
jumeirah
.
api
.
merchant
.
controller
.
plain
;
import
com.jumeirah.api.merchant.entity.param.McBusinessPlainAddParam
;
import
com.jumeirah.common.entity.BusinessPlain
;
import
com.jumeirah.common.param.BusinessPlainPageParam
;
import
com.jumeirah.common.service.BusinessPlainService
;
import
com.jumeirah.common.vo.BusinessPlainQueryVo
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Add
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Update
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.geekidea.springbootplus.framework.shiro.jwt.JwtToken
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.SecurityUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PathVariable
;
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
;
/**
* 公务机出售托管表 控制器
*
* @author giao
* @since 2020-10-14
*/
@Slf4j
@RestController
@RequestMapping
(
"/merchant/businessPlain"
)
@Api
(
value
=
"公务机出售托管表API"
,
tags
=
{
"公务机出售托管表"
})
public
class
McBusinessPlainController
extends
BaseController
{
@Autowired
private
BusinessPlainService
businessPlainService
;
/**
* 添加公务机出售托管表
*/
@PostMapping
(
"/add"
)
@OperationLog
(
name
=
"添加公务机出售托管表"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"添加公务机出售托管表"
)
public
ApiResult
<
Boolean
>
addBusinessPlain
(
@Validated
(
Add
.
class
)
@RequestBody
McBusinessPlainAddParam
mcBusinessPlainAddParam
)
throws
Exception
{
BusinessPlain
businessPlain
=
new
BusinessPlain
();
BeanUtils
.
copyProperties
(
mcBusinessPlainAddParam
,
businessPlain
);
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
businessPlain
.
setMcId
(
jwtToken
.
getMcId
());
boolean
flag
=
businessPlainService
.
saveBusinessPlain
(
businessPlain
);
return
ApiResult
.
result
(
flag
);
}
/**
* 修改公务机出售托管表
*/
@PostMapping
(
"/update"
)
@OperationLog
(
name
=
"修改公务机出售托管表"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"修改公务机出售托管表"
)
public
ApiResult
<
Boolean
>
updateBusinessPlain
(
@Validated
(
Update
.
class
)
@RequestBody
McBusinessPlainAddParam
mcBusinessPlainAddParam
)
throws
Exception
{
BusinessPlain
businessPlain
=
new
BusinessPlain
();
BeanUtils
.
copyProperties
(
mcBusinessPlainAddParam
,
businessPlain
);
boolean
flag
=
businessPlainService
.
updateBusinessPlain
(
businessPlain
);
return
ApiResult
.
result
(
flag
);
}
/**
* 删除公务机出售托管表
*/
@PostMapping
(
"/delete/{id}"
)
@OperationLog
(
name
=
"删除公务机出售托管表"
,
type
=
OperationLogType
.
DELETE
)
@ApiOperation
(
value
=
"删除公务机出售托管表"
)
public
ApiResult
<
Boolean
>
deleteBusinessPlain
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
boolean
flag
=
businessPlainService
.
deleteBusinessPlain
(
id
);
return
ApiResult
.
result
(
flag
);
}
/**
* 公务机出售托管表分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"公务机出售托管表分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"公务机出售托管表分页列表"
)
public
ApiResult
<
Paging
<
BusinessPlainQueryVo
>>
getBusinessPlainPageList
(
@Validated
@RequestBody
BusinessPlainPageParam
businessPlainPageParam
)
throws
Exception
{
Paging
<
BusinessPlainQueryVo
>
paging
=
businessPlainService
.
getBusinessPlainPageList
(
businessPlainPageParam
);
return
ApiResult
.
ok
(
paging
);
}
// /**
// * 获取公务机出售托管表详情
// */
// @GetMapping("/info/{id}")
// @OperationLog(name = "公务机出售托管表详情", type = OperationLogType.INFO)
// @ApiOperation(value = "公务机出售托管表详情")
// public ApiResult<BusinessPlainQueryVo> getBusinessPlain(@PathVariable("id") Long id) throws Exception {
// BusinessPlainQueryVo businessPlainQueryVo = businessPlainService.getBusinessPlainById(id);
// return ApiResult.ok(businessPlainQueryVo);
// }
}
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/McBusinessPlainAddParam.java
0 → 100644
View file @
1d011660
package
com
.
jumeirah
.
api
.
merchant
.
entity
.
param
;
import
com.jumeirah.common.entity.base.ImgJson
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Update
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
/**
* 公务机出售/托管表
*
* @author giao
* @since 2020-10-14
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"BusinessPlain对象"
)
public
class
McBusinessPlainAddParam
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
@ApiModelProperty
(
"主键ID"
)
private
Long
id
;
@NotNull
(
message
=
"业务类型,0-出售,1-托管不能为空"
)
@ApiModelProperty
(
"业务类型,0-出售,1-托管"
)
private
Integer
businessType
;
@ApiModelProperty
(
"机型介绍"
)
private
String
introduction
;
@ApiModelProperty
(
"销售员姓名"
)
private
String
name
;
@ApiModelProperty
(
"销售联系电话"
)
private
String
phone
;
@ApiModelProperty
(
"微信号"
)
private
String
wechat
;
@ApiModelProperty
(
"图片相关数据json"
)
private
List
<
ImgJson
>
imgUrl
;
}
common/src/main/java/com/jumeirah/common/campusstore/ArrayJsonHandler.java
0 → 100644
View file @
1d011660
package
com
.
jumeirah
.
common
.
campusstore
;
import
com.alibaba.fastjson.JSONArray
;
import
org.apache.ibatis.type.BaseTypeHandler
;
import
org.apache.ibatis.type.JdbcType
;
import
org.apache.ibatis.type.MappedJdbcTypes
;
import
org.apache.ibatis.type.MappedTypes
;
import
java.sql.CallableStatement
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
/**
*
* @description 用以mysql中json格式的字段,进行转换的自定义转换器,转换为实体类的JSONArray属性
* MappedTypes注解中的类代表此转换器可以自动转换为的java对象
* MappedJdbcTypes注解中设置的是对应的jdbctype
*/
@MappedTypes
(
JSONArray
.
class
)
@MappedJdbcTypes
(
JdbcType
.
VARCHAR
)
public
class
ArrayJsonHandler
extends
BaseTypeHandler
<
JSONArray
>
{
//设置非空参数
@Override
public
void
setNonNullParameter
(
PreparedStatement
ps
,
int
i
,
JSONArray
parameter
,
JdbcType
jdbcType
)
throws
SQLException
{
ps
.
setString
(
i
,
String
.
valueOf
(
parameter
.
toJSONString
()));
}
//根据列名,获取可以为空的结果
@Override
public
JSONArray
getNullableResult
(
ResultSet
rs
,
String
columnName
)
throws
SQLException
{
String
sqlJson
=
rs
.
getString
(
columnName
);
if
(
null
!=
sqlJson
){
return
JSONArray
.
parseArray
(
sqlJson
);
}
return
null
;
}
//根据列索引,获取可以为空的结果
@Override
public
JSONArray
getNullableResult
(
ResultSet
rs
,
int
columnIndex
)
throws
SQLException
{
String
sqlJson
=
rs
.
getString
(
columnIndex
);
if
(
null
!=
sqlJson
){
return
JSONArray
.
parseArray
(
sqlJson
);
}
return
null
;
}
@Override
public
JSONArray
getNullableResult
(
CallableStatement
cs
,
int
columnIndex
)
throws
SQLException
{
String
sqlJson
=
cs
.
getString
(
columnIndex
);
if
(
null
!=
sqlJson
){
return
JSONArray
.
parseArray
(
sqlJson
);
}
return
null
;
}
}
common/src/main/java/com/jumeirah/common/campusstore/ObjectJsonHandler.java
0 → 100644
View file @
1d011660
package
com
.
jumeirah
.
common
.
campusstore
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.ibatis.type.BaseTypeHandler
;
import
org.apache.ibatis.type.JdbcType
;
import
org.apache.ibatis.type.MappedJdbcTypes
;
import
org.apache.ibatis.type.MappedTypes
;
import
java.sql.CallableStatement
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
/**
*
* @description 用以mysql中json格式的字段,进行转换的自定义转换器,转换为实体类的JSONObject属性
* MappedTypes注解中的类代表此转换器可以自动转换为的java对象
* MappedJdbcTypes注解中设置的是对应的jdbctype
*/
@MappedTypes
(
JSONObject
.
class
)
@MappedJdbcTypes
(
JdbcType
.
VARCHAR
)
public
class
ObjectJsonHandler
extends
BaseTypeHandler
<
JSONObject
>{
//设置非空参数
@Override
public
void
setNonNullParameter
(
PreparedStatement
ps
,
int
i
,
JSONObject
parameter
,
JdbcType
jdbcType
)
throws
SQLException
{
ps
.
setString
(
i
,
String
.
valueOf
(
parameter
.
toJSONString
()));
}
//根据列名,获取可以为空的结果
@Override
public
JSONObject
getNullableResult
(
ResultSet
rs
,
String
columnName
)
throws
SQLException
{
String
sqlJson
=
rs
.
getString
(
columnName
);
if
(
null
!=
sqlJson
){
return
JSONObject
.
parseObject
(
sqlJson
);
}
return
null
;
}
//根据列索引,获取可以为空的结果
@Override
public
JSONObject
getNullableResult
(
ResultSet
rs
,
int
columnIndex
)
throws
SQLException
{
String
sqlJson
=
rs
.
getString
(
columnIndex
);
if
(
null
!=
sqlJson
){
return
JSONObject
.
parseObject
(
sqlJson
);
}
return
null
;
}
@Override
public
JSONObject
getNullableResult
(
CallableStatement
cs
,
int
columnIndex
)
throws
SQLException
{
String
sqlJson
=
cs
.
getString
(
columnIndex
);
if
(
null
!=
sqlJson
){
return
JSONObject
.
parseObject
(
sqlJson
);
}
return
null
;
}
}
common/src/main/java/com/jumeirah/common/entity/BusinessPlain.java
View file @
1d011660
package
com
.
jumeirah
.
common
.
entity
;
package
com
.
jumeirah
.
common
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.jumeirah.common.entity.base.ImgJson
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -10,7 +14,8 @@ import lombok.EqualsAndHashCode;
...
@@ -10,7 +14,8 @@ import lombok.EqualsAndHashCode;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
import
java.sql.Timestamp
;
import
java.util.List
;
/**
/**
* 公务机出售/托管表
* 公务机出售/托管表
...
@@ -22,6 +27,7 @@ import java.util.Date;
...
@@ -22,6 +27,7 @@ import java.util.Date;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"BusinessPlain对象"
)
@ApiModel
(
value
=
"BusinessPlain对象"
)
@TableName
(
autoResultMap
=
true
)
public
class
BusinessPlain
extends
BaseEntity
{
public
class
BusinessPlain
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -38,9 +44,6 @@ public class BusinessPlain extends BaseEntity {
...
@@ -38,9 +44,6 @@ public class BusinessPlain extends BaseEntity {
@ApiModelProperty
(
"业务类型,0-出售,1-托管"
)
@ApiModelProperty
(
"业务类型,0-出售,1-托管"
)
private
Integer
businessType
;
private
Integer
businessType
;
@ApiModelProperty
(
"图片url"
)
private
String
imgUrl
;
@ApiModelProperty
(
"机型介绍"
)
@ApiModelProperty
(
"机型介绍"
)
private
String
introduction
;
private
String
introduction
;
...
@@ -58,14 +61,13 @@ public class BusinessPlain extends BaseEntity {
...
@@ -58,14 +61,13 @@ public class BusinessPlain extends BaseEntity {
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
"创建时间(时间戳)"
)
@ApiModelProperty
(
"创建时间(时间戳)"
)
private
Date
createTime
;
private
Timestamp
createTime
;
@ApiModelProperty
(
"更新时间(时间戳)"
)
@ApiModelProperty
(
"更新时间(时间戳)"
)
private
Date
updateTime
;
private
Timestamp
updateTime
;
@ApiModelProperty
(
"图片高"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
Integer
imageListHeight
;
@ApiModelProperty
(
"图片相关数据json (包括:路径,宽和高)"
)
@ApiModelProperty
(
"图片宽"
)
private
List
<
ImgJson
>
imgUrl
;
private
Integer
imageListWidth
;
}
}
common/src/main/java/com/jumeirah/common/entity/base/ImgJson.java
0 → 100644
View file @
1d011660
package
com
.
jumeirah
.
common
.
entity
.
base
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @ClassName ImgJson
* @Descripteion 请写点注释吧!
* @Date 2020/10/22 11:21
* @Version 1.0
**/
@Data
@ApiModel
(
value
=
"图片json对象"
)
public
class
ImgJson
implements
Serializable
{
@ApiModelProperty
(
"地址url"
)
private
String
url
;
@ApiModelProperty
(
"高"
)
private
Long
height
;
@ApiModelProperty
(
"宽"
)
private
Long
width
;
}
common/src/main/java/com/jumeirah/common/vo/BusinessPlainQueryForAppVo.java
View file @
1d011660
package
com
.
jumeirah
.
common
.
vo
;
package
com
.
jumeirah
.
common
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.jumeirah.common.entity.base.ImgJson
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
/**
/**
* <pre>
* <pre>
...
@@ -18,15 +23,13 @@ import java.io.Serializable;
...
@@ -18,15 +23,13 @@ import java.io.Serializable;
@Data
@Data
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"BusinessPlainQueryForAppVo对象"
)
@ApiModel
(
value
=
"BusinessPlainQueryForAppVo对象"
)
@TableName
(
autoResultMap
=
true
)
public
class
BusinessPlainQueryForAppVo
implements
Serializable
{
public
class
BusinessPlainQueryForAppVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"商家name"
)
@ApiModelProperty
(
"商家name"
)
private
String
mcName
;
private
String
mcName
;
@ApiModelProperty
(
"图片url"
)
private
String
imgUrl
;
@ApiModelProperty
(
"机型介绍"
)
@ApiModelProperty
(
"机型介绍"
)
private
String
introduction
;
private
String
introduction
;
...
@@ -41,8 +44,8 @@ public class BusinessPlainQueryForAppVo implements Serializable {
...
@@ -41,8 +44,8 @@ public class BusinessPlainQueryForAppVo implements Serializable {
@ApiModelProperty
(
"商家头像"
)
@ApiModelProperty
(
"商家头像"
)
private
String
mcHead
;
private
String
mcHead
;
@ApiModelProperty
(
"图片高"
)
private
Integer
imageListHeight
;
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
@ApiModelProperty
(
"图片宽"
)
@ApiModelProperty
(
"图片相关数据json (包括:路径,宽和高)"
)
private
Integer
imageListWidth
;
private
List
<
ImgJson
>
imgList
;
}
}
\ No newline at end of file
common/src/main/java/com/jumeirah/common/vo/BusinessPlainQueryVo.java
View file @
1d011660
package
com
.
jumeirah
.
common
.
vo
;
package
com
.
jumeirah
.
common
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.jumeirah.common.entity.base.ImgJson
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.sql.Timestamp
;
import
java.util.List
;
/**
/**
* <pre>
* <pre>
...
@@ -19,7 +24,8 @@ import java.util.Date;
...
@@ -19,7 +24,8 @@ import java.util.Date;
@Data
@Data
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"BusinessPlainQueryVo对象"
)
@ApiModel
(
value
=
"BusinessPlainQueryVo对象"
)
public
class
BusinessPlainQueryVo
implements
Serializable
{
@TableName
(
autoResultMap
=
true
)
public
class
BusinessPlainQueryVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"主键ID"
)
@ApiModelProperty
(
"主键ID"
)
...
@@ -31,9 +37,6 @@ public class BusinessPlainQueryVo implements Serializable {
...
@@ -31,9 +37,6 @@ public class BusinessPlainQueryVo implements Serializable {
@ApiModelProperty
(
"业务类型,0-出售,1-托管"
)
@ApiModelProperty
(
"业务类型,0-出售,1-托管"
)
private
Integer
businessType
;
private
Integer
businessType
;
@ApiModelProperty
(
"图片url"
)
private
String
imgUrl
;
@ApiModelProperty
(
"机型介绍"
)
@ApiModelProperty
(
"机型介绍"
)
private
String
introduction
;
private
String
introduction
;
...
@@ -50,8 +53,12 @@ public class BusinessPlainQueryVo implements Serializable {
...
@@ -50,8 +53,12 @@ public class BusinessPlainQueryVo implements Serializable {
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
"创建时间(时间戳)"
)
@ApiModelProperty
(
"创建时间(时间戳)"
)
private
Date
createTime
;
private
Timestamp
createTime
;
@ApiModelProperty
(
"更新时间(时间戳)"
)
@ApiModelProperty
(
"更新时间(时间戳)"
)
private
Date
updateTime
;
private
Timestamp
updateTime
;
}
\ No newline at end of file
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
@ApiModelProperty
(
"图片相关数据json (包括:路径,宽和高)"
)
private
List
<
ImgJson
>
imgList
;
}
common/src/main/resources/mapper/BusinessPlainMapper.xml
View file @
1d011660
...
@@ -4,11 +4,27 @@
...
@@ -4,11 +4,27 @@
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, mc_id, business_type, img_url, introduction, name, phone, wechat, status, create_time, update_time,image_list_height,image_list_width
id,
mc_id,
business_type,
img_url,
introduction,
name,
phone,
wechat,
status,
create_time,
update_time
</sql>
</sql>
<sql
id=
"Base_Column_ListForApp"
>
<sql
id=
"Base_Column_ListForApp"
>
bp.business_type, bp.img_url, bp.introduction, bp.name, bp.phone, bp.wechat,m.`name` AS mcName
bp.business_type,
bp.img_url,
bp.introduction,
bp.name,
bp.phone,
bp.wechat,
m.`name` AS mcName
</sql>
</sql>
<select
id=
"getBusinessPlainById"
resultType=
"com.jumeirah.common.vo.BusinessPlainQueryVo"
>
<select
id=
"getBusinessPlainById"
resultType=
"com.jumeirah.common.vo.BusinessPlainQueryVo"
>
...
@@ -18,20 +34,31 @@
...
@@ -18,20 +34,31 @@
</select>
</select>
<select
id=
"getBusinessPlainPageList"
parameterType=
"com.jumeirah.common.param.BusinessPlainPageParam"
<select
id=
"getBusinessPlainPageList"
parameterType=
"com.jumeirah.common.param.BusinessPlainPageParam"
result
Type=
"com.jumeirah.common.vo.BusinessPlainQueryVo
"
>
result
Map=
"pageListMap
"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from business_plain
as bp
from business_plain
</select>
</select>
<resultMap
id=
"pageListMap"
type=
"com.jumeirah.common.vo.BusinessPlainQueryVo"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"img_url"
property=
"imgList"
typeHandler=
"com.jumeirah.common.campusstore.ArrayJsonHandler"
></result>
</resultMap>
<select
id=
"getBusinessPlainPageListForApp"
parameterType=
"com.jumeirah.common.param.BusinessPlainPageParam"
<select
id=
"getBusinessPlainPageListForApp"
parameterType=
"com.jumeirah.common.param.BusinessPlainPageParam"
result
Type=
"com.jumeirah.common.vo.BusinessPlainQueryForAppVo
"
>
result
Map=
"pageListMapForApp
"
>
select
select
<include
refid=
"Base_Column_ListForApp"
/>
,bp.image_list_height,bp.image_list_width,m.`head` AS mcHead
<include
refid=
"Base_Column_ListForApp"
/>
,
m.`head` AS mcHead
from business_plain bp
from business_plain bp
INNER JOIN merchant m ON bp.mc_id=m.id
INNER JOIN merchant m ON bp.mc_id=m.id
where bp.business_type=#{param.type}
where bp.business_type = #{param.type}
AND m.state=1 and m.audit_register_status=1
AND m.state = 1
and m.audit_register_status = 1
</select>
</select>
<resultMap
id=
"pageListMapForApp"
type=
"com.jumeirah.common.vo.BusinessPlainQueryForAppVo"
>
<result
column=
"img_url"
property=
"imgList"
typeHandler=
"com.jumeirah.common.campusstore.ArrayJsonHandler"
></result>
</resultMap>
</mapper>
</mapper>
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