Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
9a7306b4
Commit
9a7306b4
authored
Oct 31, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开店费更为数据库配置
parent
c33282ce
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1650 additions
and
7 deletions
+1650
-7
ch-dao/src/main/java/com/wwdz/ch/db/dao/openShop/OpenShopCostConfigDao.java
...va/com/wwdz/ch/db/dao/openShop/OpenShopCostConfigDao.java
+8
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/openShop/OpenShopCostConfig.java
...va/com/wwdz/ch/db/domain/openShop/OpenShopCostConfig.java
+266
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/openShop/OpenShopCostConfigExample.java
...wwdz/ch/db/domain/openShop/OpenShopCostConfigExample.java
+963
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/openShop/OpenShopCostConfigDaoImpl.java
...m/wwdz/ch/db/impl/openShop/OpenShopCostConfigDaoImpl.java
+23
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/openShop/OpenShopCostConfigMapper.java
.../wwdz/ch/db/mapper/openShop/OpenShopCostConfigMapper.java
+68
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/openShop/OpenShopCostConfigMapper.xml
...m/wwdz/ch/db/mapper/openShop/OpenShopCostConfigMapper.xml
+306
-0
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/OpenShopServiceImpl.java
...ava/com/wwdz/ch/wx/impl/openShop/OpenShopServiceImpl.java
+12
-3
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/WxPayServiceTest.java
...pi/src/test/java/com/wwdz/ch/wx/api/WxPayServiceTest.java
+3
-3
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/openShop/OpenShopCostConfigDao.java
0 → 100644
View file @
9a7306b4
package
com.wwdz.ch.db.dao.openShop
;
import
com.wwdz.ch.db.domain.openShop.OpenShopCostConfig
;
public
interface
OpenShopCostConfigDao
{
OpenShopCostConfig
findOne
();
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/openShop/OpenShopCostConfig.java
0 → 100644
View file @
9a7306b4
package
com.wwdz.ch.db.domain.openShop
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/10/31
*/
@Data
public
class
OpenShopCostConfig
implements
Entity
{
private
Integer
id
;
/**
* 开店费,单位为分
*/
private
Long
openShopAmount
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 是否有效
*/
private
Boolean
isValid
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", openShopAmount="
).
append
(
openShopAmount
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", isValid="
).
append
(
isValid
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
OpenShopCostConfig
other
=
(
OpenShopCostConfig
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getOpenShopAmount
()
==
null
?
other
.
getOpenShopAmount
()
==
null
:
this
.
getOpenShopAmount
().
equals
(
other
.
getOpenShopAmount
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getIsValid
()
==
null
?
other
.
getIsValid
()
==
null
:
this
.
getIsValid
().
equals
(
other
.
getIsValid
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getOpenShopAmount
()
==
null
)
?
0
:
getOpenShopAmount
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getIsValid
()
==
null
)
?
0
:
getIsValid
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
openShopAmount
(
"open_shop_amount"
,
"openShopAmount"
,
"BIGINT"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
isValid
(
"is_valid"
,
"isValid"
,
"BIT"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/openShop/OpenShopCostConfigExample.java
0 → 100644
View file @
9a7306b4
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/impl/openShop/OpenShopCostConfigDaoImpl.java
0 → 100644
View file @
9a7306b4
package
com.wwdz.ch.db.impl.openShop
;
import
com.wwdz.ch.db.dao.openShop.OpenShopCostConfigDao
;
import
com.wwdz.ch.db.domain.openShop.OpenShopCostConfig
;
import
com.wwdz.ch.db.domain.openShop.OpenShopCostConfigExample
;
import
com.wwdz.ch.db.mapper.openShop.OpenShopCostConfigMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
OpenShopCostConfigDaoImpl
implements
OpenShopCostConfigDao
{
@Autowired
OpenShopCostConfigMapper
openShopCostConfigMapper
;
@Override
public
OpenShopCostConfig
findOne
()
{
OpenShopCostConfigExample
example
=
new
OpenShopCostConfigExample
();
OpenShopCostConfigExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIsValidEqualTo
(
true
);
return
openShopCostConfigMapper
.
selectOneByExample
(
example
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/openShop/OpenShopCostConfigMapper.java
0 → 100644
View file @
9a7306b4
package
com.wwdz.ch.db.mapper.openShop
;
import
com.wwdz.ch.db.domain.openShop.OpenShopCostConfig
;
import
com.wwdz.ch.db.domain.openShop.OpenShopCostConfigExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
OpenShopCostConfigMapper
{
long
countByExample
(
OpenShopCostConfigExample
example
);
int
deleteByExample
(
OpenShopCostConfigExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
OpenShopCostConfig
record
);
int
insertSelective
(
OpenShopCostConfig
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
OpenShopCostConfig
selectOneByExample
(
OpenShopCostConfigExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
OpenShopCostConfig
selectOneByExampleSelective
(
@Param
(
"example"
)
OpenShopCostConfigExample
example
,
@Param
(
"selective"
)
OpenShopCostConfig
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
OpenShopCostConfig
>
selectByExampleSelective
(
@Param
(
"example"
)
OpenShopCostConfigExample
example
,
@Param
(
"selective"
)
OpenShopCostConfig
.
Column
...
selective
);
List
<
OpenShopCostConfig
>
selectByExample
(
OpenShopCostConfigExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table open_shop_cost_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
OpenShopCostConfig
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
OpenShopCostConfig
.
Column
...
selective
);
OpenShopCostConfig
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
OpenShopCostConfig
record
,
@Param
(
"example"
)
OpenShopCostConfigExample
example
);
int
updateByExample
(
@Param
(
"record"
)
OpenShopCostConfig
record
,
@Param
(
"example"
)
OpenShopCostConfigExample
example
);
int
updateByPrimaryKeySelective
(
OpenShopCostConfig
record
);
int
updateByPrimaryKey
(
OpenShopCostConfig
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/openShop/OpenShopCostConfigMapper.xml
0 → 100644
View file @
9a7306b4
This diff is collapsed.
Click to expand it.
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
9a7306b4
...
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.openShop"
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
guarantee_money_record
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
open_shop_cost_config
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/OpenShopServiceImpl.java
View file @
9a7306b4
...
...
@@ -14,11 +14,13 @@ import com.wwdz.ch.db.dao.distribution.SupplierItemDao;
import
com.wwdz.ch.db.dao.distribution.UserBankCardDao
;
import
com.wwdz.ch.db.dao.openShop.GuaranteeMoneyRecordDao
;
import
com.wwdz.ch.db.dao.openShop.OpenShopApplyOrderDao
;
import
com.wwdz.ch.db.dao.openShop.OpenShopCostConfigDao
;
import
com.wwdz.ch.db.dao.openShop.OpenShopCostRecordDao
;
import
com.wwdz.ch.db.domain.CollectorWhiteList
;
import
com.wwdz.ch.db.domain.distribution.UserBankCard
;
import
com.wwdz.ch.db.domain.openShop.GuaranteeMoneyRecord
;
import
com.wwdz.ch.db.domain.openShop.OpenShopApplyOrder
;
import
com.wwdz.ch.db.domain.openShop.OpenShopCostConfig
;
import
com.wwdz.ch.db.domain.openShop.OpenShopCostRecord
;
import
com.wwdz.ch.db.dto.request.distribution.DistributionOrderRequestDto
;
import
com.wwdz.ch.db.dto.request.openShop.GuaranteeMoneyRecordRequestDto
;
...
...
@@ -68,6 +70,9 @@ public class OpenShopServiceImpl implements OpenShopService {
@Autowired
UserBankCardDao
userBankCardDao
;
@Autowired
OpenShopCostConfigDao
openShopCostConfigDao
;
@Override
public
Result
checkAbleToOpenShop
(
OpenShopInfoRequestDto
dto
)
{
try
{
...
...
@@ -94,8 +99,9 @@ public class OpenShopServiceImpl implements OpenShopService {
public
Result
createOpenShopApplyOrder
(
OpenShopInfoRequestDto
dto
)
{
try
{
Date
now
=
new
Date
();
OpenShopCostConfig
openShopCostConfig
=
openShopCostConfigDao
.
findOne
();
//月底修改为300
long
openShopAmount
=
1L
;
long
openShopAmount
=
openShopCostConfig
.
getOpenShopAmount
()
;
//创建申请单
String
orderId
=
IdUtils
.
getOrderNumber
(
"OA"
);
OpenShopApplyOrder
openShopApplyOrder
=
new
OpenShopApplyOrder
();
...
...
@@ -219,12 +225,15 @@ public class OpenShopServiceImpl implements OpenShopService {
@Override
public
Result
findOpenShopApplyOrder
(
OpenShopApplyOrderRequestDto
dto
)
{
try
{
OpenShopApplyOrderVo
openShopApplyOrderVo
=
new
OpenShopApplyOrderVo
();
long
userId
=
dto
.
getUserId
();
OpenShopApplyOrder
openShopApplyOrder
=
openShopApplyOrderDao
.
findByUserId
(
userId
);
if
(
openShopApplyOrder
==
null
)
{
return
Result
.
success
();
OpenShopCostConfig
openShopCostConfig
=
openShopCostConfigDao
.
findOne
();
long
openShopAmount
=
openShopCostConfig
.
getOpenShopAmount
();
openShopApplyOrderVo
.
setOpenShopAmount
(
String
.
valueOf
(
openShopAmount
));
return
Result
.
success
(
openShopApplyOrderVo
);
}
OpenShopApplyOrderVo
openShopApplyOrderVo
=
new
OpenShopApplyOrderVo
();
EntityMapper
.
copyAttribute
(
openShopApplyOrder
,
openShopApplyOrderVo
);
openShopApplyOrderVo
.
setStateName
(
OpenShopApplyOrderEnum
.
StateEnum
.
getNameByCode
(
openShopApplyOrderVo
.
getState
()));
...
...
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/WxPayServiceTest.java
View file @
9a7306b4
...
...
@@ -89,12 +89,12 @@ public class WxPayServiceTest {
@Test
public
void
refund
()
{
List
<
String
>
list
=
Arrays
.
asList
(
"
DA2410182000468846189
"
);
List
<
String
>
list
=
Arrays
.
asList
(
"
OSC2410301513339847057"
,
"OSC2410301635131217582
"
);
list
.
forEach
(
orderId
->{
DistributionOrderRequestDto
dto
=
new
DistributionOrderRequestDto
();
dto
.
setDistributionOrderId
(
orderId
);
dto
.
setAmount
(
"1
86
"
);
dto
.
setRefundPrice
(
"1
86
"
);
dto
.
setAmount
(
"1
00
"
);
dto
.
setRefundPrice
(
"1
00
"
);
Result
result
=
wxPayServiceApi
.
refund
(
dto
);
logger
.
info
(
"申请微信支付退款:{}"
,
result
);
});
...
...
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