Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
8f80e3fd
Commit
8f80e3fd
authored
Sep 19, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
4ee153e5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
158 additions
and
2 deletions
+158
-2
BranchCompanyBiz.java
...m/github/wxiaoqi/security/admin/biz/BranchCompanyBiz.java
+19
-0
CompanyInfoOrderBiz.java
...ithub/wxiaoqi/security/admin/biz/CompanyInfoOrderBiz.java
+1
-1
BranchCompanyMapper.java
...ub/wxiaoqi/security/admin/mapper/BranchCompanyMapper.java
+1
-1
AdminBranchCompanyController.java
...curity/admin/rest/admin/AdminBranchCompanyController.java
+50
-0
BranchCompanyMapper.xml
...e-admin/src/main/resources/mapper/BranchCompanyMapper.xml
+87
-0
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/BranchCompanyBiz.java
View file @
8f80e3fd
...
...
@@ -2,16 +2,23 @@ package com.github.wxiaoqi.security.admin.biz;
import
cn.hutool.json.JSONUtil
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.dto.CompanySearchDTO
;
import
com.github.wxiaoqi.security.admin.entity.BranchCompany
;
import
com.github.wxiaoqi.security.admin.mapper.BranchCompanyMapper
;
import
com.github.wxiaoqi.security.admin.vo.CompanySearchVO
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.universal.dto.SendMsgDTO
;
import
com.xxfc.platform.universal.feign.MQSenderFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.*;
...
...
@@ -53,6 +60,18 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
}
public
PageDataVO
<
CompanySearchVO
>
search
(
CompanySearchDTO
vo
)
{
PageHelper
.
startPage
(
vo
.
getPage
(),
vo
.
getLimit
());
PageInfo
<
CompanySearchVO
>
branchCompanyPageInfo
=
new
PageInfo
<>(
getList
(
vo
));
return
PageDataVO
.
pageInfo
(
branchCompanyPageInfo
);
}
public
List
<
CompanySearchVO
>
getList
(
CompanySearchDTO
vo
){
return
mapper
.
search
(
vo
);
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/CompanyInfoOrderBiz.java
View file @
8f80e3fd
...
...
@@ -22,7 +22,7 @@ public class CompanyInfoOrderBiz extends BaseBiz<CompanyInfoOrderMapper, Company
public
void
saveOrder
(
CompanyInfoOrder
companyInfoOrder
){
companyInfoOrder
.
setOderNo
(
OrderUtil
.
GetOrderNumber
(
""
,
OrderUtil
.
COMPANY_MID
));
if
(
companyInfoOrder
.
getRealAmount
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
){
companyInfoOrder
.
setPay
_s
tatus
(
1
);
companyInfoOrder
.
setPay
S
tatus
(
1
);
companyInfoOrder
.
setPayTime
(
System
.
currentTimeMillis
());
}
insertSelective
(
companyInfoOrder
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/BranchCompanyMapper.java
View file @
8f80e3fd
...
...
@@ -12,6 +12,6 @@ import java.util.List;
public
interface
BranchCompanyMapper
extends
Mapper
<
BranchCompany
>,
SelectByIdListMapper
<
BranchCompany
,
Integer
>
{
//
List<CompanySearchVO> search(CompanySearchDTO companySearchDTO);
List
<
CompanySearchVO
>
search
(
CompanySearchDTO
companySearchDTO
);
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/admin/AdminBranchCompanyController.java
0 → 100644
View file @
8f80e3fd
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
.
admin
;
import
com.github.wxiaoqi.security.admin.biz.BranchCompanyBiz
;
import
com.github.wxiaoqi.security.admin.biz.BranchCompanyLevelBiz
;
import
com.github.wxiaoqi.security.admin.biz.CompanyInfoBiz
;
import
com.github.wxiaoqi.security.admin.dto.CompanySearchDTO
;
import
com.github.wxiaoqi.security.admin.entity.BranchCompany
;
import
com.github.wxiaoqi.security.admin.entity.BranchCompanyLevel
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* @author Administrator
*/
@Slf4j
@RestController
@RequestMapping
(
"backstage/branchCompany"
)
@RequiredArgsConstructor
(
onConstructor_
=
{
@Autowired
})
@Api
(
tags
=
{
"店铺"
})
public
class
AdminBranchCompanyController
extends
BaseController
<
BranchCompanyBiz
,
BranchCompany
>
{
@Autowired
CompanyInfoBiz
companyInfoBiz
;
@GetMapping
(
"search"
)
@ApiModelProperty
(
"店铺列表"
)
public
ObjectRestResponse
search
(
CompanySearchDTO
companySearchDTO
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
search
(
companySearchDTO
));
}
@PostMapping
(
"addOrUpd"
)
@ApiModelProperty
(
"店铺更新"
)
public
ObjectRestResponse
addOrUpd
(
@RequestBody
BranchCompany
branchCompany
)
{
return
baseBiz
.
addOrUpd
(
branchCompany
);
}
}
ace-modules/ace-admin/src/main/resources/mapper/BranchCompanyMapper.xml
0 → 100644
View file @
8f80e3fd
<?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.github.wxiaoqi.security.admin.mapper.BranchCompanyMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.github.wxiaoqi.security.admin.entity.BranchCompany"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"short_name"
property=
"shortName"
jdbcType=
"VARCHAR"
/>
<result
column=
"branch_type"
property=
"branchType"
jdbcType=
"INTEGER"
/>
<result
column=
"subordinate_branch"
property=
"subordinateBranch"
jdbcType=
"INTEGER"
/>
<result
column=
"addr_province"
property=
"addrProvince"
jdbcType=
"INTEGER"
/>
<result
column=
"addr_city"
property=
"addrCity"
jdbcType=
"INTEGER"
/>
<result
column=
"addr_town"
property=
"addrTown"
jdbcType=
"INTEGER"
/>
<result
column=
"addr_detail"
property=
"addrDetail"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"vehice_service_phone"
property=
"vehiceServicePhone"
/>
<result
column=
"tour_service_phone"
property=
"tourServicePhone"
/>
<result
column=
"longitude"
property=
"longitude"
/>
<result
column=
"latitude"
property=
"latitude"
/>
<result
column=
"zone_id"
property=
"zoneId"
/>
<result
column=
"state"
property=
"state"
/>
</resultMap>
<select
id=
"search"
parameterType=
"com.github.wxiaoqi.security.admin.dto.CompanySearchDTO"
resultType=
"com.github.wxiaoqi.security.admin.vo.CompanySearchVO"
>
select c.*,i.name as companyName
<if
test=
"lon != null and lat != null"
>
, st_distance_sphere(point(#{lon}, #{lat}), point(c.longitude, c.latitude)) as distance
</if>
from branch_company c
LEFT JOIN company_info i on c.company_id=i.id
<where>
c.is_del = 0
<if
test=
"id != null"
>
and c.id = #{id}
</if>
<if
test=
"addrCity != null"
>
and (c.addr_city = #{addrCity} or c.addr_province = #{addrCity} or c.addr_town = #{addrCity})
</if>
<if
test=
"addrProvince != null"
>
and c.addr_province = #{addrProvince}
</if>
<if
test=
"lon != null and lat != null"
>
and c.longitude is not null and c.latitude is not null
</if>
<if
test=
"state != null"
>
and c.state = #{state}
</if>
<if
test=
"companyId != null"
>
and c.company_id = #{companyId}
</if>
<if
test=
"isShow != null"
>
and c.is_show = #{isShow}
</if>
<if
test=
"name != null and name != '' "
>
and ( c.name like concat('%',#{name},'%') or c.short_name like concat('%',#{name},'%') )
</if>
<if
test=
"companyIds != null and companyIds.size > 0"
>
and c.id in
<foreach
collection=
"companyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
<if
test=
"dataCompanyIds != null and dataCompanyIds.size > 0"
>
and c.id in
<foreach
collection=
"dataCompanyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
<if
test=
"dataCorporationIds != null and dataCorporationIds.size > 0"
>
and c.company_id in
<foreach
collection=
"dataCorporationIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
</where>
<choose>
<when
test=
"lon != null and lat != null"
>
order by c.distance asc
</when>
<otherwise>
order by c.id desc
</otherwise>
</choose>
</select>
</mapper>
\ No newline at end of file
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