Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
a878f9cb
Commit
a878f9cb
authored
Aug 15, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询为开票单据列表
parent
277b8385
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
184 additions
and
36 deletions
+184
-36
TabBillingPayInfoMapper.java
...om/gic/enterprise/dao/mapper/TabBillingPayInfoMapper.java
+14
-0
TabBillingPayInfo.java
...ain/java/com/gic/enterprise/entity/TabBillingPayInfo.java
+13
-0
BillingPayInfoService.java
...ava/com/gic/enterprise/service/BillingPayInfoService.java
+35
-0
BillingPayInfoServiceImpl.java
...ic/enterprise/service/impl/BillingPayInfoServiceImpl.java
+29
-0
BillingPayInfoApiServiceImpl.java
...nterprise/service/outer/BillingPayInfoApiServiceImpl.java
+24
-0
EnterpriseApiServiceImpl.java
...ic/enterprise/service/outer/EnterpriseApiServiceImpl.java
+2
-2
dubbo-gic-platform-enterprise-service.xml
.../main/resources/dubbo-gic-platform-enterprise-service.xml
+3
-0
TabBillingPayInfoMapper.xml
...ice/src/main/resources/mapper/TabBillingPayInfoMapper.xml
+36
-4
pom.xml
gic-platform-enterprise-web/pom.xml
+5
-0
GlobalExceptionHandler.java
.../gic/enterprise/web/exception/GlobalExceptionHandler.java
+15
-24
dubbo-gic-platform-enterprise-web.xml
.../src/main/resources/dubbo-gic-platform-enterprise-web.xml
+2
-0
GlobalExceptionHandler.java
...m/gic/operation/web/exception/GlobalExceptionHandler.java
+3
-3
UserPasswordUtil.java
...in/java/com/gic/operation/web/utils/UserPasswordUtil.java
+3
-3
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabBillingPayInfoMapper.java
View file @
a878f9cb
package
com
.
gic
.
enterprise
.
dao
.
mapper
;
import
com.gic.enterprise.entity.TabBillingPayInfo
;
import
com.gic.enterprise.qo.BillListQueryQO
;
import
java.util.List
;
public
interface
TabBillingPayInfoMapper
{
/**
...
...
@@ -50,4 +53,14 @@ public interface TabBillingPayInfoMapper {
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabBillingPayInfo
record
);
/**
* 查询为开票单据列表数据
* @Title: listBill
* @Description:
* @author guojuxing
* @param params
* @return java.util.List<com.gic.enterprise.entity.TabBillingPayInfo>
*/
List
<
TabBillingPayInfo
>
listBill
(
BillListQueryQO
params
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/entity/TabBillingPayInfo.java
View file @
a878f9cb
...
...
@@ -85,6 +85,10 @@ public class TabBillingPayInfo {
*
*/
private
Date
updateTime
;
/**
* 购买类型 1:商户余额充值 2:短信套餐包购买
*/
private
Integer
buyType
;
public
Integer
getPayInfoId
()
{
return
payInfoId
;
...
...
@@ -213,4 +217,12 @@ public class TabBillingPayInfo {
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getBuyType
()
{
return
buyType
;
}
public
void
setBuyType
(
Integer
buyType
)
{
this
.
buyType
=
buyType
;
}
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/BillingPayInfoService.java
0 → 100644
View file @
a878f9cb
package
com
.
gic
.
enterprise
.
service
;
import
com.gic.enterprise.entity.TabBillingPayInfo
;
import
com.gic.enterprise.qo.BillListQueryQO
;
import
com.github.pagehelper.Page
;
/**
* 支付信息
* @ClassName: BillingPayInfoService
* @Description:
* @author guojuxing
* @date 2019/8/15 1:59 PM
*/
public
interface
BillingPayInfoService
{
/**
* 根据主键查询单条
* @Title: getById
* @Description:
* @author guojuxing
* @param billingPayInfoId
* @return com.gic.enterprise.entity.TabBillingPayInfo
*/
TabBillingPayInfo
getById
(
Integer
billingPayInfoId
);
/**
* 分页查询为开票单据列表数据
* @Title: listBilling
* @Description:
* @author guojuxing
* @param params
* @return com.github.pagehelper.Page<com.gic.enterprise.entity.TabBillingPayInfo>
*/
Page
<
TabBillingPayInfo
>
listBilling
(
BillListQueryQO
params
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/BillingPayInfoServiceImpl.java
0 → 100644
View file @
a878f9cb
package
com
.
gic
.
enterprise
.
service
.
impl
;
import
com.gic.enterprise.dao.mapper.TabBillingPayInfoMapper
;
import
com.gic.enterprise.entity.TabBillingPayInfo
;
import
com.gic.enterprise.qo.BillListQueryQO
;
import
com.gic.enterprise.service.BillingPayInfoService
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"billingPayInfoService"
)
public
class
BillingPayInfoServiceImpl
implements
BillingPayInfoService
{
@Autowired
private
TabBillingPayInfoMapper
tabBillingPayInfoMapper
;
@Override
public
TabBillingPayInfo
getById
(
Integer
billingPayInfoId
)
{
return
tabBillingPayInfoMapper
.
selectByPrimaryKey
(
billingPayInfoId
);
}
@Override
public
Page
<
TabBillingPayInfo
>
listBilling
(
BillListQueryQO
params
)
{
PageHelper
.
startPage
(
params
.
getCurrentPage
(),
params
.
getPageSize
());
List
<
TabBillingPayInfo
>
list
=
tabBillingPayInfoMapper
.
listBill
(
params
);
return
(
Page
<
TabBillingPayInfo
>)
list
;
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/BillingPayInfoApiServiceImpl.java
0 → 100644
View file @
a878f9cb
package
com
.
gic
.
enterprise
.
service
.
outer
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.enterprise.dto.BillingPayInfoDTO
;
import
com.gic.enterprise.qo.BillListQueryQO
;
import
com.gic.enterprise.service.BillingPayInfoApiService
;
import
com.gic.enterprise.service.BillingPayInfoService
;
@Service
(
"billingPayInfoApiService"
)
public
class
BillingPayInfoApiServiceImpl
implements
BillingPayInfoApiService
{
@Autowired
private
BillingPayInfoService
billingPayInfoService
;
@Override
public
ServiceResponse
<
Page
<
BillingPayInfoDTO
>>
listBill
(
BillListQueryQO
params
)
{
com
.
github
.
pagehelper
.
Page
page
=
billingPayInfoService
.
listBilling
(
params
);
Page
<
BillingPayInfoDTO
>
resultPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
page
,
BillingPayInfoDTO
.
class
);
return
ServiceResponse
.
success
(
resultPage
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/EnterpriseApiServiceImpl.java
View file @
a878f9cb
...
...
@@ -17,7 +17,7 @@ import com.gic.enterprise.dto.EnterpriseDTO;
import
com.gic.enterprise.dto.EnterpriseListDTO
;
import
com.gic.enterprise.entity.TabEnterprise
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.exception.
Enterprise
Exception
;
import
com.gic.enterprise.exception.
Common
Exception
;
import
com.gic.enterprise.service.EnterpriseApiService
;
import
com.gic.enterprise.service.EnterpriseInitService
;
import
com.gic.enterprise.service.EnterpriseService
;
...
...
@@ -67,7 +67,7 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
if
(
userResult
.
isSuccess
())
{
return
ServiceResponse
.
success
(
enterpriseId
);
}
else
{
throw
new
Enterprise
Exception
(
userResult
.
getCode
(),
userResult
.
getMessage
());
throw
new
Common
Exception
(
userResult
.
getCode
(),
userResult
.
getMessage
());
}
}
...
...
gic-platform-enterprise-service/src/main/resources/dubbo-gic-platform-enterprise-service.xml
View file @
a878f9cb
...
...
@@ -27,4 +27,7 @@
<!-- 字典 -->
<dubbo:reference
interface=
"com.gic.bizdict.api.service.BizdictService"
id=
"bizdictService"
timeout=
"60000"
/>
<dubbo:service
interface=
"com.gic.enterprise.service.DictApiService"
ref=
"dictApiService"
timeout=
"60000"
/>
<!--支付信息-->
<dubbo:service
interface=
"com.gic.enterprise.service.BillingPayInfoApiService"
ref=
"billingPayInfoApiService"
timeout=
"60000"
/>
</beans>
gic-platform-enterprise-service/src/main/resources/mapper/TabBillingPayInfoMapper.xml
View file @
a878f9cb
...
...
@@ -18,11 +18,12 @@
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"buy_type"
jdbcType=
"INTEGER"
property=
"buyType"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
pay_info_id, enterprise_id, serial_number, pay_type, total_fee_paid, time_start,
time_end, result_code, err_code, err_code_des, code_url, prepay_id, invoice_status,
status, create_time, update_time
status, create_time, update_time
, buy_type
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -40,13 +41,13 @@
time_end, result_code, err_code,
err_code_des, code_url, prepay_id,
invoice_status, status, create_time,
update_time)
update_time
, buy_type
)
values (#{payInfoId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
#{payType,jdbcType=INTEGER}, #{totalFeePaid,jdbcType=DOUBLE}, #{timeStart,jdbcType=VARCHAR},
#{timeEnd,jdbcType=VARCHAR}, #{resultCode,jdbcType=INTEGER}, #{errCode,jdbcType=VARCHAR},
#{errCodeDes,jdbcType=VARCHAR}, #{codeUrl,jdbcType=VARCHAR}, #{prepayId,jdbcType=VARCHAR},
#{invoiceStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
#{updateTime,jdbcType=TIMESTAMP}
, #{buyType,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.enterprise.entity.TabBillingPayInfo"
>
insert into tab_billing_pay_info
...
...
@@ -99,6 +100,9 @@
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"buyType != null"
>
buy_type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"payInfoId != null"
>
...
...
@@ -149,6 +153,9 @@
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"buyType != null"
>
#{buyType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.enterprise.entity.TabBillingPayInfo"
>
...
...
@@ -199,6 +206,9 @@
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"buyType != null"
>
buy_type = #{buyType,jdbcType=INTEGER},
</if>
</set>
where pay_info_id = #{payInfoId,jdbcType=INTEGER}
</update>
...
...
@@ -218,7 +228,28 @@
invoice_status = #{invoiceStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
buy_type = #{buyType,jdbcType=INTEGER}
where pay_info_id = #{payInfoId,jdbcType=INTEGER}
</update>
<select
id=
"listBill"
parameterType=
"com.gic.enterprise.qo.BillListQueryQO"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_billing_pay_info
where enterprise_id = #{enterpriseId}
<if
test=
"buyType != null"
>
buy_type = #{buyType}
</if>
<if
test=
"payType != null"
>
pay_type = #{payType}
</if>
<if
test=
"startTime != null"
>
DATE_FORMAT(create_time,'%Y-%m-%d') >= #{startTime}
</if>
<if
test=
"endTime != null"
>
DATE_FORMAT(create_time,'%Y-%m-%d')
<
= #{endTime}
</if>
</select>
</mapper>
\ No newline at end of file
gic-platform-enterprise-web/pom.xml
View file @
a878f9cb
...
...
@@ -80,6 +80,11 @@
<version>
${gic-enterprise-base-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-platform-enterprise-api
</artifactId>
<version>
${gic-platform-enterprise-api}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<version>
2.1.5.RELEASE
</version>
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/exception/GlobalExceptionHandler.java
View file @
a878f9cb
package
com
.
gic
.
enterprise
.
web
.
exception
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.store.constant.StoreGroupErrorEnum
;
import
com.gic.store.exception.StoreException
;
import
com.gic.store.exception.StoreGroupException
;
import
java.io.ByteArrayOutputStream
;
import
java.io.PrintWriter
;
import
java.util.List
;
import
java.util.Set
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.ConstraintViolation
;
import
javax.validation.ConstraintViolationException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.validation.BindException
;
...
...
@@ -13,13 +17,10 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.ConstraintViolation
;
import
javax.validation.ConstraintViolationException
;
import
java.io.ByteArrayOutputStream
;
import
java.io.PrintWriter
;
import
java.util.List
;
import
java.util.Set
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.exception.CommonException
;
import
com.gic.store.constant.StoreGroupErrorEnum
;
/**
* 全局异常处理类
...
...
@@ -79,19 +80,9 @@ public class GlobalExceptionHandler {
return
getRestResponse
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
getFailFastMsg
(
paramName
,
paramError
));
}
/**
* 自定义异常统一处理
* @param e
* @return
*/
@ResponseBody
@ExceptionHandler
(
StoreGroupException
.
class
)
public
RestResponse
customException
(
StoreGroupException
e
)
{
return
getRestResponse
(
e
.
getErrorCode
(),
e
.
getMessage
());
}
@ResponseBody
@ExceptionHandler
(
Store
Exception
.
class
)
public
RestResponse
customException
(
Store
Exception
e
)
{
@ExceptionHandler
(
Common
Exception
.
class
)
public
RestResponse
customException
(
Common
Exception
e
)
{
return
getRestResponse
(
e
.
getErrorCode
(),
e
.
getMessage
());
}
...
...
gic-platform-enterprise-web/src/main/resources/dubbo-gic-platform-enterprise-web.xml
View file @
a878f9cb
...
...
@@ -36,5 +36,6 @@
<dubbo:reference
interface=
"com.gic.store.service.StoreStatusSettingApiService"
id=
"storeStatusSettingApiService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.log.api.service.LogApiService"
id=
"logApiService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.BillingPayInfoApiService"
id=
"billingPayInfoApiService"
timeout=
"60000"
/>
</beans>
\ No newline at end of file
gic-platform-operation-web/src/main/java/com/gic/operation/web/exception/GlobalExceptionHandler.java
View file @
a878f9cb
...
...
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.exception.
Enterprise
Exception
;
import
com.gic.enterprise.exception.
Common
Exception
;
import
com.gic.store.exception.StoreException
;
/**
...
...
@@ -91,8 +91,8 @@ public class GlobalExceptionHandler {
return
getRestResponse
(
e
.
getErrorCode
(),
e
.
getMessage
());
}
@ResponseBody
@ExceptionHandler
(
Enterprise
Exception
.
class
)
public
RestResponse
customException
(
Enterprise
Exception
e
)
{
@ExceptionHandler
(
Common
Exception
.
class
)
public
RestResponse
customException
(
Common
Exception
e
)
{
return
getRestResponse
(
e
.
getErrorCode
(),
e
.
getMessage
());
}
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/utils/UserPasswordUtil.java
View file @
a878f9cb
package
com
.
gic
.
operation
.
web
.
utils
;
import
com.gic.enterprise.utils.CreateRandomUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
com.gic.auth.constant.UserConstants
;
import
com.gic.commons.util.Md5Util
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.exception.EnterpriseException
;
import
com.gic.enterprise.exception.CommonException
;
import
com.gic.enterprise.utils.CreateRandomUtils
;
/**
* @author guojx
...
...
@@ -45,7 +45,7 @@ public class UserPasswordUtil {
//如果一致
return
password
;
}
else
{
throw
new
Enterprise
Exception
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"密码不一致"
);
throw
new
Common
Exception
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"密码不一致"
);
}
}
}
...
...
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